h0-tape
Work with H0 Tape
Find the native toolchain
Use the H0 version pinned by the project or its CI. From an extracted toolchain, use ./h0 on Linux x64 or .\h0.cmd in Windows PowerShell. If the toolchain directory is on PATH, use h0. Run the commands from the project directory with the appropriate executable path.
If the project has no compiler, use the native release quickstart to choose the archive for the host, verify its SHA-256 digest, and run the bundled calendar. The Linux x64 compiler image is another option when Docker is available. The release notes give Docker commands.
Edit a program
- Check the original file with
h0 check path/to/program.h0. For an existing program, useh0 guide path/to/program.h0for the relevant native grammar and standard-library contracts. Use the same explicit target for guide, check, and build when cross-compiling (for example,--target linux). - Read the project's nearest instructions and follow its existing patterns. For native Tape grammar and layout, read EDIT.md from the v0.1.1 release. Read CORE.md when you need a compiler protocol or a standard-library contract.
- Preserve UTF-8, significant tabs, and the order of Tape sections. Numeric calls resolve by section order, so moving a function can change unrelated calls. Check standard-library imports before adding a library operation. Use native examples for features that must compile with the released seed compiler.
- Re-run the source check, build with
h0 build path/to/program.h0 -o path/to/output, and verify the executable on its target platform. Use an.exesuffix on Windows. Run the project's focused tests when they exist. For the CLI starter, pass the resulting binary totests/check_hash.pyusing Python 3.
Adapt a byte-view pattern
When implementing a loop over a shared byte view, start with the checked byte-view patterns for exact-byte counts, nonzero counts, ASCII digit ranges or a predicate-weighted byte sum. Match the view/scalar roles and the loop index lifetime before adapting the expression. Then check and test the resulting function on its target.