λab (a.k.a. LambdaLab) is an interactive λ-calculus interpreter for learning.
λab is written in TypeScript and has a command-line interface and a Web-based visual interface. To get started with both, you'll need Node. First, clone the repository. Then you'll need to compile the source to JavaScript.
You can get the TypeScript compiler and other dependencies from npm
by typing npm install
or just yarn
if you have that.
To build the Web interface, type npm run build-web
or yarn run build-web
. This will create a webpacked JavaScript bundle called lambdalab.bundle.js
. Open the index.html
file in your browser.
The main <script>
for the Web interface is lambdalab.ts
.
To build the command-line version, type npm run build-cli
or yarn run build-cli
. Use node build/lc.js
to run the script directly. Or type npm link
or yarn link
to symlink an lc
executable; then, as long as the right directory is on your $PATH
, you can just type lc
.
The main entry point for the CLI tool is lc.ts
.
Use yarn test
or npm test
to build the source for the tests and run them.