on master help sign in
scratching the surface
f41079fGalen Wolfe-Pauly
docs.md+2−2
@@ -3,10 +3,10 @@ anchor: none
3---
3---
4
4
5<div class="lead">
5<div class="lead">
6− <div class="logo inverse blue">~</div>
6+ <div class="logo inverse"></div>
7 <h1 class="blue i-b">Urbit docs</h1>
7 <h1 class="blue i-b">Urbit docs</h1>
8</div>
8</div>
9
9
10<div class="sections lead-offset">
10<div class="sections lead-offset">
11 <kids></kids>
11 <kids></kids>
12−</div>
12+</div>
docs/orientation/repo-guide.md+14−21
@@ -1,14 +1,14 @@
1---
1---
2next: true
2next: true
3−sort: 3
3+sort: 2
4−title: What's in the repo
4+title: Arvo source guide
5---
5---
6
6
7−# What's in the repo
7+# Arvo source guide
8
8
9−The `urbit` repo can look a little confusing at first. Here we'll take a look at the files that live on your `/=home=` desk by default.
9+When you boot an Urbit we transfer the current version of the Arvo operating environment to your Urbit over our network. That is, the source for the system lives on your Urbit. Here we'll take a brief tour through the structure of a base Arvo desk.
10
10
11−If you `ls urb/zod` from inside the urbit repo you should see something like:
11+Looking at the top level of [the Arvo repo](http://github.com/urbit/arvo), or any Urbit desk that has been mounted to Unix we see something like:
12
12
13 app/
13 app/
14 arvo/
14 arvo/
@@ -16,6 +16,7 @@ If you `ls urb/zod` from inside the urbit repo you should see something like:
16 lib/
16 lib/
17 mar/
17 mar/
18 ren/
18 ren/
19+ sec/
19 sur/
20 sur/
20 web/
21 web/
21 web.md
22 web.md
@@ -24,7 +25,7 @@ Let's step through directory by directory.
24
25
25## `app/`
26## `app/`
26
27
27−This is where `%gall` apps live. `%gall` apps are stateful servants. Sort of like unix daemons. One very familiar one is `app/talk.hoon` which is the source code for `:talk` the urbit messaging transport layer. And there's also `app/dojo.hoon` — that's your shell.
28+This is where `%gall` apps live. `%gall` apps are stateful servers, sort of like unix daemons. One very familiar one is `app/talk.hoon` which is the source code for `:talk` the urbit messaging transport layer. And there's also `app/dojo.hoon` — that's your shell.
28
29
29## `arvo/`
30## `arvo/`
30
31
@@ -60,25 +61,17 @@ This is where the `%arvo` vanes live. Vanes are sort of like kernel modules. Th
60
61
61### `arvo/hoon.hoon`
62### `arvo/hoon.hoon`
62
63
63−`%hoon` is our programming langauge.
64+`%hoon` is our programming langauge. Since Hoon compiles itself the language is actually specified in its source.
64−
65−### `arvo/jael.hoon`
66−
67−`%jael` handles secret storage.
68−
69−### `arvo/kahn.hoon`
70−
71−`%kahn` stores your contacts / trust graph.
72
65
73### `arvo/zuse.hoon`
66### `arvo/zuse.hoon`
74
67
75−`%zuse` is our standard library.
68+`%zuse` is the Hoon library.
76
69
77That's it. That's the whole system.
70That's it. That's the whole system.
78
71
79## `gen/`
72## `gen/`
80
73
81−`gen/` holds generators. Generators are short command-line scripts.
74+`gen/` holds generators. Generators are command-line scripts.
82
75
83## `lib/`
76## `lib/`
84
77
@@ -86,9 +79,7 @@ That's it. That's the whole system.
86
79
87## `mar/`
80## `mar/`
88
81
89−This is where marks live. Marks are data type definitions used by `%ford` and `%clay`.
82+This is where marks live. Marks are data type definitions used by `%ford`. A mark is like a mime-type, but precisely specified in executable code.
90−
91−Marks define how diffs are performed on a particular data type and how they can be translated to different types. Sort of like file extensions, but much more powerful.
92
83
93## `ren/`
84## `ren/`
94
85
@@ -100,11 +91,13 @@ Default web requets in urbit are handled as a `.urb`, which is caught by the `ur
100
91
101`sur/` contains shared data structures.
92`sur/` contains shared data structures.
102
93
94+Files in `sur` are like headers in C.
95+
103## `web/`
96## `web/`
104
97
105There are the files publicly accessible to the web, as made possible by `%eyre`.
98There are the files publicly accessible to the web, as made possible by `%eyre`.
106
99
107## `web.md`
100## `web.md`
108
101
109−This is the homepage for your urbit. You'll see it at `http://localhost:8080/` or `http://your-urbit.urbit.org/`
102+This is the homepage for your urbit. You'll see it at `http://localhost:8080/` or `http://your-urbit.urbit.org/`.
110
103
docs/orientation/system-overview.md+24−2
@@ -1,11 +1,33 @@
1---
1---
2next: true
2next: true
3−sort: 2
3+sort: 1
4title: System overview
4title: System overview
5---
5---
6
6
7# System Overview
7# System Overview
8
8
9+Urbit is a clean-slate system software stack defined as a
10+deterministic computer. An encrypted P2P network, `%ames`, runs
11+on a functional operating system, Arvo, written in a strict,
12+typed functional language, Hoon, which compiles itself to a
13+combinator interpreter, Nock, whose spec gzips to 340 bytes.
14+
15+## Architectural overview
16+
17+A deterministic computer? Urbit's state is a pure function of
18+its event history. In practice it uses a memory checkpoint and
19+an append-only log. Every event is a transaction; Urbit is an
20+ACID database and a single-level store. Urbit runs on Unix now,
21+but it's easy to imagine on a hypervisor or even bare metal.
22+
23+A purely functional OS? Urbit is pure -- no code inside it can
24+make system calls or otherwise affect the underlying platform.
25+Instead, the top-level event function defines an I/O protocol.
26+It maps an input event and the current state to a list of output
27+actions and the subsequent state. In Hoon:
28+
29+ $+([event state] [(list action) state])
30+
9### Nock
31### Nock
10
32
11Nock is a sort of nano-Lisp without syntax, symbols or lambdas.
33Nock is a sort of nano-Lisp without syntax, symbols or lambdas.
@@ -60,4 +82,4 @@ a self-hosted Slack or persistent IRC.
60
82
61The full Urbit stack (compiler, standard library, kernel,
83The full Urbit stack (compiler, standard library, kernel,
62modules, and applications) is about 25,000 lines of Hoon.
84modules, and applications) is about 25,000 lines of Hoon.
63−Urbit is patent-free and MIT licensed.
85+Urbit is patent-free and MIT licensed.
docs/orientation/what-is-urbit.mddeleted−137
@@ -1,137 +0,0 @@
1−---
2−next: true
3−sort: 1
4−title: What is Urbit?
5−---
6−
7−# What is Urbit?
8−
9−Urbit is a clean-slate system software stack defined as a
10−deterministic computer. An encrypted P2P network, `%ames`, runs
11−on a functional operating system, Arvo, written in a strict,
12−typed functional language, Hoon, which compiles itself to a
13−combinator interpreter, Nock, whose spec gzips to 340 bytes.
14−
15−What is Urbit for? Most directly, Urbit is designed as a
16−personal cloud server for self-hosted web apps. It also uses
17−HTTP APIs to manage data stuck in traditional web applications.
18−
19−More broadly, Urbit's network tackles identity and security
20−problems which the Internet can't easily address. Programming
21−for a deterministic single-level store is also a different
22−experience from Unix programming, regardless of language.
23−
24−## Architectural overview
25−
26−A deterministic computer? Urbit's state is a pure function of
27−its event history. In practice it uses a memory checkpoint and
28−an append-only log. Every event is a transaction; Urbit is an
29−ACID database and a single-level store. Urbit runs on Unix now,
30−but it's easy to imagine on a hypervisor or even bare metal.
31−
32−A purely functional OS? Urbit is pure -- no code inside it can
33−make system calls or otherwise affect the underlying platform.
34−Instead, the top-level event function defines an I/O protocol.
35−It maps an input event and the current state to a list of output
36−actions and the subsequent state. In Hoon:
37−
38− $+([event state] [(list action) state])
39−
40−### Nock
41−
42−Nock is a sort of nano-Lisp without syntax, symbols or lambdas.
43−Most Lisps are one-layer: they create a practical language by
44−extending a theoretically simple interpreter. The abstraction is
45−simple and the implementation is practical; there is no actual
46−codebase both simple and practical. Hoon and Nock are two
47−layers: Hoon compiles itself to pure Nock. Since Urbit is
48−defined in Nock, not Hoon, we can upgrade Hoon over the air.
49−
50−The Nock data model is especially trivial. A *noun* is an atom
51−or a cell. An atom is any unsigned integer. A cell is an
52−ordered pair of nouns. Nouns are acyclic and expose no pointer
53−equality test.
54−
55−### Hoon
56−
57−Hoon is a strict combinator language that avoids mathematical
58−theory and notation. It aims at a mechanical, imperative feel.
59−Hoon uses ASCII digraphs instead of keywords; there are no
60−user-level macros. The type system infers only forward and does
61−not use unification, but is not much weaker than Haskell's. The
62−compiler and inference engine is about 2000 lines of Hoon.
63−
64−### Arvo
65−
66−Arvo is an event-driven OS written in Hoon. It can upgrade
67−itself and everything inside it over the network. The Arvo
68−kernel proper is 500 lines of Hoon, which implements a typed
69−event system with explicit call-stack structure. Arvo ships
70−with modules that provide P2P networking (`%ames`), a revision-
71−control system (`%clay`), a web client/server (`%eyre`), a
72−functional build system (`%ford`), and an application engine
73−`(%gall)`.
74−
75−### `%ames`
76−
77−`%ames`, the Urbit network, is an encrypted P2P protocol over
78−UDP. Its address space is semi-decentralized; 64-bit addresses
79−are hierarchically distributed, 128-bit addresses are
80−self-created. Addresses (or *plots*) are rendered in a phonemic
81−syntax for memorability. The scarcity of short plots helps
82−control spam and other Sybil attacks. The short plot hierarchy
83−is also reused as a supernode routing system for NAT traversal.
84−
85−### Apps
86−
87−Urbit ships with two default applications: a REPL or shell
88−`:dojo`, and a distributed user-level message-bus `:talk`.
89−`:talk` under the hood resembles NNTP; to the user, it looks like
90−a self-hosted Slack or persistent IRC.
91−
92−The full Urbit stack (compiler, standard library, kernel,
93−modules, and applications) is about 25,000 lines of Hoon.
94−Urbit is patent-free and MIT licensed.
95−
96−## Status
97−
98−Anyone can run the Urbit VM, of course. But the `%ames` network
99−is officially invitation-only. Not that we're antisocial -- just
100−that we're under construction.
101−
102−Right now, Urbit's only practical use is to (a) build Urbit and
103−(b) talk about Urbit. Its performance is lamentable. Its
104−documentation is inadequate. Its keys are test keys. Its
105−planets explode on a regular basis. We reserve the right to
106−reboot ("flag-day") the whole network.
107−
108−However, Urbit is at least out of research mode and focused more
109−or less exclusively on optimization and bug-fixing. So at least,
110−whatever you learn will stay true. And bleeding edges are fun.
111−
112−## Getting involved
113−
114−If you're interested in following Urbit, you can:
115−
116−- Read our documentation at
117− [urbit.org](http://urbit.org/docs)
118−- Subscribe to our newsletter at [urbit.org](http://urbit.org).
119−- Check out the
120− [urbit-dev](https://groups.google.com/forum/#!forum/urbit-dev)
121− mailing list.
122−- Follow [@urbit_](https://twitter.com/urbit\_) on Twitter.
123−- Hit us up by email, <span class="mono">urbit@urbit.org</span>.
124− We're nice!
125−
126−## Code of conduct
127−
128−Everyone involved in the Urbit project needs to understand and
129−respect our code of conduct, which is: "don't be rude."
130−
131−## Pronunciation and etymology
132−
133−Urbit is always pronounced "herb it," never "your bit." Not that
134−it's not your bit! But "herb it" just sounds better. (Yes, we
135−speak American and the 'h' is silent.)
136−
137−The origin of the name is just the Latin *urbi*, meaning city.
docs/setup/install.md+22−23
@@ -10,20 +10,6 @@ Urbit can be installed on most Unix systems. There is no Windows
10port. Windows is a wonderful OS, we just haven't gotten to it yet.
10port. Windows is a wonderful OS, we just haven't gotten to it yet.
11Use a VM.
11Use a VM.
12
12
13−## Configure the OS
14−
15−Urbit wants to map 2GB of memory when it boots up. We won't
16−necessarily use all this memory, we just want to see it. On a
17−normal modern PC or Mac, this is not an issue. On some small
18−cloud virtual machines (Amazon or Digital Ocean), the default
19−memory configuration is smaller than this, and you need to
20−manually configure a swapfile.
21−
22−Digital Ocean has a post on adding swap [here](https://www.digitalocean.com/community/tutorials/how-to-add-swap-on-ubuntu-14-04). For Amazon there's a StackOverflow thread [here](http://stackoverflow.com/questions/17173972/how-do-you-add-swap-to-an-ec2-instance).
23−
24−Don't spend a lot of time tweaking these settings; the simplest
25−thing is fine.
26−
27## Install as a package
13## Install as a package
28
14
29### OS X - Homebrew
15### OS X - Homebrew
@@ -39,9 +25,9 @@ Third-party packages are available, at:
39Urbit is only supported on Jessie onward (but outbound HTTPS
25Urbit is only supported on Jessie onward (but outbound HTTPS
40requests only work on Stretch; I wish we knew why; help us!)
26requests only work on Stretch; I wish we knew why; help us!)
41
27
42−## Hand-build from source
28+## Build from source
43
29
44−First, install all external dependencies. Then, make.
30+First, install all external dependencies. Then, download and make.
45
31
46### Dependencies
32### Dependencies
47
33
@@ -68,6 +54,10 @@ urbit depends on:
68
54
69 sudo dnf install gcc gcc-c++ git gmp-devel openssl-devel openssl ncurses-devel libsigsegv-devel ctags automake autoconf libtool ragel cmake re2c
55 sudo dnf install gcc gcc-c++ git gmp-devel openssl-devel openssl ncurses-devel libsigsegv-devel ctags automake autoconf libtool ragel cmake re2c
70
56
57+#### FreeBSD
58+
59+ pkg install git gmake gmp libsigsegv openssl automake autoconf ragel cmake re2c libtool
60+
71#### AWS
61#### AWS
72
62
73 sudo yum --enablerepo epel install gcc gcc-c++ git gmp-devel openssl-devel ncurses-devel libsigsegv-devel ctags automake autoconf libtool cmake re2c
63 sudo yum --enablerepo epel install gcc gcc-c++ git gmp-devel openssl-devel ncurses-devel libsigsegv-devel ctags automake autoconf libtool cmake re2c
@@ -81,18 +71,13 @@ urbit depends on:
81 sudo port install git gmp libsigsegv openssl autoconf automake cmake
71 sudo port install git gmp libsigsegv openssl autoconf automake cmake
82
72
83Although `automake`/`autoconf`/`libtool` are generally installed by
73Although `automake`/`autoconf`/`libtool` are generally installed by
84−default, some have reported needing to uninstall and reinstall those
74+default, some have reported needing to uninstall and reinstall those three packages, at least with Homebrew. Your mileage may vary.
85−three packages, at least with Homebrew. Your mileage may vary.
86−
87−#### FreeBSD
88−
89− pkg install git gmake gmp libsigsegv openssl automake autoconf ragel cmake re2c libtool
90
75
91### Download and make
76### Download and make
92
77
93Clone the repo:
78Clone the repo:
94
79
95− git clone git://github.com/urbit/urbit.git
80+ git clone https://github.com/urbit/urbit
96
81
97`cd` to the directory you just created:
82`cd` to the directory you just created:
98
83
@@ -103,3 +88,17 @@ Run `make`:
103 make
88 make
104
89
105(On FreeBSD, use `gmake` instead.)
90(On FreeBSD, use `gmake` instead.)
91+
92+## Setting up swap
93+
94+Urbit wants to map 2GB of memory when it boots up. We won't
95+necessarily use all this memory, we just want to see it. On a
96+normal modern PC or Mac, this is not an issue. On some small
97+cloud virtual machines (Amazon or Digital Ocean), the default
98+memory configuration is smaller than this, and you need to
99+manually configure a swapfile.
100+
101+Digital Ocean has a post on adding swap [here](https://www.digitalocean.com/community/tutorials/how-to-add-swap-on-ubuntu-14-04). For Amazon there's a StackOverflow thread [here](http://stackoverflow.com/questions/17173972/how-do-you-add-swap-to-an-ec2-instance).
102+
103+Don't spend a lot of time tweaking these settings; the simplest
104+thing is fine.