NARS

From APL Wiki
Revision as of 21:14, 10 September 2022 by Adám Brudzewsky (talk | contribs) (Text replacement - "<source" to "<syntaxhighlight")
Jump to navigation Jump to search


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 (<syntaxhighlight lang=apl inline>⍎</source>). Only new primitives are shown here, with existing cases in parentheses.

Functions

Glyph Monadic Dyadic
<syntaxhighlight lang=apl inline>⊂</source> Enclose Partitioned Enclose
<syntaxhighlight lang=apl inline>⊃</source> Disclose or First Pick
<syntaxhighlight lang=apl inline>⊤</source> Type
<syntaxhighlight lang=apl inline>≡</source> Simple (NARS) Equivalent
<syntaxhighlight lang=apl inline>≢</source> Not-Simple Inequivalent
<syntaxhighlight lang=apl inline>↓</source> Split (Drop)
<syntaxhighlight lang=apl inline>↑</source> Mix (Take)
<syntaxhighlight lang=apl inline>∪</source> Unique Union
<syntaxhighlight lang=apl inline>~</source> Set Difference
<syntaxhighlight lang=apl inline>∩</source> Intersection
<syntaxhighlight lang=apl inline>⍪</source> 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
<syntaxhighlight lang=apl inline>f/</source> (Reduction) Dyadic Reduction (Windowed Reduction)
<syntaxhighlight lang=apl inline>f\</source> (Scan) Dyadic Scan
<syntaxhighlight lang=apl inline>f¨</source> Each
<syntaxhighlight lang=apl inline>f⍨</source> Commute
<syntaxhighlight lang=apl inline>f⍣B</source> Power
<syntaxhighlight lang=apl inline>f⍣∘</source> Power Limit
<syntaxhighlight lang=apl inline>f⍣∘</source> Power Series
<syntaxhighlight lang=apl inline>f∘g</source> Composition (Beside)
<syntaxhighlight lang=apl inline>A∘g</source> Composition (Bind)
<syntaxhighlight lang=apl inline>f∘B</source>
<syntaxhighlight lang=apl inline>f⍢g</source> Dual
<syntaxhighlight lang=apl inline>∘.g</source> Function Table (Outer Product)
<syntaxhighlight lang=apl inline>A⍡</source> Convolution operator
<syntaxhighlight lang=apl inline>A∘/</source> Mask
<syntaxhighlight lang=apl inline>A∘\</source> Mesh
Direct definition
<syntaxhighlight lang=apl inline>∘∇B</source> Monadic
<syntaxhighlight lang=apl inline>A∇∘</source> Dyadic
<syntaxhighlight lang=apl inline>A∇B</source> Ambivalent

Other functionality

References


APL dialects [edit]
Maintained APL+WinAPL2APL64APL\ivApletteAprilCo-dfnsDyalog APLDyalog APL Visiondzaima/APLGNU APLKapNARS2000PometoTinyAPL
Historical A Programming LanguageA+ (A) ∙ APL#APL2CAPL\360APL/700APL\1130APL\3000APL.68000APL*PLUSAPL.jlAPL.SVAPLXExtended Dyalog APLIverson notationIVSYS/7090NARSngn/aplopenAPLOperators and FunctionsPATRowanSAXSHARP APLRationalized APLVisualAPL (APLNext) ∙ VS APLYork APL
Derivatives AHPLBQNCoSyELIGleeIIvyJJellyK (Goal, Klong, Q) ∙ KamilaLispLang5LilNialRADUiua
Overviews Comparison of APL dialectsTimeline of array languagesTimeline of influential array languagesFamily tree of array languages