NARS: Difference between revisions
(It has its own direct definition form) |
mNo edit summary |
||
(11 intermediate revisions by 2 users not shown) | |||
Line 2: | Line 2: | ||
| array model = [[nested array model|nested]] | | array model = [[nested array model|nested]] | ||
| index origin = 0 or 1 | | index origin = 0 or 1 | ||
| function styles = [[defined function]]s, [[direct definition ( | | function styles = [[defined function]]s, [[direct definition (operator)]] | ||
| numeric types = | | numeric types = | ||
| unicode support = no | | unicode support = no | ||
Line 12: | Line 12: | ||
| operating systems = | | operating systems = | ||
| documentation = [http://www.sudleyplace.com/APL/Nested%20Arrays%20System.pdf Reference manual] | | documentation = [http://www.sudleyplace.com/APL/Nested%20Arrays%20System.pdf Reference manual] | ||
| influenced by = [[APL | | influenced by = [[APL*PLUS]], [[Operators and Functions]], [[Iverson notation]] | ||
| influenced = [[Dyalog APL]], [[APL2]], [[NARS2000]] | | influenced = [[Dyalog APL]], [[APL2]], [[NARS2000]] | ||
}} | }} | ||
[[STSC]]'s '''APL*PLUS Nested Arrays System''' (acronymized '''NARS''', from "Nested Array Research System") was the first commercial [[Nested array model|nested]] APL implementation. Drawing on work by [[Jim Brown]], [[Trenchard More]], and development manager [[Bob Smith]], NARS introduced a new set of functions for working with arrays that contain arrays, as well as many new operators such as [[Power (operator)|Power]].<ref name="manual">Carl M. Cheney. ''[http://www.sudleyplace.com/APL/Nested%20Arrays%20System.pdf APL*PLUS Nested Arrays System]'' (reference manual). [[STSC]]. 1981.</ref> | [[STSC]]'s '''APL*PLUS Nested Arrays System''' (acronymized '''NARS''', from "Nested Array Research System") was the first commercial [[Nested array model|nested]] APL implementation. Drawing on work by [[Jim Brown]], [[Trenchard More]], and development manager [[Bob Smith]], NARS introduced a new set of functions for working with arrays that contain arrays, as well as many new operators such as [[Power (operator)|Power]].<ref name="manual">Carl M. Cheney. ''[http://www.sudleyplace.com/APL/Nested%20Arrays%20System.pdf APL*PLUS Nested Arrays System]'' (reference manual). [[STSC]]. 1981.</ref> It was heavily influenced by [[Ken Iverson]]'s 1978 paper [[Operators and Functions]], and as a result features the first implementations of many primitives that were later added to [[SHARP APL]] and [[J]] under Iverson's direct supervision. | ||
== Primitives == | |||
NARS was an extension of [[APL*PLUS]], which used the [[APL.SV]] primitive set, except for [[Execute]] (<syntaxhighlight lang=apl inline>⍎</syntaxhighlight>). Only new primitives are shown here, with existing cases in parentheses. | |||
=== Functions === | |||
{|class=wikitable | |||
! Glyph !! Monadic !! Dyadic | |||
|- | |||
| <syntaxhighlight lang=apl inline>⊂</syntaxhighlight> || [[Enclose]] || [[Partitioned Enclose]] | |||
|- | |||
| <syntaxhighlight lang=apl inline>⊃</syntaxhighlight> || Disclose or [[First]] || [[Pick]] | |||
|- | |||
| <syntaxhighlight lang=apl inline>⊤</syntaxhighlight> || [[Type]] || | |||
|- | |||
| <syntaxhighlight lang=apl inline>≡</syntaxhighlight> || [[Simple (NARS)]] || [[Equivalent]] | |||
|- | |||
| <syntaxhighlight lang=apl inline>≢</syntaxhighlight> || [[Not-Simple]] || [[Inequivalent]] | |||
|- | |||
| <syntaxhighlight lang=apl inline>↓</syntaxhighlight> || [[Split]] || ([[Drop]]) | |||
|- | |||
| <syntaxhighlight lang=apl inline>↑</syntaxhighlight> || [[Mix]] || ([[Take]]) | |||
|- | |||
| <syntaxhighlight lang=apl inline>∪</syntaxhighlight> || [[Unique]] || [[Union]] | |||
|- | |||
| <syntaxhighlight lang=apl inline>~</syntaxhighlight> || || [[Set Difference]] | |||
|- | |||
| <syntaxhighlight lang=apl inline>∩</syntaxhighlight> || || [[Intersection]] | |||
|- | |||
| <syntaxhighlight lang=apl inline>⍪</syntaxhighlight> || || [[Catenate]] along the First Dimension | |||
|} | |||
Additionally, [[Index Generator]] was extended to allow a [[vector]] argument, [[Replicate]] and [[Expand]] were extended to allow integer left arguments, and [[Reshape]] was extended to allow an [[empty]] right argument (using [[fill element]]s). | |||
=== Operators === | |||
{|class=wikitable | |||
! Syntax !! Monadic call !! Dyadic call | |||
|- | |||
| <syntaxhighlight lang=apl inline>f/</syntaxhighlight> || ([[Reduction]]) || Dyadic Reduction ([[Windowed Reduction]]) | |||
|- | |||
| <syntaxhighlight lang=apl inline>f\</syntaxhighlight> || ([[Scan]]) || Dyadic Scan | |||
|- | |||
| <syntaxhighlight lang=apl inline>f¨</syntaxhighlight> ||colspan=2| [[Each]] | |||
|- | |||
| <syntaxhighlight lang=apl inline>f⍨</syntaxhighlight> || || [[Commute]] | |||
|- | |||
| <syntaxhighlight lang=apl inline>f⍣B</syntaxhighlight> || [[Power (operator)|Power]] || | |||
|- | |||
| <syntaxhighlight lang=apl inline>f⍣∘</syntaxhighlight> || [[Power Limit]] || | |||
|- | |||
| <syntaxhighlight lang=apl inline>f⍣∘</syntaxhighlight> || [[Power Series (operator)|Power Series]] || | |||
|- | |||
| <syntaxhighlight lang=apl inline>f∘g</syntaxhighlight> ||colspan=2| Composition ([[Beside]]) | |||
|- | |||
| <syntaxhighlight lang=apl inline>A∘g</syntaxhighlight> ||rowspan=2| Composition ([[Bind]]) || | |||
|- | |||
| <syntaxhighlight lang=apl inline>f∘B</syntaxhighlight> || | |||
|- | |||
| <syntaxhighlight lang=apl inline>f⍢g</syntaxhighlight> ||colspan=2| [[Dual]] | |||
|- | |||
| <syntaxhighlight lang=apl inline>∘.g</syntaxhighlight> || Function Table || ([[Outer Product]]) | |||
|- | |||
| <syntaxhighlight lang=apl inline>A⍡</syntaxhighlight> || || [[Convolution operator]] | |||
|- | |||
| <syntaxhighlight lang=apl inline>A∘/</syntaxhighlight> || || [[Mask]] | |||
|- | |||
| <syntaxhighlight lang=apl inline>A∘\</syntaxhighlight> || || [[Mesh]] | |||
|- | |||
!colspan=3| [[Direct definition (operator)|Direct definition]] | |||
|- | |||
| <syntaxhighlight lang=apl inline>∘∇B</syntaxhighlight> || [[Monadic]] || | |||
|- | |||
| <syntaxhighlight lang=apl inline>A∇∘</syntaxhighlight> || || [[Dyadic]] | |||
|- | |||
| <syntaxhighlight lang=apl inline>A∇B</syntaxhighlight> ||colspan=2| [[Ambivalent]] | |||
|} | |||
=== Other functionality === | |||
* [[Stranding]] and [[stranded assignment]] syntax were added. | |||
* The primitive array [[Zilde]] was introduced. | |||
* The assignment arrow <syntaxhighlight lang=apl inline>←</syntaxhighlight> with nothing to the left was used to indicate [[Sink]], which prevented display of a value. | |||
* [[Defined function]]s were extended to allow an ambivalent case. | |||
* [[Choose indexing]] was added. | |||
== References == | == References == |
Latest revision as of 02:40, 8 March 2024
STSC's APL*PLUS Nested Arrays System (acronymized NARS, from "Nested Array Research System") was the first commercial nested APL implementation. Drawing on work by Jim Brown, Trenchard More, and development manager Bob Smith, NARS introduced a new set of functions for working with arrays that contain arrays, as well as many new operators such as Power.[2] It was heavily influenced by Ken Iverson's 1978 paper Operators and Functions, and as a result features the first implementations of many primitives that were later added to SHARP APL and J under Iverson's direct supervision.
Primitives
NARS was an extension of APL*PLUS, which used the APL.SV primitive set, except for Execute (⍎
). Only new primitives are shown here, with existing cases in parentheses.
Functions
Glyph | Monadic | Dyadic |
---|---|---|
⊂ |
Enclose | Partitioned Enclose |
⊃ |
Disclose or First | Pick |
⊤ |
Type | |
≡ |
Simple (NARS) | Equivalent |
≢ |
Not-Simple | Inequivalent |
↓ |
Split | (Drop) |
↑ |
Mix | (Take) |
∪ |
Unique | Union |
~ |
Set Difference | |
∩ |
Intersection | |
⍪ |
Catenate along the First Dimension |
Additionally, Index Generator was extended to allow a vector argument, Replicate and Expand were extended to allow integer left arguments, and Reshape was extended to allow an empty right argument (using fill elements).
Operators
Syntax | Monadic call | Dyadic call |
---|---|---|
f/ |
(Reduction) | Dyadic Reduction (Windowed Reduction) |
f\ |
(Scan) | Dyadic Scan |
f¨ |
Each | |
f⍨ |
Commute | |
f⍣B |
Power | |
f⍣∘ |
Power Limit | |
f⍣∘ |
Power Series | |
f∘g |
Composition (Beside) | |
A∘g |
Composition (Bind) | |
f∘B |
||
f⍢g |
Dual | |
∘.g |
Function Table | (Outer Product) |
A⍡ |
Convolution operator | |
A∘/ |
Mask | |
A∘\ |
Mesh | |
Direct definition | ||
∘∇B |
Monadic | |
A∇∘ |
Dyadic | |
A∇B |
Ambivalent |
Other functionality
- Stranding and stranded assignment syntax were added.
- The primitive array Zilde was introduced.
- The assignment arrow
←
with nothing to the left was used to indicate Sink, which prevented display of a value. - Defined functions were extended to allow an ambivalent case.
- Choose indexing was added.
References
- ↑ Bob Smith. "Nested arrays, operators, and functions" at APL81.
- ↑ Carl M. Cheney. APL*PLUS Nested Arrays System (reference manual). STSC. 1981.
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 |