Dyalog APL Vision

From APL Wiki
Revision as of 22:48, 20 April 2023 by Adám Brudzewsky (talk | contribs) (Created page with "{{Infobox array language | title = Dyalog APL Vision | array model = nested | index origin = 0 or 1 | function styles = tradfn, dfn, tacit | numeric types = complex floats, decimal floats | unicode support = full | released = 2023 | latest release version = unversioned/2023-04-21 | developer = Adám Brudzewsky | implemen...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Dyalog APL Vision continues the role of Extended Dyalog APL, but tries to provide realistic extensions of Dyalog APL rather than simply extending the language as much as possible. It extends the domains of existing primitives and quad names and adds a few new ones.

Features

All scalar functions support leading axis agreement.

  • All set functions support arguments of any rank.
  • ⎕C and monadic ⎕UCS are scalar functions.
  • In addition, the following is included:
Name Symbol Type* Extension Examples
Circle Diaeresis 🔵✅ Depth when right operand is array. This is similar to Rank () but applies at nesting level. f⍥0 applies f like a scalar function and f⍥1 applies to flat subarrays. f⍤1⍥1 applies to flat vectors.
Del Diaeresis 🔺 Under (a.k.a. Dual). Like f⍥g but conceptually inverts the right operand when done. If g is a selection function, it puts the data back where it came from -⍢(2 3∘⊃) negates the 2nd element's 3rd element.
Del Tilde 🔺 Obverse; ⍺⍺ but with inverse ⍵⍵ ×⍢(FFT⍫iFFT)
Dollar Sign $ 🔺 string enhancement ${1}:1⊃⍺, ${expr}:⍎expr, \n:JSON 'Dyer' 'Bob'$'Hi, ${2} ${1}!
$'Hi, ${first} ${last}!
$'2×3=${2×3}'
Down Arrow 🔵 dyad allows long 0 1↓'abc' gives 1 2⍴'bc'
Down Tack ⊥⍣¯1 when left argument is scalar 2⊤123 gives 1 1 1 1 0 1 1
Epsilon Underbar 🔶 monad: Type (like with ⎕ML←0) ⍷1'a'# gives 0' '#'
Greater Than > 🔵 monad: sort descending <3 1 4 1 5 gives 5 4 3 1 1
Jot Underbar 🔺✅ reverse composition X f⍛g Y is (f X) g Y and default argument ⌽⍛≡ checks for palindromes.
a-⍛↑b takes the last a from b.
Left Shoe 🔵 dyad allows partitioning along multiple leading axes (⊂1 1)⊂matrix separates out the first row and column.
Left ShoeUnderbar 🔵 dyad allows partitioning along multiple leading axes (⊂1 0 1 1)⊆4 4⍴⎕A splits off the first row and column, and removes the second.
Less Than < 🔵 monad: sort ascending <3 1 4 1 5 gives 1 1 3 4 5
Quad Equal 🔵 allow array operand to be vocabulary (then uses {⊂⍵} as internal operand) ≢¨'ACGT'⌸'ATT-ACA' gives 3 1 0 2
QuadDiamond 🔶 auto-extended ⍵⍵, allows small , optional edge spec(s) (0:Zero; 1:Repl; 2:Rev; 3:Mirror; 4:Wrap; -:Twist) with masks as operand's Life on a cylinder: 0 4 Life⌺3 3
Rho 🔵 dyad: negatives reverse axis, 0.5 auto-size rounding down, 1.5 auto-size rounding up, 2.5 auto-size with padding Reshape into two columns: 0.5 2⍴data
Right ShoeUnderbar 🔺✅ monad: last (⊃⌽,⍵)
dyad: select (⌷⍨∘⊃⍨⍤0 99)
3 1 2⊇'abc' gives 'cab'
Root 🔺 (Square) Root √25 gives 5
3√27 gives 3
Up Arrow 🔵 allows long 2 3↑4 5 gives 2 3⍴4 5 0 0 0 0
Vel 🔶 monad: demote (,[⍳2]) ∨2 3 4⍴⎕A gives 6 4⍴⎕A
Wedge 🔶 monad: promote (⍵⍴⍨1,⍴⍵) 'ABC'⍪⍥∧'DEF' gives 2 3⍴⎕A
Error Message ⎕EM 🔵 Self-inverse ⎕EM ⎕EM'RANK ERROR' 'WS FULL' gives 4 1
Namespace ⎕NS 🔵 Accepts ref left arg. Name Set: The list of values to copy into the new/target namespace can have 2-element name-value vectors, setting the name to the given value ref←⎕NS('Abe' 10)('Bea' 12)
ref⎕NS⊂'Carl' 8
Name Get ⎕NG 🔺 Dereference name, optionally with fallback value for when undefined ref⎕NG'Bea' 'Abe'
Signal Event ⎕SIGNAL 🔵 Allows ⎕DMX-style ref argument ⎕SIGNAL ⎕DMX
  •  🔺 new feature 🔶 added valence 🔵 expanded domain ⚠ breaking change ✅ scheduled for 20.0 (except monadic )


APL dialects [edit]
Maintained APL+WinAPL2APL64APL\ivApletteAprilCo-dfnsDyalog APLDyalog APL Visiondzaima/APLGNU APLKapNARS2000Pometo
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