From 165bb6c1344b98de7bef1d3c2b72147b4a40797a Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Tue, 10 Nov 2026 16:05:20 -0300 Subject: canim: the renderer speaks the design language The blocks, their states and the tokens carry the catalogue's names: atoms in ui, chain/reg/slot in rows, insn with its line column, jump lane and annotations (read, write, taken or not, a call with its arguments, a return, a syscall) in disasm, bytes and hexdump with field paper and the reading column, the three splits and relayout in stage, the ties (thread, link and pin, projection, echo). A lens is a band over the whole context, its drawing left and its bytes right. Frames' spans on the stack, each instruction's line and a callee's parameter count come from the tracer. A gallery scene draws every block; the test compares six of its pages with pictures kept in test/gallery, drawn from a recording kept there too. The scenes are ported; the motion checks report no pop and no metronome in any of them. Co-Authored-By: Claude Fable 5.2 --- anim/scenes/zoom.zig | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'anim/scenes/zoom.zig') diff --git a/anim/scenes/zoom.zig b/anim/scenes/zoom.zig index 6eb3248..5ea2346 100644 --- a/anim/scenes/zoom.zig +++ b/anim/scenes/zoom.zig @@ -31,15 +31,15 @@ fn frame(s: *anim.Frame) void { var cam: canim.Camera = .{}; var says: canim.Narrator = .{}; - const joins = canim.ties(s, .{ .cursor = at }); - canim.establish(s, .{ ctx.clock, ctx.source, ctx.disasm, ctx.registers, ctx.stack, ctx.backtrace, joins }); + const joins = ctx.ties(s); + canim.establish(s, .{ ctx.clock, ctx.registers, ctx.stack, ctx.backtrace, ctx.source, ctx.disasm, joins }); says.line(s, "A line of C is a handful of instructions.\nThis one calls `fib(n-1)`: follow it down."); // The CPU's level: an instruction a step. The argument is worked out in `rdi`. at.walk(s, .moment, call.enter - 1); 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, canim.layout.stack, 2, .{ ctx.source, ctx.disasm, ctx.registers, ctx.backtrace }); + cam.go(s, split.stack, 2, .{ ctx.source, ctx.disasm, ctx.registers, ctx.backtrace }); at.walk(s, .moment, call.enter + 4); cam.back(s, .{ ctx.source, ctx.disasm, ctx.registers, ctx.backtrace }); -- cgit v1.3