docs(v4.0.0): step 6e -- the plan; a mark on each wire, a sleep woken by a message coming, and the room probe

MESH.md 7d.3 amended while the plan was written: first and next in place
of find by type; sleep is woken by a message coming, not by one being
there; operation 10, room.  7d.4: room for a text's answer is kept on
the wire back.  7d.9: a ping across hops, thought about and not ruled.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
rajames
2026-10-08 12:58:13 -04:00
co-authored by Claude Opus 5.5
parent 7eb545f387
commit 88554666d4
2 changed files with 231 additions and 14 deletions
+65 -14
View File
@@ -786,25 +786,42 @@ the engine and happens whole.
| Operation | What it does |
|---|---|
| 1, look | The seven words of the message at the front of the wire are copied to the word address in A. Nothing is taken. |
| 2, take | The message is copied out, its seven words to A and its text to B, and is off the wire. |
| 3, move | The message goes to the back of the wire of the port in A, with one fewer in its fourth word (how many more nodes may pass it on). |
| 4, drop | The message is off the wire and gone. |
| 1, look | The seven words of the message the wire's mark is at are copied to the word address in A. Nothing is taken. |
| 2, take | That message is copied out, its seven words to A and its text to B, and is off the wire. The mark is then at the one that followed it. |
| 3, move | That message goes to the back of the wire of the port in A, with one fewer in its fourth word (how many more nodes may pass it on). The mark is then at the one that followed it. |
| 4, drop | That message is off the wire and gone. The mark is then at the one that followed it. |
| 5, put | The message whose seven words are at A and whose text is at B goes to the back of the wire. |
| 6, find | The first message on the wire that is to the node in B and of the type in A becomes the one that look, take and drop are about, wherever it is in the queue. |
| 7, next | The same, from after the one found last. |
| 8, sleep | The node is blocked until one of its wires has a message. |
| 9, sleep for room | The node is blocked until the wire has A cells free, or one of its wires has a message, whichever is first. |
| 6, first | The mark is put at the message at the front of the wire. |
| 7, next | The mark is put at the message after the one it is at. |
| 8, sleep | The node is blocked until a message has come to one of its wires since it last fetched "which wires have a message". |
| 9, sleep for room | The node is blocked until the wire has A cells free, or a message has come as in 8, whichever is first. |
| 10, room | Has the wire A cells free? It answers at once and changes nothing. |
- Look, take, move and drop are about the message at the front, unless
find or next has named another.
- Each wire has a mark for the node that reads it: the message that
look, take, move and drop are about. First and next move it; with no
message there, those four answer 3.
- Only 8 and 9 block. A node blocked there executes nothing.
- **Sleep is woken by a message coming, not by one being there.** A node
may leave a message for itself on a wire -- text it will not begin
while it waits for an answer -- and must still sleep.
- The ports themselves stay as they are, a word at a time, for the two
things that are not messages: a newborn node being sent its nucleus
(section 5), and a node's requests to the kernel (section 8).
- The looking words of section 7a, and their lower-number rule, are no
longer used by the nucleus.
*(Changed while the plan was written, 2026-10-08. As approved there was
"find, by type" where first and next are, sleep was "until a wire has a
message", and there was no room. Three reasons. A message a node leaves
for itself at the front of a wire must not keep back the ones behind it
that are for other nodes: so the node goes through a wire message by
message, and the fabric need not know what kind it is looking for. A
sleep that ended whenever a message was there would never sleep with one
left on a wire. And room is Captain Bob's probe -- "a fast, hot probe
into memory for enough space for an x byte message" -- at the one place
it can be certain: the wire a node itself writes to, which nothing else
fills. See 7d.4 and 7d.9.)*
### 7d.4 The nucleus
A node keeps no messages but the one it is doing. The ring of messages
@@ -829,10 +846,18 @@ waiting, the words that turned it, the list of NACKs owed, and
and sleeps again; text for itself from its console ends the text it is
doing in error 21, "Interrupted"; anything else for itself stays on
the wire.
- *`AWAIT`* sleeps (8) and, woken, passes on what is for other nodes and
looks for what would end its wait with find and next: the answer, a
NACK or a believed GONE about the node waited for, or text from its
console. Other messages for itself stay on the wire, in their order.
- *`AWAIT`* sleeps (8) and, woken, goes through each wire with first and
next: what is for other nodes is passed on; what would end its wait is
taken -- the answer, a NACK or a believed GONE about the node waited
for, or text from its console; other messages for itself stay on the
wire, in their order.
- *Room for the answer is kept.* Only a node puts messages on the wires
that lead from it, so room it has found there stays until it uses it.
A node does not begin text unless the wire back toward the sender has
room for the answer (8 cells), and while it does that text nothing
else it puts on that wire -- what it passes on, what it prints -- may
take those 8 cells. So how text ended is never refused at the node
that did the text.
- *Before text begins any of these* it tries the stack it will need,
as `(ROOM)` does now (7c.7). Between texts the rule of 28 values
stands.
@@ -886,6 +911,32 @@ requests stay a word at a time.
commit before gives on the same input, but where 7d.6 says otherwise;
`sanitize`, `hosted-check`, lint, three boots, one hash on all six.
### 7d.9 A ping: thought about, not ruled
Captain Bob, 2026-10-08: "think about sending a ping that's a fast, hot
probe into memory for enough space for an x byte message."
- *At one hop it is in the design:* operation 10, room. It is certain
there, because a node is the only writer of the wires that lead from
it, and 7d.4 uses it to keep room for an answer.
- *Across several hops* a ping would be a message of its own: it names a
length, each node that passes it on asks room for that length on the
next wire, and the node it is for answers that there is room all the
way, or a node on the way answers that there is not. It would let a
sender learn a long message will not get through before sending it.
- *What it cannot be without more:* a promise. Between the ping and the
message another sender may fill a wire on the way. To be a promise
each node would have to keep the room it reported for a while, and
there is no clock (7b.1). The room would have to be given back by a
message, or kept until used.
- *"Hot":* a message's fourth word is to carry heat as well as how many
nodes may pass it on (section 6); nothing acts on heat yet. A ping
that goes ahead of other messages on a wire would be the first thing
to.
Not in step 6e. To be put to Captain Bob: whether a ping across hops is
wanted, and if so whether it promises room or only reports it.
### 7d.8 A later step, not built: the wires in the system's blocks
Captain Bob, 2026-10-08. The system has blocks set aside for it -- the