Main Page: Difference between revisions
m (Text replacement - "<source" to "<syntaxhighlight") Tags: Mobile edit Mobile web edit |
m (Text replacement - "</source>" to "</syntaxhighlight>") |
||
Line 42: | Line 42: | ||
APL's terseness means that substantial programs are expressible in a small space, relative to many other programming languages. Below are just a taste. Many more, and fully explained, examples are in the [[simple examples]] article. | APL's terseness means that substantial programs are expressible in a small space, relative to many other programming languages. Below are just a taste. Many more, and fully explained, examples are in the [[simple examples]] article. | ||
=== Split text by delimiter === | === Split text by delimiter === | ||
With the introduction of [[tacit programming]], many functions can be expressed in fewer characters than even the shortest fitting name. For example <syntaxhighlight lang=apl inline>≠⊆⊢</ | With the introduction of [[tacit programming]], many functions can be expressed in fewer characters than even the shortest fitting name. For example <syntaxhighlight lang=apl inline>≠⊆⊢</syntaxhighlight> is but three characters, while you would need five for the name <code>Split</code>: | ||
[https://tryapl.org/?a=%27%2C%27%28%u2260%u2286%u22A2%29%27comma%2Cdelimited%2Ctext%27&run Try it now!] | [https://tryapl.org/?a=%27%2C%27%28%u2260%u2286%u22A2%29%27comma%2Cdelimited%2Ctext%27&run Try it now!] | ||
Line 50: | Line 50: | ||
│comma│delimited│text│ | │comma│delimited│text│ | ||
└─────┴─────────┴────┘ | └─────┴─────────┴────┘ | ||
</ | </syntaxhighlight> | ||
{{Works in|[[Dyalog APL]]}} | {{Works in|[[Dyalog APL]]}} | ||
'''[[Simple examples#Split text by delimiter|Full explanation…]]''' | '''[[Simple examples#Split text by delimiter|Full explanation…]]''' | ||
Line 69: | Line 69: | ||
0 1 0 1 1 0 | 0 1 0 1 1 0 | ||
0 0 1 0 0 0 | 0 0 1 0 0 0 | ||
</ | </syntaxhighlight> | ||
{{Works in|[[Dyalog APL]], [[ngn/apl]]}} | {{Works in|[[Dyalog APL]], [[ngn/apl]]}} | ||
'''[[John Scholes' Conway's Game of Life|Full article…]]''' | '''[[John Scholes' Conway's Game of Life|Full article…]]''' |
Revision as of 22:15, 10 September 2022
| ||||
Running APLTraditionally a commercial language, quite a few implementations are now free without feature limitations, several can be tried online, and many are open source. |
Hello worldTaking up a new programming language can be a daunting task. While it can appear cryptic at first, you can learn to read, write and remember APL with little effort. There is plenty of material to help you in the process. | |||
Who uses it?APL is used by both hobbyists and application developers. There are active user groups all around the globe, many of these hold regular in-person meet-ups. There are also multiple online chat rooms and forums. |
ContributingAPL Wiki is an online open-content wiki; that is, a voluntary association of individuals and groups working to develop a common knowledge resource. The structure of the project allows anyone with an Internet connection to alter its content. | |||
ExamplesAPL's terseness means that substantial programs are expressible in a small space, relative to many other programming languages. Below are just a taste. Many more, and fully explained, examples are in the simple examples article. Split text by delimiterWith the introduction of tacit programming, many functions can be expressed in fewer characters than even the shortest fitting name. For example ','(≠⊆⊢)'comma,delimited,text' ┌─────┬─────────┬────┐ │comma│delimited│text│ └─────┴─────────┴────┘ Works in: Dyalog APL
Conway's "Game of Life"John Scholes is famous for the following implementation of Conway's Game of Life: ⎕←world←2 2 2 2⊤0 12 5 2 4 1 0 1 0 0 0 0 0 1 1 0 1 0 0 0 0 1 0 0 0 0 1 0 0 1 {↑1 ⍵∨.∧3 4=+/,¯1 0 1∘.⊖¯1 0 1∘.⌽⊂⍵} world 1 1 0 1 0 0 0 1 1 1 0 0 0 1 0 1 1 0 0 0 1 0 0 0 Works in: Dyalog APL, ngn/apl
|