From b5bb5e8ccf71a5755dde95f04440ee9c6aaa18da Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Fri, 6 Nov 2026 14:36:54 -0300 Subject: kinds #28, the Life dogfood's fixes: Deadline.every steps a period from when it was due while that is under a period behind and re-arms a period from now when it is further behind or more than one ahead (a restored record's), which Life's catch-up and guard lines were and snake's 150 ms now keep without drift; the tick after a key or a focus is told the clock's now, not the last stepped frame's, which lags it while the next wake is to come (the core's, Kind.step: Life's resume no longer jumps four generations); ops refuses at compile time a word that opens no pane, there being no ctl, and its doc names the functions it handles; reference.typ says how a script's key, tick and size work and that a pane a dump loads is a new pane with a new seed, as the header now does Co-Authored-By: Claude Fable 5.1 Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge --- addons/life/life.zig | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'addons/life/life.zig') diff --git a/addons/life/life.zig b/addons/life/life.zig index 5ea9c302..2ef26c56 100644 --- a/addons/life/life.zig +++ b/addons/life/life.zig @@ -29,13 +29,8 @@ const Life = extern struct { pub fn tick(s: *Life, now: u64, flags: addon.Flags) u64 { if (!flags.focused or s.paused) return s.next.stop(); - // A record's deadline is of another clock's origin. - if (s.next.at > now + period) s.next.at = 0; - if (!s.next.due(now)) return s.next.every(now, period); - s.step(); - // From the step's due time, not now: a tick comes on a frame, late. - s.next.at = if (now - s.next.at < period) s.next.at + period else now + period; - return s.next.at; + if (s.next.due(now)) s.step(); + return s.next.every(now, period); } pub fn key(s: *Life, k: addon.Key) bool { -- cgit v1.3