APL.SV: Difference between revisions
m (Text replacement - "implementation languages" to "implementation language ") |
mNo edit summary |
||
(2 intermediate revisions by one other 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 = < | | 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 19: | Line 19: | ||
{| class=wikitable | {| class=wikitable | ||
| | | | ||
{{quote|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 [[Adin Falkoff|Falkoff]] and [[Ken Iverson|Iverson]], but | {{quote|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 [[Adin Falkoff|Falkoff]] and [[Ken Iverson|Iverson]], but it was [[Richard Lathwell|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, [[Jim Brown|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<ref>[[Adin Falkoff]] and [[Ken Iverson]]. [http://www.softwarepreservation.org/projects/apl/Manuals/APLSVUsersManual/view "APLSV User's Manual"]. IBM. 1973.</ref>}} | ||
|} | |} | ||
Line 27: | Line 27: | ||
! Glyph !! Monadic !! Dyadic | ! Glyph !! Monadic !! Dyadic | ||
|- | |- | ||
| < | | <syntaxhighlight lang=apl inline>+</syntaxhighlight> || Plus ([[Identity]]) || [[Plus]] | ||
|- | |- | ||
| < | | <syntaxhighlight lang=apl inline>-</syntaxhighlight> || [[Negate|Negative]] || [[Subtract|Minus]] | ||
|- | |- | ||
| < | | <syntaxhighlight lang=apl inline>×</syntaxhighlight> || [[Signum]] || [[Times]] | ||
|- | |- | ||
| < | | <syntaxhighlight lang=apl inline>÷</syntaxhighlight> || [[Reciprocal]] || [[Divide]] | ||
|- | |- | ||
| < | | <syntaxhighlight lang=apl inline>⌈</syntaxhighlight> || [[Ceiling]] || [[Maximum]] | ||
|- | |- | ||
| < | | <syntaxhighlight lang=apl inline>⌊</syntaxhighlight> || [[Floor]] || [[Minimum]] | ||
|- | |- | ||
| < | | <syntaxhighlight lang=apl inline>*</syntaxhighlight> || [[Exponential]] || [[Power]] | ||
|- | |- | ||
| < | | <syntaxhighlight lang=apl inline>⍟</syntaxhighlight> || [[Natural logarithm]] || [[Logarithm]] | ||
|- | |- | ||
| < | | <syntaxhighlight lang=apl inline>|</syntaxhighlight> || [[Magnitude]] || [[Residue]] | ||
|- | |- | ||
| < | | <syntaxhighlight lang=apl inline>!</syntaxhighlight> || [[Factorial]] || [[Binomial coefficient]] | ||
|- | |- | ||
| < | | <syntaxhighlight lang=apl inline>?</syntaxhighlight> || [[Roll]] || [[Deal]] | ||
|- | |- | ||
| < | | <syntaxhighlight lang=apl inline>○</syntaxhighlight> || [[Pi times]] || [[Circle function|Circular]] | ||
|- | |- | ||
| < | | <syntaxhighlight lang=apl inline>~</syntaxhighlight> || [[Not]] || | ||
|- | |- | ||
| < | | <syntaxhighlight lang=apl inline>∧</syntaxhighlight> || || [[And]] | ||
|- | |- | ||
| < | | <syntaxhighlight lang=apl inline>∨</syntaxhighlight> || || [[Or]] | ||
|- | |- | ||
| < | | <syntaxhighlight lang=apl inline>⍲</syntaxhighlight> || || [[Nand]] | ||
|- | |- | ||
| < | | <syntaxhighlight lang=apl inline>⍱</syntaxhighlight> || || [[Nor]] | ||
|- | |- | ||
| < | | <syntaxhighlight lang=apl inline><</syntaxhighlight> || || [[Less]] | ||
|- | |- | ||
| < | | <syntaxhighlight lang=apl inline>≤</syntaxhighlight> || || [[Not greater]] | ||
|- | |- | ||
| < | | <syntaxhighlight lang=apl inline>=</syntaxhighlight> || || [[Equal]] | ||
|- | |- | ||
| < | | <syntaxhighlight lang=apl inline>≥</syntaxhighlight> || || [[Not less]] | ||
|- | |- | ||
| < | | <syntaxhighlight lang=apl inline>></syntaxhighlight> || || [[Greater]] | ||
|- | |- | ||
| < | | <syntaxhighlight lang=apl inline>≠</syntaxhighlight> || || [[Not equal]] | ||
|- | |- | ||
| < | | <syntaxhighlight lang=apl inline>⍴</syntaxhighlight> || [[Shape|Size]] || [[Reshape]] | ||
|- | |- | ||
| < | | <syntaxhighlight lang=apl inline>,</syntaxhighlight> || [[Ravel]] || [[Catenate]], [[Laminate]] (allows axis) | ||
|- | |- | ||
| < | | <syntaxhighlight lang=apl inline>[]</syntaxhighlight>|| || [[Bracket indexing|Index]] | ||
|- | |- | ||
| < | | <syntaxhighlight lang=apl inline>⍳</syntaxhighlight> || [[Index generator]] || [[Index of]] | ||
|- | |- | ||
| < | | <syntaxhighlight lang=apl inline>↑</syntaxhighlight> || || [[Take]] | ||
|- | |- | ||
| < | | <syntaxhighlight lang=apl inline>↓</syntaxhighlight> || || [[Drop]] | ||
|- | |- | ||
| < | | <syntaxhighlight lang=apl inline>⍋</syntaxhighlight> || [[Grade up]] (allows axis) || | ||
|- | |- | ||
| < | | <syntaxhighlight lang=apl inline>⍒</syntaxhighlight> || [[Grade down]] (allows axis) || | ||
|- | |- | ||
| < | | <syntaxhighlight lang=apl inline>/</syntaxhighlight> || ||rowspan=2| [[Compress]]<br>(allows axis) | ||
|- | |- | ||
| < | | <syntaxhighlight lang=apl inline>⌿</syntaxhighlight> || | ||
|- | |- | ||
| < | | <syntaxhighlight lang=apl inline>\</syntaxhighlight> || ||rowspan=2| [[Expand]]<br>(allows axis) | ||
|- | |- | ||
| < | | <syntaxhighlight lang=apl inline>⍀</syntaxhighlight> || | ||
|- | |- | ||
| < | | <syntaxhighlight lang=apl inline>⌽</syntaxhighlight> ||rowspan=2| [[Reverse]]<br>(allows axis) ||rowspan=2| [[Rotate]]<br>(allows axis) | ||
|- | |- | ||
| < | | <syntaxhighlight lang=apl inline>⊖</syntaxhighlight> | ||
|- | |- | ||
| < | | <syntaxhighlight lang=apl inline>⍉</syntaxhighlight> ||colspan=2| [[Transpose]] | ||
|- | |- | ||
| < | | <syntaxhighlight lang=apl inline>∊</syntaxhighlight> || || [[Membership]] | ||
|- | |- | ||
| < | | <syntaxhighlight lang=apl inline>⊥</syntaxhighlight> || || [[Decode]] | ||
|- | |- | ||
| < | | <syntaxhighlight lang=apl inline>⊤</syntaxhighlight> || || [[Encode]] | ||
|- | |- | ||
| < | | <syntaxhighlight lang=apl inline>⌹</syntaxhighlight> || [[Matrix inverse]] || [[Matrix division]] | ||
|- | |- | ||
| < | | <syntaxhighlight lang=apl inline>⍎</syntaxhighlight> || || [[Execute]] | ||
|- | |- | ||
| < | | <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 | ||
|- | |- | ||
| < | | <syntaxhighlight lang=apl inline>/</syntaxhighlight> || Monadic ||rowspan=2| [[Reduction]]<br>(allows axis) || | ||
|- | |- | ||
| < | | <syntaxhighlight lang=apl inline>⌿</syntaxhighlight> || Monadic || | ||
|- | |- | ||
| < | | <syntaxhighlight lang=apl inline>\</syntaxhighlight> || Monadic ||rowspan=2| [[Scan]]<br>(allows axis) || | ||
|- | |- | ||
| < | | <syntaxhighlight lang=apl inline>⍀</syntaxhighlight> || Monadic || | ||
|- | |- | ||
| < | | <syntaxhighlight lang=apl inline>.</syntaxhighlight> || Dyadic || || [[Inner product]] | ||
|- | |- | ||
| < | | <syntaxhighlight lang=apl inline>∘.</syntaxhighlight> || Monadic || || [[Outer product]] | ||
|- | |- | ||
| < | | <syntaxhighlight lang=apl inline>[]</syntaxhighlight> || Monadic ||colspan=2| [[Function axis|Axis]] | ||
|} | |} | ||
Latest revision as of 01:28, 26 February 2024
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 |
---|---|---|
+ |
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
- ↑ 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 |