APL is an array-oriented programming language that will change the way you think about problems and data. With a powerful, concise syntax, it lets you develop shorter programs that enable you to think more about the problem you're trying to solve than how to express it to a computer.
TryAPL runs on Dyalog, which you can download for free, or try it now by entering an expression (use the language bar above to type the special APL symbols), or clicking one of these expressions, followed by Enter, to see it in action:
2 + 2
No points for guessing this
4 2 3 + 8 5 7
Functions apply to arrays
Generate the first ten integers
Sum the first 100 000 integers
A long, slow way to write !10
Average is the sum divided by the count
Avg 1 6 3 4
… and apply it
Store 10 000 dice throws
Of 10 000 throws, how many 1s?
Frequency of all 6 possibilities
Not just about maths!
What can APL do for you?
Are you a Problem Solver (a domain or subject matter expert with problems to solve) or a Programmer (someone who translates those solutions into a computer-executable format)? Problem Solvers benefit from APL's ability to concisely express advanced concepts without getting bogged down with a lot of computerese syntax. Programmers benefit from APL's productivity and brevity. Shorter programs means quicker development time and less code to maintain and debug.
In either case, concepts that take several lines of code in other languages can often be reduced to a few characters in APL. You'll quickly find that APL's symbols are organized in a logical, mnemonic manner that makes it easy to express advanced concepts clearly and concisely, and makes it easy to learn too. Move to the Learn tab and get started or visit the Primer tab to explore on your own!!
Use the language bar above to insert glyphs. Click on a glyph in the Primer tab to print basic usage and how to type it. Enter ]help followed by a symbol for details; for example ]help +.
Use the language bar above to insert glyphs. Hovering over a symbol in the language bar, or clicking on it in the Primer tab, will show:
The APL symbol.
The common names for the concepts that the symbol represents.
The symbol's Tab input method: Enter two symbols, then press Tab to combine them. For example, <-Tab yields the ← symbol.
The symbol's Prefix input method: Press any one of the prefix keys
ù, and then the key according to the en-US keyboard diagram here.
More information on entering APL symbols using your keyboard can be found on the APL Wiki.
Execute current line
Clear current line
Ctrl+Shift+Backspace or Alt+Up
Ctrl+Shift+Enter or Alt+Down
Open language help
Zoom right pane
Permalink in URL bar
Use black theme
Use white theme
You can navigate the tabs using the keyboard:
Open and focus on Intro tab
Focus on next tab
Focus on previous tab
Select focused tab
While running a notebook:
The back-end is available for direct use too. This means that anyone can write a new front-end or otherwise avail themselves of the computation engine. The simple API is described on APL Wiki.
The Learn tab's lessons are Jupyter Notebooks documents and can be used locally. We welcome submissions of notebooks for inclusion in TryAPL, as well as reports of anomalies, suggestions, criticisms, and comments to email@example.com.
TryAPL has limited support for multi-line input. Lines that form a block with the previous line must begin with a tab character (U+09) which is automatically inserted if a line or block is missing closing one or more braces (}). For tradfns, and multi-line control structures, continue the current block using Alt+Enter. Press Esc to leave multi-line input mode.
Output, whether using ⎕← (other than at the beginning of a statement), ⍞←, or implicit output, is not supported.
To protect the server, expressions are checked against a whitelist while ⍎, ⍕, ⍣, ⌶, and ⎕FX have limited functionality. All supported quad-names, system and user commands are listed on the Primer tab.
Space and time limits can be queried with ]State. Exceeding the maximum time for execution of an expression causes the execution to be cancelled and the workspace will remain as it was before the expression was entered.
When using TryAPL, your workspace is automatically saved to local storage in your web browser. No data is stored on our servers; it is only sent across the network when you execute code. Manage your data from the File tab.
John Scholes, Andy Shiers, Roger Hui, John Daintree
Access-key l will generate a shareable link in the URL bar for the line of code indicated by your text cursor.
By default, your workspace is not saved between page visits, unless you opt in:
If the tickbox above is checked, then your workspace is automatically saved in your browser. You can always save your workspace to disk manually ― see below. No data is ever stored on our servers; it is only sent across the network when you execute code.
Use ⎕NL-⍳9 to see which names are used in your workspace.
Use )CLEAR to remove all names from your workspace.
Use )ERASE name to remove name from your workspace.
If the URL contains the clear parameter (tryapl.org?clear) then you will have a clear workspace and changes will not be saved. Removing the clear parameter will restore the data, if it exists and the checkbox above is ticked.
You can download your workspace as a .tryapl file:
You can upload a .tryapl workspace from your computer or load it from a URL:
Loading another workspace will overwrite your current workspace.
Use the Download… button to save your workspace now.