yamoon
v1.0.5
Published
A DX-friendly, YAML-inspired authoring language that transpiles to idiomatic Hoon.
Downloads
87
Readme
yamoon
A DX-friendly, YAML-inspired authoring language that transpiles to idiomatic Hoon.
yamoon makes writing Hoon pleasant and efficient by hiding its complex rune-based syntax and specific atom molds behind familiar concepts. It provides a robust, type-checked pipeline for building Hoon libraries and Gall agents.
Key Features
- YAML-Native Declarations: Use YAML for structural elements (modules, types, constants).
- Natural Expression Language: Write logic using standard operators (
+,-,==, etc.). - Smart Type System: High-level types (
number,text,bool,?) map automatically to verified Hoon molds. - Advanced Gall Patterns: Automated versioned state, automated poke routing, and structured scry trees.
- Built-in Editor: A web-based IDE with syntax highlighting, code completion, and a live compiler, accessible via
yamoon --serve. - 100% Rune Coverage: Use the
runeescape hatch to express any Hoon pattern while maintaining a clean DSL. - Precise Diagnostics: Position-aware error reporting that points to the exact line and column in your expression strings.
Quick Example
module: examples.math
functions:
square:
input: { n: number }
output: number
return: n * nCompiles to:
|%
++ square
|= n=@ud
(mul n n)
--Documentation
- Getting Started
- Language Reference
- Gall Agent Patterns
- Testing Framework
- Web Editor
- Hoon Verification
- AI Subagent Reference
Development
The project is built in Elm with a Node.js wrapper.
# Install dependencies
npm install
# Build the compiler core
npx elm make src/Main.elm --output=wrapper/elm.js --optimize
mv wrapper/elm.js wrapper/elm.cjs
# Build the IDE
npm run ide:build
# Run tests
npx elm-test
./scripts/test_examples.shLicense
MIT
