APL.SV: Difference between revisions
m (Text replacement - "implementation languages" to "implementation language ") |
m (Text replacement - "</source>" to "</syntaxhighlight>") |
||
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</ | | index origin = <source 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 lang=apl inline>+</syntaxhighlight> || Plus ([[Identity]]) || [[Plus]] | ||
|- | |- | ||
| <source lang=apl inline>-</ | | <source lang=apl inline>-</syntaxhighlight> || [[Negate|Negative]] || [[Subtract|Minus]] | ||
|- | |- | ||
| <source lang=apl inline>×</ | | <source lang=apl inline>×</syntaxhighlight> || [[Signum]] || [[Times]] | ||
|- | |- | ||
| <source lang=apl inline>÷</ | | <source lang=apl inline>÷</syntaxhighlight> || [[Reciprocal]] || [[Divide]] | ||
|- | |- | ||
| <source lang=apl inline>⌈</ | | <source lang=apl inline>⌈</syntaxhighlight> || [[Ceiling]] || [[Maximum]] | ||
|- | |- | ||
| <source lang=apl inline>⌊</ | | <source lang=apl inline>⌊</syntaxhighlight> || [[Floor]] || [[Minimum]] | ||
|- | |- | ||
| <source lang=apl inline>*</ | | <source lang=apl inline>*</syntaxhighlight> || [[Exponential]] || [[Power]] | ||
|- | |- | ||
| <source lang=apl inline>⍟</ | | <source lang=apl inline>⍟</syntaxhighlight> || [[Natural logarithm]] || [[Logarithm]] | ||
|- | |- | ||
| <source lang=apl inline>|</ | | <source lang=apl inline>|</syntaxhighlight> || [[Magnitude]] || [[Residue]] | ||
|- | |- | ||
| <source lang=apl inline>!</ | | <source lang=apl inline>!</syntaxhighlight> || [[Factorial]] || [[Binomial coefficient]] | ||
|- | |- | ||
| <source lang=apl inline>?</ | | <source lang=apl inline>?</syntaxhighlight> || [[Roll]] || [[Deal]] | ||
|- | |- | ||
| <source lang=apl inline>○</ | | <source lang=apl inline>○</syntaxhighlight> || [[Pi times]] || [[Circle function|Circular]] | ||
|- | |- | ||
| <source lang=apl inline>~</ | | <source lang=apl inline>~</syntaxhighlight> || [[Not]] || | ||
|- | |- | ||
| <source lang=apl inline>∧</ | | <source lang=apl inline>∧</syntaxhighlight> || || [[And]] | ||
|- | |- | ||
| <source lang=apl inline>∨</ | | <source lang=apl inline>∨</syntaxhighlight> || || [[Or]] | ||
|- | |- | ||
| <source lang=apl inline>⍲</ | | <source lang=apl inline>⍲</syntaxhighlight> || || [[Nand]] | ||
|- | |- | ||
| <source lang=apl inline>⍱</ | | <source lang=apl inline>⍱</syntaxhighlight> || || [[Nor]] | ||
|- | |- | ||
| <source lang=apl inline><</ | | <source lang=apl inline><</syntaxhighlight> || || [[Less]] | ||
|- | |- | ||
| <source lang=apl inline>≤</ | | <source lang=apl inline>≤</syntaxhighlight> || || [[Not greater]] | ||
|- | |- | ||
| <source lang=apl inline>=</ | | <source lang=apl inline>=</syntaxhighlight> || || [[Equal]] | ||
|- | |- | ||
| <source lang=apl inline>≥</ | | <source lang=apl inline>≥</syntaxhighlight> || || [[Not less]] | ||
|- | |- | ||
| <source lang=apl inline>></ | | <source lang=apl inline>></syntaxhighlight> || || [[Greater]] | ||
|- | |- | ||
| <source lang=apl inline>≠</ | | <source lang=apl inline>≠</syntaxhighlight> || || [[Not equal]] | ||
|- | |- | ||
| <source lang=apl inline>⍴</ | | <source lang=apl inline>⍴</syntaxhighlight> || [[Shape|Size]] || [[Reshape]] | ||
|- | |- | ||
| <source lang=apl inline>,</ | | <source lang=apl inline>,</syntaxhighlight> || [[Ravel]] || [[Catenate]], [[Laminate]] (allows axis) | ||
|- | |- | ||
| <source lang=apl inline>[]</ | | <source lang=apl inline>[]</syntaxhighlight>|| || [[Bracket indexing|Index]] | ||
|- | |- | ||
| <source lang=apl inline>⍳</ | | <source lang=apl inline>⍳</syntaxhighlight> || [[Index generator]] || [[Index of]] | ||
|- | |- | ||
| <source lang=apl inline>↑</ | | <source lang=apl inline>↑</syntaxhighlight> || || [[Take]] | ||
|- | |- | ||
| <source lang=apl inline>↓</ | | <source lang=apl inline>↓</syntaxhighlight> || || [[Drop]] | ||
|- | |- | ||
| <source lang=apl inline>⍋</ | | <source lang=apl inline>⍋</syntaxhighlight> || [[Grade up]] (allows axis) || | ||
|- | |- | ||
| <source lang=apl inline>⍒</ | | <source lang=apl inline>⍒</syntaxhighlight> || [[Grade down]] (allows axis) || | ||
|- | |- | ||
| <source lang=apl inline>/</ | | <source lang=apl inline>/</syntaxhighlight> || ||rowspan=2| [[Compress]]<br>(allows axis) | ||
|- | |- | ||
| <source lang=apl inline>⌿</ | | <source lang=apl inline>⌿</syntaxhighlight> || | ||
|- | |- | ||
| <source lang=apl inline>\</ | | <source lang=apl inline>\</syntaxhighlight> || ||rowspan=2| [[Expand]]<br>(allows axis) | ||
|- | |- | ||
| <source lang=apl inline>⍀</ | | <source lang=apl inline>⍀</syntaxhighlight> || | ||
|- | |- | ||
| <source lang=apl inline>⌽</ | | <source lang=apl inline>⌽</syntaxhighlight> ||rowspan=2| [[Reverse]]<br>(allows axis) ||rowspan=2| [[Rotate]]<br>(allows axis) | ||
|- | |- | ||
| <source lang=apl inline>⊖</ | | <source lang=apl inline>⊖</syntaxhighlight> | ||
|- | |- | ||
| <source lang=apl inline>⍉</ | | <source lang=apl inline>⍉</syntaxhighlight> ||colspan=2| [[Transpose]] | ||
|- | |- | ||
| <source lang=apl inline>∊</ | | <source lang=apl inline>∊</syntaxhighlight> || || [[Membership]] | ||
|- | |- | ||
| <source lang=apl inline>⊥</ | | <source lang=apl inline>⊥</syntaxhighlight> || || [[Decode]] | ||
|- | |- | ||
| <source lang=apl inline>⊤</ | | <source lang=apl inline>⊤</syntaxhighlight> || || [[Encode]] | ||
|- | |- | ||
| <source lang=apl inline>⌹</ | | <source lang=apl inline>⌹</syntaxhighlight> || [[Matrix inverse]] || [[Matrix division]] | ||
|- | |- | ||
| <source lang=apl inline>⍎</ | | <source lang=apl inline>⍎</syntaxhighlight> || || [[Execute]] | ||
|- | |- | ||
| <source lang=apl inline>⍕</ | | <source 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 lang=apl inline>/</syntaxhighlight> || Monadic ||rowspan=2| [[Reduction]]<br>(allows axis) || | ||
|- | |- | ||
| <source lang=apl inline>⌿</ | | <source lang=apl inline>⌿</syntaxhighlight> || Monadic || | ||
|- | |- | ||
| <source lang=apl inline>\</ | | <source lang=apl inline>\</syntaxhighlight> || Monadic ||rowspan=2| [[Scan]]<br>(allows axis) || | ||
|- | |- | ||
| <source lang=apl inline>⍀</ | | <source lang=apl inline>⍀</syntaxhighlight> || Monadic || | ||
|- | |- | ||
| <source lang=apl inline>.</ | | <source lang=apl inline>.</syntaxhighlight> || Dyadic || || [[Inner product]] | ||
|- | |- | ||
| <source lang=apl inline>∘.</ | | <source lang=apl inline>∘.</syntaxhighlight> || Monadic || || [[Outer product]] | ||
|- | |- | ||
| <source lang=apl inline>[]</ | | <source lang=apl inline>[]</syntaxhighlight> || Monadic ||colspan=2| [[Function axis|Axis]] | ||
|} | |} | ||
Revision as of 21:46, 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.
|
Primitives
Functions
Glyph | Monadic | Dyadic |
---|---|---|
<source lang=apl inline>+</syntaxhighlight> | Plus (Identity) | Plus |
<source lang=apl inline>-</syntaxhighlight> | Negative | Minus |
<source lang=apl inline>×</syntaxhighlight> | Signum | Times |
<source lang=apl inline>÷</syntaxhighlight> | Reciprocal | Divide |
<source lang=apl inline>⌈</syntaxhighlight> | Ceiling | Maximum |
<source lang=apl inline>⌊</syntaxhighlight> | Floor | Minimum |
<source lang=apl inline>*</syntaxhighlight> | Exponential | Power |
<source lang=apl inline>⍟</syntaxhighlight> | Natural logarithm | Logarithm |
</syntaxhighlight> | Magnitude | Residue |
<source lang=apl inline>!</syntaxhighlight> | Factorial | Binomial coefficient |
<source lang=apl inline>?</syntaxhighlight> | Roll | Deal |
<source lang=apl inline>○</syntaxhighlight> | Pi times | Circular |
<source lang=apl inline>~</syntaxhighlight> | Not | |
<source lang=apl inline>∧</syntaxhighlight> | And | |
<source lang=apl inline>∨</syntaxhighlight> | Or | |
<source lang=apl inline>⍲</syntaxhighlight> | Nand | |
<source lang=apl inline>⍱</syntaxhighlight> | Nor | |
<source lang=apl inline><</syntaxhighlight> | Less | |
<source lang=apl inline>≤</syntaxhighlight> | Not greater | |
<source lang=apl inline>=</syntaxhighlight> | Equal | |
<source lang=apl inline>≥</syntaxhighlight> | Not less | |
<source lang=apl inline>></syntaxhighlight> | Greater | |
<source lang=apl inline>≠</syntaxhighlight> | Not equal | |
<source lang=apl inline>⍴</syntaxhighlight> | Size | Reshape |
<source lang=apl inline>,</syntaxhighlight> | Ravel | Catenate, Laminate (allows axis) |
<source lang=apl inline>[]</syntaxhighlight> | Index | |
<source lang=apl inline>⍳</syntaxhighlight> | Index generator | Index of |
<source lang=apl inline>↑</syntaxhighlight> | Take | |
<source lang=apl inline>↓</syntaxhighlight> | Drop | |
<source lang=apl inline>⍋</syntaxhighlight> | Grade up (allows axis) | |
<source lang=apl inline>⍒</syntaxhighlight> | Grade down (allows axis) | |
<source lang=apl inline>/</syntaxhighlight> | Compress (allows axis) | |
<source lang=apl inline>⌿</syntaxhighlight> | ||
<source lang=apl inline>\</syntaxhighlight> | Expand (allows axis) | |
<source lang=apl inline>⍀</syntaxhighlight> | ||
<source lang=apl inline>⌽</syntaxhighlight> | Reverse (allows axis) |
Rotate (allows axis) |
<source lang=apl inline>⊖</syntaxhighlight> | ||
<source lang=apl inline>⍉</syntaxhighlight> | Transpose | |
<source lang=apl inline>∊</syntaxhighlight> | Membership | |
<source lang=apl inline>⊥</syntaxhighlight> | Decode | |
<source lang=apl inline>⊤</syntaxhighlight> | Encode | |
<source lang=apl inline>⌹</syntaxhighlight> | Matrix inverse | Matrix division |
<source lang=apl inline>⍎</syntaxhighlight> | Execute | |
<source lang=apl inline>⍕</syntaxhighlight> | Monadic format | Dyadic format |
Operators
Glyph | Valence | Monadic call | Dyadic call |
---|---|---|---|
<source lang=apl inline>/</syntaxhighlight> | Monadic | Reduction (allows axis) |
|
<source lang=apl inline>⌿</syntaxhighlight> | Monadic | ||
<source lang=apl inline>\</syntaxhighlight> | Monadic | Scan (allows axis) |
|
<source lang=apl inline>⍀</syntaxhighlight> | Monadic | ||
<source lang=apl inline>.</syntaxhighlight> | Dyadic | Inner product | |
<source lang=apl inline>∘.</syntaxhighlight> | Monadic | Outer product | |
<source lang=apl inline>[]</syntaxhighlight> | Monadic | Axis |
References
- ↑ Adin Falkoff and Ken Iverson. "APLSV User's Manual". IBM. 1973.
APL dialects [edit] | |
---|---|
Maintained | APL+Win ∙ APL2 ∙ APL64 ∙ APL\iv ∙ Aplette ∙ April ∙ Co-dfns ∙ Dyalog APL ∙ Dyalog APL Vision ∙ dzaima/APL ∙ GNU APL ∙ Kap ∙ NARS2000 ∙ Pometo ∙ TinyAPL |
Historical | A Programming Language ∙ A+ (A) ∙ APL# ∙ APL2C ∙ APL\360 ∙ APL/700 ∙ APL\1130 ∙ APL\3000 ∙ APL.68000 ∙ APL*PLUS ∙ APL.jl ∙ APL.SV ∙ APLX ∙ Extended Dyalog APL ∙ Iverson notation ∙ IVSYS/7090 ∙ NARS ∙ ngn/apl ∙ openAPL ∙ Operators and Functions ∙ PAT ∙ Rowan ∙ SAX ∙ SHARP APL ∙ Rationalized APL ∙ VisualAPL (APLNext) ∙ VS APL ∙ York APL |
Derivatives | AHPL ∙ BQN ∙ CoSy ∙ ELI ∙ Glee ∙ I ∙ Ivy ∙ J ∙ Jelly ∙ K (Goal, Klong, Q) ∙ KamilaLisp ∙ Lang5 ∙ Lil ∙ Nial ∙ RAD ∙ Uiua |
Overviews | Comparison of APL dialects ∙ Timeline of array languages ∙ Timeline of influential array languages ∙ Family tree of array languages |