Hoon School (hsl-2023.3)
Notes on learning Hoon.
A lot of the definitions and code examples are taken directly from either the official documentation on Hoon or from the Hoon School curriculum.
Notes
The git repository with the code (generators gen/
and libraries lib/
) related to the lessons, notes and homework's can be found here.
Main concepts:
- Hoon syntax, expressions (
hoon
andrune
), values (atom
andcell
), data types (aura
) and branching - Irregular syntax, functions (
gate
), types, structures (mold
) and programs (generator
) - Binary trees and addresses
- Cores and recursion (
trap
) - Lists and text (
cord
,knot
,term
, andtape
) - More on cores and doors
- Maps
Additional notes: 8. Assertions and errors 6. Libraries and desks 7. Debugging
Setup
$ git clone https://git.sr.ht/~talfus-laddus/hoon-school
$ urbit -F $HOME/projects/zod
> |mount %base :: create %base folder on earth
Usage
Start continuous synchronisation between the git repository's gen
directory and the %base
desk's gen
directory:
./sync.sh
Then run the fake ship and commit
the files:
$ urbit $HOME/projects/zod
> |start %language-server
> |commit %base :: sync %base desk with earth directly
Finally evaluate a generator (hoon script):
> +list 5
Or build a library:
> =mylibrary -build-file %/lib/mylibrary/hoon
> (myarm:mylibrary 1)
Clear all faces:
:dojo|wipe
Resources
- Pronouncing Hoon
- Urbit Userspace Style Guide
- Tlon Bouncer
- Connects to a running ship and runs a customizable script to merge, mount, rsync, commit, and install.