summaryrefslogtreecommitdiff
path: root/core/root.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-20 02:02:19 -0300
committerGabriel Schneider <[email protected]>2026-11-20 02:32:57 -0300
commitc77e5a09af27976b2375a902ecb8efa428395a0c (patch)
treecb36b7b3c691b4904d2a1c2a182cd747e7c82602 /core/root.zig
parent866e9ed6762f42a32907d63d783464f2c90d5b85 (diff)
downloadpardes-c77e5a09af27976b2375a902ecb8efa428395a0c.tar.gz
pardes-c77e5a09af27976b2375a902ecb8efa428395a0c.zip
tape: the wrappers deleted, step 6c (reports/pardes-handle-69-design.md): a core's host is always its own (a replica's none), the tape only says which functions it has when the core holds another than the last said (noteHost, today's comparison, so a mask lands where it did) and a replica answers by that word (the bool replica, set by its first replay or its join; Tape.has), so Wrap's arity table, hostOf, wrap, the tape's vtable, resync's and Peers.stop's unwrap and apply's three hostOf go; the 9 presence questions are p.tape.has(p, .search); keeps_stopping and forTheView are lists of the table's names, a renamed field no longer compiling there; root.zig's machine scan names host.vtable and host.ctx, which only tape.zig's noteHost line names now (40 lines of core/ named the table at the base); the tape's bytes do not move (semantics 32640d4a722b811c unmoved, cross_replay both ways)
Co-Authored-By: Claude Opus <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
Diffstat (limited to 'core/root.zig')
-rw-r--r--core/root.zig15
1 files changed, 9 insertions, 6 deletions
diff --git a/core/root.zig b/core/root.zig
index 632385a0..5130cde8 100644
--- a/core/root.zig
+++ b/core/root.zig
@@ -599,10 +599,13 @@ test "nothing of a core is a process global: every container-level var in core/
/// The lines of each file of core/ that name the machine outside a test:
/// `std.c.`, `libc.`, `std.posix.`, `getenv`, std.Io's File, Dir, net and
-/// Threaded (a path's text, `Dir.path`, and `max_path_bytes` are none), and
-/// `@import("dev")` and `@import("runtime")`, by file, how many and why. A
-/// step's read of its own machine with no tape diverges a far client, and
-/// the soak (one machine) never sees it: a new line here makes someone look.
+/// Threaded (a path's text, `Dir.path`, and `max_path_bytes` are none),
+/// `@import("dev")` and `@import("runtime")`, and the host's table
+/// (`host.vtable`, `host.ctx`: only the tape's own lines call the host, a
+/// call made past it is no call a replica replays), by file, how many and
+/// why. A step's read of its own machine with no tape diverges a far
+/// client, and the soak (one machine) never sees it: a new line here makes
+/// someone look.
/// The count is a file's, so it cannot tell a step's read from its host
/// half's; the reason says which the file's are.
const machine_lines = [_]struct { []const u8, usize, []const u8 }{
@@ -632,7 +635,7 @@ const machine_lines = [_]struct { []const u8, usize, []const u8 }{
.{ "rollback.zig", 1, "a test helper's directory" },
.{ "root.zig", 4, "dev's modules re-exported (host_io, file_watch, glide, fonts)" },
.{ "selection_pipe.zig", 14, "a pipe's child processes and their files: the host's `pipe` entry" },
- .{ "tape.zig", 11, "the tape's own files and host_io's types: a recording, a replay; the `io` a tape hands a site's body" },
+ .{ "tape.zig", 12, "the tape's own files and host_io's types: a recording, a replay; the `io` a tape hands a site's body; which host the core holds (noteHost), the one file that names the host's table" },
.{ "lsp/lsp.zig", 1, "the language server's client (dev): the host's `lsp` entry" },
.{ "ninep/ctl.zig", 1, "the session's pid in a 9P read: the session's server" },
.{ "ninep/events.zig", 2, "the 9P event log's clock: the session's server" },
@@ -644,7 +647,7 @@ const machine_lines = [_]struct { []const u8, usize, []const u8 }{
/// The lines of `src` that name the machine (`machine_lines`'s rules).
fn machineLines(src: []const u8, gpa: std.mem.Allocator, out: *std.ArrayList(usize)) !void {
- const names = [_][]const u8{ "std.c.", "libc.", "std.posix.", "getenv", "std.Io.File", "std.Io.Dir", "std.Io.net", "std.Io.Threaded", "Io.File", "Io.Dir", "Io.net", "Io.Threaded" };
+ const names = [_][]const u8{ "std.c.", "libc.", "std.posix.", "getenv", "std.Io.File", "std.Io.Dir", "std.Io.net", "std.Io.Threaded", "Io.File", "Io.Dir", "Io.net", "Io.Threaded", "host.vtable", "host.ctx" };
const pure = [_][]const u8{ "std.Io.Dir.path.", "Io.Dir.path.", "std.Io.Dir.max_path_bytes", "Io.Dir.max_path_bytes" };
var open: std.ArrayList(u8) = .empty;
defer open.deinit(gpa);