summaryrefslogtreecommitdiff
path: root/src/kinds/addon.zig
Commit message (Collapse)AuthorAge
* macos: pardes builds for darwin again as far as a Linux host can take it ↵Gabriel Schneider7 days
| | | | | | | (the tui links, the native shell's libpardes.a and its tests compile; the gui stops at SDL's frameworks and xcrun): recvmsg's CMSG_CLOEXEC and close_range are Linux's (darwin marks the received fds FD_CLOEXEC, closes the rest one by one), hungUp asks no fd of vaxis's test tty there, a kind exports pardes_addon only as its own library's root (macOS's libpardes.a had every compiled-in kind's), and macos.zig drops what the rewrite deleted (animation.zig, the CRT post pass and scene clock, pane transitions and their diff, the presentation's pointer map: the C ABI stays, its lists empty), with its scene, panel-order and panel-mask tests and the theme-fade half of its live-session test gone; the rest of upstream a41360e3 is dropped as superseded (views.zig's RenderMotion and drawOneAt, replica.zig's motion, input stamp, drawAt and animating with its two cursor tests, window_fields and the whitespace hunks) Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
* kinds #48, the export rule finished: every Zig kind declares `pub const ↵Gabriel Schneider10 days
| | | | | | | pardes_addon = addon.ops(T)` and calls `addon.exportLib(&pardes_addon)` in a comptime block, which exports it only when the output is a library (Zig 0.17 analyses no `pub const` of a library's root and no comptime block of a type made in a generic function, so the export cannot live in `ops` alone: one comptime line in the kind is the spelling that works), and a pardes with kinds compiled in reads the declarations; image.zig's `pub export`, snake's and life's `export` go, no rename anywhere, and fake.c stays the loader's test, never compiled in Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
* kinds #42, what a Zig kind over a C library needs of the module and the ↵Gabriel Schneider10 days
| | | | | | | core: addon.zig's `init` at load (a library's own setup, MuPDF's allocator) and a body the kind holds (`body(s) []const u8`, any length: a PDF page's text is past body_max), the Debug budget counting only the kind's own time (the file's hash before `open` and pa_api.heap's allocations are the core's: a region's first took 23 ms of a PDF's open, which was the breach), `current` the loop's thread's (a job's heap call is in no call), an Output's arg set from itself (a kind's rows found after its search refill its +Search with its own arg: the @memcpy aliased), and the docs test reading the words of Zig kinds (`.{ .name = "PdfFit"`) beside C's Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
* kinds #34, ABI 3 (§17.8) and the Zig module's final surface (§17.6): tick ↵Gabriel Schneider10 days
| | | | | | | takes a pa_tick and gives the next step and the tag's prefix, which leaves pa_paint; a kind's view(st, pa_view) is told each view by id, pa_window says which view paint is for and whether it shows glyph art, a key and a click the view they came from (in pa_key's and pa_mouse's padding, what §17 left out), pa_api loses view and gains cancel and found (search returns nothing), the head's flags say PA_PICTURES, PA_RASTER_MAX and PA_RECORD_MAX bound a picture and a record (no ask-again), 2.x is refused; addon.zig wraps every pa_ops function and pa_api call (heap as an Allocator, typed Mouse, Key and View, Color.rgb, an optional prefix(s, writer) after every tick, body_max) and refuses at compile time a word for a pane without ctl and a name over 15 bytes Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
* kinds #28, the Life dogfood's fixes: Deadline.every steps a period from when ↵Gabriel Schneider10 days
| | | | | | | 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 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
* kinds #25, addons in Zig: src/kinds/addon.zig, over the translated header ↵Gabriel Schneider10 days
and nothing of the core, makes a kind's pa_ops from a struct of the functions it has (its head from name, version, extensions and words; a public function of no kind's name a compile error), the pane's arena and a job's pa_out as std Allocators, typed keys, a Window to put text in, a Paint for the prefix and placements, tick's flags and a Deadline, dump and load as an extern struct's bytes in one line each, and body and ctl over a Writer; snake.zig and image.zig (stb_image in stb.c, static, beside any zstbi) replace snake.c and image.c with the same goldens, harness and perf cell, and addon-test runs their own zig tests Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge