AviFS / ngn-apl

An APL interpreter written in JavaScript. Runs in a browser or NodeJS.

Home Page:https://abrudz.github.io/ngn-apl/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

This is an archive of ngn/apl

Its author thinks it has served its purpose and has become a distraction. Most of his free time now is devoted to creating a free implementation of K6 and he encourages people to use that instead.


Demo

An APL interpreter written in JavaScript. Runs in a browser or NodeJS.

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 ({⍺⍺ ⍵⍵}).

Doesn't support: tradfns (∇R←X f Y), non-zero index origin (⎕IO), comparison tolerance (⎕CT), prototypes, modified assignment (x+←1), control structures (:If), object-oriented features, namespaces.

Used in Paul L Jackson's web site, repl.it, and tio.run.

Offline usage

Run apl.js with Node to start a REPL:

node apl.js

An APL script can be given as argument:

node apl.js filename.apl

apl.js can be require()d as a CommonJS module from JavaScript:

var apl=require('./apl')
var r=apl('1 2 3+4 5 6')

or used in an HTML page:

<script src='apl.js'></script>
<script>var r=apl('1 2 3+4 5 6')</script>

Editor support

About

An APL interpreter written in JavaScript. Runs in a browser or NodeJS.

https://abrudz.github.io/ngn-apl/

License:MIT License


Languages

Language:JavaScript 69.4%Language:APL 29.0%Language:HTML 1.7%