2,963
edits
Miraheze>Adám Brudzewsky (Redirected page to SHARP APL) |
(Pretty sure the only APL*PLUS influence comes by way of SHARP...) |
||
(13 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
# | {{Infobox array language | ||
| array model = [[Flat array model|flat]] with [[Box|boxes]] | |||
| index origin = 0 or 1 | |||
| function styles = [[defined function]]s, some [[tacit]] capabilities | |||
| numeric types = 64-bit float | |||
| unicode support = none | |||
| released = 1993 | |||
| withdrawn = around 2017 | |||
| latest release = 6.0 / 2000 | |||
| platforms = S/390, x86 | |||
| operating systems = UNIX (AIX, Solaris), Linux | |||
| license = Free for personal use / Proprietary commercial software | |||
| developer = [[Soliton Associates]] | |||
| influenced by = [[SHARP APL]] | |||
| influenced = [[Dyalog APL]] | |||
| documentation = [https://abrudz.github.io/SAX2/SAX61.pdf PDF] | |||
| file ext = .sw, .sf | |||
}} | |||
'''SAX''' ('''S'''HARP '''A'''PL for UNI'''X''') was a version of [[SHARP APL]] offered by [[Soliton Associates]]. Notable features of SAX include [[function rank]], the [[Rank operator]], and [[leading axis theory]], as well as relative [[comparison tolerance]] and [[close composition]] operators including [[Under]]. | |||
== Primitive functions == | |||
=== Arithmetic === | |||
==== Scalar ==== | |||
All scalar functions have rank zero. | |||
{| class=wikitable | |||
! Glyph !! Monadic !! Dyadic | |||
|- | |||
| <source lang=apl inline>+</source> || [[Conjugate]]/Identity || [[Addition]] | |||
|- | |||
| <source lang=apl inline>-</source> || [[Negate]] || [[Subtraction]] | |||
|- | |||
| <source lang=apl inline>×</source> || [[Signum]] || [[Multiplication]] | |||
|- | |||
| <source lang=apl inline>÷</source> || [[Reciprocal]] || [[Division]] | |||
|- | |||
| <source lang=apl inline>*</source> || [[Exponential]] || [[Power function|Power]] | |||
|- | |||
| <source lang=apl inline>⍟</source> || [[Natural Logarithm]] || [[Logarithm|Base-⍺ Logarithm]] | |||
|- | |||
| <source lang=apl inline>|</source> || [[Magnitude]] || [[Residue]] | |||
|- | |||
| <source lang=apl inline>!</source> || [[Factorial]] || Out-Of/[[Combinations]] | |||
|- | |||
| <source lang=apl inline>⌊</source> || [[Floor]] || [[Minimum]] | |||
|- | |||
| <source lang=apl inline>⌈</source> || [[Ceiling]] || [[Maximum]] | |||
|- | |||
| <source lang=apl inline>○</source> || [[Pi Times]] || [[Circle functions]] | |||
|- | |||
| <source lang=apl inline>∧</source> || || [[And]]/Least Common Multiple (LCM) | |||
|- | |||
| <source lang=apl inline>∨</source> || || [[Or]]/Greatest Common Divisor (GCD) | |||
|- | |||
| <source lang=apl inline>⍲</source> || || [[Nand]] | |||
|- | |||
| <source lang=apl inline>⍱</source> || || [[Nor]] | |||
|- | |||
| <source lang=apl inline>~</source> || [[Not]] || See [[#Miscellaneous|Miscellaneous]] | |||
|- | |||
| <source lang=apl inline>?</source> || [[Roll]] || See [[#Non-Scalar|Non-scalar]] | |||
|} | |||
==== Non-scalar ==== | |||
{| class=wikitable | |||
! Glyph !! Rank !! Monadic !! Ranks !! Dyadic | |||
|- | |||
| <source lang=apl inline>⌹</source> || 2 || [[Matrix inverse]] || ∞ 2 || [[Matrix divide]] | |||
|- | |||
| <source lang=apl inline>?</source> || || See [[#Scalar|Scalar]] || * * || [[Deal]] | |||
|- | |||
| <source lang=apl inline>⊤</source> || || || ∞ ∞ || [[Encode]] | |||
|- | |||
| <source lang=apl inline>⊥</source> || || || ∞ ∞ || [[Decode]] | |||
|} | |||
=== Relational === | |||
{| class=wikitable | |||
! Glyph !! Rank !! Monadic !! Ranks !! Dyadic | |||
|- | |||
| <source lang=apl inline>=</source> || || See [[#Miscellaneous|Miscellaneous]] || 0 0 || [[Equals]] | |||
|- | |||
| <source lang=apl inline>≠</source> || || See [[#Miscellaneous|Miscellaneous]] || 0 0 || [[Not Equals]] | |||
|- | |||
| <source lang=apl inline><</source> || || See [[#Structural|Structural]] || 0 0 || [[Less Than]] | |||
|- | |||
| <source lang=apl inline>≤</source> || || || 0 0 || [[Less Than or Equal]] | |||
|- | |||
| <source lang=apl inline>≥</source> || || || 0 0 || [[Greater Than or Equal]] | |||
|- | |||
| <source lang=apl inline>></source> || || See [[#Structural|Structural]] || 0 0 || [[Greater Than]] | |||
|- | |||
| <source lang=apl inline>≡</source> || || || ∞ ∞ || [[Match]] | |||
|- | |||
| <source lang=apl inline>∊</source> || || || 0 ∞ || [[Membership]] | |||
|- | |||
| <source lang=apl inline>⍷</source> || || || ∞ ∞ || [[Find]] | |||
|} | |||
=== Indexing === | |||
{| class=wikitable | |||
! Glyph !! Rank !! Monadic !! Ranks !! Dyadic | |||
|- | |||
| <source lang=apl inline>@</source> || || See [[#Miscellaneous|Miscellaneous]] || 0 ∞ || [[Squad Index|From]] | |||
|- | |||
| <source lang=apl inline>⍳</source> || 1 || [[Index Generator|Count]] || 1 0 || [[Index Of]] | |||
|- | |||
| <source lang=apl inline>⍸</source> || || || ∞ ∞ || [[Indices of Match|Index]] | |||
|- | |||
| <source lang=apl inline>⍋</source> || ∞ || Numeric [[Grade up]] || ∞ ∞ || Character [[Grade up]] | |||
|- | |||
| <source lang=apl inline>⍒</source> || ∞ || Numeric [[Grade down]] || ∞ ∞ || Character [[Grade down]] | |||
|} | |||
=== Structural === | |||
{| class=wikitable | |||
! Glyph !! Rank !! Monadic !! Ranks !! Dyadic | |||
|- | |||
| <source lang=apl inline>⍴</source> || ∞ || [[Shape|Shape of]] || 1 ∞ || [[Reshape]] | |||
|- | |||
| <source lang=apl inline>↑</source> || || See [[#Miscellaneous|Miscellaneous]] || 1 ∞ || [[Take]] | |||
|- | |||
| <source lang=apl inline>↓</source> || ∞ || [[Raze]] || 1 ∞ || [[Drop]] | |||
|- | |||
| <source lang=apl inline><</source> || ∞ || [[Enclose]]/Box || || See [[#Relational|Relational]] | |||
|- | |||
| <source lang=apl inline>⊃</source> || ∞ || [[Enclose if simple|Conditional Enclose]] || ∞ ∞ || [[Link]] | |||
|- | |||
| <source lang=apl inline>></source> || 0 || [[Disclose]]/Open || || See [[#Relational|Relational]] | |||
|- | |||
| <source lang=apl inline>,</source> || ∞ || [[Ravel]] || ∞ ∞ || [[Catenate]] | |||
|- | |||
| <source lang=apl inline>⍪</source> || ∞ || [[Table]] || ∞ ∞ || [[Catenate First|Catenate-Down]] | |||
|- | |||
| <source lang=apl inline>⌽</source> || 1 || [[Reverse]] || 0 1 || [[Rotate]] | |||
|- | |||
| <source lang=apl inline>⊖</source> || ∞ || [[Reverse First|Reverse-Down]] || ∞ ∞ || [[Rotate First|Rotate-Down]] | |||
|- | |||
| <source lang=apl inline>⍉</source> || ∞ || Monadic [[Transpose]] || 0 ∞ || Dyadic [[Transpose]] | |||
|} | |||
=== Miscellaneous === | |||
{| class=wikitable | |||
! Glyph !! Rank !! Monadic !! Ranks !! Dyadic | |||
|- | |||
| <source lang=apl inline>⊣</source> || ∞ || [[Stop]] || ∞ ∞ || [[Left Identity|Left]] | |||
|- | |||
| <source lang=apl inline>⊢</source> || ∞ || [[Identity|Pass]] || ∞ ∞ || [[Right Identity|Right]] | |||
|- | |||
| <source lang=apl inline>≠</source> || ∞ || [[Nubsieve]] || || See [[#Relational|Relational]] | |||
|- | |||
| <source lang=apl inline>↑</source> || ∞ || [[Nub]] || || See [[#Structural|Structural]] | |||
|- | |||
| <source lang=apl inline>=</source> || ∞ || [[Nubin]] || || See [[#Relational|Relational]] | |||
|- | |||
| <source lang=apl inline>~</source> || || See [[#Scalar|Scalar]] || ∞ ∞ || [[Without|Less]] | |||
|- | |||
| <source lang=apl inline>@</source> || 1 || [[Cartesian Product|All]] || || See [[#Indexing|Indexing]] | |||
|- | |||
| <source lang=apl inline>⍕</source> || ∞ || [[Monadic Format]] || * ∞ || [[Dyadic Format]] | |||
|- | |||
| <source lang=apl inline>⍎</source> || * || [[Execute]] || || | |||
|} | |||
== Primitive Operators == | |||
{| class=wikitable | |||
! Glyph !!colspan=2|Operands !!colspan=2|Ranks !! Monadic Call !! Dyadic Call | |||
|- | |||
| <source lang=apl inline>/</source> || || <source lang=apl inline>f</source> || <source lang=apl inline>∞</source> || || [[Reduce]] || | |||
|- | |||
| <source lang=apl inline>⌿</source> || || <source lang=apl inline>f</source> || <source lang=apl inline>∞</source> || || [[Reduce First|Reduce-down]] || | |||
|- | |||
| <source lang=apl inline>\</source> || || <source lang=apl inline>f</source> || <source lang=apl inline>∞</source> || || [[Scan]] || | |||
|- | |||
| <source lang=apl inline>⍀</source> || || <source lang=apl inline>f</source> || <source lang=apl inline>∞</source> || || [[Scan First|Scan-down]] || | |||
|- | |||
| <source lang=apl inline>/</source> || || <source lang=apl inline>m</source> || <source lang=apl inline>∞</source> || || [[Replicate|Copy]]/[[Compress]] || | |||
|- | |||
| <source lang=apl inline>⌿</source> || || <source lang=apl inline>m</source> || <source lang=apl inline>∞</source> || || [[Replicate|Copy]]-down/[[Compress]]-down || | |||
|- | |||
| <source lang=apl inline>\</source> || || <source lang=apl inline>m</source> || <source lang=apl inline>∞</source> || || [[Expand]] || | |||
|- | |||
| <source lang=apl inline>⍀</source> || || <source lang=apl inline>m</source> || <source lang=apl inline>∞</source> || || [[Expand First|Expand-down]] || | |||
|- | |||
| <source lang=apl inline>⊂</source> || || <source lang=apl inline>f</source> || <source lang=apl inline>∞</source> || <source lang=apl inline>rf lf</source> ||colspan=2| Swap | |||
|- | |||
| <source lang=apl inline>&</source> || || <source lang=apl inline>f</source> || <source lang=apl inline>∞</source> || <source lang=apl inline>∞ ∞</source> ||colspan=2| Select | |||
|- | |||
| <source lang=apl inline>⍤</source> || <source lang=apl inline>f</source> || <source lang=apl inline>g</source> || <source lang=apl inline>mg</source> || <source lang=apl inline>mg mg</source> ||colspan=2| On ([[close Over]]) | |||
|- | |||
| <source lang=apl inline>⍤</source> || <source lang=apl inline>f</source> || <source lang=apl inline>n</source> || <source lang=apl inline>n</source> || <source lang=apl inline>n n</source> ||colspan=2| [[Rank operator|Rank]] | |||
|- | |||
| <source lang=apl inline>⍤</source> || <source lang=apl inline>m</source> || <source lang=apl inline>g</source> || <source lang=apl inline>mg</source> || <source lang=apl inline>mg mg</source> ||colspan=2| [[Cut operator|Cut]] | |||
|- | |||
| <source lang=apl inline>⍥</source> || <source lang=apl inline>f</source> || <source lang=apl inline>g</source> || <source lang=apl inline>mg</source> || <source lang=apl inline>mg mg</source> ||colspan=2| Upon ([[close Atop]]) | |||
|- | |||
| <source lang=apl inline>¨</source> || <source lang=apl inline>f</source> || <source lang=apl inline>g</source> || <source lang=apl inline>mg</source> || <source lang=apl inline>mg mg</source> ||colspan=2| [[close Under|Under]] | |||
|- | |||
| <source lang=apl inline>¨</source> || <source lang=apl inline>m</source> || <source lang=apl inline>g</source> || <source lang=apl inline>mg</source> || ||rowspan="2"|With ([[Bind]]) || | |||
|- | |||
| <source lang=apl inline>¨</source> || <source lang=apl inline>f</source> || <source lang=apl inline>n</source> || <source lang=apl inline>mf</source> || || | |||
|- | |||
| <source lang=apl inline>.</source> || <source lang=apl inline>f</source> || <source lang=apl inline>g</source> || <source lang=apl inline>2</source> || <source lang=apl inline>∞ ∞</source> || [[Alternant]] || [[Inner Product|Inner-product]] | |||
|- | |||
| <source lang=apl inline>.</source> || <source lang=apl inline>m</source> || <source lang=apl inline>g</source> || || <source lang=apl inline>∞ ∞</source> || || [[Tie]], [[Outer Product|Outer-product]] | |||
|- | |||
| <source lang=apl inline>.</source> || <source lang=apl inline>f</source> || <source lang=apl inline>m</source> || <source lang=apl inline>mf</source> || || [[Ply]] || | |||
|} | |||
{{APL dialects}}[[Category:APL dialects]][[Category:Flat array languages]][[Category:Leading axis languages]] |