This is a collection of random small projects and demos, most of which can be run entirely in the web browser (client side). Many of them are centered around the numbl project.
Here's a proof of concept for running MATLAB syntax in Jupyter entirely client side (no kernel, no server). It uses numbl and JupyterLite.
Here are a couple of demonstrations of MCMC samplers that you can watch run. They use numbl (MATLAB syntax in the browser) to do the sampling client-side in the browser. In the case of WALNUTS (the within-orbit adaptive leapfrog No-U-Turn Sampler), we use the exact MATLAB code that is a companion to the paper.
Here are a couple of projects that let you embed or host your own numbl/MATLAB projects entirely client side.
Here are a couple of VS Code–style IDEs that run entirely in the browser: one for MATLAB syntax (via numbl), one for Stan.
Surfacefun is a MATLAB package for computing with functions defined on surfaces and solving PDEs on them to high order. Here are some examples that run surfacefun via numbl in the browser.
Chunkie is a MATLAB package for solving boundary integral equations in two dimensions. Here are some examples that run chunkie via numbl in the browser.
Here's a benchmark of matrix-matrix multiply (GEMM) in the browser across several implementations: a plain JavaScript loop, WebGPU, hand-written C compiled to WASM (SIMD and threads), and a real BLAS (libFLAME) compiled to WASM, with a native reference for comparison.
Here's a demo of reading large remote HDF5 files, such as NWB neurophysiology files, directly in the browser using HTTP range requests, with no full download and no backend. It shows the approach that neurosift uses to browse these files.
Here are a few projects on compressing scientific data: a step-by-step visualizer for the Asymmetric Numeral Systems (ANS) entropy-coding algorithm, a framework for benchmarking compression algorithms on scientific data arrays, and compression benchmarks for electrophysiology recordings.
Utilities and starting points for building your own numbl projects.
- numbl-figure-viewer (live). Open and explore a figure exported from numbl, including its underlying data.
- hitandrun-commonview (live). The hit-and-run figure with a single live view shared by all visitors over a WebRTC mesh; one peer runs the sampler via numbl and broadcasts to the rest.
- commonview (live). A minimal peer-to-peer page where every visitor shares one state (a counter): nostr discovery, a WebRTC mesh, and a central-peer authority. The basis for hitandrun-commonview.
- mesh-studio (live). Build CAD primitives or import STEP/IGES with OpenCASCADE.js, then inspect them in 3D — including each face's true NURBS surface (polynomials on faces), not just its triangulation.
- mesh-converter (live). Convert meshes between 19 formats (PLY, OBJ, STL, VTK, Gmsh, XDMF, …) with meshio running in-browser on Pyodide; inspect meshes in 3D and see what a lossy export would drop.
- qhull-wasm-demo (live). Demos and benchmarks for qhull-wasm, which compiles Qhull to WebAssembly. Includes 2-D Delaunay triangulation, 3-D convex hull, and a Delaunay benchmark with matching scripts for MATLAB, Octave, and numbl.
- numbl-distmesh (live). Every example from Persson and Strang's DistMesh, meshing 2-D regions and surfaces from signed distance functions.
- abc-step-1000 (live). The first 1000 STEP files from the ABC dataset of CAD models (Koch et al., CVPR 2019), served gzip-compressed with a JSON manifest for direct download.
- dandiset_000986 (visualizations). Reproducible figures and visualizations for DANDI Dandiset 000986, a set of mouse auditory cortex recordings.
- numbl-quantum-optics (live). Runnable scripts accompanying the article "Quantum optics in MATLAB" (arXiv:2309.14354), covering quantum states, operators, and dynamics.
- numbl-open-quantum-systems (live). Code from "Coding closed and open quantum systems in MATLAB" (arXiv:1911.04906), including Ising dynamics, cavity-QED phase transitions, and Lindblad and non-Markovian evolution.
- numbl-image-filter (live). Upload an image, write a MATLAB-syntax filter, and run it on the image in the browser.
- finite-field-visualizer (live). Color-coded multiplication tables over finite (prime) fields. Step through the primes to watch the structure change.
- gcd-visualizer (live). A heatmap of the greatest common divisor of every pair (i, j), laid out as a color-coded table.