NARS: Difference between revisions
No edit summary |
(Tables of new functionality) |
||
Line 17: | Line 17: | ||
[[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> | ||
== Primitives == | |||
NARS was an extension of [[APL*PLUS]], which used the [[APL.SV]] primitive set, except for [[Execute]] (<source lang=apl inline>⍎</source>). Only new primitives are shown here, with existing cases in parentheses. | |||
=== Functions === | |||
{|class=wikitable | |||
! Glyph !! Monadic !! Dyadic | |||
|- | |||
| <source lang=apl inline>⊂</source> || [[Enclose]] || [[Partitioned Enclose]] | |||
|- | |||
| <source lang=apl inline>⊃</source> || Disclose or [[First]] || [[Pick]] | |||
|- | |||
| <source lang=apl inline>⊤</source> || [[Type]] || | |||
|- | |||
| <source lang=apl inline>∩</source> || || [[Intersection]] | |||
|- | |||
| <source lang=apl inline>∪</source> || [[Unique]] || [[Union]] | |||
|- | |||
| <source lang=apl inline>~</source> || || [[Set Difference]] | |||
|- | |||
| <source lang=apl inline>⍪</source> || || [[Catenate]] along the First Dimension | |||
|- | |||
| <source lang=apl inline>≡</source> || [[Simple (NARS)]] || [[Equivalent]] | |||
|- | |||
| <source lang=apl inline>≢</source> || [[Not-Simple]] || [[Inequivalent]] | |||
|- | |||
| <source lang=apl inline>↓</source> || [[Split]] || ([[Drop]]) | |||
|- | |||
| <source lang=apl inline>↑</source> || [[Mix]] || ([[Take]]) | |||
|} | |||
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 | |||
|- | |||
| <source lang=apl inline>f/</source> || ([[Reduction]]) || Dyadic Reduction ([[Windowed Reduction]]) | |||
|- | |||
| <source lang=apl inline>f\</source> || ([[Scan]]) || Dyadic Scan | |||
|- | |||
| <source lang=apl inline>f¨</source> ||colspan=2| [[Each]] | |||
|- | |||
| <source lang=apl inline>f⍨</source> || || [[Commute]] | |||
|- | |||
| <source lang=apl inline>f⍣B</source> || [[Power (operator)|Power]] || | |||
|- | |||
| <source lang=apl inline>f⍣∘</source> || [[Power Limit]] || | |||
|- | |||
| <source lang=apl inline>f⍣∘</source> || [[Power Series (operator)|Power Series]] || | |||
|- | |||
| <source lang=apl inline>f∘g</source> ||colspan=2| Composition ([[Beside]]) | |||
|- | |||
| <source lang=apl inline>A∘g</source> ||rowspan=2| Composition ([[Bind]]) || | |||
|- | |||
| <source lang=apl inline>f∘B</source> || | |||
|- | |||
| <source lang=apl inline>f⍢g</source> ||colspan=2| [[Dual]] | |||
|- | |||
| <source lang=apl inline>A⍡</source> || || [[Convolution operator]] | |||
|- | |||
| <source lang=apl inline>A∘/</source> || || [[Mask]] | |||
|- | |||
| <source lang=apl inline>A∘\</source> || || [[Mesh]] | |||
|- | |||
!colspan=3| [[Direct definition (NARS)|Direct definition]] | |||
|- | |||
| <source lang=apl inline>∘∇B</source> || [[Monadic]] || | |||
|- | |||
| <source lang=apl inline>A∇∘</source> || || [[Dyadic]] | |||
|- | |||
| <source lang=apl inline>A∇B</source> ||colspan=2| [[Ambivalent]] | |||
|} | |||
The [[Outer Product]] operator was renamed "Function Table". | |||
=== Other functionality === | |||
* [[Stranding]] and [[stranded assignment]] syntax were added. | |||
* The primitive array [[Zilde]] was introduced. | |||
* The assignment arrow <source lang=apl inline>←</source> 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 == |
Revision as of 15:41, 4 May 2020
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]
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 | |
∩ |
Intersection | |
∪ |
Unique | Union |
~ |
Set Difference | |
⍪ |
Catenate along the First Dimension | |
≡ |
Simple (NARS) | Equivalent |
≢ |
Not-Simple | Inequivalent |
↓ |
Split | (Drop) |
↑ |
Mix | (Take) |
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 | |
A⍡ |
Convolution operator | |
A∘/ |
Mask | |
A∘\ |
Mesh | |
Direct definition | ||
∘∇B |
Monadic | |
A∇∘ |
Dyadic | |
A∇B |
Ambivalent |
The Outer Product operator was renamed "Function Table".
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 |