// the find
sharkdp/numbat
A statically typed programming language for scientific computations with first class support for physical dimensions and units
Numbat is a calculator language where physical units are part of the type system — writing `30 km/h * 2 h` gives you `60 km`, and trying to add meters to seconds is a compile error. It's aimed at engineers, scientists, and anyone who does back-of-envelope calculations and has been burned by unit confusion. There's a REPL, a WASM web playground, and a standard library covering SI, Imperial, astronomical, and more.
Physical dimensions as types is the real differentiator: the type checker catches `speed + distance` the same way it would catch a type mismatch in any statically typed language, before you run anything. The standard library is written in Numbat itself, so adding a unit is one line and the whole system is inspectable rather than magic. Error messages are a genuine priority — the repo has a dedicated screenshot for them and the parse philosophy is strict (no silent best-guess recovery). The WASM build means zero-install for quick use, and it's actually maintained with a live site at numbat.dev.
It's a calculator, not a programmable language — no loops, no I/O beyond print, no ability to pull in external data. If you want to script a unit-aware computation that reads a CSV, you're writing a wrapper in another language. The web REPL still depends on PHP for exchange rate fetching (numbat-wasm/www/ecb-exchange-rates.php), which is an odd dependency to carry. With 2600 stars and 105 forks it's reasonably popular but still a single-maintainer project, and the last push was March 2026 — not abandoned, but not a fast-moving project either. There's no package manager or module registry; sharing reusable Numbat code means copying .nbt files around.