05. Inspection and the Live Workflow
Frothy is meant to be inspected while it is live. The prompt-facing surface is not only for evaluation; it is also for asking the running image what it contains.
The Core Prompt Tools
Use these first:
words
show @blink
see @blink
core @blink
info @blink
What they are for:
wordslists the currently live namesshow @nameandsee @nameexpose the normalized binding viewcore @nameshows debug-oriented core renderinginfo @namereports binding metadata such as owner, kind, and persistability
Here is a more realistic pass:
record Counter [ value ]
counter is Counter: 2
counter.bump is fn [ set counter->value to counter->value + 1 ]
words
show @counter
show @counter.bump
info @counter
info @counter.bump
What you are looking for:
wordsshould show bothcounterandcounter.bumpshow @countershould render the current record valueshow @counter.bumpshould render the normalized code bodyinfoshould tell you which binding is an overlay value, what kind it is, and whether it is persistable
The Usual Loop
A normal Frothy loop looks like this:
- define or rebind a top-level slot
- run it immediately
- inspect what you just changed
- redefine it if needed
- save only when the overlay is in a state worth keeping
That loop is not a shortcut. It is the intended product surface.
For example:
record Cursor [ x, y ]
cursor is Cursor: 0, 0
moveRight is fn [ set cursor->x to cursor->x + 1 ]
moveRight:
show @cursor
moveRight:
show @cursor
save
This is normal Frothy work:
- define a small piece of state
- define a small operation
- run it immediately
- inspect the actual live result
- save only once the state is worth keeping
Prompt Health
The maintained REPL:
- accumulates incomplete multiline input
- evaluates complete top-level forms
- keeps the prompt alive after recoverable errors
- lets
Ctrl-Cinterrupt pending evaluation or pending multiline input
If the prompt state feels unclear, start with:
words
info @boot
show @boot
If you think the wrong definition is live, add:
show @yourName
see @yourName
info @yourName
That usually tells you whether the problem is:
- the slot you rebound is not the slot you thought you changed
- the current value is different from the source in your head
- the binding is base-owned when you thought it was overlay-owned
Inspection Is About The Image
Frothy’s inspection tools are there to tell you about the current binding and image state, not about a separate source-of-truth file on the host. That is why rebinding, persistence, and inspection fit together cleanly.
Next: Persistence, boot, and recovery .