APLX: Difference between revisions

From APL Wiki
Jump to navigation Jump to search
(→‎Functions: Put component file operations in the primitives table)
 
(10 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Infobox array language
{{Infobox array language
| logo                    = [[File:APLX logo.png]]
| array model              = [[nested array model|nested]]
| array model              = [[nested array model|nested]]
| index origin            = 0 or 1
| index origin            = 0 or 1
| function styles          = [[tradfn]]
| function styles          = [[Defined function|defined]]
| numeric types            = floats
| numeric types            = floats
| unicode support          = no
| unicode support          = no
Line 18: Line 19:
| file ext                = .aws
| file ext                = .aws
| documentation            = [http://www.dyalog.com/aplx.htm#APLXDocs APLX Documentation]
| documentation            = [http://www.dyalog.com/aplx.htm#APLXDocs APLX Documentation]
| influenced by            = [[APL.68000]], [[APL2]]
| influenced by            = [[APL/700]], [[APL.68000]], [[APL2]]
}}
}}
'''APLX''' was a cross-platform dialect of the programming language APL, created by British company [[MicroAPL Ltd.]], as a successor to their [[APL.68000]] product.
'''APLX''' was a cross-platform dialect of the programming language APL, created by British company [[MicroAPL Ltd.]], as a successor to their [[APL.68000]] product.
Line 33: Line 34:
! Glyph                              !! Monadic              !! Axis !! Dyadic                                !! Axis
! Glyph                              !! Monadic              !! Axis !! Dyadic                                !! Axis
|-
|-
| <source lang=apl inline>+</source> || [[Conjugate]]        ||      || [[Add]]                              || vec
| <syntaxhighlight lang=apl inline>+</syntaxhighlight> || [[Conjugate]]        ||      || [[Add]]                              || vec
|-
|-
| <source lang=apl inline>-</source> || [[Negate]]            ||      || [[Subtract]]                          || vec
| <syntaxhighlight lang=apl inline>-</syntaxhighlight> || [[Negate]]            ||      || [[Subtract]]                          || vec
|-
|-
| <source lang=apl inline>×</source> || [[Sign of]]          ||      || [[Times]]                             || vec
| <syntaxhighlight lang=apl inline>×</syntaxhighlight> || [[Sign of]]          ||      || [[Multiply]]                         || vec
|-
|-
| <source lang=apl inline>÷</source> || [[Reciprocal]]        ||      || [[Divide]]                            || vec
| <syntaxhighlight lang=apl inline>÷</syntaxhighlight> || [[Reciprocal]]        ||      || [[Divide]]                            || vec
|-
|-
| <source lang=apl inline>⌈</source> || [[Ceiling]]          ||      || [[Maximum|Greater of]]                || vec
| <syntaxhighlight lang=apl inline>⌈</syntaxhighlight> || [[Ceiling]]          ||      || [[Maximum|Greater of]]                || vec
|-
|-
| <source lang=apl inline>⌊</source> || [[Floor]]            ||      || [[Minimum|Lesser of]]                || vec
| <syntaxhighlight lang=apl inline>⌊</syntaxhighlight> || [[Floor]]            ||      || [[Minimum|Lesser of]]                || vec
|-
|-
| <source lang=apl inline>|</source> || [[Absolute value]]    ||      || [[Residue]]                          || vec
| <syntaxhighlight lang=apl inline>|</syntaxhighlight> || [[Absolute value]]    ||      || [[Residue]]                          || vec
|-
|-
| <source lang=apl inline>⍳</source> || [[Index list]]        ||      || [[Index of]]                          ||
| <syntaxhighlight lang=apl inline>⍳</syntaxhighlight> || [[Index list]]        ||      || [[Index of]]                          ||
|-
|-
| <source lang=apl inline>?</source> || [[Roll]]              ||      || [[Deal]]                              ||
| <syntaxhighlight lang=apl inline>?</syntaxhighlight> || [[Roll]]              ||      || [[Deal]]                              ||
|-
|-
| <source lang=apl inline>*</source> || [[Exponential]]      ||      || [[Power function|To the power of]]    || vec
| <syntaxhighlight lang=apl inline>*</syntaxhighlight> || [[Exponential]]      ||      || [[Power function|To the power of]]    || vec
|-
|-
| <source lang=apl inline>⍟</source> || [[Natural log]]      ||      || [[Logarithm|Log to the base]]        || vec
| <syntaxhighlight lang=apl inline>⍟</syntaxhighlight> || [[Natural log]]      ||      || [[Logarithm|Log to the base]]        || vec
|-
|-
| <source lang=apl inline>○</source> || [[Pi times]]          ||      || [[Circle function|Circular and Hyperbolic functions]] || vec
| <syntaxhighlight lang=apl inline>○</syntaxhighlight> || [[Pi times]]          ||      || [[Circle function|Circular and Hyperbolic functions]] || vec
|-
|-
| <source lang=apl inline>!</source> || [[Factorial]]        ||      || [[Binomial]]                          || vec
| <syntaxhighlight lang=apl inline>!</syntaxhighlight> || [[Factorial]]        ||      || [[Binomial]]                          || vec
|-
|-
| <source lang=apl inline>⌹</source> || [[Matrix inverse]]    ||      || [[Matrix divide]]                    ||
| <syntaxhighlight lang=apl inline>⌹</syntaxhighlight> || [[Matrix inverse]]    ||      || [[Matrix divide]]                    ||
|-
|-
| <source lang=apl inline><</source> ||                      ||      || [[Less than]]                        || vec
| <syntaxhighlight lang=apl inline><</syntaxhighlight> ||                      ||      || [[Less than]]                        || vec
|-
|-
| <source lang=apl inline>≤</source> ||                      ||      || [[Less than or equal]]                || vec
| <syntaxhighlight lang=apl inline>≤</syntaxhighlight> ||                      ||      || [[Less than or equal]]                || vec
|-
|-
| <source lang=apl inline>=</source> ||                      ||      || [[Equal]]                            || vec
| <syntaxhighlight lang=apl inline>=</syntaxhighlight> ||                      ||      || [[Equal]]                            || vec
|-
|-
| <source lang=apl inline>≥</source> ||                      ||      || [[Greater than or equal]]            || vec
| <syntaxhighlight lang=apl inline>≥</syntaxhighlight> ||                      ||      || [[Greater than or equal]]            || vec
|-
|-
| <source lang=apl inline>></source> ||                      ||      || [[Greater than]]                      || vec
| <syntaxhighlight lang=apl inline>></syntaxhighlight> ||                      ||      || [[Greater than]]                      || vec
|-
|-
| <source lang=apl inline>≠</source> ||                      ||      || [[Not equal]]                        || vec
| <syntaxhighlight lang=apl inline>≠</syntaxhighlight> ||                      ||      || [[Not equal]]                        || vec
|-
|-
| <source lang=apl inline>≡</source> || [[Depth]]            ||      || [[Match]]                            ||
| <syntaxhighlight lang=apl inline>≡</syntaxhighlight> || [[Depth]]            ||      || [[Match]]                            ||
|-
|-
| <source lang=apl inline>≢</source> ||                      ||      || [[Not Match]]                        ||
| <syntaxhighlight lang=apl inline>≢</syntaxhighlight> ||                      ||      || [[Not Match]]                        ||
|-
|-
| <source lang=apl inline>∊</source> || [[Enlist]]            ||      || [[Membership]]                        ||
| <syntaxhighlight lang=apl inline>∊</syntaxhighlight> || [[Enlist]]            ||      || [[Membership]]                        ||
|-
|-
| <source lang=apl inline>⍷</source> ||                      ||      || [[Find]]                              ||
| <syntaxhighlight lang=apl inline>⍷</syntaxhighlight> ||                      ||      || [[Find]]                              ||
|-
|-
| <source lang=apl inline>∪</source> || [[Unique]]            ||      || [[Union]]                            ||
| <syntaxhighlight lang=apl inline>∪</syntaxhighlight> || [[Unique]]            ||      || [[Union]]                            ||
|-
|-
| <source lang=apl inline>∩</source> ||                      ||      || [[Intersection]]                      ||
| <syntaxhighlight lang=apl inline>∩</syntaxhighlight> ||                      ||      || [[Intersection]]                      ||
|-
|-
| <source lang=apl inline>~</source> || [[Not]]              ||      || [[Without]]                          ||
| <syntaxhighlight lang=apl inline>~</syntaxhighlight> || [[Not]]              ||      || [[Without]]                          ||
|-
|-
| <source lang=apl inline>∨</source> ||                      ||      || [[Or]]                                ||
| <syntaxhighlight lang=apl inline>∨</syntaxhighlight> ||                      ||      || [[Or]]                                ||
|-
|-
| <source lang=apl inline>^</source> ||                      ||      || [[And]]                              ||
| <syntaxhighlight lang=apl inline>^</syntaxhighlight> ||                      ||      || [[And]]                              ||
|-
|-
| <source lang=apl inline>⍱</source> ||                      ||      || [[Nor]]                              ||
| <syntaxhighlight lang=apl inline>⍱</syntaxhighlight> ||                      ||      || [[Nor]]                              ||
|-
|-
| <source lang=apl inline>⍲</source> ||                      ||      || [[Nand]]                              ||
| <syntaxhighlight lang=apl inline>⍲</syntaxhighlight> ||                      ||      || [[Nand]]                              ||
|-
|-
| <source lang=apl inline>⍴</source> || [[Shape|Shape of]]    ||      || [[Reshape]]                          ||
| <syntaxhighlight lang=apl inline>⍴</syntaxhighlight> || [[Shape|Shape of]]    ||      || [[Reshape]]                          ||
|-
|-
| <source lang=apl inline>,</source> || [[Ravel]]        || vec,frac || [[Catenate|Catenate, Laminate]]      ||
| <syntaxhighlight lang=apl inline>,</syntaxhighlight> || [[Ravel]]        || vec,frac || [[Catenate|Catenate, Laminate]]      ||
|-
|-
| <source lang=apl inline>⍪</source> ||                      ||      || [[Catenate First|1st axis catenate]]  ||
| <syntaxhighlight lang=apl inline>⍪</syntaxhighlight> ||                      ||      || [[Catenate First|1st axis catenate]]  ||
|-
|-
| <source lang=apl inline>⌽</source> || [[Reverse]]          || scal || [[Rotate]]                            || scal
| <syntaxhighlight lang=apl inline>⌽</syntaxhighlight> || [[Reverse]]          || scal || [[Rotate]]                            || scal
|-
|-
| <source lang=apl inline>⊖</source> || [[Reverse First]]    || scal || [[Rotate First|1st axis rotate]]      || scal
| <syntaxhighlight lang=apl inline>⊖</syntaxhighlight> || [[Reverse First]]    || scal || [[Rotate First|1st axis rotate]]      || scal
|-
|-
| <source lang=apl inline>⍉</source> ||colspan=4| [[Transpose]]
| <syntaxhighlight lang=apl inline>⍉</syntaxhighlight> ||colspan=4| [[Transpose]]
|-
|-
| <source lang=apl inline>↑</source> || [[First]]            ||      || [[Take]]                              || vec
| <syntaxhighlight lang=apl inline>↑</syntaxhighlight> || [[First]]            ||      || [[Take]]                              || vec
|-
|-
| <source lang=apl inline>↓</source> ||                      ||      || [[Drop]]                              || vec
| <syntaxhighlight lang=apl inline>↓</syntaxhighlight> ||                      ||      || [[Drop]]                              || vec
|-
|-
| <source lang=apl inline>⊂</source> || [[Enclose]]          || vec  || [[Partition]]                        || scal
| <syntaxhighlight lang=apl inline>⊂</syntaxhighlight> || [[Enclose]]          || vec  || [[Partition]]                        || scal
|-
|-
| <source lang=apl inline>⊃</source> || Disclose ([[Mix]])    || vec  || [[Pick]]                              ||
| <syntaxhighlight lang=apl inline>⊃</syntaxhighlight> || [[Mix|Disclose]]         || vec  || [[Pick]]                              ||
|-
|-
| <source lang=apl inline>⌷</source> ||                      ||      || [[Squad Index|Index]]                || vec
| <syntaxhighlight lang=apl inline>⌷</syntaxhighlight> ||                      ||      || [[Squad Index|Index]]                || vec
|-
|-
| <source lang=apl inline>⍋</source> ||colspan=4| [[Grade up]]
| <syntaxhighlight lang=apl inline>⍋</syntaxhighlight> ||colspan=4| [[Grade up]]
|-
|-
| <source lang=apl inline>⍒</source> ||colspan=4| [[Grade down]]
| <syntaxhighlight lang=apl inline>⍒</syntaxhighlight> ||colspan=4| [[Grade down]]
|-
|-
| <source lang=apl inline>⊤</source> ||                      ||      || [[Encode]]                            ||
| <syntaxhighlight lang=apl inline>⊤</syntaxhighlight> ||                      ||      || [[Encode]]                            ||
|-
|-
| <source lang=apl inline>⊥</source> ||                      ||      || [[Decode]]                            ||
| <syntaxhighlight lang=apl inline>⊥</syntaxhighlight> ||                      ||      || [[Decode]]                            ||
|-
|-
| <source lang=apl inline>⍺</source> ||                      ||      || Picture format                        ||
| <syntaxhighlight lang=apl inline>⍺</syntaxhighlight> ||                      ||      || Picture format                        ||
|-
|-
| <source lang=apl inline>⍕</source> || [[Format]]            ||      || [[Dyadic format|Format]] by specification or by example ||
| <syntaxhighlight lang=apl inline>⍕</syntaxhighlight> || [[Format]]            ||      || [[Dyadic format|Format]] by specification or by example ||
|-
|-
| <source lang=apl inline>⍎</source> ||                      ||      || [[Execute]]                          ||
| <syntaxhighlight lang=apl inline>⍎</syntaxhighlight> ||                      ||      || [[Execute]]                          ||
|-
|-
| <source lang=apl inline></source> || [[Stop]]              ||     || [[Left Identity|Left]]                ||
| <syntaxhighlight lang=apl inline></syntaxhighlight> || File read            || scal || File read or rename                  || scal
|-
|-
| <source lang=apl inline></source> || [[Identity|Pass]]    ||      || [[Right Identity|Right]]              ||
| <syntaxhighlight lang=apl inline></syntaxhighlight> ||                       ||      || File write                            || scal
|-
|-
| <source lang=apl inline>/</source> ||                       ||     || [[Compress]], [[Replicate]]          || scal
| <syntaxhighlight lang=apl inline></syntaxhighlight> || File hold            || scal || File hold                            || scal
|-
|-
| <source lang=apl inline></source> ||                       ||     || [[Replicate First|1st axis compress/replicate]] || scal
| <syntaxhighlight lang=apl inline></syntaxhighlight> || File drop            || scal || File drop                            || scal
|-
|-
| <source lang=apl inline>\</source> ||                       ||      || [[Expand]]                           || scal
| <syntaxhighlight lang=apl inline></syntaxhighlight> || [[Stop]]              ||      || [[Left Identity|Left]]               ||
|-
|-
| <source lang=apl inline>⍀</source> ||                      ||      || [[Expand First|1st axis expand]]      || scal
| <syntaxhighlight lang=apl inline>⊢</syntaxhighlight> || [[Identity|Pass]]    ||      || [[Right Identity|Right]]              ||
|-
| <syntaxhighlight lang=apl inline>/</syntaxhighlight> ||                      ||      || [[Compress]], [[Replicate]]          || scal
|-
| <syntaxhighlight lang=apl inline>⌿</syntaxhighlight> ||                      ||      || [[Replicate First|1st axis compress/replicate]] || scal
|-
| <syntaxhighlight lang=apl inline>\</syntaxhighlight> ||                      ||      || [[Expand]]                            || scal
|-
| <syntaxhighlight lang=apl inline>⍀</syntaxhighlight> ||                      ||      || [[Expand First|1st axis expand]]      || scal
|}
|}
The component file operations <syntaxhighlight lang=apl inline>⍇⍈⍐⍗</syntaxhighlight> were taken from or inspired by [[APL/700]].


