summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-17 01:32:18 -0300
committerGabriel Schneider <[email protected]>2026-11-17 12:15:01 -0300
commit62ab82af9da007a8ff04677943809cf541b1e420 (patch)
tree9e0da7051fcf606860ada1d2202f14a768d21182 /src
parent8bf10e316178755b8710e27c807dbf9b6a1d37a8 (diff)
downloadsketchbook-62ab82af9da007a8ff04677943809cf541b1e420.tar.gz
sketchbook-62ab82af9da007a8ff04677943809cf541b1e420.zip
README: one thing a sketch keeps, in one file; what a crash loses; the cap
The manual described a mapped state file, a sessions database beside it, a probe, private files for scripted runs and exits that compact past 64 MiB. Now, in The host: "The save" replaces "State file" (one thing, State, in one file, `<name>.xitdb`; the present restored and replayed at start; keyframes as pages and what they cost, measured; layout migration as before; an old `<name>.state` imported once and left as it was); "Where files go" lists `<name>.xitdb` and the files a sketch appends to, `--state x.state` and `x.xitdb` naming one save; "Sessions" says every run is one, `record` decides how much history is kept (a build that does not record keeps the present and the marks, the last minute of input at most while it runs, none after), a crash loses under a second and the next run starts from the last committed frame; a new paragraph, "The cap": 64 MiB, State half, history dropped oldest first and the file compacted to three quarters (about 170 ms in Debug), the present, marks and clips never dropped, a new mark refused with how to make room. The State row and "Data that grows" say 32 MiB; the appendFile paragraph names `<stem>.<name>` beside the save; scripts and exports save nothing; the Build API loses `probe`, `addProbe` and `probe_exe`; Known limits gains the hash pass's cost. layout.zig's note on what State may hold says where it is saved; micscope's README names its takes `micscope.take-<id>.f32`. Tests: zig build test, 168/168 steps. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
Diffstat (limited to 'src')
-rw-r--r--src/layout.zig7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/layout.zig b/src/layout.zig
index b3c6520..c585d71 100644
--- a/src/layout.zig
+++ b/src/layout.zig
@@ -13,9 +13,10 @@
//! against a leaf's pattern at lookup time.
//!
//! What each kind of sketch memory may hold:
-//! - State is saved to disk and snapshotted: no pointers, and no host
-//! handles (images, sounds, buffers), which only mean something in the
-//! process that made them.
+//! - State is saved, the one thing a sketch keeps, in keyframes of its
+//! save: no pointers, and no host handles (images, sounds, buffers),
+//! which only mean something in the process that made them; at most
+//! `max_state` bytes.
//! - Session lives in this process: anything, as long as pointers go into
//! memory the host owns (its heaps, mapped files), never into the sketch
//! library, which a reload unmaps.