A+: Difference between revisions

Jump to navigation Jump to search
1,463 bytes added ,  22:16, 10 September 2022
m
Text replacement - "</source>" to "</syntaxhighlight>"
No edit summary
m (Text replacement - "</source>" to "</syntaxhighlight>")
(17 intermediate revisions by 3 users not shown)
Line 2: Line 2:
| array model              = [[flat array model|flat]] with [[box]]es
| array model              = [[flat array model|flat]] with [[box]]es
| index origin            = 0
| index origin            = 0
| function styles          = [[tradfn]], [[tacit]]
| function styles          = [[Defined function|defined]], [[tacit]]
| numeric types            = ints, floats
| numeric types            = ints, floats
| unicode support          = no
| unicode support          = no
Line 9: Line 9:
| latest release version  = 4.22 (unversioned) / 2014
| latest release version  = 4.22 (unversioned) / 2014
| implementation language  = [[wikipedia:C++|C++]]
| implementation language  = [[wikipedia:C++|C++]]
| source                  = [https://github.com/PlanetAPL/a-plus GitHub]
| platforms                = x86, x86_64, IBM POWER, IA64, z/Architecture,  
| platforms                = x86, x86_64, IBM POWER, IA64, z/Architecture,  
| operating systems        = Windows, Linux, macOS, AIX, IRIX, BSD, Solaris, Tru64
| operating systems        = Windows, Linux, macOS, AIX, IRIX, BSD, Solaris, Tru64
Line 17: Line 18:
| documentation            = [https://github.com/PlanetAPL/a-plus/tree/master/docs GitHub]
| documentation            = [https://github.com/PlanetAPL/a-plus/tree/master/docs GitHub]
| influenced by            = [[A]]
| influenced by            = [[A]]
| influenced              = [[K]], [[J]]
| influenced              = [[K]], [[J]], [[BQN]]
}}
}}
'''A+''' is an extension of the A language. A was created in 1985 by [[Arthur Whitney]], then of [[Morgan Stanley]]. At the time, various departments had a significant investment in APL applications and talent, APL being a language well-suited to the manipulation of large arrays of numbers. As technology was moving from the mainframe to distributed systems, there was a search for a suitable APL implementation to run on SunOS, the distributed platform of the period, and this prompted Whitney to create A as a statically typed dialect of APL with various novelties like symbols as a [[simple scalar]] type and the [[Rank operator]].
:''This page is about the Morgan Stanley dialect. For the project based on [[APL 90 (dialect)]] and presented at [[APL90]], which replaced functions with first-class blocks, see [[A+ (Girardot)]].''
 
'''A+''' is an extension of the [[A]] language. A was created in 1985 by [[Arthur Whitney]], then of [[wikipedia:Morgan Stanley|Morgan Stanley]]. At the time, various departments had a significant investment in APL applications and talent, APL being a language well-suited to the manipulation of large arrays of numbers. As technology was moving from the mainframe to distributed systems, there was a search for a suitable APL implementation to run on SunOS, the distributed platform of the period, and this prompted Whitney to create A as a statically typed dialect of APL with various novelties like symbols as a [[simple scalar]] type and the [[Rank operator]].


