Skip to content

abrudz/dyalog-apl-prime

Repository files navigation

Dyalog APL′ ("Prime")

"Prime" is intended as a rather minimal modification of Dyalog APL, but going back and correcting original design mistakes. This mostly regards being primary-axis oriented, but also applies to making the original operators consistent and making ⎕IO←0 forced. The goal is to make APL more appealing to the modern audience. That is, to bring APL into its prime.

Requires Dyalog APL version 17.1 or higher.

How to use

Initialisation

Replacing ns with your target namespace (e.g. #), do

]import ns path/prime

Running code

Now you have three options:

  1. Use the extensions directly with the glyph names.
  2. Use ns.prime.FIX as a drop in for ⎕FIX.
  3. Use ns.prime.Repl '' to start a (limited) self-contained session where the glyphs work. Enter to exit.
  4. Use ns.prime.Repl ref to start a (limited) session in the namespace ref. Enter to exit.

Breaking changes

Name Glyph Extension
BackSlashBar only expand first
CircleBackSlash monadic rotates axes
CircleBar disabled
CircleStile first axis
Comma , first axis
CommaBar increase rank/join
DelStile but dyadic sort-by
DeltaStile but dyadic sort-by
DownArrow enclose major cells
DownShoe on major cells
DownTack transposed and extend scalar
Epsilon on major cells
Iota noticing 1-element vector
IotaUnderbar ⎕IO←0 for monadic but ⎕IO←1 for dyadic
LeftShoe just ⎕IO
LeftShoeUnderbar on major cells
Plus + purely numeric
QuadDivide high rank
Query ? high rank
RightShoe just ⎕IO
SlashBar only replicate first
Squad but sane
Tilde ~ on major cells
UpShoe on major cells
UpTack transposed
_BackSlash \ scan first and outer product
_Diaeresis ¨ handling empty arrays with failing prototype
_JotDiaeresis_ but handling empties
_Slash / only reduce first