APL Orchard: Difference between revisions

From APL Wiki
Jump to navigation Jump to search
(chat bot is back!)
No edit summary
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]] evaluates APL expressions.<!--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 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 62: Line 62:
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 ===
=== Executing code ===


The room features a chat bot, '''TryAPL''', 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] via [https://tryapl.org TryAPL]'s API.</ref> To use it, write [[#inline|inline code]] or a [[#Multi-line messages|multi-line code block]], and prepend <source lang=apl inline>⎕←</source> or <source lang=apl inline>⋄</source> to lines you wish to run.<ref>For details, see [https://codegolf.stackexchange.com/users/75949 the chat bot's profile].</ref>
The APL Orchard features two ways of executing code directly in the chat room, both based on [[TryAPL]]:


=== APL execution userscript ===
* [[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.
Similar in functionality to the [[#Chat_bot|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].


== Conventions ==
== Conventions ==

Revision as of 14:31, 27 June 2021

Typical activity over a 24-hour period (UTC)

The APL Orchard (apl.chat) is a 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 blog post about the chat room, focusing on Dyalog Ltd.'s relationship with newcomers and established users.[1]

Community ad for the APL Orchard on Code Golf Stack Exchange.

Access

The giant avatar

While anyone can read the ongoing and past conversations, write access requires a Stack Exchange account and either 20 Stack Exchange reputation points or having been granted explicit write access by a moderator. The procedure for getting explicit write access is as follows:

  1. Go to the chat room
  2. Click the giant lower-left avatar
  3. Click "user profile"
  4. Copy the URL of the page that opens (e.g. "https://chat.stackexchange.com/users/123456/johndoe")
  5. Email that URL to access@apl.chat

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

Features

Messages

In the chat you can use a simplified subset of markdown for simple formatting like italics, bold and strikethrough. You can include links in your messages, or post an image. See below for details. The Sandbox room can be used to experiment with the chat system without bothering anyone.

To write a message, type into the input field and press Enter or click the send button to submit.

To post an image which is already hosted online, submit a message consisting exclusively of the URL to the image. Users with sufficient Stack Exchange reputation, see an upload… to the right send, allowing uploading images directly from their computer.

A user can be pinged (audio is played on their device) by writing @, followed by the username without spaces. On the top-right, to the left of all rooms you can configure the sound of notifications. If the user hasn't been in the room before, or hasn't been in it for long enough, they might not be pingable. The Stack Exchange Android app allows receiving ping notifications as push notifications regardless of whether you're in the room. There is no way to ping everyone in the room, although @all is used as a non-pinging convention when addressing everyone.

To mark a message as potentially valuable for others, hover over it and and click the dark grey star (). This will cause it to turns yellow () and the message will be visible on the starboard (the right sidebar) for some time. Click again to un-star.

To enter APL characters, see the article on typing glyphs.

Replies

To reply to a specific message, hover over the message you want to reply to and click in the bottom-right corner of that message. This will insert a code similar to :12345678 into the input field. Proceed to type your response and press enter or click send to send it. Note that replying to a message pings the user who wrote the message.

You can view what a message was a reply to by clicking the reply indicator icon 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.

Basic formatting

  • Italics: *italics* or _italics_
  • Bold: **bold** or __bold__
  • Strike through: ---strike through---
  • Inline code: `inline code` [2]
  • Link: https://example.com or [display me](https://example.com) or [display me](https://example.com "hover text")[3]
  • Tags: [tag:code-golf] or [meta-tag:discussion] (tags from Stack Exchange's code golf community, Code Golf & Coding Challenges)
  • Oneboxes: When posted alone in a message, optionally preceded by a reply indicator (:12345678), some links (images, Wikipedia pages, Stack Exchange links, etc.) get "oneboxed", giving them an expanded display with special formatting.

Multi-line messages

It's possible to insert line breaks in messages with Shift+Enter. 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 Ctrl+k or with the fixed font 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.

After posting

Within 2 minutes of posting a message, it can be edited or deleted. The edit history of a message (unless it has been deleted) is publicly visible ― see "history" when clicking actions on the left of a message.

A permalink of a message can be gotten by copying the link on the actions panel.

The user interface doesn't directly allow replying to oneself. However, there is a work-around: Click actions on the left of your message and copy the permalink. The message number is after the pound sign # in the URL. Copy it and start your message with a colon and the pasted number immediately after, for example :1234568 Really?.

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 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 and then "history".

Executing code

The APL Orchard features two ways of executing code directly in the chat room, both based on TryAPL:

  • A chatbot which responds to code in posted messages.
  • A userscript which evaluates code directly in the message input field.

Conventions

Since a lot of questions are repeated, it is courteous to search for an answer on APLcart before asking in the APL Orchard.

Announcements are made with the initial markdown **Announcement:** rendering the text in bold.

Some abbreviations are ubiquitous, like TMN for Traditional Mathematical Notation, and CMC for Chat Mini Challenge which usually implies an informal code golf competition. Additional terms an abbreviations are shared with those of the Stack Exchange code golf community. When posting such a chat mini challenge, the task specification is prefaced with the markdown **CMC:**, rendering the text in bold.

Some use a reply of +←1 to indicate agreement or appreciation,[4] similar to how "+1" or "👍" is used in other social media.

Emoticons

○/ greeting, farewell
frown, displeasure, "hmpf"
\○/ despair, wonderment, "wow" (be careful as this can be positive or negative)
¯\_(⍨)_/¯ "oh well"
∘.○ "I'm confused"

Live sessions

APL Cultivation

Main article: APL Cultivation

From 18 October 2017 until 16 May 2018, Adám Brudzewsky ran a series of 29 weekly 90-minute study sessions, covering most aspects of basic APL programming. Beginning 28 November 2019, he resumed the series with 20 more in-depth lessons every two weeks, ending 25 August, 2020.

APL Seeds

In 2020, Marshall Lochbaum ran a mini-series 60-minute live chat lessons on implementing APL-like languages, especially focusing on BQN:

Lesson Title Date
S1 Parenthesis nesting level Jun 10, 2020
S2 Infix to RPN Jun 24, 2020
S3 Parsing expressions with parentheses July 8, 2020

External links

Notes

  1. Morten Kromberg. The APL Orchard. Dyalog Blog. 21 February 2021.
  2. Backticks can be escaped with a backslash (`\`x\`y` renders as `x`y). Alternatively, ```multiple``backticks\```, which also disable \-escaping, can be used, giving multiple``backticks\ - 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.
  3. 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 Shift+Enter.
  4. This is a pun on the APL expression counter+←1 increasing the counter (of "likes") by one.
APL community [edit]
Conferences and activities Advent of CodeAPL CampfireAPL CultivationAPL Meetup (Portuguese) ∙ APL ShowAPL Problem Solving CompetitionAPL ChallengeAPL QuestAPL SeedsArray CastBAA sessionsCode golfDyalog user meetingsDyalog webinarsIverson Award
Chat rooms and forums APL FarmAPL Orchard
User groups APL et J (France) ∙ APL Germany (terminology) ∙ APL ∊ BCN (Spain) ∙ BAA (UK) ∙ FinnAPL (Finland) ∙ SIGAPL (USA) ∙ Tokyo APL/J/K Meetup (Japan)
People Phil AbramsBrian BeckerBob BerneckyLarry BreedCharles BrennerJim BrownAdám BrudzewskyGitte ChristensenPeter DonnellyJohn EarnestAdin FalkoffGarth FosterLib GibsonAaron HsuRoger HuiKen IversonMorten KrombergDick LathwellMarshall LochbaumEugene McDonnellRoger MooreTrenchard MoreAlan PerlisHenry RichAl RoseJohn ScholesIan SharpBob SmithGeoff StreeterJoey TuttleArthur Whitney
Other APL Quote QuadAPL WikiBlogsBooksCase studiesFamous APL usersHumourJobsMerchandisePapersPodcastsTryAPLTry It OnlineVideo channels