GNU APL: Difference between revisions

From APL Wiki
Jump to navigation Jump to search
No edit summary
(Numeric types)
 
(4 intermediate revisions by 2 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]] float, 64-bit integer
| unicode support          = full
| unicode support          = full
| released                = 2013
| released                = 2013
Line 18: Line 18:
| documentation            = [https://www.gnu.org/software/apl/apl.html info manual]
| documentation            = [https://www.gnu.org/software/apl/apl.html info manual]
| influenced by            = [[APL2]], [[Dyalog APL]]
| influenced by            = [[APL2]], [[Dyalog APL]]
| run online              = [http://juergen-sauermann.de/try-GNU-APL try-GNU-APL]
}}
}}
{| class=wikitable style="float:right;max-width:33%"
{| 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#page=9 ''Creativity in Computer Science – Horst Feistel''].}}
|{{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.}}
|}
|}
'''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.
'''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.


[[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. It can also be compiled into a shared loadable library for embedding the interpreter into other projects.
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.


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.
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 ==


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 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.
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.
 
== Numeric types ==
 
GNU APL supports both 64-bit floats and 64-bit integers, as well as complex numbers whose components are floating-point. The integer type is used when a value can be conveniently determined to have an integer value, in particular when a primitive that is "integer by nature" is called on integer arguments and the result is not too large (GNU reserves a region at the boundary of the 64-bit range where results may be either integer or float).<ref>GNU APL documentation §3.1, [https://www.gnu.org/software/apl/apl.html#System-Limits System Limits]. Accessed 2024-02-22.</ref> Monadic function <syntaxhighlight lang=apl inline>⊤∨</syntaxhighlight> converts near-integer floating-point values to the integer type. Experimental support for rationals, which are ratios of 64-bit integers, can be enabled at compile time.
 
== External links ==
== External links ==
* [http://www.gnu.org/software/apl The GNU APL Homepage]
* [http://www.gnu.org/software/apl The GNU APL Homepage]
* [http://lists.gnu.org/archive/html/bug-apl/ The GNU APL Mailing List]
* [http://lists.gnu.org/archive/html/bug-apl/ The GNU APL Mailing List]
Line 40: Line 44:
* [https://savannah.gnu.org/svn/?group=apl Help for GNU APL 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]
* [http://www.gnu.org/software/apl/Community.html The GNU APL Community]
== References ==
<references/>
{{APL dialects}}[[Category:APL dialects]][[Category:Nested array languages]]
{{APL dialects}}[[Category:APL dialects]][[Category:Nested array languages]]

Latest revision as of 12:28, 22 February 2024

"Both 32-and 64-bit GNU APL are available for Windows, truly proving G_d is great! الله أكبر"

Alan G. Konheim. Creativity in Computer Science – Horst Feistel. Footnote 14. Page F-9.

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 numbers and a shared variable interface.

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. It can also be compiled into a shared loadable library for embedding the interpreter into other projects.

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

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 other 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.

Numeric types

GNU APL supports both 64-bit floats and 64-bit integers, as well as complex numbers whose components are floating-point. The integer type is used when a value can be conveniently determined to have an integer value, in particular when a primitive that is "integer by nature" is called on integer arguments and the result is not too large (GNU reserves a region at the boundary of the 64-bit range where results may be either integer or float).[1] Monadic function ⊤∨ converts near-integer floating-point values to the integer type. Experimental support for rationals, which are ratios of 64-bit integers, can be enabled at compile time.

External links

References

  1. GNU APL documentation §3.1, System Limits. Accessed 2024-02-22.
APL dialects [edit]
Maintained APL+WinAPL2APL64APL\ivApletteAprilCo-dfnsDyalog APLDyalog APL Visiondzaima/APLGNU APLKapNARS2000PometoTinyAPL
Historical A Programming LanguageA+ (A) ∙ APL#APL2CAPL\360APL/700APL\1130APL\3000APL.68000APL*PLUSAPL.jlAPL.SVAPLXExtended Dyalog APLIverson notationIVSYS/7090NARSngn/aplopenAPLOperators and FunctionsPATRowanSAXSHARP APLRationalized APLVisualAPL (APLNext) ∙ VS APLYork APL
Derivatives AHPLBQNCoSyELIGleeIIvyJJellyK (Goal, Klong, Q) ∙ KamilaLispLang5LilNialRADUiua
Overviews Comparison of APL dialectsTimeline of array languagesTimeline of influential array languagesFamily tree of array languages