<feed xmlns='http://www.w3.org/2005/Atom'>
<title>pardes.git/src/Pipe.zig, branch macos</title>
<subtitle>Pardes</subtitle>
<id>https://git.0x4200.cafe/pardes.git/atom?h=macos</id>
<link rel='self' href='https://git.0x4200.cafe/pardes.git/atom?h=macos'/>
<link rel='alternate' type='text/html' href='https://git.0x4200.cafe/pardes.git/'/>
<updated>2026-10-30T00:13:33Z</updated>
<entry>
<title>dump: one walker dump of the whole session, by name across builds, for Restore, -l, Handover and the store; dump.zig's hand-written schema gone</title>
<updated>2026-10-30T00:13:33Z</updated>
<author>
<name>Gabriel Schneider</name>
<email>gbrls@0x4200.cafe</email>
</author>
<published>2026-10-29T20:01:35Z</published>
<link rel='alternate' type='text/html' href='https://git.0x4200.cafe/pardes.git/commit/?id=70de5ec5ff3dad01afcc45244ad5e5a481486da6'/>
<id>urn:sha1:70de5ec5ff3dad01afcc45244ad5e5a481486da6</id>
<content type='text'>
A dump is walk.zig's walk of the core with a table of every type it reaches
(fields, enum and union names, number widths), read back by name; terminals
are ghostty's snapshot (screens, history, kitty images); a failed load frees
what it made.

Co-Authored-By: Claude Opus 5.5 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>phase 5 part A: the speculation and rollback engine, in one process: a walker copy put back where it was, replicas that apply their own input at once and take the authority's tape as the truth, and a harness of typists over delayed links</title>
<updated>2026-10-29T23:19:19Z</updated>
<author>
<name>Gabriel Schneider</name>
<email>gbrls@0x4200.cafe</email>
</author>
<published>2026-10-29T21:19:13Z</published>
<link rel='alternate' type='text/html' href='https://git.0x4200.cafe/pardes.git/commit/?id=3b57a72becd6dd6700d996c9c5c000e1cb53e076'/>
<id>urn:sha1:3b57a72becd6dd6700d996c9c5c000e1cb53e076</id>
<content type='text'>
src/rollback.zig: the replica core's allocator (`Epoch`) knows every allocation, and while a copy is held puts off frees of what was there before and refuses to grow it in place, so what the core held stays where it was. The copy (`Copy`) is the digest's walk saving the bytes of every allocation it reaches, field by field (the derived caches and this process's own too: a safe build's free writes over what it frees, and the frame arena points at what the epoch then frees), but the queues a step drains and the frame statistics; a file's text, its line index and its undo snapshots are pinned instead (made anew at each edit, never written; now freed raw everywhere), checked unchanged in a safe build. Put back, each allocation's bytes go back over it, the epoch's allocations are freed and its put-off frees forgotten; let go, they are made. Tree-sitter's trees, the C heap's, are held the same way (syntax.held_trees).

src/replica.zig: an `Authority` records its core's every input to a tape in memory and hands each client's input back as a unit (origin, sequence number, its tape); a `Replica` applies its own input at once, as the authority will (update, then pump), recorded by its own tape (tape.zig's speculation mode), and for each unit in order drops its pending head when the authority recorded the same (inputs, host calls and answers: the fast path), else puts the copy back, replays the units since and this one (every digest checked) and applies its pending inputs again. A host call or a syscall stops a speculation: it is answered harmlessly, undone when it returns, and the input waits for the authority's answer; a clock or environment read is a guess the comparison checks; an emulator is the authority's (terminal.zig's writers stop a speculation; a safe build asserts none changed). The view's events (a resize, the pointer) wait. Messages are bytes: no transport yet.

