Skip to content
Adam Bliss edited this page Oct 4, 2013 · 2 revisions

In Nock, a noun is an atom or a cell. In Hoon, it's not so simple.

In Hoon, @ is the atom type and ^ is the cell type, but it doesn't end there. @ can be followed by lowercase letters to determine exactly what kind of atom we're talking about, and a capital letter to limit the size. Here are the top-level odors used in hoon.hoon:

Odor Mnemonic examples
@c ? ^-(@c ~-~596f1.~1986f5.~3e3.)
@d Date ^-(@d ~2013.10.4..09.27.28..5445)`
@p Path ^-(@p ~ruc)
@r float? not implemented?
@s Signed ^-(@s -1)
@t Text ^-(@t 'a')
^-(@t %a)
^-(@t '⛄)
@u Unsigned ^-(@u 97)
^-(@u 1.000)
0x84.9be2

When writing a numeric literal, it MUST be broken up into groups (3 for decimal, 4 for hex or binary) separated by a period, and MUST NOT start with a leading zero (unless the whole number is 0). Anything else is a syntax error.

Further letters create hierarchical subodors:

Subodor Mnemonic examples
@da
@rd
@rh
@rq
@rs
@ta Ascii ^-(@t 'a')
@tas Symbol ^-(@t %a)
@ud Decimal ^-(@u 999)
@ux heX ^-(@ux 0x3e7)
@uv base32 ^-(@uv 0vv7)
@uw base64 ^-(@uw 0wfD)
Clone this wiki locally