EVALUATE, INCLUDED, INCLUDE + /mar/fs.hoon#27
Merged
Conversation
EVALUATE ( addr cnt -- ) reads a string from North memory and runs it through parse/eval, inheriting the current interpreter state (dict, base, stacks). This lets words build and evaluate Forth source at runtime. /mar/fs.hoon is a minimal Clay mark for .fs files (North/Forth source), delegating diff/merge to %txt. Required for INCLUDE Clay scries. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
INCLUDED ( addr cnt -- ) reads a path string from North memory, constructs a Clay scry path using our/now/desk from settings, scries the file as %fs mark (wain), joins lines with spaces, and runs the result through parse/eval. INCLUDE <path> is handled in the agent before eval: rewrites 'INCLUDE /lib/utils' to 'S" /lib/utils" INCLUDED' so the path lands in memory and INCLUDED does the Clay work. This keeps INCLUDED a pure lib word while giving INCLUDE standard parsing-word feel at the REPL. desk is injected from q.byk.bowl alongside now/our before each eval. split-on-slash helper added to lib for path segment construction. INCLUDE/INCLUDED require a running Arvo context; not unit-testable in the shell harness (dotket crashes outside Arvo). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
EVALUATE ( addr cnt -- )— pure string eval from North memory; no I/O needed. Also adds/mar/fs.hoonClay mark for.fsForth source files (delegates diff/merge to%txt).INCLUDED ( addr cnt -- )andINCLUDE <path>— load and eval Forth source files from Clay via synchronous.^(dotket) scry.INCLUDEis parsing-word sugar that rewrites toS" path" INCLUDEDbefore eval. Desk name injected fromq.byk.bowlalongsidenow/our.Path convention
Test plan
EVALUATE— 4 unit tests intest-north.sh(arith, word definition, output, HEX mode)INCLUDE/INCLUDEDrequire a running Arvo context — manual ship test after desk commit🤖 Generated with Claude Code