=== Operators ===
=== Operators ===
Line 149: Line 160:
! Glyph          !! Valence !! Monadic call                    !! Dyadic call
! Glyph          !! Valence !! Monadic call                    !! Dyadic call
|-
|-
| <source lang=apl inline>/</source>  || Monadic || [[Reduce]]                      || [[N-wise Reduce]]
| <syntaxhighlight lang=apl inline>/</syntaxhighlight>  || Monadic || [[Reduce]]                      || [[N-wise Reduce]]
|-
|-
| <source lang=apl inline>⌿</source>  || Monadic || [[Reduce First|1st axis reduce]] || [[N-wise Reduce first]]
| <syntaxhighlight lang=apl inline>⌿</syntaxhighlight>  || Monadic || [[Reduce First|1st axis reduce]] || [[N-wise Reduce first]]
|-
|-
| <source lang=apl inline>\</source>  || Monadic || [[Scan]]                        ||
| <syntaxhighlight lang=apl inline>\</syntaxhighlight>  || Monadic || [[Scan]]                        ||
|-
|-
| <source lang=apl inline>⍀</source>  || Monadic || [[Scan First|1st axis scan]]    ||
| <syntaxhighlight lang=apl inline>⍀</syntaxhighlight>  || Monadic || [[Scan First|1st axis scan]]    ||
|-
|-
| <source lang=apl inline>.</source>  || Dyadic  ||                                  || [[Inner product]]
| <syntaxhighlight lang=apl inline>.</syntaxhighlight>  || Dyadic  ||                                  || [[Inner product]]
|-
|-
| <source lang=apl inline>∘.</source> || Monadic ||                                  || [[Outer product]]
| <syntaxhighlight lang=apl inline>∘.</syntaxhighlight> || Monadic ||                                  || [[Outer product]]
|-
|-
| <source lang=apl inline>¨</source>  || Monadic ||colspan=2| [[Each]]
| <syntaxhighlight lang=apl inline>¨</syntaxhighlight>  || Monadic ||colspan=2| [[Each]]
|}
|}


