APL.jl

From APL Wiki
Jump to navigation Jump to search


APL.jl is a toy dialect of APL made for interfacing with the Julia language.

Implementation

APL.jl works on a minor subset of APL that allows the compiler to parse and translate APL code into Julia code. Due to this, APl.jl always returns Julia data. Dfns defined using APl.jl can hence be used directly in Julia code like ordinary functions.

The apl"" string macro parses and evaluates an APL expression. The parser works on the reverse of the APL code, using the help of concatenation rules to recognize the syntax of the expression.[1]

APL.jl can be used from apl"", and as a REPL triggered with / from within the Julia REPL. It can be built and installed from source in the REPL using the Pkg library.

Differences from APL

The following is a non-exhaustive list of differences from modern APL.

  • Unicode symbols used are not from Miscellaneous Technical block, are instead borrowed from Julia's set[2]
  • Majority of basic primitives and overloads missing[3]
  • Treatment of scalars as 1-element vectors
  • No method to create character arrays
  • Monadic is redefined for broadcasting (each left), no support for binding arguments
  • Absence of tradfns, dops, function trains
  • Incorrect stranding for nested arrays ((1 2) (3 4)≡1 2 3 4)
  • Lack of reshape for case where (×/⍴⍵)≢×/⍺
  • Addition of getIndex function ][4]

External Links

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