LINKED-LIST EXPLORER / native Squeak 6.1
LearnSqueak workshop, 18 October 2026

REQUIREMENTS
Squeak 6.1 64-bit, build 23976. Morphic and SUnit are bundled.
No downloaded package, service, JavaScript application or browser is required.
The ZIP contains source and captured media, not a Squeak VM or image.

FILE IN AND LAUNCH
1. Make a copy of your learning image.
2. In Squeak File List, select examples/linked-list-final.st and choose fileIn.
3. In a Workspace, select this complete expression and Do it:

LSLinkApp open

Use Inspect it instead to retain the returned app reference. File-in does not
open a window. Complete .st files use chunk format; do not paste their contents
into a Workspace. Browser method snippets belong on the named class and side.

The eight linked-list-01.st through linked-list-08.st files are cumulative,
standalone checkpoints. Use a fresh copied image to return to an earlier stage;
filing in old source does not remove methods added by later checkpoints.
Close an old explorer before moving to another checkpoint.

NATIVE CONTROLS
Two nodes: replace head with a fresh 10 -> 20 -> nil fixture; clear selection
and set generated input to 1. Preserve old trace entries and append a load note.
Prepend next / Append next: insert the next generated integer; only a successful
insertion advances the controller's next input.
Traverse: show the values visited by following next until nil.
Remove head: remove position 1, safely returning nil when empty.
Remove first 20: remove the first equal value only.
Click a card: select its node identity; blank panel space clears selection.
Remove selected: remove that same object at its current position.
Validate: explain whether the reachable chain obeys the invariants.
Reset: clear head, message history and selection; restart generated input at 1.

CONTRACTS AND LIMITS
The model stores head, not an Array of the node data. Each LSLinkNode stores
value and next. Accepted payloads are integers -99 through 999. At most six
nodes are reachable. Duplicate values represent distinct node objects.
Insertions answer true on success, false on rejection. removeAt: uses one-based
positions and answers the removed integer or nil for rejection/no result.
removeFirstValue: removes only the first equal payload and answers its value,
or nil if absent/rejected. Zero is a valid value and is different from nil.
Rejected mutations can update status/history but preserve every link and node.
Removed nodes have next set to nil. Reset only drops model ownership; it does
not destroy nodes still referenced by an Inspector.

head and nodes intentionally expose live node objects for learning. The nodes
Array itself is new, and values returns a new payload Array. Low-level value:
and next: can violate the model contract. Guards detect wrong links, bad values,
cycles and overlong chains. Drawing remains bounded, operations reject the
damaged chain and Reset recovers. A bounded nodes snapshot is not proof of
validity; use chainProblem or validate for that.

RUN APPLICATION TESTS
File in the final application, then examples/linked-list-tests.st.
In a Workspace, select and Print it:

LSLinkTest suite run

Expected: 47 run, 47 passes, 0 failures, 0 errors.

EXERCISES
After the final application, file in:
examples/linked-list-exercise-1.st (countOccurrencesOf:)
examples/linked-list-exercise-2.st (reverse)
examples/linked-list-exercise-tests.st
Then Print it:

LSLinkExerciseTest suite run

Expected: 8 run, 8 passes, 0 failures, 0 errors.
The JSON lesson includes both complete solutions, their exact checks and
expected results. Send app refresh after changing an open model directly.

REPRODUCE ALL CHECKPOINTS, TESTS AND MEDIA
Use Python 3 and a Squeak 6.1 VM. The runner copies the provided clean image
and its changes file to a temporary directory. It never saves or edits your
original image. It runs the VM with null display and sound and captures native
window imageForms; a visible desktop is not needed.

From the extracted linked-list-lab directory:
python scripts/run_native.py --vm /absolute/path/to/bin/squeak --image /absolute/path/to/clean.image --task tests
python scripts/run_native.py --vm /absolute/path/to/bin/squeak --image /absolute/path/to/clean.image --task stages
python scripts/run_native.py --vm /absolute/path/to/bin/squeak --image /absolute/path/to/clean.image --task gifs

Use --task all for all three. The GIF encoder requires Pillow; the tests and
stage PNG captures use only Python's standard library and the Squeak image.
The runner recompiles every highlighted Browser method and evaluates the exact
Workspace launcher from linked-list.json. Each stage is a fresh image session.
Outputs go to results/, media/, frames/ and runtime-scripts/.

The 21-frame GIF is a scripted native replay, not a continuous human recording.
Native mouse events operate buttons and select a card. One direct model append
adds a duplicate 20, which the page and capture notes explicitly disclose.
PNG frames are native captures. GIF timing is chosen for readability.

No background stepping process or network connection is used. Close the window
when finished. Source generators and the packaging script are included for
inspection; the tested .st files are the files to install in Squeak.
