Learn by running
Tour of Lux
8 short chapters, 15 live cells. Every example runs in your browser — edit anything, press Run, and read the receipt: output, evaluation steps, and a modeled energy figure. No server, no account; nothing leaves the page.
By the last chapter you'll have built a live reactive app and measured two implementations of the same function against each other — in joules.
- 01 Hello, Lux Run your first program and read your first receipt. 2 cells
- 02 Values Bindings, mutability, lists, and records. 2 cells
- 03 Functions & pipes Definitions, lambdas, and the pipe operator. 2 cells
- 04 Control flow if/else, pattern matching, and loops. 2 cells
- 05 Working with data List, string, and record builtins. 2 cells
- 06 Signals Reactive state, one primitive. 1 cells
- 07 Apps & views Declarative UI that renders live, right here. 2 cells
- 08 Energy as an observable The part that makes Lux, Lux. 2 cells
Prefer free-form? The playground has the same engine with a full editor — and the language specification covers everything the tour doesn't.
Dogfood: this page is also served as a Lux
build artifact — authored as a Lux app
(source), rendered by
lux build --target html, with the build's own energy receipt in its footer.