Two modes, one language
Inert .zti data and pure .zt computation share one syntax. Data stays literal; transformation stays explicit and separate.
Experimental · pure · typed
Zutai is a two-mode language: an inert data format and a pure, lazy, typed language that transforms it — carrying types from source all the way to native code.
Service :: type { name : Text; errors : Int; enabled : Bool;}; healthy :: Service -> Bool = service => service.enabled && service.errors == 0; ready :: List Service -> Int = services => length (filter healthy services);01 — Two modes
Records, lists, tuples, and atoms are written the same way in both modes. Data files never evaluate; computation files always do.
General mode
Pure functions, exhaustive unions, effects with visible authority, and a typed path to LLVM. Every case is checked before anything runs.
Tier :: type { #edge; #core; #batch; }; budget :: Tier -> Int = tier => match tier { | #edge => 50; | #core => 200; | #batch => 1000; };02 — See it run
This roster runs the very code beside it — the same typed Service, healthy, and ready functions the compiler checks. Deploy a service, pause it, or log an error, and the readiness rollup recomputes from those functions, evaluated in your browser as you click.
healthy :: Service -> Bool = svc => svc.enabled && svc.errors == 0; ready :: List Service -> Int = svcs => length (filter healthy svcs);03 — Why Zutai
Four commitments the language keeps on every program.
Inert .zti data and pure .zt computation share one syntax. Data stays literal; transformation stays explicit and separate.
Source elaborates through THIR and TLC to a typed native path. The compiler never loses the types you wrote.
Filesystem, network, and other runtime work are typed and handled at a boundary you can see — no ambient side effects.
Incomplete typed IR does not run. A wrong value is worse than no value, so the evaluator refuses rather than guess.
04 — Compiler
General mode lowers through a chain of typed IRs — each one inspectable — before it reaches native code.
05 — Get started
Clone the workspace and drive the compiler from one CLI. Programs are type-checked before they ever evaluate.
Type-check and report diagnostics
Evaluate a program and print its result
Explore expressions interactively
Lower all the way to a native binary