Ngn/apl: Difference between revisions
m (Text replacement - "Category:Bytecode compilers" to "Category:IR compilers") |
m (Text replacement - "</source>" to "</syntaxhighlight>") Tags: Mobile edit Mobile web edit |
||
Line 20: | Line 20: | ||
'''ngn/apl''' is an APL bytecode compiler and interpreter by [[Nick Nickolov]]. Because it is implemented in [[wikipedia:Javascript|Javascript]], it can be run in [[wikipedia:Node.js|Node.js]] or any modern browser. | '''ngn/apl''' is an APL bytecode compiler and interpreter by [[Nick Nickolov]]. Because it is implemented in [[wikipedia:Javascript|Javascript]], it can be run in [[wikipedia:Node.js|Node.js]] or any modern browser. | ||
ngn/apl supports most of the core language of [[Dyalog APL 14.0]],: [[dfn]]s (<source lang=apl inline>{⍺ ⍵}</ | ngn/apl supports most of the core language of [[Dyalog APL 14.0]],: [[dfn]]s (<source lang=apl inline>{⍺ ⍵}</syntaxhighlight>), [[nested array]]s, [[complex number]]s (<source lang=apl inline>1j2</syntaxhighlight>), [[Function train|forks and atops]], [[Multiple assignment|strand assignment]] (<source lang=apl inline>(a b)←c</syntaxhighlight>), [[indexed assignment]] (<source lang=apl inline>a[b]←c</syntaxhighlight>), and [[dop|user-defined operators]] (<source lang=apl inline>{⍺⍺ ⍵⍵}</syntaxhighlight>), but does not support [[Key]] (<source lang=apl inline>⌸</syntaxhighlight>), [[Rank (operator)|Rank (operator]] (<source lang=apl inline>⍤</syntaxhighlight>) [[tradfn]]s (<source lang=apl inline>∇R←X f Y</syntaxhighlight>), non-zero [[index origin]] (<source lang=apl inline>⎕IO←1</syntaxhighlight>), [[comparison tolerance]] (<source lang=apl inline>⎕CT</syntaxhighlight>), [[prototype]]s (it always uses zero as fill), [[modified assignment]] (<source lang=apl inline>x+←1</syntaxhighlight>), [[keyword]]s (<source lang=apl inline>:If</syntaxhighlight>), [[object-oriented programming]], or [[namespace]]s. It extends Dyalog APL with [[Infinity|infinities]] (<source lang=apl inline>¯</syntaxhighlight> or <source lang=apl inline>∞</syntaxhighlight>) and a few additoinal primitives. | ||
On December 27, 2020, Nickolov announced that he would discard his implementation.<ref>Nickolov, N. "ngn". [https://chat.stackexchange.com/transcript/message/56558504#56558504 Announcement]. [[APL Orchard]]. Stack Exchange chat.</ref> Soon after, [[Adám Brudzewsky]] took up the mantle of hosting the source and online demo.<ref>Brudzewsky, A. "Adám". [https://chat.stackexchange.com/transcript/message/56558600#56558600 Announcement]. [[APL Orchard]]. Stack Exchange chat.</ref> | On December 27, 2020, Nickolov announced that he would discard his implementation.<ref>Nickolov, N. "ngn". [https://chat.stackexchange.com/transcript/message/56558504#56558504 Announcement]. [[APL Orchard]]. Stack Exchange chat.</ref> Soon after, [[Adám Brudzewsky]] took up the mantle of hosting the source and online demo.<ref>Brudzewsky, A. "Adám". [https://chat.stackexchange.com/transcript/message/56558600#56558600 Announcement]. [[APL Orchard]]. Stack Exchange chat.</ref> |
Revision as of 22:10, 10 September 2022
ngn/apl is an APL bytecode compiler and interpreter by Nick Nickolov. Because it is implemented in Javascript, it can be run in Node.js or any modern browser.
ngn/apl supports most of the core language of Dyalog APL 14.0,: dfns (<source lang=apl inline>{⍺ ⍵}</syntaxhighlight>), nested arrays, complex numbers (<source lang=apl inline>1j2</syntaxhighlight>), forks and atops, strand assignment (<source lang=apl inline>(a b)←c</syntaxhighlight>), indexed assignment (<source lang=apl inline>a[b]←c</syntaxhighlight>), and user-defined operators (<source lang=apl inline>{⍺⍺ ⍵⍵}</syntaxhighlight>), but does not support Key (<source lang=apl inline>⌸</syntaxhighlight>), Rank (operator (<source lang=apl inline>⍤</syntaxhighlight>) tradfns (<source lang=apl inline>∇R←X f Y</syntaxhighlight>), non-zero index origin (<source lang=apl inline>⎕IO←1</syntaxhighlight>), comparison tolerance (<source lang=apl inline>⎕CT</syntaxhighlight>), prototypes (it always uses zero as fill), modified assignment (<source lang=apl inline>x+←1</syntaxhighlight>), keywords (<source lang=apl inline>:If</syntaxhighlight>), object-oriented programming, or namespaces. It extends Dyalog APL with infinities (<source lang=apl inline>¯</syntaxhighlight> or <source lang=apl inline>∞</syntaxhighlight>) and a few additoinal primitives.
On December 27, 2020, Nickolov announced that he would discard his implementation.[1] Soon after, Adám Brudzewsky took up the mantle of hosting the source and online demo.[2]
External link
- Compiling APL to JavaScript article in the Vector journal
- ngn/apl on REPL
- ngn/APL on Try It Online
- Online demo
- Online session
- Source code
References
- ↑ Nickolov, N. "ngn". Announcement. APL Orchard. Stack Exchange chat.
- ↑ Brudzewsky, A. "Adám". Announcement. APL Orchard. Stack Exchange chat.
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 |