proof-of-concept
Concept Collection#
This is a collection of small projects, experiments, and demos, most of which run entirely in the web browser (client side). Many of them are centered around the numbl project. Things here are meant to show that an approach works, not to be finished software; projects that have grown into polished, generally useful tools live in tools.
Interactive numerical methods#
Methods from the numerical literature that you can watch run and adjust, computed client side by numbl (MATLAB syntax in the browser).
- hitandrun-interactive · live · the hit-and-run MCMC sampler
- walnuts-interactive · live · the WALNUTS sampler, running the paper's own companion MATLAB code
- barycentric-rational · live · Floater-Hormann rational interpolation, pole-free on any nodes; the method is a MATLAB script you edit in the page
numbl tooling: Jupyter, embedding, IDEs#
Ways to write, run, and share MATLAB-syntax code in the browser, all client side (plus a Stan variant of the IDE).
- jupyterlite-numbl-kernel · live · MATLAB syntax in Jupyter, no kernel server
- numbl-embed-example · live · embed numbl in your own page
- numbl-project-example · live · host a numbl project as a static site
- numbl-web-ide · live · a VS Code–style IDE for MATLAB syntax
- stan-web-ide · live · the same IDE for Stan
surfacefun & chunkie examples#
Surfacefun (functions and PDEs on surfaces) and chunkie (boundary integral equations in 2D) are MATLAB packages; these examples run them in the browser via numbl.
- numbl-surfacefun-intro · live
- surfacefun-interactive · live
- mesh-pde-solver · live
- numbl-chunkie · live
MRI pulse sequences#
Pulseq is an open framework for defining MRI pulse sequences. Here you can write pulseq sequences in MATLAB syntax and run them in the browser via numbl to generate a .seq file, upload and interactively explore an existing one, or simulate one on a digital phantom to see the raw k-space it acquires.
- seqlab · live
- mri-scanner · live
Spherical harmonics on the GPU#
Here are spherical harmonic transforms reimplemented from scratch as WebGPU compute shaders, modeled on SHTNS, together with a live reaction-diffusion solver built on them: Turing patterns forming on a sphere, with diffusion handled implicitly in spectral space where the Laplace-Beltrami operator is diagonal. turing-surface extends the solver from the round sphere to closed surfaces given by spherical-harmonic embeddings, and turing-surface-cache narrows it to a discrete menu of parameter choices whose solutions at a chosen end time are shared between all visitors through a cloud cache.
Browser compute benchmarks#
How fast the browser can crunch numbers.
- math-webgpu-sandbox · live · MATLAB-syntax scripts compiled to fused WebGPU kernels, timed with the script's own
tic/toc; paste the same script into real MATLAB to compare - matmul-bench · live · GEMM in plain JavaScript, WebGPU, SIMD and threaded WASM, and a WASM BLAS, with a native reference
Lazy reading of remote HDF5 files#
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.
Scientific data compression#
Here are a few projects on compressing scientific data: a step-by-step visualizer for the Asymmetric Numeral Systems (ANS) entropy-coding algorithm, an interactive study of how compressible quantized noisy time series are, a framework for benchmarking compression algorithms on scientific data arrays, and compression benchmarks for electrophysiology recordings.
- ans-visualizer · live
- timeseries-compressibility · live
- benchcompress · results · paper (WIP)
- ephys_compression_tests · results
Speech to text in the browser#
Here's a dictation notepad that transcribes as you speak and never sends your audio anywhere: Whisper and Moonshine run locally via transformers.js, on WebGPU where it's available. The transcript accumulates into a document you can edit and copy.
Other projects#
Peer-to-peer shared state#
- commonroom-recorder (run with npx). Command-line bot that joins a commonroom call as a visible muted participant and records each participant's audio (plus the chat) to files for transcription.
- commoncall (live). Serverless video calls: enter an ID, see who else is on the page, and call them — call setup rides over nostr relays, media flows peer-to-peer via WebRTC.
- 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.
Geometry, meshing & PDE solvers#
- fastandaccurate (live). Speed and accuracy benchmarks for PDE solvers: problems posed in the continuum with exact ground truth, compared by work-precision curves, runnable in the browser or from the command line, with results submitted by pull request.
- 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.
Neurophysiology data & remote access#
- dandiset_000986 (visualizations). Reproducible figures and visualizations for DANDI Dandiset 000986, a set of mouse auditory cortex recordings.
Physics & quantum systems#
- mri-spins (live). Interactive MRI physics: a 3D sample of spins evolving under the Bloch equations, with RF pulses, gradients, relaxation, a live signal trace, and a spoiled gradient echo sequence with scanner-like gradient sounds.
- acoustic-scattering-2d (live). Sound scattering off a room, a disk, slits, or a lens, solved live on the GPU; the solver and the medium are MATLAB you can edit in the page. Drop a microphone anywhere and listen back.
- acoustic-scattering-3d (live). The same physics in three dimensions: spheres, a circular aperture, or a random medium, volume-rendered with a clip plane to see inside, microphone included.
- dulcimer (live). A plucked string and the box it sounds over, as two coupled wave equations in editable MATLAB compiled to WebGPU. Render a note and listen to it.
- 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.
Image processing#
- numbl-image-filter (live). Upload an image, write a MATLAB-syntax filter, and run it on the image in the browser.
Number theory & visual math#
- 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.
- random-points-in-disk (live). How many random points does it take before a disk looks like a disk? Voxel-density heatmaps of uniform random sampling, next to the 1/√μ noise prediction.
-
Explicit nonlinear FEM simulation of struck cymbals (shallow shell, DKT/CST, JAX)
-
Browser companion of cymsim: struck-cymbal FEM on WebGPU with a YAML/form editor, live spectrogram and playback
-
FPUT chain with bending stiffness and a dome: a gong-like cascade to high frequencies, and bloom versus chaos; browser app with sound
-
Struck FPUT chain: energy cascade to high modes and the onset of chaos; browser app with sound
-
Small models for studying when struck nonlinear systems turn chaotic, starting with two coupled oscillators; browser app with sound
-
Toy cymbal: a 2D FPUT bead sheet with bending and a dome, where hard strikes bloom and turn chaotic; browser app with sound
-
Linear modes of a cymsim cymbal and how the nonlinear cascade moves energy between them
-
Place a cymsim cymbal in a 3D scene and compute its sound anywhere (viewer done, room solver not yet)
-
Can you hear the phase? A perceptual test of tones with identical harmonic amplitudes but different phases
-
Sound of a hanging steel sheet: nonlinear plate simulation with WebGPU
-
fmm3dbie's interior Helmholtz impedance solver ported to WebGPU in single precision, as an interactive web app
-
GPU (CUDA) implementation of fmm3dbie's interior Helmholtz impedance solver, compared with fmm3dbie on a room with absorbing walls
-
Design a cymsim cymbal in the browser, play it from the keyboard in real time, and export the hits for the full nonlinear render
-
Plate and cymbal strike simulator: modal linear model and GPU von Karman model on one grid
-
Phone browser recorder that saves raw 16-bit WAV takes
-
Plate dynamics lab 2: a hammer striking a small metal plate hung from a thread, by Rayleigh-Ritz and by Mindlin-Reissner finite elements, both modal, compared side by side, solved by MATLAB source running in numbl in the browser
-
Plate dynamics lab: how a metal plate on a thread, on pads, in a vise or in the hand swings, rings and sounds under gravity, solved by MATLAB source running in the browser with a WebGPU time loop
-
Can you hear the phase? Subband phase rotation of arbitrary sounds with identical subband envelopes
-
Interactive thin-plate mechanics lab: vibration, stress and radiated sound of a struck metal plate, solved by MATLAB source running in the browser via numbl
-
Instruments as files: parameter spec plus raw WebGPU programs for precomputing a room and rendering audio from it
-
Benchmark matrix-matrix multiply in the browser: JS, WebGPU, custom C WASM, and libFLAME/BLIS WASM (single + multi-threaded), vs native OpenBLAS
-
Live demo of minwebide: a minimalistic web IDE built from VS Code's own source
-
Run Stan sampling in your browser — a minwebide app
-
Run MATLAB-syntax .m files in your browser with numbl — a VS Code-style web IDE built on minwebide
-
Organization profile and shared community health files
-
libflame (LAPACK) + BLIS compiled to WebAssembly with Emscripten — reproducible build scripts
-
Interactive illustration of Floater and Hormann's barycentric rational interpolants (Numer. Math. 107, 2007), with the method as an editable numbl script
-
Filter images in the browser with a numbl (MATLAB-syntax) script
-
Serverless peer-to-peer video calls in the browser — presence and call setup over nostr relays, media over WebRTC
-
Benchmark compression algorithms for numeric arrays
-
Serverless P2P messaging demo — text + large binary over Trystero/Nostr (Vite + React + TS)
-
Demo: lazy reading of remote HDF5/NWB files in the browser (the technology behind neurosift)
-
The hit-and-run sampling figure with one shared view for all visitors: WebRTC mesh, central peer runs the MATLAB sampler via numbl
-
Unbiased Monte-Carlo estimation of the entropy of a quantized filtered Gaussian time series
-
A plucked string and its resonating box, simulated as two coupled wave equations (MATLAB compiled to WebGPU) in the browser
-
3D acoustic scattering solved live in the browser: a WebGPU leapfrog on a cubic grid, viewed by volume ray marching
-
2D acoustic scattering solved live in the browser: MATLAB compiled to WebGPU compute kernels
-
Reaction-diffusion (Turing patterns) on closed surfaces given by spherical-harmonic embeddings, solved live in the browser on WebGPU
-
Test data for turing-surface - to be included as a git submodule
-
Interactive exploration of how compressible quantized time series are
-
MATLAB-syntax scripts compiled to fused WebGPU kernels — tic/toc timing you can compare with real MATLAB
-
Reaction-diffusion (Turing patterns) on the sphere, solved live in the browser with spherical harmonics on WebGPU
-
Voice dictation in the browser: live speech-to-text that runs entirely on your own machine, with no server
-
Reaction-diffusion on the sphere: the solver is MATLAB, lowered by numbl in the browser and compiled to WebGPU compute kernels
-
Spherical harmonic transforms on WebGPU (fp32), modeled on SHTNS
-
Upload a pulseq .seq file, run a Bloch simulation on a digital phantom in the browser, and view the raw k-space. Companion to seqlab.
-
Write and view pulseq MRI pulse sequences in the browser, executed on numbl
-
Interactive 3D MRI spin physics demo
-
Run numbl (MATLAB-syntax numerical computing) in JupyterLite notebooks, entirely in the browser
-
How many random points does it take before a disk looks like a disk? Voxel-density heatmaps of uniform random sampling.
-
First 1000 STEP files from the ABC dataset, hosted on GitHub Pages
-
some stan examples for developing stan web interfaces
-
Interactive numbl companion to DistMesh — all README examples runnable in the browser
-
Shows how to embed a numbl view in markdown or HTML
-
1D Scattering from Springs on a String using the Windowed Fourier Projection Method
-
Companion to 'Quantum optics in MATLAB' (arXiv:2309.14354): runnable numbl scripts, deployed in-browser via GitHub Pages.
-
Companion to 'Coding closed and open quantum systems in MATLAB' (arXiv:1911.04906): runnable numbl scripts, deployed in-browser via GitHub Pages.
-
Interactive introduction to surfacefun, running in the browser via numbl
-
Example numbl project deployed to GitHub Pages (interactive in-browser IDE)