REPL phrase costs
02.05.05 2026-10-18 — REPL phrase costs
Accepted and in the literate TTY REPL. This note keeps the shape that was locked before the feat, and the non-goals that still hold.
Context
The TTY REPL reads as a promptless transcript: no fpl>, results as |- <value> : ..., and ASCII ;;! phrase bars between turns. See Turnstile notation.
;;! -( 22:52:09 )-< command 1 >-----------------------------{ head: 0 }-
1 1 +
|- [ 1 1 + ] : ...
;;! -( 22:52:17 )-< command 2 >-{ head: 1; &18446744073709551615; fuel: 12; ms: 0.4 }-
The bar carries clock time, phrase number, and session head. After an eval, the next bar also names that phrase’s steps spent and wall ms. Optional &<decimal> is a turn state fingerprint (stub may be random until a real hash lands). The bar field stays fuel; the literature synonym is gas (PLFA). If spent fuel later moves onto the |- line, call that component a deadline (prefer @ <n> chrome) — see Evaluation judgments (02.04.03). Fail judgments and err/ tags: 02.03.01 Errors.
What the walker exposes
Meterkeeps the initialbudgetbesideleftand reportsspent(budget - left).evaluate/stackscan append each run line’s spent into a sink, including when the line then fails.entersums spent only for the new input’s run lines (history replay is omitted) and puts that onOutcome.spent. Sessionevent.fuelstays the budget.- The TTY loop times an entered source with
perf_counterand prints priorfuel/mson the next;;!{ … }block. First bar, pure:commands, and refusals that never enter omit both fields. A definition with no run lines omitsfuelbut may still showms.
Non-goals
- Changing the session log schema to persist spent fuel or wall time.
- A deterministic content hash for
&(stub fingerprint is enough for now). - Filling the result type slot (
: ...) with real types — separate concern. - Unicode box-drawing or other non-ASCII chrome on the bar.
- Changing non-TTY pipes or
-eoutput; costs stay a TTY transcript feature.