summaryrefslogtreecommitdiff
path: root/anim/scenes/zoom.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-10 18:06:30 -0300
committerGabriel Schneider <[email protected]>2026-11-10 19:01:23 -0300
commite63b0624f57472d40af32a006c32cc47d403b822 (patch)
treeb7295da62acd96bc7aba425720eed95605526693 /anim/scenes/zoom.zig
parent318e16181a28725e218121363555580725d6d0d4 (diff)
downloadcomputeranim-e63b0624f57472d40af32a006c32cc47d403b822.tar.gz
computeranim-e63b0624f57472d40af32a006c32cc47d403b822.zip
canim: what the review found; the band as two panels; list and sort by instruction
The first videos were reviewed frame by frame and the catalogue changed with them. A lens is a drawing over the program column and its view over the state column, so the stack keeps six slots, its window on the whole frame. Operands are whole. list and sort are recorded by instruction from main (record --from), so their registers strike, links reach nodes and cells, rows that ran are marked and jumps are drawn. A call's node is a projection of its return address; pins travel and keep their side; a mark covers the bytes that changed, at the element's width; a syscall's result is stored after the kernel returns it and every panel is of one moment; fast passes are veiled; the clock stands still during a step; captions get their reading time and a scene's first step comes by four seconds. Co-Authored-By: Claude Fable 5.2 <[email protected]>
Diffstat (limited to 'anim/scenes/zoom.zig')
-rw-r--r--anim/scenes/zoom.zig9
1 files changed, 6 insertions, 3 deletions
diff --git a/anim/scenes/zoom.zig b/anim/scenes/zoom.zig
index 5ea2346..ee24e7d 100644
--- a/anim/scenes/zoom.zig
+++ b/anim/scenes/zoom.zig
@@ -18,7 +18,6 @@ pub const scene = anim.Live(frame, struct {});
fn frame(s: *anim.Frame) void {
const rec = canim.open(recordings.steps);
- const t = canim.theme.time;
// fib(5), about to run line 6: `return fib(n-1) + fib(n-2);`. Its first call is fib(4).
const call = rec.call("fib", 1);
var at = canim.cursor(s, rec, rec.lineMoment(6, rec.call("fib", 0).enter));
@@ -40,11 +39,15 @@ fn frame(s: *anim.Frame) void {
says.line(s, "`call` writes eight bytes on the stack: the way back.\nThe new frame saves `rbp` under them, then its own `n`.");
// Nearer, for the bytes: the stack alone, twice the size.
cam.go(s, split.stack, 2, .{ ctx.source, ctx.disasm, ctx.registers, ctx.backtrace });
+ // Under the camera the stack holds still: six free words above rsp for the new frame.
+ ctx.stage.holdStack(s, at.moment(s), 6);
at.walk(s, .moment, call.enter + 4);
+ s.wait(canim.theme.time.beat);
+ ctx.stage.releaseStack(s);
cam.back(s, .{ ctx.source, ctx.disasm, ctx.registers, ctx.backtrace });
- says.line(s, "Eleven instructions and three words of stack later\n`fib(4)` begins: the same lines, one call deeper.");
+ says.line(s, "Nine instructions and three words of stack later\n`fib(4)` begins: the same lines, one call deeper.");
at.walk(s, .line, end);
- s.wait(t.before_cut);
+ says.close(s);
cam.apply(s);
}