Skip to content

Add HEX/DECIMAL/BINARY/BASE/U.; dot respects print base#26

Merged
sigilante merged 3 commits intomasterfrom
sigilante/output-formatting
Apr 14, 2026
Merged

Add HEX/DECIMAL/BINARY/BASE/U.; dot respects print base#26
sigilante merged 3 commits intomasterfrom
sigilante/output-formatting

Conversation

@sigilante
Copy link
Copy Markdown
Owner

Summary

  • settings-map field base changed from @ud to @tas — stores the print aura tag ('ux', 'ud', 'ub') rather than a raw integer. Bunt ('') is treated as decimal throughout.
  • New arms ++num-to-hex-tape (uppercase, no prefix), ++num-to-bin-tape, ++num-to-base-tape (dispatches on aura tag).
  • HEX, DECIMAL, BINARY set the base tag; BASE pushes the numeric equivalent (16/10/2); U. added as alias for .; . and U. now call num-to-base-tape.
  • Standard Forth behavior: HEX 255 .FF , BINARY 10 .1010 , no prefix on output.

Test plan

  • 288 existing tests unaffected
  • HEX 255 ."FF "
  • HEX 16 ."10 " (16 in hex)
  • BINARY 10 ."1010 "
  • HEX then DECIMAL switches cleanly
  • BASE pushes 10/16/2 correctly
  • U. aliases .
  • Base persists across word definitions

🤖 Generated with Claude Code

sigilante and others added 3 commits April 14, 2026 13:32
- settings-map: base=@ud → base=@tas; stores aura tag ('ux', 'ud', 'ub')
  rather than a raw integer, with '' (bunt) treated as decimal
- New arms: ++num-to-hex-tape (uppercase, no prefix),
  ++num-to-bin-tape, ++num-to-base-tape (dispatches on tag)
- run-word: HEX sets base='ux', DECIMAL sets 'ud', BINARY sets 'ub';
  BASE pushes numeric equivalent (16/10/2); U. added as alias for .;
  . and U. now call num-to-base-tape instead of num-to-tape directly
- 13 new tests; docs updated (words.md, architecture.md)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… AS-CORD

North now stores the print base as an aura tag (@tas) rather than an
integer. This lets AS-DATE/AS-SHIP/AS-CORD set the tag to 'da'/'p'/'t'
so that . and U. format dates, ships, and cords naturally.

DATE./SHIP./CORD. print TOS directly in their aura format regardless of
the current base. NOW and OUR push the current Arvo time and ship address
(injected by the Gall agent from the bowl before each eval; zero-bunted
to ~2000.1.1 / ~zod in pure-lib contexts).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Completes the symmetric set: INT./DATE./SHIP./CORD. each print TOS in
a fixed aura format, independent of whatever HEX/AS-DATE/etc. is active.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@sigilante sigilante merged commit 7b7726e into master Apr 14, 2026
1 check passed
@sigilante sigilante deleted the sigilante/output-formatting branch April 14, 2026 19:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant