← board

Demo / test application candidates — selection criteria + catalog

What a good demo/test app must be

A flagship demo is not a unit test. It is a real application that also stresses the compiler. Selection criteria, in order:

  1. Real-world. Recognizable, non-toy, real algorithms. Not contrived.
  2. Broad feature coverage. Intentionally exercises as much language surface as practical (arrays / sets / records / enums / Int64 / generators / for-in / procedural types / short-circuit / strings / collections / classes).
  3. Compact + cross-platform. Small enough to run on constrained targets (ESP32), no OS deps beyond UART/stdout.
  4. Deterministic oracle. Produces an output that is exactly reproducible and byte-identical across all targets, so it doubles as a cross-target correctness check (and ideally a performance benchmark). Integer-deterministic beats float (float rounding risks cross-target byte-divergence — [[project_cross_float_variant_done]]).

Hard filters (disqualifiers)

Catalog — ranked

Chosen / flagship

  1. Chess engine — feature-demo-chess. Best coverage-per-LOC; built-in deterministic perft oracle (published exact node counts); integer-only core (clean oracle, no float nondeterminism); ESP32-fits; natural cross-ISA performance benchmark (nodes/sec, cycles/node). The only candidate that is simultaneously real-world, broad-coverage, integer-deterministic, ESP32-sized and benchmarkable.

Strong survivors (pass all filters — good future demos)

  1. JSON parser + serializer — headless; trivial deterministic roundtrip oracle (parse → emit → reparse == identity); real-world; heavy managed-string
    • dynarray + recursion stress. Unlike regex, JSON parsers are commonly hand-written, so it does not undermine the library story. → library: feature-json-library.
  2. Lisp / Scheme interpreter — headless; eval-suite oracle; deep coverage (collections, recursion, GC pressure, strings, eval). Flagship-tier but larger; self-hosting flavor. → demo ticket: feature-demo-lisp.
  3. RPN / spreadsheet calculator — headless; deterministic formula-result oracle; parser + expression eval + procedural-type op tables; compact. Solid mid-size demo. Float optional (keep out of oracle path). → demo ticket: feature-demo-calc.
  4. Bytecode VM + assembler — small ISA, deterministic program output; enums/proc-type dispatch/arrays/Int64; self-hosting flavor; little-brother to the parked Lua-as-target arc. → demo ticket: feature-demo-vm.
  5. Maze generator + solver — seeded deterministic; 2-D arrays / sets (visited) / queue / recursion; ASCII over serial. → demo ticket: feature-demo-maze.
  6. Conway's Game of Life — tiny deterministic oracle + benchmark; 2-D arrays
    • bit packing; shallow coverage but cheap and classic. → demo ticket: feature-demo-life.
  7. Console Klondike solitaireuser-requested; the most entertaining test app for a human on a Linux host. A documented exception to the headless/pure-oracle filter (it is interactive entertainment), but kept dependency-free: ANSI = strings (no ncurses), line-input avoids termios, so it still runs over ESP serial. Oracle via seeded deal + scripted transcript. Not a "please-user" pixel/audio toy — text + stateful logic. → demo ticket: feature-demo-solitaire.

Rejected (with reason — kept so we don't re-litigate)

Spawned library tickets (organization pass 2026-06-19)

Several survivors are really reusable libraries whose acceptance test is the demo (build the lib, the test app is its oracle). Tracked as library tickets, not just demos:

Interpreters stay demo-class, not library: VM / Lisp / Lua are applications (or, for Lua, a whole frontend/target arc), not RTL units — keep them as feature-demo-* if chosen, not library tickets. Lua-as-compile-target is a large separate arc, deliberately parked.

Use

When a new demo is wanted, pick from the survivors and open its own feature-demo-* ticket; if it is library-shaped, open / use the matching feature-*-library ticket above instead. Update this catalog if criteria change or a new candidate appears.

Log