GNU APL: Difference between revisions
m (9 revisions imported: Migrate from miraheze) |
No edit summary |
||
Line 19: | Line 19: | ||
| run online = [http://juergen-sauermann.de/try-GNU-APL try-GNU-APL] | | run online = [http://juergen-sauermann.de/try-GNU-APL try-GNU-APL] | ||
}} | }} | ||
'''GNU APL''' is a free and (almost) complete implementation of Extended APL as specified in [[ISO/IEC 13751:2001]] and is thus similar to [[APL2]]. It runs on GNU/Linux and on Windows using Cygwin, and uses Unicode internally. GNU APL was written and is being maintained by [[Jürgen Sauermann|GNU APL community]] | '''GNU APL''' is a free and (almost) complete implementation of Extended APL as specified in [[ISO/IEC 13751:2001]] and is thus similar to [[APL2]]. It runs on GNU/Linux and on Windows using Cygwin, and uses Unicode internally. GNU APL was written and is being maintained by [[Jürgen Sauermann|GNU APL community]], implementing: | ||
* nested arrays and related functions | * nested arrays and related functions | ||
Line 27: | Line 25: | ||
* a shared variable interface | * a shared variable interface | ||
In addition, GNU APL can be scripted. | Besides for running in the classic interactive mode locally, there is an (experimental) online version of GNU APL. In addition, GNU APL can be scripted. | ||
== Richard Stallman == | |||
[[wikipedia:Richard Stallman|Richard Stallman]], founder of the GNU Project, was an early adopter of APL, using it to write a text editor as a high school student in the summer of 1969. The same year, he also wrote a now famous rhyme: | |||
<blockquote>Rho, rho, rho of X<br>Always equals 1<br>Rho is dimension, rho rho rank.<br>APL is fun!</blockquote> | |||
This plays on the fact that <source lang=apl inline>⍴X</source> gives the [[shape]] (length of each [[axis]]; "dimension") of <source lang=apl inline>X</source> while <source lang=apl inline>⍴⍴X</source> gives the [[rank]] (number of axes/dimensions) and since the number of axes is always a count, it is a single number, which has the shape <source lang=apl inline>1</source> if a [[vector]], and <source lang=apl inline>⍴</source> always returns a vector: | |||
<source lang=apl> | |||
⎕←X←3 1 4∘.+2 7 1 8 | |||
5 10 4 11 | |||
3 8 2 9 | |||
6 11 5 12 | |||
⍴X | |||
3 4 | |||
⍴⍴X | |||
2 | |||
⍴⍴⍴X | |||
1 | |||
</source> | |||
== Encoding == | |||
It should be noted that GNU APL tends to prefer the [[Unicode]] ''Lozenge'' (U+25CA; <source lang=apl inline>◊</source>) and ''Element of'' (U+2208; <source lang=apl inline>∈</source>) over ''Diamond operator'' (U+22C4; <source lang=apl inline>⋄</source>) and ''Small Element of'' (U+220A; <source lang=apl inline>∊</source>) which are more commonly used by dialects. This can lead to [[SYNTAX ERROR]]s if attempting to use code written for GNU APL in other implementations. However, GNU APL also accepts the more common code points. | |||
== External links == | == External links == |
Revision as of 12:45, 26 December 2019
GNU APL is a free and (almost) complete implementation of Extended APL as specified in ISO/IEC 13751:2001 and is thus similar to APL2. It runs on GNU/Linux and on Windows using Cygwin, and uses Unicode internally. GNU APL was written and is being maintained by GNU APL community, implementing:
- nested arrays and related functions
- complex numbers, and
- a shared variable interface
Besides for running in the classic interactive mode locally, there is an (experimental) online version of GNU APL. In addition, GNU APL can be scripted.
Richard Stallman
Richard Stallman, founder of the GNU Project, was an early adopter of APL, using it to write a text editor as a high school student in the summer of 1969. The same year, he also wrote a now famous rhyme:
Rho, rho, rho of X
Always equals 1
Rho is dimension, rho rho rank.
APL is fun!
This plays on the fact that ⍴X
gives the shape (length of each axis; "dimension") of X
while ⍴⍴X
gives the rank (number of axes/dimensions) and since the number of axes is always a count, it is a single number, which has the shape 1
if a vector, and ⍴
always returns a vector:
⎕←X←3 1 4∘.+2 7 1 8 5 10 4 11 3 8 2 9 6 11 5 12 ⍴X 3 4 ⍴⍴X 2 ⍴⍴⍴X 1
Encoding
It should be noted that GNU APL tends to prefer the Unicode Lozenge (U+25CA; ◊
) and Element of (U+2208; ∈
) over Diamond operator (U+22C4; ⋄
) and Small Element of (U+220A; ∊
) which are more commonly used by dialects. This can lead to SYNTAX ERRORs if attempting to use code written for GNU APL in other implementations. However, GNU APL also accepts the more common code points.
External links
APL dialects [edit] | |
---|---|
Maintained | APL+Win ∙ APL2 ∙ APL64 ∙ APL\iv ∙ Aplette ∙ April ∙ Co-dfns ∙ Dyalog APL ∙ Dyalog APL Vision ∙ dzaima/APL ∙ GNU APL ∙ Kap ∙ NARS2000 ∙ Pometo ∙ TinyAPL |
Historical | A Programming Language ∙ A+ (A) ∙ APL# ∙ APL2C ∙ APL\360 ∙ APL/700 ∙ APL\1130 ∙ APL\3000 ∙ APL.68000 ∙ APL*PLUS ∙ APL.jl ∙ APL.SV ∙ APLX ∙ Extended Dyalog APL ∙ Iverson notation ∙ IVSYS/7090 ∙ NARS ∙ ngn/apl ∙ openAPL ∙ Operators and Functions ∙ PAT ∙ Rowan ∙ SAX ∙ SHARP APL ∙ Rationalized APL ∙ VisualAPL (APLNext) ∙ VS APL ∙ York APL |
Derivatives | AHPL ∙ BQN ∙ CoSy ∙ ELI ∙ Glee ∙ I ∙ Ivy ∙ J ∙ Jelly ∙ K (Goal, Klong, Q) ∙ KamilaLisp ∙ Lang5 ∙ Lil ∙ Nial ∙ RAD ∙ Uiua |
Overviews | Comparison of APL dialects ∙ Timeline of array languages ∙ Timeline of influential array languages ∙ Family tree of array languages |