Demo gallery
Every demo below runs the real Handwired runtime in your browser — no server, no GPU required. Upstream demos link to Cheng Lou's site.
Which demos run on this site?
★ Ranking from clicks
A search formula learns its weights from 1,000 shoppers while its business rules stay exact; a generic net on the same clicks breaks them.
Layout from a designer's drags
Drag cards to the sizes you want; the sizing function learns its constants and nothing overflows.
Physics from a recording
Fit gravity, drag and bounce to a recorded path, then replay it as code.
Accessible colour themes
A theme learns from a designer's picks while WCAG AA contrast stays exact; a generic net on the same picks fails it.
GPU JSON search (by Cheng Lou)
Upstream's 100,000-document search, embedded with credit: GPU timings next to plain JavaScript.
Beginner lesson: the cat is a neural net
A 7-step lesson. A tiny JS rule becomes an exact neural net; try to break it, then watch it learn new constants in its own code, next to a regular net.
Soft switch
The README's a > 4 ? 10 : 12 as two ReLUs and a select. Editable a, branches and live plot.
Exact comparison explorer
Pick a relation, toggle the integer grid, fuzz 5,000 random pairs against plain JS.
Code → network graph
Visualize the operations and layers behind a select, a comparison and an exact clamp.
Unfreeze & train
Start from the exact program, then fit its threshold, slope and branch values by gradient descent.
Toggle switch template
Upstream's template/ app: a spring-animated switch run as one numeric program.
What are the upstream demos?
Mini OS (HandwiredOS)
A small desktop with three windows and a dock — focus, stacking, dragging, resizing, springs, a photo gallery — run by one program: 234 source cells, 4,646 live operations in 130 layers, 9,909 weights, zero training.
Learned gallery
A photo layout drawn by a small network inside a program (6,320 operations in 8 layers, 244 trained source cells), trained with Adam using the program's own gradients while you edit the sketch.
Search 100,000 JSON documents
Regex matching, JSON parsing and highlighting written as numeric programs, then emitted as WebGPU shaders that search every document at each keystroke.
Figures above are from the upstream READMEs at the pinned commit.