5title: Technical overview
10Urbit is a clean-slate system software stack defined as a
11deterministic computer. An encrypted P2P network, `%ames`, runs
12on a functional operating system, Arvo, written in a strict,
13typed functional language, Hoon, which compiles itself to a
14combinator interpreter, Nock, whose spec gzips to 340 bytes.
16## Architectural overview
18A deterministic computer? Urbit's state is a pure function of
19its event history. In practice it uses a memory checkpoint and
20an append-only log. Every event is a transaction; Urbit is an
21ACID database and a single-level store. Urbit runs on Unix now,
22but it's easy to imagine on a hypervisor or even bare metal.
24A purely functional OS? Urbit is pure -- no code inside it can
25make system calls or otherwise affect the underlying platform.
26Instead, the top-level event function defines an I/O protocol.
27It maps an input event and the current state to a list of output
28actions and the subsequent state. In Hoon:
31$-([event state] [(list action) state])
36Nock is a sort of nano-Lisp without syntax, symbols or lambdas.
37Most Lisps are one-layer: they create a practical language by
38extending a theoretically simple interpreter. The abstraction is
39simple and the implementation is practical; there is no actual
40codebase both simple and practical. Hoon and Nock are two
41layers: Hoon compiles itself to pure Nock. Since Urbit is
42defined in Nock, not Hoon, we can upgrade Hoon over the air.
44The Nock data model is especially trivial. A *noun* is an atom
45or a cell. An atom is any unsigned integer. A cell is an
46ordered pair of nouns. Nouns are acyclic and expose no pointer
51Hoon is a strict combinator language that avoids mathematical
52theory and notation. It aims at a mechanical, imperative feel.
53Hoon uses ASCII digraphs instead of keywords; there are no
54user-level macros. The type system infers only forward and does
55not use unification, but is not much weaker than Haskell's. The
56compiler and inference engine is about 2000 lines of Hoon.
60Arvo is an event-driven OS written in Hoon. It can upgrade
61itself and everything inside it over the network. The Arvo
62kernel proper is 500 lines of Hoon, which implements a typed
63event system with explicit call-stack structure. Arvo ships
64with modules that provide P2P networking (`%ames`), a revision-
65control system (`%clay`), a web client/server (`%eyre`), a
66functional build system (`%ford`), and an application engine
71Ames, the Urbit network, is an encrypted P2P protocol over UDP.
72Its address space is semi-decentralized; 64-bit addresses are
73hierarchically distributed, 128-bit addresses are self-created.
74Addresses (or *plots*) are rendered in a phonemic syntax for
75memorability. The scarcity of short plots helps control spam and
76other Sybil attacks. The short plot hierarchy is also reused as
77a supernode routing system for NAT traversal.
81Urbit ships with two default applications: a REPL or shell
82`:dojo`, and a distributed user-level message-bus `:talk`.
83`:talk` under the hood resembles NNTP; to the user, it looks like
84a self-hosted Slack or persistent IRC.
86The full Urbit stack (compiler, standard library, kernel,
87modules, and applications) is about 25,000 lines of Hoon.
88Urbit is patent-free and MIT licensed.
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