Ngn/apl: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
(add demo) |
||
Line 1: | Line 1: | ||
{{DISPLAYTITLE:ngn/apl}} | {{DISPLAYTITLE:ngn/apl}}{{Infobox array language | ||
{{Infobox array language | |||
| title = ngn/apl | | title = ngn/apl | ||
| array model = [[nested array model|nested]] | | array model = [[nested array model|nested]] | ||
Line 18: | Line 17: | ||
| run online = [https://repl.it/languages/APL REPL] | | run online = [https://repl.it/languages/APL REPL] | ||
}} | }} | ||
An APL interpreter written Nick Nickolov in JavaScript, making it run in a under Node.js or in any modern browser. | An APL interpreter written Nick Nickolov in JavaScript, making it run in a under Node.js or in any modern browser. | ||
ngn/apl supports most primitives, [[dfn]]s (<source lang=apl inline>{⍺ ⍵}</source>), [[nested array]]s, [[complex number]]s (<source lang=apl inline>1j2</source>), [[Infinity|infinities]] (<source lang=apl inline>¯</source> or <source lang=apl inline>∞</source>), [[Function train|forks and atops]], [[Multiple assignment|strand assignment]] (<source lang=apl inline>(a b)←c</source>), [[indexed assignment]] (<source lang=apl inline>a[b]←c</source>), [[dop|user-defined operators]] (<source lang=apl inline>{⍺⍺ ⍵⍵}</source>), but does not support [[tradfn]]s (<source lang=apl inline>∇R←X f Y</source>), non-zero [[index origin]] (<source lang=apl inline>⎕IO</source>), [[comparison tolerance]] (<source lang=apl inline>⎕CT</source>), [[prototype]]s, [[modified assignment]] (<source lang=apl inline>x+←1</source>), [[keyword]]s (<source lang=apl inline>:If</source>), [[object-oriented programming]], [[namespace]]s. | ngn/apl supports most primitives, [[dfn]]s (<source lang=apl inline>{⍺ ⍵}</source>), [[nested array]]s, [[complex number]]s (<source lang=apl inline>1j2</source>), [[Infinity|infinities]] (<source lang=apl inline>¯</source> or <source lang=apl inline>∞</source>), [[Function train|forks and atops]], [[Multiple assignment|strand assignment]] (<source lang=apl inline>(a b)←c</source>), [[indexed assignment]] (<source lang=apl inline>a[b]←c</source>), [[dop|user-defined operators]] (<source lang=apl inline>{⍺⍺ ⍵⍵}</source>), but does not support [[tradfn]]s (<source lang=apl inline>∇R←X f Y</source>), non-zero [[index origin]] (<source lang=apl inline>⎕IO</source>), [[comparison tolerance]] (<source lang=apl inline>⎕CT</source>), [[prototype]]s, [[modified assignment]] (<source lang=apl inline>x+←1</source>), [[keyword]]s (<source lang=apl inline>:If</source>), [[object-oriented programming]], [[namespace]]s. | ||
[[File:Ngn/apl|center|thumb|ngn/apl's demo interface]] | |||
== External link == | == External link == | ||
* [http://archive.vector.org.uk/art10501160 ''Compiling APL to JavaScript''] article in the [[Vector Journal]] | * [http://archive.vector.org.uk/art10501160 ''Compiling APL to JavaScript''] article in the [[Vector Journal]] |
Revision as of 23:38, 6 January 2020
An APL interpreter written Nick Nickolov in JavaScript, making it run in a under Node.js or in any modern browser.
ngn/apl supports most primitives, dfns ({⍺ ⍵}
), nested arrays, complex numbers (1j2
), infinities (¯
or ∞
), forks and atops, strand assignment ((a b)←c
), indexed assignment (a[b]←c
), user-defined operators ({⍺⍺ ⍵⍵}
), but does not support tradfns (∇R←X f Y
), non-zero index origin (⎕IO
), comparison tolerance (⎕CT
), prototypes, modified assignment (x+←1
), keywords (:If
), object-oriented programming, namespaces.
External link
- Compiling APL to JavaScript article in the Vector Journal
- Online demo
- Online session
- Online REPL
- Try It Online
- Source code
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 |