laskin
v1.4.0
Published
Implementation of Laskin programming language in JavaScript
Downloads
3
Maintainers
Readme
Laskin.js
Rewrite of Laskin calculator tool / programming language in JavaScript, since I couldn't get it to compile into WebAssembly.
Has 99% of the features that the original one has, with 2 times uglier codebase. It works both in Node.js and Web browsers.
Installation
$ npm install laskin
Usage
import { Context } from 'laskin';
// Create new execution context.
const c = new Context();
// Execute some Laskin source code inside the context.
c.exec('15 dup * .');
// By default all lines are outputted with `console.log` function, but this
// behavior can be overridden by giving a second argument to the `exec` method.
c.exec(
'", " 1 11 range join .',
(line) => process.stderr.write(`${line}\n`)
);