APL.SV: Difference between revisions

From APL Wiki
Jump to navigation Jump to search
m (Text replacement - "implementation languages" to "implementation language ")
m (Text replacement - "<source" to "<syntaxhighlight")
(One intermediate revision by the same user not shown)
Line 1: Line 1:
{{Infobox array language
{{Infobox array language
| array model              = [[flat array model|flat]] without [[box|boxes]]
| array model              = [[flat array model|flat]] without [[box|boxes]]
| index origin            = <source lang=apl inline>⎕IO</source>0 or 1
| index origin            = <syntaxhighlight lang=apl inline>⎕IO</syntaxhighlight>0 or 1
| function styles          = [[defined function]]
| function styles          = [[defined function]]
| numeric types            = floats (64-bit [[wikipedia:IBM_hexadecimal_floating_point|HFP]])
| numeric types            = floats (64-bit [[wikipedia:IBM_hexadecimal_floating_point|HFP]])
Line 27: Line 27:
! Glyph                              !! Monadic              !! Dyadic
! Glyph                              !! Monadic              !! Dyadic
|-
|-
| <source lang=apl inline>+</source> || Plus ([[Identity]])  || [[Plus]]
| <syntaxhighlight lang=apl inline>+</syntaxhighlight> || Plus ([[Identity]])  || [[Plus]]
|-
|-
| <source lang=apl inline>-</source> || [[Negate|Negative]]  || [[Subtract|Minus]]
| <syntaxhighlight lang=apl inline>-</syntaxhighlight> || [[Negate|Negative]]  || [[Subtract|Minus]]
|-
|-
| <source lang=apl inline>×</source> || [[Signum]]            || [[Times]]
| <syntaxhighlight lang=apl inline>×</syntaxhighlight> || [[Signum]]            || [[Times]]
|-
|-
| <source lang=apl inline>÷</source> || [[Reciprocal]]        || [[Divide]]
| <syntaxhighlight lang=apl inline>÷</syntaxhighlight> || [[Reciprocal]]        || [[Divide]]
|-
|-
| <source lang=apl inline>⌈</source> || [[Ceiling]]          || [[Maximum]]
| <syntaxhighlight lang=apl inline>⌈</syntaxhighlight> || [[Ceiling]]          || [[Maximum]]
|-
|-
| <source lang=apl inline>⌊</source> || [[Floor]]            || [[Minimum]]
| <syntaxhighlight lang=apl inline>⌊</syntaxhighlight> || [[Floor]]            || [[Minimum]]
|-
|-
| <source lang=apl inline>*</source> || [[Exponential]]      || [[Power]]
| <syntaxhighlight lang=apl inline>*</syntaxhighlight> || [[Exponential]]      || [[Power]]
|-
|-
| <source lang=apl inline>⍟</source> || [[Natural logarithm]] || [[Logarithm]]
| <syntaxhighlight lang=apl inline>⍟</syntaxhighlight> || [[Natural logarithm]] || [[Logarithm]]
|-
|-
| <source lang=apl inline>|</source> || [[Magnitude]]        || [[Residue]]
| <syntaxhighlight lang=apl inline>|</syntaxhighlight> || [[Magnitude]]        || [[Residue]]
|-
|-
| <source lang=apl inline>!</source> || [[Factorial]]        || [[Binomial coefficient]]
| <syntaxhighlight lang=apl inline>!</syntaxhighlight> || [[Factorial]]        || [[Binomial coefficient]]
|-
|-
| <source lang=apl inline>?</source> || [[Roll]]              || [[Deal]]
| <syntaxhighlight lang=apl inline>?</syntaxhighlight> || [[Roll]]              || [[Deal]]
|-
|-
| <source lang=apl inline>○</source> || [[Pi times]]          || [[Circle function|Circular]]
| <syntaxhighlight lang=apl inline>○</syntaxhighlight> || [[Pi times]]          || [[Circle function|Circular]]
|-
|-
| <source lang=apl inline>~</source> || [[Not]]              ||
| <syntaxhighlight lang=apl inline>~</syntaxhighlight> || [[Not]]              ||
|-
|-
| <source lang=apl inline>∧</source> ||                      || [[And]]
| <syntaxhighlight lang=apl inline>∧</syntaxhighlight> ||                      || [[And]]
|-
|-
| <source lang=apl inline>∨</source> ||                      || [[Or]]
| <syntaxhighlight lang=apl inline>∨</syntaxhighlight> ||                      || [[Or]]
|-
|-
| <source lang=apl inline>⍲</source> ||                      || [[Nand]]
| <syntaxhighlight lang=apl inline>⍲</syntaxhighlight> ||                      || [[Nand]]
|-
|-
| <source lang=apl inline>⍱</source> ||                      || [[Nor]]
| <syntaxhighlight lang=apl inline>⍱</syntaxhighlight> ||                      || [[Nor]]
|-
|-
| <source lang=apl inline><</source> ||                      || [[Less]]
| <syntaxhighlight lang=apl inline><</syntaxhighlight> ||                      || [[Less]]
|-
|-
| <source lang=apl inline>≤</source> ||                      || [[Not greater]]
| <syntaxhighlight lang=apl inline>≤</syntaxhighlight> ||                      || [[Not greater]]
|-
|-
| <source lang=apl inline>=</source> ||                      || [[Equal]]
| <syntaxhighlight lang=apl inline>=</syntaxhighlight> ||                      || [[Equal]]
|-
|-
| <source lang=apl inline>≥</source> ||                      || [[Not less]]
| <syntaxhighlight lang=apl inline>≥</syntaxhighlight> ||                      || [[Not less]]
|-
|-
| <source lang=apl inline>></source> ||                      || [[Greater]]
| <syntaxhighlight lang=apl inline>></syntaxhighlight> ||                      || [[Greater]]
|-
|-
| <source lang=apl inline>≠</source> ||                      || [[Not equal]]
| <syntaxhighlight lang=apl inline>≠</syntaxhighlight> ||                      || [[Not equal]]
|-
|-
| <source lang=apl inline>⍴</source> || [[Shape|Size]]        || [[Reshape]]
| <syntaxhighlight lang=apl inline>⍴</syntaxhighlight> || [[Shape|Size]]        || [[Reshape]]
|-
|-
| <source lang=apl inline>,</source> || [[Ravel]]            || [[Catenate]], [[Laminate]] (allows axis)
| <syntaxhighlight lang=apl inline>,</syntaxhighlight> || [[Ravel]]            || [[Catenate]], [[Laminate]] (allows axis)
|-
|-
| <source lang=apl inline>[]</source>||                      || [[Bracket indexing|Index]]
| <syntaxhighlight lang=apl inline>[]</syntaxhighlight>||                      || [[Bracket indexing|Index]]
|-
|-
| <source lang=apl inline>⍳</source> || [[Index generator]]  || [[Index of]]
| <syntaxhighlight lang=apl inline>⍳</syntaxhighlight> || [[Index generator]]  || [[Index of]]
|-
|-
| <source lang=apl inline>↑</source> ||                      || [[Take]]
| <syntaxhighlight lang=apl inline>↑</syntaxhighlight> ||                      || [[Take]]
|-
|-
| <source lang=apl inline>↓</source> ||                      || [[Drop]]
| <syntaxhighlight lang=apl inline>↓</syntaxhighlight> ||                      || [[Drop]]
|-
|-
| <source lang=apl inline>⍋</source> || [[Grade up]]  (allows axis) ||
| <syntaxhighlight lang=apl inline>⍋</syntaxhighlight> || [[Grade up]]  (allows axis) ||
|-
|-
| <source lang=apl inline>⍒</source> || [[Grade down]] (allows axis) ||
| <syntaxhighlight lang=apl inline>⍒</syntaxhighlight> || [[Grade down]] (allows axis) ||
|-
|-
| <source lang=apl inline>/</source> ||                      ||rowspan=2| [[Compress]]<br>(allows axis)
| <syntaxhighlight lang=apl inline>/</syntaxhighlight> ||                      ||rowspan=2| [[Compress]]<br>(allows axis)
|-
|-
| <source lang=apl inline>⌿</source> ||
| <syntaxhighlight lang=apl inline>⌿</syntaxhighlight> ||
|-
|-
| <source lang=apl inline>\</source> ||                      ||rowspan=2| [[Expand]]<br>(allows axis)
| <syntaxhighlight lang=apl inline>\</syntaxhighlight> ||                      ||rowspan=2| [[Expand]]<br>(allows axis)
|-
|-
| <source lang=apl inline>⍀</source> ||
| <syntaxhighlight lang=apl inline>⍀</syntaxhighlight> ||
|-
|-
| <source lang=apl inline>⌽</source> ||rowspan=2| [[Reverse]]<br>(allows axis) ||rowspan=2| [[Rotate]]<br>(allows axis)
| <syntaxhighlight lang=apl inline>⌽</syntaxhighlight> ||rowspan=2| [[Reverse]]<br>(allows axis) ||rowspan=2| [[Rotate]]<br>(allows axis)
|-
|-
| <source lang=apl inline>⊖</source>
| <syntaxhighlight lang=apl inline>⊖</syntaxhighlight>
|-
|-
| <source lang=apl inline>⍉</source> ||colspan=2| [[Transpose]]
| <syntaxhighlight lang=apl inline>⍉</syntaxhighlight> ||colspan=2| [[Transpose]]
|-
|-
| <source lang=apl inline>∊</source> ||                      || [[Membership]]
| <syntaxhighlight lang=apl inline>∊</syntaxhighlight> ||                      || [[Membership]]
|-
|-
| <source lang=apl inline>⊥</source> ||                      || [[Decode]]
| <syntaxhighlight lang=apl inline>⊥</syntaxhighlight> ||                      || [[Decode]]
|-
|-
| <source lang=apl inline>⊤</source> ||                      || [[Encode]]
| <syntaxhighlight lang=apl inline>⊤</syntaxhighlight> ||                      || [[Encode]]
|-
|-
| <source lang=apl inline>⌹</source> || [[Matrix inverse]]    || [[Matrix division]]
| <syntaxhighlight lang=apl inline>⌹</syntaxhighlight> || [[Matrix inverse]]    || [[Matrix division]]
|-
|-
| <source lang=apl inline>⍎</source> ||                      || [[Execute]]
| <syntaxhighlight lang=apl inline>⍎</syntaxhighlight> ||                      || [[Execute]]
|-
|-
| <source lang=apl inline>⍕</source> || [[Monadic format]]    || [[Dyadic format]]
| <syntaxhighlight lang=apl inline>⍕</syntaxhighlight> || [[Monadic format]]    || [[Dyadic format]]
|}
|}


Line 120: Line 120:
! Glyph                              !! Valence !! Monadic call            !! Dyadic call
! Glyph                              !! Valence !! Monadic call            !! Dyadic call
|-
|-
| <source lang=apl inline>/</source>  || Monadic ||rowspan=2| [[Reduction]]<br>(allows axis) ||
| <syntaxhighlight lang=apl inline>/</syntaxhighlight>  || Monadic ||rowspan=2| [[Reduction]]<br>(allows axis) ||
|-
|-
| <source lang=apl inline>⌿</source>  || Monadic ||
| <syntaxhighlight lang=apl inline>⌿</syntaxhighlight>  || Monadic ||
|-
|-
| <source lang=apl inline>\</source>  || Monadic ||rowspan=2| [[Scan]]<br>(allows axis)      ||
| <syntaxhighlight lang=apl inline>\</syntaxhighlight>  || Monadic ||rowspan=2| [[Scan]]<br>(allows axis)      ||
|-
|-
| <source lang=apl inline>⍀</source>  || Monadic ||
| <syntaxhighlight lang=apl inline>⍀</syntaxhighlight>  || Monadic ||
|-
|-
| <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| [[Function axis|Axis]]
| <syntaxhighlight lang=apl inline>[]</syntaxhighlight> || Monadic ||colspan=2| [[Function axis|Axis]]
|}
|}



