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