APL Orchard: Difference between revisions

Jump to navigation Jump to search
1,433 bytes removed ,  14:31, 27 June 2021
no edit summary
No edit summary
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
[[File:APL Orchard activity.png|thumb|right|Typical activity over a 24-hour period (UTC)]]
[[File:APL Orchard activity.png|thumb|right|Typical activity over a 24-hour period (UTC)]]
'''The APL Orchard''' ([https://apl.chat apl.chat]) is a [[wikipedia:Stack Exchange|Stack Exchange]] chat room dedicated to learn and teach APL, and to ask and answer questions about both golfing and general coding in APL. It was opened by [[Adám Brudzewsky]] on January 24, 2017, and has since developed its own community, remaining the most active APL chat room today, with over 1.000 messages per week. It passed a total of a 100.000 messages by 200 users in July 2020, and 150.000 messages by 250 users in February 2021. <!-- A [[#Chat_bot|chat bot]] synchronises the Stack Exchange room with the [[wikipedia:Freenode|Freenode]] #apl IRC room.-->
'''The APL Orchard''' ([https://apl.chat apl.chat]) is a [[wikipedia:Stack Exchange|Stack Exchange]] chat room dedicated to learn and teach APL, and to ask and answer questions about both golfing and general coding in APL. It was opened by [[Adám Brudzewsky]] on January 24, 2017, and has since developed its own community, remaining the most active APL chat room today, with over 1.000 messages per week. It passed a total of a 100.000 messages by 200 users in July 2020, and 150.000 messages by 250 users in February 2021. Code can be executed directly in the chat room.


Many participants arrive as complete beginners when it comes to APL, some not even knowing what APL is. Instead, they are attracted by the room being among the most active on Stack Exchange. Other participants are APL veterans. [[Morten Kromberg]] has written a [[blogs|blog]] post about the chat room, focusing on Dyalog Ltd.'s relationship with newcomers and established users.<ref>[[Morten Kromberg]]. [https://www.dyalog.com/blog/2021/02/the-apl-orchard/ The APL Orchard]. [[Dyalog Ltd.|Dyalog]] Blog. 21 February 2021.</ref>
Many participants arrive as complete beginners when it comes to APL, some not even knowing what APL is. Instead, they are attracted by the room being among the most active on Stack Exchange. Other participants are APL veterans. [[Morten Kromberg]] has written a [[blogs|blog]] post about the chat room, focusing on Dyalog Ltd.'s relationship with newcomers and established users.<ref>[[Morten Kromberg]]. [https://www.dyalog.com/blog/2021/02/the-apl-orchard/ The APL Orchard]. [[Dyalog Ltd.|Dyalog]] Blog. 21 February 2021.</ref>
Line 14: Line 14:
# Email that URL to access@apl.chat
# Email that URL to access@apl.chat


Newly joined users always display a generic user name (like user1234567) until they've had some positive activity.
Newly joined users always display a generic user name (like user1234567) and avatar until they've had some positive activity.


== Features ==
== Features ==
Line 32: Line 32:
=== Replies ===
=== Replies ===


To reply to a specific message, hover over the message you want to reply to and click <kbd>↳</kbd> in the bottom-right corner of that message. This will insert a code similar to <code>:12345678</code> into the input field. Proceed to type your response and press enter or click <kbd>send</kbd> to send it. Note that replying to a message pings the user who wrote the message. To reply to users posting from IRC, via the chat bot, it is preferred to use <source lang=md inline>name:</source> instead of <code>@name</code>. Note that IRC users do not see edits, deletions, or formatting.
To reply to a specific message, hover over the message you want to reply to and click <kbd>↳</kbd> in the bottom-right corner of that message. This will insert a code similar to <code>:12345678</code> into the input field. Proceed to type your response and press enter or click <kbd>send</kbd> to send it. Note that replying to a message pings the user who wrote the message. <!-- To reply to users posting from IRC, via the chat bot, it is preferred to use <source lang=md inline>name:</source> instead of <code>@name</code>. Note that IRC users do not see edits, deletions, or formatting. -->


You can view what a message was a reply to by clicking the reply indicator icon <kbd>↰</kbd> to the left of a message, which will either focus the target message on the screen, or, if the target message is too far in the past, open up the transcript pointing to the target message. Alternatively, hovering over a message will highlight the message it is replying to, and all its replies.
You can view what a message was a reply to by clicking the reply indicator icon <kbd>↰</kbd> to the left of a message, which will either focus the target message on the screen, or, if the target message is too far in the past, open up the transcript pointing to the target message. Alternatively, hovering over a message will highlight the message it is replying to, and all its replies.
Line 40: Line 40:
* '''Bold''': <source lang=md inline>**bold**</source> or <source lang=md inline>__bold__</source>
* '''Bold''': <source lang=md inline>**bold**</source> or <source lang=md inline>__bold__</source>
* '''Strike through''': <source lang=md inline>---strike through---</source>
* '''Strike through''': <source lang=md inline>---strike through---</source>
* '''Inline code:''' <source lang=md inline>`inline code`</source> <ref>Backticks can be escaped with a backslash (<source lang=md inline>`\`x\`y`</source> renders as <code>`x`y</code>). Alternatively, <code>```multiple``backticks\```</code>, which also disable <code>\</code>-escaping, can be used, giving <code>multiple``backticks\</code> - use a delimiter with one more backtick than the longest run of backticks in the code. Note that inline code cannot have leading white-space.</ref>
* {{Anchor|inline|'''Inline code:'''}} <source lang=md inline>`inline code`</source> <ref>Backticks can be escaped with a backslash (<source lang=md inline>`\`x\`y`</source> renders as <code>`x`y</code>). Alternatively, <code>```multiple``backticks\```</code>, which also disable <code>\</code>-escaping, can be used, giving <code>multiple``backticks\</code> - use a delimiter with one more backtick than the longest run of backticks in the code. Note that inline code cannot have leading white-space.</ref>
* '''Link''': <source lang=md inline>https://example.com</source> or <source lang=md inline>[display me](https://example.com)</source> or <source lang=md inline>[display me](https://example.com "hover text")</source><ref>Long URLs will be truncated with an ellipsis. A URL that exceeds the maximum message length of 500 characters can still be posted as a raw URL (without markdown): Follow it by <kbd>Shift</kbd>+<kbd>Enter</kbd>.</ref>
* '''Link''': <source lang=md inline>https://example.com</source> or <source lang=md inline>[display me](https://example.com)</source> or <source lang=md inline>[display me](https://example.com "hover text")</source><ref>Long URLs will be truncated with an ellipsis. A URL that exceeds the maximum message length of 500 characters can still be posted as a raw URL (without markdown): Follow it by <kbd>Shift</kbd>+<kbd>Enter</kbd>.</ref>
* '''Tags''': <source lang=md inline>[tag:code-golf]</source> or <source lang=md inline>[meta-tag:discussion]</source> (tags from Stack Exchange's [[code golf]] community, [https://codegolf.stackexchange.com/ Code Golf & Coding Challenges])
* '''Tags''': <source lang=md inline>[tag:code-golf]</source> or <source lang=md inline>[meta-tag:discussion]</source> (tags from Stack Exchange's [[code golf]] community, [https://codegolf.stackexchange.com/ Code Golf & Coding Challenges])
* '''Oneboxes:''' When posted alone in a message, optionally preceded by a reply indicator (<code>:12345678</code>), some links (images, Wikipedia pages, Stack Exchange links, etc.) get "oneboxed", giving them an expanded display with special formatting.
* '''Oneboxes:''' When posted alone in a message, optionally preceded by a reply indicator (<code>:12345678</code>), some links (images, Wikipedia pages, Stack Exchange links, etc.) get "oneboxed", giving them an expanded display with special formatting.


=== Multiline messages ===
=== Multi-line messages ===
It's possible to insert line breaks in messages with <kbd>Shift</kbd>+<kbd>Enter</kbd>. Pasting test containing line breaks into the input field also results in a multiline message. Multi-line messages do not support normal markdown.
It's possible to insert line breaks in messages with <kbd>Shift</kbd>+<kbd>Enter</kbd>. Pasting test containing line breaks into the input field also results in a multi-line message. Multi-line messages do not support normal markdown.


If each line of a message is preceded by 4 spaces (which can be inserted automatically with with <kbd>Ctrl</kbd>+<kbd>k</kbd> or with the <kbd>fixed font</kbd> button once multiple lines have been entered), the whole message will appear in monospace font. Note that individual lines cannot be formatted this way, and that there is no support for "code fences" (triple backticks before and after code).
If each line of a message is preceded by 4 spaces (which can be inserted automatically with with <kbd>Ctrl</kbd>+<kbd>k</kbd> or with the <kbd>fixed font</kbd> button once multiple lines have been entered), the whole message will appear in monospace font. Note that individual lines cannot be formatted this way, and that there is no support for "code fences" (triple backticks before and after code). Note that multi-line blocks cannot include a reply tag. Instead, one can begin with a leading reply message (which must contain something more than the reply tag), and then post a separate code block.


To post a mixture of body text and code blocks, simply post multiple messages in quick succession. The chat will render them as if merged into a single message.
To post a mixture of body text and code blocks, simply post multiple messages in quick succession. The chat will render them as if merged into a single message.
Line 61: Line 61:


In the transcript, the edit history is available for all messages, and this view includes the source of a message. The easiest way to reach it is to middle-click the <kbd>▼</kbd> action menu on the left of the wanted message to open the transcript in a new tab (or click, then click "permalink", if you don't have a middle mouse button), then click <kbd>▼</kbd> and then "history".
In the transcript, the edit history is available for all messages, and this view includes the source of a message. The easiest way to reach it is to middle-click the <kbd>▼</kbd> action menu on the left of the wanted message to open the transcript in a new tab (or click, then click "permalink", if you don't have a middle mouse button), then click <kbd>▼</kbd> and then "history".
<!--
=== Chat bot ===


The room features a chat bot, '''Dyalog APL''', which can evaluate a safe subset of APL.<ref>Using [[Adám Brudzewsky]]'s [https://github.com/abrudz/dyalog-safe-exec Safe Execute for Dyalog APL] tool.</ref> To use it, prefix a chat message, inline code, or a code block with <source lang=apl inline>⋄</source>. Using markdown (for example <source lang=md inline>`⋄ 2+3`</source>) or fixed-width (4 or more initial spaces on each line, which can be inserted by pressing <kbd>Ctrl</kbd>+<kbd>k</kbd>) is highly recommended for readability and to avoid interpretation of APL symbols as markdown.
=== Executing code ===
-->
=== APL execution userscript ===


Similar in functionality to the chat bot, the userscript adds an [[Execute]] button (<kbd>⍎</kbd>) to the right of the chat box. Clicking it or hitting access-key<ref>The keyboard combination varies by browser and operating system. For details, see  W3Schools' [https://www.w3schools.com/tags/att_global_accesskey.asp#table2 HTML accesskey Attribute] article.</ref> <kbd>x</kbd>, uses the [[Running APL|TryAPL]] API to execute the first line currently in the chat box, and appends the result to the chat box, while also formatting the chat box content to be rendered in monospace font. One can then hit the <kbd>send</kbd> button or <kbd>Enter</kbd> to submit the message. With a userscript extension (for example [https://www.tampermonkey.net/ Tampermonkey]) installed, navigating to [https://github.com/razetime/userscripts/raw/main/chatexec.user.js the raw file], should cause the extension to suggest automated installation. Alternatively, the script can be downloaded from the [https://github.com/razetime/userscripts userscripts GitHub repository] of [[User:Razetime|Razetime]], or from the [https://greasyfork.org/en Greasyfork userscript host] under the name [https://greasyfork.org/en/scripts/419379-chat-box-exec Chat box exec].
The APL Orchard features two ways of executing code directly in the chat room, both based on [[TryAPL]]:
 
* [[TryAPL#Chatbot|A chatbot]] which responds to code in posted messages.
* [[TryAPL#Chat box exec|A userscript]] which evaluates code directly in the message input field.


== Conventions ==
== Conventions ==

Navigation menu