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
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.md).
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
359A _gate_ is a [core](#core) with one [arm](#arm) -- Hoon's closest
360analog to a function. To call a gate on an argument, replace the sample
361(at [tree address](@/docs/reference/hoon-expressions/limb/limb.md) `+6`
362in the core) with the argument, and then compute the arm.
364The payload of a gate has a shape of `[sample context]`.
372 The subject in which the gate was defined.
374_See [basic types](@/docs/reference/hoon-expressions/basic.md),
375[`%-` ("cenhep")](@/docs/reference/hoon-expressions/rune/cen.md#cenhep) (the
376[rune](#rune) for calling a `gate`)._
380A _generator_ is like a limited Hoon script: it’s a shell command that produces
381a value before disappearing. Generators take an input [noun](#noun) (a value)
382and produce an output `noun` by performing calculations on its arguments,
383prompting for input, or making HTTP requests.
385You need a `bar` rune like `|=` in your generator, because a generator is
386essentially a function that you’re calling.
388Generators, unlike [apps](#application), hold no state. They are pure,
389stateless functions, and they cannot send [moves](#move). Because of this,
390generators are have a more narrow use than apps. Among the non-trivial uses of
391a a generator is moving data into apps -- they’re the backbone of Urbit’s
394Generators are run from the `/gen` directory of your current desk. For example,
395to run a generator named `whatever.hoon`, you would type `> +whatever` in the
396[Dojo](@/docs/using/shell.md).
400A _glyph_ is a single, non-alphanumeric ASCII character. Each glyph has its own
401monosyllabic name, which allows the efficient communication of Hoon-related
402information in speech. [`Runes`](#rune) are composed of two glyphs.
403Below is a complete list of glyphs with their associated pronunciations.
406ace [1 space] gal < pal (
407bar | gap [>1 space, nl] par )
422_Hall_ is the Urbit communication back-end. It’s a messaging bus that can work
423with clients of all sorts. [`:talk`](#talk), the built-in chat client, is one
424such app that uses Hall.
426_More information on Hall can be found [here](@/docs/learn/arvo/hall.md)._
430 A circle is the “audience” of your messages -- who can receive them. It can be
431 thought of as a chat channel, but this is a little too narrow. More
432 specifically, it’s a named collection of messages created by and hosted on a
433 ship’s Hall, usually represented as `~ship-name/circle-name`. On Talk,
434 Urbit’s built-in chat front-end, the first circle that you will likely
435 encounter is `~dopzod/urbit-help`.
439_Hood_ orchestrates many of the Urbit initialization systems necessary
444Hoon is a strict, higher-order typed functional language that compiles itself
447The Hoon source file is located in `/home/sys/hoon.hoon` within your urbit.
449_More information can be found in the [hoon](@/docs/learn/hoon/_index.md) section._
453 _Mint_ is the Hoon compiler function. Mint takes the subject type and the
454 expression source (a [hoon](#a-hoon), for example) and produces the product
455 type and nock formula. So [type hoon] is mapped to [type nock].
459A _hoon_ (lowercase) is the result of parsing a Hoon source expression into an
460AST node. These AST nodes are nouns, like all other Hoon data. Because every
461Hoon program is, in its entirety, a single expression of Hoon, the result of
462parsing the whole thing into an AST is a single `hoon`.
464A hoon is a tagged union of the form `[%tag data]`, where the tag
465is a constant such as `%brts` (from the source [rune](#rune) `|=`,
466i.e. "bartis"), and is matched up with the appropriate type of data
467(often more `hoon`s, from source subexpressions). For example, the
468expression `:-(2 17)`, once parsed into an AST, becomes the following:
471[%clhp p=[%sand p=%ud q=2] q=[%sand p=%ud q=17]]
474The `%clhp` is produced from the rune `:-` (i.e. "colhep"). The 2 and
47517 have each been parsed as `%sand`-tagged hoons, which represent
476atoms (in this case each with an aura of `%ud`, i.e. unsigned
479To parse Hoon source into a hoon AST, use `ream` on a `cord`
480containing Hoon source. Try the following in [Dojo](@/docs/using/shell.md):
489[%clls p=[%sand p=%ud q=12] q=[%sand p=%ud q=7] r=[%rock p=%tas q=97]]
492See [expression reference](@/docs/reference/hoon-expressions/rune/_index.md) for the full list of hoons.
496Irregular forms are alternative ways of writing Hoon expressions, alternatives
497to the digraphic runes such as `:~`. Irregular forms are usually more compact
500_See [irregular forms](@/docs/reference/hoon-expressions/irregular.md)._
504A _jet_ is a piece of C code that have equivalent products to a piece of Hoon or
505Nock code. They are used for performance reasons; jets are meant to be faster
506than the code that they are substituting for.
508Jets are necessary for mathematics, performance-wise, because Nock handles it
509so inefficiently. Nock, for example, can’t decrement (reduce a number by one)
510except by starting building a loop that starts from zero and increments to a
513_See [API overview](@/docs/learn/vere/api.md)._
517A lark is an expression that returns a [limb](#limb) at the specified
518address in a cell. Using `-` by itself returns the head of the subject, and
519using `+` by itself returns the tail:
522> -:[[4 5] [6 [14 15]]]
525> +:[[4 5] [6 [14 15]]]
529You can combine `+` or `-` with either of `>` or `<` to get a more specific limb
530of the subject. `-<` returns the head of the head; `->` returns the tail of the
531head; `+<` returns the head of the tail; and `+>` returns the tail of the tail.
532By alternating the `+`/`-` symbols with `<`/`>` symbols, you can go as deep as
536> +>-:[[4 5] [6 [14 15]]]
539> +>+:[[4 5] [6 [14 15]]]
545A _limb_ is an attribute or variable reference. A limb is an [arm](#arm) or a
548To resolve a _limb_ named "foo", the subject is searched depth-first,
549head-first for either a face named "foo" or a core with an arm of
550"foo". If a face is found, the result is a leg, if a core is
551found, the result is the product of the arm.
555 a subexpression, or subtree of the
556 [subject](#nock-subject).
560 a search path into the subject, composed of
561 limbs. Search occurs from right to left (`a.b` means `b` within `a`).
563_See [Limbs and wings](@/docs/reference/hoon-expressions/limb/_index.md)_
567A move is the [Arvo](#arvo) equivalent of a syscall.
571In [Nock](#nock) and [Hoon](#hoon), a _noun_ is an atom or a cell.
575Nock is a Turing-complete, non-lambda combinator interpreter. It's
576Urbit's low-level programming language. Nock is functional and typeless.
580 an _atom_ or a _cell_.
584 any natural number, including zero.
588 any ordered pair of nouns.
593 a noun - the data against which a _formula_ is evaluated.
597 a noun - a function at the nock level.
601 a noun - the result of evaluating a formula against a subject.
603_See the [Nock definition](@/docs/learn/nock/definition.md)._
607A _mark_ is Urbit's version of a MIME type, if a MIME type was an
608executable specification. The mark is just a label that's used as a path
609to a local source file in the Arvo filesystem. This source file defines
610a core that can mold untrusted data, diff and patch, convert to other
613If this sounds like magic, it isn't quite magic. There's no way
614for different urbits to make sure they mean the same thing by the
615same mark. However, when incompatibility happens, marks ensure
616that we at least handle the situation in a predictable way.
620Every core has a _metal_ which defines its variance model (ie, the
621properties of the type of a compatible core). The default is `gold`
627- `iron`: _contravariant_
629_See [advanced types](@/docs/reference/hoon-expressions/advanced.md)_.
633An Urbit _ship_ is: a cryptographic title on a _will_ signed by private key; a
634human-memorable name; and a packet-routing address. Ships are classed by the
635number of bits in their address:
638 Size Name Parent Object Example
639 ----- ------ ------ ------ -------
640 2^8 galaxy ~ supernode ~zod
641 2^16 star galaxy supernode ~dozbud
642 2^32 planet star user ~tasfyn-partyv
643 2^64 moon planet device ~sigsam-nimbot-tasfyn-partyv
644 2^128 comet ~ bot ~racmus-mollen-fallyt-linpex--watres-sibbur-modlux-rinmex
647Any ship can be called an _urbit_. The lowercase "u" distinguishes it from Urbit
648the software stack and Urbit the network.
650_You can find a longer-form summary [here.](https://urbit.org/posts/essays/the-urbit-address-space/)._
652An Urbit identity is a string like `~firbyr-napbes`. It means nothing,
653but it's easy to remember and say out loud. `~firbyr-napbes` is actually
654just a 32-bit number (`3.237.967.392`, to be exact), like an IP address,
655that we turn into a human-memorable string. The full name of this string
656can be viewed by typing `our` in the Dojo, Urbit's shell. This is useful
657when running a ship with a longer name, such as a _moon_ or a _comet_.
659Technically, an urbit is a secure digital identity that you own and
660control with a cryptographic key, like a Bitcoin wallet. As in Bitcoin,
661the supply of urbits is mathematically limited. This keeps the network
662friendly, by making spam and abuse expensive.
664An urbit name is just a number; smaller numbers make shorter names.
665Shorter names are easier to remember, so they're more valuable. So
666urbits are classified by the number of bits in their name. (A ship name
667is just a scrambled base-256 representation of the number.)
669A 32-bit urbit (like `~firbyr-napbes`) is called a _planet._ A 16-bit
670urbit (like `~pollev)` is a _star._ An 8-bit ship (like `~mun`) is a
671_galaxy._ A planet is an identity for an independent, adult human. Stars
672and galaxies are network infrastructure.
674Each planet or star is launched by its _parent,_ the star or galaxy
675whose number is its bottom half. So the planet `~firbyr-napbes`,
676`0xdead.beef` or `3.735.928.559`, is the child of `~pollev`, `0xbeef` or
677`48.879`, whose parent is `~mun`, `0xef`, `239`. The galaxy at the address of
682 A ship's _pier_ is its Unix directory. For planets, the name of the pier is
683 usually the planet name.
687A _structure_ is an idempotent [gate](#gate) (function) that constructs and
688validates types in Hoon.
690An example: Arvo [marks](#mark) use Hoon's type system via structures to
691validate untrusted network data.
693Here's some common structure terminology:
697 A bunt is the default value of a [structure](#structure). It's also a verb;
698 to _bunt_ a structure is to produce the bunt of that structure. For example,
699 bunting `@` results in `0`, and bunting `@t` results in `''`. Bunting is
700 performed with `*` followed by the structure in question:
709##### icon: The type of the mold's range
711_See [mold hoons](/docs/reference/hoon-expressions/rune/buc/)._
715A Hoon _rune_ is a pair of ASCII symbols used to begin a
716[Hoon expression](#a-hoon).
718For example, the rune [`?:`](@/docs/reference/hoon-expressions/rune/wut.md#wutcol) is
719Hoon's most common conditional, a branch on a boolean test. The first
720symbol in a rune represents a family of related runes. For example, the
721[`?` family](@/docs/reference/hoon-expressions/rune/wut.md) are all conditionals.
723The result of parsing a Hoon source expression—the rune, followed
724by its respective children—into an AST node is simply called
727Runes have two syntactic forms, _tall_ and _flat_:
731 multiple lines, no parentheses, two or more spaces between tokens
742 one line, parentheses, one space between tokens
746 > %+(add 2 2) :: regular flat form
749 > (add 2 2) :: irregular flat form
753Tall hoons can contain flat hoons, but not vice versa. All irregular
756_See [hoon concept](#a-hoon),
757[expressions](@/docs/reference/hoon-expressions/rune/_index.md).
761_Sail_ is the Hoon markup language for XML.
765To _scry_ means to request data from the Arvo namespace and bring it
768_See [.^ (dot-ket)](@/docs/reference/hoon-expressions/rune/dot.md#dotket)._
772`slot` is the name for Hoon's tree-addressing scheme.
774Every cell has a head and a tail, each of which may be either an atom or
775a cell. Therefore every noun is a binary tree. `+1` or `.` resolves to
776the whole cell (technically this would work against an atom as well).
777The head of `+n` is `+2n`, the tail is `+(2n+1)`.
779`+7` is a special address for gates, because the position is defined
780(by convention) as the context of a gate and of all cores.
784_Talk_ is Urbit's built-in chat app. It’s one example of an app that can be
785built on top of Hall, the Urbit back-end messaging system.
787_See [Messaging](@/docs/using/messaging.md). for more information._
791A Hoon _type_ defines a set (finite or infinite) of nouns and ascribes
792some semantics to it. There is no direct syntax for defining
793types; they are always defined by inference (i.e., by
794[`mint`](#mint)), usually using a constructor ([structure](#structure)).
796All types are assembled out of base types defined in `++type`.
797(Look up `++ type` in hoon.hoon for examples.) When the compiler
798does type-inference on a program, it assembles complex types out
799of the simpler built-in types.
803 `nest` is an internal Hoon function on two types which performs a type
804 compatibility test. `nest` produces yes if the
805 set of nouns in the second type is provably a subset of the first.
806 If `nest` produces no, the Hoon programmer will receive a `nest-fail`
807 error. This is one of the most commons errors in Hoon programming.
809 _See [advanced types](@/docs/reference/hoon-expressions/advanced.md)_ and [troubleshooting](@/docs/reference/troubleshooting.md).
814Hoon's equivalent of a nullable pointer or a Haskell Maybe. If `q` is `~`,
815null, the type is _warm_; any atom is in the type. If `q` is `[~ x]`, where
816`x` is any atom, the type is _cold_; its only legal value is the constant `x`.
820A _vane_ is an [Arvo](#arvo) module. Each Vane is a single file because Arvo
821cannot, on its own, deal with programs that are split between multiple files.
822Some vanes can do this, however.
824### Vere (pronounced “vair”)
826The runtime system, written in C, that implements [Nock](#nock). All
827It’s written in C. Vere-level errors are prepended with as `bail:`.
829Vere is a virtual machine: it pretends to be hardware, and is the single point
830of contact between your Urbit and the rest of your system. But more than that,
831Vere handles the Urbit event log and handles jets. It’s also contains the i/o
832drivers for Urbit’s vanes, responsible for generating events from Unix and
833applying effects to Unix.
837_Zuse_ is a defined interface for vanes. It contains the part of the Hoon
838standard library that is specific to Arvo functionality.
840Arvo 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