Watch mode opens the current exercise in $EDITOR (or $VISUAL) when
it starts and whenever the exercise changes: on n, and on a jump
that moves. The editor is spawned detached, so the watcher never
blocks, and a missing editor binary is ignored. A one-line notice
names the opened file, on terminals only. --no-editor and
LISPLINGS_NO_EDITOR turn it off; usage text and the README
workflow/commands sections document the flag.
Watch mode prints the chapter README above the exercise when the
chapter changes: on the first frame, on n, and on jump-to. A move
inside the same chapter shows a one-line pointer instead, and the
block prints once, not on every rerun. `run <name>` prints the
target chapter's README too.
.lisplings-orig/ was written once, on the first run, so the 35
wave-4 exercises added later had no pristine copy and reset/x
refused them. Snapshot lazily per exercise now: reset prefers git
HEAD (git show HEAD:./exercises/...), falls back to the current
file while it still has its ;; TODO marker, and refuses when
neither is safe. The first-run store rebuild uses the same
per-exercise sources, so a deleted .lisplings-orig/ recovers too,
and is no longer repopulated from files the user may have solved.
list-exercises prints 1-based right-aligned numbers. In watch mode, l lists the exercises and then asks Jump to (name or number, empty stays): a name or catalogue number switches to that exercise (revealed hints reset, :current saved), an empty answer or EOF stays, and unknown names or out-of-range numbers show a notice.
No new CLI command: run [name] already selects the exercise for
watch mode; usage and README note it.
x asks y/n through the shared input queue. On yes it restores the pristine copy from .lisplings-orig/, unmarks done, and reruns: the restored exercise fails its checks again, as it should. On no (or EOF) it says so and stays.
A missing pristine copy (an exercise added after the snapshot) shows a
notice instead of crashing, both in watch mode and in the one-shot
reset command. The valid-key legend gains x, and the README keys
table documents it.
info.sexp :hint now accepts a string or a list of paragraph strings; normalize-hint converts entries at load and fails fast on malformed ones (lisplings: Bad :hint for <name> ...).
In watch mode h reveals one paragraph per press and revealed hints stay
pinned on the screen, resetting when the exercise changes; hint
[name] prints every paragraph numbered. intro1, functions3 and quiz1
are converted to paragraph lists as examples; every other entry keeps
working as a plain string.
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.
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.
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.
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.