Why. The CLI REPL is a bare fgets loop (src/main.c, eigenscript_repl) — pressing up-arrow prints ^[[A. It is the single worst first-five-minutes signal for anyone arriving from Python/Node, and the REPL is the natural teaching surface for the observer niche (prev of x / why of x / stable of x on live session bindings). The fix already exists in-tree at EigenOS, whose REPL has history + cursor editing — this is the downstream-gap-surfaces-upstream rule applied to our own port.
What.
- Extract the loop into
src/repl.c; add a zero-dependency raw-termios line editor (linenoise-style, ~300 lines in-tree — do NOT link readline/libedit; the zero-dep invariant is load-bearing for embedding).
- History (in-memory + history file), arrow keys, cursor editing; tab completion over builtins + current top-level bindings.
- Observer-native touches: temporal interrogatives work on session bindings; optionally print a trajectory glyph next to values.
- Non-tty stdin path byte-identical to today (the suite pipes scripts through the binary).
Acceptance. Interactive session supports history/arrows/editing; suite-gated REPL transcript test (tests/test_repl.sh); make output has zero new link dependencies; piped/non-tty behavior unchanged.
Effort: days. Source: 2026-07-04 language-strategy survey (tooling + learnability dimensions; ranked top impact/effort in the whole study).
Why. The CLI REPL is a bare
fgetsloop (src/main.c,eigenscript_repl) — pressing up-arrow prints^[[A. It is the single worst first-five-minutes signal for anyone arriving from Python/Node, and the REPL is the natural teaching surface for the observer niche (prev of x/why of x/stable of xon live session bindings). The fix already exists in-tree at EigenOS, whose REPL has history + cursor editing — this is the downstream-gap-surfaces-upstream rule applied to our own port.What.
src/repl.c; add a zero-dependency raw-termios line editor (linenoise-style, ~300 lines in-tree — do NOT link readline/libedit; the zero-dep invariant is load-bearing for embedding).Acceptance. Interactive session supports history/arrows/editing; suite-gated REPL transcript test (
tests/test_repl.sh);makeoutput has zero new link dependencies; piped/non-tty behavior unchanged.Effort: days. Source: 2026-07-04 language-strategy survey (tooling + learnability dimensions; ranked top impact/effort in the whole study).