6Urbit is renowned for its exotic terminology. Here's a simple overview
7from the strange words within.
9As Dijkstra put it: "The purpose of abstraction is not to be vague, but
10to create a new semantic level in which one can be absolutely precise."
14Also known as an “app,” an _application_ is a Hoon program that can hold state.
18An _arm_ is a named, functionally-computed attribute of a [core](#core).
20The [hoon](#a-hoon) of each arm is compiled to a Nock formula, with the
21enclosing [core](#core) itself as the subject.
23There are two kinds of arms: _dry_ and _wet_. Most arms are
28 normal, `++`, polymorphic by means of _variance_
30 For a dry arm, we ask: is the new payload compatible with the old
31 payload (against which the core was compiled)?
35 unusual, `+-`, polymorphic by means of _genericity_
37 A wet arm uses the hoon as a macro. We create a new type analysis
38 path, which works as if we expanded the callee with the caller's
41_See [advanced types](/docs/reference/hoon-expressions/advanced/)_.
47The Urbit operating system and kernel. Arvo's state is a pure function of its
48event log, and it serves as the Urbit event manager. It contains vanes, which are
49kernel modules that perform essential system operations. Arvo itself can only
50deal with one file at a time. For more, it relies on Ford, the build-system
53Arvo being purely functional means that the it is a function that is:
55`(state, event) → (state, effects)`
57Arvo coordinates and reloads vanes. It can be thought of as a traffic-director.
58Any vane needs to go through Arvo before reaching another vane. Events and
59their effects happen like so:
61`Unix event → vere (the virtual machine that runs Urbit) → Arvo → vane → Arvo`
63Arvo is located in `/home/sys/arvo.hoon` within your urbit.
65More in-depth information on Arvo can be found
66[`here`](@/docs/learn/arvo/_index.md).
68Below are Arvo modules, which are called "vanes".
72 The networking vane. Ames handles all things UDP. Here live the protocols for
73 discovering and interacting with other urbits. It’s also the name for the Urbit
74 network itself. All communication is signed and encrypted.
76 Ames is located in `/home/sys/vane/ames.hoon` within your urbit.
78 More in-depth information on Ames can be found
79 [`here`](@/docs/learn/arvo/ames.md).
83 The timing vane. Behn allows for applications to schedule events, which are
84 managed in a simple priority queue. For example, Clay, the Urbit filesystem,
85 uses Behn to keep track of time-specific file requests. Eyre, the Urbit web
86 vane, uses Behn for timing-out HTTP sessions.
88 Behn is located in `/home/sys/vane/behn.hoon` within your urbit.
92 The filesystem and typed revision-control vane. Think of Clay as a
93 continuously synced git. It handles file-change events and maps them from Urbit
94 to Unix and vice versa.
96 A common way to use it is to create a pier, a directory that exists in and is
99 Clay is located at `/home/sys/vane/clay.hoon` within your urbit.
101 Basic information on using Clay can be found
102 [`here`](@/docs/using/filesystem.md). An in-depth explanation
103 of the architecture can be found
104 [`here`](@/docs/learn/arvo/clay.md).
108 The terminal-driver vane. You run your urbit in your Unix terminal, and
109 Unix sends every event -- such as a keystroke or a change in the dimensions of
110 the terminal window -- to be handled by Dill. Dill acts as an intermediary for
111 anything that uses keyboard events. This is why there’s some input lag in
112 Urbit’s command-line interface. (Optimization will come later!)
114 A keyboard event's journey from Unix to Dojo, the Urbit shell, can be imagined
117 Keystroke in Unix -> Vere (virtual machine) -> Arvo -> Dill -> the Dojo
120 Dill is located at `/home/sys/vane/clay.hoon` within your urbit.
122 More in-depth information on Dill can be found
123 [`here`](@/docs/learn/arvo/dill.md).
127 The web-server vane. Anything HTTP-related lives here. Unix sends HTTP messages
128 though to Eyre, and Eyre produces HTTP messages in response.
130 In general, apps and vanes do not call Eyre; rather, Eyre calls apps and vanes.
131 Eyre uses Ford and Gall to functionally publish pages and facilitate
132 communication with apps.
134 Eyre is located at `/home/sys/vane/eyre.hoon` within your urbit.
136 More in-depth information on Eyre can be found
137 [`here`](@/docs/learn/arvo/eyre.md).
141 The build-system vane. Ford is capable of sequencing generic asynchronous
142 computations. Its uses include linking source files into programs, assembling
143 live-updating websites, and performing file-type conversions.
145 Ford neither accepts Unix events nor produces Unix effects. It exists
146 entirely for the benefit of Urbit applications and other vanes, in particular
149 Ford is located at `/home/sys/vane/ford.hoon` within your urbit.
151 More in-depth information on Ford can be found
152 [`here`](@/docs/learn/arvo/ford.md).
156 The application-management vane. Userspace apps -- daemons, really -- are
157 started, stopped, and sandboxed by Gall. Gall provides developers with a
158 consistent interface for hooking their app up to the operating system. It allows
159 applications and other vanes to send messages to applications and subscribe to
160 data streams. Messages coming into Gall are routed to the intended application,
161 and the response comes back along the same route. If the intended target is on
162 another ship, Gall will route it, behind the scenes, through Ames to the other
165 Gall is located at `/home/sys/vane/gall.hoon` within your urbit.
167 More in-depth information on Gall can be found
168 [`here`](@/docs/learn/arvo/gall.md).
172An atom is any natural number, including zero. The atom is the most basic data
173type in [Nock](#nock) and [Hoon](#hoon). A Hoon atom type describes a Nock
174atom with two additional pieces of metadata: an [_aura_](#aura), and an
177An atom type is _warm_ or _cold_ based on whether the constant exists.
181 If the constant is `~` (null), any atom is in the type.
185 If the constant is `[~ atom]`, its only legal value is `atom`.
187_See [basic types](@/docs/reference/hoon-expressions/basic.md)_
191An aura is a soft atom type. They appear as strings beginning with `@`. Auras
192represent the structure of an atom, print format, or other semantics. Its
193constraints on the value of an atom aren't enforced in any way.
195You can cast something to an aura, like a decimal, and get back its hexademical.
204Auras are an advisory type system. You can go up or down, but not sideways in
205the hierarchy. `@t` and `@` can each be cast to the other, but @t can’t be cast
206to `@u`, for example, without first being cast to the empty aura `@`.
211 > ^- @ 'c' :: 'c' is of the aura @t
218Here is a non-exhaustive list of auras:
221Aura Meaning Example Literal Syntax
222-------------------------------------------------------------------------
224 @da absolute date ~2018.5.14..22.31.46..1435
226@p phonemic string (ship name) ~sorreg-namtyv
227@r IEEE floating-point
228 @rd double precision (64 bits) .~6.02214085774e23
229 @rh half precision (16 bits) .~~3.14
230@s signed integer, sign-bit low
231 @sb signed binary --0b11.1000
232 @sd signed decimal --1.000.056
233 @sx signed hexadecimal -0x5f5.e138
234@t UTF-8 text (cord) 'howdy'
235 @ta ASCII text (knot) ~.howdy
236 @tas ASCII text symbol (term) %howdy
238 @ub unsigned binary 0b11.1000
239 @ud unsigned decimal 1.000.056
240 @ux unsigned hexadecimal 0x5f5.e138
243You can find the list of all auras [here](@/docs/reference/hoon-expressions/rune/constants.md).
247Blocksize is the power-of-two bitwidth of an atom. So, an atom with a blocksize
248of `3` has a bitwidth of `2^3`, which is 8. A bitwidth of 8, in turn, can
249represent `2^8` values, or 256.
253To cast is to put a Hoon expression through the compiler’s type-checker to test
254whether the expression is guaranteed to evaluate to a product that falls within
255the desired type. If the expression is not guaranteed to behave in this way,
256then the compiler will halt with a nest-fail crash. Proper Hoon code will
257include a cast for the product type of each gate.
259The cast rune is `^-` (pronounced "ket-hep"). So, to cast to a list of atoms,
260we write `^- (list @)`. The irregular form of that expression is ``(list @)``.
264In Nock and Hoon, a _cell_ is an ordered pair of [nouns](#noun).
268Cells orient to the right; for example, the noun [2 6 14 15] is short for
274A clam is the use of a structure as a gate. Usually used to verify marks from
278 > ((list @t) [97 98 ~])
284In Hoon, `cord` is an aura for representing atoms as strings. UTF-8,
285least-significant bit first. Represented as the aura `@t`.
288 > `@t`478.560.413.032
294A _core_ is a [cell](#nock-cell) of `[code data]`, where we call the
295code head the _battery_ and the data tail the _payload_. All code-data
296structures in normal languages (functions, objects, modules, etc.)
297translate to cores in Hoon.
301 The code-containing head of a core.
305 The data-containing tail of a core.
307_See [basic types](@/docs/reference/hoon-expressions/basic.md)._
311The Dojo is the Urbit shell; the command line where you run programs,
312expressions, and system commands. It’s a CLI that is encountered right when
313an urbit is started for the first time. It is somewhat analogous to Bash, the
314Unix terminal, and more analogous to a Hoon REPL.
316You’ll notice that many things can’t be written here; this is normal. The Dojo
317enforces syntactical correctness right at the command line. Strings that can’t
318be continued into a valid expression are automatically trimmed back to something
319that can be. Some syntactically invalid expressions can be completed, but the
320Dojo will prevent them from being entered as a command. You can play around
321with this functionality learn what syntax is kosher.
326A duct is an Arvo-level call stack. At the beginning of every duct is a Unix
327event, such as a keystroke, network packet, timer event, or file change.
329A duct is a `list` of `wire`s. A wire is itself a `list` of `knot`s. A `knot`
334A _face_ is the Hoon analog to what is a variable name in most other
335programming languages. Faces are metadata labels for legs, allowing us to
336address parts. Because there is no metadata in Nock, faces cannot exist in Nock.
343In the above example, `a` is the face and `2` is the value.
345Hoon has no scope or symbol-table; there is only the subject. To "declare" a
346"variable" is to construct a new subject: `[name=value old-subject]`.
348_See [advanced types](@/docs/reference/hoon-expressions/advanced.md)_.
353A `flag` is Hoon's version of a boolean. `0` (`%.y`) is _yes_, `1` (`%.n`) is
358A _gate_ is a [core](#core) with one [arm](#arm) -- Hoon's closest
359analog to a function. To call a gate on an argument, replace the sample
360(at [tree address](@/docs/reference/hoon-expressions/limb/limb.md) `+6`
361in the core) with the argument, and then compute the arm.
363The payload of a gate has a shape of `[sample context]`.
371 The subject in which the gate was defined.
373_See [basic types](@/docs/reference/hoon-expressions/basic.md),
374[`%-` ("cenhep")](@/docs/reference/hoon-expressions/rune/cen.md#cenhep) (the
375[rune](#rune) for calling a `gate`)._
379A _generator_ is like a limited Hoon script: it’s a shell command that produces
380a value before disappearing. Generators take an input [noun](#noun) (a value)
381and produce an output `noun` by performing calculations on its arguments,
382prompting for input, or making HTTP requests.
384You need a `bar` rune like `|=` in your generator, because a generator is
385essentially a function that you’re calling.
387Generators, unlike [apps](#application), hold no state. They are pure,
388stateless functions, and they cannot send [moves](#move). Because of this,
389generators are have a more narrow use than apps. Among the non-trivial uses of
390a a generator is moving data into apps -- they’re the backbone of Urbit’s
393Generators are run from the `/gen` directory of your current desk. For example,
394to run a generator named `whatever.hoon`, you would type `> +whatever` in the
395[Dojo](@/docs/using/shell.md).
399A _glyph_ is a single, non-alphanumeric ASCII character. Each glyph has its own
400monosyllabic name, which allows the efficient communication of Hoon-related
401information in speech. [`Runes`](#rune) are composed of two glyphs.
402Below is a complete list of glyphs with their associated pronunciations.
405ace [1 space] gal < pal (
406bar | gap [>1 space, nl] par )
421_Hall_ is the Urbit communication back-end. It’s a messaging bus that can work
422with clients of all sorts. [`:talk`](#talk), the built-in chat client, is one
423such app that uses Hall.
425_More information on Hall can be found [here](@/docs/learn/arvo/hall.md)._
429 A circle is the “audience” of your messages -- who can receive them. It can be
430 thought of as a chat channel, but this is a little too narrow. More
431 specifically, it’s a named collection of messages created by and hosted on a
432 ship’s Hall, usually represented as `~ship-name/circle-name`. On Talk,
433 Urbit’s built-in chat front-end, the first circle that you will likely
434 encounter is `~dopzod/urbit-help`.
438_Hood_ orchestrates many of the Urbit initialization systems necessary
443Hoon is a strict, higher-order typed functional language that compiles itself
446The Hoon source file is located in `/home/sys/hoon.hoon` within your urbit.
448_More information can be found in the [hoon](@/docs/learn/hoon/_index.md) section._
452 _Mint_ is the Hoon compiler function. Mint takes the subject type and the
453 expression source (a [hoon](#a-hoon), for example) and produces the product
454 type and nock formula. So [type hoon] is mapped to [type nock].
458A _hoon_ (lowercase) is the result of parsing a Hoon source expression into an
459AST node. These AST nodes are nouns, like all other Hoon data. Because every
460Hoon program is, in its entirety, a single expression of Hoon, the result of
461parsing the whole thing into an AST is a single `hoon`.
463A hoon is a tagged union of the form `[%tag data]`, where the tag
464is a constant such as `%brts` (from the source [rune](#rune) `|=`,
465i.e. "bartis"), and is matched up with the appropriate type of data
466(often more `hoon`s, from source subexpressions). For example, the
467expression `:-(2 17)`, once parsed into an AST, becomes the following:
470[%clhp p=[%sand p=%ud q=2] q=[%sand p=%ud q=17]]
473The `%clhp` is produced from the rune `:-` (i.e. "colhep"). The 2 and
47417 have each been parsed as `%sand`-tagged hoons, which represent
475atoms (in this case each with an aura of `%ud`, i.e. unsigned
478To parse Hoon source into a hoon AST, use `ream` on a `cord`
479containing Hoon source. Try the following in [Dojo](@/docs/using/shell.md):
488[%clls p=[%sand p=%ud q=12] q=[%sand p=%ud q=7] r=[%rock p=%tas q=97]]
491See [expression reference](@/docs/reference/hoon-expressions/rune/_index.md) for the full list of hoons.
495Irregular forms are alternative ways of writing Hoon expressions, alternatives
496to the digraphic runes such as `:~`. Irregular forms are usually more compact
499_See [irregular forms](@/docs/reference/hoon-expressions/irregular.md)._
503A _jet_ is a piece of C code that have equivalent products to a piece of Hoon or
504Nock code. They are used for performance reasons; jets are meant to be faster
505than the code that they are substituting for.
507Jets are necessary for mathematics, performance-wise, because Nock handles it
508so inefficiently. Nock, for example, can’t decrement (reduce a number by one)
509except by starting building a loop that starts from zero and increments to a
512_See [API overview](@/docs/learn/vere/api.md)._
516A lark is an expression that returns a [limb](#limb) at the specified
517address in a cell. Using `-` by itself returns the head of the subject, and
518using `+` by itself returns the tail:
521> -:[[4 5] [6 [14 15]]]
524> +:[[4 5] [6 [14 15]]]
528You can combine `+` or `-` with either of `>` or `<` to get a more specific limb
529of the subject. `-<` returns the head of the head; `->` returns the tail of the
530head; `+<` returns the head of the tail; and `+>` returns the tail of the tail.
531By alternating the `+`/`-` symbols with `<`/`>` symbols, you can go as deep as
535> +>-:[[4 5] [6 [14 15]]]
538> +>+:[[4 5] [6 [14 15]]]
544A _limb_ is an attribute or variable reference. A limb is an [arm](#arm) or a
547To resolve a _limb_ named "foo", the subject is searched depth-first,
548head-first for either a face named "foo" or a core with an arm of
549"foo". If a face is found, the result is a leg, if a core is
550found, the result is the product of the arm.
554 a subexpression, or subtree of the
555 [subject](#nock-subject).
559 a search path into the subject, composed of
560 limbs. Search occurs from right to left (`a.b` means `b` within `a`).
562_See [Limbs and wings](@/docs/reference/hoon-expressions/limb/_index.md)_
566A move is the [Arvo](#arvo) equivalent of a syscall.
570In [Nock](#nock) and [Hoon](#hoon), a _noun_ is an atom or a cell.
574Nock is a Turing-complete, non-lambda combinator interpreter. It's
575Urbit's low-level programming language. Nock is functional and typeless.
579 an _atom_ or a _cell_.
583 any natural number, including zero.
587 any ordered pair of nouns.
592 a noun - the data against which a _formula_ is evaluated.
596 a noun - a function at the nock level.
600 a noun - the result of evaluating a formula against a subject.
602_See the [Nock definition](@/docs/learn/nock/definition.md)._
606A _mark_ is Urbit's version of a MIME type, if a MIME type was an
607executable specification. The mark is just a label that's used as a path
608to a local source file in the Arvo filesystem. This source file defines
609a core that can mold untrusted data, diff and patch, convert to other
612If this sounds like magic, it isn't quite magic. There's no way
613for different urbits to make sure they mean the same thing by the
614same mark. However, when incompatibility happens, marks ensure
615that we at least handle the situation in a predictable way.
619Every core has a _metal_ which defines its variance model (ie, the
620properties of the type of a compatible core). The default is `gold`
626- `iron`: _contravariant_
628_See [advanced types](@/docs/reference/hoon-expressions/advanced.md)_.
632An Urbit _ship_ is: a cryptographic title on a _will_ signed by private key; a
633human-memorable name; and a packet-routing address. Ships are classed by the
634number of bits in their address:
637 Size Name Parent Object Example
638 ----- ------ ------ ------ -------
639 2^8 galaxy ~ supernode ~zod
640 2^16 star galaxy supernode ~dozbud
641 2^32 planet star user ~tasfyn-partyv
642 2^64 moon planet device ~sigsam-nimbot-tasfyn-partyv
643 2^128 comet ~ bot ~racmus-mollen-fallyt-linpex--watres-sibbur-modlux-rinmex
646Any ship can be called an _urbit_. The lowercase "u" distinguishes it from Urbit
647the software stack and Urbit the network.
649_You can find a longer-form summary [here.](https://urbit.org/posts/essays/the-urbit-address-space/)._
651An Urbit identity is a string like `~firbyr-napbes`. It means nothing,
652but it's easy to remember and say out loud. `~firbyr-napbes` is actually
653just a 32-bit number (`3.237.967.392`, to be exact), like an IP address,
654that we turn into a human-memorable string. The full name of this string
655can be viewed by typing `our` in the Dojo, Urbit's shell. This is useful
656when running a ship with a longer name, such as a _moon_ or a _comet_.
658Technically, an urbit is a secure digital identity that you own and
659control with a cryptographic key, like a Bitcoin wallet. As in Bitcoin,
660the supply of urbits is mathematically limited. This keeps the network
661friendly, by making spam and abuse expensive.
663An urbit name is just a number; smaller numbers make shorter names.
664Shorter names are easier to remember, so they're more valuable. So
665urbits are classified by the number of bits in their name. (A ship name
666is just a scrambled base-256 representation of the number.)
668A 32-bit urbit (like `~firbyr-napbes`) is called a _planet._ A 16-bit
669urbit (like `~pollev)` is a _star._ An 8-bit ship (like `~mun`) is a
670_galaxy._ A planet is an identity for an independent, adult human. Stars
671and galaxies are network infrastructure.
673Each planet or star is launched by its _parent,_ the star or galaxy
674whose number is its bottom half. So the planet `~firbyr-napbes`,
675`0xdead.beef` or `3.735.928.559`, is the child of `~pollev`, `0xbeef` or
676`48.879`, whose parent is `~mun`, `0xef`, `239`. The galaxy at the address of
681 A ship's _pier_ is its Unix directory. For planets, the name of the pier is
682 usually the planet name.
686A _structure_ is an idempotent [gate](#gate) (function) that constructs and
687validates types in Hoon.
689An example: Arvo [marks](#mark) use Hoon's type system via structures to
690validate untrusted network data.
692Here's some common structure terminology:
696 A bunt is the default value of a [structure](#structure). It's also a verb;
697 to _bunt_ a structure is to produce the bunt of that structure. For example,
698 bunting `@` results in `0`, and bunting `@t` results in `''`. Bunting is
699 performed with `*` followed by the structure in question:
708##### icon: The type of the mold's range
710_See [mold hoons](/docs/reference/hoon-expressions/rune/buc/)._
714A Hoon _rune_ is a pair of ASCII symbols used to begin a
715[Hoon expression](#a-hoon).
717For example, the rune [`?:`](@/docs/reference/hoon-expressions/rune/wut.md#wutcol) is
718Hoon's most common conditional, a branch on a boolean test. The first
719symbol in a rune represents a family of related runes. For example, the
720[`?` family](@/docs/reference/hoon-expressions/rune/wut.md) are all conditionals.
722The result of parsing a Hoon source expression—the rune, followed
723by its respective children—into an AST node is simply called
726Runes have two syntactic forms, _tall_ and _flat_:
730 multiple lines, no parentheses, two or more spaces between tokens
741 one line, parentheses, one space between tokens
745 > %+(add 2 2) :: regular flat form
748 > (add 2 2) :: irregular flat form
752Tall hoons can contain flat hoons, but not vice versa. All irregular
755_See [hoon concept](#a-hoon),
756[expressions](@/docs/reference/hoon-expressions/rune/_index.md).
760_Sail_ is the Hoon markup language for XML.
764To _scry_ means to request data from the Arvo namespace and bring it
767_See [.^ (dot-ket)](@/docs/reference/hoon-expressions/rune/dot.md#dotket)._
771`slot` is the name for Hoon's tree-addressing scheme.
773Every cell has a head and a tail, each of which may be either an atom or
774a cell. Therefore every noun is a binary tree. `+1` or `.` resolves to
775the whole cell (technically this would work against an atom as well).
776The head of `+n` is `+2n`, the tail is `+(2n+1)`.
778`+7` is a special address for gates, because the position is defined
779(by convention) as the context of a gate and of all cores.
783_Talk_ is Urbit's built-in chat app. It’s one example of an app that can be
784built on top of Hall, the Urbit back-end messaging system.
786_See [Messaging](@/docs/using/messaging.md). for more information._
790A Hoon _type_ defines a set (finite or infinite) of nouns and ascribes
791some semantics to it. There is no direct syntax for defining
792types; they are always defined by inference (i.e., by
793[`mint`](#mint)), usually using a constructor ([structure](#structure)).
795All types are assembled out of base types defined in `++type`.
796(Look up `++ type` in hoon.hoon for examples.) When the compiler
797does type-inference on a program, it assembles complex types out
798of the simpler built-in types.
802 `nest` is an internal Hoon function on two types which performs a type
803 compatibility test. `nest` produces yes if the
804 set of nouns in the second type is provably a subset of the first.
805 If `nest` produces no, the Hoon programmer will receive a `nest-fail`
806 error. This is one of the most commons errors in Hoon programming.
808 _See [advanced types](@/docs/reference/hoon-expressions/advanced.md)_ and [troubleshooting](@/docs/reference/troubleshooting.md).
813Hoon's equivalent of a nullable pointer or a Haskell Maybe. If `q` is `~`,
814null, the type is _warm_; any atom is in the type. If `q` is `[~ x]`, where
815`x` is any atom, the type is _cold_; its only legal value is the constant `x`.
819A _vane_ is an [Arvo](#arvo) module. Each Vane is a single file because Arvo
820cannot, on its own, deal with programs that are split between multiple files.
821Some vanes can do this, however.
823### Vere (pronounced “vair”)
825The runtime system, written in C, that implements [Nock](#nock). All
826It’s written in C. Vere-level errors are prepended with as `bail:`.
828Vere is a virtual machine: it pretends to be hardware, and is the single point
829of contact between your Urbit and the rest of your system. But more than that,
830Vere handles the Urbit event log and handles jets. It’s also contains the i/o
831drivers for Urbit’s vanes, responsible for generating events from Unix and
832applying effects to Unix.
836_Zuse_ is a defined interface for vanes. It contains the part of the Hoon
837standard library that is specific to Arvo functionality.
839Arvo is located in `/home/sys/zuse.hoon` within your urbit.
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list