Commit Graph
4 Commits
Author SHA1 Message Date
venomade 516b256ea3 Color check output, gated by LISPLINGS_COLOR (wave 3, F3)
The exercise subprocess writes to a pipe in watch mode and cannot see the parent's terminal, so setup now sets LISPLINGS_COLOR=always/never and the harness colorizes its own report: green ok, red FAIL, bold summaries, red failure headers in exercise-runner.lisp.

Piped output stays ANSI-free unless forced: NO_COLOR and TERM=dumb are honored, and LISPLINGS_COLOR=always ./lisplings ... | cat -v forces codes for debugging. A (declaim (special *use-color*)) lets setup read the value without a compile-time warning.
2026-11-22 09:50:52 +00:00
venomade b62d32d995 Discard keys typed mid-run (wave 3, F6)
run-and-show prints its :running frame (bold Checking exercises/<dir>/<name>.lisp ...) before spawning the subprocess, so the screen stays alive while the pipe is silent. When the run returns, keys queued while it ran are discarded; keys already queued when the run started survive, so scripted sessions still work. This fixes the stray-n auto-advance after a save.

The reader thread now sets an open-p flag at EOF; prompt-line reads
one answer line through the input queue and returns NIL at EOF. A
50ms grace at watch start lets piped stdin land before the first
frame. README notes that keys typed mid-run are ignored.
2026-11-22 09:47:41 +00:00
venomade 4c6009e2e4 Add persistent watch status screen (wave 3, F1)
render-screen is now the only printing path in watch mode: bold
header, current exercise path, captured output, a result line with
Exercise done + Solution for comparison on pass, pinned hints, a
width-aware colored progress bar (COLUMNS / TIOCGWINSZ / 80), and a
dynamic valid-key legend. Non-tty output prints full linear frames
delimited by --------; nothing is hidden on pipes.

*use-color* now requires a tty (LISPLINGS_COLOR=always/never still
override) and moves below stdout-is-tty-p, fixing its load order.
One-shot run/hint render the same frame. dev/verify.sh: 70/70.
2026-11-22 09:44:22 +00:00
venomade 4df60ead93 Lisplings: Rustlings-style exercises for Common Lisp
70 exercises in 20 chapters, from first s-expressions to restarts,
macros, CLOS, and a tiny Lisp interpreter. Each exercise ships
broken with a solved twin and a hint. Includes a watch-mode runner,
a plain-CL check harness, a nix flake, and verification tooling.
All plain SBCL, no dependencies.
2026-11-22 03:30:19 +00:00