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.


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:

  1. Hoon syntax, expressions (hoon and rune), values (atom and cell), data types (aura) and branching
  2. Irregular syntax, functions (gate), types, structures (mold) and programs (generator)
  3. Binary trees and addresses
  4. Cores and recursion (trap)
  5. Lists and text (cord, knot, term, and tape)
  6. More on cores and doors
  7. Maps

Additional notes: 8. Assertions and errors 6. Libraries and desks 7. Debugging


$ git clone https://git.sr.ht/~talfus-laddus/hoon-school
$ urbit -F $HOME/projects/zod
> |mount %base  :: create %base folder on earth


Start continuous synchronisation between the git repository's gen directory and the %base desk's gen directory:


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: