https://tryapl.org
TryAPL
TryAPL File Intro Learn Primer Links Help Got a minute? — Try APL! 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 ⍳10 Generate the first ten integers +/⍳100000 Sum the first 100 000 integers ×/⍳10 A long, slow way to write !10 Avg←{(+⌿⍵)÷≢⍵} Average is the sum divided by the count Avg 1 6 3 4 … and apply it throws←?10000⍴6 Store 10 000 dice throws +/1=throws Of 10 000 throws, how many 1s? +/(⍳6)∘.=throws Frequency of all 6 possibilities 'Hello, World!' Not just about maths! {⍺,≢⍵}⌸'Mississippi' See? 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!! Interactive lessons We use the Jupyter Notebook format to provide interactive lessons. Limitations apply. For full functionality, download Dyalog APL for free. Load failed! Basics Using the TryAPL Tutorials APL Expressions Arrays Functions Closer Looks Arithmetic Functions: + - × ÷ * ⍟ ⌈ ⌊ | Grading and Sorting: ⍋ ⍒ Modifying Rank and Depth: ↑ ↓ ⊂ ⊃ Random Numbers: ? Boolean Functions and Boolean Algebra: ∧ ∨ ⍱ ⍲ etc. Comparison Functions: < ≤ = ≥ > ≠ Reduce and Scan: / \ Further Explorations Conway's Game of Life Lookup Without Replacement Sudoku Solver Viewing lesson: Cheat Sheet Primitives Use the language bar above to insert glyphs. Click on a glyph below to print basic usage and how to type it. Enter ]help followed by a symbol for details; for example ]help +. Mathematics Logic and Comparison Structural Selection and Set Operations Search and Ordering Operators Miscellaneous Additional features The below subset of Dyalog's functionality is also supported in TryAPL. Enter for example ]help ]display for details: Listing ]Display ⍳2 3 fully visualise array's structure )VARS list variable names )FNS list function names )OPS list operator names Undoing Assignments )CLEAR clear workspace )ERASE name delete name(s) Settings ⎕CT Comparison Tolerance ⎕DIV Division Method ⎕FR Floating-Point Representation ⎕IO Index Origin ⎕PP Print Precision ⎕RL Random Link Definition ⎕AT Attributes ⎕CR Canonical Representation ⎕FX Fix Definition ⎕NR Nested Representation ⎕VR Vector Representation Information ⎕DR Data Representation ⎕NC Name Class ⎕NL Name List ⎕SIZE Size of Object ⎕TS Time Stamp Text Manipulation ⎕C Case Convert ⎕FMT Format ⎕R Replace ⎕S Search ⎕VFI Verify & Fix Input Data Conversion ⎕DR Data Representation ⎕DT Date-time Convert ⎕JSON JSON Convert ⎕UCS Unicode Convert ⎕XML XML Convert Other ⎕A Alphabetic Characters ⎕D Digits ⎕DL Delay Useful links APL Wiki Most information is available on the APL Wiki, for example: Learning resources How to run APL Online documentation Getting help Having trouble? You might find your question already answered on: APLcart Stack Overflow If that didn't do it, just get in touch with the welcoming community: Chat in the APL Orchard, a very active chat room Ask a question on Stack Overflow Post on the Dyalog Forums Ask on the r/apljk subreddit Dyalog social media: Twitter, Facebook, LinkedIn Recommended videos There are lots of good APL videos out there, including these hand-picked masterpieces: Conway's Game of Life in APL Palindromic Expression for Phi in APL A Sudoku Solver in APL APL demonstration 1975 Why APL Is Still Cool (at QCon 2011) Design Patterns vs Anti pattern in APL (at FnConf17) Pragmatic Functional Programming with Dyalog's CTO (Talks at Google, 2015) Dyalog TV (webinars and user meetings) Help and About Primitives 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 `, §, °, ², µ, º, ½ or ù, 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. Shortcut keys EnterExecute current line Shift+EscapeClear current line Ctrl+Shift+Backspace or Alt+UpPrevious input Ctrl+Shift+Enter or Alt+DownNext input Access-key hOpen language help Access-key zZoom right pane Access-key lPermalink in URL bar Access-key bUse black theme Access-key wUse white theme You can navigate the tabs using the keyboard: Access-key iOpen and focus on Intro tab Tab Focus on next tab Shift+Tab Focus on previous tab Space Select focused tab While running a notebook: Access-key sStop current Access-key rRestart current Access-key pPrevious step Access-key nNext step About TryAPL TryAPL free open source software and consists of a JavaScript front-end sending requests to a state-less Jarvis back-end which uses Safe Execute for Dyalog APL under Docker. Dyalog APL runs under Linux, including Raspberry Pi, Microsoft Windows, and macOS. 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 tryapl@dyalog.com. Limitations 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. Credits ImplementationBrian Becker DesignBrian McCormick Additional tutorialsWill Robertson ReimplementationRichard Park RedesignAdám Brudzewsky InspirationJoel Hough IdeasJohn Scholes, Andy Shiers, Roger Hui, John Daintree DomainShaun Gilchrist APL web serviceJarvis APL whitelistSafe Execute Split panesSplit.js Text fontNunito MarkdownMarked.js FormulasMathJax Sharing code Access-key l will generate a shareable link in the URL bar for the line of code indicated by your text cursor. Workspace Data By default, your workspace is not saved between page visits, unless you opt in: Save workspace using local storage 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. Use )SAVE or the download button below to save your workspace as a .tryapl file. Use )LOAD or the upload button below to load a .tryapl file. 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. Share a TryAPL link that loads a workspace with tryapl.org?ws=[URL] or a notebook with tryapl.org?nb=[URL]. You can download your workspace as a .tryapl file: Download… You can upload a .tryapl workspace from your computer or load it from a URL: Upload… Load failed! × WARNINGLoading another workspace will overwrite your current workspace. Use the Download… button to save your workspace now. Download… Load Cancel
en
en
1773105162
https://tryapl.org
Modifier votre site ?
Que fais-tu?