GNU APL: Difference between revisions

Jump to navigation Jump to search
211 bytes added ,  22:30, 10 September 2022
m
Text replacement - "<source" to "<syntaxhighlight"
No edit summary
m (Text replacement - "<source" to "<syntaxhighlight")
(13 intermediate revisions by 3 users not shown)
Line 3: Line 3:
| index origin            = 0 or 1
| index origin            = 0 or 1
| function styles          = [[tradfn]], [[dfn]] (limited)
| function styles          = [[tradfn]], [[dfn]] (limited)
| numeric types            = complex floats, rational
| numeric types            = [[complex]] floats, rational
| unicode support          = full
| unicode support          = full
| released                = 2013
| released                = 2013
| developer                = [[GNU APL community]]
| developer                = Jürgen Sauermann, [[GNU APL community]]
| latest release version  = 1.8 / 2019
| latest release version  = 1.8 / 2019
| implementation language  = [[wikipedia:C++|C++]]
| implementation language  = [[wikipedia:C++|C++]]
| source                  = [http://svn.savannah.gnu.org/viewvc/apl/trunk/ GNU Savannah]
| platforms                = x86, x86_64
| platforms                = x86, x86_64
| operating systems        = Linux, Windows (via Cygwin)
| operating systems        = Linux, Windows (via Cygwin)
Line 19: Line 20:
| 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]], implementing:
{| class=wikitable style="float:right;max-width:33%"
|{{quote | "Both 32-and 64-bit GNU APL are available for Windows, truly proving G_d is great! الله أكبر"|Alan G. Konheim. [https://sites.cs.ucsb.edu/~konheim/Feistel%20Talk%20-2Final.pdf ''Creativity in Computer Science – Horst Feistel'']. Footnote 14. Page F-9.}}
|}


* nested arrays and related functions
'''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 was initially written and is being maintained by Jürgen Sauermann. It includes extensions such as [[complex number]]s and a shared variable interface.
* 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.
[[File:GNU APL.png|thumb|left|GNU APL's online demo, [http://juergen-sauermann.de/try-GNU-APL try-GNU-APL]]]
 
In addition to a normal local APL [[session]], GNU APL can used in a "scripting" language fashion by processing linear scripts passed to the interpreter at startup. There is an experimental online version as well as the ability to be compiled into a shared loadable library for embedding the interpreter into other projects.
== 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>


Documents on GNU APL sometimes quote [[Richard Stallman]], who both founded GNU and programmed in APL. However, Stallman is not directly associated with the project.
== Encoding ==
== 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.
GNU APL tends to prefer the [[Unicode]] ''Lozenge'' (U+25CA; <syntaxhighlight lang=apl inline>◊</syntaxhighlight>) and ''Element of'' (U+2208; <syntaxhighlight lang=apl inline>∈</syntaxhighlight>) over ''Diamond operator'' (U+22C4; <syntaxhighlight lang=apl inline>⋄</syntaxhighlight>) and ''Small Element of'' (U+220A; <syntaxhighlight lang=apl inline>∊</syntaxhighlight>) which are more commonly used by other 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 ==


* [http://juergen-sauermann.de/try-GNU-APL Try GNU APL online]
* [http://www.gnu.org/software/apl The GNU APL Homepage]
* [https://www.gnu.org/software/apl/ Website]
* [http://lists.gnu.org/archive/html/bug-apl/ The GNU APL Mailing List]
 
* [http://www.gnu.org/software/apl/apl.html The GNU APL Info Manual]
{{APL dialects}}
* [http://svn.savannah.gnu.org/viewvc/apl/ GNU APL Sources (Subversion)]
* [https://savannah.gnu.org/svn/?group=apl Help for GNU APL Subversion]
* [http://www.gnu.org/software/apl/Community.html The GNU APL Community]
{{APL dialects}}[[Category:APL dialects]][[Category:Nested array languages]]

Navigation menu