NoiseLang is a domain-specific language where every value is a probability distribution, enabling Monte Carlo simulations to be written as natural mathematical expressions. Born from a university signals-and-noise course nine years ago, it was recently completed with AI agent assistance. The language compiles to a DAG (RvGraph) with three backends: a columnar batch interpreter, a Cranelift JIT, and a WASM emitter. Performance optimizations include kernel fusion, xoshiro256++ PRNG inlined into kernels, and four independent RNG streams for out-of-order CPU overlap — achieving ~5.8 billion samples/second on an M4 Pro. Compared to NumPy, Stan, and PyMC, NoiseLang targets the whiteboard stage: write probability as math, get answers instantly in the browser with no setup, via an npm package backed by Rust compiled to WASM.

8m read timeFrom manualmeida.dev
Post cover image
Table of contents
Everything is a distributionWhy it sat for nine yearsBuilding the ambitious version with an agentOne IR, three backendsMaking the Monte Carlo loop cheapWhere Noise sitsBack to signals and noiseRun NoiseLang in the browser
211 Impressions