numbl
v0.0.12
Published
Run .m source files in the browser and on the command line by compiling to JavaScript
Maintainers
Readme
Numbl
Numbl is an open-source numerical computing environment that aims to be compatible with Matlab. It works by compiling .m source code to JavaScript and executing it directly. It can work in the browser or on the command line.
Early stage project. Numbl is under active development and new functionality is being added regularly.
Try it in the browser
You can try numbl directly in the browser at https://magland.github.io/numbl — no installation required. All execution happens locally in your browser. Note that the browser version has limited functionality and is slower than the CLI.
Installation
npm install -g numblTo enable fast linear algebra (matrix inverse, SVD, eigenvalues, etc.), build the native LAPACK addon:
# Prerequisites: C++ compiler, libopenblas-dev, libfftw3-dev (or equivalents for your OS)
numbl build-addonUsage
numbl # interactive REPL
numbl run script.m # run a .m file
numbl eval "disp(eye(3))" # evaluate inline code
numbl info # print info (JSON), including native addon status
numbl list-builtins # list available built-in functions
numbl --help # show all commands and optionsTry it with Docker
Run the REPL instantly — no installation required:
docker run -it node:22 npx numblWith plotting support (open http://localhost:8234 in your browser):
docker run -it -p 8234:8234 node:22 npx numbl --plot-port 8234With native LAPACK support for fast linear algebra:
docker run -it node:22 bash -c "apt-get update && apt-get install -y libopenblas-dev libfftw3-dev && npx numbl build-addon && npx numbl"With both LAPACK and plotting:
docker run -it -p 8234:8234 node:22 bash -c "apt-get update && apt-get install -y libopenblas-dev libfftw3-dev && npx numbl build-addon && npx numbl --plot-port 8234"Upgrading
npm install -g numbl@latestNote: if you previously built the native addon, you'll need to run numbl build-addon again after upgrading.
Documentation
- Overview — What numbl is and how to use it
- Architecture — How the compiler pipeline works
- Adding built-in functions — How to contribute new built-ins
- Test scripts — Writing and running
.mintegration tests - Development — Setting up local development
- Performance — How numbl achieves computational efficiency
- Documentation guidelines — Conventions for writing docs
Authors
Jeremy Magland and Dan Fortunato, Center for Computational Mathematics, Flatiron Institute.
License
Apache 2.0.
Acknowledgements
See ACKNOWLEDGEMENTS.md.
