summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-17 22:48:05 -0300
committerGabriel Schneider <[email protected]>2026-11-17 22:48:24 -0300
commit6c61169832d6f396ee7a6e9e0b09d9c055d08f8d (patch)
treed07395a8c7aeee0c5583d3b94e36a37464e40e80 /docs
parentb1b69886cce63c53f8407d2a37e29fd8876b5fe8 (diff)
downloadpardes-6c61169832d6f396ee7a6e9e0b09d9c055d08f8d.tar.gz
pardes-6c61169832d6f396ee7a6e9e0b09d9c055d08f8d.zip
docs: three sentences the measurements and the user proved wrong, corrected: running.typ's window client "moves whole rows, with no glide" is "glides as the session's own window does: whole rows go to the session, and the picture moves between them on the client's own clock", and the chapter says what a client costs (10-16 MB a terminal's, about 110 MB a window's, the same as any window, mostly the GPU and display libraries); next-run.md's "+25 MB a client" made the measured figures (true for a terminal's, four or five times too small for a window's; the core is 1-2 MB of it), its "half true" wheel made "not so" (with the face-missing divergence), its Rex client row no longer a thin view: Rex replays the server's stream into its own libghostty and draws locally (the user's correction; the binary links libghostty), the same principle as pardes's, which adds a client applying its own input before the session confirms it; its open question on ps's word brought up to date; each cites .scratch/sketch/reports/pardes-measure.md; the book and the site compile (no code changed, so the suites and the corpus were not run again)
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
Diffstat (limited to 'docs')
-rw-r--r--docs/next-run.md53
-rw-r--r--docs/typ/running.typ23
2 files changed, 50 insertions, 26 deletions
diff --git a/docs/next-run.md b/docs/next-run.md
index 4d9de291..de03bfb1 100644
--- a/docs/next-run.md
+++ b/docs/next-run.md
@@ -74,13 +74,19 @@ counts above include each piece's comments and its callers' lines.
The ruling turns these from objections into work. Each is checked here:
what is true, and whether it was measured.
-- **+25 MB a client.** Measured on 2026-11-06 for the one-client-path step
- (`.scratch/arch/client-report.md:21-22`): idle RSS, median of 3 after
- 4 s idle, a session with a second local attach: the session 34.6 to
- 38.0 MB, the second process 18.6 MB as a stub to 43.8 MB as a client.
- "A second local view costs a second core: about +25 MB in its own
- process and +3.4 MB in the session." The build mode is not stated there.
- Today only a second attach pays it; after, every attach to a detached
+- **What a client costs in memory.** Measured on 2026-11-17
+ (`.scratch/sketch/reports/pardes-measure.md` section A; PSS from
+ `smaps_rollup` after 4 s idle, the installed 0.24 ReleaseFast): a
+ terminal's client is 10-16 MB (20-25 after typing: tree-sitter data the
+ session grows by as much), a window's about 110 MB (187 MB RSS), the same
+ as any window session: three quarters of it the GPU and display
+ libraries and the window's buffers. Its core and the rollback copy it
+ keeps are about 1-2 MB of that. So the "+25 MB a client" measured on
+ 2026-11-06 (`.scratch/arch/client-report.md:21-22`) holds for a
+ terminal's client and is four or five times too small for a window's;
+ what would shed it is a lighter way to draw, not a lighter core. A
+ client adds about 1.3 MB to its session (a terminal's), 13 MB (a
+ window's with addon panes). Today only a second attach pays it; after, every attach to a detached
session does, which is the tmux habit (`pardes --detach=work`, then
`pardes attach work`).
- **An addon's code does not run in a replica.** True, read: a client's
@@ -89,17 +95,22 @@ what is true, and whether it was measured.
what the session's code drew and sends (`replica.zig:309`, `:418-470`;
`Replica.screen` at `:1140-1160`). Not measured: what a Shadow costs a
local client against the session's own frontend drawing the pane.
-- **A window client scrolls whole rows and keeps its own fonts.** Half
- true. Read: a wheel's notch in a client is whole rows with no glide
- (`gui.zig:2147-2150`), as `docs/next-daemon.md`'s GUI replica notes say;
- but a touchpad's fractions are the client window's own picture now, only
- its whole rows going to the session (the test "detached trackpad
- scrolling keeps fractions local and queues whole rows for replication",
- `gui.zig:8042`). Fonts: a client follows the session's font request by
+- **A window client scrolls whole rows and keeps its own fonts.** Not so
+ for the wheel, measured (`.scratch/sketch/reports/pardes-measure.md`
+ sections C and E): a notch in a client glides as it does in the
+ session's own window (5 frames, 0 to -22 px, in both). Only whole rows
+ go to the session (`gui.zig:2147-2161`; its comment and
+ `docs/next-daemon.md`'s GUI replica notes still say "no glide"); the
+ picture moves between them on the client's own clock (`glideFrame`,
+ `gui.zig:3544`). A touchpad's fractions are the client window's own
+ picture too (the test "detached trackpad scrolling keeps fractions local
+ and queues whole rows for replication", `gui.zig:8042`). Fonts: a client follows the session's font request by
the face's name when that face is installed on its machine
(`gui.zig:580-608`, `syncReplicaFont`); its opacity is its own (not in
the client's per-frame chores, `gui.zig:1311-1323`). The note said "keeps
- its own font"; it is corrected there.
+ its own font"; it is corrected there. Measured: a face the client lacks
+ leaves it at its old face and its old size, and it diverged and joined
+ again (2 runs of 2, cause not found).
- **Speed.** "The regular tty and GUI get no slower" is the daemon's first
rule (`docs/next-daemon.md`, decided by the user). After the change, a
reattached session is the client path, not the session's own frontend.
@@ -140,13 +151,14 @@ session in `ps` is either its stub's child or a process of its own.
## Rex beside pardes
From Rex's own help (captured under
-`.scratch/sketch/reorg/pardes-plan/rex/`; nothing else of Rex was run).
+`.scratch/sketch/reorg/pardes-plan/rex/`), and for the client row its
+binary's strings (`/usr/sbin/rex` links libghostty); Rex was not run.
| | Rex | pardes |
|---|---|---|
| Who holds the programs | one server an account holds every session and runs every program (`skill-show.txt`) | each session is its own process, with the truth; the daemon holds a dup of each pty master and a list |
| What starts it | any command starts a missing server (`--autostart`) | the first session starts the daemon; what you start is the session |
-| A client | "one program connected to the server" (`help-client.txt`): a view of the server's state | a process with a whole replica core: its own view, speculation, predicted echo |
+| A client | "one program connected to the server" (`help-client.txt`); not a thin view: it replays the server's stream into its own libghostty and draws locally (the binary links libghostty; the help text does not say so, and this row first called it a view of the server's state: the user's correction, 2026-11-17) | the same principle, the stream shipped and the state derived where it is shown, into a whole replica core with its own view; what pardes adds is a client applying its own input before the session confirms it (speculation, rolled back when the session ordered things otherwise) and a predicted echo |
| Attach | no user's verb; in the API "start receiving its events and get its current view" | today four mechanisms; after this note, one: a client |
| The last client leaves | "the session keeps running" (`api-session.detach.txt`) | the same for a client; today a session's own frontend closing depends on its kind and the daemon |
| Another machine | the same commands with `-S HOST` | `attach HOST:NAME`; a far session's 9P is not reached that way |
@@ -168,9 +180,10 @@ session takes back.
- `--detach` with no daemon starts a session nothing can attach to
(`main.zig:1535-1537` ignores the failed registration). Refuse, or keep
it as a 9P-only session?
-- `pardes ps` says `attached` for a session with a frontend of its own.
- After the change that frontend can only be the first one: keep the word,
- or say `detached` / `with its frontend`?
+- `pardes ps` says "has a frontend" for a session with a frontend of its
+ own (the daemon's list, and so /sessions, still says `attached`, a wire
+ word). After the change that frontend can only be the first one: is
+ "has a frontend" the word, or "with its first frontend"?
- When: the order the user ruled is this vocabulary and the page first,
and the code after sketchbook's steps land (`.scratch/sketch/PARDES.md`,
ruling 4).
diff --git a/docs/typ/running.typ b/docs/typ/running.typ
index 65498380..8177ec39 100644
--- a/docs/typ/running.typ
+++ b/docs/typ/running.typ
@@ -117,9 +117,15 @@ spelling of `attach work`.
// same build, handed on); replica.zig:1-19 (speculation and rollback);
// replica.zig:2013-2023, views.zig:31, Core.zig:1110-1153 (four views, the
// session's own among them); replica.zig:2111-2133 (a client leaving);
-// replica.zig:756-757 (a kind's code runs in no replica); gui.zig:2147-2150
-// (a client's notch: whole rows, no glide); gui.zig:580-608 (a client's
-// font: the session's request, by the face's name on this machine).
+// replica.zig:756-757 (a kind's code runs in no replica); gui.zig:2147-2161
+// (a client's notch: whole rows sent), :3544 (glideFrame: the picture on
+// the client's clock); gui.zig:580-608 (a client's font: the session's
+// request, by the face's name on this machine). Measured 2026-11-17
+// (.scratch/sketch/reports/pardes-measure.md sections A, C and E): a
+// client's notch glides as the session's window does (5 frames, 0 to
+// -22 px); a terminal's client 10-16 MB PSS idle, a window's about 110 MB
+// (187 MB RSS), as a window session's, three quarters of it the GPU and
+// display libraries.
A session draws one frontend of its own, so the second attach is a client.
The daemon checks the client's hello (the session's name, and the client's
build: a client must be the build its session is) and hands its
@@ -132,9 +138,14 @@ A session takes three clients: four views at once, its own among them. A
client's #word("Detach"), or its terminal or window closing, ends that
client only; the last client of a detached session leaves its layout as
the session's, for the next one to find. In a client, an addon's panes
-show what the session's code drew (the code runs only in the session); a
-window client's wheel moves whole rows, with no glide, and it takes the
-session's font only when the same face is installed on its machine.
+show what the session's code drew (the code runs only in the session). A
+window client's wheel glides as the session's own window does: whole rows
+go to the session, and the picture moves between them on the client's own
+clock. It takes the session's font only when the same face is installed on
+its machine. A client costs what a frontend of its kind costs: 10-16 MB
+for a terminal's, about 110 MB for a window's, the same as any window
+(mostly the GPU and display libraries); its copy of the core is the small
+part.
= A far session <run-far>