summaryrefslogtreecommitdiff
path: root/docs/typ
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-18 22:03:14 -0300
committerGabriel Schneider <[email protected]>2026-11-18 22:23:51 -0300
commit99f5b10eccd95aa0066ea6fe6bb75f367ab56a47 (patch)
tree813596ea84318a7bae4fd7416ba463de8e3b7107 /docs/typ
parent92d553123673376adf6126ab90d49a22c5b833d2 (diff)
downloadpardes-99f5b10eccd95aa0066ea6fe6bb75f367ab56a47.tar.gz
pardes-99f5b10eccd95aa0066ea6fe6bb75f367ab56a47.zip
core: src/ becomes core/, pardes.zig its root.zig (the reorganisation's tree, step 2d), and every mention of a src/ path follows: the build's paths, the core's imports of its root, the tests that read the repository's files by path (lspbench's, look.zig's spans over core/look.zig), the comments that cite files, the documents and the manual (the typst corpus reads core/tutor.txt and core/plumbing); left as they were: the /src tree's served names (src/pardes.zig and the rest are the 9P tree's, not the repository's), the CHANGELOG's history, fixtures that are only strings; fs-unit-test runs from the core's root (a module of the core rooted at fs.zig had the runtime's and the devices' `core` be fs.zig); nothing else changes: the ledger (pardes.test.* now root.test.*), frames byte-identical, replicas and process-test the base's
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
Diffstat (limited to 'docs/typ')
-rw-r--r--docs/typ/README8
-rw-r--r--docs/typ/book.typ2
-rw-r--r--docs/typ/building.typ40
-rw-r--r--docs/typ/guide.typ4
-rw-r--r--docs/typ/reference.typ24
-rw-r--r--docs/typ/running.typ2
-rw-r--r--docs/typ/style.typ12
7 files changed, 46 insertions, 46 deletions
diff --git a/docs/typ/README b/docs/typ/README
index 641343f1..88f24343 100644
--- a/docs/typ/README
+++ b/docs/typ/README
@@ -14,7 +14,7 @@ docs/typ: the Typst documentation corpus
file imports the figure it shows from here.
cheatsheet-a4.typ output wrapper: the one-page A4 cheatsheet.
book.typ output wrapper: an A4 book, title page, contents,
- every chapter, then the tutor (src/tutor.txt).
+ every chapter, then the tutor (core/tutor.txt).
../site/site.typ output wrapper: the website, a page per chapter plus
the landing page and the tutor, in one Typst bundle
run (see docs/site/README).
@@ -36,7 +36,7 @@ Build (from the repo root):
typst compile --root . --ignore-system-fonts docs/typ/book.typ
typst compile --root . --format bundle --features bundle,html docs/site/site.typ OUT
zig build site -Dplatform=tui --prefix DIR # DIR/share/doc/pardes/site/
-(--root . because book and HTML read the tutor from src/tutor.txt.)
+(--root . because book and HTML read the tutor from core/tutor.txt.)
The contract for content files
------------------------------
@@ -113,7 +113,7 @@ builtins-tui.json and builtins-gui.json are every builtin of the terminal
and the window build (name, leader, Help's other shortcuts, arg, scope,
setting, choices, doc), written by `zig build builtins-json -Dplatform=tui`
and `-Dplatform=gui` from the registry and the Help rows
-(src/builtins_json.zig). style.typ merges them, marking each word "both",
+(core/builtins_json.zig). style.typ merges them, marking each word "both",
"tui" or "gui". The doc steps refresh their build's file first, and each
build's unit-test fails when its file is stale. #word takes a name from
either file. builtins.typ draws it as the
@@ -123,7 +123,7 @@ in what order.
The drift test
--------------
The unit test "docs/typ names only words, keys and default tags that
-exist" (src/config.zig) reads every .typ here and fails when a word(),
+exist" (core/config.zig) reads every .typ here and fails when a word(),
key(), keys() or tag() names a builtin, key binding or default tag that
pardes no longer has. Pass these functions string literals, so the test
can read them.
diff --git a/docs/typ/book.typ b/docs/typ/book.typ
index b2245372..668b47a3 100644
--- a/docs/typ/book.typ
+++ b/docs/typ/book.typ
@@ -1,7 +1,7 @@
// The book: every topic in reading order, then the tutor. Facts live in the
// content files named by `chapters` in style.typ; this is layout only.
// typst compile --root . --ignore-system-fonts docs/typ/book.typ
-// (--root . because the tutor is read from src/tutor.txt.)
+// (--root . because the tutor is read from core/tutor.txt.)
#import "style.typ": palette, mono, chapters, tutor-path, doc-links, tagline
#set document(title: "pardes")
diff --git a/docs/typ/building.typ b/docs/typ/building.typ
index 9026aa4f..5273298e 100644
--- a/docs/typ/building.typ
+++ b/docs/typ/building.typ
@@ -76,7 +76,7 @@ must share with its session; `pardes --help` lists every flag.
== As a library <library>
A Zig package that depends on pardes is given one module and nothing of
-the editor: `pardes-syntax` (`src/lib_syntax.zig`), for a program that
+the editor: `pardes-syntax` (`core/lib_syntax.zig`), for a program that
draws source text itself and wants it parsed and coloured as pardes has
it.
@@ -118,7 +118,7 @@ package, and `zig build lib-test` builds and runs it.
=== The editor
-`pardes-editor` (`src/lib_editor.zig`) is the text pane as a library:
+`pardes-editor` (`core/lib_editor.zig`) is the text pane as a library:
helix's keys on a text kept in memory, no files, commands, builtins,
prompts or views. A package asks for it, and is then given uucode, mvzr
and vaxis's grapheme width besides; one that does not fetches nothing more.
@@ -161,7 +161,7 @@ zig build core-test core tests on the core without a terminal (no ghostty
that needs a terminal skips; the one to iterate on
zig build shell-test the same tests and the native shell's, with the terminal,
without the perf gate
-zig build term-test the terminal module's own tests (src/term/)
+zig build term-test the terminal module's own tests (core/term/)
zig build pane-test pane, output and namespace integration tests
zig build kitty-test kitty graphics conformance of terminal panes, at the core
zig build kitty-harness kitty graphics through a pane end to end (a fake kitty
@@ -209,7 +209,7 @@ zig build cheatsheet render the cheatsheet PDF (needs typst)
[--replay-with=<pardes-gui>]` records and replays the tty cases' real
sessions, their shells' and files' answers on the tape.
- The tutor's practice blocks (`# keys:`, `# before`, `# after` in
- `src/tutor.txt`) are typed by hand; nothing runs them. What pins that
+ `core/tutor.txt`) are typed by hand; nothing runs them. What pins that
behaviour is `hxdiff`, which replays `test/hxcases` against goldens
recorded from a real helix, and its `--parity`, which runs each case in a
file pane and in a shell and demands they agree.
@@ -278,12 +278,12 @@ effects such as spawning processes.
decides who serves it.
- The root module is chosen by platform: `main.zig` (tui, gui),
`macos.zig`. The macOS shell is a library whose host owns `main()`.
-- The terminal is a module of its own, `term` (`src/term/`): the
+- The terminal is a module of its own, `term` (`core/term/`): the
emulator (ghostty-vt), kitty images (wuffs, zstbi), the pager's parse
and the replicas' screen state. It never imports the core; the core
- reaches it through one table of plain-data entries (`src/plain/term.zig`,
- through `src/Term.zig`), chosen at compile time. The records both name
- (cells, colours, keys) are `plain` (`src/plain/plain.zig`, std only).
+ reaches it through one table of plain-data entries (`abi/term.zig`,
+ through `core/Term.zig`), chosen at compile time. The records both name
+ (cells, colours, keys) are `plain` (`abi/plain.zig`, std only).
Every product is built with the terminal; core-test's core is built
without it, so its compile names no ghostty, wuffs, zstbi or C++.
- `memory.limits` is the one home for the core's capacities (selections,
@@ -291,13 +291,13 @@ effects such as spawning processes.
allocator is a DebugAllocator over its arena's reserved region, thread
safe, its checks in Debug builds only.
-Code map: `src/panes.zig` and the pane kinds it names (`src/File.zig`,
-`src/Terminal.zig`, ...), `src/layout.zig`, `src/fs.zig` (host access,
-mounts and resolution) and `src/pardes.zig` (input), with one file per
+Code map: `core/panes.zig` and the pane kinds it names (`core/File.zig`,
+`src/Terminal.zig`, ...), `core/layout.zig`, `core/fs.zig` (host access,
+mounts and resolution) and `core/root.zig` (input), with one file per
thing beside them (`edit.zig`, `normal.zig`, `look.zig`, `exec.zig`,
-`mouse.zig`, ...). `src/ninep/` is the control tree, `src/daemon.zig` the
-per-user daemon and a terminal's stub, `src/wire.zig` the input
-wire a remote client will speak, `src/lsp/` the
+`mouse.zig`, ...). `core/ninep/` is the control tree, `runtime/daemon.zig` the
+per-user daemon and a terminal's stub, `abi/wire.zig` the input
+wire a remote client will speak, `core/lsp/` the
language-server client; `test/` holds harnesses, goldens and helix cases,
`build/` the process tests' build steps.
@@ -318,7 +318,7 @@ edit) the file's revision reject a stale reply. A process that never calls
== The daemon and detached sessions
-One `pardes --daemon` per user (`src/daemon.zig`) listens on
+One `pardes --daemon` per user (`runtime/daemon.zig`) listens on
`pardes-daemon.sock` in the runtime directory, its `.lock` flocked for its
life; the first session that finds none starts it (a double fork and an
exec) and it exits a second after it holds nothing. It is nobody's parent:
@@ -343,7 +343,7 @@ own process, ended by its hangup.
A replica (a client running its own copy of the core, phase 5 of
`docs/next-daemon.md`) connects to `pardes-replica.sock`, a stream socket
-beside it that `ssh -L` can forward. `src/wire.zig` is its
+beside it that `ssh -L` can forward. `abi/wire.zig` is its
protocol (its `version`): fixed-width little-endian fields, a 5-byte header
(tag, then a u32 length), the hello, a ping, the input events. The hello
names a session and carries the client's semantics hash (the protocol,
@@ -354,9 +354,9 @@ nobody has, in words, and hands an accepted connection to its session
(`SCM_RIGHTS`), which welcomes it and from then on is the one it talks
to: the session sends the dump the client loads, then each step's tape and
its terminals' screens, and the client sends its inputs
-(`src/replica.zig`; #doc("running") draws it).
+(`core/replica.zig`; #doc("running") draws it).
-#word("Upgrade") (`src/upgrade.zig`) execs the path the session was started
+#word("Upgrade") (`runtime/upgrade.zig`) execs the path the session was started
from, at a step boundary, after asking it `--version`: the session's dump
is committed to the state file as `upgrade-<pid>` (the build before wrote
`pardes-upgrade-<pid>.dump`, which this one still reads, for one release), and its pty masters,
@@ -383,10 +383,10 @@ shared code.
- The engine (`fs.Server`) owns fids, permissions, directory reads,
flushes and what a hangup releases; it allocates nothing and makes no OS
- calls. The control tree in `src/ninep/` is its backend: `tree.zig`
+ calls. The control tree in `core/ninep/` is its backend: `tree.zig`
(nodes, dispatch), `pane.zig`, `ctl.zig`, `cols.zig`, `addr.zig`,
`pty.zig`, `events.zig` (event and log), `screen.zig`, `sources.zig`.
- `src/9p.zig` names the editor's engine settings: msize 65536, 256 fids,
+ `runtime/9p.zig` names the editor's engine settings: msize 65536, 256 fids,
128 held reads a connection, names up to 255 bytes.
- A read, write, open, clunk, remove or truncating wstat can park; a walk,
attach, stat, create or rename cannot. Every Rread is clamped to the
diff --git a/docs/typ/guide.typ b/docs/typ/guide.typ
index 9bbdba65..e69c756a 100644
--- a/docs/typ/guide.typ
+++ b/docs/typ/guide.typ
@@ -395,7 +395,7 @@ Shell zsh
#word("DumpConfig") opens every live setting as the line that sets it.
#word("Dump") saves the workspace and #word("Restore") brings it back
(what a dump keeps is in the reference). Keys are compile-time, in
-`src/config.zig`.
+`core/config.zig`.
= Questions <questions>
@@ -409,6 +409,6 @@ Shell zsh
pass kitty's protocols, #key("Shift-Esc") is a plain Esc and images draw
as glyph art.
/ Does my helix config carry over?: No. The keys are compiled in
- (`src/config.zig`); `~/.config/helix` is not read.
+ (`core/config.zig`); `~/.config/helix` is not read.
/ How do I quit?: #key("SPC q"), or #word("Exit") in any tag.
/ What does "pardes" mean?: The name of the four levels of reading a text in rabbinical exegesis (#link("https://en.wikipedia.org/wiki/Pardes_(exegesis)")[Wikipedia]).
diff --git a/docs/typ/reference.typ b/docs/typ/reference.typ
index 47014d1b..2562c91b 100644
--- a/docs/typ/reference.typ
+++ b/docs/typ/reference.typ
@@ -17,7 +17,7 @@ it names, or else run it as a shell line. The files #file("look") and
= The tree <tree>
#fstree(```
-README the one-screen summary (src/fs-help.txt) @other-files
+README the one-screen summary (core/fs-help.txt) @other-files
index a line per pane: serial kind dirty name column @rules
status pid, version, panes @other-files
look write a line: a #word("Look") at the pane with the keyboard; read: the serials touched @look-and-exec
@@ -378,7 +378,7 @@ takes (#word("Theme") `orchard`, #word("Verbose") `on`, #word("DumpDir") `<dir>`
frontend lacks as a comment (`# GripWidth unsupported`), so writing back what it
reads changes nothing.
Writes take settings and session builtins (`scope = .session` in
-`src/builtins.zig`), acting at the pane with the keyboard:
+`core/builtins.zig`), acting at the pane with the keyboard:
- A setting written bare steps to its next value (a switch flips). A
value it does not take is `bad value in control message; ...` naming what it takes;
@@ -487,9 +487,9 @@ rows) and the window's caret eases to its place.
may lower the contrast of text, the selection or a focus indicator.
Resting the pointer on text for about 32 ms (`look_preview_delay_frames`,
-2 frames, in `src/config.zig`; `null` turns it off) tints what #word("Look") would take, with no other effect. A terminal's or a `+Pager`'s
+2 frames, in `core/config.zig`; `null` turns it off) tints what #word("Look") would take, with no other effect. A terminal's or a `+Pager`'s
#word("Filter") keeps each foreground at least `tty_filter_min_contrast`
-(WCAG 1.5, `src/config.zig`) against its background.
+(WCAG 1.5, `core/config.zig`) against its background.
= Columns and tags <columns-and-tags>
@@ -735,7 +735,7 @@ over the match where the search starts.
Patterns are mvzr's (classes, `\d\w\s`, `{m,n}`, lazy `*?`), searched as
sam searches, line by line: `^` and `$` match at any line's start and end,
`.`, `\s` and `[^...]` never match a newline (helix's `\s` and `[^...]` do:
-there `S\s+` splits off a line's newline, here `S\s+|\n` does). The same code (`src/regexp.zig`)
+there `S\s+` splits off a line's newline, here `S\s+|\n` does). The same code (`core/regexp.zig`)
serves addresses, #word("Edit"), and normal mode's #key("s") and #key("S"). The
ceiling:
@@ -1040,7 +1040,7 @@ own: a file or directory opened, else the word searched for.
place. A session starts with the plumbing file's rules, #word("Plumb")
(`plumbing` in the configuration directory, beside `init`; saved, its
rules are in force), or without one `include basic`, pardes's own
- (`src/plumbing`, below). A write adds rule sets, each
+ (`core/plumbing`, below). A write adds rule sets, each
read as its blank line comes, the rest at the close (refused there, it
is an `err` in the log alone; Plan 9's loses it); `>` replaces them
all. One open writes at a time (`file in use`). Kept in a dump.
@@ -1050,7 +1050,7 @@ own: a file or directory opened, else the word searched for.
were. `$1`-`$9` are refused: pardes's regular expressions
(#doc("reference", section: "regexp")) have no submatches; write `$0`
and several `matches`, as Pike's two patterns do. `include basic` is
- `src/plumbing`; another name is the configuration directory's file, an
+ `core/plumbing`; another name is the configuration directory's file, an
absolute one where it says.
- #file("/plumb/send") takes a message, plumb(6)'s six lines (`src`,
`dst`, `wdir`, `type`, `attr`, the data's length) and then the data,
@@ -1095,7 +1095,7 @@ own: a file or directory opened, else the word searched for.
that wants one says `sh -c '...'`); a failure to start it is said, and
logged as an `err`. Its directory and words fit in 256 bytes.
-The default rules, `src/plumbing`, keep #word("Look")'s ways: a URL to
+The default rules, `core/plumbing`, keep #word("Look")'s ways: a URL to
the browser; a bare `.diff` or `.patch` stacked in a +Diff (#word("Diff")
with the file, which declines one with no hunk, opened as text then); an
existing directory or file to `edit`, Look's own open (a kind's file in
@@ -1106,18 +1106,18 @@ sends to `edit` (`src` `pager`, `type` `text/x-diff`, `action=showdata`
and the +Pager's `filename`), made `showdiff`: stacked in a +Diff in the
+Pager's place. Text paged that is no diff is not sent:
-#raw(read("../../src/plumbing"), block: true)
+#raw(read("../../core/plumbing"), block: true)
= Addons <addons>
An addon is a shared library that brings one kind of pane: a picture, a
-game, a plot. It is written against one header, `src/kinds/pardes_addon.h`,
+game, a plot. It is written against one header, `abi/pardes_addon.h`,
in C or anything that speaks C, and links nothing of pardes: the records
are the header's, and what pardes does for it (an allocation from the
pane's arena, memory that outlives a call, a job off the loop, a Look or an
Exec, a message, a new text pane, its selection) it is handed at load.
`addons/fake/fake.c` uses every function; a kind with only a head and
-`paint` is a valid one. In Zig, `src/kinds/addon.zig` (over the same
+`paint` is a valid one. In Zig, `abi/addon.zig` (over the same
header, and nothing of the core) makes the `pa_ops` from a struct of the
functions a kind has (`pub const pardes_addon = addon.ops(Snake);`, and
`addon.exportLib(&pardes_addon)` in a `comptime` block, which exports it
@@ -1129,7 +1129,7 @@ and views, a window to `put` text in (column first, where the header's
every tick, a body written (at most 4 KiB) or held (any length), an `init`
at load, a struct's bytes as its record, and its own `zig test` (`zig
build addon-test` runs them); a Zig kind outside the tree runs `zig
-translate-c src/kinds/pardes_addon.h` once for the header:
+translate-c abi/pardes_addon.h` once for the header:
`addons/snake/snake.zig` is a game in it. Pictures
are an addon too, `addons/image/image.zig` (PNG, JPEG, GIF, BMP, PPM, PGM and
TGA through stb_image, at most 1280 pixels a side), which `zig build image`
diff --git a/docs/typ/running.typ b/docs/typ/running.typ
index 01fb7f32..7e0d16d4 100644
--- a/docs/typ/running.typ
+++ b/docs/typ/running.typ
@@ -185,7 +185,7 @@ of the session or a divergence of its own. `pardes attach /run/x.sock:work`
// only); main.zig:1544-1560 (no daemon reached: no fork); tui.zig:1352-1353,
// gui.zig:2483, host_io.zig:227 (Detach and Adopt refused);
// replica.zig:1900-1905 (a client only through the daemon);
-// pardes.zig:113 (can_attach); main.zig:1498-1500 (a far attach needs no
+// core/root.zig:117 (can_attach); runtime/main.zig:1498-1500 (a far attach needs no
// daemon here).
With `PARDES_DAEMON=off`, in a window under test (`PARDES_TEST`), where
none could start, and in the Mac's own build, the session is the process
diff --git a/docs/typ/style.typ b/docs/typ/style.typ
index 5a482cd8..bf005c63 100644
--- a/docs/typ/style.typ
+++ b/docs/typ/style.typ
@@ -5,7 +5,7 @@
// elements and classes for a stylesheet. Page geometry and fonts belong to
// the output wrappers beside this file.
-/// The `atelier` theme (src/themes/atelier.zig): pardes's acme homage,
+/// The `atelier` theme (core/themes/atelier.zig): pardes's acme homage,
/// butter paper and blue-green tags.
#let palette = (
paper: rgb("#fffdeb"),
@@ -67,7 +67,7 @@
#let tagline = "acme's tags and three buttons, helix's keys, terminals as panes, the editor as a virtual filesystem over 9P"
/// The tutor, shown as it is in the editor (`Tutor`), from the repo root.
-#let tutor-path = "/src/tutor.txt"
+#let tutor-path = "/core/tutor.txt"
/// How much room tables and shell lines get: "roomy" (the book, the HTML)
/// or "tight" (the A4 sheet sets it).
@@ -180,13 +180,13 @@
/// A tag word or builtin, drawn as a thing to click: the tag's ground and
/// ink in the tag's monospace, over a rule. Look and Exec take acme's look
-/// and exec sweep colours (green and red, src/themes/acme.zig) for the
+/// and exec sweep colours (green and red, core/themes/acme.zig) for the
/// rule; every other word the tag's box colour. In HTML a <code
/// class="word">, so a text browser still shows the plain word.
#let word-accent = (Look: rgb("#006600"), Exec: rgb("#aa0000"))
/// Every builtin of either build, written by `zig build builtins-json`
-/// from the registry and the Help rows (src/builtins_json.zig), a file per
+/// from the registry and the Help rows (core/builtins_json.zig), a file per
/// build: name, leader, also (Help's other shortcuts), arg, scope, setting,
/// choices, doc, and for a shipped addon's word its addon first. Merged here, each with `platforms`: "both", "tui" (the
/// terminal only) or "gui" (the window only).
@@ -310,7 +310,7 @@
(name: "git.0x4200.cafe", web: "https://git.0x4200.cafe/pardes", clone: "https://git.0x4200.cafe/pardes.git"),
),
license: "ISC",
- changes: "https://git.sr.ht/~gbrls/pardes/tree/main/item/src/CHANGELOG.md",
+ changes: "https://git.sr.ht/~gbrls/pardes/tree/main/item/core/CHANGELOG.md",
// built binaries to download: the version they are, where the
// checksums are, and a file per program (install.typ shows them)
download: (
@@ -473,7 +473,7 @@
/// ends in `/`), two or more spaces, a one-line description, and an
/// optional `@label` naming the section that documents it, which becomes
/// a link wherever that section is in the same output. A description may
-/// call #word, #key, #keys or #btn. src/config.zig's
+/// call #word, #key, #keys or #btn. core/config.zig's
/// test reads the same block in reference.typ against the served tree.
#let fstree(spec, root: "/") = {
// a description is text, unless it calls #word, #key or #btn