summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAge
* Merge the session recorder and the talk primitivesGabriel Schneider2 days
|\ | | | | | | | | | | | | Recording (sessions, marks, clips, the reload speed-ups under them) and anim's Deck with its example talk, together; no conflicts; zig build test: 161/161 steps, 127/127 tests. Co-Authored-By: Claude Fable 5.2 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
| * anim: Event.key, and the talk example runs in a windowGabriel Schneider2 days
| | | | | | | | | | | | An Event says its key (abi.Event.key), which the player and the talk example each spelled out by hand; `zig build talk` shows examples/talk.zig in a window on the generic host, its state under .zig-cache, and `zig build talk-lib --watch` beside it reloads every edit in place. Co-Authored-By: Claude Fable 5.2 <[email protected]>
| * anim: the stock player runs on the DeckGabriel Schneider2 days
| | | | | | | | | | | | | | | | | | | | | | | | The player's State is an anim.Deck plus the viewer's settings; keys and clicks become an Ask: click, space and page down step (space plays or pauses a scene with no pause), page up and backspace go back a step, ] and [ go a slide, P plays or pauses, left/right/home/end/,/. seek through Ask.to and Ask.end. A compiled scene is a talk without gates. The HUD shows the slide and step, and when the talk waits. Exported, each pause holds the scene file's hold (1 s). Its frozen hold (held, stopBetween, proceed) is gone. Scripts read deck.t and deck.playing where they read t and playing.
| * anim: the player's render path moves into anim.PainterGabriel Schneider2 days
| | | | | | | | | | | | | | | | | | | | render, paint, reveal, built, stage, guides and labels move verbatim from player.zig into src/anim/Painter.zig, with the viewer's settings and the Typst module as parameters, so a sketch that runs a Deck itself paints its shot the same way: a Painter in its Session and paint() once a frame. The scene's frame size is anim.width/height and a Shot carries its t. Pixels unchanged: the scene tests' screenshots and all 92 exported frames match the previous build's.
| * anim: talks: gates that let time run on, pause, beside, loop, clear, slides ↵Gabriel Schneider2 days
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and the Deck A talk is a live scene re-run from the top every frame, a function of its time and of the gates opened so far. Frame.gate(open) waits while time runs on and records the value it opened with; pause() is the presenter's click. beside and loop are the sub-animations, slide() the second navigation level, clear() the end of a slide. anim.Deck is the playhead and the gate log as plain data for any sketch's State: update() takes an Ask (next, back, next_slide, back_slide, to, end) and runs the talk with the app mutable, shot() runs it read-only for drawing. A click during a step finishes it; back cuts to the picture held before the last click; an edit that moves the last opened gate moves t with it; exported, every gate holds Deck.hold. Live takes a namespace or a tuple of them (sources) and exposes frame. Builder.pause, Instant.clock and Frame.clock are gone: t runs through gates. A test-anim step runs the module's tests and the player's scenes.
* | Bound a scripted run's memory sessions; check a script records the same twiceGabriel Schneider2 days
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A scripted run from fresh state records in memory, and a very long one grew without end. It stops at 256 MiB (ten hours or more of play at 60 Hz; a write the memory database cannot make, out of memory included, is the same): once, a warning, and no more frames, while what it holds still reads (marks, clips, past sessions). test-same plays test/past.script twice into two databases and compares them value by value with test/same_sessions.zig, but for a session's started and ended (the wall clock): every frame, keyframe, stretch and mark follows from the script alone. A third run from fresh state leaves its state file and no database. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
* | Mend a sessions database a crash tore, compact one at exitGabriel Schneider2 days
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A database whose last commit a power loss tore (its root header written, its bytes not all) was refused and renamed aside, a new one begun. Now it is opened at the last commit before the tear whose trailer verifies and whose sessions read whole, scanned back from the end, as pardes's state file is; renaming it to <path>.broken.<seconds> stays the last resort, when no commit is whole, and nothing is deleted. Every commit leaves the nodes it copied behind, about a kilobyte a second of play: a clean exit compacts the file (into <path>.new, synced, renamed over it) once it is 64 MiB and past twice what its batches and keyframes hold plus 64 MiB. Tests: a database of two sessions, cut at six places inside its last commit, opens at the commit before with every frame of both; one with no whole commit is kept aside byte for byte; a compacted one is smaller and holds every frame and keyframe. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
* | Export a session to a file of its own, and import oneGabriel Schneider2 days
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | export-session [S] FILE writes session S (this run's by default, committed first), with the marks and clips that point into it, as session 0 of a new database: written beside FILE, synced, renamed over it. import FILE appends each session of such a file to this database, from "import <file name>", its marks and clips renamed NAME@<file name> (cut to 32 bytes). The copy is value by value, the same few lines for both, over whatever a session holds; sessions lists where one came from. test-import records test/past.script's session, exports it, imports it into another database and replays it there: the mark it carries is the State half a second in exactly, and two seconds in is frame 120's. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
* | Keep a sketch's files in .sketchbook/, a shipped game's in XDGGabriel Schneider2 days
| | | | | | | | | | | | | | | | | | | | | | | | | | | | zig build run, probe and export pass --state .sketchbook/<name>.state. The host makes that directory with a .gitignore of * (a sessions database grows, and the jj snapshot build_info takes would commit it while under a megabyte), and moves the state and store an older build kept beside it in once, with renameat2(NOREPLACE): when both exist nothing moves and the host says so. Without --state an interactive run keeps its files in $XDG_DATA_HOME/<name>/ (~/.local/share without it), not the cwd; a script or an export still uses sketch.state. test-paths checks all three cases. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
* | Play past sessions back, re-synced at their keyframesGabriel Schneider2 days
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | play session S [at SECONDS] restores the session's keyframe before that time (a binary search over its keyframes' times), replays its frames up to it and leaves it paused there; without a time it plays from the start. At each later keyframe the replay reaches, the State is compared with it over the leaves migration kept: a keyframe taken of what update made (periodic, mark, before a reload, exit) that differs is reported once, "diverged before frame F: N values, first <field>", and every keyframe is restored, so a replay across a jump the log does not hold (set, load, a sketch command) goes on from the State that followed it. A session built from another source or build says so. The console's status line names the session, frame and time, the mark, the clip and where it records. test-past records a session, replays it by the same build (the mark's State exactly, frame 120's two seconds in, no divergence), then by a build with an edited fixture (one divergence, before the mark). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
* | Make snapshots named marks and recordings named clips of sessionsGabriel Schneider2 days
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The state file keeps live state only (SKETCH03, one slot). save NAME is a keyframe and a mark in the sessions database, synced to disk; load, diff, snapshot and expect-snapshot take mark names, through the keyframe's own layout migrated to today's, compared over the leaves migration kept. A file from before (SKETCH01/02) has its used snapshot slots imported as marks "1".."7" at open, then drops them; a run that records nothing leaves them alone. record NAME, stop and play NAME make and play clips: a frame range of a session and its start keyframe, nothing overwritten, nothing invalidated by a later save, no capacity. The 64 MiB .inputs file, its --fresh memset and Timeline's Bank are gone; numbers still work as names, so every existing script runs unchanged. Event times in a clip are the session's, not restarted at record. reload.script also checks that a field a reload drops is still in the keyframe taken before it (expect-key). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
* | Record every run's frames to a sessions database in xitdbGabriel Schneider2 days
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Live play was recorded only after someone typed record N, into 16 fixed slots. Now every run is a session in one xitdb database per sketch, beside its state file (<name>.xitdb): an append-only log of the frames live update was fed, one commit a second of session time, and keyframes of the State at start, every minute, on jumps, before and after reloads and at exit. A kill -9 loses at most the uncommitted second (test-kill). Whether a build records travels in the sketch: App.Options.record, null meaning Debug, reaching the host as Info.record. Scripted runs from fresh state record in memory, exports not at all. Each stretch of a session keeps its build, layout and Info.source: the repository revision (one jj or git call per build, build_info), zig version, backend and mode. Sessions.zig takes plain data (bytes, events, strings, a path, an Io), so a second host can drive it. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
* | Load sketch libraries through a symlink and identify builds by statGabriel Schneider2 days
| | | | | | | | | | | | | | | | | | | | A load copied the whole library to $XDG_RUNTIME_DIR (a read/write loop across filesystems) and then hashed all of it for the build id: 40 ms for a 10 MB Debug library, 200 ms for drat-meout's 58 MB. dlopen only needs a fresh name, so the host links one to an fd open on the library, which also pins the file a build may rename over meanwhile. The build id recordings carry is a hash of the file's inode, size and modification time: Zig's own linker writes no build-id note in Debug.
* | Build layout signatures without std.fmt at comptimeGabriel Schneider2 days
| | | | | | | | | | | | | | | | Each comptimePrint costs about a millisecond of comptime, and a sketch's State, Session and Store reflection makes hundreds: drat-meout's library spent about 0.4 s of its sema on them. Numbers are spelled by a small decimal function instead; the signatures, leaf hashes and tag strings are byte for byte the same, so state files keep their meaning.
* | Compute abi.hash's layout half once per abi change, not in every compileGabriel Schneider2 days
| | | | | | | | | | | | | | | | | | The comptime walk over the shared types cost about half a second of every sketch library's compile. abi_hash.zig runs it at build time, once per change of the abi sources (watched like any input), and build.zig hands the number to host and sketches as the module abi_hash; abi.hash folds in the build as before. The value is the walk's own, computed for the build machine in Debug.
* | Refuse a sketch library built by another compiler, backend or modeGabriel Schneider2 days
|/ | | | | | | | abi.hash now covers the zig version, codegen backend and optimize mode: Zig's own calling convention (Host.VTable, every Allocator) differs between them, so a Debug host loading a ReleaseFast or LLVM library faulted on its first draw. Libraries export sketch_build, and the host's refusal says what differs and what to run instead.
* gpu: add a post-process pass with optional depth sampling, and describe the ↵Gabriel Schneider2 days
| | | | | | | | | | executor pardes shares `f.postProcess(source, target, .{...})` records a fullscreen pass that samples a completed render into a distinct target image: colour at fragment binding 0 and, with `sample_depth`, depth at 1, which needs the source's latest pass to have depth and one sample (missing depth, multisampled depth and feedback loops are rejected). The scene format's version 4 carries it, the executor records it on the caller's command buffer and owns the sampler, the web host does the same with its texture and sampler pairs, and native profiling reports the work as `postprocess`. The README says how to use it. docs/pardes-rendering.md describes the executor as pardes uses it for addon scenes: a borrowed SDL GPU device, `record` into the caller's command buffer, `run`, `output` and `postProcess`. The working copy as it stood on 2026-11-16; message written by Claude from the diff, at the author's request.
* Add display-paced frame timing and presentation feedback in ZigGabriel Schneider3 days
|
* Add glTF scene rendering, resource setup and 9P controlsGabriel Schneider3 days
|
* host: add optional Tracy profiling and reduce upload allocation stallsGabriel Schneider6 days
|
* Add reusable GPU backdrop filtering to the shared canvasGabriel Schneider6 days
| | | | Draw native GPU frames through the same bounded canvas used by headless capture. Backdrop commands reuse one snapshot and shader state, with an unchanged fallback on unsupported renderers. Verified through native debugger lenses, restart, and repeated font zoom checks.
* frame: a library's own state for the frameGabriel Schneider7 days
| | | | | | | | canim keeps its table of places on the frame rather than in a process global, so two players at once each have their own. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNCKgYCGiANnEwcEQxa
* sketchbook: JetBrains Mono NL (no ligatures) for the code faces, and its ↵Gabriel Schneider7 days
| | | | medium weight (.code_medium)
* sketchbook: JetBrains Mono bundled as three more faces (.code, .code_bold, ↵Gabriel Schneider7 days
| | | | .code_italic), for programs
* sketchbook: text rasterized at one scale and drawn at another ↵Gabriel Schneider7 days
| | | | (f.textScaled), steady under a moving camera
* sketchbook: a scene file says its page colour (background)Gabriel Schneider7 days
|
* sketchbook: dashed strokes in sk.draw (dashed, Tessellation.strokeDashes)Gabriel Schneider7 days
|
* sketchbook: text in six faces of the Go family, all bundled (f.textIn, ↵Gabriel Schneider7 days
| | | | host.textSizeIn, sk.Face)
* sketchbook: anim, manim-style scenes as a module (from the game's vecanim), ↵Gabriel Schneider7 days
| | | | | | | | | | | | | with objects a scene draws itself The player takes its canvas from the room it has and fits the scene's frame into it, plays through and quits when exported, and draws vector objects in runs around custom ones. The renderers' resvg comparison and the timings come along as `zig build diff` and `zig build bench`; the comparison's reference is padded to whole blocks rather than squeezed, which had put Typst text over the limit. Co-Authored-By: Claude Fable 5.2 <[email protected]>
* sketchbook: shapes antialiased up to 3840x2160; SDL's Vulkan backend no ↵Gabriel Schneider7 days
| | | | | | longer defragments (it lost a frame's first draws) Co-Authored-By: Claude Fable 5.2 <[email protected]>
* sketchbook: frames for ffmpeg (--export, on a clock of its own), text sizes, ↵Gabriel Schneider7 days
| | | | | | a font from the environment Co-Authored-By: Claude Fable 5.2 <[email protected]>
* sketchbook: drop a patch leftover (standalone repo: tests pass as they are)Gabriel Schneider7 days
| | | | Co-Authored-By: Claude Fable 5.2 <[email protected]>
* sketchbook: a drawing layer on top, host fixes for replay and migrationGabriel Schneider7 days
|
* sketchbook: Zig 0.17, a Store on disk, requests, a scope (waveform, ↵Gabriel Schneider7 days
| | | | spectrum, spectrogram), audio codecs and fonts, web host
* sketchbook: await in scriptsGabriel Schneider2026-09-25
| | | | | | await FIELD VALUE plays frames until a state field holds the value, for up to a minute: for waits whose length is the sketch's business, such as a line of dialogue typing out.
* sketchbook: fills blendGabriel Schneider2026-09-25
| | | | | | The renderer's draw blend mode was left at SDL's default, none, so every translucent fill (panels, labels, HUD bars) drew opaque natively while the web honored alpha. It blends now.
* sketchbook: what the game's review neededGabriel Schneider2026-09-25
| | | | | | | | | | | - input.started: true on the first update of a run, never after a reload, for a sketch to stop what should not resume from saved state. - A console line that errors fails its script. Sketch commands answer unknown, done or failed (abi.Outcome) instead of a bool that hid errors. - addScript also takes the hot-reloadable library, run through the generic host, so scripts can reload a real build. - Sounds that do not load are .none, not an empty clip. - sk_tag reads an enum field's tag name from the web build, for tests.
* sketchbook: headless runs never open a windowGabriel Schneider2026-09-25
| | | | | | | | The offscreen hints lost to the environment: with SDL_VIDEO_DRIVER=wayland set, every headless test and script opened a real window. They are overrides now. The offscreen driver has no Vulkan surface on every driver, so a headless host's GPU renderer gets no window and draws into a canvas-sized texture, which screenshots read.
* Put the game first: lib/sketchbook, sketches/vecanimGabriel Schneider2026-09-25
The root is the game. The platform library moves to lib/sketchbook (with serve_web.py, which serves any sketch's web build, as a tool of it), and vecanim to sketches/vecanim, still its own package on the same library.