Each client has a view of its own (src/views.zig): the authority goes into it before the client's input (`toView`, taped), the replica's speculation the same, and the copy walks the views not live too (`parked`, each pane's `pv`).

test/replicas.zig (`zig build replicas`): one authority and N replicas, a view each (`--shared` puts them in one), each client typing monkey.zig's mix at 50-200 ms over its own link (half the RTT plus 10% jitter, in order), the authority's pty echoing 2 ms later; gates: no replica diverges, every replica's digest is the authority's at quiescence; reported per RTT: inputs applied at once, stopped, waiting, fast paths, rollbacks (mispredicted, foreign), and what a speculative apply, a copy and a rollback cost. 3 clients x 100 inputs at 30, 80 and 207 ms: no divergence over 12 Debug seeds and 20 ReleaseFast ones with a filled heap; ReleaseFast p99 a speculative apply under 0.2 ms, a rollback under 1.6 ms. `zig build rollback-bench` times the real copy now (take, release, an edit, restore).

What the replicas found, fixed: a release build reads what the heap had where Debug's fill made two cores agree: `col_panes` and `restore_buf` digested undefined (zeroed now), `terminal.State.reply_dropped` never set at create, `Text.sels` and `PendingPipe.ranges` digested past their length (a walker `len` cuts a slice too). PARDES_REPLICA_FILL fills a replica's allocations to show what is left.

Co-Authored-By: Claude Opus 5.5 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>An Edit's held write: &lt; | &gt; commands no longer block their 9P connection (answered like a held read, so a status read or a filter reading the session's own mount runs beside it), a Tflush or hang-up of the write kills the commands' process groups and changes nothing; e loads by Get's way (asked once, clean after, undo puts the name back); ~ in e r w f B; B checks every name first; an Edit that runs commands is a write of its own, refused up front with other lines; Edit's +Errors output keeps the keyboard where it was; X goes in pane order; a refused write open says its errno; the reference's Coming from acme rows say what Get file's undo, failure and directory refusal, Putall's answer, Zerox across Dump and Incl's directories now do</title>
<updated>2026-10-02T01:07:48Z</updated>
<author>
<name>Gabriel Schneider</name>
<email>gbrls@0x4200.cafe</email>
</author>
<published>2026-10-01T23:50:48Z</published>
<link rel='alternate' type='text/html' href='https://git.0x4200.cafe/pardes.git/commit/?id=406f483288c7689bdd2e1f3f68b276c61ca9412a'/>
<id>urn:sha1:406f483288c7689bdd2e1f3f68b276c61ca9412a</id>
<content type='text'>
Co-Authored-By: Claude Opus 5.5 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>Edit runs acme's file and shell commands: &lt; | &gt; through the session's Shell off the loop (one undo step, a failure changes nothing, its stderr in +Errors, a 9P write answered when done), X and Y over the open text panes, b B D e r f w and the "file" address; checked against sam -d, and the reference's Edit section and Coming from acme row say so</title>
<updated>2026-10-01T23:04:42Z</updated>
<author>
<name>Gabriel Schneider</name>
<email>gbrls@0x4200.cafe</email>
</author>
<published>2026-10-01T20:43:39Z</published>
<link rel='alternate' type='text/html' href='https://git.0x4200.cafe/pardes.git/commit/?id=805b9f188768fee523d462411d846912e0877ff3'/>
<id>urn:sha1:805b9f188768fee523d462411d846912e0877ff3</id>
<content type='text'>
Co-Authored-By: Claude Opus 5.5 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>A selection holds up to 1024 ranges on the desktop, 64 on the board</title>
<updated>2026-10-01T03:12:15Z</updated>
<author>
<name>Gabriel Schneider</name>
<email>gbrls@0x4200.cafe</email>
</author>
<published>2026-09-28T19:24:59Z</published>
<link rel='alternate' type='text/html' href='https://git.0x4200.cafe/pardes.git/commit/?id=7ce5d94b5d48b68c86d015060ebcabe63e299e1a'/>
<id>urn:sha1:7ce5d94b5d48b68c86d015060ebcabe63e299e1a</id>
<content type='text'>
The limit was 64 everywhere, which helix-golf's enumerate_and_align outgrows
(%s |\d+ makes 121 ranges). It is now memory.limits.selections, per platform,
and the counts that hold it are u16. The ranges stay inline in each Text, so a
pane grows by about 80 KiB on the desktop (three texts and the regex prompt's
snapshot); the Pane size budget in Terminal.zig moves from 128 to 160 KiB and
says why.

Co-Authored-By: Claude Opus 5.5 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>$ keeps the selections a shell command exits 0 on, and line end is gl</title>
<updated>2026-10-01T03:12:15Z</updated>
<author>
<name>Gabriel Schneider</name>
<email>gbrls@0x4200.cafe</email>
</author>
<published>2026-09-28T19:15:15Z</published>
<link rel='alternate' type='text/html' href='https://git.0x4200.cafe/pardes.git/commit/?id=06fe2290db7d0eb654b9a908358942cfde298e29'/>
<id>urn:sha1:06fe2290db7d0eb654b9a908358942cfde298e29</id>
<content type='text'>
$ was a second key for line end, which helix never meant: in helix it is
shell_keep_pipe. It now arms the pipe prompt with a $ marker, runs the
command once per range with that range's text on stdin, and keeps the ranges
it exits 0 on; the primary stays if kept, else the last kept range takes
over, and keeping none changes nothing. The runner's answer is all or
nothing, so the command runs in a subshell whose status is echoed as its
output. Line end stays on helix's own gl and End; the snapshots, tutor and
docs that pressed $ for it press gl.

