From e63b0624f57472d40af32a006c32cc47d403b822 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Tue, 10 Nov 2026 18:06:30 -0300 Subject: 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 --- anim/test/gallery/atoms.png | Bin 96800 -> 99949 bytes anim/test/gallery/none.png | Bin 219668 -> 223411 bytes anim/test/gallery/rest.png | Bin 229667 -> 230803 bytes anim/test/gallery/rows.png | Bin 105675 -> 106864 bytes anim/test/gallery/step.png | Bin 229198 -> 230313 bytes anim/test/gallery/subject.png | Bin 205715 -> 204289 bytes anim/test/recordings.zig | 15 +++++++++------ 7 files changed, 9 insertions(+), 6 deletions(-) (limited to 'anim/test') diff --git a/anim/test/gallery/atoms.png b/anim/test/gallery/atoms.png index 7458689..025176c 100644 Binary files a/anim/test/gallery/atoms.png and b/anim/test/gallery/atoms.png differ diff --git a/anim/test/gallery/none.png b/anim/test/gallery/none.png index 8116b10..098b50a 100644 Binary files a/anim/test/gallery/none.png and b/anim/test/gallery/none.png differ diff --git a/anim/test/gallery/rest.png b/anim/test/gallery/rest.png index fa7ee53..92c50ab 100644 Binary files a/anim/test/gallery/rest.png and b/anim/test/gallery/rest.png differ diff --git a/anim/test/gallery/rows.png b/anim/test/gallery/rows.png index 97a8fd9..9f6c095 100644 Binary files a/anim/test/gallery/rows.png and b/anim/test/gallery/rows.png differ diff --git a/anim/test/gallery/step.png b/anim/test/gallery/step.png index 9678e91..1ca6f8a 100644 Binary files a/anim/test/gallery/step.png and b/anim/test/gallery/step.png differ diff --git a/anim/test/gallery/subject.png b/anim/test/gallery/subject.png index e7f10ef..b579083 100644 Binary files a/anim/test/gallery/subject.png and b/anim/test/gallery/subject.png differ diff --git a/anim/test/recordings.zig b/anim/test/recordings.zig index d853285..6d0577f 100644 --- a/anim/test/recordings.zig +++ b/anim/test/recordings.zig @@ -13,7 +13,8 @@ const expectEqual = std.testing.expectEqual; test "steps by line stop on lines of the program's own source, and no step stands still" { inline for (.{ recordings.steps, recordings.hello, recordings.sort, recordings.list }) |program| { const rec = canim.open(program); - var at = rec.call("main", 0).enter; + // From the first call it shows: main, or the one a recording begins in. + var at = rec.calls[0].enter; var stops: usize = 0; while (at < rec.end() and stops < 400) : (stops += 1) { const next = rec.next(.line, at); @@ -38,13 +39,13 @@ test "calls are a tree: fib(5) makes fifteen, each with what it was given and ga for (nodes) |n| if (n.parent) |p| try expect(nodes[p].level + 1 == n.level); } -test "an instrumented program under the debugger tells its calls, variables and stores" { +test "a program recorded by instruction, its variables told: calls, locals, and what they reach" { const rec = canim.open(recordings.list); var arena: std.heap.ArenaAllocator = .init(std.testing.allocator); defer arena.deinit(); const reverse = rec.call("reverse", 0); try expectEqual(@as(usize, 3), rec.allocations.len); - // The call begins where the debugger stopped on entering it: the line of its header, or its first. + // The recording begins in it (`--from reverse`): the call is open from the first stop. try expect(rec.own[reverse.enter] == 17 or rec.own[reverse.enter] == 18); // A local is not its value until its call has stored to it. const first = rec.lineMoment(18, reverse.enter); @@ -88,11 +89,13 @@ test "a walked step is as long as what it changed: fire, a slot a level, the hol var frame: anim.Frame = .{ .t = 0, .clock = 0, .in = undefined, .pointer = .{ 0, 0 }, .arena = arena.allocator() }; scene.frame(&frame); const t = canim.theme.time; - // main's line calls fib(5): registers, the stack, the call. Three levels, 0.30 s apart. + // main's line calls fib(5): registers, the stack, the call, 0.30 s + // apart; the call's node when the projection from its way back arrives. const from = rec.lineMoment(10, rec.call("main", 0).enter); const call = scene.at.reading(from, rec.next(.line, from)); - try std.testing.expectApproxEqAbs(@as(f32, 3 * t.cascade), call.at[2], 1e-4); - try expect(call.total > 2.0 and call.total < 3.0); + try std.testing.expectApproxEqAbs(@as(f32, 2 * t.cascade), call.at[1], 1e-4); + try std.testing.expectApproxEqAbs(@as(f32, 2 * t.cascade + t.project.bracket + t.project.far), call.at[2], 1e-4); + try expect(call.total > 2.0 and call.total < 3.5); // A line that changes nothing shown: fire, advance, rest. var quiet = scene.at; quiet.levels = .{ .cpu = false, .memory = false }; -- cgit v1.3