07 / CALCULATOR
CALI
The system calculator forgets everything the moment it closes, and a spreadsheet is overkill. Cali is a notepad that runs the math as you type it, in plain language.
- OUTCOME
- A hand-written expression engine — lexer, parser, evaluator, no math library — that reads labels, currencies, and units out of ordinary sentences. Live per-line totals, thirty-plus real-time rates, portable .cal files, one engine across Mac, web, and CLI.
- STACK
- Tauri · Rust · TypeScript
- Why hand-write a parser
- Cali reads ordinary sentences — labels, currencies, and units mixed into prose — and evaluates them line by line. A general-purpose math library parses expressions, not language, so the engine is written from scratch: lexer, parser, evaluator, no dependency. Owning the grammar is what makes ambiguity a design decision rather than a library's default.
- One engine, three surfaces
- The same Rust engine runs behind the Mac app, the web version, and the CLI. Shared logic across surfaces is easy to claim and hard to hold, and the way it holds here is that the engine has no interface concerns in it at all — it takes text and returns values.
- A file you can still open later
- Documents are plain .cal text, portable between all three surfaces and readable without the app. Thirty-plus live exchange rates make currency lines current, but the file itself stays a file — the calculation survives the tool that produced it.
- SURFACES
- MAC · WEB · CLI
- CURRENCIES
- 30+
- FORMAT
- PLAIN .CAL