Revision as of 22:28, 10 September 2022


APL.SV, "APL with Shared Variables", was an enhancement to APL\360 released by IBM in 1973. As the name suggests, APL.SV introduced the concept of a shared variable which could be used by multiple processes. It also included system variables as a kind of shared variable, and system functions. APL.SV also introduced the Format and Execute functions, and the Scan operator.

The enhancements to APL described herein are the result of more than six years of personal experience with APL\360, and countless comments and suggestions from many other users. The shared variable concept goes back in principle to early publication by Falkoff and Iverson, but is was R. H. Lathwell who recognized the practical potential of the idea and, with L. A. Morrow, designed an effective data processing facility based upon it. The system was implemented by Lathwell, Morrow, J. A. Brown, and C. F. Shen, all of whom contributed to the design of the other new features as well. R. J. Creasy first proposed the use of surrogate names.

APLSV User's Manual[1]

Primitives

Functions

Glyph Monadic Dyadic
+ Plus (Identity) Plus
- Negative Minus
× Signum Times
÷ Reciprocal Divide
Ceiling Maximum
Floor Minimum
* Exponential Power
Natural logarithm Logarithm
| Magnitude Residue
! Factorial Binomial coefficient
? Roll Deal
Pi times Circular
~ Not
And
Or
Nand
Nor
< Less
Not greater
= Equal
Not less
> Greater
Not equal
Size Reshape
, Ravel Catenate, Laminate (allows axis)
[] Index
Index generator Index of
Take
Drop
Grade up (allows axis)
Grade down (allows axis)
/ Compress
(allows axis)
\ Expand
(allows axis)
Reverse
(allows axis)
Rotate
(allows axis)
Transpose
Membership
Decode
Encode
Matrix inverse Matrix division
Execute
Monadic format Dyadic format

Operators

Glyph Valence Monadic call Dyadic call
/ Monadic Reduction
(allows axis)
Monadic
\ Monadic Scan
(allows axis)
Monadic
. Dyadic Inner product
∘. Monadic Outer product
[] Monadic Axis

References

APL dialects [edit]
Maintained APL+WinAPL2APL64APL\ivApletteAprilCo-dfnsDyalog APLDyalog APL Visiondzaima/APLGNU APLKapNARS2000Pometo
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