diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-11 09:41:45 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-11 10:14:30 -0300 |
| commit | 390872b7bb9cdcf3e8095442af88af0dfcb40602 (patch) | |
| tree | ab767cf46dfca036e61e0e19bb5e1c4772cb1d4d /anim/scenes/heap.zig | |
| parent | 378379807fb4cd751e90808c8363caddb365bcd8 (diff) | |
| download | computeranim-390872b7bb9cdcf3e8095442af88af0dfcb40602.tar.gz computeranim-390872b7bb9cdcf3e8095442af88af0dfcb40602.zip | |
canim: what the verification review found, fixed
A register's chain reads memory as its panel shows it, and follows again
only after the bytes land: rsi no longer shows what read returns before
the kernel writes it. Bytes keep their old value through the arm and
change at their own strike, in every dump, stack word and loupe. The
dive lands once. Captions lead what they name: the longest still in the
syscalls scene is 2.8 s where it was 13. Pins hold through a sprint; a
row of a view carries the pin of the register that points at it; a left
child's badge sits on its left shoulder; a log scrolls with the row that
arrives. The zoom scene's camera holds the disassembly's rows and the
stack in one view. Six programs, the title says now.
Co-Authored-By: Claude Fable 5.2 <[email protected]>
Claude-Session: https://claude.ai/code/session_016Y9MNCKgYCGiANnEwcEQxa
Diffstat (limited to 'anim/scenes/heap.zig')
| -rw-r--r-- | anim/scenes/heap.zig | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/anim/scenes/heap.zig b/anim/scenes/heap.zig index 544ae91..1f82766 100644 --- a/anim/scenes/heap.zig +++ b/anim/scenes/heap.zig @@ -220,7 +220,10 @@ const Lists = struct { const shows: f32 = if (from == null) after(now, 0, 12) else if (to == null) 1 - after(now, 0, 12) else 1; const nv = v.faded(shows); const r: canim.Rect = .{ .x = xy[0], .y = xy[1], .w = w, .h = h }; - _ = nv.address(r.x + 16, r.y - 8, node, .{ .ink = ui.rgb(theme.color.region.heap) }); + // On its way between the rows its address goes and comes back (the first and last quarter): it never passes over a pin's names. + const travels = s0.row != s1.row or s0.k != s1.k; + const label = if (travels) std.math.clamp(@max(1 - 4 * p, 4 * p - 3), 0, 1) else 1; + _ = nv.faded(label).address(r.x + 16, r.y - 8, node, .{ .ink = ui.rgb(theme.color.region.heap) }); // Nothing turns in a frame: a node that changes lists turns as it lands (its last 12 f), // and its value and link, where they change and are not struck, crossfade with the idea (12 f). const lands = after(now, 36, 12); @@ -346,7 +349,7 @@ const Chunks = struct { // The heap new in this step (the first malloc's): its rows come in, unmarked, over 12 f with memory's slot. const new = !now.resting() and heapAt(f.scratch, c.cursor.rec, now.stops[1]) == null; const comes: f32 = if (new) std.math.clamp(now.since(.memory, 0) / (12.0 / 60.0), 0, 1) else 1; - canim.hexdump.fielded(.{ .u = v.u.faded(comes), .rows = v.rows, .box = v.box }, now, cm.tag + cm.pad, .{ .base = view_base, .len = view_len, .fields = fieldsAt(f.scratch, c.cursor.rec, now.stop(.memory)), .watched = if (new) 0 else std.math.maxInt(usize) }); + canim.hexdump.fielded(.{ .u = v.u.faded(comes), .rows = v.rows, .box = v.box }, now, cm.tag + cm.pad, .{ .base = view_base, .len = view_len, .fields = fieldsAt(f.scratch, c.cursor.rec, now.stop(.memory)), .was = fieldsAt(f.scratch, c.cursor.rec, now.stops[1]), .watched = if (new) 0 else std.math.maxInt(usize), .pins = true }); v.veil(now); } }; |
