on master help sign in
using revisions
commitc2f44cf79cc9511771e59b30abeefb74ea42d729 authorRobert <robert@tlon.io> dateMon 1 Oct 2018, 19:03 (8 years ago) parent5b9c970
6 files changed+285−133
docs/using/admin.umd+6−5 docs/using/filesystem.umd+175−43 docs/using/layout.umd+13−12 docs/using/messaging.umd+7−3 docs/using/shell.umd+80−70 docs/using/web.umd+4
docs/using/admin.umd+6−5
@@ -74,7 +74,7 @@ line) and the record (everything above that). The record is shared; all
7474the output from all the apps in your command set appears in it. The
7575prompt is multiplexed.
7676
77−In the CLI Urbit apps can process your input before you hit return. To
77+In the CLI, Urbit apps can process your input before you hit return. To
7878see this in action try entering `)` as the first character at the Dojo
7979prompt. Since there is no Dojo command or Hoon expression that starts
8080with ')', the Dojo rejects it.
@@ -136,7 +136,7 @@ you, in turn, can sign the keys for moons. The basic idea is: your planet runs
136136permanently in a data center somewhere and moons run on all your devices. Each
137137planet can issue ~4 billion (`2^32`) moons.
138138
139−To generate a random moon from your planet run:
139+To generate a random moon from your planet, run:
140140
141141```
142142~your-urbit:dojo> +moon
@@ -156,14 +156,14 @@ the resulting directory is a rather unwieldy moon name.
156156Here's how an example moon might be booted:
157157
158158```
159−$ urbit -w faswep-navred-sampel-palnet -t habref-mebsem-harrut-batlus -c mymoon
159+$ urbit -w faswep-navred-sampel-palnet -t habref-mebsem-parsym-batlus -c mymoon
160160```
161161
162162
163163Moons are automatically synced to their parent `%kids` desk, and can control
164164applications on their parent planet using `|link`. You can read more about
165−those things in the [filesystem](/../filesystem) and [console](/../shell)
166−walkthroughs.
165+those operations in the [filesystem](/../filesystem) and [console](/../shell)
166+walkthroughs, respectively.
167167
168168
169169## Continuity breaches
@@ -193,6 +193,7 @@ $ openssl req -x509 -sha256 -newkey rsa:4096 -keyout private.pem -out certificat
193193$ mkdir -p your-urbit/.urb/tls
194194$ mv private.pem certificate.pem your-urbit/.urb/tls
195195```
196+
196197These certificates would have to be manually trusted by your browser, and it's
197198advisable that they are used only for your localhost.
198199For public-facing webservers, it would be better to create certificates for your
docs/using/filesystem.umd+175−43
@@ -21,7 +21,11 @@ pier directory.
2121
2222## Quickstart
2323
24−When developing it's a good idea to use a separate desk. Create a `%sandbox`
24+This quick-start guide will walk you through some common commands. Follow along
25+using your Dojo. When you get a `>=` message after entering a command, the means
26+that the command was successful.
27+
28+When developing it's a good idea to use a separate desk. Create a `%sandbox`
2529desk based on the `%home` desk:
2630
2731```
@@ -29,8 +33,8 @@ desk based on the `%home` desk:
2933```
3034
3135Running `our` produces your ship-name, meaning that you can run the following
32−command instead of typing out your entire. Useful for comets, due to their very
33−long names!
36+command instead of typing out the entire thing. Useful for comets, due to their
37+very long names.
3438
3539```
3640|merge %sandbox our %home
@@ -69,17 +73,17 @@ Let's see the contents of `/=sandbox=/web/md`:
6973~your-urbit:dojo> +cat /=sandbox=/web/md
7074```
7175
72−Now let's navigate to that folder using `=dir`, which is a like `cd` in unix.
76+Now let's navigate to that folder using `=dir`, which is a like `cd` in Unix.
7377
7478```
7579~your-urbit:dojo> =dir /=sandbox=/web/md
7680```
7781
7882Youl'll notice that your prompt is now `~your-urbit:dojo/sandbox/web/md>`. To
79−change back to our home directory:
83+change back to our home directory, we use `=dir` without any path.
8084
8185```
82−~your-urbit:dojo> =dir
86+~your-urbit:dojo/sandbox/web/md> =dir
8387```
8488
8589Sync from your friend `~some-ship`'s `%experiment` desk to your
@@ -89,35 +93,138 @@ Sync from your friend `~some-ship`'s `%experiment` desk to your
8993|sync %sandbox ~some-ship %experiment
9094```
9195
96+If and when your sync is successful, you will receive a message:
97+
98+```
99+activated sync from %experiment on ~some-ship to %sandbox
100+```
101+
102+The ship that you sync from will get their own message indicating that you're
103+both connected as peers:
104+
105+```
106+; ~your-urbit is your neighbor.
107+```
108+
109+---
110+
92111## Manual
93112
94113### Paths
95114
96115A path in Clay is a list of URL-safe text, restricted to the characters
97−`[a z]`,`[0 9]`, `.`, `-`, `_`, and `~`. Formally this is a `(list knot)`
98−where each segment is a `@ta`.
99−
100−Paths can be expressed as either `/foo/bar/baz` or `[%foo %bar %baz]`.
101−The first three segments of an urbit path are `/plot/desk/case`, for
102−example `/~dozbud/home/1`.
116+`[a z]`,`[0 9]`, `.`, `-`, `_`, and `~`. Formally this is a `(list knot)`,
117+meaning that each segment, delineated by `/`, is of the `knot` ASCII-text type.
118+In other words, paths are expressed as `/foo/bar/baz`. File extensions are
119+separated from file names with `/`, not `.`. Extensions are syntactically
120+identical to subdirectories, except that they must terminate the path.
121+
122+Paths begin with a piece of data called a `beak`. A beak is formally a
123+`(p=ship q=desk r=case)`; it has three components, and might look like
124+`/~dozbud-namsep/home/11`.
125+
126+The first `beak` component is `ship`, which is, as you might guess, the name of
127+an Urbit ship. The second component is `desk`, which is a workspace meant to
128+contain other directories; the default desk is `%home`. The third component is
129+`case`, which represents version information in various ways: date and time;
130+a version sequence, which is a value incremented by one whenever a file on the
131+given `desk` is modified; or an arbitrary plaintext label.
132+
133+You can find what your `beak` is at any given moment by
134+typing `%` in the Dojo and looking at the first three results.
135+
136+We use `beak`s because, unlike the current internet, the Urbit network uses a
137+global namespace. That means that a file named `example.hoon` in the `/gen`
138+directory on the `%home` desk of your ship `~lodleb-ritrul` would have a
139+universal address to anyone else on the network:
140+`~lodleb-ritrul/home/186/gen/example.hoon`. That, of
141+course, doesn't mean that everyone on the network has privileges to access that
142+path.
143+
144+The structure that combines a `beak` with further path information is called a
145+`beam`.
103146
104147##### Relative paths
105148
106−Relative paths are expressed using `%`, which is roughly equivalent to
107−Unix `.`. `%%` is `..` and `%%%` is what you would expect `...` to be.
108−There are no local relative paths. `foo/bar` must be written
149+The `%` command, which we gestured at in the above section, represents the
150+*relative path*, which is the path where you are currently working. If your
151+working directory is just your home desk, indicated by the
152+prompt `~your-planet:dojo>`, then running the command below will print your
153+working directory's `beam` information: your `beak`, and a `~` that represents
154+the empty list since no path is present.
155+
156+```
157+~your-urbit:dojo> %
158+```
159+
160+`%`s can be stacked to indicate one level further up in the hierarchy for each
161+additional `%`. Try the following command:
162+
163+```
164+~your-planet:dojo> %%%
165+```
166+
167+You'll probably notice that it only has your ship name and the empty list. The
168+two additional `%`s abandoned the `case` and the `desk` information by moving
169+up twice the hierarchy.
170+
171+There are no local relative paths. `/foo/bar` must be written as
109172`%/foo/bar`.
110173
111174##### Substitution
112175
113−If the default path is `/foo/bar/baz`, `/=/moo` means `/foo/moo`, and
114−`/=/moo/=/goo` means `/foo/moo/baz/goo`. Also, instead of `/=/=/zoo` or
115−`/=/=/=/voo`, write `/==zoo` or `/===voo`.
176+You don't need to write out the explicit path every time you want to reference
177+somewhere outside of your working directory. You can substitute `=` for the
178+segments of a path.
179+
180+Recall that a full address in the the Urbit namespace is a `beam`: the
181+`/ship/desk/case/path`. If you've switched to another desk before, you're
182+already familiar with substitution syntax:
183+
184+```
185+~your-urbit:dojo> =dir /=sandbox=
186+```
187+
188+The above command substitutes uses substitution to use your current `ship` and
189+`case`; only the `desk` argument, which is located between the other two, is
190+given something new. Without substitution, you would need to write:
191+
192+```
193+~your-urbit:dojo> =dir /~your-urbit/home/85
194+```
195+
196+Substitutions work the same way in `beak`s (the `ship/desk/case` part) and
197+paths. For example, if you are in the `/gen` directory, you can reference a file
198+in the `/app` directory like below. (`+cat` displays the contents of a file).
199+
200+```
201+~your-urbit:dojo/home/gen> +cat /===/app/curl/hoon
202+```
203+
204+Note what was substituted out, and note that we don't need to separate `=` with
205+`/`.
206+
207+If we changed our working directory to something called `/gen/gmail`, we could
208+access a file called
209+
210+```
211+~fasdul-balsev-lodleb-ritrul:dojo/home/gen/gmail> +cat /===/app/=/split/hoon
212+```
213+
214+Because both paths share a directory named `/gmail` at the same position in the
215+address hierarchy -- which, if you recall, is just a `list` -- the above command
216+works!
217+
218+We can do the same thing between desks. If `%sandbox` has been merged with
219+`%home`, the following command will produce the same results as the above
220+command.
221+
222+```
223+~your-urbit:dojo/home/gen/gmail> +cat /=sandbox=/app/=/split/hoon
224+```
116225
117226Most commonly this is used to avoid having to know the current revision
118−number in the `dojo`. Instead of writing
119−`/~your-urbit/home/4/path/to/file` you can just write
120−`/=home=/path/to/file`.
227+number in the `dojo`: `~lodleb-ritrul/home/~2018.10.2..00.35.44..d7e8/gen/example.hoon`
121228
122229##### Changing directories
123230
@@ -135,19 +242,29 @@ This command will turn your prompt into something like this:
135242~your-urbit:dojo/gen/ask>
136243```
137244
138−Using `=dir` without anything else uses the null path, which
139−returns you to your home desk.
245+Using `=dir` without anything else uses the null path, which returns you to
246+your home desk.
140247
141248```
142249~your-urbit:dojo> =dir
143250```
144251
252+To go up levels in the path hierarchy, recall the relative path expression
253+`%`. Stacking them represents another level higher in the hierarchy than
254+the current working directory for each `%` beyond the initial. The command below
255+brings you one level up:
256+
257+```
258+~your-urbit:dojo/gen> =dir %%
259+```
145260
146261### Revision-control
147262
148−Syntax: `|mount /clay/path [unix-name]`
263+##### Mount
264+
265+Syntax: `|mount /clay/path [Unix-name]`
149266
150−Mount the `clay-path` at the unix mount point `unix-name`.
267+Mount the `clay-path` at the Unix mount point `Unix-name`.
151268
152269*Examples:*
153270
@@ -163,8 +280,10 @@ Mounts `%/web` to `/web` inside your pier directory.
163280
164281Mounts `%/gen` to `/generators` inside your pier directory.
165282
283+##### Unmount
284+
166285```
167−|unmount [clay-path || unix-name]
286+|unmount [clay-path || Unix-name]
168287```
169288
170289Unmount the path or name from Unix.
@@ -263,7 +382,7 @@ version, allowing merges to be rerun.
263382the reverse of `%this`. This is different from `%init` because the new
264383commit has both sides in its ancestry.
265384
266−`%fine` - "fast-forward" merge. This succeeds iff one head is in the
385+`%fine` - "fast-forward" merge. This succeeds if and only if one head is in the
267386ancestry of the other.
268387
269388`%meet`, `%mate`, and `%meld` - find the most recent common ancestor to
@@ -299,31 +418,44 @@ annotate any conflicts, if we know how.
299418
300419### Manipulation
301420
302−#### `|rm path`
421+##### +cat
303422
304−Remove the data at `path`. `path` must be a path to actual node, not a
305−'directory'
423+Syntax: `+cat path [path ...]`
306424
307−#### `|cp to from`
425+Similar to Unix `cat`. `+cat` takes one or more `path`s, and prints their
426+contents. If that `path` is a file, the contents of the file is printed. If the
427+`path` terminates in a directory, the list of names at that path is produced.
308428
309−Copy the file at `from` into the path `to`.
429+##### +ls
310430
311−#### `|mv to from`
431+Syntax: `+ls path`
312432
313−Move the file at `from` into the path `to`.
433+Similar to Unix `ls`. `+ls` takes a single `path`.
314434
315−In Clay, `|mv` is just a shorthand for `|cp` then `|rm`. The `|rm`
316−doesn't happen unless the `|cp` succeeds.
435+Produces a list of names at the `path`.
317436
318−### Generators
437+```
438+~your-urbit:dojo> +cat %/our/home/gen/curl/hoon
439+```
319440
320−#### `+cat path [path ...]`
441+##### |rm
321442
322−Similar to Unix `cat`. `+cat` takes one or more `path`s, and prints
323−their contents.
443+Syntax: `|rm path`
324444
325−### `+ls path`
445+Remove the data at `path`. `path` must be a path to actual node, not a
446+'directory'
326447
327−Similar to Unix `ls`. `+ls` takes a single `path`.
448+##### |cp
328449
329−Produces a list of names at the `path`.
450+Syntax: `|cp to from`
451+
452+Copy the file at `from` into the path `to`.
453+
454+##### |mv
455+
456+Syntax: `|mv to from`
457+
458+Move the file at `from` into the path `to`.
459+
460+In Clay, `|mv` is just a shorthand for `|cp` then `|rm`. The `|rm`
461+doesn't happen unless the `|cp` succeeds.
docs/using/layout.umd+13−12
@@ -41,7 +41,7 @@ LICENSE/txt app/ gen/ lib/ mar/ ren/ sec/com/ sur/ sys/ tests/ web/
4141
4242Let's step through, directory by directory.
4343
44−## `sys/`
44+## sys/
4545
4646This is where the Arvo kernel lives. `sys/` contains:
4747
@@ -102,7 +102,7 @@ That's it. That's the whole system.
102102
103103---
104104
105−## `app/`
105+## app/
106106
107107This is where [Gall](../../tutorials/gall) apps live. Gall apps are stateful
108108servers, sort of like unix daemons. One familiar one is `app/hall.hoon` which is
@@ -111,13 +111,13 @@ layer. And there's also `app/dojo.hoon` — that's your shell.
111111
112112---
113113
114−## `gen/`
114+## gen/
115115
116116`gen/` holds generators. Generators are short Dojo scripts.
117117
118118---
119119
120−## `lib/`
120+## lib/
121121
122122`lib/` holds shared libraries for programs. `lib/sole` is a good
123123example — that's the console library that's shared by both Dojo in the
@@ -125,14 +125,14 @@ command line, and the Dojo web client.
125125
126126---
127127
128−## `mar/`
128+## mar/
129129
130130This is where marks live. Marks are data type definitions used by Ford.
131131A mark is like a mime-type, but specified in executable code.
132132
133133---
134134
135−## `ren/`
135+## ren/
136136
137137These are web renderers. A renderer handles web requests of a particular
138138type.
@@ -143,34 +143,35 @@ and `JS` and adds some routing magic for certain paths.
143143
144144---
145145
146−## `sec/`
146+## sec/
147147
148148Here are security drivers that Urbit uses to log into the APIs of various
149149non-Urbit services.
150150
151151---
152152
153−## `sur/`
153+## sur/
154154
155155`sur/` contains shared data structures. Files in `sur` are like header
156156files in C.
157157
158158---
159159
160−## `tests/`
160+## tests/
161161
162−`tests/` contains code that tests them.
162+`tests/` is the conventional place to put tests that use the +test generator and
163+lib/test/*
163164
164165---
165166
166−## `web/`
167+## web/
167168
168169Here are files publicly accessible to the web, as made possible by
169170[Eyre](../web).
170171
171172---
172173
173−## `web.md`
174+## web.md
174175
175176This is the homepage for your urbit. You'll see it at
176177`http://localhost:8080/` or `https://your-urbit.urbit.org/`.
docs/using/messaging.umd+7−3
@@ -140,6 +140,8 @@ Last, let's create a channel we can invite some friends to:
140140
141141Now you can tell your friends to `;join ~your-urbit/my-channel`.
142142
143+---
144+
143145;h2
144146 ;div(id "manual"): Manual
145147==
@@ -165,7 +167,7 @@ ones you can use from within Talk: lines, URLs, Hoon and replies.
165167
166168A line is simply a string of text. Depending on the filtering rules set
167169by the circle's host, these may or may not include uppercase and Unicode
168−characters.
170+characters (see [filter](#filter)).
169171
170172If the line starts with `@`, it's an action (like `/me` in IRC).
171173
@@ -260,7 +262,7 @@ or if there's additional information available — as is the case with
260262replies and attachments — activating the message will show you all the
261263details.
262264
263−You can activate the most recent line with `;`, the second-most recent
265+You can also activate the most recent line with `;`, the second-most recent
264266with `;;`, and so on.
265267
266268### Creating and managing circles
@@ -322,7 +324,9 @@ For example:
322324sampel-palnet:talk> ;depict %coolbox 'cool messages only. NO EXCEPTIONS.'
323325```
324326
325−###### Filter
327+;h6
328+ ;div(id "filter"): Filter
329+==
326330
327331Syntax: `;filter %name [capitals] [unicode]`
328332
docs/using/shell.umd+80−70
@@ -8,16 +8,12 @@
88
99# Shell (Dojo)
1010
11−;div(class "row")
12− ;div(class "col-md-8")
1311
1412The Dojo is our shell; it processes system commands and returns output. It's a
1513good place to quickly experiment with Urbit. On the surface the Dojo is just a
1614Hoon REPL. On the inside, the Dojo is a system for operating on and transforming
1715data in Urbit.
1816
19− ==
20−==
2117
2218## Quickstart
2319
@@ -37,26 +33,25 @@ Tall-form Hoon may require multiple lines:
3733
3834```
3935~your-urbit:dojo> %+ add
40−~your-urbit:dojo< 2
36+~your-urbit:dojo< 2
4137~your-urbit:dojo< 2
4238```
4339
44−Hoon uses something called [the subject](/../../tutorials/hoon-ch1/hoon-ch1-3).
45−The Dojo has its own subject, and that's where Hoon's equivalent of variables
46−are stored.
40+Hoon uses something called [the subject](../../tutorials/hoon-ch1/hoon-ch1-3).
41+The Dojo has its own subject, and that's where Hoon's equivalent of variables,
42+called faces, are stored.
4743
48−Use `=var` to save variable to the Dojo subject.
44+Use `=var` to save faces to the Dojo subject.
4945
5046```
5147~your-urbit:dojo> =foo (add 2 2)
5248```
5349
5450Note, however, that `=var` is Dojo syntax, not Hoon syntax. You cannot bind a
55−variable in a `.hoon` file in this way.
51+face in a `.hoon` file in this way.
5652
5753##### System Commands
5854
59−
6055Use `=dir` to set the current working directory:
6156
6257```
@@ -84,76 +79,92 @@ Run system commands from `:hood`, like `reload`, using `|`:
8479~your-urbit:dojo> |reload %eyre
8580```
8681
87−`_See the [Clay](../fileystem) page for more information on system commands.`
88−
8982### Generators
9083
9184Generators are short Hoon scripts, saved as `.hoon` files in the `/gen`
9285directory. Many Dojo commands exist in the form of generators. The syntax for
9386running a generator is `+genname` for a generator saved as `genname.hoon`.
9487
95−`+cat` - Accepts a path and displays the file. Similar to Unix `cat`.
88+##### +cat
89+
90+Accepts a path and displays the file. Similar to Unix `cat`.
9691
9792```
98−~your-urbit:dojo> +cat /~talsur-todres/home/gen/curl/hoon
93+~your-urbit:dojo> +cat %/gen/curl/hoon
9994```
10095
101−`+code` - Generates a code to remotely log into your ship.
96+##### +code
97+
98+Generates a code that is used to remotely log into your ship. No
99+arguments.
102100
103101```
104102~your-urbit:dojo> +code
105103```
106104
107−`+curl` - Retrives data from a URL. Accepts a `tape`. Similar to Unix
108−`curl`.
105+##### +curl
106+
107+Retrives data from a URL. Accepts a `tape`. Similar to Unix `curl`.
109108
110109```
111110~your-urbit:dojo> +curl "http://nyt.com"
112111```
113112
114−`+hello` - Just prints the argument. Accepts a `@ta`.
113+##### +hello
114+
115+Just prints the argument. Accepts a `@ta`.
115116
116117```
117118~your-urbit:dojo> +hello 'mars'
118119```
119120
120−`+ls` - Similar to Unix `ls`. Accepts a path.
121+##### +ls
122+
123+Similar to Unix `ls`. Accepts a path.
121124
122125```
123126~your-urbit:dojo> +ls %/web
124127~your-urbit:dojo> +ls /~talsur-todres/home/2/web/notes
125128```
126129
127−`+moon` - Generates a random moon from a planet. No arguments.
130+##### +moon
131+
132+Generates a random moon from a planet. No arguments.
128133
129134```
130135~your-urbit:dojo> +moon
131136```
132137
133−`+solid` - Compile the current state of the kernel and output a
134−noun. Usually downloaded to a file in unix. No arguments.
138+##### +solid
135139
140+Compile the current state of the kernel and output a
141+noun. Usually downloaded to a file in unix. No arguments.
136142
137143```
138144~your-urbit:dojo> .urbit/pill +solid
139145```
140146
141−`+test` - Testrunner. Can test multiple generators at once, conventionally ones
142−in the `/test` folder. Accepts a path.
147+##### +test
148+
149+Testrunner. Can test multiple generators at once, conventionally ones
150+in the `/test` folder. Takes a path.
143151
144152```
145153~your-urbit:dojo> +test /lib
146154```
147155
148−`+ticket` - Generate a ticket for an Urbit plot. Takes an Urbit name
149−(`@p`).
156+##### +ticket
157+
158+Generate a ticket for an Urbit ship. Takes an Urbit name (`@p`).
150159
151160
152161```
153162~your-urbit:dojo> +ticket ~talsur-todres-your-urbit
154163```
155164
156−`+tree` - Generate a recursive directory listing. Takes a path.
165+##### +tree
166+
167+Generate a recursive directory listing. Takes a path.
157168
158169```
159170~your-urbit:dojo> +tree %/web
@@ -170,7 +181,7 @@ an urbit name (`@p`) and a string (`tape`, which is text wrapped with double-quo
170181~your-urbit:dojo> |hi ~binzod "you there?"
171182```
172183
173−`|link` / `|unlink - Link / unlink a remote app. Accepts an
184+`|link` / `|unlink` - Link / unlink a remote app. Accepts an
174185Urbit name and an app name.
175186
176187```
@@ -191,25 +202,27 @@ number of vane names.
191202~your-urbit:dojo> |reload %clay %eyre
192203```
193204
194−**`|reset`** - Reloads `hoon.hoon` and all modules. No arguments.
205+*`|reset`* - Reloads `hoon.hoon` and all modules. No arguments.
195206
196207```
197208~your-urbit:dojo> |reset
198209```
199210
200−**`|start`** - Starts an app. Accepts an app name.
211+*`|start`* - Starts an app. Accepts an app name.
201212
202213```
203214~your-urbit:dojo> |start %curl
204215```
205216
217+---
218+
206219## Manual
207220
208221;h3(class "first child")
209222Sources and sinks
210223==
211224
212−A dojo command is either a source or a sink. A source is just something
225+A Dojo command is either a *source* or a *sink*. A source is just something
213226that can be printed to your console or the result of some computation. A
214227sink is an *effect*: a change to the filesystem, a network message, a
215228change to your environment, or typed message to an app.
@@ -233,11 +246,11 @@ Set any environment variable:
233246Make sure to note that `=var` is Dojo syntax, not Hoon syntax. You cannot bind a
234247variable in a `.hoon` file in this way.
235248
236−#### Special Variables
249+##### Special Variables
237250
238−There are a few special variables that the dojo maintains.
251+There are a few special variables that the Dojo maintains.
239252
240−#### `:` - Send to app
253+##### `:` - Send to app
241254
242255`:app` goes to a local `app`, `:~ship/app` goes to the `app` on `~ship`.
243256
@@ -249,18 +262,18 @@ Send a `helm-hi` message to `hood`:
249262
250263Apps usually expect marked data, so `&` is often used here.
251264
252−#### `*` - Save in `%clay`
265+##### `*` - Save in `%clay`
253266
254−Save a new `md` file in `web`:
267+Save a new `.umd` file in `web`:
255268
256269```
257−~your-urbit:dojo> *%/web/foo/md '# hello'
270+~your-urbit:dojo> *%/web/foo/umd '# hello'
258271```
259272
260273The last component of the path is expected to be the mark (or mime
261274type).
262275
263−#### `.` - Export to Unix
276+##### `.` - Export to Unix
264277
265278Export a noun to Unix with `.`:
266279
@@ -280,7 +293,7 @@ Which outputs a new `urbit.pill` to `pier/.urb/put/urbit.pill`
280293
281294### Sources
282295
283−#### `&` - Mark conversion
296+##### `&` - Mark conversion
284297
285298Convert between marks using `&`:
286299
@@ -289,14 +302,14 @@ Convert between marks using `&`:
289302'<html><head></head><body><div><h1 id="-hello">hello</h1></div></body></html>'
290303```
291304
292−#### `_` - Run a function
305+##### `_` - Run a function
293306
294307Use `_` to run a gate (or function):
295308
296309Write an arbitrary function and pass data to it:
297310
298311```
299−~your-urbit:dojo> _|=({a/@} (mul a 3)) 3
312+~your-urbit:dojo> _|=([a=@] (mul a 3)) 3
3003139
301314```
302315
@@ -307,7 +320,7 @@ Use a function to get the status code from an http request:
307320301
308321```
309322
310−#### `+` `-` - HTTP requests
323+##### `+` `-` - HTTP requests
311324
312325`+http[s]://example.com` - sends a GET request
313326
@@ -319,16 +332,17 @@ JSON `"hi"` in the body.
319332
320333Note that the first of these is a source while the last two are sinks.
321334
322−#### `+` - Generators
335+##### `+` - Generators
323336
324−Generators are simple hoon scripts loaded from the filesystem. They live
337+Generators are simple Hoon scripts loaded from the filesystem. They live
325338in `gen/`.
326339
327−Create a random moon (from any planet):
340+An example of a generator that is built into your urbit is `+code`. It produces
341+the code needed to log into your ship remotely.
328342
329343```
330−~your-urbit:dojo> +moon
331−"moon: ~docsun-tamtem-your-urbit; ticket: ~bartug-hodbyr-fognum-ralmud"
344+~your-urbit:dojo> +code
345+fintyr-haldet-fassev-solhex
332346```
333347
334348### Variables
@@ -336,53 +350,49 @@ Create a random moon (from any planet):
336350You can use `=` to set an environment variable in Dojo, but there are
337351a few reserved names that have special uses.
338352
339−#### `dir`
353+##### dir
340354
341355Current working `%clay` desk and revision. Read / write.
342356
343−**Examples:**
357+*Examples:*
344358
345359```
346360~your-urbit:dojo> =dir %/web
347361~your-urbit:dojo> +ls %
348−404/hoon docs/ dojo/hoon lib/ listen/hoon md static/md talk/ tree/main/
362+404/hoon docs/ dojo/hoon lib/ listen/hoon md static/umd talk/ testing/umd tree/main/ unmark/ womb/
349363```
350364
351−#### `lib`
365+##### lib
352366
353−Current set of libraries (`/lib`) in your environment. Can also be set
367+Current set of libraries (`/lib`) in your environment. Can be set
354368with `/+`. Read / write.
355369
356−**Examples:**
370+*Examples:*
357371
358372```
359−~your-urbit:dojo> =lib ~[[%react ~]]
360−~your-urbit:dojo> :: this also works:
361373~your-urbit:dojo> /+ react
362374~your-urbit:dojo> :: now we can use arms from lib/react.hoon
363375~your-urbit:dojo> (react-vale:react %div)
364376```
365377
366−#### `sur`
378+##### sur
367379
368−Current set of structures (`/sur`) in your environment. Can also be set
380+Current set of structures (`/sur`) in your environment. Can be set
369381with `/-`. Read / write.
370382
371−**Examples:**
383+*Examples:*
372384
373385```
374−~your-urbit:dojo> =sur ~[[%sole ~]]
375−~your-urbit:dojo> :: this also works:
376386~your-urbit:dojo> /- sole
377387~your-urbit:dojo> :: now we can use arms in sur/sole.hoon
378388~your-urbit:dojo> `sole-effect:sole`[%bel ~]
379389```
380390
381−#### `now`
391+##### now
382392
383393The current (128-bit `@da`) time. Read-only.
384394
385−**Example:**
395+*Example:*
386396
387397```
388398~your-urbit:dojo> now
@@ -390,11 +400,11 @@ The current (128-bit `@da`) time. Read-only.
390400~2016.3.21..21.10.57..429a
391401```
392402
393−#### `our`
403+##### our
394404
395−The current urbit plot. Read-only.
405+The current urbit ship. Read-only.
396406
397−**Example:**
407+*Example:*
398408
399409```
400410~your-urbit:dojo> our
@@ -402,11 +412,11 @@ The current urbit plot. Read-only.
402412~your-urbit
403413```
404414
405−#### `eny`
415+##### eny
406416
407417512 bits of entropy. Read-only.
408418
409−**Example:**
419+*Example:*
410420
411421```
412422~your-urbit:dojo> eny
@@ -419,5 +429,5 @@ The current urbit plot. Read-only.
419429## Troubleshooting
420430
421431If you encounter `%dy-edit-busy` while entering commands, it is
422−because your dojo is blocked on a timer or an http request. Type backspace
423−and your dojo will end the blocked command.
432+because your Dojo is blocked on a timer or an HTTP request. Type backspace
433+and your Dojo will end the blocked command.
docs/using/web.umd+4
@@ -170,8 +170,12 @@ Let's quickly step through the default contents of `web/`:
170170- `static.umd` - Sample static file
171171- `talk/` - Talk compiled JS / CSS
172172- `talk.hoon` - Page body that loads the `talk` React module.
173+- `testing.umd` - Guide to writing unit tests in Urbit
173174- `tree/` - Tree compiled JS / CSS
174175- `tree.hoon` - Page body that loads the `tree` React module.
176+- `unmark/` - Used for testing `.umd`.
177+- `womb/` - Womb compiled by JS/CSS
178+- `womb.hoon` - Used for issuing planets on the test network.
175179
176180## Tree
177181