4,501
edits
(logo vote ad) |
m (Text replacement - "</source>" to "</syntaxhighlight>") |
||
(6 intermediate revisions by the same user not shown) | |||
Line 4: | Line 4: | ||
| style="background:#f9f9f9;border:1px solid #ddd;" colspan="2" | | | style="background:#f9f9f9;border:1px solid #ddd;" colspan="2" | | ||
{| style="border-spacing: 1em;" | {| style="border-spacing: 1em;" | ||
|- | |- | ||
| style="width:50%;text-align:center;" | <span style="font-size:xx-large">Welcome to [[APL Wiki]],</span>< | | style="width:50%;text-align:center;" | <span style="font-size:xx-large">Welcome to [[APL Wiki]],</span><br> | ||
[[Special:Statistics|{{NUMBEROFARTICLES}}]] articles about APL that anyone can edit | [[Special:Statistics|{{NUMBEROFARTICLES}}]] articles about APL that anyone can edit.<br> | ||
See the [[overview|navigational overview]] of content. | |||
APL is an [[wikipedia:Array_programming|array-oriented programming language]]. Its natural, concise [[APL syntax|syntax]] lets you develop shorter programs while thinking more about the problem you're trying to solve than how to express it to a computer. | | [[File:APL logo.png|48px|link=APL logo]] | ||
| [[The name APL|'''APL''']] is an [[wikipedia:Array_programming|array-oriented programming language]]. Its natural, concise [[APL syntax|syntax]] lets you develop shorter programs while thinking more about the problem you're trying to solve than how to express it to a computer. | |||
|} | |} | ||
Line 24: | Line 24: | ||
Taking up a new programming language can be a daunting task. While it can appear cryptic at first, you can learn to [[semantic density|read]], write and [[mnemonics|remember]] APL with little effort. There is plenty of material to help you in the process. | Taking up a new programming language can be a daunting task. While it can appear cryptic at first, you can learn to [[semantic density|read]], write and [[mnemonics|remember]] APL with little effort. There is plenty of material to help you in the process. | ||
<p style="text-align:center">'''[[Introductions]] ∙ [[Learning resources | <p style="text-align:center">'''[[Introductions]] ∙ [[Learning resources]]'''</p> | ||
|- style="vertical-align:top" | |- style="vertical-align:top" | ||
| style="background:#faf5ff;border:1px solid #e0cef2;padding:0 1em" | | | style="background:#faf5ff;border:1px solid #e0cef2;padding:0 1em" | | ||
Line 30: | Line 30: | ||
APL is used by both hobbyists and application developers. There are active [[:Category:user groups|user groups]] all around the globe, many of these hold regular in-person meet-ups. There are also multiple online [[chat rooms and forums]]. | APL is used by both hobbyists and application developers. There are active [[:Category:user groups|user groups]] all around the globe, many of these hold regular in-person meet-ups. There are also multiple online [[chat rooms and forums]]. | ||
<p style="text-align:center">'''[[Case studies]] ∙ [[Job listings]] ∙ [[ | <p style="text-align:center">'''[[Case studies]] ∙ [[Job listings]] ∙ [[Conferences and activities]]'''</p> | ||
| style="background:#fff5fa;border:1px solid #f2cee0;padding:0 1em" | | | style="background:#fff5fa;border:1px solid #f2cee0;padding:0 1em" | | ||
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 < | 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!] | ||
< | <syntaxhighlight lang=apl> | ||
','(≠⊆⊢)'comma,delimited,text' | ','(≠⊆⊢)'comma,delimited,text' | ||
┌─────┬─────────┬────┐ | ┌─────┬─────────┬────┐ | ||
│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 58: | Line 58: | ||
[https://tryapl.org/?a=%u22A2world%u21902%202%202%202%u22A40%2012%205%202%204%201&run&a=%7B%u21911%20%u2375%u2228.%u22273%204%3D+/%2C%AF1%200%201%u2218.%u2296%AF1%200%201%u2218.%u233D%u2282%u2375%7D%20world&run Try it now!] | [https://tryapl.org/?a=%u22A2world%u21902%202%202%202%u22A40%2012%205%202%204%201&run&a=%7B%u21911%20%u2375%u2228.%u22273%204%3D+/%2C%AF1%200%201%u2218.%u2296%AF1%200%201%u2218.%u233D%u2282%u2375%7D%20world&run Try it now!] | ||
< | <syntaxhighlight lang=apl> | ||
⎕←world←2 2 2 2⊤0 12 5 2 4 1 | ⎕←world←2 2 2 2⊤0 12 5 2 4 1 | ||
0 1 0 0 0 0 | 0 1 0 0 0 0 | ||
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…]]''' |