Line 169: Line 180:
* [https://dyalog.github.io/aplx/ Tools to help migrate from APLX to Dyalog APL]
* [https://dyalog.github.io/aplx/ Tools to help migrate from APLX to Dyalog APL]


{{APL dialects}}
{{APL dialects}}[[Category:APL dialects]][[Category:Nested array languages]]

Latest revision as of 13:25, 13 February 2024

APLX was a cross-platform dialect of the programming language APL, created by British company MicroAPL Ltd., as a successor to their APL.68000 product.

APLX is intended for uses such as financial planning, market research, statistics, management information, and various kinds of scientific and engineering work. APLX is based on IBM's APL2, but includes several extensions. It is available on Microsoft Windows, Linux, and macOS. Though APLX keeps APL's extended character set, APLX is a bit more verbose, due to the prevalence of system functions with long names, and the use of structured-control keywords. The use of explicit loops is a major deviation from earlier APL versions and derivatives.

Effective July 11, 2016, MicroAPL withdrew APLX from commercial sale. British firm Dyalog Ltd., authors of Dyalog APL, began hosting the APLX Archive website including the download area and documentation.

Primitives

Functions

Glyph Monadic Axis Dyadic Axis
+ Conjugate Add vec
- Negate Subtract vec
× Sign of Multiply vec
÷ Reciprocal Divide vec
Ceiling Greater of vec
Floor Lesser of vec
| Absolute value Residue vec
Index list Index of
? Roll Deal
* Exponential To the power of vec
Natural log Log to the base vec
Pi times Circular and Hyperbolic functions vec
! Factorial Binomial vec
Matrix inverse Matrix divide
< Less than vec
Less than or equal vec
= Equal vec
Greater than or equal vec
> Greater than vec
Not equal vec
Depth Match
Not Match
Enlist Membership
Find
Unique Union
Intersection
~ Not Without
Or
^ And
Nor
Nand
Shape of Reshape
, Ravel vec,frac Catenate, Laminate
1st axis catenate
Reverse scal Rotate scal
Reverse First scal 1st axis rotate scal
Transpose
First Take vec
Drop vec
Enclose vec Partition scal
Disclose vec Pick
Index vec
Grade up
Grade down
Encode
Decode
Picture format
Format Format by specification or by example
Execute
File read scal File read or rename scal
File write scal
File hold scal File hold scal
File drop scal File drop scal
Stop Left
Pass Right
/ Compress, Replicate scal
1st axis compress/replicate scal
\ Expand scal
1st axis expand scal

The component file operations ⍇⍈⍐⍗ were taken from or inspired by APL/700.

Operators

Glyph Valence Monadic call Dyadic call
/ Monadic Reduce N-wise Reduce
Monadic 1st axis reduce N-wise Reduce first
\ Monadic Scan
Monadic 1st axis scan
. Dyadic Inner product
∘. Monadic Outer product
¨ Monadic Each

External links


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