Capsule blocks steps 3+4 for v4: capsules are placed in RAM and load their lowest block
Captain Bob ruled: Block n lands at n-R; the lowest block is interpreted; chaining is the developer's; together, v4 first. - v4_blocks_place_capsule copies each Block n into RAM block n - R as 16 lines of 64, space-padded, in any file order. A later block of the same number overwrites. It refuses a block below R. - The mesh's load(), its capsule reader (CAPSULE-OPEN/(LINES), so a child's forth79.4th via BIRTH too), boot.c and test_host_unit's model each place a capsule, then interpret "<lowest> LOAD". - mkdictionary.py skips --> when it types capsules at the hosted prompt. - The v4 capsules are renumbered into R..2R-1, landing at RAM 1900 and up, away from POST's blocks 0-5. Each is chained with -->, and centre.4th's gap at 8103 is closed. Test first: - test_host_blocks.c gained 6 placement checks; it failed to build before. - test_mesh_boot.c checks forth79's lowest block in RAM block 1900; it failed before. After: POST is 990/990; all 52 tests at 64 bits, test-32, hosted-check and ASan/UBSan pass; the amd64 kernel builds; the dictionary has 404 words. Logs are in logs/20261118-capsule-place. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017RzZgrf7V7Zk2iczBXDRbm
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
Block 8200
|
||||
Block 3972
|
||||
( physics.4th -- the words of the loops, v3's physics-freeze )
|
||||
( and inference words, on a node the kernel keeps records )
|
||||
( for: each asks its kernel, which keeps every word's and )
|
||||
@@ -14,7 +14,8 @@ Block 8200
|
||||
-27 KERNEL-WORD INFER-DECAY-SLOPE ( addr u -- d )
|
||||
-28 KERNEL-WORD INFER-WINDOW-WIDTH ( addr u -- n )
|
||||
-29 KERNEL-WORD INFER-RUN ( -- )
|
||||
Block 8201
|
||||
-->
|
||||
Block 3973
|
||||
( and what the last INFER-RUN, or the heartbeat's, found; )
|
||||
( a q is a Q48.16 double, as qmath.f18's )
|
||||
-30 KERNEL-WORD INFER-WINDOW@ ( -- u )
|
||||
@@ -24,7 +25,8 @@ Block 8201
|
||||
-34 KERNEL-WORD INFER-EARLY-EXIT@ ( -- flag )
|
||||
( v3's DECAY_RATE_PER_US_Q16, its compile-time constant )
|
||||
1 CONSTANT DECAY-RATE@
|
||||
Block 8202
|
||||
-->
|
||||
Block 3974
|
||||
( v3's StarForth module: a word's execution heat, by the )
|
||||
( address ' leaves; and the hottest -- the kernel's records )
|
||||
-35 KERNEL-WORD ENTROPY@ ( addr -- n )
|
||||
@@ -40,7 +42,8 @@ Block 8202
|
||||
." ==================================" CR
|
||||
(HOT#) MIN 0 ?DO I (HOT) SWAP I 1+ 0 .R ." . "
|
||||
>NAME COUNT TYPE ." : " 0 .R CR LOOP ;
|
||||
Block 8203
|
||||
-->
|
||||
Block 3975
|
||||
( WORD-ENTROPY: every word with heat, then the totals, as v3 )
|
||||
VARIABLE (WE-T) VARIABLE (WE-N)
|
||||
: WORD-ENTROPY ( -- )
|
||||
@@ -56,7 +59,8 @@ VARIABLE (WE-T) VARIABLE (WE-N)
|
||||
." Total words: " (WE-N) @ 0 .R CR
|
||||
(WE-T) @ IF ." Average executions per word: "
|
||||
(WE-T) @ (WE-N) @ / 0 .R CR THEN ;
|
||||
Block 8204
|
||||
-->
|
||||
Block 3976
|
||||
( (- skips its input to the matching close paren, nesting, )
|
||||
( as v3's code does -- its documentation says to the line end )
|
||||
: (- ( -- ) 1
|
||||
|
||||
Reference in New Issue
Block a user