on master help sign in
Merge pull request #48 from joemfb/arvo-exercises

arvo exercises (formatting and broken examples)

commit5d5ce7e1f73593f98734ed78e031a17984edf213 authorcgyarvin <curtis.yarvin@gmail.com> dateTue 21 Jun 2016, 11:08 (10 years ago) parent61435c85b2a095
18 files changed+135−131
docs/about/contributing.md+1−1 docs/arvo/basic.md+22−12 docs/arvo/generators.md+20−24 docs/arvo/http.md+19−29 docs/arvo/internals/eyre/commentary.md+3−3 docs/arvo/network.md+32−31 docs/arvo/state.md+10−3 docs/arvo/subject.md+6−6 docs/arvo/subscriptions.md+11−11 docs/arvo/web-apps.md+1−1 docs/hoon/exercises/fizzbuzz.md+2−2 docs/hoon/library/4h.md+1−1 docs/hoon/library/zuse/core/epur.md+1−1 docs/hoon/library/zuse/core/yu.md+1−1 docs/hoon/library/zuse/diff.md+1−1 docs/hoon/library/zuse/gate/jesc.md+1−1 docs/hoon/library/zuse/gate/tope.md+1−1 docs/hoon/syntax.md+2−2
docs/about/contributing.md+1−1
@@ -16,7 +16,7 @@ for improving our [code](https://github.com/urbit/urbit/) and
1616Our official guide to contributing can be found
1717[here](https://github.com/urbit/urbit/blob/master/CONTRIBUTING.md),
1818which is most useful for large and low-level changes. For simpler
19−revisions, refer to [Hoon Syntax](/hoon/syntax) for an in-depth guide to
19+revisions, refer to [Hoon Syntax](../../hoon/syntax) for an in-depth guide to
2020good Hoon. Alternatively, [browse the
2121source](https://github.com/urbit/arvo/blob/master/arvo/hoon.hoon).
2222
docs/arvo/basic.md+22−12
@@ -29,8 +29,18 @@ at the [basic operation](/docs/using/admin) of your urbit.
2929If you haven't copied in the examples repo, running the following
3030commands from your urbit directory should do the trick:
3131
32−`$ cp -r {wherever-you've-pulled-to}/examples/gall/*/ arvo/`
33−`$ cp -r {wherever-you've-pulled-to}/examples/dojo/*/ arvo/`
32+Make sure you've mounted your `%home` desk:
33+
34+```
35+~fintud-macrep:dojo> |mount %
36+```
37+
38+Then, copy the example into it
39+
40+```
41+$ cp -r {urbit-examples}/gall/*/ {your-pier}/home/
42+$ cp -r {urbit-examples}/dojo/*/ {your-pier}/home/
43+```
3444
3545Run an example to ensure it worked:
3646
@@ -163,7 +173,7 @@ You can write:
163173### Lines 12-34
164174
165175Now let's quickly walk through this code line-by-line. Lines 12-34 are
166−wrapped in a `|%` ('[barcen](/hoon/twig/bar-core/cen-core/)'), which produces a core. Cores are a
176+wrapped in a `|%` ('[barcen](../../hoon/twig/bar-core/cen-core/)'), which produces a core. Cores are a
167177fundamental datatype in Hoon, similar to a struct, class, or object. A
168178core is just a map of names to any kind of code, whether it be functions
169179or data. Each element in this map begins with a `++` followed by the
@@ -182,7 +192,7 @@ Let's step into each of the three arms within our core.
182192 (add (five a) (three a))
183193 --
184194
185−`|=` ('[bartis](/hoon/twig/bar-core/tis-gate/)') produces a function, much like a lambda in lisp. It
195+`|=` ('[bartis](../../hoon/twig/bar-core/tis-gate/)') produces a function, much like a lambda in lisp. It
186196takes two children:
187197
1881981. A set of argument(s). In this case our argument set only contains
@@ -207,14 +217,14 @@ takes two children:
207217As above, `++three` takes an integer argument, `a`, and then executes
208218the remainder of the code with `a` set to the actual arguments.
209219
210−Similarly, `=|` ('[tisbar](/hoon/twig/tis-flow/bar-new/)') pushes its first child, `b` into our context
220+Similarly, `=|` ('[tisbar](../../hoon/twig/tis-flow/bar-new/)') pushes its first child, `b` into our context
211221(in other words, it declares a variable `b`) and executes the remainder
212222of the code. However, `b` is not an argument; `=|` sets `b` to the
213223default value of whatever type it is declared as. Since the default
214224value of an atom is `0`, b is set to `0`.
215225
216−> To produce the default value of any given type, use `$*` ('buctar')
217−> followed by the type. Alternatively, use the irregular form `*`.
226+> To produce the default value of any given type, use `*` ('tar')
227+> followed by the type. This operaction is called *bunt*.
218228>
219229> > *@ :: produce the default value of atom @
220230> 0
@@ -225,10 +235,10 @@ value of an atom is `0`, b is set to `0`.
225235So now we have two variables: `a` is set to our input, and `b` is
226236initialized to `0`.
227237
228−One way to think about `|-` ('[barhep](/hoon/twig/bar-core/hep-loop/)') is that it lays down a recursion
238+One way to think about `|-` ('[barhep](../../hoon/twig/bar-core/hep-loop/)') is that it lays down a recursion
229239point. More on this later.
230240
231−`^-` ('[kethep](/hoon/core/ket-cast/hep-cast/)') is just a cast that sets the result of the remainder of
241+`^-` ('[kethep](../../hoon/core/ket-cast/hep-cast/)') is just a cast that sets the result of the remainder of
232242the code to an unsigned integer, `@u`.
233243
234244In pseudocode, the last three lines read like this: if `a` is less than
@@ -246,10 +256,10 @@ function call, then you have to specify every argument.
246256
247257**Exercises**:
248258
249−Tweak your code to complete the following excercises.
259+Tweak your code to complete the following exercises.
250260
251261There are a few runes and some syntax that we have yet to cover that you
252−will need to complete the excercises below. For these, please refer to
262+will need to complete the exercises below. For these, please refer to
253263our cheatsheat at the bottom.
254264
2552651. Read and understand `++five` line by line.
@@ -272,7 +282,7 @@ our cheatsheat at the bottom.
272282 =(a b) test equality
273283 (function args ...) call function with args
274284
275−Lookup each of these expressions (and all others!) in the [Twig Expressions](/hoon/twig/) definition.
285+Lookup each of these expressions (and all others!) in the [Twig Expressions](../../hoon/twig/) definition.
276286
277287### New material
278288
docs/arvo/generators.md+20−24
@@ -65,13 +65,11 @@ optionally specify the message as well.
6565We'll need a new mark for our arguments. Let's call it
6666`examples-ping-message`.
6767
68−<blockquote class="blockquote">
69−For app-specific marks, it's good style to prefix the name of
70−the mark with the name of the app. Since many apps have
71−several such marks, subdirectories in `/mar` are rendered as
72−`-`, so that `ping-message` is written in
73−(/mar/examples/ping/message.hoon).
74−</blockquote>
68+> For app-specific marks, it's good style to prefix the name of
69+> the mark with the name of the app. Since many apps have
70+> several such marks, subdirectories in `/mar` are rendered as
71+> `-`, so that `ping-message` is written in
72+> (/mar/examples/ping/message.hoon).
7573
7674```
7775:: Up-ness monitor. Accepts atom url, 'on', or 'off'
@@ -214,23 +212,21 @@ text and null.
214212Secondly, `?~(a b c)` is a rune which means "if the `a` is null,
215213do `b`, else `c`". It is roughly equivalent to `?:(=(~ a) b c)`.
216214
217−<blockquote class="blockquote">
218−`?~(a b c)` is actually equivalent to `?:=(?=(~ a) b c)`,
219−which, although identical at run time, is subtly different at
220−compile time. Specifically, using `?=` rather than `=` means
221−that we're checking whether `a` is in the *type* of `~`, and so
222−the compiler knows that in the `b` case `a` is null, and in the
223−`c` case `a` is not null. Since `=` is purely a runtime value
224−check with no type implications, the compiler doesn't gain any
225−information.
226−
227−At any rate, this is the reason why we can refer to
228−`text.message` in the `c` clause. The compiler knows that
229−`message` is not null, so it must have `text` within it. If
230−you used `?:(=(~ message) 'howdy' text.message)` the compiler
231−would complain that it doesn't know whether `message` has
232−`text` within it.
233−</blockquote>
215+> `?~(a b c)` is actually equivalent to `?:=(?=(~ a) b c)`,
216+> which, although identical at run time, is subtly different at
217+> compile time. Specifically, using `?=` rather than `=` means
218+> that we're checking whether `a` is in the *type* of `~`, and so
219+> the compiler knows that in the `b` case `a` is null, and in the
220+> `c` case `a` is not null. Since `=` is purely a runtime value
221+> check with no type implications, the compiler doesn't gain any
222+> information.
223+>
224+> At any rate, this is the reason why we can refer to
225+> `text.message` in the `c` clause. The compiler knows that
226+> `message` is not null, so it must have `text` within it. If
227+> you used `?:(=(~ message) 'howdy' text.message)` the compiler
228+> would complain that it doesn't know whether `message` has
229+> `text` within it.
234230
235231This is run as follows:
236232
docs/arvo/http.md+19−29
@@ -77,12 +77,10 @@ line, though.
7777Firstly, there's two kinds of cards we're sending to arvo. A
7878`%them` card makes an HTTP requrest out of a unit `hiss`.
7979
80−<blockquote class="blockquote">
81−Recall that `++unit` means "maybe". Formally, "`(unit a)` is
82−either null or a pair of null and a value in `a`". Also recall
83−that to pull a value out of a unit `(u.unit)`, you must first
84−verify that the unit is not null (for example with `?~`).
85−</blockquote>
80+> Recall that `++unit` means "maybe". Formally, "`(unit a)` is
81+> either null or a pair of null and a value in `a`". Also recall
82+> that to pull a value out of a unit `(u.unit)`, you must first
83+> verify that the unit is not null (for example with `?~`).
8684
8785A `hiss` (all of the following terms are defined in `zuse`) is a
8886pair of a `purl` and a `moth`. A `purl` is a parsed url
@@ -96,11 +94,9 @@ of HTTP headers. The `(unit octs)` is a possible octet stream
9694representing the body. If it's null, then no body is sent (as in
9795this case).
9896
99−<blockquote class="blockquote">
100−An octect stream is a pair of the length in bytes of the data
101−plus the data itself. You can use `++taco` takes text and
102−turns it into an octet strem.
103−</blockquote>
97+> An octect stream is a pair of the length in bytes of the data
98+> plus the data itself. You can use `++taco` takes text and
99+> turns it into an octet strem.
104100
105101When you send this request, you can expect a `%thou` with the
106102response, which we handle later on in `++thou-request`.
@@ -108,11 +104,9 @@ response, which we handle later on in `++thou-request`.
108104For `%wait`, you just pass a [`@da`]() (absolute date), and arvo will
109105produce a `%wake` when the time comes.
110106
111−<blockquote class="blockquote">
112−A timer is guaranteed to not be triggered before the given
113−time, but it's currently impossible to guarantee the timer will be
114−triggered at exactly the requested time.
115−</blockquote>
107+> A timer is guaranteed to not be triggered before the given
108+> time, but it's currently impossible to guarantee the timer will be
109+> triggered at exactly the requested time.
116110
117111Let's take a look at our state:
118112
@@ -133,11 +127,9 @@ of `value`, but make the default value be `value`". Thus, our
133127type is still a boolean, just like `?`, but the default value is
134128`|` (false).
135129
136−<blockquote class="blockquote">
137−This is the same `_` used in `_+>.$`, which means "the same
138−type as the value "+>.$". In other words, the same type as our
139−current context and state.
140−</blockquote>
130+> This is the same `_` used in `_+>.$`, which means "the same
131+> type as the value "+>.$". In other words, the same type as our
132+> current context and state.
141133
142134Let's take a look at `++poke-cord`. When we're poked with a
143135cord, we first check whether it's `'off'`. If so, we set `on` to
@@ -151,14 +143,12 @@ This request follows the pattern in `++hiss` well. `(need (epur
151143target))` is the parsed url, `%get` is the HTTP method, `~`
152144means no extra headers, and another `~` means no body.
153145
154−<blockquote class="blockquote">
155−Note the `~` at the end of the move. This is a convenient
156−shortcut for creating a list of a single element. It's part of
157−a small family of such shortcuts. `~[a b c]` is `[a b c ~]`,
158−`[a b c]~` is `[[a b c] ~]` and `\`[a b c]` is `[~ a b c]`.
159−These may be mixed and matched to create various convoluted
160−structures and emojis.
161−</blockquote>
146+> Note the `~` at the end of the move. This is a convenient
147+> shortcut for creating a list of a single element. It's part of
148+> a small family of such shortcuts. `~[a b c]` is `[a b c ~]`,
149+> `[a b c]~` is `[[a b c] ~]` and `\`[a b c]` is `[~ a b c]`.
150+> These may be mixed and matched to create various convoluted
151+> structures and emojis.
162152
163153If the argument is neither 'off' nor 'on', then we assume it's an
164154actual url, so we save it in `target`.
docs/arvo/internals/eyre/commentary.md+3−3
@@ -96,7 +96,7 @@ initiates the long-polling loop, run against an injected `urb.js` of
9696
9797A `%js` `pest` is `resolve`d as a `text/javascript` success `%this`.
9898
99−When `poll.js` is recieved by the client, it opens an `XMLHttpRequest` for
99+When `poll.js` is received by the client, it opens an `XMLHttpRequest` for
100100`/~/on/{window.urb.poll}.json`, bringing us back to `%poll:process`.
101101
102102In the case of a non-`%js` `/~/on/`, `%poll:process-parsed` turns into a
@@ -167,7 +167,7 @@ the first nontrivial `++check-oryx` occurs, `++grab-body` the request oryx and
167167ensuring it is recorded for the session. The request parsed with `++need-body`
168168to a `[%auth %try {password}]` perk. `%get:process-auth` checks it against
169169`++load-secret`, upon success updates the session with `++logon:ya`, and
170−serves a fresh `auth.json` which reflects the changed `user`. Upon recieving
170+serves a fresh `auth.json` which reflects the changed `user`. Upon receiving
171171this, the page is refreshed to retry the original request.
172172
173173## Post-authentication: app communication. [#auth-ok]
@@ -212,7 +212,7 @@ Upon receipt, the client realizes the long-poll isn't actually running, so that
212212is started using `urb.poll`. At `/~/of/{ixor}`, perk
213213`[%view ixor ~ {sequence-number}]`, it is `process`ed by `++poll:ix` (the cyst
214214is retrieved by `++ire-ix` form global state, using the perk `ixor`): the
215−sequence number is in the past, so the previously recieved `%rush` is
215+sequence number is in the past, so the previously received `%rush` is
216216`++give-even`. After deleting the previous message in the queue and invoking
217217`++pass-took` to signal `%gall` of this occurrence, the data is annotated with
218218the source app+path `++subs-to-json`, and returned to the polling duct.
docs/arvo/network.md+32−31
@@ -34,7 +34,8 @@ a value, it prints that value out. To try this out, you have to start
3434the app, then you can poke it from the command line with the following
3535commands:
3636
37− ~fintud-macrep:dojo> |start %echo
37+ ~fintud-macrep:dojo> |start %examples-echo
38+ 'prep'
3839 >=
3940 ~fintud-macrep:dojo> :examples-echo 5
4041 [%argument 5]
@@ -57,7 +58,7 @@ do that is to poke it from the command line, which we we did with
5758`:echo 5` (`:[app-name] [argument(s)]`).
5859
5960In this case, `++poke-noun` takes an argument `arg` and prints it out
60−with `~&` ([sigpam](/hoon/twig/sig-hint/pam-dump/)). This is an unusual
61+with `~&` ([sigpam](../../hoon/twig/sig-hint/pam-dump/)). This is an unusual
6162rune that formally "does nothing", but the interpreter detects it and
6263printfs the first child, before executing the second as if the first
6364didn't exist. This is a slightly hacky way of printing to the console,
@@ -169,7 +170,7 @@ Run it with these commands:
169170
170171 ~fintud-macrep:dojo> |start %examples-pong
171172 >=
172− ~fintud-macrep:dojo> :pong &examples-urbit ~sampel-sipnym
173+ ~fintud-macrep:dojo> :examples-pong &urbit ~sampel-sipnym
173174 >=
174175
175176Replace `~sampel-sipnym` with another urbit. The easiest thing to do is
@@ -220,7 +221,7 @@ Let's walk through each of these elements step by step.
220221If you look up `++bone` in `hoon.hoon`, you'll see that it's a number
221222(`@ud`), and that it's an opaque reference to a duct. `++duct` in
222223hoon.hoon is a list of `wire`s, where `++wire` is an alias for `++path`.
223−`++path` is a list of `++span`s, which are ASCII text. Thus, a duct is a
224+`++path` is a list of `++knot`s, which are ASCII text. Thus, a duct is a
224225list of paths, and a bone is an opaque reference to it (in the same way
225226that a Unix file descriptor is an opaque reference to a file structure).
226227Thus, to truly understand bones, we must understand ducts.
@@ -234,7 +235,7 @@ Sometimes, the module can immediately handle the event and produce any
234235necessary results. For example, when we poked the `++poke-atom` arm
235236above, we poked %gall, our application server, which was able to respond
236237to our poke directly. When the module cannot service the request itself,
237−it sends instructions to another kernel module or application (the the
238+it sends instructions to another kernel module or application (through the
238239%gall module) to do a specified action, and produces the result from
239240that.
240241
@@ -283,7 +284,7 @@ The move ends with `*` (that is, any noun) since each type of move takes
283284different data. In our case, a `%poke` move takes a target (urbit and
284285app) and marked data, then pokes the arm of the corresponding mark on
285286that app on that urbit with that data. `[to-urbit-address %pong]` is the
286−target urbit and app, `%atom` is the mark`, and`'howdy'\` is the data.
287+target urbit and app, `%atom` is the `mark`, and`'howdy'` is the data.
287288
288289When arvo receives a `%poke` move, it calls the appropriate `++poke`.
289290The same mechanism is used for sending messages between apps on the same
@@ -304,7 +305,7 @@ urbit as for sending messages between apps on different urbits.
304305
305306- Write two apps, `even` and `odd`. When you pass an atom to `even`,
306307 check whether it's even. If so, divide it by two and recurse;
307− otherwise, poke `odd` with it. When `odd` recieves an atom, check
308+ otherwise, poke `odd` with it. When `odd` receives an atom, check
308309 whether it's equal to one. If so, terminate, printing "%success".
309310 Otherwise, check whether it's odd. If so, multiply it by three, add
310311 one, and recurse; otherwise, poke `even` with it. When either app
@@ -312,30 +313,30 @@ urbit as for sending messages between apps on different urbits.
312313 the end, you should be able to watch Collatz's conjecture play out
313314 between the two apps. Sample output:
314315
315−<!-- -->
316−
317− ~fintud-macrep:dojo> :even &atom 18
318− [%even 18]
319− [%odd 9]
320− [%even 28]
321− [%even 14]
322− [%odd 7]
323− [%even 22]
324− [%odd 11]
325− [%even 34]
326− [%odd 17]
327− [%even 52]
328− [%even 26]
329− [%odd 13]
330− [%even 40]
331− [%even 20]
332− [%even 10]
333− [%odd 5]
334− [%even 16]
335− [%even 8]
336− [%even 4]
337− [%even 2]
338− %success
316+```
317+~fintud-macrep:dojo> :even &atom 18
318+[%even 18]
319+[%odd 9]
320+[%even 28]
321+[%even 14]
322+[%odd 7]
323+[%even 22]
324+[%odd 11]
325+[%even 34]
326+[%odd 17]
327+[%even 52]
328+[%even 26]
329+[%odd 13]
330+[%even 40]
331+[%even 20]
332+[%even 10]
333+[%odd 5]
334+[%even 16]
335+[%even 8]
336+[%even 4]
337+[%even 2]
338+%success
339+```
339340
340341- Put `even` and `odd` on two separate urbits and pass the messages
341342 over the network. Post a link to a working solution in :talk to
docs/arvo/state.md+10−3
@@ -99,6 +99,13 @@ ever go through the hassle of having to set up and write to a database.
9999- Write an app that prints out the previous value you poked it with.
100100 Sample output:
101101
102−\`\`\` \~fintud-macrep:dojo\> :examples-last 7 [%last 0] \>=
103−\~fintud-macrep:dojo\> :examples-last [1 2 3][%last 7] \>=
104−\~fintud-macrep:dojo\> :examples-last 'howdy' [%last [1 2 3]]
102+```
103+~fintud-macrep:dojo> :examples-last 7
104+[%last 0]
105+>=
106+~fintud-macrep:dojo> :examples-last [1 2 3]
107+[%last 7]
108+>=
109+~fintud-macrep:dojo> :examples-last 'howdy'
110+[%last [1 2 3]]
111+```
docs/arvo/subject.md+6−6
@@ -15,7 +15,7 @@ Now we're going to cover the boiler plate that we skimmed over earlier.
1515 =< (sum [1.000 2.000])
1616
1717The first rune, `:-` (colhep, aka
18−[:cons](/hoon/twig/col-cell/hep-cons/)), constructs the 2-element cell
18+[:cons](../../hoon/twig/col-cell/hep-cons/)), constructs the 2-element cell
1919that will be our program. The first element, `%say`, tells the
2020interpreter what to produce--in this case a value.
2121
@@ -28,7 +28,7 @@ Similarly, the rest of the program (which we construct with another
2828producing a value of type `noun`, and the code that we run to actually
2929produce our value of the type `noun`.
3030
31−`=<` ([tisgal](/hoon/twig/tis-flow/gal-rap/)) is a rune that takes two
31+`=<` ([tisgal](../../hoon/twig/tis-flow/gal-rap/)) is a rune that takes two
3232children. The second child is the context against which we run the first
3333child. So in this case, we are running the expression
3434`(sum [1.000 2.000])` against everything contained within the `|%`. In
@@ -36,7 +36,7 @@ Hoon, we call the code executed the "formula" and its context the
3636"subject".
3737
3838 ::::::::::::::::::::::::::::::
39− =< (sum [1.000 2.000]) :: formula
39+ =< (sum [1.000 2.000]) :: formula
4040 ::::::::::::::::::::::::::::::
4141 |% ::
4242 ++ three ::
@@ -58,8 +58,8 @@ Hoon, we call the code executed the "formula" and its context the
5858 (add b $(b (add b 5))) ::
5959 ::
6060 ++ sum ::
61− |= a/@u ::
62− (add (five a) (three a)) ::
61+ |= {a/@u b/@u} ::
62+ (add (five a) (three b)) ::
6363 -- ::
6464 ::::::::::::::::::::::::::::::
6565
@@ -72,7 +72,7 @@ allows a sort of reification of the context through continutations, and
7272some may see a parallel to Forth's stack, but Hoon takes takes the
7373concept one step further.
7474
75−Our starting subject is the [standard library](/hoon/library), which is
75+Our starting subject is the [standard library](../../hoon/library), which is
7676defined in `/arvo/hoon.hoon` and `/arvo/zuse.hoon`. This is where
7777functions like `add` are defined. When we define a core with `|%`, we
7878don't throw away the subject (i.e. the standard library); rather, we
docs/arvo/subscriptions.md+11−11
@@ -59,7 +59,7 @@ And secondly, `:examples-sink`:
5959 ++ diff-noun
6060 |= {wir/wire arg/*}
6161 ^- {(list move) _+>.$}
62− ~& [%recieved-data arg]
62+ ~& [%received-data arg]
6363 [~ +>.$]
6464 ++ reap
6565 |= {wir/wire error/(unit tang)}
@@ -75,42 +75,42 @@ Cheat sheet:
7575
7676- `&` (pam) can either be the boolean true (as can `%.y`, `0`), or
7777 the irregular wide form of the `?&`
78− ([wutpam](/hoon/twig/wut-test/pam-and)) rune, which computes
78+ ([wutpam](../../hoon/twig/wut-test/pam-and)) rune, which computes
7979 logical `AND` on its two children.
8080
8181- Similar to `&`,`|` is either the boolean false (along with `%.n` and
8282 `1`), or the irregular short for of `?|`
83− ([wutbar](/hoon/twig/wut-test/bar-or)), which computes logical `OR`
83+ ([wutbar](../../hoon/twig/wut-test/bar-or)), which computes logical `OR`
8484 on its two children.
8585
8686- `!` is the irregular wide form of `?!`
87− ([wutzap](/hoon/twig/wut-test/zap-not/)), which computes logical
87+ ([wutzap](../../hoon/twig/wut-test/zap-not/)), which computes logical
8888 `NOT` on its child.
8989
90−- `?~` ([wutsig](/hoon/twig/wut-test/sig-ifno/)) is basically an
90+- `?~` ([wutsig](../../hoon/twig/wut-test/sig-ifno/)) is basically an
9191 if-then-else that checks whether condition `p` is `~` (null). `?~`
9292 is slightly different from `?:(~ %tru %fal)` in that `?~` reduces to
9393 `?:($=(%type value) %tru %false)`. `$=`
94− ([buctis](/hoon/twig/buc-mold/tis-coat/)) tests whether value `q` is
94+ ([buctis](../../hoon/twig/buc-mold/tis-coat/)) tests whether value `q` is
9595 of type `p`.
9696 <!--One thing to watch out for in hoon: if you do `?~`, it
9797 affects the type of the conditional value: XXexample-->
9898
99−- `:_` ([colcab](/hoon/twig/col-cell/cab-scon/)) is inverted `:-`: it
99+- `:_` ([colcab](../../hoon/twig/col-cell/cab-scon/)) is inverted `:-`: it
100100 accepts `p` and `q`, and produces `[q p]`.
101101
102102- `++bowl` is the type of the system state within our app. For
103103 example, it includes things like `our`, the name of the host urbit,
104104 and `now`, the current time.
105105
106−- `$%` ([buccen](/hoon/twig/buc-mold/cen-book/)) is a type
106+- `$%` ([buccen](../../hoon/twig/buc-mold/cen-book/)) is a type
107107 constructor: it defines a new type, composed of `n` types that it is
108108 passed. For example `$% @ * ^ ==` is the type of either `@`,
109109 `*`, or a cell `^`. <!--XX this is a union, right?-->
110110
111111- You may have noticed the separate `|%`
112− ([barcen](/hoon/twig/bar-core/cen-core/)) above the application core
113− `|_` ([barcab](/hoon/twig/bar-core/cab-door/). We usually put our
112+ ([barcen](../../hoon/twig/bar-core/cen-core/)) above the application core
113+ `|_` ([barcab](../../hoon/twig/bar-core/cab-door/). We usually put our
114114 types in another core on top of the application core. We can access
115115 these type from our `|_` because in `hoon.hoon` files, all cores are
116116 called against each other. (The shorthand for 'called' is `=>`.)
@@ -180,7 +180,7 @@ so you don't have to. You can access your subscribers by looking at
180180subscribed, and which path they subscribed on. If you want to
181181communicate with your subscribers, send them messages along their bone.
182182
183−`++poke-noun` "spams" the given arguement to all our subscribers.
183+`++poke-noun` "spams" the given argument to all our subscribers.
184184There's a few things we haven't seen before. Firstly, `:_(a b)` is the
185185same as `[b a]`. It's just a convenient way of formatting things when
186186the first thing in a cell is much more complicated than the second.
docs/arvo/web-apps.md+1−1
@@ -145,7 +145,7 @@ the app from the command line.
145145 `:click` and print out the subscription updates on the command
146146 line.
147147
148−#Frontend
148+# Frontend
149149
150150That's all that's needed for the back end. The front end is just
151151some "sail" html (Hoon markup for XML) and javascript. Here's `/web/click.hoon`:
docs/hoon/exercises/fizzbuzz.md+2−2
@@ -28,8 +28,8 @@ comments: true
2828 ```
2929
3030 Modify this to produce "Fuzz" when the number is divisible by
31− 7, "Fuzz" when divisible by 21, "FuzzFizz" when divisble by 35,
32− and "FuzzFizzBuzz" when divisble by 105.
31+ 7, "Fuzz" when divisible by 21, "FuzzFizz" when divisible by 35,
32+ and "FuzzFizzBuzz" when divisible by 105.
3333
34341. Modify FizzBuzz from the previous exercise to take both a
3535 start and an end number.
docs/hoon/library/4h.md+1−1
@@ -61,7 +61,7 @@ Examples
6161Parse backslash
6262
6363Parses ASCII character 92, the backslash. Note the extra `\` in the calling of
64−`bas` with [`++just`](/doc/hoon/library/2ec#++just) is to escape the escape
64+`bas` with [`++just`](/docs/hoon/library/2ec#++just) is to escape the escape
6565character, `\`.
6666
6767Source
docs/hoon/library/zuse/core/epur.md+1−1
@@ -12,7 +12,7 @@ Parses an entire URL.
1212Accepts
1313-------
1414
15−`a` is a [`++cord`](/doc/hoon/library/1#++cord).
15+`a` is a [`++cord`](/docs/hoon/library/1#++cord).
1616
1717Produces
1818--------
docs/hoon/library/zuse/core/yu.md+1−1
@@ -153,7 +153,7 @@ Examples
153153Back-shifted leap second dates
154154
155155Produces a [`++list`]() of absolute dates ([`@da`]()s) that represent the Urbit
156−Galactc Time equivalents of the UTC leap second dates in [`++les`](/doc/hoon/library/3bc#++les).
156+Galactc Time equivalents of the UTC leap second dates in [`++les`](/docs/hoon/library/3bc#++les).
157157
158158Produces
159159--------
docs/hoon/library/zuse/diff.md+1−1
@@ -227,7 +227,7 @@ Examples
227227Find common
228228
229229Finds a subsequence of repeated elements within two
230−[`++list`](/doc/hoon/library/1#++list)s, producing a [\`++tape]().
230+[`++list`](/docs/hoon/library/1#++list)s, producing a [\`++tape]().
231231
232232Accepts
233233-------
docs/hoon/library/zuse/gate/jesc.md+1−1
@@ -7,7 +7,7 @@ navhome: /docs
77
88Escape JSON character
99
10−Produces a [`++tape`]() of an escaped [`++json`](/doc/hoon/library/3bi#++json) character `a`.
10+Produces a [`++tape`]() of an escaped [`++json`](/docs/hoon/library/3bi#++json) character `a`.
1111
1212Accepts
1313-------
docs/hoon/library/zuse/gate/tope.md+1−1
@@ -24,7 +24,7 @@ A `++path`.
2424 ^- path
2525 [(scot %p p.bem) q.bem (scot r.bem) (flop s.bem)]
2626
27−Parses a [`++beam`]() to a [`++path`](/doc/hoon/library/1#++path).
27+Parses a [`++beam`]() to a [`++path`](/docs/hoon/library/1#++path).
2828
2929 ~zod/try=/zop> (tope [~zod %main ud/1] /hook/down/sur)
3030 /~zod/main/1/sur/down/hook
docs/hoon/syntax.md+2−2
@@ -371,7 +371,7 @@ long names and/or kebab-case.
371371
372372If you came all this way to learn how to write apps, you're all
373373set. This is about all you need to know to start getting your
374−hands dirty. Refer back here or to the [standard library](/hoon/library) when
375−needed, but for now, move on to [Arvo](/arvo) to continue learning.
374+hands dirty. Refer back here or to the [standard library](../../hoon/library) when
375+needed, but for now, move on to [Arvo](../../arvo) to continue learning.
376376
377377If, however, good enough is *not* enough, feel free to dive deeper: