Freeweights · a coding gym in your browser
Free weights for programmers.
Every rep starts red: the tests exist, your implementation doesn’t. Make them green — in a real editor, with real runners, coached by an open-weights model running on your own GPU.
Tutorials are cardio. Autocomplete is a spotter who lifts the bar for you. Neither builds the muscle that writes code under load.
How it works
Red → green → stronger.
- 01 Pick a rep.
Three levels — Foundations, Core, Principal — 8 chapters, 24 reps per language track. Every rep opens red: the tests are written, the function is empty.
- 02 Make it green.
A Monaco editor and real runners: TypeScript executes in a sandboxed blob worker with a 4-second kill switch; Python runs on Pyodide (CPython compiled to WASM) with 10. No simulation for these two — the test output is the truth.
- 03 Get coached.
Qwen2.5 Coder reviews your working diff — pick your weight class, 0.5B to 7B, downloaded once through web-llm and cached. The coach runs on your GPU; the conversation never leaves the tab.
- 04 Come back.
Spaced repetition resurfaces finished reps at 1, 3, 7, and 14 days; timed drills and the Rosetta library (12 patterns × 4 languages) keep the warm-up honest.
The specimen
One real rep, both states.
ts-values · Values & Types — the first Foundations rep, exactly as the gym serves it.
// the starter — red by construction function celsiusToFahrenheit(c: number): number { throw new Error("TODO: implement celsiusToFahrenheit"); } ✕ celsiusToFahrenheit converts freezing point TODO: implement celsiusToFahrenheit ✕ celsiusToFahrenheit converts boiling point TODO: implement celsiusToFahrenheit ✕ celsiusToFahrenheit handles decimals TODO: implement celsiusToFahrenheit
// the lift — two lines function celsiusToFahrenheit(c: number): number { return (c * 9) / 5 + 32; } ✓ celsiusToFahrenheit converts freezing point ✓ celsiusToFahrenheit converts boiling point ✓ celsiusToFahrenheit handles decimals
Guarantees
- Works offline
- model + Pyodide cached after first download; everything else is static
- No account, no API key
- there is no server to hold either
- Code never leaves the device
- all state in localStorage under freeweights:*
- Honest runners
- TS/Python execute for real; Java/Rust wear an “AI estimate” badge
What this is not.
Not a course — there are no videos, only failing tests.
Not a cloud IDE — everything runs in your tab, which means a real model download (0.4–4.3 GB, once).
Not four compilers — TypeScript and Python run for real; Java and Rust are checked by AI estimate, not a compiler — copy them out to javac/rustc for the truth.
Not a substitute for shipping.
When the reps outgrow the browser
Go from browser reps to production systems.
Production Rust: async systems from real code is a book plus a tested cargo workspace, not a video course — 13 chapters lifted from real services (a token-metering billing server, an async job relay, an inference server), each shipping a companion crate in plain std where the chapter’s mechanism compiles and its tests pass.
Same rule as the gym — the exercises open red, as #[ignore] stubs waiting for your implementation. Except here the judge isn’t an AI estimate: it’s cargo test.
- 13
- chapters
pdf + epub - 13
- crates
plain std - 73
- tests
all passing - 39
- exercises
open red
PDF + EPUB + cargo workspace · instant download on Gumroad
Open-weights models, free forever, in a coding gym.
The pun is the product — the reps are yours.