diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-11 06:49:10 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-11 06:50:11 -0300 |
| commit | 378379807fb4cd751e90808c8363caddb365bcd8 (patch) | |
| tree | f84c7d0e7cbd42a9b9c93e791ab2b5376499d23d /anim/scenes/list.zig | |
| parent | 5922ee911b9a6604f60dc83be36ba9e6c9abac98 (diff) | |
| download | computeranim-378379807fb4cd751e90808c8363caddb365bcd8.tar.gz computeranim-378379807fb4cd751e90808c8363caddb365bcd8.zip | |
canim: nothing changes in one frame; the map's space is used; the heap scene at its storyboard's length
The motion check counts a third of the one-frame changes it did: the
minimap's changes fade, and a register's value, a flag, a role, a pin's
names, a tag's note, a backtrace row, a call tree's node and a dump row
crossfade where they changed at once. What still fires is named in the
README; an encoder's keyframe and the gallery's cuts are exempt by name.
No caption stands over twelve seconds or under its reading time. The
heap scene is 78 s: what the storyboard does not narrate runs, and each
free's line cascades onto its call row (line stepping stops at a
breakpoint for that). On the map, leftover space holds the stack
continued, dumps round what the registers and the stack point at, open
loupes and the key: between 1% and 13% of a map is page, where it was 14%
to 42%.
Co-Authored-By: Claude Fable 5.2 <[email protected]>
Claude-Session: https://claude.ai/code/session_016Y9MNCKgYCGiANnEwcEQxa
Diffstat (limited to 'anim/scenes/list.zig')
| -rw-r--r-- | anim/scenes/list.zig | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/anim/scenes/list.zig b/anim/scenes/list.zig index b7e6c4a..39d413b 100644 --- a/anim/scenes/list.zig +++ b/anim/scenes/list.zig @@ -42,6 +42,8 @@ fn frame(s: *anim.Frame) void { const loaded = rec.lineMoment(22, rec.lineMoment(21, reverse.enter)); const near = canim.loupe(s, .{ .cursor = at, .stage = ctx.stage, .from = .{ .register = "rax" } }); const deeper = canim.loupe(s, .{ .cursor = at, .stage = ctx.stage, .from = .{ .field = .{ .loupe = near, .at = rec.register(loaded, "rax") + 8 } } }); + // Open, they are panels of their own on the map too. + ctx.map.loupes = .{ near, deeper }; const joins = ctx.ties(s); // It opens on the map, the whole context unfolded: the first caption at // 1 s, the dive into the working frame at 2.5 s, the first step at 5 s. @@ -50,8 +52,10 @@ fn frame(s: *anim.Frame) void { says.line(s, "A list is nodes on the heap, each holding the address of the next.\nReversing it moves no node: it rewrites every `next`."); s.cursor = 2.5; ctx.map.dive(s); - // Three names are set up. + // Three names are set up, under a caption of their own (the first is up 12 s at most). const first_trip = rec.lineMoment(21, reverse.enter); + at.walk(s, .line, rec.lineMoment(19, reverse.enter)); + says.line(s, "`cur` takes the head, and the loop begins\nat the first node."); at.walk(s, .line, first_trip); // The loop's caption leads the loop. says.line(s, "`next` remembers the way on, `cur->next` is turned round,\nand `prev` and `cur` each step along."); @@ -67,13 +71,19 @@ fn frame(s: *anim.Frame) void { near.close(s); s.wait(t.beat); const second_trip = rec.lineMoment(21, rec.lineMoment(24, first_trip)); + // The rest of the trip under captions of its own: a caption is up 12 s at most. + says.line(s, "`cur->next` takes `prev`, NULL:\nthe first node is now the end of the list."); + at.walk(s, .line, rec.lineMoment(23, loaded)); + says.line(s, "Then `prev` and `cur` each step one node along,\nand the loop comes round to the second node."); at.walk(s, .line, second_trip); // Pacing: the second trip is the same, so hurried; it keeps its rest. says.line(s, "The second node, the same way, faster:\nits `next` turns back to the first."); const third_trip = rec.lineMoment(21, rec.lineMoment(24, second_trip)); at.hurry(s, .line, third_trip, .{}); // The third in full again: the last `next` turns, and `cur` runs off the end. - says.line(s, "The last node: its `next` turns too,\nand `cur` runs off the end of the list."); + says.line(s, "The last node: its `next` turns too,\nback to the node before it."); + at.walk(s, .line, rec.lineMoment(23, third_trip)); + says.line(s, "`prev` takes the last node, and `cur` runs off the end\nof the list: NULL, so the loop ends."); at.walk(s, .line, rec.lineMoment(26, third_trip)); says.line(s, "`head` takes the last node: the same three nodes,\nin the same places, read the other way."); at.walk(s, .line, end); |
