Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Showcase: awesome-crush

nixpt/awesome-crush collects real Crush programs, each written by a different LLM that was given little more than “can you learn crush?” and a pointer to crush-ast. Its README tells the story of each one: which constraints the authors hit, and the compiler bugs they found along the way.

Every program below was run on crush-ast bad81048 (v0.9.0, 2026-10-31) with crush-run run --max-steps 500000000 FILE < /dev/null. All of them ran to their documented conclusion. The outputs quoted are what that run printed.

The programs

ProgramAuthor (from the awesome-crush README)What it isEnds withVM steps
games/pong.crushOrnith-1.5-35B-A3Bself-playing Pong, scalar state threaded through recursiondraw 0-02,303,450
games/tictactoe.crushforeman-v2 (Qwen3.8-27B fine-tune)board packed as one base-3 integergame over: draw117,606
games/lights_out.crushqwen38-base (Qwen3.8-27B)25-bit bitfield board, solves itselfboard solved in 8 moves189,907
games/game_of_life.crushClaude (hand-written)Conway’s Life with @module/@decision/@invarianta blinker oscillating286,738
games/blackjack.crushOpenCodesix self-played rounds with a bankrollfinal bankroll: 1205,631
games/pong-deepseek.crushcece / bro (DeepSeek-v4)a second, independent Pongtime's up — final score: left 0 : 0 right1,245,978
games/fifteen_puzzle.crushbro (DeepSeek-v4)IDA* solver, tiles packed as nibbles in one integersolved in 6 moves.77,324
games/breakout.crushcece (DeepSeek-v4)brick-breaker, 30 bricks as bitsout of ticks — final score: 1405,593,804
games/rps_tournament.crushbro (Muse)rock-paper-scissors bot round-robinchampion: Cycler! and an ASCII trophy3,289
forth/forth.crushBuffy (DeepSeek-v4)a Forth interpreterfive Forth programs run63,281
brainfuck/brainfuck.crushBuffy (DeepSeek-v4)a Brainfuck interpreterHello World!, A–Z, 0–994,146
caison/caison-parsor.crushbro (the commit author; the README names no model)a CAISON parser written in Crushthe parsed document as JSON72,957
agents/log-triage/log_triage.crushClaude (Opus 5.5)an agent-written tool that declares @capabilitiessee below—

The step counts matter: the VM’s default budget is 1,000,000 instructions, so the larger games need --max-steps. Without it, crush-run run games/pong.crush stops with [runtime] instruction quota exceeded (1000000).

games/blackjack_interactive.crush (also in crush-ast’s examples/crush/) reads its moves with io.read(). Feed it input, or redirect from /dev/null so it sees end-of-file and leaves the table instead of waiting:

$ printf '10\nh\ns\n0\n' | crush-run run games/blackjack_interactive.crush
...
Bankroll: $110
Bet (1-110) — 0 or q to leave:

You leave the table with $110.

A taste of the output

Game of Life’s blinker, from crush run games/game_of_life.crush:

Conway's Game of Life -- 5x5, blinker seed, dead border (no wrap)
gen 0:
.....
.....
.###.
.....
.....

gen 1:
.....
..#..
..#..
..#..
.....

The Forth interpreter running Forth programs on the Crush VM:

Forth-in-Crush: a Forth interpreter running on the Crush VM

--- stack arithmetic: (3+4)^2 ---
source: 3 4 + dup * .s .

stack(1): 49 
49
(final stack depth: 0)

and the Brainfuck interpreter’s Hello World:

--- hello world ---
source: ++++++++[>++++[>++>+++>+++>+<<<<-]>+>+>->>+[<]<-]>>.>---.+++++++..+++.>>.<-.<.+++.------.--------.>>+.>++.

Hello World!

What the collection shows about the language

  • Older programs avoid features that now exist. The games thread all state through recursive calls and pack boards into integers, because when they were written arrays couldn’t be mutated in place and there was no random-number capability. Both work now (a[i] = v, math.seed / math.random_int), as do closures and struct methods, and the programs still run unchanged.
  • Capabilities are visible. The log-triage agent tool starts with @capabilities [fs.list, fs.cat, time.now_iso]. crush-run caps reports what it needs before anything runs, a run without those grants is refused, and a variant that adds net.http_post without declaring it is refused at compile time:
$ crush-run caps log_triage.crush
log_triage.crush
  declares: fs.list, fs.cat, time.now_iso
  needs these grants to run:
    --fs: fs.cat, fs.list
    --time: time.now_iso
  also uses (ambient): arr_set, io.print, push, str.concat, str.contains, str.ends_with, str.pad_left, str.pad_right, str.split, str.trim
$ crush-run run --fs --fs-root sample-logs --time tampered/undeclared.crush
[compile] the program uses a capability not declared in @capabilities: net.http_post
  add it to @capabilities, or stop using it

(crushc doesn’t apply that check yet: crush-ast #258.)

Run them yourself

git clone https://github.com/nixpt/awesome-crush
cd awesome-crush
crush run --max-steps 50000000 games/breakout.crush
crush run games/fifteen_puzzle.crush
crush run forth/forth.crush