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/).
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
97 visible in Unix. Changes are automatically recorded from Urbit to the Unix
98 directory, and vice versa. Just set it and forget it!
100 Clay is located at `/home/sys/vane/clay.hoon` within your urbit.
102 Basic information on using Clay can be found
103 [`here`](./docs/using/filesystem.md). An in-depth explanation
104 of the architecture can be found
105 [`here`](./docs/learn/arvo/clay.md).
109 The terminal-driver vane. You run your urbit in your Unix terminal, and
110 Unix sends every event -- such as a keystroke or a change in the dimensions of
111 the terminal window -- to be handled by Dill. Dill acts as an intermediary for
112 anything that uses keyboard events. This is why there’s some input lag in
113 Urbit’s command-line interface. (Optimization will come later!)
115 A keyboard event's journey from Unix to Dojo, the Urbit shell, can be imagined
118 Keystroke in Unix -> Vere (virtual machine) -> Arvo -> Dill -> the Dojo
121 Dill is located at `/home/sys/vane/clay.hoon` within your urbit.
123 More in-depth information on Dill can be found
124 [`here`](./docs/learn/arvo/dill.md).
128 The web-server vane. Anything HTTP-related lives here. Unix sends HTTP messages
129 though to Eyre, and Eyre produces HTTP messages in response.
131 In general, apps and vanes do not call Eyre; rather, Eyre calls apps and vanes.
132 Eyre uses Ford and Gall to functionally publish pages and facilitate
133 communication with apps.
135 Eyre is located at `/home/sys/vane/eyre.hoon` within your urbit.
137 More in-depth information on Eyre can be found
138 [`here`](./docs/learn/arvo/eyre.md).
142 The build-system vane. Ford is capable of sequencing generic asynchronous
143 computations. Its uses include linking source files into programs, assembling
144 live-updating websites, and performing file-type conversions.
146 Ford neither accepts Unix events nor produces Unix effects. It exists
147 entirely for the benefit of Urbit applications and other vanes, in particular
150 Ford is located at `/home/sys/vane/ford.hoon` within your urbit.
152 More in-depth information on Ford can be found
153 [`here`](./docs/learn/arvo/ford/).
157 The application-management vane. Userspace apps -- daemons, really -- are
158 started, stopped, and sandboxed by Gall. Gall provides developers with a
159 consistent interface for hooking their app up to the operating system. It allows
160 applications and other vanes to send messages to applications and subscribe to
161 data streams. Messages coming into Gall are routed to the intended application,
162 and the response comes back along the same route. If the intended target is on
163 another ship, Gall will route it, behind the scenes, through Ames to the other
166 Gall is located at `/home/sys/vane/gall.hoon` within your urbit.
168 More in-depth information on Gall can be found
169 [`here`](./docs/learn/arvo/gall.md).
173An atom is any natural number, including zero. The atom is the most basic data
174type in [Nock](#nock) and [Hoon](#hoon). A Hoon atom type describes a Nock
175atom with two additional pieces of metadata: an [_aura_](#aura), and an
178An atom type is _warm_ or _cold_ based on whether the constant exists.
182 If the constant is `~` (null), any atom is in the type.
186 If the constant is `[~ atom]`, its only legal value is `atom`.
188_See [basic types](./docs/reference/hoon-expressions/basic.md)_
192An aura is a soft atom type. They appear as strings beginning with `@`. Auras
193represent the structure of an atom, print format, or other semantics. Its
194constraints on the value of an atom aren't enforced in any way.
196You can cast something to an aura, like a decimal, and get back its hexademical.
205Auras are an advisory type system. You can go up or down, but not sideways in
206the hierarchy. `@t` and `@` can each be cast to the other, but @t can’t be cast
207to `@u`, for example, without first being cast to the empty aura `@`.
212 > ^- @ 'c' :: 'c' is of the aura @t
219Here is a non-exhaustive list of auras:
222Aura Meaning Example Literal Syntax
223-------------------------------------------------------------------------
225 @da absolute date ~2018.5.14..22.31.46..1435
227@p phonemic string (ship name) ~sorreg-namtyv
228@r IEEE floating-point
229 @rd double precision (64 bits) .~6.02214085774e23
230 @rh half precision (16 bits) .~~3.14
231@s signed integer, sign-bit low
232 @sb signed binary --0b11.1000
233 @sd signed decimal --1.000.056
234 @sx signed hexadecimal -0x5f5.e138
235@t UTF-8 text (cord) 'howdy'
236 @ta ASCII text (knot) ~.howdy
237 @tas ASCII text symbol (term) %howdy
239 @ub unsigned binary 0b11.1000
240 @ud unsigned decimal 1.000.056
241 @ux unsigned hexadecimal 0x5f5.e138
244You can find the list of all auras [here](./docs/reference/hoon-expressions/rune/constants.md).
248Blocksize is the power-of-two bitwidth of an atom. So, an atom with a blocksize
249of `3` has a bitwidth of `2^3`, which is 8. A bitwidth of 8, in turn, can
250represent `2^8` values, or 256.
254To cast is to put a Hoon expression through the compiler’s type-checker to test
255whether the expression is guaranteed to evaluate to a product that falls within
256the desired type. If the expression is not guaranteed to behave in this way,
257then the compiler will halt with a nest-fail crash. Proper Hoon code will
258include a cast for the product type of each gate.
260The cast rune is `^-` (pronounced "ket-hep"). So, to cast to a list of atoms,
261we write `^- (list @)`. The irregular form of that expression is ``(list @)``.
265In Nock and Hoon, a _cell_ is an ordered pair of [nouns](#noun).
269Cells orient to the right; for example, the noun [2 6 14 15] is short for
275A clam is the use of a structure as a gate. Usually used to verify marks from
279 > ((list @t) [97 98 ~])
285In Hoon, `cord` is an aura for representing atoms as strings. UTF-8,
286least-significant bit first. Represented as the aura `@t`.
289 > `@t`478.560.413.032
295A _core_ is a [cell](#nock-cell) of `[code data]`, where we call the
296code head the _battery_ and the data tail the _payload_. All code-data
297structures in normal languages (functions, objects, modules, etc.)
298translate to cores in Hoon.
302 The code-containing head of a core.
306 The data-containing tail of a core.
308_See [basic types](./docs/reference/hoon-expressions/basic.md)._
312The Dojo is the Urbit shell; the command line where you run programs,
313expressions, and system commands. It’s a CLI that is encountered right when
314an urbit is started for the first time. It is somewhat analogous to Bash, the
315Unix terminal, and more analogous to a Hoon REPL.
317You’ll notice that many things can’t be written here; this is normal. The Dojo
318enforces syntactical correctness right at the command line. Strings that can’t
319be continued into a valid expression are automatically trimmed back to something
320that can be. Some syntactically invalid expressions can be completed, but the
321Dojo will prevent them from being entered as a command. You can play around
322with this functionality learn what syntax is kosher.
327A duct is an Arvo-level call stack. At the beginning of every duct is a Unix
328event, such as a keystroke, network packet, timer event, or file change.
330A duct is a `list` of `wire`s. A wire is itself a `list` of `knot`s. A `knot`
335A _face_ is the Hoon analog to what is a variable name in most other
336programming languages. Faces are metadata labels for legs, allowing us to
337address parts. Because there is no metadata in Nock, faces cannot exist in Nock.
344In the above example, `a` is the face and `2` is the value.
346Hoon has no scope or symbol-table; there is only the subject. To "declare" a
347"variable" is to construct a new subject: `[name=value old-subject]`.
349_See [advanced types](./docs/reference/hoon-expressions/advanced.md)_.
354A `flag` is Hoon's version of a boolean. `0` (`%.y`) is _yes_, `1` (`%.n`) is
357Why? It's fresh, it's different, it's new. And it's annoying. And it
358keeps you on your toes. And it's also just intuitively right.
362A _gate_ is a [core](#core) with one [arm](#arm) -- Hoon's closest
363analog to a function. To call a gate on an argument, replace the sample
364(at [tree address](./docs/reference/hoon-expressions/limb/limb.md) `+6`
365in the core) with the argument, and then compute the arm.
367The payload of a gate has a shape of `[sample context]`.
375 The subject in which the gate was defined.
377_See [basic types](./docs/reference/hoon-expressions/basic.md),
378[`%-` ("cenhep")](./docs/reference/hoon-expressions/rune/cen.md#cenhep/) (the
379[rune](#rune) for calling a `gate`)._
383A _generator_ is like a limited Hoon script: it’s a shell command that produces
384a value before disappearing. Generators take an input [noun](#noun) (a value)
385and produce an output `noun` by performing calculations on its arguments,
386prompting for input, or making HTTP requests.
388You need a `bar` rune like `|=` in your generator, because a generator is
389essentially a function that you’re calling.
391Generators, unlike [apps](#application), hold no state. They are pure,
392stateless functions, and they cannot send [moves](#move). Because of this,
393generators are have a more narrow use than apps. Among the non-trivial uses of
394a a generator is moving data into apps -- they’re the backbone of Urbit’s
397Generators are run from the `/gen` directory of your current desk. For example,
398to run a generator named `whatever.hoon`, you would type `> +whatever` in the
399[Dojo](./docs/using/shell.md).
403A _glyph_ is a single, non-alphanumeric ASCII character. Each glyph has its own
404monosyllabic name, which allows the efficient communication of Hoon-related
405information in speech. [`Runes`](#rune) are composed of two glyphs.
406Below is a complete list of glyphs with their associated pronunciations.
409ace [1 space] gal < pal (
410bar | gap [>1 space, nl] par )
425_Hall_ is the Urbit communication back-end. It’s a messaging bus that can work
426with clients of all sorts. [`:talk`](#talk), the built-in chat client, is one
427such app that uses Hall.
429_More information on Hall can be found [here](./docs/learn/arvo/hall.md)._
433 A circle is the “audience” of your messages -- who can receive them. It can be
434 thought of as a chat channel, but this is a little too narrow. More
435 specifically, it’s a named collection of messages created by and hosted on a
436 ship’s Hall, usually represented as `~ship-name/circle-name`. On Talk,
437 Urbit’s built-in chat front-end, the first circle that you will likely
438 encounter is `~dopzod/urbit-help`.
442_Hood_ orchestrates many of the Urbit initialization systems necessary
447Hoon is a strict, higher-order typed functional language that compiles itself
450The Hoon source file is located in `/home/sys/hoon.hoon` within your urbit.
452_More information can be found in the [hoon](./docs/learn/hoon/_index.md) section._
456 _Mint_ is the Hoon compiler function. Mint takes the subject type and the
457 expression source (a [hoon](#a-hoon), for example) and produces the product
458 type and nock formula. So [type hoon] is mapped to [type nock].
462A _hoon_ (lowercase) is the result of parsing a Hoon source expression into an
463AST node. These AST nodes are nouns, like all other Hoon data. Because every
464Hoon program is, in its entirety, a single expression of Hoon, the result of
465parsing the whole thing into an AST is a single `hoon`.
467A hoon is a tagged union of the form `[%tag data]`, where the tag
468is a constant such as `%brts` (from the source [rune](#rune) `|=`,
469i.e. "bartis"), and is matched up with the appropriate type of data
470(often more `hoon`s, from source subexpressions). For example, the
471expression `:-(2 17)`, once parsed into an AST, becomes the following:
474[%clhp p=[%sand p=%ud q=2] q=[%sand p=%ud q=17]]
477The `%clhp` is produced from the rune `:-` (i.e. "colhep"). The 2 and
47817 have each been parsed as `%sand`-tagged hoons, which represent
479atoms (in this case each with an aura of `%ud`, i.e. unsigned
482To parse Hoon source into a hoon AST, use `ream` on a `cord`
483containing Hoon source. Try the following in [Dojo](./docs/using/shell.md):
492[%clls p=[%sand p=%ud q=12] q=[%sand p=%ud q=7] r=[%rock p=%tas q=97]]
495See [expression reference](./docs/reference/hoon-expressions/rune/_index.md) for the full list of hoons.
499Irregular forms are alternative ways of writing Hoon expressions, alternatives
500to the digraphic runes such as `:~`. Irregular forms are usually more compact
503_See [irregular forms](./docs/reference/hoon-expressions/irregular.md)._
507A _jet_ is a piece of C code that have equivalent products to a piece of Hoon or
508Nock code. They are used for performance reasons; jets are meant to be faster
509than the code that they are substituting for.
511Jets are necessary for mathematics, performance-wise, because Nock handles it
512so inefficiently. Nock, for example, can’t decrement (reduce a number by one)
513except by starting building a loop that starts from zero and increments to a
516_See [API overview](./docs/learn/vere/api.md)._
520A lark is an expression that returns a [limb](#limb) at the specified
521address in a cell. Using `-` by itself returns the head of the subject, and
522using `+` by itself returns the tail:
525> -:[[4 5] [6 [14 15]]]
528> +:[[4 5] [6 [14 15]]]
532You can combine `+` or `-` with either of `>` or `<` to get a more specific limb
533of the subject. `-<` returns the head of the head; `->` returns the tail of the
534head; `+<` returns the head of the tail; and `+>` returns the tail of the tail.
535By alternating the `+`/`-` symbols with `<`/`>` symbols, you can go as deep as
539> +>-:[[4 5] [6 [14 15]]]
542> +>+:[[4 5] [6 [14 15]]]
548A _limb_ is an attribute or variable reference. A limb is an [arm](#arm) or a
551To resolve a _limb_ named "foo", the subject is searched depth-first,
552head-first for either a face named "foo" or a core with an arm of
553"foo". If a face is found, the result is a leg, if a core is
554found, the result is the product of the arm.
558 a subexpression, or subtree of the
559 [subject](#nock-subject).
563 a search path into the subject, composed of
564 limbs. Search occurs from right to left (`a.b` means `b` within `a`).
566_See [Limbs and wings](./docs/reference/hoon-expressions/limb/_index.md)_
570A move is the [Arvo](#arvo) equivalent of a syscall.
574In [Nock](#nock) and [Hoon](#hoon), a _noun_ is an atom or a cell.
578Nock is a Turing-complete, non-lambda combinator interpreter. It's
579Urbit's low-level programming language. Nock is functional and typeless.
583 an _atom_ or a _cell_.
587 any natural number, including zero.
591 any ordered pair of nouns.
596 a noun - the data against which a _formula_ is evaluated.
600 a noun - a function at the nock level.
604 a noun - the result of evaluating a formula against a subject.
606_See the [Nock definition](./docs/learn/nock/definition.md)._
610A _mark_ is Urbit's version of a MIME type, if a MIME type was an
611executable specification. The mark is just a label that's used as a path
612to a local source file in the Arvo filesystem. This source file defines
613a core that can mold untrusted data, diff and patch, convert to other
616If this sounds like magic, it isn't quite magic. There's no way
617for different urbits to make sure they mean the same thing by the
618same mark. However, when incompatibility happens, marks ensure
619that we at least handle the situation in a predictable way.
623Every core has a _metal_ which defines its variance model (ie, the
624properties of the type of a compatible core). The default is `gold`
630- `iron`: _contravariant_
632_See [advanced types](./docs/reference/hoon-expressions/advanced.md)_.
636An Urbit _ship_ is: a cryptographic title on a _will_ signed by private key; a
637human-memorable name; and a packet-routing address. Ships are classed by the
638number of bits in their address:
641 Size Name Parent Object Example
642 ----- ------ ------ ------ -------
643 2^8 galaxy ~ supernode ~zod
644 2^16 star galaxy supernode ~dozbud
645 2^32 planet star user ~tasfyn-partyv
646 2^64 moon planet device ~sigsam-nimbot-tasfyn-partyv
647 2^128 comet ~ bot ~racmus-mollen-fallyt-linpex--watres-sibbur-modlux-rinmex
650Any ship can be called an _urbit_. The lowercase "u" distinguishes it from Urbit
651the software stack and Urbit the network.
653_You can find a longer-form summary [here.](https://urbit.org/posts/essays/the-urbit-address-space/)._
655An Urbit identity is a string like `~firbyr-napbes`. It means nothing,
656but it's easy to remember and say out loud. `~firbyr-napbes` is actually
657just a 32-bit number (`3.237.967.392`, to be exact), like an IP address,
658that we turn into a human-memorable string. The full name of this string
659can be viewed by typing `our` in the Dojo, Urbit's shell. This is useful
660when running a ship with a longer name, such as a _moon_ or a _comet_.
662Technically, an urbit is a secure digital identity that you own and
663control with a cryptographic key, like a Bitcoin wallet. As in Bitcoin,
664the supply of urbits is mathematically limited. This keeps the network
665friendly, by making spam and abuse expensive.
667An urbit name is just a number; smaller numbers make shorter names.
668Shorter names are easier to remember, so they're more valuable. So
669urbits are classified by the number of bits in their name. (A ship name
670is just a scrambled base-256 representation of the number.)
672A 32-bit urbit (like `~firbyr-napbes`) is called a _planet._ A 16-bit
673urbit (like `~pollev)` is a _star._ An 8-bit ship (like `~mun`) is a
674_galaxy._ A planet is an identity for an independent, adult human. Stars
675and galaxies are network infrastructure.
677Each planet or star is launched by its _parent,_ the star or galaxy
678whose number is its bottom half. So the planet `~firbyr-napbes`,
679`0xdead.beef` or `3.735.928.559`, is the child of `~pollev`, `0xbeef` or
680`48.879`, whose parent is `~mun`, `0xef`, `239`. The galaxy at the address of
685 A ship's _pier_ is its Unix directory. For planets, the name of the pier is
686 usually the planet name.
690A _structure_ is an idempotent [gate](#gate) (function) that constructs and
691validates types in Hoon.
693An example: Arvo [marks](#mark) use Hoon's type system via structures to
694validate untrusted network data.
696Here's some common structure terminology:
700 A bunt is the default value of a [structure](#structure). It's also a verb;
701 to _bunt_ a structure is to produce the bunt of that structure. For example,
702 bunting `@` results in `0`, and bunting `@t` results in `''`. Bunting is
703 performed with `*` followed by the structure in question:
712##### icon: The type of the mold's range
714_See [mold hoons](/docs/reference/hoon-expressions/rune/buc/)._
718A Hoon _rune_ is a pair of ASCII symbols used to begin a
719[Hoon expression](#a-hoon).
721For example, the rune [`?:`](./docs/reference/hoon-expressions/rune/wut.md#wutcol/) is
722Hoon's most common conditional, a branch on a boolean test. The first
723symbol in a rune represents a family of related runes. For example, the
724[`?` family](./docs/reference/hoon-expressions/rune/wut.md) are all conditionals.
726The result of parsing a Hoon source expression—the rune, followed
727by its respective children—into an AST node is simply called
730Runes have two syntactic forms, _tall_ and _flat_:
734 multiple lines, no parentheses, two or more spaces between tokens
745 one line, parentheses, one space between tokens
749 > %+(add 2 2) :: regular flat form
752 > (add 2 2) :: irregular flat form
756Tall hoons can contain flat hoons, but not vice versa. All irregular
759_See [hoon concept](#a-hoon),
760[expressions](./docs/reference/hoon-expressions/rune/_index.md).
764_Sail_ is the Hoon markup language for XML.
768To _scry_ means to request data from the Arvo namespace and bring it
771_See [.^ (dot-ket)](./docs/reference/hoon-expressions/rune/dot/#dotket)._
775`slot` is the name for Hoon's tree-addressing scheme.
777Every cell has a head and a tail, each of which may be either an atom or
778a cell. Therefore every noun is a binary tree. `+1` or `.` resolves to
779the whole cell (technically this would work against an atom as well).
780The head of `+n` is `+2n`, the tail is `+(2n+1)`.
782`+7` is a special address for gates, because the position is defined
783(by convention) as the context of a gate and of all cores.
787_Talk_ is Urbit's built-in chat app. It’s one example of an app that can be
788built on top of Hall, the Urbit back-end messaging system.
790_See [Messaging](./docs/using/messaging.md). for more information._
794A Hoon _type_ defines a set (finite or infinite) of nouns and ascribes
795some semantics to it. There is no direct syntax for defining
796types; they are always defined by inference (i.e., by
797[`mint`](#mint)), usually using a constructor ([structure](#structure)).
799All types are assembled out of base types defined in `++type`.
800(Look up `++ type` in hoon.hoon for examples.) When the compiler
801does type-inference on a program, it assembles complex types out
802of the simpler built-in types.
806 `nest` is an internal Hoon function on two types which performs a type
807 compatibility test. `nest` produces yes if the
808 set of nouns in the second type is provably a subset of the first.
809 If `nest` produces no, the Hoon programmer will receive a `nest-fail`
810 error. This is one of the most commons errors in Hoon programming.
812 _See [advanced types](./docs/reference/hoon-expressions/advanced.md)_ and [troubleshooting](./docs/reference/troubleshooting.md).
817Hoon's equivalent of a nullable pointer or a Haskell Maybe. If `q` is `~`,
818null, the type is _warm_; any atom is in the type. If `q` is `[~ x]`, where
819`x` is any atom, the type is _cold_; its only legal value is the constant `x`.
823A _vane_ is an [Arvo](#arvo) module. Each Vane is a single file because Arvo
824cannot, on its own, deal with programs that are split between multiple files.
825Some vanes can do this, however.
827### Vere (pronounced “vair”)
829The runtime system, written in C, that implements [Nock](#nock). All
830It’s written in C. Vere-level errors are prepended with as `bail:`.
832Vere is a virtual machine: it pretends to be hardware, and is the single point
833of contact between your Urbit and the rest of your system. But more than that,
834Vere handles the Urbit event log and handles jets. It’s also contains the i/o
835drivers for Urbit’s vanes, responsible for generating events from Unix and
836applying effects to Unix.
840_Zuse_ is a defined interface for vanes. It contains the part of the Hoon
841standard library that is specific to Arvo functionality.
843Arvo 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