Over the course of the next few years, various extensions were made to the language, culminating in A+ in 1988, with "+" referring to the graphical user interface. While an A+ development group was formally in 1992, presented the very first version of [[K]] that very same year, and by 1994, K became the official successor of A+. In 2001, the source code was made public, and various volunteers took over development until 2008.  From then until 2014 it was maintained by Robert Lefkowitz.
Over the course of the next few years, various extensions were made to the language, culminating in A+ in 1988, with "+" referring to the graphical user interface. While an A+ development group was formally in 1992, presented the very first version of [[K]] that very same year, and by 1994, K became the official successor of A+. In 2001, the source code was made public, and various volunteers took over development until 2008.  From then until 2014 it was maintained by Robert Lefkowitz.
Line 28: Line 31:
! Glyph                                !! Dyadic                                        !! Monadic
! Glyph                                !! Dyadic                                        !! Monadic
|-
|-
| <source lang=apl inline>+</source>  || [[Add]]                                      || [[Conjugate|Identity]]
| <syntaxhighlight lang=apl inline>+</syntaxhighlight>  || [[Add]]                                      || [[Conjugate|Identity]]
|-
|-
| <source lang=apl inline>-</source>  || [[Subtract]]                                  || [[Negate]]
| <syntaxhighlight lang=apl inline>-</syntaxhighlight>  || [[Subtract]]                                  || [[Negate]]
|-
|-
| <source lang=apl inline>×</source>  || [[Multiply]]                                  || [[Sign]]
| <syntaxhighlight lang=apl inline>×</syntaxhighlight>  || [[Multiply]]                                  || [[Sign]]
|-
|-
| <source lang=apl inline>÷</source>  || [[Divide]]                                    || [[Reciprocal]]
| <syntaxhighlight lang=apl inline>÷</syntaxhighlight>  || [[Divide]]                                    || [[Reciprocal]]
|-
|-
| <source lang=apl inline>*</source>  || [[Power]]                                    || [[Exponential]]
| <syntaxhighlight lang=apl inline>*</syntaxhighlight>  || [[Power]]                                    || [[Exponential]]
|-
|-
| <source lang=apl inline>⍟</source>  || [[Log]]                                      || [[Natural log]]
| <syntaxhighlight lang=apl inline>⍟</syntaxhighlight>  || [[Log]]                                      || [[Natural log]]
|-
|-
| <source lang=apl inline>|</source>  || [[Residue]]                                  || [[Absolute value]]
| <syntaxhighlight lang=apl inline>|</syntaxhighlight>  || [[Residue]]                                  || [[Absolute value]]
|-
|-
| <source lang=apl inline>⊥</source>  || [[Decode]]                                    || Pack
| <syntaxhighlight lang=apl inline>⊥</syntaxhighlight>  || [[Decode]]                                    || Pack
|-
|-
| <source lang=apl inline>⊤</source>  || [[Encode]]                                    || Unpack
| <syntaxhighlight lang=apl inline>⊤</syntaxhighlight>  || [[Encode]]                                    || Unpack
|-
|-
| <source lang=apl inline>?</source>  || [[Deal]]                                      || [[Roll]]
| <syntaxhighlight lang=apl inline>?</syntaxhighlight>  || [[Deal]]                                      || [[Roll]]
|-
|-
| <source lang=apl inline>○</source>  || [[Circle function|Circle]] (sin, cos, ...)    || [[Pi times]]
| <syntaxhighlight lang=apl inline>○</syntaxhighlight>  || [[Circle function|Circle]] (sin, cos, ...)    || [[Pi times]]
|-
|-
| <source lang=apl inline>⌹</source>  || [[Solve]]                                    || [[Matrix Inverse]]
| <syntaxhighlight lang=apl inline>⌹</syntaxhighlight>  || [[Solve]]                                    || [[Matrix Inverse]]
|-
|-
| <source lang=apl inline>⌈</source>  || [[Max]]                                      || [[Ceiling]]
| <syntaxhighlight lang=apl inline>⌈</syntaxhighlight>  || [[Max]]                                      || [[Ceiling]]
|-
|-
| <source lang=apl inline>⌊</source>  || [[Min]]                                      || [[Floor]]
| <syntaxhighlight lang=apl inline>⌊</syntaxhighlight>  || [[Min]]                                      || [[Floor]]
|-
|-
| <source lang=apl inline><</source>  || [[Less than]]                                || [[Enclose]]
| <syntaxhighlight lang=apl inline><</syntaxhighlight>  || [[Less than]]                                || [[Enclose]]
|-
|-
| <source lang=apl inline>≤</source>  || [[Less than or Equal to]]                    ||
| <syntaxhighlight lang=apl inline>≤</syntaxhighlight>  || [[Less than or Equal to]]                    ||
|-
|-
| <source lang=apl inline>=</source>  || [[Equal to]]                                  ||
| <syntaxhighlight lang=apl inline>=</syntaxhighlight>  || [[Equal to]]                                  ||
|-
|-
| <source lang=apl inline>></source>  || [[Greater than]]                              || [[Disclose]]
| <syntaxhighlight lang=apl inline>></syntaxhighlight>  || [[Greater than]]                              || [[Disclose]]
|-
|-
| <source lang=apl inline>≥</source>  || [[Greater than or Equal to]]                  ||
| <syntaxhighlight lang=apl inline>≥</syntaxhighlight>  || [[Greater than or Equal to]]                  ||
|-
|-
| <source lang=apl inline>≠</source>  || [[Not equal to]]                              ||
| <syntaxhighlight lang=apl inline>≠</syntaxhighlight>  || [[Not equal to]]                              ||
|-
|-
| <source lang=apl inline>⍋</source>  || [[Bins]]                                      || [[Grade up]]
| <syntaxhighlight lang=apl inline>⍋</syntaxhighlight>  || [[Bins]]                                      || [[Grade up]]
|-
|-
| <source lang=apl inline>⍒</source>  ||                                              || [[Grade down]]
| <syntaxhighlight lang=apl inline>⍒</syntaxhighlight>  ||                                              || [[Grade down]]
|-
|-
| <source lang=apl inline>≡</source>  || [[Match]]                                    || [[Depth]]
| <syntaxhighlight lang=apl inline>≡</syntaxhighlight>  || [[Match]]                                    || [[Depth]]
|-
|-
| <source lang=apl inline>⍳</source>  || [[Find]]                                      || Interval ([[Iota]])
| <syntaxhighlight lang=apl inline>⍳</syntaxhighlight>  || [[Index Of|Find]]                                      || [[Interval]]
|-
|-
| <source lang=apl inline>∊</source>  || [[Member]]                                    || [[Rake]] (like [[Enlist]])
| <syntaxhighlight lang=apl inline>∊</syntaxhighlight>  || [[Member]]                                    || [[Rake]] (like [[Enlist]])
|-
|-
| <source lang=apl inline>^</source>  || [[And]]                                      || Stop
| <syntaxhighlight lang=apl inline>^</syntaxhighlight>  || [[And]]                                      || Stop
|-
|-
| <source lang=apl inline>∨</source>  || [[Or]] or Cast                                || [[Type]]
| <syntaxhighlight lang=apl inline>∨</syntaxhighlight>  || [[Or]] or Cast                                || [[Type]]
|-
|-
| <source lang=apl inline>⍕</source>  || [[Format]]                                    || [[Default Format]]
| <syntaxhighlight lang=apl inline>⍕</syntaxhighlight>  || [[Format]]                                    || [[Default Format]]
|-
|-
| <source lang=apl inline>⍎</source>  || Execute in Context or Protected Execute      || [[Execute]]
| <syntaxhighlight lang=apl inline>⍎</syntaxhighlight>  || Execute in Context or Protected Execute      || [[Execute]]
|-
|-
| <source lang=apl inline>%</source>  || Value in Context                              || Value (of a symbol)
| <syntaxhighlight lang=apl inline>%</syntaxhighlight>  || Value in Context                              || Value (of a symbol)
|-
|-
| <source lang=apl inline>←</source>  || [[Assignment]] or [[Selective Assignment]]    || Result (returns from functions)
| <syntaxhighlight lang=apl inline>←</syntaxhighlight>  || [[Assignment]] or [[Selective Assignment]]    || Result (returns from functions)
|-
|-
| <source lang=apl inline>⊃</source>  || [[Pick]]                                      || [[Raze]]
| <syntaxhighlight lang=apl inline>⊃</syntaxhighlight>  || [[Pick]]                                      || [[Raze]]
|-
|-
| <source lang=apl inline>#</source>  || [[Choose]]                                    || [[Count]]
| <syntaxhighlight lang=apl inline>#</syntaxhighlight>  || [[Choose]]                                    || [[Count]]
|-
|-
| <source lang=apl inline>[;]</source> ||colspan=2| [[Bracket Indexing]] (varying number of arguments)
| <syntaxhighlight lang=apl inline>[;]</syntaxhighlight> ||colspan=2| [[Bracket Indexing]] (varying number of arguments)
|-
|-
| <source lang=apl inline>↑</source>  || [[Take]]                                      || [[Signal]]
| <syntaxhighlight lang=apl inline>↑</syntaxhighlight>  || [[Take]]                                      || [[Signal]]
|-
|-
| <source lang=apl inline>↓</source>  || [[Drop]]                                      || Print
| <syntaxhighlight lang=apl inline>↓</syntaxhighlight>  || [[Drop]]                                      || Print
|-
|-
| <source lang=apl inline>⌽</source>  || [[Rotate]]                                    || [[Reverse]]
| <syntaxhighlight lang=apl inline>⌽</syntaxhighlight>  || [[Rotate]]                                    || [[Reverse]]
|-
|-
| <source lang=apl inline>⍉</source>  || [[Dyadic transpose|Transpose Axes]]          || [[Transpose]]
| <syntaxhighlight lang=apl inline>⍉</syntaxhighlight>  || [[Dyadic transpose|Transpose Axes]]          || [[Transpose]]
|-
|-
| <source lang=apl inline>!</source>  || [[Restructure]]                              || [[Item Ravel]]
| <syntaxhighlight lang=apl inline>!</syntaxhighlight>  || [[Restructure]]                              || [[Item Ravel]]
|-
|-
| <source lang=apl inline>⊂</source>  || Partition (a little like [[Split]])          || Partition Count
| <syntaxhighlight lang=apl inline>⊂</syntaxhighlight>  || Partition (a little like [[Split]])          || Partition Count
|-
|-
| <source lang=apl inline>⍴</source>  || [[Reshape]]                                  || [[Shape]]
| <syntaxhighlight lang=apl inline>⍴</syntaxhighlight>  || [[Reshape]]                                  || [[Shape]]
|-
|-
| <source lang=apl inline>⊣</source>  || [[Left]]                                      || Null (returns <source lang=apl inline>()</source>)
| <syntaxhighlight lang=apl inline>⊣</syntaxhighlight>  || [[Left]]                                      || Null (returns <syntaxhighlight lang=apl inline>()</syntaxhighlight>)
|-
|-
| <source lang=apl inline>⊢</source>  ||                                              || [[Right]]
| <syntaxhighlight lang=apl inline>⊢</syntaxhighlight>  ||                                              || [[Right]]
|-
|-
| <source lang=apl inline>∪</source>  || Combine Symbols                              || Separate Symbols
| <syntaxhighlight lang=apl inline>∪</syntaxhighlight>  || Combine Symbols                              || Separate Symbols
|-
|-
| <source lang=apl inline>,</source>  || [[Catenate]]                                  || [[Ravel]]
| <syntaxhighlight lang=apl inline>,</syntaxhighlight>  || [[Catenate]]                                  || [[Ravel]]
|-
|-
| <source lang=apl inline>~</source>  || [[Laminate]]                                  || [[Not]]
| <syntaxhighlight lang=apl inline>~</syntaxhighlight>  || [[Laminate]]                                  || [[Not]]
|-
|-
| <source lang=apl inline>/</source>  || [[Replicate]]                                || [[Reduce]] (+ × ⌈ ⌊ ∧ ∨)
| <syntaxhighlight lang=apl inline>/</syntaxhighlight>  || [[Replicate]]                                || [[Reduce]] (+ × ⌈ ⌊ ∧ ∨)
|-
|-
| <source lang=apl inline>\</source>  || [[Expand]]                                    || [[Scan]] (+ × ⌈ ⌊ ∧ ∨)
| <syntaxhighlight lang=apl inline>\</syntaxhighlight>  || [[Expand]]                                    || [[Scan]] (+ × ⌈ ⌊ ∧ ∨)
|-
|-
| <source lang=apl inline>.</source>  || [[Inner Product]] (+.×  ⌈.+  ⌊.+)          ||
| <syntaxhighlight lang=apl inline>.</syntaxhighlight>  || [[Inner Product]] (+.×  ⌈.+  ⌊.+)          ||
|-
|-
| <source lang=apl inline>∘.</source>  || [[Outer Product]] (+ - × ÷ | ⌈ ⌊ < ≤ = ≥ > ≠) ||
| <syntaxhighlight lang=apl inline>∘.</syntaxhighlight>  || [[Outer Product]] (+ - × ÷ | ⌈ ⌊ < ≤ = ≥ > ≠) ||
|-
|-
| <source lang=apl inline>@</source>  || [[Rank operator|Rank]]                        ||
| <syntaxhighlight lang=apl inline>@</syntaxhighlight>  || [[Rank operator|Rank]]                        ||
|-
|-
| <source lang=apl inline>¨</source>  ||                                              || [[Each]] or Apply
| <syntaxhighlight lang=apl inline>¨</syntaxhighlight>  ||                                              || [[Each]] or Apply
|-
|-
| <source lang=apl inline>⍨</source>  ||                                              || Bitwise
| <syntaxhighlight lang=apl inline>⍨</syntaxhighlight>  ||                                              || Bitwise
|}
|}


{{APL dialects}}
== External links ==
* [[wikipedia:A+ (programming language)|A+]]
{{APL dialects}}[[Category:APL dialects]][[Category:Flat array languages]][[Category:Leading axis languages]]

Navigation menu