Standard Library

Comprehensive documentation for the Hoon standard library.

The Hoon standard library provides a complete suite of functions for working with the fundamental data types and operations in Hoon. These functions are organized into numbered sections based on their purpose and the types they operate on. The numbering corresponds to the layer structure in /sys/hoon.hoon.

Layer 1: Basic Operations

  • 1a: Basic Arithmetic - Unsigned arithmetic operations including addition, subtraction, multiplication, division, and comparison functions.

  • 1b: Tree Addressing - Functions for addressing and navigating tree structures using Nock's tree addressing scheme.

  • 1c: Containers - Fundamental container types and molds including +pair, +list, +unit, +tree, +gate, and other essential type definitions.

Layer 2: Data Structures and Operations

Unit and List Operations

Bit and Logic Operations

  • 2c: Bit Arithmetic - Functions for assembling, disassembling, and manipulating atoms at the bit level.

  • 2d: Bit Logic - Bitwise logical operations including binary AND, OR, XOR, and bit manipulation.

  • 2e: Insecure Hashing - Non-cryptographic hash functions including MurmurHash and other fast hashing algorithms.

  • 2f: Noun Ordering - Functions for ordering and comparing nouns.

  • 2g: Unsigned Powers - Exponentiation and power-related operations for unsigned integers.

Container Data Structures

Layer 3: Advanced Operations

Layer 4: Text Processing and I/O

Layer 5: Compiler and System Operations

Last updated