feat(v4): Phase 7 Task 4 -- v3's entropy, TOP-WORDS, WORD-ENTROPY and (- words (#189)
capsules/v4/physics.4th, blocks 8202-8204: ENTROPY@ ENTROPY! RESET-ENTROPY as kernel requests -35..-37 (a word's heat by the address ' leaves, a data word's too; an error for what is not a word, as v3's); TOP-WORDS and WORD-ENTROPY in StarForth, printing in v3's form what the kernel gives them through (HOT#) (HOT) (XT-HEAT), -38..-40 (the i-th hottest in v3's stable order); (- in StarForth, skipping to the matching close paren with nesting, as v3's code does. Tests first: test_mesh_boot.c 101 checks, 110 on, 98 without opcode physics. Listing: 403 live words. amd64 PASS, word_count=403. Not pushed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017RzZgrf7V7Zk2iczBXDRbm
This commit is contained in:
@@ -187,8 +187,14 @@ Phase 4).
|
||||
code defined at run time (dictionary space), or is INTERPRET's or EXECUTE's dispatch; the system's own
|
||||
calls among its words, none. `3 4 + .` counts 4, as v3. Test first (90 checks; 99 on; 87 without
|
||||
opcode physics). amd64 PASS: promotions=136 (fewer: the interpreter's own calls are no longer words run).
|
||||
- [ ] The entropy and top-words words (`starforth_words_test.c`): `ENTROPY!` `ENTROPY@` `RESET-ENTROPY`
|
||||
`TOP-WORDS` `WORD-ENTROPY`.
|
||||
- [x] v3's StarForth module's physics words, in `physics.4th` (blocks 8202-8204): `ENTROPY@` `ENTROPY!`
|
||||
(a word's heat by the address ' leaves; an error for what is not a word, as v3's) and
|
||||
`RESET-ENTROPY` -- requests -35..-37; `TOP-WORDS` and `WORD-ENTROPY` in StarForth, printing what the
|
||||
kernel gives them (-38..-40: how many have heat, the i-th hottest in v3's stable order, a word's
|
||||
heat), in v3's form; `(-` in StarForth, skipping to the matching close paren with nesting as v3's
|
||||
code does. Test first (101 checks; 110 on; 98 without opcode physics). Listing: 403 live words.
|
||||
**For Task 8:** WORD-ENTROPY prints "Total words", and v4's dictionary is not v3's size -- that line
|
||||
cannot print v3's number; TOP-WORDS' hottest words are v4's system words, not v3's.
|
||||
### Task 5: the StarForth words (Phase 3's: `init.4th`, `starforth.4th`), and their POST
|
||||
### Task 6: the ACL (Phase 4's: `ACL.4th`, the word card, the countdown), and its POST
|
||||
### Task 7: the block cases (Phase 5's part)
|
||||
|
||||
Reference in New Issue
Block a user