APL.jl: Difference between revisions
(Created page with "This article needs to be populated from https://github.com/shashi/APL.jl") |
m (Julia→W) |
||
(6 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
{{Infobox array language | |||
| array model = [[wikipedia:Julia (programming language)|Julia]] | |||
| index origin = 1 | |||
| function styles = [[dfn]] | |||
| numeric types = 64-bit int, 64-bit float | |||
| unicode support = none | |||
| released = 2016 | |||
| developer = Shashi Gowda | |||
| implementation languages = [[wikipedia:Julia (programming language)|Julia]] | |||
| license = [https://github.com/shashi/APL.jl/blob/master/LICENSE.md MIT "Expat" License] | |||
| website = [https://github.com/shashi/APL.jl/blob/master/LICENSE.md github.com] | |||
| download = [https://github.com/shashi/APL.jl/archive/refs/heads/master.zip GitHub] | |||
| influenced by = [[wikipedia:Julia (programming language)|Julia]] | |||
| run online = [https://nbviewer.org/gist/shashi/9ad9de91d1aa12f006c4 Jupyter notebook] | |||
}} | |||
'''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 <code>apl""</code> 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.<ref>https://github.com/shashi/APL.jl#implementation-notes</ref> | |||
APL.jl can be used from <code>apl""</code>, and as a REPL triggered with <code>/</code> from within the Julia REPL. It can be built and installed from source in the REPL using the <code>Pkg</code> 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<ref>https://docs.juliahub.com/CalculusWithJulia/AZHbv/0.0.5/misc/unicode.html</ref> | |||
* Majority of basic primitives and overloads missing<ref>https://github.com/shashi/APL.jl/blob/master/src/defns.jl</ref> | |||
* Treatment of scalars as 1-element vectors | |||
* No method to create character arrays | |||
* Monadic <code>∘</code> is redefined for broadcasting (each left), no support for binding arguments | |||
* Absence of tradfns, dops, function trains | |||
* Incorrect stranding for nested arrays (<code>(1 2) (3 4)≡1 2 3 4</code>) | |||
* Lack of reshape for case where <code>(×/⍴⍵)≢×/⍺</code> | |||
* Addition of getIndex function <code>]</code><ref>https://github.com/shashi/APL.jl/blob/master/src/defns.jl#L103</ref> | |||
== External Links == | |||
* [https://www.youtube.com/watch?v=XVv1GipR5yU APL at Julia's Speed, JuliaConf 2016] | |||
== References == | |||
<references /> | |||
{{APL dialects}} | |||
[[Category:APL dialects]] |
Latest revision as of 08:25, 23 September 2022
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+Win ∙ APL2 ∙ APL64 ∙ APL\iv ∙ Aplette ∙ April ∙ Co-dfns ∙ Dyalog APL ∙ Dyalog APL Vision ∙ dzaima/APL ∙ GNU APL ∙ Kap ∙ NARS2000 ∙ Pometo ∙ TinyAPL |
Historical | A Programming Language ∙ A+ (A) ∙ APL# ∙ APL2C ∙ APL\360 ∙ APL/700 ∙ APL\1130 ∙ APL\3000 ∙ APL.68000 ∙ APL*PLUS ∙ APL.jl ∙ APL.SV ∙ APLX ∙ Extended Dyalog APL ∙ Iverson notation ∙ IVSYS/7090 ∙ NARS ∙ ngn/apl ∙ openAPL ∙ Operators and Functions ∙ PAT ∙ Rowan ∙ SAX ∙ SHARP APL ∙ Rationalized APL ∙ VisualAPL (APLNext) ∙ VS APL ∙ York APL |
Derivatives | AHPL ∙ BQN ∙ CoSy ∙ ELI ∙ Glee ∙ I ∙ Ivy ∙ J ∙ Jelly ∙ K (Goal, Klong, Q) ∙ KamilaLisp ∙ Lang5 ∙ Lil ∙ Nial ∙ RAD ∙ Uiua |
Overviews | Comparison of APL dialects ∙ Timeline of array languages ∙ Timeline of influential array languages ∙ Family tree of array languages |