summaryrefslogtreecommitdiff
path: root/anim/src/array.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-11 09:41:45 -0300
committerGabriel Schneider <[email protected]>2026-11-11 10:14:30 -0300
commit390872b7bb9cdcf3e8095442af88af0dfcb40602 (patch)
treeab767cf46dfca036e61e0e19bb5e1c4772cb1d4d /anim/src/array.zig
parent378379807fb4cd751e90808c8363caddb365bcd8 (diff)
downloadcomputeranim-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/src/array.zig')
-rw-r--r--anim/src/array.zig26
1 files changed, 20 insertions, 6 deletions
diff --git a/anim/src/array.zig b/anim/src/array.zig
index 8d53fb8..fad10c5 100644
--- a/anim/src/array.zig
+++ b/anim/src/array.zig
@@ -191,19 +191,23 @@ pub const Array = struct {
// cell to cell as the idea strikes; two in one cell share its pin.
var at_cell: [32]std.ArrayList([]const u8) = @splat(.empty);
var slide: [32]?f32 = @splat(null);
+ // At a sprint the pins hold, and move only where a phrase ends: at the mark's moments.
+ const sprint = now.plan.gait == .sprint;
+ const pin_is = if (sprint) rec.moment(now.marks[1]) else now.moment();
+ const pin_was = if (sprint) rec.moment(now.marks[0]) else now.before();
for (g.indices) |name| {
- const iv = rec.variable(f.scratch, now.moment(), name) orelse continue;
- const here = number(now.moment(), iv.addr, @min(iv.size, 8), true) orelse continue;
+ const iv = rec.variable(f.scratch, pin_is, name) orelse continue;
+ const here = number(pin_is, iv.addr, @min(iv.size, 8), true) orelse continue;
if (here < 0 or here >= count) continue;
const k: usize = @intCast(here);
at_cell[k].append(f.scratch, name) catch {};
- if (number(now.before(), iv.addr, @min(iv.size, 8), true)) |was| if (was != here and was >= 0 and was < count) {
+ if (number(pin_was, iv.addr, @min(iv.size, 8), true)) |was| if (was != here and was >= 0 and was < count) {
slide[k] = @floatFromInt(was);
};
}
// And the registers that hold a cell's address: a pin, where a link lands.
- const is = (now.moment().regs(rec.tid) catch null) orelse @import("ztrace").Regs{};
- const was_regs = (now.before().regs(rec.tid) catch null) orelse is;
+ const is = (pin_is.regs(rec.tid) catch null) orelse @import("ztrace").Regs{};
+ const was_regs = (pin_was.regs(rec.tid) catch null) orelse is;
const ink = context.ink(context.regionOf(moment, v.addr));
for (&at_cell, 0..) |*names, k| {
const addr = v.addr + k * elem;
@@ -218,10 +222,20 @@ pub const Array = struct {
const before = was_regs.named(name) == addr;
const after = is.named(name) == addr;
if (!before and !after) continue;
- const s = ties.pinShows(now, i, .node);
+ const s = if (sprint) blk: {
+ const p = now.moving(.idea, 0, 0);
+ break :blk @TypeOf(ties.pinShows(now, i, .node)){ .old = 1 - p, .new = p };
+ } else ties.pinShows(now, i, .node);
const this = if (before and after) 1 else if (after) s.new else s.old;
if (before != after and indices > 0) text = @min(text, @abs(2 * this - 1));
if (this < 0.5) continue;
+ // Under a sprint's veil the registers' names leave the cells (a cell's
+ // right name would print over the next cell's left), fading through its middle.
+ const veiled = now.sprint_veil;
+ if (veiled > 0) {
+ if (indices > 0) text = @min(text, @abs(2 * veiled - 1)) else shows = @min(shows, std.math.clamp(1 - 2 * veiled, 0, 1));
+ }
+ if (veiled >= 0.5) continue;
names.append(f.scratch, name) catch {};
if (indices == 0) shows = @min(shows, this);
}