From 333cdea69956adda91f462980a18f5bac6548dda Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Fri, 6 Nov 2026 14:27:06 -0300 Subject: kinds #27, life: addons/life/life.zig is a second shipped Zig addon, Conway's Life in a pane written clean-room against src/kinds/addon.zig and the header alone (steps ten generations a second while focused, space pauses, r reseeds, hjkl and x edit, the prefix the generation and alive count, the body the board, dump and load the board), with its script and golden under addon-test and its own zig tests; the module's timing test and the dogfood that found Kind.step's stale tick clock Co-Authored-By: Claude Fable 5.1 Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge --- addons/life/life.script | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 addons/life/life.script (limited to 'addons/life/life.script') diff --git a/addons/life/life.script b/addons/life/life.script new file mode 100644 index 00000000..fba9cd62 --- /dev/null +++ b/addons/life/life.script @@ -0,0 +1,24 @@ +# pardes --addon-test life.so addons/life/life.script | diff addons/life/life.out - +seed 7 +size 40 36 +tick 100 +tick 100 +tick 100 +# x, Space (pause), x: the cell under the cursor toggled twice +key x x +tick 300 +key lljx +key k +body +dump +key r +# h, Space (resume; a line's ends are trimmed), l. The tick after a key is +# handed the time of the last tick, from before the paused 300 ms, so the +# next tick 100 catches up four generations. +key h l +tick 100 +tick 100 +blur +tick 300 +focus +tick 200 -- cgit v1.3