Co-Authored-By: Claude Opus 5.5 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>Let s, S and | pressed in a tag answer for the tag's own text</title>
<updated>2026-10-01T03:12:14Z</updated>
<author>
<name>Gabriel Schneider</name>
<email>gbrls@0x4200.cafe</email>
</author>
<published>2026-09-28T12:05:35Z</published>
<link rel='alternate' type='text/html' href='https://git.0x4200.cafe/pardes.git/commit/?id=0d04bc9214cccce42d74862b31376d49bdda3956'/>
<id>urn:sha1:0d04bc9214cccce42d74862b31376d49bdda3956</id>
<content type='text'>
A tag is a text like the body, so selecting on a regex and piping act on the
text they are pressed in: a prompt records the text it answers for, the tag
keeps the keyboard while it is typed, and a header's prompt goes on the active
pane's band. `/` still searches the body from anywhere, as acme's Look from a
tag searches the body.

Co-Authored-By: Claude Opus 5.5 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>Make a pane's tag a Text edited with the body's own keys</title>
<updated>2026-10-01T03:12:14Z</updated>
<author>
<name>Gabriel Schneider</name>
<email>gbrls@0x4200.cafe</email>
</author>
<published>2026-09-28T03:01:57Z</published>
<link rel='alternate' type='text/html' href='https://git.0x4200.cafe/pardes.git/commit/?id=23f430573efe4f6ef55b0180aa0d742ff4eca1d9'/>
<id>urn:sha1:23f430573efe4f6ef55b0180aa0d742ff4eca1d9</id>
<content type='text'>
The tag was a fixed buffer with its own one-line editor, a cursor measured
across the path, and a hijack of the body's mode while it was typed into.
It is now the pane's second Text: its own characters after the computed
prefix (path, dirty marker, PDF page), which is never stored in it, so a
rename or a dirty marker never moves its cursor. Normal and insert mode are
the body's, undo included; `:` moves the keyboard between body and tag, the
tag remembers its cursor and starts on Save, and executing a word from it
hands the keyboard back. The mouse still sees the prefix: a sweep selects
across it and a click on the path drafts a new name.

Co-Authored-By: Claude Opus 5.5 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>Give prompts their own line to type into instead of the tag's tail</title>
<updated>2026-10-01T03:12:14Z</updated>
<author>
<name>Gabriel Schneider</name>
<email>gbrls@0x4200.cafe</email>
</author>
<published>2026-09-28T02:42:53Z</published>
<link rel='alternate' type='text/html' href='https://git.0x4200.cafe/pardes.git/commit/?id=9584b0682b45f17aaa42157540947904d867777a'/>
<id>urn:sha1:9584b0682b45f17aaa42157540947904d867777a</id>
<content type='text'>
A search, pipe or Save prompt wrote its marker and answer onto the end of
the tag, so the tag's cursor, its selection, its 9P writes and a prompt
abandoned by a click all shared one buffer: the abandoned text stayed in
the tag and a 9P write landed inside the prompt. The answer is now its own
Text on the pane, typed in insert mode and shown on the notice band where
it was already drawn, and the tag never holds any of it.

Co-Authored-By: Claude Opus 5.5 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>Give a pane's body its own Text holding the cursor, selections, mode and undo</title>
<updated>2026-10-01T03:12:14Z</updated>
<author>
<name>Gabriel Schneider</name>
<email>gbrls@0x4200.cafe</email>
</author>
<published>2026-09-28T02:06:11Z</published>
<link rel='alternate' type='text/html' href='https://git.0x4200.cafe/pardes.git/commit/?id=95a3a1bb822e583988bfe0f312d0ef219b27a454'/>
<id>urn:sha1:95a3a1bb822e583988bfe0f312d0ef219b27a454</id>
<content type='text'>
acme keeps what edits a text in its Text (dat.h:171-190) and the window
holds a body and a tag of that type. The cursor, the selections, the modal
state and the edit-buffer undo move off Pane into Text.zig, Pane holds
them as its body, and the edit and normal-mode operations take the Text
they edit. Nothing changes in behaviour; this is the step that lets the
tag become a second Text.

Co-Authored-By: Claude Opus 5.5 &lt;noreply@anthropic.com&gt;
</content>
</entry>
</feed>
