Dyalog APL Extended
Extended domains of existing primitives/quad-names, and a few new ones. Requires Dyalog APL version 16.0 or higher.
This project serves as a breeding ground for ideas. While some have been adopted into Dyalog APL proper, it is unlikely that many will be. Furthermore, Dyalog 18.0 gave a different meaning to monadic ≠ than proposed here, leaving Extended Dyalog APL as a deadend. It spiritual successor of sorts is my Dyalog APL Vision.
These extensions are available on Try it Online, but can easily be used offline:
Replacing ns with your target namespace (e.g. #), do
]Load path/dyalog-apl-extended/* -target=ns
or17.0
]Link ns path/dyalog-apl-extended
or17.1
]Link.Create ns path/dyalog-apl-extended
Now you have three options:
- Use the extensions directly with the glyph names.
- Use
ns.Extended.FIXas a drop in for⎕FIX. - Use
ns.Extended.Repl ''to start a (limited) session where the glyphs work. Enter→to exit.
| Name | Glyph | Type* | Extension |
|---|---|---|---|
| BackSlash | \ |
🔶 | ∘.f when dyadic, allows short and/or multiple left args |
| BackSlashBar | ⍀ |
🔶 | ⊢∘f when dyadic, allows short and/or multiple left args |
| Bullet | ∙ |
🔺 | Inner product and Alternant |
| CircleDiaeresis | ⍥ |
🔺 | Over and Depth |
| CircleJot | ⌾ |
🔺 | Complex/Imaginary |
| DelDiaeresis | ⍢ |
🔺 | Under (a.k.a. Dual) |
| DelTilde | ⍫ |
🔺 | Obverse; ⍺⍺ but with inverse ⍵⍵ |
| Diaeresis | ¨ |
🔵 | allows constant operand |
| Divide | ÷ |
🔵 | monadic converts letters to title case when possible |
| DollarSign | $ |
🔺 | string enhancement ${1}:1⊃⍺, ${expr}:⍎expr, \n:JSON |
| DownArrow | ↓ |
🔵 | allows long ⍺ |
| DownShoe | ∪ |
🔵 | allows rank>1 |
| Downstile | ⌊ |
🔵 | monadic lowercases letters |
| DownTack | ⊤ |
🔶 | 2s as default left argument |
| Ellipsis | … |
🔺 | fill sequence gaps (dfns's to⍤1) |
| EpsilonUnderbar | ⍷ |
🔶 | monadic is Type ∊ with ⎕ML←0 |
| Equals | = |
🔶 | with TAO; monad: is-type |
| GreaterThan | > |
🔶 | with TAO; monad: is-strictly-negative/is-visible |
| GreaterThanOrEqualTo | ≥ |
🔶 | with TAO; monad: is non-positive/is-not-control-character |
| house | ⌂ |
🔺 | prefix for contents of dfns |
| infinity | ∞ |
🔺 | largest integer (for use with ⍤ and ⍣) |
| Iota | ⍳ |
🔵 | Unicode version of dfns's iotag |
| IotaUnderbar | ⍸ |
🔵 | allows duplicates/non-Booleans |
| IotaUnderbarInverse | ⍸⍣¯1 |
🔵 | given r, finds n so that r≡⍸n |
| JotDiaeresis | ⍤ |
🔵 | allows constant left operand, Atop with function right operand |
| JotUnderbar | ⍛ |
🔺 | reverse composition X f⍛g Y is (f X) g Y |
| LeftShoe | ⊂ |
🔵 | allows partitioning along multiple trailing axes, with short ⍺s, and inserting/appending empty partitions |
| LeftShoeStile | ⍧ |
🔺 | monad: nub-sieve; dyad: count-in |
| LeftShoeWithAxis | ⊂[k] |
🔵 | as ⊂, but called with left operand |
| LessThan | < |
🔶 | with TAO; monad: is-strictly-positive/is-control-character |
| LessThanOrEqualTo | ≤ |
🔶 | with TAO ; monad: is-non-negative/is-invisible |
| Minus | - |
🔵 | monadic flips letter case |
| macron | ¯ |
🔵 | as prefix to name or primitive means its inverse |
| negativeInfinity | ¯∞ |
🔺 | smallest integer (for use with ⍣) |
| Nand | ⍲ |
🔶 | monad: not all equal to type |
| Nor | ⍱ |
🔶 | monad: not any equal to type |
| NotEqualTo | ≠ |
🔶 | with TAO; monad: is-non-type |
| Percent | % |
🔺 | f% and A%: probability-logical function (mapping arrays) |
| 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 ⍺ |
| QuestionMark | ? |
🔵 | ⍺?¯⍵ as norm dist stddev ⍵ and optional mean ⍺←0 |
| Rho | ⍴ |
🔵 | allows omitting one dimension length with ¯1 |
| RightShoeUnderbar | ⊇ |
🔺 | monadic discloses if scalar, dyadic indexes sanely |
| RightShoeUnderbarWithAxis | ⊇[k] |
🔺 | as above, but called with left operand |
| Root | √ |
🔺 | (Square) Root |
| SemicolonUnderbar | ⍮ |
🔺 | (Half) Pair; use ↑⍤⍮ to add axis |
| Slash | / |
🔵 | allows short and/or multiple left args |
| SlashBar | ⌿ |
🔵 | allows short and/or multiple left args |
| StarDiaeresis | ⍣ |
🔵 | allows non-scalar right operand incl. ∞ and ¯∞ and array left operand |
| Stile | | |
🔵 | monadic normalises letters to lowercase (upper then lower) |
| StileTilde | ⍭ |
🔺 | monadic is factors; dyadic depends on ⍺: 0=non-prime?, 1=prime?, ¯1=primes less than ⍵, ¯2=⍵th prime, 4=next prime, ¯4=prev prime |
| Tilde | ~ |
🔵 | monadic allows probabilities, dyadic allows rank>1 |
| TildeDiaeresis | ⍨ |
🔵 | allows constant operand |
| Times | × |
🔵 | set/query letter case (lower: ¯1, title: 0, upper: 1) |
| UpArrow | ↑ |
🔵 | allows long ⍺ |
| UpShoe | ∩ |
🔶 | monadic is self-classify; dyadic allows rank>1 |
| Upstile | ⌈ |
🔵 | monadic uppercases letters |
| UpTack | ⊥ |
🔶 | 2 as default left argument |
| Vel | ∨ |
🔶 | monadic is Descending Sort |
| Wedge | ∧ |
🔶 | monadic is Ascending Sort |
| ∆C | ⎕C |
🔺 | fn ⎕C applies case-insensitively, array ⎕C case-folds |
| ∆EM | ⎕EM |
🔺 | Self-inverse ⎕EM |
| ∆NS | ⎕NS |
🔵 | allows ⎕NS names values (tries to resolve ⎕ORs) |
| ∆NSinverse | ⎕NS⍣¯1 |
🔺 | allows (names values)←⎕NS⍣¯1⊢ns (returns ⎕ORs for ns/fns) |
| ∆UCS | ⎕UCS |
🔵 | scalar when monadic |
* 🔺 means new feature 🔶 means added valence 🔵 means expanded domain
17.0 Requires Dyalog APL version 17.0
17.1 Requires Dyalog APL version 17.1