Ngn/apl: Difference between revisions

From APL Wiki
Jump to navigation Jump to search
Miraheze>Adám Brudzewsky
No edit summary
m (Typo)
(27 intermediate revisions by 6 users not shown)
Line 1: Line 1:
{{DISPLAYTITLE:ngn/apl}}
{{DISPLAYTITLE:ngn/apl}}{{Infobox array language
{{Infobox array language
| logo                    = [[File:Ngn-apl logo.png]]
| title                    = ngn/apl
| title                    = ngn/apl
| array model              = [[nested array model|nested]]
| array model              = [[nested array model|nested]]
| index origin            = 0
| index origin            = 0
| function styles          = [[dfn]], [[tacit]]
| function styles          = [[dfn]], [[tacit]]
| numeric types            = complex floats
| numeric types            = [[complex]] floats
| unicode support          = full
| unicode support          = full
| released                = 2011
| released                = 2011
Line 11: Line 11:
| latest release version  = 2018 (unversioned)
| latest release version  = 2018 (unversioned)
| implementation language  = [[wikipedia:Javascript|Javascript]]
| implementation language  = [[wikipedia:Javascript|Javascript]]
| source                  = [https://github.com/abrudz/ngn-apl/ GitHub]
| platforms                = In-browser, [[wikipedia:Node.js|Node.js]]
| platforms                = In-browser, [[wikipedia:Node.js|Node.js]]
| license                  = [[wikipedia:MIT_License|MIT]]
| license                  = [[wikipedia:MIT_License|MIT]]
| website                  = [https://gitlab.com/n9n/apl gitlab.com/n9n/apl]
| website                  = [https://github.com/abrudz/ngn-apl/ github.com/abrudz/ngn-apl]
| influenced by            = [[Dyalog APL]]
| influenced by            = [[Dyalog APL]]
| run online              = [https://repl.it/languages/APL REPL]
| run online              = [https://abrudz.github.io/ngn-apl/web/ In-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.


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 of the core language of [[Dyalog APL 14.0]],: [[dfn]]s (<syntaxhighlight lang=apl inline>{⍺ ⍵}</syntaxhighlight>), [[nested array]]s, [[complex number]]s (<syntaxhighlight lang=apl inline>1j2</syntaxhighlight>), [[Function train|forks and atops]], [[Multiple assignment|strand assignment]] (<syntaxhighlight lang=apl inline>(a b)←c</syntaxhighlight>), [[indexed assignment]] (<syntaxhighlight lang=apl inline>a[b]←c</syntaxhighlight>), and [[dop|user-defined operators]] (<syntaxhighlight lang=apl inline>{⍺⍺ ⍵⍵}</syntaxhighlight>), but does not support [[Key]] (<syntaxhighlight lang=apl inline>⌸</syntaxhighlight>), [[Rank (operator)|Rank (operator]] (<syntaxhighlight lang=apl inline>⍤</syntaxhighlight>) [[tradfn]]s (<syntaxhighlight lang=apl inline>∇R←X f Y</syntaxhighlight>), non-zero [[index origin]] (<syntaxhighlight lang=apl inline>⎕IO←1</syntaxhighlight>), [[comparison tolerance]] (<syntaxhighlight lang=apl inline>⎕CT</syntaxhighlight>), [[prototype]]s (it always uses zero as fill), [[modified assignment]] (<syntaxhighlight lang=apl inline>x+←1</syntaxhighlight>), [[keyword]]s (<syntaxhighlight lang=apl inline>:If</syntaxhighlight>), [[object-oriented programming]], or [[namespace]]s. It extends Dyalog APL with [[Infinity|infinities]] (<syntaxhighlight lang=apl inline>¯</syntaxhighlight> or <syntaxhighlight lang=apl inline>∞</syntaxhighlight>) and a few additional primitives.
 
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>), [[control structure|Keywords]] (<source lang=apl inline>:If</source>), [[object-oriented features|Object orientated programming]], [[namespace]]s.


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>
[[File:Ngn/apl|center|thumb|ngn/apl's [https://abrudz.github.io/ngn-apl/web/ 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]]
* [https://n9n.gitlab.io/apl/web/index.html Online demo]
* [https://repl.it/languages/APL ngn/apl on REPL]
* [https://tio.run/#apl-ngn ngn/APL on Try It Online]
* [https://abrudz.github.io/ngn-apl/web/ Online demo]
* [https://plj541.github.io/APL.js/ Online session]
* [https://plj541.github.io/APL.js/ Online session]
* [https://repl.it/languages/APL Online REPL]
* [https://github.com/abrudz/ngn-apl/ Source code]
* [https://tio.run/#apl-ngn Try It Online]
== References ==
* [https://gitlab.com/n9n/apl Source code]
<references/>
 
{{APL dialects}}[[Category:APL dialects]][[Category:Nested array languages]][[Category:Leading axis languages]][[Category:Languages with tacit programming]][[Category:IR compilers]]
{{APL dialects}}

Revision as of 09:54, 22 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 ({⍺ ⍵}), nested arrays, complex numbers (1j2), forks and atops, strand assignment ((a b)←c), indexed assignment (a[b]←c), and user-defined operators ({⍺⍺ ⍵⍵}), but does not support Key (), Rank (operator () tradfns (∇R←X f Y), non-zero index origin (⎕IO←1), comparison tolerance (⎕CT), prototypes (it always uses zero as fill), modified assignment (x+←1), keywords (:If), object-oriented programming, or namespaces. It extends Dyalog APL with infinities (¯ or ) and a few additional 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

References

  1. Nickolov, N. "ngn". Announcement. APL Orchard. Stack Exchange chat.
  2. Brudzewsky, A. "Adám". Announcement. APL Orchard. Stack Exchange chat.
APL dialects [edit]
Maintained APL+WinAPL2APL64APL\ivApletteAprilCo-dfnsDyalog APLDyalog APL Visiondzaima/APLGNU APLKapNARS2000Pometo
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