Yichus Interactive Tutorial
This tutorial is Yichus-specific. For Bosatsu language syntax and fundamentals, use Bosatsu docs.
1) What is Yichus?
Yichus is a Bosatsu application focused on provenance-aware simulation and UI workflows.
2) Your First Yichus UI
- Generate a counter with
yichus sim - Render with
Yichus/UI - Inspect update behavior in the browser
3) Yichus State and IO
- Use
Yichus/IOfor state reads/writes - Keep handlers as IO-returning functions
- Preserve deferred-effect semantics
4) Building Simulations
- Pair compute model with
.sim.bosatsuconfig - Define inputs, outputs, assumptions, and sweeps
- Generate app with
yichus simapp
5) Provenance and “Why?”
Use derivation traces to explain output values and map them back to source decisions.
6) Explorer
Use explorer outputs to inspect bindings, dependencies, and IO vs pure boundaries.
7) Canvas and Animation
Use Yichus/Canvas for runtime visual demos like particles and bouncing ball.
8) New: IO-Enriched Matchless Export
- Run
yichus matchless --format both --output out your-file.bosatsu - Inspect
out.matchless.analysis.jsonfor IO sites, causal edges, and sequence groups - Use per-binding purity and dependency summaries to audit effect boundaries quickly