on master help sign in
link fixes
b8322d2Robert
concepts/azimuth.md+1−1
@@ -1,7 +1,7 @@
1+++
1+++
2title = "Azimuth"
2title = "Azimuth"
3weight = 4
3weight = 4
4−template = "doc.html"."
4+template = "doc.html"
5aliases = ["/docs/learn/azimuth"]
5aliases = ["/docs/learn/azimuth"]
6+++
6+++
7Azimuth is a general-purpose public-key infrastructure (PKI) on the Ethereum blockchain, used as a platform for Urbit identities that we call _points_. You need a point to use the Arvo network.
7Azimuth is a general-purpose public-key infrastructure (PKI) on the Ethereum blockchain, used as a platform for Urbit identities that we call _points_. You need a point to use the Arvo network.
reference/arvo-glossary.md+28−28
@@ -68,7 +68,7 @@ their effects happen like so:
68Arvo is located in `/home/sys/arvo.hoon` within your urbit.
68Arvo is located in `/home/sys/arvo.hoon` within your urbit.
69
69
70More in-depth information on Arvo can be found
70More in-depth information on Arvo can be found
71−[`here`](@/docs/arvo/_index.md).
71+[`here`](@/docs/tutorials/arvo/_index.md).
72
72
73Below are Arvo modules, which are called "vanes".
73Below are Arvo modules, which are called "vanes".
74
74
@@ -81,7 +81,7 @@ Below are Arvo modules, which are called "vanes".
81 Ames is located in `/home/sys/vane/ames.hoon` within your urbit.
81 Ames is located in `/home/sys/vane/ames.hoon` within your urbit.
82
82
83 More in-depth information on Ames can be found
83 More in-depth information on Ames can be found
84− [`here`](@/docs/arvo/ames.md).
84+ [`here`](@/docs/tutorials/arvo/ames.md).
85
85
86#### Behn
86#### Behn
87
87
@@ -106,7 +106,7 @@ Below are Arvo modules, which are called "vanes".
106 Basic information on using Clay can be found
106 Basic information on using Clay can be found
107 [`here`](@/operations.md). An in-depth explanation
107 [`here`](@/operations.md). An in-depth explanation
108 of the architecture can be found
108 of the architecture can be found
109− [`here`](@/docs/arvo/clay.md).
109+ [`here`](@/docs/tutorials/arvo/clay.md).
110
110
111#### Dill
111#### Dill
112
112
@@ -125,7 +125,7 @@ Below are Arvo modules, which are called "vanes".
125 Dill is located at `/home/sys/vane/dill.hoon` within your urbit.
125 Dill is located at `/home/sys/vane/dill.hoon` within your urbit.
126
126
127 More in-depth information on Dill can be found
127 More in-depth information on Dill can be found
128− [`here`](@/docs/arvo/dill.md).
128+ [`here`](@/docs/tutorials/arvo/dill.md).
129
129
130#### Eyre
130#### Eyre
131
131
@@ -139,7 +139,7 @@ Below are Arvo modules, which are called "vanes".
139 Eyre is located at `/home/sys/vane/eyre.hoon` within your urbit.
139 Eyre is located at `/home/sys/vane/eyre.hoon` within your urbit.
140
140
141 More in-depth information on Eyre can be found
141 More in-depth information on Eyre can be found
142− [`here`](@/docs/arvo/eyre.md).
142+ [`here`](@/docs/tutorials/arvo/eyre.md).
143
143
144#### Ford
144#### Ford
145
145
@@ -154,7 +154,7 @@ Below are Arvo modules, which are called "vanes".
154 Ford is located at `/home/sys/vane/ford.hoon` within your urbit.
154 Ford is located at `/home/sys/vane/ford.hoon` within your urbit.
155
155
156 More in-depth information on Ford can be found
156 More in-depth information on Ford can be found
157− [`here`](@/docs/arvo/ford.md).
157+ [`here`](@/docs/tutorials/arvo/ford.md).
158
158
159#### Gall
159#### Gall
160
160
@@ -170,7 +170,7 @@ Below are Arvo modules, which are called "vanes".
170 Gall is located at `/home/sys/vane/gall.hoon` within your urbit.
170 Gall is located at `/home/sys/vane/gall.hoon` within your urbit.
171
171
172 More in-depth information on Gall can be found
172 More in-depth information on Gall can be found
173− [`here`](@/docs/arvo/gall.md).
173+ [`here`](@/docs/tutorials/arvo/gall.md).
174
174
175### atom
175### atom
176
176
@@ -190,7 +190,7 @@ An atom type is _warm_ or _cold_ based on whether the constant exists.
190
190
191 If the constant is `[~ atom]`, its only legal value is `atom`.
191 If the constant is `[~ atom]`, its only legal value is `atom`.
192
192
193−_See [basic types](@/docs/hoon/hoon-expressions/basic.md)_
193+_See [basic types](@/docs/reference/hoon-expressions/basic.md)_
194
194
195### aura
195### aura
196
196
@@ -246,7 +246,7 @@ Aura Meaning Example Literal Syntax
246 @ux unsigned hexadecimal 0x5f5.e138
246 @ux unsigned hexadecimal 0x5f5.e138
247```
247```
248
248
249−You can find the list of all auras [here](@/docs/hoon/hoon-expressions/rune/constants.md).
249+You can find the list of all auras [here](@/docs/reference/hoon-expressions/rune/constants.md).
250
250
251### blocksize
251### blocksize
252
252
@@ -310,7 +310,7 @@ translate to cores in Hoon.
310
310
311 The data-containing tail of a core.
311 The data-containing tail of a core.
312
312
313−_See [basic types](@/docs/hoon/hoon-expressions/basic.md)._
313+_See [basic types](@/docs/reference/hoon-expressions/basic.md)._
314
314
315### Dojo
315### Dojo
316
316
@@ -330,7 +330,7 @@ with this functionality learn what syntax is kosher.
330
330
331A desk is independently revision-controlled branch of urbit filesystem.
331A desk is independently revision-controlled branch of urbit filesystem.
332
332
333−_See [filesystem](@/operations.md#filesystem) and [Clay](@/docs/arvo/clay.md)._
333+_See [filesystem](@/operations.md#filesystem) and [Clay](@/docs/tutorials/clay.md)._
334
334
335### duct
335### duct
336
336
@@ -356,7 +356,7 @@ In the above example, `a` is the face and `2` is the value.
356Hoon has no scope or symbol-table; there is only the subject. To "declare" a
356Hoon has no scope or symbol-table; there is only the subject. To "declare" a
357"variable" is to construct a new subject: `[name=value old-subject]`.
357"variable" is to construct a new subject: `[name=value old-subject]`.
358
358
359−_See [advanced types](@/docs/hoon/hoon-expressions/advanced.md)_.
359+_See [advanced types](@/docs/reference/hoon-expressions/advanced.md)_.
360
360
361
361
362### flag
362### flag
@@ -368,7 +368,7 @@ _no_.
368
368
369A _gate_ is a [core](#core) with one [arm](#arm) -- Hoon's closest
369A _gate_ is a [core](#core) with one [arm](#arm) -- Hoon's closest
370analog to a function. To call a gate on an argument, replace the sample
370analog to a function. To call a gate on an argument, replace the sample
371−(at [tree address](@/docs/hoon/hoon-expressions/limb/limb.md) `+6`
371+(at [tree address](@/docs/reference/hoon-expressions/limb/limb.md) `+6`
372in the core) with the argument, and then compute the arm.
372in the core) with the argument, and then compute the arm.
373
373
374The payload of a gate has a shape of `[sample context]`.
374The payload of a gate has a shape of `[sample context]`.
@@ -381,8 +381,8 @@ The payload of a gate has a shape of `[sample context]`.
381
381
382 The subject in which the gate was defined.
382 The subject in which the gate was defined.
383
383
384−_See [basic types](@/docs/hoon/hoon-expressions/basic.md),
384+_See [basic types](@/docs/reference/hoon-expressions/basic.md),
385−[`%-` ("cenhep")](@/docs/hoon/hoon-expressions/rune/cen.md#cenhep) (the
385+[`%-` ("cenhep")](@/docs/reference/hoon-expressions/rune/cen.md#cenhep) (the
386[rune](#rune) for calling a `gate`)._
386[rune](#rune) for calling a `gate`)._
387
387
388### generator
388### generator
@@ -433,7 +433,7 @@ _Hall_ is the Urbit communication back-end. It’s a messaging bus that can work
433with clients of all sorts. [`:talk`](#talk), the built-in chat client, is one
433with clients of all sorts. [`:talk`](#talk), the built-in chat client, is one
434such app that uses Hall.
434such app that uses Hall.
435
435
436−_More information on Hall can be found [here](@/docs/arvo/hall.md)._
436+_More information on Hall can be found [here](@/docs/tutorials/arvo/hall.md)._
437
437
438#### circle
438#### circle
439
439
@@ -456,7 +456,7 @@ to Nock.
456
456
457The Hoon source file is located in `/home/sys/hoon.hoon` within your urbit.
457The Hoon source file is located in `/home/sys/hoon.hoon` within your urbit.
458
458
459−_More information can be found in the [hoon](@/docs/hoon/_index.md) section._
459+_More information can be found in the [hoon](@/docs/tutorials/hoon/_index.md) section._
460
460
461#### Mint
461#### Mint
462
462
@@ -499,7 +499,7 @@ The result should be:
499[%clls p=[%sand p=%ud q=12] q=[%sand p=%ud q=7] r=[%rock p=%tas q=97]]
499[%clls p=[%sand p=%ud q=12] q=[%sand p=%ud q=7] r=[%rock p=%tas q=97]]
500```
500```
501
501
502−See [expression reference](@/docs/hoon/hoon-expressions/rune/_index.md) for the full list of hoons.
502+See [expression reference](@/docs/reference/hoon-expressions/rune/_index.md) for the full list of hoons.
503
503
504### irregular form
504### irregular form
505
505
@@ -507,7 +507,7 @@ Irregular forms are alternative ways of writing Hoon expressions, alternatives
507to the digraphic runes such as `:~`. Irregular forms are usually more compact
507to the digraphic runes such as `:~`. Irregular forms are usually more compact
508than regular forms.=
508than regular forms.=
509
509
510−_See [irregular forms](@/docs/hoon/hoon-expressions/irregular.md)._
510+_See [irregular forms](@/docs/reference/hoon-expressions/irregular.md)._
511
511
512### jet
512### jet
513
513
@@ -520,7 +520,7 @@ so inefficiently. Nock, for example, can’t decrement (reduce a number by one)
520except by starting building a loop that starts from zero and increments to a
520except by starting building a loop that starts from zero and increments to a
521number just below.
521number just below.
522
522
523−_See [API overview](@/docs/vere/api.md)._
523+_See [API overview](@/docs/reference/vere/api.md)._
524
524
525### lark
525### lark
526
526
@@ -570,7 +570,7 @@ found, the result is the product of the arm.
570 a search path into the subject, composed of
570 a search path into the subject, composed of
571 limbs. Search occurs from right to left (`a.b` means `b` within `a`).
571 limbs. Search occurs from right to left (`a.b` means `b` within `a`).
572
572
573−_See [Limbs and wings](@/docs/hoon/hoon-expressions/limb/_index.md)_
573+_See [Limbs and wings](@/docs/reference/hoon-expressions/limb/_index.md)_
574
574
575### move
575### move
576
576
@@ -610,7 +610,7 @@ Urbit's low-level programming language. Nock is functional and typeless.
610
610
611 a noun - the result of evaluating a formula against a subject.
611 a noun - the result of evaluating a formula against a subject.
612
612
613−_See the [Nock definition](@/docs/nock/definition.md)._
613+_See the [Nock definition](@/docs/reference/nock/definition.md)._
614
614
615### mark
615### mark
616
616
@@ -636,7 +636,7 @@ properties of the type of a compatible core). The default is `gold`
636- `zinc`: _covariant_
636- `zinc`: _covariant_
637- `iron`: _contravariant_
637- `iron`: _contravariant_
638
638
639−_See [advanced types](@/docs/hoon/hoon-expressions/advanced.md)_.
639+_See [advanced types](@/docs/reference/hoon-expressions/advanced.md)_.
640
640
641### ship
641### ship
642
642
@@ -725,10 +725,10 @@ _See [mold hoons](/docs/hoon/hoon-expressions/rune/buc/)._
725A Hoon _rune_ is a pair of ASCII symbols used to begin a
725A Hoon _rune_ is a pair of ASCII symbols used to begin a
726[Hoon expression](#a-hoon).
726[Hoon expression](#a-hoon).
727
727
728−For example, the rune [`?:`](@/docs/hoon/hoon-expressions/rune/wut.md#wutcol) is
728+For example, the rune [`?:`](@/docs/reference/hoon-expressions/rune/wut.md#wutcol) is
729Hoon's most common conditional, a branch on a boolean test. The first
729Hoon's most common conditional, a branch on a boolean test. The first
730symbol in a rune represents a family of related runes. For example, the
730symbol in a rune represents a family of related runes. For example, the
731−[`?` family](@/docs/hoon/hoon-expressions/rune/wut.md) are all conditionals.
731+[`?` family](@/docs/reference/hoon-expressions/rune/wut.md) are all conditionals.
732
732
733The result of parsing a Hoon source expression—the rune, followed
733The result of parsing a Hoon source expression—the rune, followed
734by its respective children—into an AST node is simply called
734by its respective children—into an AST node is simply called
@@ -764,7 +764,7 @@ Tall hoons can contain flat hoons, but not vice versa. All irregular
764forms are flat.
764forms are flat.
765
765
766_See [hoon concept](#a-hoon),
766_See [hoon concept](#a-hoon),
767−[expressions](@/docs/hoon/hoon-expressions/rune/_index.md).
767+[expressions](@/docs/reference/hoon-expressions/rune/_index.md).
768
768
769### Sail
769### Sail
770
770
@@ -775,7 +775,7 @@ _Sail_ is the Hoon markup language for XML.
775To _scry_ means to request data from the Arvo namespace and bring it
775To _scry_ means to request data from the Arvo namespace and bring it
776to userspace.
776to userspace.
777
777
778−_See [.^ (dot-ket)](@/docs/hoon/hoon-expressions/rune/dot.md#dotket)._
778+_See [.^ (dot-ket)](@/docs/reference/hoon-expressions/rune/dot.md#dotket)._
779
779
780### slot
780### slot
781
781
@@ -816,7 +816,7 @@ of the simpler built-in types.
816 If `nest` produces no, the Hoon programmer will receive a `nest-fail`
816 If `nest` produces no, the Hoon programmer will receive a `nest-fail`
817 error. This is one of the most commons errors in Hoon programming.
817 error. This is one of the most commons errors in Hoon programming.
818
818
819− _See [advanced types](@/docs/hoon/hoon-expressions/advanced.md)_ and [troubleshooting](@/docs/arvo/ship-troubleshooting.md).
819+ _See [advanced types](@/docs/reference/hoon-expressions/advanced.md)_ and [troubleshooting](@/docs/tutorials/ship-troubleshooting.md).
820
820
821
821
822### Unit
822### Unit
reference/cheat-sheet.md+1−1
@@ -12,7 +12,7 @@ hand. So above is a download link to a Hoon cheatsheet .pdf. It's missing a
12few of the literal syntaxes, but it covers the most common ones.
12few of the literal syntaxes, but it covers the most common ones.
13
13
14This doesn't list any of the Ford runes, although there is now at least
14This doesn't list any of the Ford runes, although there is now at least
15−some documentation for those [here](@/docs/arvo/ford.md).
15+some documentation for those [here](@/docs/tutorials/arvo/ford.md).
16
16
17The following runes also exist, but are currently undocumented and not listed in
17The following runes also exist, but are currently undocumented and not listed in
18the cheat sheet:
18the cheat sheet:
reference/hoon-errors.md+22−22
@@ -20,10 +20,10 @@ a correct Hoon file. These values are always correct.
20Usually, the line and column tell you everything you need to
20Usually, the line and column tell you everything you need to
21know. But the worst-case scenario for a syntax error is that,
21know. But the worst-case scenario for a syntax error is that,
22somewhere above, you've confused Hoon's tall form by using the
22somewhere above, you've confused Hoon's tall form by using the
23−wrong fanout for a rune. For example, `%+` ([**cenlus**](@/docs/hoon/hoon-expressions/rune/cen.md#cenlus),
23+wrong fanout for a rune. For example, `%+` ([**cenlus**](@/docs/reference/hoon-expressions/rune/cen.md#cenlus),
24−a function call whose sample is a cell) has three subhoons:
24+a function call whose sample is a cell) has three subreferences:
25
25
26−```hoon
26+```reference
27%+ foo
27%+ foo
28 bar
28 bar
29baz
29baz
@@ -31,17 +31,17 @@ baz
31
31
32But if you make a mistake and write
32But if you make a mistake and write
33
33
34−```hoon
34+```reference
35%+ foo
35%+ foo
36bar
36bar
37```
37```
38
38
39−the parser will eat the next hoon below and try to treat it as a
39+the parser will eat the next reference below and try to treat it as a
40part of the `%+`. This can cause a cascading error somewhere
40part of the `%+`. This can cause a cascading error somewhere
41below, usually stopped by a `==` or `--`.
41below, usually stopped by a `==` or `--`.
42
42
43When this happens, don't panic! Binary search actually works
43When this happens, don't panic! Binary search actually works
44−quite well. Any hoon can be stubbed out as `!!`. Find the
44+quite well. Any reference can be stubbed out as `!!`. Find the
45prefix of your file that compiles, then work forward until
45prefix of your file that compiles, then work forward until
46the actual error appears.
46the actual error appears.
47
47
@@ -53,12 +53,12 @@ Now your code parses but doesn't compile.
53
53
54Your first step should be to put a `!:` ("zapcol") rune at the
54Your first step should be to put a `!:` ("zapcol") rune at the
55top of the file. This is like calling the C compiler with `-g`;
55top of the file. This is like calling the C compiler with `-g`;
56−it tells the Hoon compiler to generate tracing hoons.
56+it tells the Hoon compiler to generate tracing references.
57
57
58Bear in mind that `!:` breaks tail-call optimization. This is a
58Bear in mind that `!:` breaks tail-call optimization. This is a
59bug, but a relatively low-priority bug. `!.` turns off `!:`.
59bug, but a relatively low-priority bug. `!.` turns off `!:`.
60−Note that `!:` and `!.` are hoon-level, not file-level; you can
60+Note that `!:` and `!.` are reference-level, not file-level; you can
61−wrap any hoon in either.
61+wrap any reference in either.
62
62
63### Error trace
63### Error trace
64
64
@@ -74,7 +74,7 @@ If you have `!:` on, you'll see an error trace, like
74nest-fail
74nest-fail
75```
75```
76
76
77−The bottom of this trace is the line and column of the hoon which
77+The bottom of this trace is the line and column of the reference which
78failed to compile, then the cause of the error (`nest-fail`).
78failed to compile, then the cause of the error (`nest-fail`).
79
79
80Hoon does not believe in inundating you with possibly irrelevant
80Hoon does not believe in inundating you with possibly irrelevant
@@ -100,13 +100,13 @@ means you tried to pound a square peg into a round hole.
100What was the peg and what was the hole? Hoon doesn't tell you by
100What was the peg and what was the hole? Hoon doesn't tell you by
101default, because moral fiber, and also because in too many cases
101default, because moral fiber, and also because in too many cases
102trivial errors lead to large intimidating dumps. However, you
102trivial errors lead to large intimidating dumps. However, you
103−can use the `~!` rune ([**sigzap**](@/docs/hoon/hoon-expressions/rune/sig.md#sigzap)) to print the type of
103+can use the `~!` rune ([**sigzap**](@/docs/reference/hoon-expressions/rune/sig.md#sigzap)) to print the type of
104−any hoon in your stack trace.
104+any reference in your stack trace.
105
105
106For instance, you wrote `(foo bar)` and got a `nest-fail`. Change
106For instance, you wrote `(foo bar)` and got a `nest-fail`. Change
107your code to be:
107your code to be:
108
108
109−```hoon
109+```reference
110~! bar
110~! bar
111~! +6.foo
111~! +6.foo
112(foo bar)
112(foo bar)
@@ -122,15 +122,15 @@ In other words, "undeclared variable."
122
122
123The most common subspecies of `find` error is `find.$`, meaning
123The most common subspecies of `find` error is `find.$`, meaning
124the empty name `$` was not found. This often happens when you
124the empty name `$` was not found. This often happens when you
125−use a hoon that does not produce a gate/mold, as a gate/mold. For
125+use a reference that does not produce a gate/mold, as a gate/mold. For
126instance, `(foo bar)` will give `find.$` if `foo` is not actually a
126instance, `(foo bar)` will give `find.$` if `foo` is not actually a
127function.
127function.
128
128
129### `mint-vain` and `mint-lost`
129### `mint-vain` and `mint-lost`
130
130
131These are errors caused by type inference in pattern matching.
131These are errors caused by type inference in pattern matching.
132−`mint-vain` means this hoon is never executed. `mint-lost` means
132+`mint-vain` means this reference is never executed. `mint-lost` means
133−there's a case in a `?-` ([**wuthep**](@/docs/hoon/hoon-expressions/rune/wut.md#wuthep)) that isn't handled.
133+there's a case in a `?-` ([**wuthep**](@/docs/reference/hoon-expressions/rune/wut.md#wuthep)) that isn't handled.
134
134
135## Runtime crashes
135## Runtime crashes
136
136
@@ -144,9 +144,9 @@ infinite loop will time out either too slowly or too fast). The
144stack trace will show what your code was doing when interrupted.
144stack trace will show what your code was doing when interrupted.
145
145
146The counterpart of `~!` for runtime crashes is `~|`
146The counterpart of `~!` for runtime crashes is `~|`
147−([**sigbar**](@/docs/hoon/hoon-expressions/rune/sig.md#sigbar)):
147+([**sigbar**](@/docs/reference/hoon-expressions/rune/sig.md#sigbar)):
148
148
149−```hoon
149+```reference
150~| foo
150~| foo
151(foo bar)
151(foo bar)
152```
152```
@@ -160,19 +160,19 @@ The worst possibility, of course, is that your code runs but does
160the wrong thing. This is relatively unusual in a typed
160the wrong thing. This is relatively unusual in a typed
161functional language, but it still happens.
161functional language, but it still happens.
162
162
163−`~&` ([**sigpam**](@/docs/hoon/hoon-expressions/rune/sig.md#sigpam)) is Hoon's debugging printf.
163+`~&` ([**sigpam**](@/docs/reference/hoon-expressions/rune/sig.md#sigpam)) is Hoon's debugging printf.
164This pretty-prints its argument:
164This pretty-prints its argument:
165
165
166−```hoon
166+```reference
167~& foo
167~& foo
168(foo bar)
168(foo bar)
169```
169```
170
170
171will always print `foo` every time it executes. A variant is
171will always print `foo` every time it executes. A variant is
172−`~?` ([**sigwut**](@/docs/hoon/hoon-expressions/rune/sig.md#sigwut)), which prints only if a condition is
172+`~?` ([**sigwut**](@/docs/reference/hoon-expressions/rune/sig.md#sigwut)), which prints only if a condition is
173true:
173true:
174
174
175−```hoon
175+```reference
176~? =(37 (lent foo)) foo
176~? =(37 (lent foo)) foo
177(foo bar)
177(foo bar)
178```
178```
reference/hoon-expressions/_index.md+5−5
@@ -7,22 +7,22 @@ aliases = ["/docs/reference/hoon-expressions/"]
7+++
7+++
8Documentation for Hoon expressions.
8Documentation for Hoon expressions.
9
9
10−## [Runes](@/docs/hoon/hoon-expressions/rune/_index.md)
10+## [Runes](@/docs/reference/hoon-expressions/rune/_index.md)
11
11
12Runes are a way to form expressions in Hoon. Their exact semantics and
12Runes are a way to form expressions in Hoon. Their exact semantics and
13
13
14−## [Limbs and Wings](@/docs/hoon/hoon-expressions/limb/_index.md)
14+## [Limbs and Wings](@/docs/reference/hoon-expressions/limb/_index.md)
15
15
16Limbs and wings are ways to extract data from the subject.
16Limbs and wings are ways to extract data from the subject.
17
17
18−## [Basic Types](@/docs/hoon/hoon-expressions/basic.md)
18+## [Basic Types](@/docs/reference/hoon-expressions/basic.md)
19
19
20A simplified explanation of of the Hoon type system.
20A simplified explanation of of the Hoon type system.
21
21
22−## [Advanced Types](@/docs/hoon/hoon-expressions/advanced.md)
22+## [Advanced Types](@/docs/reference/hoon-expressions/advanced.md)
23
23
24A more comprehensive explanation of the Hoon type system, covering aliasing and polymorphism.
24A more comprehensive explanation of the Hoon type system, covering aliasing and polymorphism.
25
25
26−## [Irregular Forms](@/docs/hoon/hoon-expressions/irregular.md)
26+## [Irregular Forms](@/docs/reference/hoon-expressions/irregular.md)
27
27
28Alternative syntaxes for Hoon runes.
28Alternative syntaxes for Hoon runes.
reference/hoon-expressions/advanced.md+1−1
@@ -191,7 +191,7 @@ limb, we just search the type depth-first.
191If a name is in the `p.p` map, it's an alias. (An alias is defined using the
191If a name is in the `p.p` map, it's an alias. (An alias is defined using the
192`=*` rune.) The map contains a `(unit hoon)`; if the unit is full, the name
192`=*` rune.) The map contains a `(unit hoon)`; if the unit is full, the name
193resolves to that hoon (compiled against the `q` type). If the unit is empty,
193resolves to that hoon (compiled against the `q` type). If the unit is empty,
194−the name is blocked / skipped (see [limb](@/docs/hoon/hoon-expressions/limb/limb.md) for what
194+the name is blocked / skipped (see [limb](@/docs/reference/hoon-expressions/limb/limb.md) for what
195this means).
195this means).
196
196
197If a name is in the `q.p` map, it's a bridge. (A bridge is defined using the
197If a name is in the `q.p` map, it's a bridge. (A bridge is defined using the
reference/hoon-expressions/basic.md+1−1
@@ -32,7 +32,7 @@ including both faces and arm names. (See Chapter 1 of the Hoon tutorial for an
32introduction to name resolution.)
32introduction to name resolution.)
33
33
34As noted, this is a simplified version of `type`. We undo and
34As noted, this is a simplified version of `type`. We undo and
35−explain the simplifications in the [advanced types](@/docs/hoon/hoon-expressions/advanced.md)
35+explain the simplifications in the [advanced types](@/docs/reference/hoon-expressions/advanced.md)
36section.
36section.
37
37
38```hoon
38```hoon
reference/hoon-expressions/irregular.md+19−20
@@ -17,7 +17,7 @@ Anything Nock can do, Hoon can do also.
17
17
18### .+ dotlus
18### .+ dotlus
19
19
20−[docs](@/docs/hoon/hoon-expressions/rune/dot.md#dotlus) \\+
20+[docs](@/docs/reference/hoon-expressions/rune/dot.md#dotlus) \\+
21`[%dtls p=atom]`: increment an atom with Nock 4.
21`[%dtls p=atom]`: increment an atom with Nock 4.
22
22
23R: `.+(p)`
23R: `.+(p)`
@@ -25,7 +25,7 @@ I: `+(p)`
25
25
26### .= dottis
26### .= dottis
27
27
28−[docs](@/docs/hoon/hoon-expressions/rune/dot.md#dottis) \\=
28+[docs](@/docs/reference/hoon-expressions/rune/dot.md#dottis) \\=
29`[%dtts p=hoon q=hoon]`: test for equality with Nock 5.
29`[%dtts p=hoon q=hoon]`: test for equality with Nock 5.
30
30
31R: `.=(p q)`
31R: `.=(p q)`
@@ -37,7 +37,7 @@ Miscellaneous useful macros.
37
37
38### ;: miccol
38### ;: miccol
39
39
40−[docs](@/docs/hoon/hoon-expressions/rune/mic.md#miccol) \\:
40+[docs](@/docs/reference/hoon-expressions/rune/mic.md#miccol) \\:
41`[%mccl p=hoon q=(list hoon)]`: call a binary function as an n-ary function.
41`[%mccl p=hoon q=(list hoon)]`: call a binary function as an n-ary function.
42
42
43R: `;:(p q)`
43R: `;:(p q)`
@@ -49,7 +49,7 @@ The cell runes.
49
49
50### :- colhep
50### :- colhep
51
51
52−[docs](@/docs/hoon/hoon-expressions/rune/col.md#colhep) \\[\\]\\^\\+\\\`\\~
52+[docs](@/docs/reference/hoon-expressions/rune/col.md#colhep) \\[\\]\\^\\+\\\`\\~
53`[%clhp p=hoon q=hoon]`: construct a cell (2-tuple).
53`[%clhp p=hoon q=hoon]`: construct a cell (2-tuple).
54
54
55R: `:-(p q)`
55R: `:-(p q)`
@@ -71,7 +71,7 @@ Flow hoons change the subject. All non-flow hoons (except cores) pass the subjec
71
71
72### =< tisgal
72### =< tisgal
73
73
74−[docs](@/docs/hoon/hoon-expressions/rune/tis.md#tisgal) \\:
74+[docs](@/docs/reference/hoon-expressions/rune/tis.md#tisgal) \\:
75`[%tsgl p=hoon q=hoon]`: compose two hoons, inverted.
75`[%tsgl p=hoon q=hoon]`: compose two hoons, inverted.
76
76
77R: `=<(p q)`
77R: `=<(p q)`
@@ -79,7 +79,7 @@ I: `p:q`
79
79
80## | bar (core)
80## | bar (core)
81
81
82−[docs](@/docs/hoon/hoon-expressions/rune/bar.md) \\$
82+[docs](@/docs/reference/hoon-expressions/rune/bar.md) \\$
83Core hoons are flow hoon.
83Core hoons are flow hoon.
84
84
85Technically not irregular syntax, but worth mentioning.
85Technically not irregular syntax, but worth mentioning.
@@ -97,7 +97,7 @@ The invocation family of runes.
97
97
98### %= centis
98### %= centis
99
99
100−[docs](@/docs/hoon/hoon-expressions/rune/cen.md#centis) \\(\\)
100+[docs](@/docs/reference/hoon-expressions/rune/cen.md#centis) \\(\\)
101`[%cnts p=wing q=(list (pair wing hoon))]`: take a wing with changes.
101`[%cnts p=wing q=(list (pair wing hoon))]`: take a wing with changes.
102
102
103R: `%=(p a 1)`
103R: `%=(p a 1)`
@@ -105,7 +105,7 @@ I: `p(a 1)`
105
105
106### %~ censig
106### %~ censig
107
107
108−[docs](@/docs/hoon/hoon-expressions/rune/cen.md#censig) \\~
108+[docs](@/docs/reference/hoon-expressions/rune/cen.md#censig) \\~
109`[%cnsg p=wing q=hoon r=hoon]`: call with multi-armed door.
109`[%cnsg p=wing q=hoon r=hoon]`: call with multi-armed door.
110
110
111R: `%~(p q r)`
111R: `%~(p q r)`
@@ -113,7 +113,7 @@ I: `~(p q r)`
113
113
114### %- cenhep
114### %- cenhep
115
115
116−[docs](@/docs/hoon/hoon-expressions/rune/cen.md#cenhep) \\(\\)
116+[docs](@/docs/reference/hoon-expressions/rune/cen.md#cenhep) \\(\\)
117`[%cnhp p=hoon q=hoon]`: call a gate (function).
117`[%cnhp p=hoon q=hoon]`: call a gate (function).
118
118
119R: `%-(p q)`
119R: `%-(p q)`
@@ -127,7 +127,7 @@ A mold is a gate (function) that helps us build simple and rigorous data structu
127
127
128### $? bucwut
128### $? bucwut
129
129
130−[docs](@/docs/hoon/hoon-expressions/rune/buc.md#bucwut) \\?
130+[docs](@/docs/reference/hoon-expressions/rune/buc.md#bucwut) \\?
131`[%bcwt p=(list model)]`: mold which normalizes a general union.
131`[%bcwt p=(list model)]`: mold which normalizes a general union.
132
132
133R: `$?(p)`
133R: `$?(p)`
@@ -135,7 +135,7 @@ I: `?(p)`
135
135
136### $_ buccab
136### $_ buccab
137
137
138−[docs](@/docs/hoon/hoon-expressions/rune/buc.md#buccab) \\_
138+[docs](@/docs/reference/hoon-expressions/rune/buc.md#buccab) \\_
139`[%bccb p=value]`: mold which normalizes to an example.
139`[%bccb p=value]`: mold which normalizes to an example.
140
140
141R: `$_(p)`
141R: `$_(p)`
@@ -147,7 +147,7 @@ Hoon has the usual branches and logical tests.
147
147
148### ?! wutzap
148### ?! wutzap
149
149
150−[docs](@/docs/hoon/hoon-expressions/rune/wut.md#wutzap) \\!
150+[docs](@/docs/reference/hoon-expressions/rune/wut.md#wutzap) \\!
151`[%wtzp p=hoon]`: logical not.
151`[%wtzp p=hoon]`: logical not.
152
152
153R: `?!(p)`
153R: `?!(p)`
@@ -155,7 +155,7 @@ I: `!(p)`
155
155
156### ?& wutpam
156### ?& wutpam
157
157
158−[docs](@/docs/hoon/hoon-expressions/rune/wut.md#wutpam) \\&
158+[docs](@/docs/reference/hoon-expressions/rune/wut.md#wutpam) \\&
159`[%wtpm p=(list hoon)]`: logical and.
159`[%wtpm p=(list hoon)]`: logical and.
160
160
161R: `?&(p)`
161R: `?&(p)`
@@ -163,7 +163,7 @@ I: `&(p)`
163
163
164### ?| wutbar
164### ?| wutbar
165
165
166−[docs](@/docs/hoon/hoon-expressions/rune/wut.md#wutbar) \\|
166+[docs](@/docs/reference/hoon-expressions/rune/wut.md#wutbar) \\|
167`[%wtbr p=(list hoon)]`: logical or.
167`[%wtbr p=(list hoon)]`: logical or.
168
168
169R: `?|(p)`
169R: `?|(p)`
@@ -175,7 +175,7 @@ Lets us adjust types without violating type constraints.
175
175
176### ^- kethep
176### ^- kethep
177
177
178−[docs](@/docs/hoon/hoon-expressions/rune/ket.md#kethep) \\\`
178+[docs](@/docs/reference/hoon-expressions/rune/ket.md#kethep) \\\`
179`[%kthp p=model q=value]`: typecast by mold.
179`[%kthp p=model q=value]`: typecast by mold.
180
180
181R: `^-(p q)`
181R: `^-(p q)`
@@ -183,7 +183,7 @@ I: `` `p`q ``
183
183
184### ^= kettis
184### ^= kettis
185
185
186−[docs](@/docs/hoon/hoon-expressions/rune/ket.md#kettis) \\=
186+[docs](@/docs/reference/hoon-expressions/rune/ket.md#kettis) \\=
187`[%ktts p=toga q=value]`: name a value.
187`[%ktts p=toga q=value]`: name a value.
188
188
189R: `^=(p q)`
189R: `^=(p q)`
@@ -193,14 +193,13 @@ I: `p=q`
193
193
194### Trivial molds
194### Trivial molds
195
195
196−\\*\\^\\?
197−
198- `*` noun.
196- `*` noun.
199- `@` atom.
197- `@` atom.
200- `^` cell.
198- `^` cell.
201- `?` loobean.
199- `?` loobean.
202- `~` null.
200- `~` null.
203
201
202+
204### Values
203### Values
205
204
206\\~\\-\\.\\&\\|
205\\~\\-\\.\\&\\|
@@ -210,7 +209,7 @@ I: `p=q`
210- `|` loobean false.
209- `|` loobean false.
211- `%a` constant `a`, where `a` can be an ((ir)regularly defined) atom or a symbol.
210- `%a` constant `a`, where `a` can be an ((ir)regularly defined) atom or a symbol.
212
211
213−See [%sand](@/docs/hoon/hoon-expressions/rune/constants.md#warm) for other irregular definitions of atoms.
212+See [%sand](@/docs/reference/hoon-expressions/rune/constants.md#warm) for other irregular definitions of atoms.
214
213
215### List addressing
214### List addressing
216
215
@@ -219,7 +218,7 @@ See [%sand](@/docs/hoon/hoon-expressions/rune/constants.md#warm) for other irreg
219
218
220### Limbs
219### Limbs
221
220
222−[docs](@/docs/hoon/hoon-expressions/limb/limb.md) \\+\\.\\^
221+[docs](@/docs/reference/hoon-expressions/limb/limb.md) \\+\\.\\^
223`[%limb p=(each @ud [p=@ud q=@tas])]`: attribute of subject.
222`[%limb p=(each @ud [p=@ud q=@tas])]`: attribute of subject.
224
223
225- `+15` is slot 15
224- `+15` is slot 15
reference/hoon-expressions/limb/_index.md+2−2
@@ -9,10 +9,10 @@ One feature Hoon lacks: a context that isn't a first-class value. Hoon has no
9concept of scope, environment, etc. An expression has exactly one data source,
9concept of scope, environment, etc. An expression has exactly one data source,
10the **subject**, a noun like any other.
10the **subject**, a noun like any other.
11
11
12−## [Limbs](@/docs/hoon/hoon-expressions/limb/limb.md)
12+## [Limbs](@/docs/reference/hoon-expressions/limb/limb.md)
13
13
14A limb is used to resolve to a piece of data in the subject. A wing is thus a resolution path into the subject.
14A limb is used to resolve to a piece of data in the subject. A wing is thus a resolution path into the subject.
15
15
16−## [Wings](@/docs/hoon/hoon-expressions/limb/wing.md)
16+## [Wings](@/docs/reference/hoon-expressions/limb/wing.md)
17
17
18In Hoon we use 'wings' to extract information from the subject. A wing is a list of limbs (including a trivial list of one limb).
18In Hoon we use 'wings' to extract information from the subject. A wing is a list of limbs (including a trivial list of one limb).
reference/hoon-expressions/rune/_index.md+15−15
@@ -9,64 +9,64 @@ Runes are a way to form expressions in Hoon.
9
9
10## Non-Rune Expressions
10## Non-Rune Expressions
11
11
12−### [Constants](@/docs/hoon/hoon-expressions/rune/constants.md)
12+### [Constants](@/docs/reference/hoon-expressions/rune/constants.md)
13
13
14Hoon uses runes to form expressions, but not all expressions have runes in them. First, we have constant expressions (and also expressions that would be constant, but that they allow for interpolations).
14Hoon uses runes to form expressions, but not all expressions have runes in them. First, we have constant expressions (and also expressions that would be constant, but that they allow for interpolations).
15
15
16−### [Limbs and Wings](@/docs/hoon/hoon-expressions/limb/_index.md)
16+### [Limbs and Wings](@/docs/reference/hoon-expressions/limb/_index.md)
17
17
18Limb and wing expressions also lack runes.
18Limb and wing expressions also lack runes.
19
19
20## Runes Proper
20## Runes Proper
21
21
22−### [`. dot` (Nock)](@/docs/hoon/hoon-expressions/rune/dot.md)
22+### [`. dot` (Nock)](@/docs/reference/hoon-expressions/rune/dot.md)
23
23
24Runes used for carrying out Nock operations in Hoon.
24Runes used for carrying out Nock operations in Hoon.
25
25
26−### [`! zap` (wild)](@/docs/hoon/hoon-expressions/rune/zap.md)
26+### [`! zap` (wild)](@/docs/reference/hoon-expressions/rune/zap.md)
27
27
28Wildcard category. Expressions that don't fit anywhere else go here.
28Wildcard category. Expressions that don't fit anywhere else go here.
29
29
30−### [`= tis` (Subject Modification)](@/docs/hoon/hoon-expressions/rune/tis.md)
30+### [`= tis` (Subject Modification)](@/docs/reference/hoon-expressions/rune/tis.md)
31
31
32Runes used to modify the subject.
32Runes used to modify the subject.
33
33
34−### [`? wut` (Conditionals)](@/docs/hoon/hoon-expressions/rune/wut.md)
34+### [`? wut` (Conditionals)](@/docs/reference/hoon-expressions/rune/wut.md)
35
35
36Runes used for branching on conditionals.
36Runes used for branching on conditionals.
37
37
38−### [`| bar` (Cores)](@/docs/hoon/hoon-expressions/rune/bar.md)
38+### [`| bar` (Cores)](@/docs/reference/hoon-expressions/rune/bar.md)
39
39
40Runes used to produce cores.
40Runes used to produce cores.
41
41
42−### [`+ lus` (Arms)](@/docs/hoon/hoon-expressions/rune/lus.md)
42+### [`+ lus` (Arms)](@/docs/reference/hoon-expressions/rune/lus.md)
43
43
44Runes used to define arms in a core.
44Runes used to define arms in a core.
45
45
46−### [`: col` (Cells)](@/docs/hoon/hoon-expressions/rune/col.md)
46+### [`: col` (Cells)](@/docs/reference/hoon-expressions/rune/col.md)
47
47
48Runes used to produce cells, which are pairs of nouns.
48Runes used to produce cells, which are pairs of nouns.
49
49
50−### [`% cen` (Calls)](@/docs/hoon/hoon-expressions/rune/cen.md)
50+### [`% cen` (Calls)](@/docs/reference/hoon-expressions/rune/cen.md)
51
51
52Runes used for making function calls in Hoon.
52Runes used for making function calls in Hoon.
53
53
54−### [`^ ket` (Casts)](@/docs/hoon/hoon-expressions/rune/ket.md)
54+### [`^ ket` (Casts)](@/docs/reference/hoon-expressions/rune/ket.md)
55
55
56Runes that let us adjust types without violating type constraints.
56Runes that let us adjust types without violating type constraints.
57
57
58−### [`$ buc` (Structures)](@/docs/hoon/hoon-expressions/rune/buc.md)
58+### [`$ buc` (Structures)](@/docs/reference/hoon-expressions/rune/buc.md)
59
59
60Runes used for defining custom types.
60Runes used for defining custom types.
61
61
62−### [`; mic` (Make)](@/docs/hoon/hoon-expressions/rune/mic.md)
62+### [`; mic` (Make)](@/docs/reference/hoon-expressions/rune/mic.md)
63
63
64Miscellaneous useful macros.
64Miscellaneous useful macros.
65
65
66−### [`~ sig` (Hints)](@/docs/hoon/hoon-expressions/rune/sig.md)
66+### [`~ sig` (Hints)](@/docs/reference/hoon-expressions/rune/sig.md)
67
67
68Runes that use Nock `11` to pass non-semantic info to the interpreter.
68Runes that use Nock `11` to pass non-semantic info to the interpreter.
69
69
70−### [`--`, `==` (Terminators)](@/docs/hoon/hoon-expressions/rune/terminators.md)
70+### [`--`, `==` (Terminators)](@/docs/reference/hoon-expressions/rune/terminators.md)
71
71
72Runes used to terminate expressions.
72Runes used to terminate expressions.
reference/hoon-expressions/rune/bar.md+68−68
@@ -2,7 +2,7 @@
2title = "Cores | ('bar')"
2title = "Cores | ('bar')"
3weight = 7
3weight = 7
4template = "doc.html"
4template = "doc.html"
5−aliases = ["docs/reference/hoon-expressions/rune/bar/"]
5+aliases = ["docs/reference/reference-expressions/rune/bar/"]
6+++
6+++
7Core expressions produce cores. A core is a cell of `[battery payload]`.
7Core expressions produce cores. A core is a cell of `[battery payload]`.
8The `battery` is code, a battery of Nock formulas. The `payload` is the data
8The `battery` is code, a battery of Nock formulas. The `payload` is the data
@@ -22,12 +22,12 @@ Produce a **door** (a core with a sample).
22
22
23Regular:
23Regular:
24
24
25−```hoon
25+```reference
26|_ a=spec
26|_ a=spec
27−++ b=term c=hoon
27+++ b=term c=reference
28−++ d=term e=hoon
28+++ d=term e=reference
29 ...
29 ...
30−++ f=term g=hoon
30+++ f=term g=reference
31--
31--
32```
32```
33
33
@@ -49,13 +49,13 @@ The context of the door is the subject of the `|_` expression.
49
49
50##### Expands to
50##### Expands to
51
51
52−```hoon
52+```reference
53=| a=spec
53=| a=spec
54|%
54|%
55−++ b=term c=hoon
55+++ b=term c=reference
56−++ d=term e=hoon
56+++ d=term e=reference
57 ...
57 ...
58−++ f=term g=hoon
58+++ f=term g=reference
59--
59--
60```
60```
61
61
@@ -68,7 +68,7 @@ Calling a door is like calling a gate except the caller also needs
68to specify the arm to be computed. So, for example, if you have some door `door` which contains some arm `arm`, and you want to pass some argument (i.e., input value `arg`), you would call it with `~(arm door arg)`.
68to specify the arm to be computed. So, for example, if you have some door `door` which contains some arm `arm`, and you want to pass some argument (i.e., input value `arg`), you would call it with `~(arm door arg)`.
69
69
70Because gates are also doors, you can call them the same way. To call the gate `foo` as a door, instead of `(foo baz)` we would write `~($ foo baz)`. This
70Because gates are also doors, you can call them the same way. To call the gate `foo` as a door, instead of `(foo baz)` we would write `~($ foo baz)`. This
71−is an irregular form for `%~($ foo baz)`, [%~](/docs/hoon/hoon-expressions/rune/cen#sig).
71+is an irregular form for `%~($ foo baz)`, [%~](/docs/reference/hoon-expressions/rune/cen#sig).
72
72
73##### Examples
73##### Examples
74
74
@@ -87,7 +87,7 @@ A trivial door:
87
87
88A more interesting door, from the kernel library:
88A more interesting door, from the kernel library:
89
89
90−```hoon
90+```reference
91++ ne
91++ ne
92 |_ tig=@
92 |_ tig=@
93 ++ d (add tig '0')
93 ++ d (add tig '0')
@@ -112,12 +112,12 @@ Produce a core, `[battery payload]`.
112
112
113Regular:
113Regular:
114
114
115−```hoon
115+```reference
116|%
116|%
117−++ a=term b=hoon
117+++ a=term b=reference
118−++ c=term d=hoon
118+++ c=term d=reference
119 ...
119 ...
120−++ e=term f=hoon
120+++ e=term f=reference
121--
121--
122```
122```
123
123
@@ -172,14 +172,14 @@ Produce a gate with a custom sample.
172
172
173Regular:
173Regular:
174
174
175−```hoon
175+```reference
176−|: a=hoon b=hoon
176+|: a=reference b=hoon
177```
177```
178
178
179AST:
179AST:
180
180
181```
181```
182−[%brcl p=hoon q=hoon]
182+[%brcl p=reference q=hoon]
183```
183```
184
184
185##### Semantics
185##### Semantics
@@ -188,7 +188,7 @@ AST:
188
188
189##### Expands to
189##### Expands to
190
190
191−```hoon
191+```reference
192=> ^~ a
192=> ^~ a
193 |. b
193 |. b
194```
194```
@@ -220,14 +220,14 @@ Produce a trap (a core with one arm `$`).
220
220
221Regular:
221Regular:
222
222
223−```hoon
223+```reference
224−|. a=hoon
224+|. a=reference
225```
225```
226
226
227AST:
227AST:
228
228
229```
229```
230−[%brdt p=hoon]
230+[%brdt p=reference]
231```
231```
232
232
233Semantics:
233Semantics:
@@ -238,8 +238,8 @@ The payload of the core is the subject of the `|.` expression.
238
238
239##### Expands to
239##### Expands to
240
240
241−```hoon
241+```reference
242−|% ++ $ a=hoon
242+|% ++ $ a=reference
243--
243--
244```
244```
245
245
@@ -278,7 +278,7 @@ A more interesting trap:
278Note that we can use `$()` to recurse back into the
278Note that we can use `$()` to recurse back into the
279trap, since it's a core with an `$` arm.
279trap, since it's a core with an `$` arm.
280
280
281−> `$(...)` expands to `%=($ ...)` (["centis"](/docs/hoon/hoon-expressions/rune/cen#centis)).
281+> `$(...)` expands to `%=($ ...)` (["centis"](/docs/reference/hoon-expressions/rune/cen#centis)).
282
282
283### |- "barhep"
283### |- "barhep"
284
284
@@ -288,14 +288,14 @@ Produce a trap (a core with one arm `$`) and evaluate it.
288
288
289Regular:
289Regular:
290
290
291−```hoon
291+```reference
292−|- a=hoon
292+|- a=reference
293```
293```
294
294
295AST:
295AST:
296
296
297```
297```
298−[%brhp p=hoon]
298+[%brhp p=reference]
299```
299```
300
300
301##### Semantics
301##### Semantics
@@ -304,15 +304,15 @@ A `|-` expression produces a core with one arm named `$` and immediately evaluat
304
304
305##### Expands to
305##### Expands to
306
306
307−```hoon
307+```reference
308−=<($ |.(a=hoon))
308+=<($ |.(a=reference))
309```
309```
310
310
311##### Discussion
311##### Discussion
312
312
313The `|-` rune can be thought of as a 'recursion point' or a 'loop starting point'. Since `|-` makes a `|.` (["bardot"](#bardot), a core with one arm named `$`, we can recurse back into it with `$()`.
313The `|-` rune can be thought of as a 'recursion point' or a 'loop starting point'. Since `|-` makes a `|.` (["bardot"](#bardot), a core with one arm named `$`, we can recurse back into it with `$()`.
314
314
315−> `$(...)` expands to `%=($ ...)` (["centis"](/docs/hoon/hoon-expressions/rune/cen#centis)).
315+> `$(...)` expands to `%=($ ...)` (["centis"](/docs/reference/hoon-expressions/rune/cen#centis)).
316
316
317##### Examples
317##### Examples
318
318
@@ -344,12 +344,12 @@ Produce a core whose battery includes a `$` arm and compute the latter.
344
344
345Regular:
345Regular:
346
346
347−```hoon
347+```reference
348−|^ a=hoon
348+|^ a=reference
349−++ b=term c=hoon
349+++ b=term c=reference
350−++ d=term e=hoon
350+++ d=term e=reference
351 ...
351 ...
352−++ f=term g=hoon
352+++ f=term g=reference
353--
353--
354```
354```
355
355
@@ -358,7 +358,7 @@ Note: The `++` rune may be replaced with any other rune in the `+` family.
358AST:
358AST:
359
359
360```
360```
361−[%brkt p=hoon q=(map term tome)]
361+[%brkt p=reference q=(map term tome)]
362```
362```
363
363
364##### Semantics
364##### Semantics
@@ -367,13 +367,13 @@ A `|^` expression produces a multi-arm core whose battery includes a `$` arm, wh
367
367
368##### Expands to
368##### Expands to
369
369
370−```hoon
370+```reference
371=> |%
371=> |%
372− ++ $ a=hoon
372+ ++ $ a=reference
373− ++ b=term c=hoon
373+ ++ b=term c=reference
374− ++ d=term e=hoon
374+ ++ d=term e=reference
375 ...
375 ...
376− ++ f=term g=hoon
376+ ++ f=term g=reference
377 --
377 --
378$
378$
379```
379```
@@ -403,14 +403,14 @@ Produce an iron gate.
403
403
404Regular:
404Regular:
405
405
406−```hoon
406+```reference
407−|~ a=spec b=hoon
407+|~ a=spec b=reference
408```
408```
409
409
410AST:
410AST:
411
411
412```
412```
413−[%brsg p=spec q=hoon]
413+[%brsg p=spec q=reference]
414```
414```
415
415
416##### Semantics
416##### Semantics
@@ -419,13 +419,13 @@ A `|~` expression produces an iron gate. `a` defines the sample, and `b` define
419
419
420##### Expands to
420##### Expands to
421
421
422−```hoon
422+```reference
423^| |=(a b)
423^| |=(a b)
424```
424```
425
425
426##### Discussion
426##### Discussion
427
427
428−See [this discussion of core variance models](@/docs/hoon/hoon-expressions/advanced.md)
428+See [this discussion of core variance models](@/docs/reference/hoon-expressions/advanced.md)
429
429
430##### Examples
430##### Examples
431
431
@@ -442,14 +442,14 @@ Produce a wet gate (one-armed core with sample).
442
442
443Regular:
443Regular:
444
444
445−```hoon
445+```reference
446−|* a=spec b=hoon
446+|* a=spec b=reference
447```
447```
448
448
449AST:
449AST:
450
450
451```
451```
452−[%brtr p=spec q=hoon]
452+[%brtr p=spec q=reference]
453```
453```
454
454
455##### Semantics
455##### Semantics
@@ -458,7 +458,7 @@ A `|*` expression produces a wet gate. `a` defines the gate's sample, and `b` i
458
458
459##### Expands to
459##### Expands to
460
460
461−```hoon
461+```reference
462=| a
462=| a
463|@
463|@
464++ $
464++ $
@@ -479,7 +479,7 @@ you know what you're doing.
479Just as with a [gate](#bartis), we can recurse back into a wet gate
479Just as with a [gate](#bartis), we can recurse back into a wet gate
480with `$()`.
480with `$()`.
481
481
482−> `$(...)` expands to `%=($ ...)` (["centis"](@/docs/hoon/hoon-expressions/rune/cen.md#centis)).
482+> `$(...)` expands to `%=($ ...)` (["centis"](@/docs/reference/hoon-expressions/rune/cen.md#centis)).
483
483
484##### Examples
484##### Examples
485
485
@@ -508,14 +508,14 @@ Produce a gate (a one-armed core with a sample).
508
508
509Regular:
509Regular:
510
510
511−```hoon
511+```reference
512−|= a=spec b=hoon
512+|= a=spec b=reference
513```
513```
514
514
515AST:
515AST:
516
516
517```
517```
518−[%brts p=spec q=hoon]
518+[%brts p=spec q=reference]
519```
519```
520
520
521##### Definition
521##### Definition
@@ -526,9 +526,9 @@ The product of a `|=` expression is a dry **gate**, i.e., a Hoon function.
526
526
527##### Expands to
527##### Expands to
528
528
529−```hoon
529+```reference
530=| a=spec
530=| a=spec
531−|% ++ $ b=hoon
531+|% ++ $ b=reference
532--
532--
533```
533```
534
534
@@ -538,7 +538,7 @@ Dry gates are used for the vast majority of ordinary functions in Hoon.
538
538
539A gate is a core with one arm named `$`, so we can recurse back into it with `$()`.
539A gate is a core with one arm named `$`, so we can recurse back into it with `$()`.
540
540
541−> `$(...)` expands to `%=($ ...)` (["centis"](@/docs/hoon/hoon-expressions/rune/cen.md#centis)).
541+> `$(...)` expands to `%=($ ...)` (["centis"](@/docs/reference/hoon-expressions/rune/cen.md#centis)).
542
542
543##### Examples
543##### Examples
544
544
@@ -568,12 +568,12 @@ Produce a 'wet' core `[battery payload]`.
568
568
569Regular:
569Regular:
570
570
571−```hoon
571+```reference
572|@
572|@
573−++ a=term b=hoon
573+++ a=term b=reference
574−++ c=term d=hoon
574+++ c=term d=reference
575 ...
575 ...
576−++ e=term f=hoon
576+++ e=term f=reference
577--
577--
578```
578```
579
579
@@ -591,7 +591,7 @@ A `|@` expression produces a 'wet' core whose payload is the expression's subjec
591
591
592##### Discussion
592##### Discussion
593
593
594−The `|@` rune is just like the `|%` rune except that instead of producing a 'dry' core, it produces a 'wet' one. This allows for type polymorphism of its arms, using 'genericity'. See [Advanced types](@/docs/hoon/hoon-expressions/advanced.md).
594+The `|@` rune is just like the `|%` rune except that instead of producing a 'dry' core, it produces a 'wet' one. This allows for type polymorphism of its arms, using 'genericity'. See [Advanced types](@/docs/reference/hoon-expressions/advanced.md).
595
595
596### |? "barwut"
596### |? "barwut"
597
597
@@ -601,14 +601,14 @@ Produce a lead trap.
601
601
602Regular:
602Regular:
603
603
604−```hoon
604+```reference
605−|? a=hoon
605+|? a=reference
606```
606```
607
607
608AST:
608AST:
609
609
610```
610```
611−[%brwt p=hoon]
611+[%brwt p=reference]
612```
612```
613
613
614##### Semantics
614##### Semantics
@@ -617,13 +617,13 @@ A `|?` expression produces a lead trap (i.e., a lead core with one arm named `$`
617
617
618##### Expands to
618##### Expands to
619
619
620−```hoon
620+```reference
621^? |. a
621^? |. a
622```
622```
623
623
624##### Discussion
624##### Discussion
625
625
626−See this [discussion of the core variance model](@/docs/hoon/hoon-expressions/advanced.md).
626+See this [discussion of the core variance model](@/docs/reference/hoon-expressions/advanced.md).
627
627
628##### Examples
628##### Examples
629
629
reference/hoon-expressions/rune/buc.md+9−9
@@ -2,7 +2,7 @@
2title = "Structures $ ('buc')"
2title = "Structures $ ('buc')"
3weight = 12
3weight = 12
4template = "doc.html"
4template = "doc.html"
5−aliases = ["docs/reference/hoon-expressions/rune/buc/"]
5+aliases = ["docs/reference/reference-expressions/rune/buc/"]
6+++
6+++
7The `$` family of runes is used for defining custom types. Strictly speaking,
7The `$` family of runes is used for defining custom types. Strictly speaking,
8these runes are used to produce 'structures'. A structure is a compile-time
8these runes are used to produce 'structures'. A structure is a compile-time
@@ -54,11 +54,11 @@ Irregular: `*` makes `%noun`, `^` makes `%cell`, `?` makes
54
54
55### $_ "buccab"
55### $_ "buccab"
56
56
57−`[%bscb p=hoon]`: structure that normalizes to an example.
57+`[%bscb p=reference]`: structure that normalizes to an example.
58
58
59##### Expands to
59##### Expands to
60
60
61−```hoon
61+```reference
62|=(* p)
62|=(* p)
63```
63```
64
64
@@ -159,7 +159,7 @@ Irregular (structure mode): `[a b c]` is `$:(a b c)`.
159
159
160##### Expands to
160##### Expands to
161
161
162−```hoon
162+```reference
163$_ ^|
163$_ ^|
164|=(p $:q)
164|=(p $:q)
165```
165```
@@ -217,7 +217,7 @@ Regular: **2-fixed**.
217
217
218### $~ "bucsig"
218### $~ "bucsig"
219
219
220−`[%bssg p=hoon q=spec]`: define a custom type default value
220+`[%bssg p=reference q=spec]`: define a custom type default value
221
221
222## Product
222## Product
223
223
@@ -231,15 +231,15 @@ The product of `p`.
231
231
232Regular: **2-fixed**.
232Regular: **2-fixed**.
233
233
234−```hoon
234+```reference
235−$~ p=hoon q=spec
235+$~ p=reference q=spec
236```
236```
237
237
238`p` defines the default value, and `q` defines everything else about the structure.
238`p` defines the default value, and `q` defines everything else about the structure.
239
239
240##### Discussion
240##### Discussion
241
241
242−You should make sure that the product type of `p` nests under `q`. You can check the default value of some structure (custom type) `r` with `*r`. (See the [`^*` rune](@/docs/hoon/hoon-expressions/rune/ket.md#kettar).)
242+You should make sure that the product type of `p` nests under `q`. You can check the default value of some structure (custom type) `r` with `*r`. (See the [`^*` rune](@/docs/reference/hoon-expressions/rune/ket.md#kettar).)
243
243
244Do not confuse the `$~` rune with the constant type for null, `$~`. (The latter uses older Hoon syntax that is still accepted. Preferably it would be `%~`.)
244Do not confuse the `$~` rune with the constant type for null, `$~`. (The latter uses older Hoon syntax that is still accepted. Preferably it would be `%~`.)
245
245
@@ -321,7 +321,7 @@ Example:
321
321
322##### Expands to
322##### Expands to
323
323
324−```hoon
324+```reference
325|= *
325|= *
326^=(p %-(q +6))
326^=(p %-(q +6))
327```
327```
reference/hoon-expressions/rune/cen.md+65−65
@@ -2,7 +2,7 @@
2title = "Calls % ('cen')"
2title = "Calls % ('cen')"
3weight = 10
3weight = 10
4template = "doc.html"
4template = "doc.html"
5−aliases = ["docs/reference/hoon-expressions/rune/cen/"]
5+aliases = ["docs/reference/reference-expressions/rune/cen/"]
6+++
6+++
7The `%` family of runes is used for making 'function calls' in Hoon. To be more precise, these runes evaluate the `$` arm in cores, usually after modifying the sample. (The default sample is replaced with the input values given in the call.)
7The `%` family of runes is used for making 'function calls' in Hoon. To be more precise, these runes evaluate the `$` arm in cores, usually after modifying the sample. (The default sample is replaced with the input values given in the call.)
8
8
@@ -18,25 +18,25 @@ Resolve a wing with changes, preserving type.
18
18
19Regular, tall:
19Regular, tall:
20
20
21−```hoon
21+```reference
22%_ a=wing
22%_ a=wing
23− b=wing c=hoon
23+ b=wing c=reference
24− d=wing e=hoon
24+ d=wing e=reference
25 ...
25 ...
26− f=wing g=hoon
26+ f=wing g=reference
27==
27==
28```
28```
29
29
30Regular, flat:
30Regular, flat:
31
31
32−```hoon
32+```reference
33−%_(a=wing b=wing c=hoon, d=wing e=hoon, ...)
33+%_(a=wing b=wing c=reference, d=wing e=hoon, ...)
34```
34```
35
35
36AST:
36AST:
37
37
38```
38```
39−[%cncb p=wing q=(list (pair wing hoon))]
39+[%cncb p=wing q=(list (pair wing reference))]
40```
40```
41
41
42##### Semantics
42##### Semantics
@@ -45,7 +45,7 @@ A `%_` expression resolves to the value of the subject at wing `a`, but modified
45
45
46##### Expands to
46##### Expands to
47
47
48−```hoon
48+```reference
49^+(a %=(a b c, d e, ...))
49^+(a %=(a b c, d e, ...))
50```
50```
51
51
@@ -53,7 +53,7 @@ A `%_` expression resolves to the value of the subject at wing `a`, but modified
53
53
54`%_` is different from `%=` because `%=` can change the type of a wing with mutations. `%_` preserves the wing type.
54`%_` is different from `%=` because `%=` can change the type of a wing with mutations. `%_` preserves the wing type.
55
55
56−See [how wings are resolved](@/docs/hoon/hoon-expressions/limb/_index.md).
56+See [how wings are resolved](@/docs/reference/hoon-expressions/limb/_index.md).
57
57
58##### Examples
58##### Examples
59
59
@@ -81,19 +81,19 @@ Call a gate with many arguments.
81
81
82Regular:
82Regular:
83
83
84−```hoon
84+```reference
85−%: a=hoon
85+%: a=reference
86− b=hoon
86+ b=reference
87− c=hoon
87+ c=reference
88 ...
88 ...
89− d=hoon
89+ d=reference
90==
90==
91```
91```
92
92
93AST:
93AST:
94
94
95```
95```
96−[%cncl p=hoon q=(list hoon)]
96+[%cncl p=reference q=(list hoon)]
97```
97```
98
98
99##### Semantics
99##### Semantics
@@ -106,7 +106,7 @@ When `%:` is used in tall-form syntax, the series of expressions after `p` must
106
106
107##### Examples
107##### Examples
108
108
109−```hoon
109+```reference
110> %: add 22 33 ==
110> %: add 22 33 ==
11155
11155
112
112
@@ -135,14 +135,14 @@ Call a gate (function), inverted.
135
135
136Regular:
136Regular:
137
137
138−```hoon
138+```reference
139−%. a=hoon b=hoon
139+%. a=reference b=hoon
140```
140```
141
141
142AST:
142AST:
143
143
144```
144```
145−[%cndt p=hoon q=hoon]
145+[%cndt p=reference q=hoon]
146```
146```
147
147
148##### Semantics
148##### Semantics
@@ -151,8 +151,8 @@ The `%.` rune is for evaluating the `$` arm of a gate, i.e., calling a function.
151
151
152##### Expands to
152##### Expands to
153
153
154−```hoon
154+```reference
155−%-(b=hoon a=hoon)
155+%-(b=reference a=hoon)
156```
156```
157
157
158##### Discussion
158##### Discussion
@@ -176,20 +176,20 @@ Call a gate (function).
176
176
177Regular:
177Regular:
178
178
179−```hoon
179+```reference
180−%- a=hoon b=hoon
180+%- a=reference b=hoon
181```
181```
182
182
183Irregular:
183Irregular:
184
184
185−```hoon
185+```reference
186−(a=hoon b=hoon)
186+(a=reference b=hoon)
187```
187```
188
188
189AST:
189AST:
190
190
191```
191```
192−[%cnhp p=hoon q=hoon]
192+[%cnhp p=reference q=hoon]
193```
193```
194
194
195##### Semantics
195##### Semantics
@@ -198,14 +198,14 @@ This rune is for evaluating the `$` arm of a gate, i.e., calling a gate as a fun
198
198
199##### Expands to
199##### Expands to
200
200
201−```hoon
201+```reference
202%~($ a b)
202%~($ a b)
203```
203```
204
204
205##### Discussion
205##### Discussion
206
206
207−`%-` is used to call a function; `a` is the function ([`gate`](@/docs/hoon/hoon-expressions/rune/bar.md#bartis),
207+`%-` is used to call a function; `a` is the function ([`gate`](@/docs/reference/hoon-expressions/rune/bar.md#bartis),
208−`q` the argument. `%-` is a special case of [`%~` ("censig")](#censig), and a gate is a special case of a [door](@/docs/hoon/hoon-expressions/rune/bar.md#barcab).
208+`q` the argument. `%-` is a special case of [`%~` ("censig")](#censig), and a gate is a special case of a [door](@/docs/reference/hoon-expressions/rune/bar.md#barcab).
209
209
210##### Examples
210##### Examples
211
211
@@ -225,21 +225,21 @@ Call gate with triple sample.
225
225
226Regular:
226Regular:
227
227
228−```hoon
228+```reference
229−%^ a=hoon b=hoon c=hoon d=hoon
229+%^ a=reference b=hoon c=hoon d=hoon
230```
230```
231
231
232AST:
232AST:
233
233
234```
234```
235−[%cnkt p=hoon q=hoon r=hoon s=hoon]
235+[%cnkt p=reference q=hoon r=hoon s=hoon]
236```
236```
237
237
238
238
239##### Expands to
239##### Expands to
240
240
241−```hoon
241+```reference
242−%-(a=hoon [b=hoon c=hoon d=hoon])
242+%-(a=reference [b=hoon c=hoon d=hoon])
243```
243```
244
244
245##### Examples
245##### Examples
@@ -259,14 +259,14 @@ Call gate with a cell sample.
259
259
260Regular:
260Regular:
261
261
262−```hoon
262+```reference
263−%+ a=hoon b=hoon c=hoon
263+%+ a=reference b=hoon c=hoon
264```
264```
265
265
266AST:
266AST:
267
267
268```
268```
269−[%cnls p=hoon q=hoon r=hoon]
269+[%cnls p=reference q=hoon r=hoon]
270```
270```
271
271
272##### Semantics
272##### Semantics
@@ -275,8 +275,8 @@ A `%+` expression is for calling a gate with a cell sample. `a` is the gate to
275
275
276##### Expands to
276##### Expands to
277
277
278−```hoon
278+```reference
279−%-(a=hoon [b=hoon c=hoon])
279+%-(a=reference [b=hoon c=hoon])
280```
280```
281
281
282##### Examples
282##### Examples
@@ -296,12 +296,12 @@ Evaluate an arm in a door.
296
296
297Regular:
297Regular:
298
298
299−```hoon
299+```reference
300−%~ a=wing b=hoon
300+%~ a=wing b=reference
301− c=hoon
301+ c=reference
302− d=hoon
302+ d=reference
303 ...
303 ...
304− e=hoon
304+ e=reference
305==
305==
306```
306```
307
307
@@ -313,7 +313,7 @@ Irregular:
313AST:
313AST:
314
314
315```
315```
316−[%cnsg p=wing q=hoon r=(list hoon)]
316+[%cnsg p=wing q=reference r=(list hoon)]
317```
317```
318
318
319##### Semantics
319##### Semantics
@@ -324,11 +324,11 @@ A `%~` expression evaluates the arm of a door (i.e., a core with a sample). `a`
324
324
325`%~` is the general case of a function call, `%-`. In both, we replace the sample (`+6`) of a core. In `%-` the core is a gate and the `$` arm is evaluated. In `%~` the core is a door and any arm may be evaluated. You must identify the arm to be run: `%~(arm door arg)`.
325`%~` is the general case of a function call, `%-`. In both, we replace the sample (`+6`) of a core. In `%-` the core is a gate and the `$` arm is evaluated. In `%~` the core is a door and any arm may be evaluated. You must identify the arm to be run: `%~(arm door arg)`.
326
326
327−See also [`|_`](@/docs/hoon/hoon-expressions/rune/bar.md#barcab).
327+See also [`|_`](@/docs/reference/hoon-expressions/rune/bar.md#barcab).
328
328
329##### Examples
329##### Examples
330
330
331−```hoon
331+```reference
332> =mycore |_ a=@
332> =mycore |_ a=@
333 ++ plus-two (add 2 a)
333 ++ plus-two (add 2 a)
334 ++ double (mul 2 a)
334 ++ double (mul 2 a)
@@ -348,19 +348,19 @@ Evaluate an expression, then resolve a wing with changes.
348
348
349Regular:
349Regular:
350
350
351−```hoon
351+```reference
352−%* a=wing b=hoon
352+%* a=wing b=reference
353− c=wing d=hoon
353+ c=wing d=reference
354− e=wing f=hoon
354+ e=wing f=reference
355 ...
355 ...
356− g=wing h=hoon
356+ g=wing h=reference
357==
357==
358```
358```
359
359
360AST:
360AST:
361
361
362```
362```
363−[%cntr p=wing q=hoon r=(list (pair wing hoon))]
363+[%cntr p=wing q=reference r=(list (pair wing hoon))]
364```
364```
365
365
366##### Semantics
366##### Semantics
@@ -369,13 +369,13 @@ A `%*` expression evaluates some arbitrary Hoon expression, `b`, and then resolv
369
369
370##### Expands to
370##### Expands to
371
371
372−```hoon
372+```reference
373−=+ b=hoon
373+=+ b=reference
374%= a=wing
374%= a=wing
375− c=wing d=hoon
375+ c=wing d=reference
376− e=wing f=hoon
376+ e=wing f=reference
377 ...
377 ...
378− g=wing h=hoon
378+ g=wing h=reference
379==
379==
380```
380```
381
381
@@ -411,12 +411,12 @@ Resolve a wing with changes.
411
411
412Regular:
412Regular:
413
413
414−```hoon
414+```reference
415%= a=wing
415%= a=wing
416− b=wing c=hoon
416+ b=wing c=reference
417− d=wing e=hoon
417+ d=wing e=reference
418 ...
418 ...
419− f=wing g=hoon
419+ f=wing g=reference
420==
420==
421```
421```
422
422
@@ -427,7 +427,7 @@ Irregular:
427AST:
427AST:
428
428
429```
429```
430−[%cnts p=wing q=(list (pair wing hoon))]
430+[%cnts p=wing q=(list (pair wing reference))]
431```
431```
432
432
433##### Semantics
433##### Semantics
@@ -452,7 +452,7 @@ a wing, we would just be mutating `+6` within the core that defines the
452
452
453Here's that again in tall form:
453Here's that again in tall form:
454
454
455−```hoon
455+```reference
456=+ foo
456=+ foo
457=> %= +2
457=> %= +2
458 +6 baz
458 +6 baz
reference/hoon-expressions/rune/ket.md+17−17
@@ -2,7 +2,7 @@
2title = "Casts ^ ('ket')"
2title = "Casts ^ ('ket')"
3weight = 11
3weight = 11
4template = "doc.html"
4template = "doc.html"
5−aliases = ["docs/reference/hoon-expressions/rune/ket/"]
5+aliases = ["docs/reference/reference-expressions/rune/ket/"]
6+++
6+++
7[`^-` ("kethep")](#kethep), [`^+` ("ketlus")](#ketlus), and
7[`^-` ("kethep")](#kethep), [`^+` ("ketlus")](#ketlus), and
8[`^=` ("kettis")](#kettis) let us adjust types without violating type
8[`^=` ("kettis")](#kettis) let us adjust types without violating type
@@ -15,7 +15,7 @@ it never allows invalid nests, it sometimes rejects valid nests.
15
15
16### ^| "ketbar"
16### ^| "ketbar"
17
17
18−`[%ktbr p=hoon]`: convert a gold core to an iron core (contravariant).
18+`[%ktbr p=reference]`: convert a gold core to an iron core (contravariant).
19
19
20##### Produces
20##### Produces
21
21
@@ -87,11 +87,11 @@ ford: %ride failed to execute:
87
87
88### ^. "ketdot"
88### ^. "ketdot"
89
89
90−`[%ktdt p=hoon q=hoon]`: typecast on value produced by passing `q` to `p`.
90+`[%ktdt p=reference q=hoon]`: typecast on value produced by passing `q` to `p`.
91
91
92##### Expands to
92##### Expands to
93
93
94−```hoon
94+```reference
95^+(%:(p q) q)
95^+(%:(p q) q)
96```
96```
97
97
@@ -99,8 +99,8 @@ ford: %ride failed to execute:
99
99
100Regular: **2-fixed**.
100Regular: **2-fixed**.
101
101
102−```hoon
102+```reference
103−^. p=hoon q=hoon
103+^. p=reference q=hoon
104```
104```
105
105
106##### Discussion
106##### Discussion
@@ -128,11 +128,11 @@ mint-vain
128
128
129### ^- "kethep"
129### ^- "kethep"
130
130
131−`[%kthp p=spec q=hoon]`: typecast by explicit type label.
131+`[%kthp p=spec q=reference]`: typecast by explicit type label.
132
132
133##### Expands to
133##### Expands to
134
134
135−```hoon
135+```reference
136^+(^*(p) q)
136^+(^*(p) q)
137```
137```
138
138
@@ -172,7 +172,7 @@ infinite loop in the compiler).
172
172
173### ^+ "ketlus"
173### ^+ "ketlus"
174
174
175−`[%ktls p=hoon q=hoon]`: typecast by inferred type.
175+`[%ktls p=reference q=hoon]`: typecast by inferred type.
176
176
177##### Produces
177##### Produces
178
178
@@ -191,7 +191,7 @@ Regular: **2-fixed**.
191
191
192### ^& "ketpam"
192### ^& "ketpam"
193
193
194−`[%ktpm p=hoon]`: convert a core to a zinc core (covariant).
194+`[%ktpm p=reference]`: convert a core to a zinc core (covariant).
195
195
196##### Produces
196##### Produces
197
197
@@ -203,7 +203,7 @@ Regular: **1-fixed**.
203
203
204##### Discussion
204##### Discussion
205
205
206−A zinc core has a read-only sample and an opaque context. See [Advanced types](@/docs/hoon/hoon-expressions/advanced.md).
206+A zinc core has a read-only sample and an opaque context. See [Advanced types](@/docs/reference/hoon-expressions/advanced.md).
207
207
208##### Examples
208##### Examples
209
209
@@ -244,7 +244,7 @@ ford: %ride failed to compute type:
244
244
245### ^~ "ketsig"
245### ^~ "ketsig"
246
246
247−`[%ktsg p=hoon]`: fold constant at compile time.
247+`[%ktsg p=reference]`: fold constant at compile time.
248
248
249##### Produces
249##### Produces
250
250
@@ -276,7 +276,7 @@ A default value (i.e., 'bunt value') of the type `p`.
276
276
277Regular: **1-fixed**.
277Regular: **1-fixed**.
278
278
279−```hoon
279+```reference
280^* p=spec
280^* p=spec
281```
281```
282
282
@@ -288,7 +288,7 @@ Irregular: `*p`.
288
288
289Regular:
289Regular:
290
290
291−```hoon
291+```reference
292> ^* @
292> ^* @
2930
2930
294
294
@@ -304,7 +304,7 @@ Regular:
304
304
305Irregular:
305Irregular:
306
306
307−```hoon
307+```reference
308> *@
308> *@
3090
3090
310
310
@@ -317,7 +317,7 @@ Irregular:
317
317
318### ^= "kettis"
318### ^= "kettis"
319
319
320−`[%ktts p=skin q=hoon]`: Bind name to a value.
320+`[%ktts p=skin q=reference]`: Bind name to a value.
321
321
322##### Produces
322##### Produces
323
323
@@ -353,7 +353,7 @@ a=1
353
353
354### ^? "ketwut"
354### ^? "ketwut"
355
355
356−`[%ktwt p=hoon]`: convert any core to a lead core (bivariant).
356+`[%ktwt p=reference]`: convert any core to a lead core (bivariant).
357
357
358##### Produces
358##### Produces
359
359
reference/hoon-expressions/rune/mic.md+3−3
@@ -81,7 +81,7 @@ A `marl`, i.e., a list of `manx`. A `manx` is a noun that represents a single X
81
81
82tl;dr -- `;+` converts a `manx` to a `marl`.
82tl;dr -- `;+` converts a `manx` to a `marl`.
83
83
84−`;+` is a Sail rune. Sail is a part of Hoon used for creating and operating on nouns that represent XML nodes. With the appropriate rendering pipeline, a Sail document can be used to generate a static website. See the [Sail tutorial](@/docs/arvo/sail-and-udon.md).
84+`;+` is a Sail rune. Sail is a part of Hoon used for creating and operating on nouns that represent XML nodes. With the appropriate rendering pipeline, a Sail document can be used to generate a static website. See the [Sail tutorial](@/docs/tutorials/sail-and-udon.md).
85
85
86In Sail a single XML node is represented by a `manx`. A single `<p>` node `manx` can be produced in the following way:
86In Sail a single XML node is represented by a `manx`. A single `<p>` node `manx` can be produced in the following way:
87
87
@@ -295,7 +295,7 @@ A `marl`, i.e., a list of `manx`. A `manx` is a noun that represents a single X
295
295
296##### Discussion
296##### Discussion
297
297
298−`;*` is a Sail rune. Sail is a part of Hoon used for creating and operating on nouns that represent XML nodes. With the appropriate rendering pipeline, a Sail document can be used to generate a static website. See the [Sail tutorial](@/docs/arvo/sail-and-udon.md).
298+`;*` is a Sail rune. Sail is a part of Hoon used for creating and operating on nouns that represent XML nodes. With the appropriate rendering pipeline, a Sail document can be used to generate a static website. See the [Sail tutorial](@/docs/tutorials/sail-and-udon.md).
299
299
300If you need a complex Hoon expression to produce a `marl`, use the `;*` rune. Often this rune is used with an expression, `p`, that includes one or more `;=` subexpressions.
300If you need a complex Hoon expression to produce a `marl`, use the `;*` rune. Often this rune is used with an expression, `p`, that includes one or more `;=` subexpressions.
301
301
@@ -347,7 +347,7 @@ A `marl`, i.e., a list of `manx`. A `manx` is a noun that represents a single X
347
347
348##### Discussion
348##### Discussion
349
349
350−`;=` is a Sail rune. Sail is a part of Hoon used for creating and operating on nouns that represent XML nodes. With the appropriate rendering pipeline, a Sail document can be used to generate a static website. See the [Sail tutorial](@/docs/arvo/sail-and-udon.md).
350+`;=` is a Sail rune. Sail is a part of Hoon used for creating and operating on nouns that represent XML nodes. With the appropriate rendering pipeline, a Sail document can be used to generate a static website. See the [Sail tutorial](@/docs/tutorials/sail-and-udon.md).
351
351
352In Sail a single XML node is represented by a `manx`. A single `<p>` node `manx` can be produced in the following way:
352In Sail a single XML node is represented by a `manx`. A single `<p>` node `manx` can be produced in the following way:
353
353
reference/hoon-expressions/rune/tis.md+28−28
@@ -2,7 +2,7 @@
2title = "Change Subject = ('tis')"
2title = "Change Subject = ('tis')"
3weight = 5
3weight = 5
4template = "doc.html"
4template = "doc.html"
5−aliases = ["/docs/reference/hoon-expressions/rune/tis/"]
5+aliases = ["/docs/reference/reference-expressions/rune/tis/"]
6+++
6+++
7These runes modify the subject. (Or more precisely, they
7These runes modify the subject. (Or more precisely, they
8evaluate at least one of their subexpressions with a modified subject.)
8evaluate at least one of their subexpressions with a modified subject.)
@@ -26,7 +26,7 @@ different situations. Hence the whole family of `=` runes.
26
26
27### => "tisgar"
27### => "tisgar"
28
28
29−`[%tsgr p=hoon q=hoon]`: compose two expressions.
29+`[%tsgr p=reference q=hoon]`: compose two expressions.
30
30
31##### Produces
31##### Produces
32
32
@@ -49,11 +49,11 @@ Regular: **2-fixed**.
49### =| "tisbar"
49### =| "tisbar"
50
50
51
51
52−`[%tsbr p=spec q=hoon]`: combine a default type value with the subject.
52+`[%tsbr p=spec q=reference]`: combine a default type value with the subject.
53
53
54##### Expands to
54##### Expands to
55
55
56−```hoon
56+```reference
57=+(*p q)
57=+(*p q)
58```
58```
59
59
@@ -80,11 +80,11 @@ Speaking more loosely, `=|` usually "declares a variable" which is "uninitialize
80
80
81### =: "tiscol"
81### =: "tiscol"
82
82
83−`[%tscl p=(list (pair wing hoon)) q=hoon]`: change multiple legs in the subject.
83+`[%tscl p=(list (pair wing reference)) q=hoon]`: change multiple legs in the subject.
84
84
85##### Expands to
85##### Expands to
86
86
87−```hoon
87+```reference
88=>(%_(. p) q)
88=>(%_(. p) q)
89```
89```
90
90
@@ -109,7 +109,7 @@ This rune is like `=.`, but for modifying the values of multiple legs of the sub
109
109
110### =, "tiscom"
110### =, "tiscom"
111
111
112−`[%tscm p=hoon q=hoon]`: expose namespace
112+`[%tscm p=reference q=hoon]`: expose namespace
113
113
114`p` evaluates to a noun with some namespace. From within `q` you may access `p`'s names without a wing path (i.e., you can use face `b` rather than `b.p`). This is especially useful for calling arms from an imported library core or for calling arms from a stdlib core repeatedly.
114`p` evaluates to a noun with some namespace. From within `q` you may access `p`'s names without a wing path (i.e., you can use face `b` rather than `b.p`). This is especially useful for calling arms from an imported library core or for calling arms from a stdlib core repeatedly.
115
115
@@ -144,11 +144,11 @@ With a dojo-defined face:
144
144
145### =. "tisdot"
145### =. "tisdot"
146
146
147−`[%tsdt p=wing q=hoon r=hoon]`: change one leg in the subject.
147+`[%tsdt p=wing q=reference r=hoon]`: change one leg in the subject.
148
148
149##### Expands to
149##### Expands to
150
150
151−```hoon
151+```reference
152=>(%_(. p q) r)
152=>(%_(. p q) r)
153```
153```
154
154
@@ -159,7 +159,7 @@ Regular: **3-fixed**.
159##### Discussion
159##### Discussion
160
160
161Technically the `=.` rune doesn't change the subject. It creates
161Technically the `=.` rune doesn't change the subject. It creates
162−a new subject just like the old one except for a changed value at `p`. Note that the mutation uses [`%_` ("cencab")](@/docs/hoon/hoon-expressions/rune/cen.md#cencab), so the type at `p` doesn't change. Trying to change the value type results in a `nest-fail`.
162+a new subject just like the old one except for a changed value at `p`. Note that the mutation uses [`%_` ("cencab")](@/docs/reference/hoon-expressions/rune/cen.md#cencab), so the type at `p` doesn't change. Trying to change the value type results in a `nest-fail`.
163
163
164##### Examples
164##### Examples
165
165
@@ -180,11 +180,11 @@ nest-fail
180
180
181### =- "tishep"
181### =- "tishep"
182
182
183−`[%tshp p=hoon q=hoon]`: combine a new noun with the subject, inverted.
183+`[%tshp p=reference q=hoon]`: combine a new noun with the subject, inverted.
184
184
185##### Expands to
185##### Expands to
186
186
187−```hoon
187+```reference
188=>([q .] p)
188=>([q .] p)
189```
189```
190
190
@@ -209,12 +209,12 @@ Regular: **2-fixed**.
209
209
210### =^ "tisket"
210### =^ "tisket"
211
211
212−`[%tskt p=skin q=wing r=hoon s=hoon]`: pin the head of a pair; change
212+`[%tskt p=skin q=wing r=reference s=hoon]`: pin the head of a pair; change
213a leg with the tail.
213a leg with the tail.
214
214
215##### Expands to
215##### Expands to
216
216
217−```hoon
217+```reference
218=/(p -.r =.(q +.r s))
218=/(p -.r =.(q +.r s))
219```
219```
220
220
@@ -249,11 +249,11 @@ random number, so we use `=^`:
249
249
250### =< "tisgal"
250### =< "tisgal"
251
251
252−`[%tsgl p=hoon q=hoon]`: compose two expressions, inverted.
252+`[%tsgl p=reference q=hoon]`: compose two expressions, inverted.
253
253
254##### Expands to
254##### Expands to
255
255
256−```hoon
256+```reference
257=>(q p)
257=>(q p)
258```
258```
259
259
@@ -287,11 +287,11 @@ Irregular: `foo:baz` is `=<(foo baz)`.
287### =+ "tislus"
287### =+ "tislus"
288
288
289
289
290−`[%tsls p=hoon q=hoon]`: combine a new noun with the subject.
290+`[%tsls p=reference q=hoon]`: combine a new noun with the subject.
291
291
292##### Expands to
292##### Expands to
293
293
294−```hoon
294+```reference
295=>([p .] q)
295=>([p .] q)
296```
296```
297
297
@@ -309,11 +309,11 @@ Loosely speaking, `=+` is the simplest way of "declaring a variable."
309
309
310### =; "tismic"
310### =; "tismic"
311
311
312−`[%tsmc p=skin q=hoon r=hoon]`: combine a named noun with the subject, possibly with type annotation; inverted order.
312+`[%tsmc p=skin q=reference r=hoon]`: combine a named noun with the subject, possibly with type annotation; inverted order.
313
313
314##### Expands to
314##### Expands to
315
315
316−```hoon
316+```reference
317=/(p r q)
317=/(p r q)
318```
318```
319
319
@@ -338,25 +338,25 @@ Regular: **3-fixed**.
338
338
339### =/ "tisfas"
339### =/ "tisfas"
340
340
341−`[%tsfs p=skin q=hoon r=hoon]`: combine a named noun with the subject, possibly with type annotation.
341+`[%tsfs p=skin q=reference r=hoon]`: combine a named noun with the subject, possibly with type annotation.
342
342
343##### Expands to
343##### Expands to
344
344
345**if `p` is a name**, (e.g. `a`):
345**if `p` is a name**, (e.g. `a`):
346
346
347−```hoon
347+```reference
348=+(^=(p q) r)
348=+(^=(p q) r)
349```
349```
350
350
351**if `p` is a name with a type** (e.g., `a=@`):
351**if `p` is a name with a type** (e.g., `a=@`):
352
352
353−```hoon
353+```reference
354=+(^-(p q) r)
354=+(^-(p q) r)
355```
355```
356
356
357### Desugaring
357### Desugaring
358
358
359−```hoon
359+```reference
360?@ p
360?@ p
361 =+ p=q
361 =+ p=q
362 r
362 r
@@ -388,7 +388,7 @@ Regular: **3-fixed**.
388### =~ "tissig"
388### =~ "tissig"
389
389
390
390
391−`[%tssg p=(list hoon)]`: compose many expressions.
391+`[%tssg p=(list reference)]`: compose many expressions.
392
392
393##### Produces
393##### Produces
394
394
@@ -423,7 +423,7 @@ Regular: **running**.
423
423
424### =* "tistar"
424### =* "tistar"
425
425
426−`[%tstr p=term q=hoon r=hoon]`: define an alias.
426+`[%tstr p=term q=reference r=hoon]`: define an alias.
427
427
428##### Produces
428##### Produces
429
429
@@ -456,11 +456,11 @@ The difference between aliasing and pinning is that pinning changes the subject,
456
456
457### =? "tiswut"
457### =? "tiswut"
458
458
459−`[$tswt p=wing q=hoon r=hoon s=hoon]`: conditionally change one leg in the subject.
459+`[$tswt p=wing q=reference r=hoon s=hoon]`: conditionally change one leg in the subject.
460
460
461##### Expands to
461##### Expands to
462
462
463−```hoon
463+```reference
464=. p ?:(q r p)
464=. p ?:(q r p)
465s
465s
466```
466```
reference/hoon-expressions/rune/wut.md+28−28
@@ -2,7 +2,7 @@
2title = "Conditionals ? ('wut')"
2title = "Conditionals ? ('wut')"
3weight = 6
3weight = 6
4template = "doc.html"
4template = "doc.html"
5−aliases = ["docs/reference/hoon-expressions/rune/wut/"]
5+aliases = ["docs/reference/reference-expressions/rune/wut/"]
6+++
6+++
7Hoon has the usual program control branches. It also has the usual logical
7Hoon has the usual program control branches. It also has the usual logical
8operators: AND `?&`, OR `?|`, and NOT `?!`. It also has a `?=` rune that tests
8operators: AND `?&`, OR `?|`, and NOT `?!`. It also has a `?=` rune that tests
@@ -22,7 +22,7 @@ for expressions which expand to `?:`.
22The test does not have to be a single `?=`; the compiler can
22The test does not have to be a single `?=`; the compiler can
23analyze arbitrary boolean logic ([`?&` ("wutpam")](#wutpam),
23analyze arbitrary boolean logic ([`?&` ("wutpam")](#wutpam),
24[`?|` ("wutbar")](#wutbar), [`?!` ("wutzap")](#wutzap)) with full
24[`?|` ("wutbar")](#wutbar), [`?!` ("wutzap")](#wutzap)) with full
25−short-circuiting. Equality tests ([`.=` ("dottis")](@/docs/hoon/hoon-expressions/rune/dot.md#dottis)) are **not**
25+short-circuiting. Equality tests ([`.=` ("dottis")](@/docs/reference/hoon-expressions/rune/dot.md#dottis)) are **not**
26analyzed.
26analyzed.
27
27
28If the compiler detects that the branch is degenerate (only one
28If the compiler detects that the branch is degenerate (only one
@@ -32,11 +32,11 @@ side is taken), it fails with an error.
32
32
33### ?> "wutgar"
33### ?> "wutgar"
34
34
35−`[%wtgr p=hoon q=hoon]`: positive assertion.
35+`[%wtgr p=reference q=hoon]`: positive assertion.
36
36
37##### Expands to
37##### Expands to
38
38
39−```hoon
39+```reference
40?.(p !! q)
40?.(p !! q)
41```
41```
42
42
@@ -70,19 +70,19 @@ nest-fail
70
70
71### ?| "wutbar"
71### ?| "wutbar"
72
72
73−`[%wtbr p=(list hoon)]`: logical OR.
73+`[%wtbr p=(list reference)]`: logical OR.
74
74
75##### Expands to
75##### Expands to
76
76
77**Pseudocode**: `a`, `b`, `c`, ... as elements of `p`:
77**Pseudocode**: `a`, `b`, `c`, ... as elements of `p`:
78
78
79−```hoon
79+```reference
80?:(a & ?:(b & ?:(c & ?:(... ?:(z & |)))))
80?:(a & ?:(b & ?:(c & ?:(... ?:(z & |)))))
81```
81```
82
82
83##### Desugaring
83##### Desugaring
84
84
85−```hoon
85+```reference
86|-
86|-
87?~ p
87?~ p
88 |
88 |
@@ -109,7 +109,7 @@ Irregular: `|(foo bar baz)` is `?|(foo bar baz)`.
109
109
110### ?: "wutcol" {#wutcol}
110### ?: "wutcol" {#wutcol}
111
111
112−`[%wtcl p=hoon q=hoon r=hoon]`: branch on a boolean test.
112+`[%wtcl p=reference q=hoon r=hoon]`: branch on a boolean test.
113
113
114##### Produces
114##### Produces
115
115
@@ -157,11 +157,11 @@ Note also that all other branching expressions reduce to `?:`.
157
157
158### ?. "wutdot"
158### ?. "wutdot"
159
159
160−`[%wtdt p=hoon q=hoon r=hoon]`: branch on a boolean test, inverted.
160+`[%wtdt p=reference q=hoon r=hoon]`: branch on a boolean test, inverted.
161
161
162##### Expands to
162##### Expands to
163
163
164−```hoon
164+```reference
165?:(p r q)
165?:(p r q)
166```
166```
167
167
@@ -200,7 +200,7 @@ As is usual with inverted forms, use `?.` when the yes-case expression is much t
200
200
201**Pseudocode**: `a`, `b`, `c`, ... as elements of `q`:
201**Pseudocode**: `a`, `b`, `c`, ... as elements of `q`:
202
202
203−```hoon
203+```reference
204?: ?=(p.a p) q.a
204?: ?=(p.a p) q.a
205?: ?=(p.b p) q.b
205?: ?=(p.b p) q.b
206?: ?=(p.c p) q.c
206?: ?=(p.c p) q.c
@@ -210,7 +210,7 @@ As is usual with inverted forms, use `?.` when the yes-case expression is much t
210
210
211##### Desugaring
211##### Desugaring
212
212
213−```hoon
213+```reference
214|-
214|-
215?. q
215?. q
216 ~|(%mint-lost !!)
216 ~|(%mint-lost !!)
@@ -256,12 +256,12 @@ will throw `mint-vain`.
256
256
257### ?^ "wutket"
257### ?^ "wutket"
258
258
259−`[%wtkt p=wing q=hoon r=hoon]`: branch on whether a wing
259+`[%wtkt p=wing q=reference r=hoon]`: branch on whether a wing
260of the subject is a cell.
260of the subject is a cell.
261
261
262##### Expands to
262##### Expands to
263
263
264−```hoon
264+```reference
265?:(?=(^ p) q r)
265?:(?=(^ p) q r)
266```
266```
267
267
@@ -289,11 +289,11 @@ The type of the wing, `p`, must not be known to be either an atom or a cell, or
289
289
290### ?< "wutgal"
290### ?< "wutgal"
291
291
292−`[%wtgl p=hoon q=hoon]`: negative assertion.
292+`[%wtgl p=reference q=hoon]`: negative assertion.
293
293
294##### Expands to
294##### Expands to
295
295
296−```hoon
296+```reference
297?:(p !! q)
297?:(p !! q)
298```
298```
299
299
@@ -327,14 +327,14 @@ nest-fail
327
327
328### ?+ "wutlus"
328### ?+ "wutlus"
329
329
330−`[%wtls p=wing q=hoon r=(list (pair spec hoon))]`: switch against
330+`[%wtls p=wing q=reference r=(list (pair spec hoon))]`: switch against
331a union, with a default.
331a union, with a default.
332
332
333##### Expands to
333##### Expands to
334
334
335**Pseudocode**: `a`, `b`, `c`, ... as elements of `r`:
335**Pseudocode**: `a`, `b`, `c`, ... as elements of `r`:
336
336
337−```hoon
337+```reference
338?: ?=(p.a p) q.a
338?: ?=(p.a p) q.a
339?: ?=(p.b p) q.b
339?: ?=(p.b p) q.b
340?: ?=(p.c p) q.c
340?: ?=(p.c p) q.c
@@ -344,7 +344,7 @@ q
344
344
345##### Desugaring
345##### Desugaring
346
346
347−```hoon
347+```reference
348|-
348|-
349?. r
349?. r
350 q
350 q
@@ -384,19 +384,19 @@ If there is a case that is never taken you'll get a `mint-vain` error.
384
384
385### ?& "wutpam"
385### ?& "wutpam"
386
386
387−`[%wtpm p=(list hoon)]`: logical AND.
387+`[%wtpm p=(list reference)]`: logical AND.
388
388
389##### Expands to
389##### Expands to
390
390
391**Pseudocode**: `a`, `b`, `c`, ... as elements of `p`:
391**Pseudocode**: `a`, `b`, `c`, ... as elements of `p`:
392
392
393−```hoon
393+```reference
394?.(a | ?.(b | ?.(c | ?.(... ?.(z | &)))))
394?.(a | ?.(b | ?.(c | ?.(... ?.(z | &)))))
395```
395```
396
396
397##### Desugaring
397##### Desugaring
398
398
399−```hoon
399+```reference
400|-
400|-
401?~ p
401?~ p
402 &
402 &
@@ -423,11 +423,11 @@ Irregular: `&(foo bar baz)` is `?&(foo bar baz)`.
423
423
424### ?~ "wutsig"
424### ?~ "wutsig"
425
425
426−`[%wtsg p=wing q=hoon r=hoon]`: branch on whether a wing of the subject is null.
426+`[%wtsg p=wing q=reference r=hoon]`: branch on whether a wing of the subject is null.
427
427
428##### Expands to
428##### Expands to
429
429
430−```hoon
430+```reference
431?:(?=($~ p) q r)
431?:(?=($~ p) q r)
432```
432```
433
433
@@ -486,11 +486,11 @@ A common error is `find.$`, meaning `p` is not a type.
486
486
487### ?@ "wutvat"
487### ?@ "wutvat"
488
488
489−`[%wtpt p=wing q=hoon r=hoon]`: branch on whether a wing of the subject is an atom.
489+`[%wtpt p=wing q=reference r=hoon]`: branch on whether a wing of the subject is an atom.
490
490
491##### Expands to
491##### Expands to
492
492
493−```hoon
493+```reference
494?:(?=(@ p) q r)
494?:(?=(@ p) q r)
495```
495```
496
496
@@ -518,11 +518,11 @@ The type of the wing, `p`, must not be known to be either an atom or a cell, or
518
518
519### ?! "wutzap"
519### ?! "wutzap"
520
520
521−`[%wtzp p=hoon]`: logical NOT.
521+`[%wtzp p=reference]`: logical NOT.
522
522
523##### Expands to
523##### Expands to
524
524
525−```hoon
525+```reference
526.=(| p)
526.=(| p)
527```
527```
528
528
reference/library/1b.md+1−1
@@ -4,7 +4,7 @@ weight = 2
4template = "doc.html"
4template = "doc.html"
5aliases = ["/docs/reference/library/1b"]
5aliases = ["/docs/reference/library/1b"]
6+++
6+++
7−Check out the Nock [explanation](@/docs/nock/_index.md) for more
7+Check out the Nock [explanation](@/docs/tutorials/nock/_index.md) for more
8information on the tree-addressing system.
8information on the tree-addressing system.
9
9
10### `++cap`
10### `++cap`
reference/library/1c.md+13−13
@@ -12,7 +12,7 @@ Atom representing block size. A block of size `a` has a bitwidth of `2^a`.
12
12
13#### Source
13#### Source
14
14
15−```hoon
15+```reference
16 ++ bloq @
16 ++ bloq @
17```
17```
18
18
@@ -63,7 +63,7 @@ A `bloq` of 3 has a bitwidth of 8. (2^3 bits; can represent 256 values.)
63
63
64And so on.
64And so on.
65
65
66−See the [bit arithmetic](@/docs/hoon/library/2c.md) section for operations that use `bloq`s.
66+See the [bit arithmetic](@/docs/reference/library/2c.md) section for operations that use `bloq`s.
67
67
68---
68---
69
69
@@ -104,7 +104,7 @@ product noun. If used dryly as a type, the subject must have a sample type of
104
104
105#### Source
105#### Source
106
106
107−```hoon
107+```reference
108 ++ gate
108 ++ gate
109 $-(* *)
109 $-(* *)
110```
110```
@@ -143,7 +143,7 @@ homogenous type.
143
143
144#### Source
144#### Source
145
145
146−```hoon
146+```reference
147 ++ list
147 ++ list
148 |*(a=mold $@($~ (lest a)))
148 |*(a=mold $@($~ (lest a)))
149```
149```
@@ -177,7 +177,7 @@ A mold generator. Puts face of `p` on the passed-in mold.
177
177
178#### Source
178#### Source
179
179
180−```hoon
180+```reference
181 ++ lone
181 ++ lone
182 |*(a=mold [p=a])
182 |*(a=mold [p=a])
183```
183```
@@ -210,7 +210,7 @@ A mold generator. Produces a tuple of two of the types passed in.
210
210
211#### Source
211#### Source
212
212
213−```hoon
213+```reference
214 ++ pair
214 ++ pair
215 |*([a=mold b=mold] [p=a q=b])
215 |*([a=mold b=mold] [p=a q=b])
216```
216```
@@ -235,7 +235,7 @@ A mold generator. A `list` without the faces `i` and `t`.
235
235
236#### Source
236#### Source
237
237
238−```hoon
238+```reference
239 ++ pole
239 ++ pole
240 |*(a=mold $@($~ [a (pole a)]))
240 |*(a=mold $@($~ [a (pole a)]))
241```
241```
@@ -261,7 +261,7 @@ A mold generator. Produces a tuple of four of the types passed in.
261
261
262#### Source
262#### Source
263
263
264−```hoon
264+```reference
265 ++ qual
265 ++ qual
266 |* [a=mold b=mold c=mold d=mold]
266 |* [a=mold b=mold c=mold d=mold]
267 [p=a q=b r=c s=d]
267 [p=a q=b r=c s=d]
@@ -286,7 +286,7 @@ A mold generator. Produces a tuple of a `list` of `a` and the mold of `b`.
286
286
287#### Source
287#### Source
288
288
289−```hoon
289+```reference
290 ++ quip
290 ++ quip
291 |*([a=mold b=mold] [(list a) b])
291 |*([a=mold b=mold] [(list a) b])
292```
292```
@@ -315,7 +315,7 @@ A trap is a core with one arm `$`.
315
315
316#### Source
316#### Source
317
317
318−```hoon
318+```reference
319 ++ trap
319 ++ trap
320 |*(a=mold _|?(*a))
320 |*(a=mold _|?(*a))
321```
321```
@@ -344,7 +344,7 @@ left/right sub `tree` of the same type. Pretty-printed with `{}`.
344
344
345#### Source
345#### Source
346
346
347−```hoon
347+```reference
348 ++ tree
348 ++ tree
349 |*(a=mold $@($~ [n=a l=(tree a) r=(tree a)]))
349 |*(a=mold $@($~ [n=a l=(tree a) r=(tree a)]))
350```
350```
@@ -366,7 +366,7 @@ A mold generator. A mold of the tuple of the three types passed in.
366
366
367#### Source
367#### Source
368
368
369−```hoon
369+```reference
370 ++ trel
370 ++ trel
371 |*([a=mold b=mold c=mold] [p=a q=b r=c])
371 |*([a=mold b=mold c=mold] [p=a q=b r=c])
372```
372```
@@ -392,7 +392,7 @@ type that was passed in.
392
392
393#### Source
393#### Source
394
394
395−```hoon
395+```reference
396 ++ unit
396 ++ unit
397 |*(a=mold $@($~ [$~ u=a]))
397 |*(a=mold $@($~ [$~ u=a]))
398```
398```
reference/library/2c.md+37−37
@@ -20,7 +20,7 @@ An atom.
20
20
21#### Source
21#### Source
22
22
23−```hoon
23+```reference
24 ++ bex
24 ++ bex
25 ~/ %bex
25 ~/ %bex
26 |= a=@
26 |= a=@
@@ -53,7 +53,7 @@ value.
53
53
54#### Accepts
54#### Accepts
55
55
56−`a` is a block size (see [`++bloq`](@/docs/hoon/library/1c.md)).
56+`a` is a block size (see [`++bloq`](@/docs/reference/library/1c.md)).
57
57
58`b` is a `list` of length-value pairs, `p` and `q`.
58`b` is a `list` of length-value pairs, `p` and `q`.
59
59
@@ -63,7 +63,7 @@ An atom.
63
63
64#### Source
64#### Source
65
65
66−```hoon
66+```reference
67 ++ can
67 ++ can
68 ~/ %can
68 ~/ %can
69 |= [a=bloq b=(list [p=@ q=@])]
69 |= [a=bloq b=(list [p=@ q=@])]
@@ -110,7 +110,7 @@ atom.
110
110
111#### Accepts
111#### Accepts
112
112
113−`a` is a block size (see [`++bloq`](@/docs/hoon/library/1c.md)).
113+`a` is a block size (see [`++bloq`](@/docs/reference/library/1c.md)).
114
114
115`b` is an atom.
115`b` is an atom.
116
116
@@ -122,7 +122,7 @@ An atom.
122
122
123#### Source
123#### Source
124
124
125−```hoon
125+```reference
126 ++ cat
126 ++ cat
127 ~/ %cat
127 ~/ %cat
128 |= [a=bloq b=@ c=@]
128 |= [a=bloq b=@ c=@]
@@ -173,7 +173,7 @@ Slices `c` blocks of size `a` that are positioned `b` blocks from the end of
173
173
174#### Accepts
174#### Accepts
175
175
176−`a` is a block size (see [`++bloq`](@/docs/hoon/library/1c.md)).
176+`a` is a block size (see [`++bloq`](@/docs/reference/library/1c.md)).
177
177
178`b` is an atom.
178`b` is an atom.
179
179
@@ -187,7 +187,7 @@ An atom.
187
187
188#### Source
188#### Source
189
189
190−```hoon
190+```reference
191 ++ cut
191 ++ cut
192 ~/ %cut
192 ~/ %cut
193 |= [a=bloq [b=@u c=@u] d=@]
193 |= [a=bloq [b=@u c=@u] d=@]
@@ -232,7 +232,7 @@ Produces an atom by taking the last `b` blocks of size `a` from `c`.
232
232
233#### Accepts
233#### Accepts
234
234
235−`a` is a block size (see [`++bloq`](@/docs/hoon/library/1c.md)).
235+`a` is a block size (see [`++bloq`](@/docs/reference/library/1c.md)).
236
236
237`b` is an atom.
237`b` is an atom.
238
238
@@ -245,7 +245,7 @@ An atom.
245
245
246#### Source
246#### Source
247
247
248−```hoon
248+```reference
249 ++ end
249 ++ end
250 ~/ %end
250 ~/ %end
251 |= [a=bloq b=@u c=@]
251 |= [a=bloq b=@u c=@]
@@ -299,7 +299,7 @@ Produces an atom by repeating `c` for `b` blocks of size `a`.
299
299
300#### Accepts
300#### Accepts
301
301
302−`a` is a block size (see [`++bloq`](@/docs/hoon/library/1c.md)).
302+`a` is a block size (see [`++bloq`](@/docs/reference/library/1c.md)).
303
303
304`b` is an atom.
304`b` is an atom.
305
305
@@ -311,7 +311,7 @@ An atom.
311
311
312#### Source
312#### Source
313
313
314−```hoon
314+```reference
315 ++ fil
315 ++ fil
316 |= [a=bloq b=@u c=@]
316 |= [a=bloq b=@u c=@]
317 =+ n=0
317 =+ n=0
@@ -351,7 +351,7 @@ Produces an atom by left-shifting `c` by `b` blocks of size `a`.
351
351
352#### Accepts
352#### Accepts
353
353
354−`a` is a block size (see [`++bloq`](@/docs/hoon/library/1c.md)).
354+`a` is a block size (see [`++bloq`](@/docs/reference/library/1c.md)).
355
355
356`b` is an atom.
356`b` is an atom.
357
357
@@ -363,7 +363,7 @@ An atom.
363
363
364#### Source
364#### Source
365
365
366−```hoon
366+```reference
367 ++ lsh
367 ++ lsh
368 ~/ %lsh
368 ~/ %lsh
369 |= [a=bloq b=@u c=@]
369 |= [a=bloq b=@u c=@]
@@ -402,13 +402,13 @@ Computes the number of blocks of size `a` in `b`, producing an atom.
402
402
403#### Accepts
403#### Accepts
404
404
405−`a` is a block size (see [`++bloq`](@/docs/hoon/library/1c.md)).
405+`a` is a block size (see [`++bloq`](@/docs/reference/library/1c.md)).
406
406
407`b` is an atom.
407`b` is an atom.
408
408
409#### Source
409#### Source
410
410
411−```hoon
411+```reference
412 ++ met
412 ++ met
413 ~/ %met
413 ~/ %met
414 |= [a=bloq b=@]
414 |= [a=bloq b=@]
@@ -448,7 +448,7 @@ Concatenates a list of atoms `b` using block size `a`, producing an atom.
448
448
449#### Accepts
449#### Accepts
450
450
451−`a` is a block size (see [`++bloq`](@/docs/hoon/library/1c.md)).
451+`a` is a block size (see [`++bloq`](@/docs/reference/library/1c.md)).
452
452
453`b` is a `list` of atoms.
453`b` is a `list` of atoms.
454
454
@@ -458,7 +458,7 @@ An atom.
458
458
459#### Source
459#### Source
460
460
461−```hoon
461+```reference
462 ++ rap
462 ++ rap
463 ~/ %rap
463 ~/ %rap
464 |= [a=bloq b=(list @)]
464 |= [a=bloq b=(list @)]
@@ -509,7 +509,7 @@ Produces an atom by assembling a list of atoms `b` using block size `a`.
509
509
510#### Accepts
510#### Accepts
511
511
512−`a` is a block size (see [`++bloq`](@/docs/hoon/library/1c.md)).
512+`a` is a block size (see [`++bloq`](@/docs/reference/library/1c.md)).
513
513
514`b` is a list of atoms.
514`b` is a list of atoms.
515
515
@@ -519,7 +519,7 @@ An atom.
519
519
520#### Source
520#### Source
521
521
522−```hoon
522+```reference
523 ++ rep
523 ++ rep
524 ~/ %rep
524 ~/ %rep
525 |= [a=bloq b=(list @)]
525 |= [a=bloq b=(list @)]
@@ -574,7 +574,7 @@ Produces a list of atoms from the bits of `b` using block size `a`.
574
574
575#### Accepts
575#### Accepts
576
576
577−`a` is a block size (see [`++bloq`](@/docs/hoon/library/1c.md)).
577+`a` is a block size (see [`++bloq`](@/docs/reference/library/1c.md)).
578
578
579`b` is an atom.
579`b` is an atom.
580
580
@@ -584,7 +584,7 @@ A list of atoms.
584
584
585#### Source
585#### Source
586
586
587−```hoon
587+```reference
588 ++ rip
588 ++ rip
589 ~/ %rip
589 ~/ %rip
590 |= [a=bloq b=@]
590 |= [a=bloq b=@]
@@ -634,7 +634,7 @@ Right-shifts `c` by `b` blocks of size `a`, producing an atom.
634
634
635#### Accepts
635#### Accepts
636
636
637−`a` is a block size (see [`++bloq`](@/docs/hoon/library/1c.md)).
637+`a` is a block size (see [`++bloq`](@/docs/reference/library/1c.md)).
638
638
639`b` is an atom.
639`b` is an atom.
640
640
@@ -646,7 +646,7 @@ An atom.
646
646
647#### Source
647#### Source
648
648
649−```hoon
649+```reference
650 ++ rsh
650 ++ rsh
651 ~/ %rsh
651 ~/ %rsh
652 |= [a=bloq b=@u c=@]
652 |= [a=bloq b=@u c=@]
@@ -702,7 +702,7 @@ reversing the block order of `b` using block size `a`.
702
702
703#### Accepts
703#### Accepts
704
704
705−`a` is a block size (see [`++bloq`](@/docs/hoon/library/1c.md)).
705+`a` is a block size (see [`++bloq`](@/docs/reference/library/1c.md)).
706
706
707`b` is an atom.
707`b` is an atom.
708
708
@@ -712,7 +712,7 @@ An atom
712
712
713#### Source
713#### Source
714
714
715−```hoon
715+```reference
716 ++ swp |=([a=bloq b=@] (rep a (flop (rip a b))))
716 ++ swp |=([a=bloq b=@] (rep a (flop (rip a b))))
717```
717```
718
718
@@ -753,7 +753,7 @@ An atom.
753
753
754#### Source
754#### Source
755
755
756−```hoon
756+```reference
757 ++ xeb
757 ++ xeb
758 ~/ %xeb
758 ~/ %xeb
759 |= a=@
759 |= a=@
@@ -797,7 +797,7 @@ Core that contains arms for `bloq` and modular integer operations.
797
797
798#### Source
798#### Source
799
799
800−```hoon
800+```reference
801 |_ a=bloq
801 |_ a=bloq
802```
802```
803
803
@@ -821,7 +821,7 @@ A `@s`
821
821
822#### Source
822#### Source
823
823
824−```hoon
824+```reference
825 ++ dif |=([b=@ c=@] (sit (sub (add out (sit b)) (sit c))))
825 ++ dif |=([b=@ c=@] (sit (sub (add out (sit b)) (sit c))))
826```
826```
827
827
@@ -862,7 +862,7 @@ Inverts the order of the modular field.
862
862
863#### Accepts
863#### Accepts
864
864
865−`b` is a `bloq`. (see [`++bloq`](@/docs/hoon/library/1c.md))
865+`b` is a `bloq`. (see [`++bloq`](@/docs/reference/library/1c.md))
866
866
867#### Produces
867#### Produces
868
868
@@ -870,7 +870,7 @@ An atom.
870
870
871#### Source
871#### Source
872
872
873−```hoon
873+```reference
874 ++ inv |=(b=@ (sub (dec out) (sit b)))
874 ++ inv |=(b=@ (sub (dec out) (sit b)))
875```
875```
876
876
@@ -905,7 +905,7 @@ Reverses bytes within a block.
905
905
906#### Accepts
906#### Accepts
907
907
908−`b` is a `bloq`. (see [`++bloq`](@/docs/hoon/library/1c.md))
908+`b` is a `bloq`. (see [`++bloq`](@/docs/reference/library/1c.md))
909
909
910#### Produces
910#### Produces
911
911
@@ -913,7 +913,7 @@ An atom.
913
913
914#### Source
914#### Source
915
915
916−```hoon
916+```reference
917 ++ net |= b=@ ^- @
917 ++ net |= b=@ ^- @
918 => .(b (sit b))
918 => .(b (sit b))
919 ?: (lte a 3)
919 ?: (lte a 3)
@@ -1002,7 +1002,7 @@ An atom.
1002
1002
1003#### Source
1003#### Source
1004
1004
1005−```hoon
1005+```reference
1006 ++ out (bex (bex a))
1006 ++ out (bex (bex a))
1007```
1007```
1008
1008
@@ -1057,7 +1057,7 @@ An atom.
1057
1057
1058#### Source
1058#### Source
1059
1059
1060−```hoon
1060+```reference
1061 ++ rol |= [b=bloq c=@ d=@] ^- @
1061 ++ rol |= [b=bloq c=@ d=@] ^- @
1062 =+ e=(sit d)
1062 =+ e=(sit d)
1063 =+ f=(bex (sub a b))
1063 =+ f=(bex (sub a b))
@@ -1107,7 +1107,7 @@ An atom.
1107
1107
1108#### Source
1108#### Source
1109
1109
1110−```hoon
1110+```reference
1111 ++ ror |= [b=bloq c=@ d=@] ^- @
1111 ++ ror |= [b=bloq c=@ d=@] ^- @
1112 =+ e=(sit d)
1112 =+ e=(sit d)
1113 =+ f=(bex (sub a b))
1113 =+ f=(bex (sub a b))
@@ -1156,7 +1156,7 @@ An atom.
1156
1156
1157#### Source
1157#### Source
1158
1158
1159−```hoon
1159+```reference
1160 ++ sit |=(b=@ (end a 1 b))
1160 ++ sit |=(b=@ (end a 1 b))
1161```
1161```
1162
1162
@@ -1219,7 +1219,7 @@ An atom.
1219
1219
1220#### Source
1220#### Source
1221
1221
1222−```hoon
1222+```reference
1223 ++ sum |=([b=@ c=@] (sit (add b c)))
1223 ++ sum |=([b=@ c=@] (sit (add b c)))
1224```
1224```
1225
1225
reference/library/2d.md+6−6
@@ -22,7 +22,7 @@ An atom.
22
22
23#### Source
23#### Source
24
24
25−```hoon
25+```reference
26 ++ con
26 ++ con
27 ~/ %con
27 ~/ %con
28 |= [a=@ b=@]
28 |= [a=@ b=@]
@@ -117,7 +117,7 @@ An atom.
117
117
118#### Source
118#### Source
119
119
120−```hoon
120+```reference
121 ++ dis
121 ++ dis
122 ~/ %dis
122 ~/ %dis
123 |= [a=@ b=@]
123 |= [a=@ b=@]
@@ -205,7 +205,7 @@ An atom.
205
205
206#### Source
206#### Source
207
207
208−```hoon
208+```reference
209 ++ mix
209 ++ mix
210 ~/ %mix
210 ~/ %mix
211 |= [a=@ b=@]
211 |= [a=@ b=@]
@@ -281,7 +281,7 @@ of `c`.
281
281
282#### Accepts
282#### Accepts
283
283
284−`a` is a block size (see [`bloq`](@/docs/hoon/library/1c.md)).
284+`a` is a block size (see [`bloq`](@/docs/reference/library/1c.md)).
285
285
286`b` is an atom.
286`b` is an atom.
287
287
@@ -293,7 +293,7 @@ An atom.
293
293
294#### Source
294#### Source
295
295
296−```hoon
296+```reference
297 ++ not |= [a=bloq b=@ c=@]
297 ++ not |= [a=bloq b=@ c=@]
298 (mix c (dec (bex (mul b (bex a)))))
298 (mix c (dec (bex (mul b (bex a)))))
299```
299```
@@ -327,7 +327,7 @@ number's `0`s into `1`s, and vice versa.
327
327
328In Hoon, we ask for a little more information to use `not`, because binary
328In Hoon, we ask for a little more information to use `not`, because binary
329numbers have a number of implicit leading zeroes differently depending on on
329numbers have a number of implicit leading zeroes differently depending on on
330−their [block size](@/docs/hoon/library/1c.md). Decimal `7`, for example, is `0b111` in binary, and
330+their [block size](@/docs/reference/library/1c.md). Decimal `7`, for example, is `0b111` in binary, and
331has one implicit zero in the context of a block of size `2`, which has a
331has one implicit zero in the context of a block of size `2`, which has a
332bitwidth of 4. Let's try `not` on `7` with a single block of size `2`.
332bitwidth of 4. Let's try `not` on `7` with a single block of size `2`.
333
333
reference/library/2e.md+6−6
@@ -9,7 +9,7 @@ aliases = ["/docs/reference/library/2e"]
9FNV scrambler
9FNV scrambler
10
10
11Hashes an atom with the 32-bit FNV non-cryptographic hash algorithm. Multiplies
11Hashes an atom with the 32-bit FNV non-cryptographic hash algorithm. Multiplies
12−`a` by the prime number 16,777,619 and then takes the [block](@/docs/hoon/library/2c.md) of size
12+`a` by the prime number 16,777,619 and then takes the [block](@/docs/reference/library/2c.md) of size
135 off the product's end, producing an atom.
135 off the product's end, producing an atom.
14
14
15#### Accepts
15#### Accepts
@@ -22,7 +22,7 @@ An atom.
22
22
23#### Source
23#### Source
24
24
25−```hoon
25+```reference
26 ++ fnv |=(a=@ (end 5 1 (mul 16.777.619 a)))
26 ++ fnv |=(a=@ (end 5 1 (mul 16.777.619 a)))
27```
27```
28
28
@@ -58,7 +58,7 @@ An atom.
58
58
59#### Source
59#### Source
60
60
61−```hoon
61+```reference
62 ++ mug
62 ++ mug
63 ~/ %mug
63 ~/ %mug
64 |= a=*
64 |= a=*
@@ -109,7 +109,7 @@ Standard MurmurHash3
109Implementation of the 32-bit
109Implementation of the 32-bit
110[MurmurHash3](https://en.wikipedia.org/wiki/MurmurHash#Algorithm)
110[MurmurHash3](https://en.wikipedia.org/wiki/MurmurHash#Algorithm)
111non-cryptographic hash algorithm. Takes `a` as the seed, `b` as the key length
111non-cryptographic hash algorithm. Takes `a` as the seed, `b` as the key length
112−in [blocks](@/docs/hoon/library/2c.md) of size 3, and `c` as the key, producing an atom.
112+in [blocks](@/docs/reference/library/2c.md) of size 3, and `c` as the key, producing an atom.
113
113
114#### Accepts
114#### Accepts
115
115
@@ -125,7 +125,7 @@ An atom.
125
125
126#### Source
126#### Source
127
127
128−```hoon
128+```reference
129 ++ muk
129 ++ muk
130 ~% %muk ..muk ~
130 ~% %muk ..muk ~
131 =+ ~(. fe 5)
131 =+ ~(. fe 5)
@@ -236,7 +236,7 @@ An atom.
236
236
237#### Source
237#### Source
238
238
239−```hoon
239+```reference
240 ++ mum
240 ++ mum
241 ~/ %mum
241 ~/ %mum
242 |= a=*
242 |= a=*
reference/library/2f.md+10−10
@@ -22,7 +22,7 @@ A flag.
22
22
23#### Source
23#### Source
24
24
25−```hoon
25+```reference
26 ++ aor
26 ++ aor
27 ~/ %aor
27 ~/ %aor
28 |= [a=* b=*]
28 |= [a=* b=*]
@@ -92,7 +92,7 @@ A flag.
92
92
93#### Source
93#### Source
94
94
95−```hoon
95+```reference
96 ++ dor
96 ++ dor
97 ~/ %dor
97 ~/ %dor
98 |= [a=* b=*]
98 |= [a=* b=*]
@@ -131,7 +131,7 @@ A flag.
131
131
132#### Discussion
132#### Discussion
133
133
134−If `a` and `b` are both atoms, `dor` is equivalent to [`lte`](@/docs/hoon/library/1a.md). If they're
134+If `a` and `b` are both atoms, `dor` is equivalent to [`lte`](@/docs/reference/library/1a.md). If they're
135cells, `dor` recurses on the heads, and then if the heads are the same it checks
135cells, `dor` recurses on the heads, and then if the heads are the same it checks
136the tails.
136the tails.
137
137
@@ -148,7 +148,7 @@ Computes whether of `(mug a)` and `(mug b)` are in ascending numeric order,
148producing a flag. If the `mug` hashes are equal, `a` and `b` are compared by
148producing a flag. If the `mug` hashes are equal, `a` and `b` are compared by
149`dor` instead.
149`dor` instead.
150
150
151−[`mug`](@/docs/hoon/library/2e.md) is the the 31-bit nonzero FNV-1a hash algorithm.
151+[`mug`](@/docs/reference/library/2e.md) is the the 31-bit nonzero FNV-1a hash algorithm.
152
152
153#### Accepts
153#### Accepts
154
154
@@ -162,7 +162,7 @@ A flag.
162
162
163#### Source
163#### Source
164
164
165−```hoon
165+```reference
166 ++ gor
166 ++ gor
167 ~/ %gor
167 ~/ %gor
168 |= [a=* b=*]
168 |= [a=* b=*]
@@ -243,7 +243,7 @@ A flag.
243
243
244#### Source
244#### Source
245
245
246−```hoon
246+```reference
247 ++ hor
247 ++ hor
248 ~/ %hor
248 ~/ %hor
249 |= [a=* b=*]
249 |= [a=* b=*]
@@ -297,7 +297,7 @@ A flag.
297#### Discussion
297#### Discussion
298
298
299Sets (+set, +in) use `hor` for their horizontal order and `vor` for their
299Sets (+set, +in) use `hor` for their horizontal order and `vor` for their
300−vertical order. See [`apt:in`](@/docs/hoon/library/2h.md) to see how a set verifies its correctness.
300+vertical order. See [`apt:in`](@/docs/reference/library/2h.md) to see how a set verifies its correctness.
301`vor` is used to verify.
301`vor` is used to verify.
302
302
303---
303---
@@ -320,7 +320,7 @@ A flag.
320
320
321#### Source
321#### Source
322
322
323−```hoon
323+```reference
324 ++ lor
324 ++ lor
325 ~/ %lor
325 ~/ %lor
326 |= [a=* b=*]
326 |= [a=* b=*]
@@ -378,7 +378,7 @@ Computes whether the double-hashes `(mug (mug a))` and `(mug (mug b))` are in
378ascending numeric order, producing a flag. If the double-`mug` hashes are
378ascending numeric order, producing a flag. If the double-`mug` hashes are
379equal, `a` and `b` are compared by `dor` instead.
379equal, `a` and `b` are compared by `dor` instead.
380
380
381−[`mug`](@/docs/hoon/library/2e.md) is the the 31-bit nonzero FNV-1a hash algorithm.
381+[`mug`](@/docs/reference/library/2e.md) is the the 31-bit nonzero FNV-1a hash algorithm.
382
382
383
383
384#### Accepts
384#### Accepts
@@ -393,7 +393,7 @@ A flag.
393
393
394#### Source
394#### Source
395
395
396−```hoon
396+```reference
397 ++ vor
397 ++ vor
398 ~/ %vor
398 ~/ %vor
399 |= [a=* b=*]
399 |= [a=* b=*]
reference/library/2h.md+19−19
@@ -17,7 +17,7 @@ A `set`.
17
17
18#### Source
18#### Source
19
19
20−```hoon
20+```reference
21 ++ in
21 ++ in
22 ~/ %in
22 ~/ %in
23 |_ a=(set)
23 |_ a=(set)
@@ -49,7 +49,7 @@ A flag.
49
49
50#### Source
50#### Source
51
51
52−```hoon
52+```reference
53 +- all
53 +- all
54 ~/ %all
54 ~/ %all
55 |* b=$-(* ?)
55 |* b=$-(* ?)
@@ -91,7 +91,7 @@ A flag.
91
91
92#### Source
92#### Source
93
93
94−```hoon
94+```reference
95 +- any
95 +- any
96 ~/ %any
96 ~/ %any
97 |* b=$-(* ?)
97 |* b=$-(* ?)
@@ -131,7 +131,7 @@ A flag.
131
131
132#### Source
132#### Source
133
133
134−```hoon
134+```reference
135 +- apt
135 +- apt
136 =| [l=(unit) r=(unit)]
136 =| [l=(unit) r=(unit)]
137 |- ^- ?
137 |- ^- ?
@@ -164,7 +164,7 @@ A flag.
164
164
165#### Discussion
165#### Discussion
166
166
167−See section [`2f`](@/docs/hoon/library/2f.md) for more information on noun ordering.
167+See section [`2f`](@/docs/reference/library/2f.md) for more information on noun ordering.
168
168
169---
169---
170### `+-bif:in`
170### `+-bif:in`
@@ -185,7 +185,7 @@ A cell of two sets.
185
185
186#### Source
186#### Source
187
187
188−```hoon
188+```reference
189 +- bif
189 +- bif
190 ~/ %bif
190 ~/ %bif
191 |* b=*
191 |* b=*
@@ -238,7 +238,7 @@ A set.
238
238
239#### Source
239#### Source
240
240
241−```hoon
241+```reference
242 +- del
242 +- del
243 ~/ %del
243 ~/ %del
244 |* b=*
244 |* b=*
@@ -293,7 +293,7 @@ A set.
293
293
294#### Source
294#### Source
295
295
296−```hoon
296+```reference
297 +- dif
297 +- dif
298 ~/ %dif
298 ~/ %dif
299 |* b=_a
299 |* b=_a
@@ -348,7 +348,7 @@ The `unit` of an atom.
348
348
349#### Source
349#### Source
350
350
351−```hoon
351+```reference
352 +- dig
352 +- dig
353 |= b=*
353 |= b=*
354 =+ c=1
354 =+ c=1
@@ -383,7 +383,7 @@ The `unit` of an atom.
383
383
384#### Discussion
384#### Discussion
385
385
386−For more on the tree addressing system, see section [1b](@/docs/hoon/library/1b.md).
386+For more on the tree addressing system, see section [1b](@/docs/reference/library/1b.md).
387
387
388---
388---
389### `+-gas:in`
389### `+-gas:in`
@@ -404,7 +404,7 @@ A `set`.
404
404
405#### Source
405#### Source
406
406
407−```hoon
407+```reference
408 +- gas
408 +- gas
409 ~/ %gas
409 ~/ %gas
410 |= b=(list _?>(?=(^ a) n.a))
410 |= b=(list _?>(?=(^ a) n.a))
@@ -448,7 +448,7 @@ A flag.
448
448
449#### Source
449#### Source
450
450
451−```hoon
451+```reference
452 +- has
452 +- has
453 ~/ %has
453 ~/ %has
454 |* b=*
454 |* b=*
@@ -493,7 +493,7 @@ A `set`.
493
493
494#### Source
494#### Source
495
495
496−```hoon
496+```reference
497 +- int
497 +- int
498 ~/ %int
498 ~/ %int
499 |* b=_a
499 |* b=_a
@@ -544,7 +544,7 @@ A `set`.
544
544
545#### Source
545#### Source
546
546
547−```hoon
547+```reference
548 +- put
548 +- put
549 ~/ %put
549 ~/ %put
550 |* b=*
550 |* b=*
@@ -597,7 +597,7 @@ A noun.
597
597
598#### Source
598#### Source
599
599
600−```hoon
600+```reference
601 +- rep :: replace by product
601 +- rep :: replace by product
602 |* b=_|=([* *] +<+)
602 |* b=_|=([* *] +<+)
603 |-
603 |-
@@ -636,7 +636,7 @@ A set.
636
636
637#### Source
637#### Source
638
638
639−```hoon
639+```reference
640 +- run
640 +- run
641 ~/ %run
641 ~/ %run
642 |* b=gate
642 |* b=gate
@@ -675,7 +675,7 @@ A list.
675
675
676#### Source
676#### Source
677
677
678−```hoon
678+```reference
679 +- tap
679 +- tap
680 ~/ %tap
680 ~/ %tap
681 |= b=(list _?>(?=(^ a) n.a))
681 |= b=(list _?>(?=(^ a) n.a))
@@ -717,7 +717,7 @@ A set.
717
717
718#### Source
718#### Source
719
719
720−```hoon
720+```reference
721 +- uni
721 +- uni
722 ~/ %uni
722 ~/ %uni
723 |* b=_a
723 |* b=_a
@@ -775,7 +775,7 @@ An atom.
775
775
776#### Source
776#### Source
777
777
778−```hoon
778+```reference
779 +- wyt :: size of set
779 +- wyt :: size of set
780 |- ^- @
780 |- ^- @
781 ?~(a 0 +((add $(a l.a) $(a r.a))))
781 ?~(a 0 +((add $(a l.a) $(a r.a))))
reference/library/2i.md+25−25
@@ -17,7 +17,7 @@ contained arms inherit its sample map, `a`.
17
17
18#### Source
18#### Source
19
19
20−```hoon
20+```reference
21 ++ by
21 ++ by
22 ~/ %by
22 ~/ %by
23 =| a=(tree (pair))
23 =| a=(tree (pair))
@@ -61,7 +61,7 @@ A flag.
61
61
62#### Source
62#### Source
63
63
64−```hoon
64+```reference
65 +- all
65 +- all
66 ~/ %all
66 ~/ %all
67 |* b=$-(* ?)
67 |* b=$-(* ?)
@@ -106,7 +106,7 @@ A flag.
106
106
107#### Source
107#### Source
108
108
109−```hoon
109+```reference
110 +- any
110 +- any
111 ~/ %any
111 ~/ %any
112 |* b=$-(* ?)
112 |* b=$-(* ?)
@@ -146,7 +146,7 @@ A flag.
146
146
147#### Source
147#### Source
148
148
149−```hoon
149+```reference
150 +- apt
150 +- apt
151 =| [l=(unit) r=(unit)]
151 =| [l=(unit) r=(unit)]
152 |- ^- ?
152 |- ^- ?
@@ -176,7 +176,7 @@ A flag.
176
176
177#### Discussion
177#### Discussion
178
178
179−See section [`2f`](@/docs/hoon/library/2f.md) for more information on noun ordering.
179+See section [`2f`](@/docs/reference/library/2f.md) for more information on noun ordering.
180
180
181### `+-bif:by`
181### `+-bif:by`
182
182
@@ -198,7 +198,7 @@ A cell of two maps.
198
198
199#### Source
199#### Source
200
200
201−```hoon
201+```reference
202 +- bif
202 +- bif
203 ~/ %bif
203 ~/ %bif
204 |* [b=* c=*]
204 |* [b=* c=*]
@@ -245,7 +245,7 @@ A map.
245
245
246#### Source
246#### Source
247
247
248−```hoon
248+```reference
249 +- def
249 +- def
250 |* b=_a
250 |* b=_a
251 ^- (map _p:node (pair (unit _q:node) (unit _q:node)))
251 ^- (map _p:node (pair (unit _q:node) (unit _q:node)))
@@ -272,7 +272,7 @@ A cell of maps.
272
272
273#### Source
273#### Source
274
274
275−```hoon
275+```reference
276 +- dep
276 +- dep
277 |* b=_a
277 |* b=_a
278 ^+ [p=a q=a]
278 ^+ [p=a q=a]
@@ -310,7 +310,7 @@ A map.
310
310
311#### Source
311#### Source
312
312
313−```hoon
313+```reference
314 +- del
314 +- del
315 ~/ %del
315 ~/ %del
316 |* b=*
316 |* b=*
@@ -356,7 +356,7 @@ A unit.
356
356
357#### Source
357#### Source
358
358
359−```hoon
359+```reference
360 +- dig
360 +- dig
361 |= b=*
361 |= b=*
362 =+ c=1
362 =+ c=1
@@ -395,7 +395,7 @@ A map.
395
395
396#### Source
396#### Source
397
397
398−```hoon
398+```reference
399 +- gas
399 +- gas
400 ~/ %gas
400 ~/ %gas
401 |* b=(list [p=* q=*])
401 |* b=(list [p=* q=*])
@@ -435,7 +435,7 @@ A unit.
435
435
436#### Source
436#### Source
437
437
438−```hoon
438+```reference
439 +- get
439 +- get
440 ~/ %get
440 ~/ %get
441 |= b=*
441 |= b=*
@@ -483,7 +483,7 @@ A noun.
483
483
484#### Source
484#### Source
485
485
486−```hoon
486+```reference
487 +- got
487 +- got
488 |* b=*
488 |* b=*
489 (need (get b))
489 (need (get b))
@@ -522,7 +522,7 @@ A flag.
522
522
523#### Source
523#### Source
524
524
525−```hoon
525+```reference
526 +- has
526 +- has
527 ~/ %has
527 ~/ %has
528 |* b=*
528 |* b=*
@@ -561,7 +561,7 @@ A map.
561
561
562#### Source
562#### Source
563
563
564−```hoon
564+```reference
565 +- int
565 +- int
566 ~/ %int
566 ~/ %int
567 |* b=_a
567 |* b=_a
@@ -633,7 +633,7 @@ A map.
633
633
634#### Assert and Add
634#### Assert and Add
635
635
636−```hoon
636+```reference
637 +- mar
637 +- mar
638 |* [b=_?>(?=(^ a) p.n.a) c=(unit ,_?>(?=(^ a) q.n.a))]
638 |* [b=_?>(?=(^ a) p.n.a) c=(unit ,_?>(?=(^ a) q.n.a))]
639 ?~ c
639 ?~ c
@@ -676,7 +676,7 @@ A map.
676
676
677#### Source
677#### Source
678
678
679−```hoon
679+```reference
680 +- put
680 +- put
681 ~/ %put
681 ~/ %put
682 |* [b=* c=*]
682 |* [b=* c=*]
@@ -737,7 +737,7 @@ A noun.
737
737
738#### Source
738#### Source
739
739
740−```hoon
740+```reference
741 +- rep
741 +- rep
742 |* b=_|=([* *] +<+)
742 |* b=_|=([* *] +<+)
743 |-
743 |-
@@ -772,7 +772,7 @@ A cell of nouns.
772
772
773#### Source
773#### Source
774
774
775−```hoon
775+```reference
776 +- rib
776 +- rib
777 |* [b=* c=gate]
777 |* [b=* c=gate]
778 |- ^+ [b a]
778 |- ^+ [b a]
@@ -812,7 +812,7 @@ A map.
812
812
813#### Source
813#### Source
814
814
815−```hoon
815+```reference
816 +- run
816 +- run
817 |* b=gate
817 |* b=gate
818 |-
818 |-
@@ -851,7 +851,7 @@ A map.
851
851
852#### Source
852#### Source
853
853
854−```hoon
854+```reference
855 +- rut
855 +- rut
856 |* b=gate
856 |* b=gate
857 |-
857 |-
@@ -885,7 +885,7 @@ A list.
885
885
886#### Source
886#### Source
887
887
888−```hoon
888+```reference
889 +- tap
889 +- tap
890 =< $
890 =< $
891 ~/ %tap
891 ~/ %tap
@@ -930,7 +930,7 @@ A map.
930
930
931#### Source
931#### Source
932
932
933−```hoon
933+```reference
934 +- uni
934 +- uni
935 ~/ %uni
935 ~/ %uni
936 |* b=_a
936 |* b=_a
@@ -991,7 +991,7 @@ A noun.
991
991
992#### Source
992#### Source
993
993
994−```hoon
994+```reference
995 +- urn
995 +- urn
996 |* b=$-({* *} *)
996 |* b=$-({* *} *)
997 |-
997 |-
@@ -1033,7 +1033,7 @@ An atom.
1033
1033
1034#### Source
1034#### Source
1035
1035
1036−```hoon
1036+```reference
1037 +- wyt
1037 +- wyt
1038 |- ^- @
1038 |- ^- @
1039 ?~(a 0 +((add $(a l.a) $(a r.a))))
1039 ?~(a 0 +((add $(a l.a) $(a r.a))))
reference/library/2o.md+10−10
@@ -10,7 +10,7 @@ Mold generator. A `jar` is a `map` of `list`.
10
10
11#### Source
11#### Source
12
12
13−```hoon
13+```reference
14 ++ jar |*([a=mold b=mold] (map a (list b)))
14 ++ jar |*([a=mold b=mold] (map a (list b)))
15```
15```
16
16
@@ -38,7 +38,7 @@ Mold generator. A `jar` is a `map` of `list`.
38
38
39#### Discussion
39#### Discussion
40
40
41−See also: [`ja`](@/docs/hoon/library/2j.md), [`by`](@/docs/hoon/library/2i.md), [`map`](@/docs/hoon/library/2i.md), [`list`](@/docs/hoon/library/2b.md)
41+See also: [`ja`](@/docs/reference/library/2j.md), [`by`](@/docs/reference/library/2i.md), [`map`](@/docs/reference/library/2i.md), [`list`](@/docs/reference/library/2b.md)
42
42
43---
43---
44### `++jug`
44### `++jug`
@@ -47,7 +47,7 @@ Mold generator. A `jug` is a `map` of `set`.
47
47
48#### Source
48#### Source
49
49
50−```hoon
50+```reference
51 ++ jug |*([a=mold b=mold] (map a (set b)))
51 ++ jug |*([a=mold b=mold] (map a (set b)))
52```
52```
53
53
@@ -78,7 +78,7 @@ Mold generator. A `jug` is a `map` of `set`.
78
78
79#### Discussion
79#### Discussion
80
80
81−See also: [`ja`](@/docs/hoon/library/2j.md), [`by`](@/docs/hoon/library/2i.md), [`set`](@/docs/hoon/library/2h.md)
81+See also: [`ja`](@/docs/reference/library/2j.md), [`by`](@/docs/reference/library/2i.md), [`set`](@/docs/reference/library/2h.md)
82
82
83---
83---
84### `++map`
84### `++map`
@@ -91,7 +91,7 @@ key-value pairs.
91
91
92#### Source
92#### Source
93
93
94−```hoon
94+```reference
95 ++ map |* [a=mold b=mold]
95 ++ map |* [a=mold b=mold]
96 %+ cork (tree (pair a b))
96 %+ cork (tree (pair a b))
97 |= c=(tree (pair a b)) ^+ c
97 |= c=(tree (pair a b)) ^+ c
@@ -111,7 +111,7 @@ key-value pairs.
111
111
112#### Discussion
112#### Discussion
113
113
114−See also: [`by`](@/docs/hoon/library/2i.md)
114+See also: [`by`](@/docs/reference/library/2i.md)
115
115
116---
116---
117### `++qeu`
117### `++qeu`
@@ -123,7 +123,7 @@ items.
123
123
124#### Source
124#### Source
125
125
126−```hoon
126+```reference
127 ++ qeu |*(a=mold (tree a))
127 ++ qeu |*(a=mold (tree a))
128```
128```
129
129
@@ -148,7 +148,7 @@ items.
148
148
149#### Discussion
149#### Discussion
150
150
151−See also: [`qeu`](@/docs/hoon/library/2k.md)
151+See also: [`qeu`](@/docs/reference/library/2k.md)
152
152
153---
153---
154### `++set`
154### `++set`
@@ -160,7 +160,7 @@ items.
160
160
161#### Source
161#### Source
162
162
163−```hoon
163+```reference
164 ++ set |* a=mold
164 ++ set |* a=mold
165 %+ cork (tree a)
165 %+ cork (tree a)
166 |= b=(tree a) ^+ b
166 |= b=(tree a) ^+ b
@@ -182,6 +182,6 @@ items.
182
182
183#### Discussion
183#### Discussion
184
184
185−See also: [`in`](@/docs/hoon/library/2h.md)
185+See also: [`in`](@/docs/reference/library/2h.md)
186
186
187---
187---
reference/library/2q.md+13−13
@@ -14,7 +14,7 @@ consume `tape`s, which are lists of `char`.
14
14
15#### Source
15#### Source
16
16
17−```hoon
17+```reference
18 ++ char @tD
18 ++ char @tD
19```
19```
20
20
@@ -38,7 +38,7 @@ atom of UTF-8 text.
38
38
39#### Source
39#### Source
40
40
41−```hoon
41+```reference
42 ++ cord @t
42 ++ cord @t
43```
43```
44
44
@@ -66,7 +66,7 @@ atom of UTF-8 text.
66Aura `@t` designates a Unicode atom, little-endian: the first character
66Aura `@t` designates a Unicode atom, little-endian: the first character
67in the text is the least-significant byte.
67in the text is the least-significant byte.
68
68
69−[`trip`](@/docs/hoon/library/4b.md) converts from `cord` to `tape`, and [`crip`](@/docs/hoon/library/4b.md) converts
69+[`trip`](@/docs/reference/library/4b.md) converts from `cord` to `tape`, and [`crip`](@/docs/reference/library/4b.md) converts
70from `tape` to `cord`.
70from `tape` to `cord`.
71
71
72
72
@@ -81,7 +81,7 @@ which is a day atom and a time.
81
81
82#### Source
82#### Source
83
83
84−```hoon
84+```reference
85 ++ date [[a=? y=@ud] m=@ud t=tarp]
85 ++ date [[a=? y=@ud] m=@ud t=tarp]
86```
86```
87
87
@@ -101,7 +101,7 @@ which is a day atom and a time.
101
101
102#### Discussion
102#### Discussion
103
103
104−See also: [`year`](@/docs/hoon/library/3c.md), [`yore`](@/docs/hoon/library/3c.md)
104+See also: [`year`](@/docs/reference/library/3c.md), [`yore`](@/docs/reference/library/3c.md)
105
105
106---
106---
107### `++knot`
107### `++knot`
@@ -112,7 +112,7 @@ An atom type that only permits ASCII characters.
112
112
113#### Source
113#### Source
114
114
115−```hoon
115+```reference
116
116
117 ++ knot @ta
117 ++ knot @ta
118```
118```
@@ -137,7 +137,7 @@ traces.
137
137
138#### Source
138#### Source
139
139
140−```hoon
140+```reference
141 ++ tang (list tank)
141 ++ tang (list tank)
142```
142```
143
143
@@ -173,7 +173,7 @@ without back-steps at new lines.
173
173
174#### Source
174#### Source
175
175
176−```hoon
176+```reference
177 ++ tank $% [$leaf p=tape]
177 ++ tank $% [$leaf p=tape]
178 $: $palm
178 $: $palm
179 p=[p=tape q=tape r=tape s=tape]
179 p=[p=tape q=tape r=tape s=tape]
@@ -227,7 +227,7 @@ One of Hoon's two string types, the other being `++cord`. A tape is a list of
227
227
228#### Source
228#### Source
229
229
230−```hoon
230+```reference
231 ++ tape (list @tD)
231 ++ tape (list @tD)
232```
232```
233
233
@@ -260,7 +260,7 @@ for precision.
260
260
261#### Source
261#### Source
262
262
263−```hoon
263+```reference
264 ++ tarp [d=@ud h=@ud m=@ud s=@ud f=(list @ux)]
264 ++ tarp [d=@ud h=@ud m=@ud s=@ud f=(list @ux)]
265```
265```
266
266
@@ -295,7 +295,7 @@ special syntax, `$`.
295
295
296#### Source
296#### Source
297
297
298−```hoon
298+```reference
299 ++ term @tas
299 ++ term @tas
300```
300```
301
301
@@ -326,7 +326,7 @@ A list of `cord`s. A `wain` is used instead of a single `cord` with `\n`.
326
326
327#### Source
327#### Source
328
328
329−```hoon
329+```reference
330 ++ wain (list cord)
330 ++ wain (list cord)
331```
331```
332
332
@@ -349,7 +349,7 @@ A list of `tape`s. `wall` is used instead of a single `tape` with `\n`.
349
349
350#### Source
350#### Source
351
351
352−```hoon
352+```reference
353 ++ wall (list tape)
353 ++ wall (list tape)
354```
354```
355#### Examples
355#### Examples
reference/library/3d.md+17−17
@@ -21,7 +21,7 @@ An atom.
21
21
22#### Source
22#### Source
23
23
24−```hoon
24+```reference
25 ++ shad |=(ruz=@ (shax (shax ruz)))
25 ++ shad |=(ruz=@ (shax (shax ruz)))
26```
26```
27
27
@@ -38,7 +38,7 @@ An atom.
38
38
39Half SHA-256
39Half SHA-256
40
40
41−Produces a 128-bit atom by performing the [bitwise XOR](@/docs/hoon/library/2d.md) on the
41+Produces a 128-bit atom by performing the [bitwise XOR](@/docs/reference/library/2d.md) on the
42first and last halves of the 256-bit salted hash `shas`.
42first and last halves of the 256-bit salted hash `shas`.
43
43
44#### Accepts
44#### Accepts
@@ -49,7 +49,7 @@ first and last halves of the 256-bit salted hash `shas`.
49
49
50#### Source
50#### Source
51
51
52−```hoon
52+```reference
53 ++ shaf :: half sha-256
53 ++ shaf :: half sha-256
54 |= [sal=@ ruz=@]
54 |= [sal=@ ruz=@]
55 =+ haz=(shas sal ruz)
55 =+ haz=(shas sal ruz)
@@ -88,7 +88,7 @@ An atom.
88
88
89#### Source
89#### Source
90
90
91−```hoon
91+```reference
92 ++ shal
92 ++ shal
93 ~/ %shal
93 ~/ %shal
94 |= [len=@ ruz=@] ^- @
94 |= [len=@ ruz=@] ^- @
@@ -243,7 +243,7 @@ An atom.
243
243
244#### Source
244#### Source
245
245
246−```hoon
246+```reference
247 ++ sham
247 ++ sham
248 |= yux=* ^- @uvH ^- @
248 |= yux=* ^- @uvH ^- @
249 ?@ yux
249 ?@ yux
@@ -279,7 +279,7 @@ An atom.
279
279
280#### Source
280#### Source
281
281
282−```hoon
282+```reference
283 ++ shan
283 ++ shan
284 |= ruz=@
284 |= ruz=@
285 =+ [few==>(fe .(a 5)) wac=|=([a=@ b=@] (cut 5 [a 1] b))]
285 =+ [few==>(fe .(a 5)) wac=|=([a=@ b=@] (cut 5 [a 1] b))]
@@ -363,7 +363,7 @@ SHA-1 is a deprecated function; it is not considered secure.
363
363
364Salted hash
364Salted hash
365
365
366−Produces an atom by using SHA-256 plus a salt input. The [bitwise XOR](@/docs/hoon/library/2d.md)
366+Produces an atom by using SHA-256 plus a salt input. The [bitwise XOR](@/docs/reference/library/2d.md)
367is performed on `sal` and the product of `ruz` hashed with SHA-256. The product
367is performed on `sal` and the product of `ruz` hashed with SHA-256. The product
368of that logical operation is then itself hashed with SHA-256.
368of that logical operation is then itself hashed with SHA-256.
369
369
@@ -375,7 +375,7 @@ of that logical operation is then itself hashed with SHA-256.
375
375
376#### Source
376#### Source
377
377
378−```hoon
378+```reference
379 ++ shas
379 ++ shas
380 |= [sal=@ ruz=@]
380 |= [sal=@ ruz=@]
381 (shax (mix sal (shax ruz)))
381 (shax (mix sal (shax ruz)))
@@ -412,7 +412,7 @@ An atom.
412
412
413#### Source
413#### Source
414
414
415−```hoon
415+```reference
416 ++ shaw
416 ++ shaw
417 |= [sal=@ len=@ ruz=@]
417 |= [sal=@ len=@ ruz=@]
418 (~(raw og (shas sal (mix len ruz))) len)
418 (~(raw og (shas sal (mix len ruz))) len)
@@ -437,7 +437,7 @@ Produces an atom by hashing an atom `ruz` with SHA-256.
437
437
438#### Sources
438#### Sources
439
439
440−```hoon
440+```reference
441 ++ shax
441 ++ shax
442 ~/ %shax
442 ~/ %shax
443 |= ruz=@ ^- @
443 |= ruz=@ ^- @
@@ -469,7 +469,7 @@ the byte-length of the theoretical buffer represented by the atom.
469
469
470#### Source
470#### Source
471
471
472−```hoon
472+```reference
473 ++ shay
473 ++ shay
474 ~/ %shay
474 ~/ %shay
475 |= [len=@u ruz=@] ^- @
475 |= [len=@u ruz=@] ^- @
@@ -594,7 +594,7 @@ An atom.
594
594
595#### Source
595#### Source
596
596
597−```hoon
597+```reference
598 ++ shaz
598 ++ shaz
599 |= ruz=@ ^- @
599 |= ruz=@ ^- @
600 (shal [(met 3 ruz) ruz])
600 (shal [(met 3 ruz) ruz])
@@ -626,7 +626,7 @@ A core.
626
626
627#### Source
627#### Source
628
628
629−```hoon
629+```reference
630 ++ og
630 ++ og
631 ~/ %og
631 ~/ %og
632 |_ a=@
632 |_ a=@
@@ -663,7 +663,7 @@ An atom.
663
663
664#### Source
664#### Source
665
665
666−```hoon
666+```reference
667 ++ rad
667 ++ rad
668 |= b=@ ^- @
668 |= b=@ ^- @
669 =+ c=(raw (met 0 b))
669 =+ c=(raw (met 0 b))
@@ -705,7 +705,7 @@ A cell.
705
705
706#### Source
706#### Source
707
707
708−```hoon
708+```reference
709 ++ rads
709 ++ rads
710 |= b=@
710 |= b=@
711 =+ r=(rad b)
711 =+ r=(rad b)
@@ -748,7 +748,7 @@ An atom.
748
748
749#### Source
749#### Source
750
750
751−```hoon
751+```reference
752 ++ raw
752 ++ raw
753 ~/ %raw
753 ~/ %raw
754 |= b=@ ^- @
754 |= b=@ ^- @
@@ -791,7 +791,7 @@ parent core with `(raw b)`.
791
791
792#### Source
792#### Source
793
793
794−```hoon
794+```reference
795 ++ raws
795 ++ raws
796 |= b=@
796 |= b=@
797 =+ r=(raw b)
797 =+ r=(raw b)
reference/library/3f.md+20−20
@@ -13,7 +13,7 @@ Used in the `@p` phonetic base.
13
13
14#### Source
14#### Source
15
15
16−```hoon
16+```reference
17 ++ un
17 ++ un
18 |%
18 |%
19```
19```
@@ -37,7 +37,7 @@ An atom.
37
37
38#### Source
38#### Source
39
39
40−```hoon
40+```reference
41 ++ wren
41 ++ wren
42 |= pyn=@ ^- @
42 |= pyn=@ ^- @
43 =+ len=(met 3 pyn)
43 =+ len=(met 3 pyn)
@@ -89,7 +89,7 @@ An atom.
89
89
90#### Source
90#### Source
91
91
92−```hoon
92+```reference
93 ++ wred
93 ++ wred
94 |= cry=@ ^- @
94 |= cry=@ ^- @
95 =+ len=(met 3 cry)
95 =+ len=(met 3 cry)
@@ -142,7 +142,7 @@ An atom.
142
142
143#### Source
143#### Source
144
144
145−```hoon
145+```reference
146 ++ xafo |=([a=@ b=@] +((mod (add (dec b) a) 255)))
146 ++ xafo |=([a=@ b=@] +((mod (add (dec b) a) 255)))
147```
147```
148
148
@@ -179,7 +179,7 @@ An atom.
179
179
180#### Source
180#### Source
181
181
182−```hoon
182+```reference
183 ++ xaro |=([a=@ b=@] +((mod (add (dec b) (sub 255 (mod a 255))) 255)))
183 ++ xaro |=([a=@ b=@] +((mod (add (dec b) (sub 255 (mod a 255))) 255)))
184```
184```
185
185
@@ -214,7 +214,7 @@ An atom.
214
214
215#### Source
215#### Source
216
216
217−```hoon
217+```reference
218 ++ zaft
218 ++ zaft
219 |= a=@D
219 |= a=@D
220 =+ ^= b
220 =+ ^= b
@@ -266,7 +266,7 @@ An atom.
266
266
267#### Source
267#### Source
268
268
269−```hoon
269+```reference
270 ++ zart :: reverse 255-sbox
270 ++ zart :: reverse 255-sbox
271 |= a=@D
271 |= a=@D
272 =+ ^= b
272 =+ ^= b
@@ -316,7 +316,7 @@ An atom.
316
316
317#### Source
317#### Source
318
318
319−```hoon
319+```reference
320 ++ zyft :: forward 256-sbox
320 ++ zyft :: forward 256-sbox
321 |= a=@D
321 |= a=@D
322 =+ ^= b
322 =+ ^= b
@@ -369,7 +369,7 @@ An atom.
369
369
370#### Source
370#### Source
371
371
372−```hoon
372+```reference
373 ++ zyrt :: reverse 256-sbox
373 ++ zyrt :: reverse 256-sbox
374 |= a=@D
374 |= a=@D
375 =+ ^= b
375 =+ ^= b
@@ -408,7 +408,7 @@ An atom.
408
408
409Reversible scrambling, v2
409Reversible scrambling, v2
410
410
411−```hoon
411+```reference
412 ++ ob
412 ++ ob
413 |%
413 |%
414```
414```
@@ -435,7 +435,7 @@ An atom.
435
435
436#### Source
436#### Source
437
437
438−```hoon
438+```reference
439 ++ feen
439 ++ feen
440 |= pyn=@ ^- @
440 |= pyn=@ ^- @
441 ?: &((gte pyn 0x1.0000) (lte pyn 0xffff.ffff))
441 ?: &((gte pyn 0x1.0000) (lte pyn 0xffff.ffff))
@@ -485,7 +485,7 @@ An atom.
485
485
486#### Source
486#### Source
487
487
488−```hoon
488+```reference
489 ++ fend
489 ++ fend
490 |= cry=@ ^- @
490 |= cry=@ ^- @
491 ?: &((gte cry 0x1.0000) (lte cry 0xffff.ffff))
491 ?: &((gte cry 0x1.0000) (lte cry 0xffff.ffff))
@@ -538,7 +538,7 @@ An atom.
538
538
539#### Source
539#### Source
540
540
541−```hoon
541+```reference
542 ++ fice :: adapted from
542 ++ fice :: adapted from
543 |= nor=@ :: black and rogaway
543 |= nor=@ :: black and rogaway
544 ^- @ :: "ciphers with
544 ^- @ :: "ciphers with
@@ -581,7 +581,7 @@ An atom.
581
581
582#### Source
582#### Source
583
583
584−```hoon
584+```reference
585 ++ teil :: reverse ++fice
585 ++ teil :: reverse ++fice
586 |= vip=@
586 |= vip=@
587 ^- @
587 ^- @
@@ -610,7 +610,7 @@ An atom.
610
610
611Reverse Feistel-like cipher
611Reverse Feistel-like cipher
612
612
613−A single round of the Feistel-like cipher `fice`. AES ([`aesc`](@/docs/hoon/library/3f.md)) is
613+A single round of the Feistel-like cipher `fice`. AES ([`aesc`](@/docs/reference/library/3f.md)) is
614used as the round function. The inverse of `rund`.
614used as the round function. The inverse of `rund`.
615
615
616#### Accepts
616#### Accepts
@@ -627,7 +627,7 @@ A cell of two atoms.
627
627
628#### Source
628#### Source
629
629
630−```hoon
630+```reference
631 ++ rynd
631 ++ rynd
632 |= [n=@ l=@ r=@]
632 |= [n=@ l=@ r=@]
633 ^- [@ @]
633 ^- [@ @]
@@ -652,7 +652,7 @@ A cell of two atoms.
652
652
653Reverse single Feistel-like
653Reverse single Feistel-like
654
654
655−A single round of the Feistel-like reverse cipher `teil`. AES ([`aesc`](@/docs/hoon/library/3f.md))
655+A single round of the Feistel-like reverse cipher `teil`. AES ([`aesc`](@/docs/reference/library/3f.md))
656is used as the round function. The inverse of `rynd`.
656is used as the round function. The inverse of `rynd`.
657
657
658#### Accepts
658#### Accepts
@@ -669,7 +669,7 @@ A cell of two atoms.
669
669
670#### Source
670#### Source
671
671
672−```hoon
672+```reference
673 ++ rund
673 ++ rund
674 |= [n=@ l=@ r=@]
674 |= [n=@ l=@ r=@]
675 ^- [@ @]
675 ^- [@ @]
@@ -694,7 +694,7 @@ A cell of two atoms.
694
694
695Key list
695Key list
696
696
697−Produces a list of arbitrary hexademical keys for use with [`aesc`](@/docs/hoon/library/3f.md).
697+Produces a list of arbitrary hexademical keys for use with [`aesc`](@/docs/reference/library/3f.md).
698
698
699#### Produces
699#### Produces
700
700
@@ -702,7 +702,7 @@ A list of atoms of aura `@ux` (hexadecimal).
702
702
703#### Source
703#### Source
704
704
705−```hoon
705+```reference
706 ++ raku
706 ++ raku
707 ^- (list @ux)
707 ^- (list @ux)
708 :~ 0xb76d.5eed
708 :~ 0xb76d.5eed
reference/library/3g.md+17−17
@@ -14,7 +14,7 @@ and printed using `++so` and `++co` cores.
14
14
15#### Source
15#### Source
16
16
17−```hoon
17+```reference
18 ++ coin $% [$$ p=dime]
18 ++ coin $% [$$ p=dime]
19 [$blob p=*]
19 [$blob p=*]
20 [$many p=(list coin)]
20 [$many p=(list coin)]
@@ -52,14 +52,14 @@ and printed using `++so` and `++co` cores.
52
52
53Aura-atom pair
53Aura-atom pair
54
54
55−Used in `++coin`. Convenience methods [`++scot`](@/docs/hoon/library/4m.md) and
55+Used in `++coin`. Convenience methods [`++scot`](@/docs/reference/library/4m.md) and
56−[`++scow`](@/docs/hoon/library/4m.md) print dimes as `++cord` and `++tape`, respectively.
56+[`++scow`](@/docs/reference/library/4m.md) print dimes as `++cord` and `++tape`, respectively.
57−[`++slat`](@/docs/hoon/library/4m.md), [`++slav`](@/docs/hoon/library/4m.md), and [`++slaw`](@/docs/hoon/library/4m.md) are used
57+[`++slat`](@/docs/reference/library/4m.md), [`++slav`](@/docs/reference/library/4m.md), and [`++slaw`](@/docs/reference/library/4m.md) are used
58to parse atoms of specific auras.
58to parse atoms of specific auras.
59
59
60#### Source
60#### Source
61
61
62−```hoon
62+```reference
63 ++ dime [p=@ta q=@]
63 ++ dime [p=@ta q=@]
64```
64```
65
65
@@ -79,7 +79,7 @@ Optional result `p` and parsing continuation `q`.
79
79
80#### Source
80#### Source
81
81
82−```hoon
82+```reference
83 ++ hair [p=@ud q=@ud]
83 ++ hair [p=@ud q=@ud]
84```
84```
85
85
@@ -95,7 +95,7 @@ Optional result `p` and parsing continuation `q`.
95
95
96#### Discussion
96#### Discussion
97
97
98−See also: [Section 2e](@/docs/hoon/library/2e.md), `++rule`
98+See also: [Section 2e](@/docs/reference/library/2e.md), `++rule`
99
99
100
100
101---
101---
@@ -107,7 +107,7 @@ A pair of two `@ud` used in parsing indicating line and column number.
107
107
108#### Source
108#### Source
109
109
110−```hoon
110+```reference
111 ++ hair [p=@ud q=@ud]
111 ++ hair [p=@ud q=@ud]
112```
112```
113
113
@@ -136,7 +136,7 @@ Generates an `++edge` with a parsed result set to a specific type.
136
136
137#### Source
137#### Source
138
138
139−```hoon
139+```reference
140 ++ like |* a=gate
140 ++ like |* a=gate
141 |= b=_`*`[(hair) ~]
141 |= b=_`*`[(hair) ~]
142 :- p=(hair -.b)
142 :- p=(hair -.b)
@@ -170,7 +170,7 @@ Indicates parsing position `p`, and remaining text to be parsed `q`.
170
170
171#### Source
171#### Source
172
172
173−```hoon
173+```reference
174 ++ nail [p=hair q=tape]
174 ++ nail [p=hair q=tape]
175```
175```
176
176
@@ -190,7 +190,7 @@ A list of `++knot`s. `++knot` is another name for `@ta`.
190
190
191#### Source
191#### Source
192
192
193−```hoon
193+```reference
194 ++ path (list knot)
194 ++ path (list knot)
195```
195```
196
196
@@ -215,7 +215,7 @@ stack traces.
215
215
216#### Source
216#### Source
217
217
218−```hoon
218+```reference
219 ++ pint [p=[p=@ q=@] q=[p=@ q=@]]
219 ++ pint [p=[p=@ q=@] q=[p=@ q=@]]
220```
220```
221
221
@@ -240,7 +240,7 @@ An empty parsing rule, but used to check that parsing rules match this with `_`.
240
240
241#### Source
241#### Source
242
242
243−```hoon
243+```reference
244 ++ rule _|=(nail *edge)
244 ++ rule _|=(nail *edge)
245```
245```
246
246
@@ -260,7 +260,7 @@ The stack trace that is printed after crashing.
260
260
261#### Source
261#### Source
262
262
263−```hoon
263+```reference
264 ++ spot [p=path q=pint]
264 ++ spot [p=path q=pint]
265```
265```
266
266
@@ -283,7 +283,7 @@ or failure with an error report (`%2`).
283
283
284#### Source
284#### Source
285
285
286−```hoon
286+```reference
287 ++ tone $% [$0 p=*] :: success
287 ++ tone $% [$0 p=*] :: success
288 [$1 p=(list)] :: blocks
288 [$1 p=(list)] :: blocks
289 [$2 p=(list [@ta *])] :: error report
289 [$2 p=(list [@ta *])] :: error report
@@ -331,7 +331,7 @@ or failure with a stack trace (`%2`).
331
331
332#### Source
332#### Source
333
333
334−```hoon
334+```reference
335 ++ toon $% [$0 p=*] :: success
335 ++ toon $% [$0 p=*] :: success
336 [$1 p=(list)] :: blocks
336 [$1 p=(list)] :: blocks
337 [$2 p=(list tank)] :: stack trace
337 [$2 p=(list tank)] :: stack trace
@@ -357,7 +357,7 @@ Pull result out of a `++edge`, or crash if there's no result.
357
357
358#### Source
358#### Source
359
359
360−```hoon
360+```reference
361 ++ wonk |*(veq=edge ?~(q.veq !! p.u.q.veq))
361 ++ wonk |*(veq=edge ?~(q.veq !! p.u.q.veq))
362```
362```
363
363
reference/library/4h.md+34−34
@@ -12,7 +12,7 @@ Parses ASCII character 32, space.
12
12
13#### Source
13#### Source
14
14
15−```hoon
15+```reference
16 ++ ace (just ' ')
16 ++ ace (just ' ')
17```
17```
18
18
@@ -43,7 +43,7 @@ Parses ASCII character 124, the vertical bar.
43
43
44#### Source
44#### Source
45
45
46−```hoon
46+```reference
47 ++ bar (just '|')
47 ++ bar (just '|')
48```
48```
49
49
@@ -70,12 +70,12 @@ Parses ASCII character 124, the vertical bar.
70Parse backslash
70Parse backslash
71
71
72Parses ASCII character 92, the backslash. Note the extra `\` in the calling of
72Parses ASCII character 92, the backslash. Note the extra `\` in the calling of
73−`bas` with [`++just`](@/docs/hoon/library/4f.md) is to escape the escape
73+`bas` with [`++just`](@/docs/reference/library/4f.md) is to escape the escape
74character, `\`.
74character, `\`.
75
75
76#### Source
76#### Source
77
77
78−```hoon
78+```reference
79 ++ bas (just '\\')
79 ++ bas (just '\\')
80```
80```
81
81
@@ -108,7 +108,7 @@ Parses ASCII character 36, the dollar sign.
108
108
109#### Source
109#### Source
110
110
111−```hoon
111+```reference
112 ++ buc (just '$')
112 ++ buc (just '$')
113```
113```
114
114
@@ -138,7 +138,7 @@ Parses ASCII character 95, the underscore.
138
138
139#### Source
139#### Source
140
140
141−```hoon
141+```reference
142 ++ cab (just '_')
142 ++ cab (just '_')
143```
143```
144
144
@@ -168,7 +168,7 @@ Parses ASCII character 37, the percent sign.
168
168
169#### Source
169#### Source
170
170
171−```hoon
171+```reference
172 ++ cen (just '%')
172 ++ cen (just '%')
173```
173```
174
174
@@ -198,7 +198,7 @@ Parses ASCII character 58, the colon
198
198
199#### Source
199#### Source
200
200
201−```hoon
201+```reference
202 ++ col (just ':')
202 ++ col (just ':')
203```
203```
204
204
@@ -227,7 +227,7 @@ Parses ASCII character 44, the comma.
227
227
228#### Source
228#### Source
229
229
230−```hoon
230+```reference
231 ++ com (just ',')
231 ++ com (just ',')
232```
232```
233
233
@@ -257,7 +257,7 @@ Parses ASCII character 34, the double quote.
257
257
258#### Source
258#### Source
259
259
260−```hoon
260+```reference
261 ++ doq (just '"')
261 ++ doq (just '"')
262```
262```
263
263
@@ -292,7 +292,7 @@ Parses ASCII character 46, the period.
292
292
293#### Source
293#### Source
294
294
295−```hoon
295+```reference
296 ++ dot (just '.')
296 ++ dot (just '.')
297```
297```
298
298
@@ -322,7 +322,7 @@ Parses ASCII character 47, the forward slash.
322
322
323#### Source
323#### Source
324
324
325−```hoon
325+```reference
326 ++ fas (just '/')
326 ++ fas (just '/')
327```
327```
328
328
@@ -349,7 +349,7 @@ Parses ASCII character 60, the less-than sign.
349
349
350#### Source
350#### Source
351
351
352−```hoon
352+```reference
353 ++ gal (just '<')
353 ++ gal (just '<')
354```
354```
355
355
@@ -379,7 +379,7 @@ Parses ASCII character 62, the greater-than sign.
379
379
380#### Source
380#### Source
381
381
382−```hoon
382+```reference
383 ++ gar (just '>')
383 ++ gar (just '>')
384```
384```
385
385
@@ -409,7 +409,7 @@ Parses ASCII character 35, the number sign.
409
409
410#### Source
410#### Source
411
411
412−```hoon
412+```reference
413 ++ hax (just '#')
413 ++ hax (just '#')
414```
414```
415
415
@@ -436,7 +436,7 @@ Parses ASCII character 45, the hyphen.
436
436
437#### Source
437#### Source
438
438
439−```hoon
439+```reference
440 ++ hep (just '-')
440 ++ hep (just '-')
441```
441```
442
442
@@ -465,7 +465,7 @@ interpolation. To parse either of them, they must be escaped.
465
465
466#### Source
466#### Source
467
467
468−```hoon
468+```reference
469 ++ kel (just '{')
469 ++ kel (just '{')
470```
470```
471
471
@@ -494,7 +494,7 @@ interpolation. To parse either of them, they must be escaped.
494
494
495#### Source
495#### Source
496
496
497−```hoon
497+```reference
498 ++ ker (just '}')
498 ++ ker (just '}')
499```
499```
500
500
@@ -521,7 +521,7 @@ Parses ASCII character 94, the caret.
521
521
522#### Source
522#### Source
523
523
524−```hoon
524+```reference
525 ++ ket (just '^')
525 ++ ket (just '^')
526```
526```
527
527
@@ -547,7 +547,7 @@ Parses ASCII character 43, the plus sign.
547
547
548#### Source
548#### Source
549
549
550−```hoon
550+```reference
551 ++ lus (just '+')
551 ++ lus (just '+')
552```
552```
553
553
@@ -577,7 +577,7 @@ Parses ASCII character 38, the ampersand.
577
577
578#### Source
578#### Source
579
579
580−```hoon
580+```reference
581 ++ pam (just '&')
581 ++ pam (just '&')
582```
582```
583
583
@@ -607,7 +607,7 @@ Parses ASCII character 64, the "at" sign.
607
607
608#### Source
608#### Source
609
609
610−```hoon
610+```reference
611 ++ pat (just '@')
611 ++ pat (just '@')
612```
612```
613
613
@@ -637,7 +637,7 @@ Parses ASCII character 40, the left parenthesis.
637
637
638#### Source
638#### Source
639
639
640−```hoon
640+```reference
641 ++ pel (just '(')
641 ++ pel (just '(')
642```
642```
643
643
@@ -664,7 +664,7 @@ Parses ASCII character 41, the right parenthesis.
664
664
665#### Source
665#### Source
666
666
667−```hoon
667+```reference
668 ++ per (just ')')
668 ++ per (just ')')
669```
669```
670
670
@@ -691,7 +691,7 @@ Parses ASCII character 91, the left square bracket.
691
691
692#### Source
692#### Source
693
693
694−```hoon
694+```reference
695 ++ sel (just '[')
695 ++ sel (just '[')
696```
696```
697
697
@@ -718,7 +718,7 @@ Parses ASCII character 59, the semicolon.
718
718
719#### Source
719#### Source
720
720
721−```hoon
721+```reference
722 ++ sem (just ';')
722 ++ sem (just ';')
723```
723```
724
724
@@ -745,7 +745,7 @@ Parses ASCII character 93, the right square bracket.
745
745
746#### Source
746#### Source
747
747
748−```hoon
748+```reference
749 ++ ser (just ']')
749 ++ ser (just ']')
750```
750```
751
751
@@ -772,7 +772,7 @@ Parses ASCII character 126, the tilde.
772
772
773#### Source
773#### Source
774
774
775−```hoon
775+```reference
776 ++ sig (just '~')
776 ++ sig (just '~')
777```
777```
778
778
@@ -800,7 +800,7 @@ Parses ASCII character 39, soq. Note the extra '' is to escape the first
800
800
801#### Source
801#### Source
802
802
803−```hoon
803+```reference
804 ++ soq (just '\'')
804 ++ soq (just '\'')
805```
805```
806
806
@@ -827,7 +827,7 @@ Parses ASCII character 42, the asterisk.
827
827
828#### Source
828#### Source
829
829
830−```hoon
830+```reference
831 ++ tar (just '*')
831 ++ tar (just '*')
832```
832```
833
833
@@ -858,7 +858,7 @@ accent").
858
858
859#### Source
859#### Source
860
860
861−```hoon
861+```reference
862 ++ tec (just '`') :: backTiCk
862 ++ tec (just '`') :: backTiCk
863```
863```
864
864
@@ -888,7 +888,7 @@ Parses ASCII character 61, the equals sign.
888
888
889#### Source
889#### Source
890
890
891−```hoon
891+```reference
892 ++ tis (just '=')
892 ++ tis (just '=')
893```
893```
894
894
@@ -914,7 +914,7 @@ Parses ASCII character 63, the question mark.
914
914
915#### Source
915#### Source
916
916
917−```hoon
917+```reference
918 ++ wut (just '?')
918 ++ wut (just '?')
919```
919```
920
920
@@ -941,7 +941,7 @@ Parses ASCII character 33, the exclamation point zap.
941
941
942#### Source
942#### Source
943
943
944−```hoon
944+```reference
945 ++ zap (just '!')
945 ++ zap (just '!')
946```
946```
947
947
tutorials/_index.md+4−4
@@ -8,19 +8,19 @@ aliases = ["docs/learn/"]
8
8
9Tutorials and explanations for all the components of Urbit.
9Tutorials and explanations for all the components of Urbit.
10
10
11−## [Arvo](@/docs/learn/arvo/_index.md)
11+## [Arvo](@/docs/tutorials/arvo/_index.md)
12
12
13Arvo is a clean-slate system software stack defined as a deterministic computer. An encrypted P2P network, %ames, runs on a functional operating system, Arvo, written in a strict, typed functional language, Hoon, which compiles itself to a combinator interpreter, Nock, whose spec gzips to 340 bytes.
13Arvo is a clean-slate system software stack defined as a deterministic computer. An encrypted P2P network, %ames, runs on a functional operating system, Arvo, written in a strict, typed functional language, Hoon, which compiles itself to a combinator interpreter, Nock, whose spec gzips to 340 bytes.
14
14
15−## [Hoon Tutorial](@/docs/learn/hoon-tutorial/_index.md)
15+## [Hoon Tutorial](@/docs/tutorials/hoon/_index.md)
16
16
17Hoon is a high-level, statically typed, functional programming language, custom-designed for use with Urbit. For a functional language it has a surprisingly imperative style, and mastering it doesn't require knowing any advanced mathematics. The Hoon Tutorial is the best place to start if you want to learn Urbit.
17Hoon is a high-level, statically typed, functional programming language, custom-designed for use with Urbit. For a functional language it has a surprisingly imperative style, and mastering it doesn't require knowing any advanced mathematics. The Hoon Tutorial is the best place to start if you want to learn Urbit.
18
18
19−## [Nock](@/docs/learn/nock/_index.md)
19+## [Nock](@/docs/tutorials/nock/_index.md)
20
20
21Nock is the low-level functional programming language that is interpreted by Vere. You don't need to know Nock to write Hoon, or even to work on most parts of Vere. But if you want to understand the foundations of Urbit and are mathematically-inclined, dive right in.
21Nock is the low-level functional programming language that is interpreted by Vere. You don't need to know Nock to write Hoon, or even to work on most parts of Vere. But if you want to understand the foundations of Urbit and are mathematically-inclined, dive right in.
22
22
23−## [Vere](@/docs/learn/vere/_index.md)
23+## [Vere](@/docs/tutorials/vere/_index.md)
24
24
25The Nock runtime system, written in C.
25The Nock runtime system, written in C.
26
26
tutorials/arvo/_index.md+9−9
@@ -5,37 +5,37 @@ sort_by = "weight"
5template = "sections/docs/chapters.html"
5template = "sections/docs/chapters.html"
6aliases = ["/docs/learn/arvo/"]
6aliases = ["/docs/learn/arvo/"]
7+++
7+++
8−Arvo is Urbit's functional operating system, written in [Hoon](@/docs/hoon/_index.md). It's composed of modules called _vanes_:
8+Arvo is Urbit's functional operating system, written in [Hoon](@/docs/tutorial/hoon/_index.md). It's composed of modules called _vanes_:
9
9
10−## [Ames](@/docs/arvo/ames.md)
10+## [Ames](@/docs/tutorials/arvo/ames.md)
11
11
12Ames is the name of our network and the vane that communicates over it. It's an encrypted P2P network composed of instances of the Arvo operating system.
12Ames is the name of our network and the vane that communicates over it. It's an encrypted P2P network composed of instances of the Arvo operating system.
13
13
14−## [Behn](@/docs/arvo/behn.md)
14+## [Behn](@/docs/tutorials/arvo/behn.md)
15
15
16Behn is our timer. It allows vanes and applications to set and timer events, which are managed in a simple priority queue.
16Behn is our timer. It allows vanes and applications to set and timer events, which are managed in a simple priority queue.
17
17
18−## [Clay](@/docs/arvo/clay.md)
18+## [Clay](@/docs/tutorials/arvo/clay.md)
19
19
20Clay is our filesystem and revision-control system.
20Clay is our filesystem and revision-control system.
21
21
22−## [Dill](@/docs/arvo/dill.md)
22+## [Dill](@/docs/tutorials/arvo/dill.md)
23
23
24Dill is our terminal driver. Unix sends keyboard events to dill from the terminal, and dill produces terminal output.
24Dill is our terminal driver. Unix sends keyboard events to dill from the terminal, and dill produces terminal output.
25
25
26−## [Eyre](@/docs/arvo/eyre.md)
26+## [Eyre](@/docs/tutorials/arvo/eyre.md)
27
27
28Eyre is our HTTP server. Unix sends HTTP messages to `%eyre`, and `%eyre` produces HTTP messages in response.
28Eyre is our HTTP server. Unix sends HTTP messages to `%eyre`, and `%eyre` produces HTTP messages in response.
29
29
30−## [Ford](@/docs/arvo/ford.md)
30+## [Ford](@/docs/tutorials/arvo/ford.md)
31
31
32Ford is our build system. It handles resources and publishing.
32Ford is our build system. It handles resources and publishing.
33
33
34−## [Gall](@/docs/arvo/gall.md)
34+## [Gall](@/docs/tutorials/arvo/gall.md)
35
35
36Gall is the vane for controlling userspace apps.
36Gall is the vane for controlling userspace apps.
37
37
38−### [Hall](@/docs/arvo/hall.md)
38+### [Hall](@/docs/tutorials/arvo/hall.md)
39
39
40Hall isn't a vane, but an important Gall app that functions as the Urbit messaging protocol.
40Hall isn't a vane, but an important Gall app that functions as the Urbit messaging protocol.
41
41
tutorials/arvo/ford.md+1−1
@@ -119,7 +119,7 @@ library in urbit.
119
119
120To run this example, put this code in your desk at `gen/faslus.hoon` and run
120To run this example, put this code in your desk at `gen/faslus.hoon` and run
121`+faslus` in your dojo. This example is a generator. For more information on
121`+faslus` in your dojo. This example is a generator. For more information on
122−generators, see the [generator docs](@/docs/hoon/hoon-tutorial/generators.md).
122+generators, see the [generator docs](@/docs/tutorials/hoon/generators.md).
123
123
124```hoon
124```hoon
125/+ time-to-id
125/+ time-to-id
tutorials/arvo/glossary.mddeleted−850
@@ -1,850 +0,0 @@
1−+++
2−title = "Glossary"
3−weight = 3
4−template = "doc.html"
5−aliases = ["docs/reference/arvo-glossary/"]
6−+++
7−
8−Urbit is renowned for its exotic terminology. Here's a simple overview
9−from the strange words within.
10−
11−As Dijkstra put it: "The purpose of abstraction is not to be vague, but
12−to create a new semantic level in which one can be absolutely precise."
13−
14−This glossary only covers terms the Arvo side of the project. You can find the
15−Azimuth glossary [here](../azimuth/glossary)
16−
17−### application
18−
19−Also known as an “app,” an _application_ is a Hoon program that can hold state.
20−
21−### arm
22−
23−An _arm_ is a named, functionally-computed attribute of a [core](#core).
24−
25−The [hoon](#a-hoon) of each arm is compiled to a Nock formula, with the
26−enclosing [core](#core) itself as the subject.
27−
28−There are two kinds of arms: _dry_ and _wet_. Most arms are
29−dry.
30−
31−#### dry
32−
33− normal, `++`, polymorphic by means of _variance_
34−
35− For a dry arm, we ask: is the new payload compatible with the old
36− payload (against which the core was compiled)?
37−
38−#### wet
39−
40− unusual, `+-`, polymorphic by means of _genericity_
41−
42− A wet arm uses the hoon as a macro. We create a new type analysis
43− path, which works as if we expanded the callee with the caller's
44− context.
45−
46−_See [advanced types](/docs/hoon/hoon-expressions/advanced/)_.
47−
48−
49−
50−### Arvo
51−
52−The Urbit operating system and kernel. Arvo's state is a pure function of its
53−event log, and it serves as the Urbit event manager. It contains vanes, which are
54−kernel modules that perform essential system operations. Arvo itself can only
55−deal with one file at a time. For more, it relies on Ford, the build-system
56−vane.
57−
58−Arvo being purely functional means that the it is a function that is:
59−
60−`(state, event) → (state, effects)`
61−
62−Arvo coordinates and reloads vanes. It can be thought of as a traffic-director.
63−Any vane needs to go through Arvo before reaching another vane. Events and
64−their effects happen like so:
65−
66−`Unix event → vere (the virtual machine that runs Urbit) → Arvo → vane → Arvo`
67−
68−Arvo is located in `/home/sys/arvo.hoon` within your urbit.
69−
70−More in-depth information on Arvo can be found
71−[`here`](@/docs/arvo/_index.md).
72−
73−Below are Arvo modules, which are called "vanes".
74−
75−#### Ames
76−
77− The networking vane. Ames handles all things UDP. Here live the protocols for
78− discovering and interacting with other urbits. It’s also the name for the Urbit
79− network itself. All communication is signed and encrypted.
80−
81− Ames is located in `/home/sys/vane/ames.hoon` within your urbit.
82−
83− More in-depth information on Ames can be found
84− [`here`](@/docs/arvo/ames.md).
85−
86−#### Behn
87−
88− The timing vane. Behn allows for applications to schedule events, which are
89− managed in a simple priority queue. For example, Clay, the Urbit filesystem,
90− uses Behn to keep track of time-specific file requests. Eyre, the Urbit web
91− vane, uses Behn for timing-out HTTP sessions.
92−
93− Behn is located in `/home/sys/vane/behn.hoon` within your urbit.
94−
95−#### Clay
96−
97− The filesystem and typed revision-control vane. Think of Clay as a
98− continuously synced git. It handles file-change events and maps them from Urbit
99− to Unix and vice versa.
100−
101− A common way to use it is to create a pier, a directory that exists in and is
102− visible in Unix.
103−
104− Clay is located at `/home/sys/vane/clay.hoon` within your urbit.
105−
106− Basic information on using Clay can be found
107− [`here`](@/operations.md). An in-depth explanation
108− of the architecture can be found
109− [`here`](@/docs/arvo/clay.md).
110−
111−#### Dill
112−
113− The terminal-driver vane. You run your urbit in your Unix terminal, and
114− Unix sends every event -- such as a keystroke or a change in the dimensions of
115− the terminal window -- to be handled by Dill. Dill acts as an intermediary for
116− anything that uses keyboard events. This is why there’s some input lag in
117− Urbit’s command-line interface. (Optimization will come later!)
118−
119− A keyboard event's journey from Unix to Dojo, the Urbit shell, can be imagined
120− as diagrammed below:
121− ```
122− Keystroke in Unix -> Vere (virtual machine) -> Arvo -> Dill -> the Dojo
123− ```
124−
125− Dill is located at `/home/sys/vane/dill.hoon` within your urbit.
126−
127− More in-depth information on Dill can be found
128− [`here`](@/docs/arvo/dill.md).
129−
130−#### Eyre
131−
132− The web-server vane. Anything HTTP-related lives here. Unix sends HTTP messages
133− though to Eyre, and Eyre produces HTTP messages in response.
134−
135− In general, apps and vanes do not call Eyre; rather, Eyre calls apps and vanes.
136− Eyre uses Ford and Gall to functionally publish pages and facilitate
137− communication with apps.
138−
139− Eyre is located at `/home/sys/vane/eyre.hoon` within your urbit.
140−
141− More in-depth information on Eyre can be found
142− [`here`](@/docs/arvo/eyre.md).
143−
144−#### Ford
145−
146− The build-system vane. Ford is capable of sequencing generic asynchronous
147− computations. Its uses include linking source files into programs, assembling
148− live-updating websites, and performing file-type conversions.
149−
150− Ford neither accepts Unix events nor produces Unix effects. It exists
151− entirely for the benefit of Urbit applications and other vanes, in particular
152− Gall.
153−
154− Ford is located at `/home/sys/vane/ford.hoon` within your urbit.
155−
156− More in-depth information on Ford can be found
157− [`here`](@/docs/arvo/ford.md).
158−
159−#### Gall
160−
161− The application-management vane. Userspace apps -- daemons, really -- are
162− started, stopped, and sandboxed by Gall. Gall provides developers with a
163− consistent interface for hooking their app up to the operating system. It allows
164− applications and other vanes to send messages to applications and subscribe to
165− data streams. Messages coming into Gall are routed to the intended application,
166− and the response comes back along the same route. If the intended target is on
167− another ship, Gall will route it, behind the scenes, through Ames to the other
168− ship.
169−
170− Gall is located at `/home/sys/vane/gall.hoon` within your urbit.
171−
172− More in-depth information on Gall can be found
173− [`here`](@/docs/arvo/gall.md).
174−
175−### atom
176−
177−An atom is any natural number, including zero. The atom is the most basic data
178−type in [Nock](#nock) and [Hoon](#hoon). A Hoon atom type describes a Nock
179−atom with two additional pieces of metadata: an [_aura_](#aura), and an
180−optional constant.
181−
182−An atom type is _warm_ or _cold_ based on whether the constant exists.
183−
184−
185−#### warm
186−
187− If the constant is `~` (null), any atom is in the type.
188−
189−#### cold
190−
191− If the constant is `[~ atom]`, its only legal value is `atom`.
192−
193−_See [basic types](@/docs/hoon/hoon-expressions/basic.md)_
194−
195−### aura
196−
197−An aura is a soft atom type. They appear as strings beginning with `@`. Auras
198−represent the structure of an atom, print format, or other semantics. Its
199−constraints on the value of an atom aren't enforced in any way.
200−
201−You can cast something to an aura, like a decimal, and get back its hexademical.
202−For example:
203−
204−```
205− > =a `@`29
206− > ^- @ux a
207− 0x1d
208−```
209−
210−Auras are an advisory type system. You can go up or down, but not sideways in
211−the hierarchy. `@t` and `@` can each be cast to the other, but @t can’t be cast
212−to `@u`, for example, without first being cast to the empty aura `@`.
213−
214−For example
215−
216−```
217− > ^- @ 'c' :: 'c' is of the aura @t
218− 99
219−
220− > ^- @u 'c'
221− ! exit
222−```
223−
224−Here is a non-exhaustive list of auras:
225−
226−```
227−Aura Meaning Example Literal Syntax
228−-------------------------------------------------------------------------
229−@d date
230− @da absolute date ~2018.5.14..22.31.46..1435
231−@n nil ~
232−@p phonemic string (ship name) ~sorreg-namtyv
233−@r IEEE floating-point
234− @rd double precision (64 bits) .~6.02214085774e23
235− @rh half precision (16 bits) .~~3.14
236−@s signed integer, sign-bit low
237− @sb signed binary --0b11.1000
238− @sd signed decimal --1.000.056
239− @sx signed hexadecimal -0x5f5.e138
240−@t UTF-8 text (cord) 'howdy'
241− @ta ASCII text (knot) ~.howdy
242− @tas ASCII text symbol (term) %howdy
243−@u unsigned integer
244− @ub unsigned binary 0b11.1000
245− @ud unsigned decimal 1.000.056
246− @ux unsigned hexadecimal 0x5f5.e138
247−```
248−
249−You can find the list of all auras [here](@/docs/hoon/hoon-expressions/rune/constants.md).
250−
251−### blocksize
252−
253−Blocksize is the power-of-two bitwidth of an atom. So, an atom with a blocksize
254−of `3` has a bitwidth of `2^3`, which is 8. A bitwidth of 8, in turn, can
255−represent `2^8` values, or 256.
256−
257−### cast
258−
259−To cast is to put a Hoon expression through the compiler’s type-checker to test
260−whether the expression is guaranteed to evaluate to a product that falls within
261−the desired type. If the expression is not guaranteed to behave in this way,
262−then the compiler will halt with a nest-fail crash. Proper Hoon code will
263−include a cast for the product type of each gate.
264−
265−The cast rune is `^-` (pronounced "ket-hep"). So, to cast to a list of atoms,
266−we write `^- (list @)`. The irregular form of that expression is ``(list @)``.
267−
268−### cell
269−
270−In Nock and Hoon, a _cell_ is an ordered pair of [nouns](#noun).
271−
272−Syntax: `[a b]`.
273−
274−Cells orient to the right; for example, the noun [2 6 14 15] is short for
275−[2 [6 [14 15]]].
276−
277−
278−### clam
279−
280−A clam is the use of a structure as a gate. Usually used to verify marks from
281−other urbits.
282−
283−```
284− > ((list @t) [97 98 ~])
285− <|a b|>
286−```
287−
288−### cord
289−
290−In Hoon, `cord` is an aura for representing atoms as strings. UTF-8,
291−least-significant bit first. Represented as the aura `@t`.
292−
293−```
294− > `@t`478.560.413.032
295− 'hello'
296−```
297−
298−### core
299−
300−A _core_ is a [cell](#nock-cell) of `[code data]`, where we call the
301−code head the _battery_ and the data tail the _payload_. All code-data
302−structures in normal languages (functions, objects, modules, etc.)
303−translate to cores in Hoon.
304−
305−#### battery
306−
307− The code-containing head of a core.
308−
309−#### payload
310−
311− The data-containing tail of a core.
312−
313−_See [basic types](@/docs/hoon/hoon-expressions/basic.md)._
314−
315−### Dojo
316−
317−The Dojo is the Urbit shell; the command line where you run programs,
318−expressions, and system commands. It’s a CLI that is encountered right when
319−an urbit is started for the first time. It is somewhat analogous to Bash, the
320−Unix terminal, and more analogous to a Hoon REPL.
321−
322−You’ll notice that many things can’t be written here; this is normal. The Dojo
323−enforces syntactical correctness right at the command line. Strings that can’t
324−be continued into a valid expression are automatically trimmed back to something
325−that can be. Some syntactically invalid expressions can be completed, but the
326−Dojo will prevent them from being entered as a command. You can play around
327−with this functionality learn what syntax is kosher.
328−
329−### desk
330−
331−A desk is independently revision-controlled branch of urbit filesystem.
332−
333−_See [filesystem](@/operations.md#filesystem) and [Clay](@/docs/arvo/clay.md)._
334−
335−### duct
336−
337−A duct is an Arvo-level call stack. At the beginning of every duct is a Unix
338−event, such as a keystroke, network packet, timer event, or file change.
339−
340−A duct is a `list` of `wire`s. A wire is itself a `list` of `knot`s. A `knot`
341−is, in turn, a knot.
342−
343−### face
344−
345−A _face_ is the Hoon analog to what is a variable name in most other
346−programming languages. Faces are metadata labels for legs, allowing us to
347−address parts. Because there is no metadata in Nock, faces cannot exist in Nock.
348−
349−```
350− > a=2
351− a=2
352−```
353−
354−In the above example, `a` is the face and `2` is the value.
355−
356−Hoon has no scope or symbol-table; there is only the subject. To "declare" a
357−"variable" is to construct a new subject: `[name=value old-subject]`.
358−
359−_See [advanced types](@/docs/hoon/hoon-expressions/advanced.md)_.
360−
361−
362−### flag
363−
364−A `flag` is Hoon's version of a boolean. `0` (`%.y`) is _yes_, `1` (`%.n`) is
365−_no_.
366−
367−### gate
368−
369−A _gate_ is a [core](#core) with one [arm](#arm) -- Hoon's closest
370−analog to a function. To call a gate on an argument, replace the sample
371−(at [tree address](@/docs/hoon/hoon-expressions/limb/limb.md) `+6`
372−in the core) with the argument, and then compute the arm.
373−
374−The payload of a gate has a shape of `[sample context]`.
375−
376−#### sample
377−
378− The argument tuple.
379−
380−#### context
381−
382− The subject in which the gate was defined.
383−
384−_See [basic types](@/docs/hoon/hoon-expressions/basic.md),
385−[`%-` ("cenhep")](@/docs/hoon/hoon-expressions/rune/cen.md#cenhep) (the
386−[rune](#rune) for calling a `gate`)._
387−
388−### generator
389−
390−A _generator_ is like a limited Hoon script: it’s a shell command that produces
391−a value before disappearing. Generators take an input [noun](#noun) (a value)
392−and produce an output `noun` by performing calculations on its arguments,
393−prompting for input, or making HTTP requests.
394−
395−You need a `bar` rune like `|=` in your generator, because a generator is
396−essentially a function that you’re calling.
397−
398−Generators, unlike [apps](#application), hold no state. They are pure,
399−stateless functions, and they cannot send [moves](#move). Because of this,
400−generators are have a more narrow use than apps. Among the non-trivial uses of
401−a a generator is moving data into apps -- they’re the backbone of Urbit’s
402−information pipeline.
403−
404−Generators are run from the `/gen` directory of your current desk. For example,
405−to run a generator named `whatever.hoon`, you would type `> +whatever` in the
406−[Dojo](@/operations.md#using-the-shell).
407−
408−### glyph
409−
410−A _glyph_ is a single, non-alphanumeric ASCII character. Each glyph has its own
411−monosyllabic name, which allows the efficient communication of Hoon-related
412−information in speech. [`Runes`](#rune) are composed of two glyphs.
413−Below is a complete list of glyphs with their associated pronunciations.
414−
415−```
416−ace [1 space] gal < pal (
417−bar | gap [>1 space, nl] par )
418−bas \ gar > sel [
419−buc $ hax # mic ;
420−cab _ hep - ser ]
421−cen % kel { sig ~
422−col : ker } soq '
423−com , ket ^ tar *
424−doq " lus + tic `
425−dot . pam & tis =
426−fas / pat @ wut ?
427−zap !
428−```
429−
430−### Hall
431−
432−_Hall_ is the Urbit communication back-end. It’s a messaging bus that can work
433−with clients of all sorts. [`:talk`](#talk), the built-in chat client, is one
434−such app that uses Hall.
435−
436−_More information on Hall can be found [here](@/docs/arvo/hall.md)._
437−
438−#### circle
439−
440− A circle is the “audience” of your messages -- who can receive them. It can be
441− thought of as a chat channel, but this is a little too narrow. More
442− specifically, it’s a named collection of messages created by and hosted on a
443− ship’s Hall, usually represented as `~ship-name/circle-name`. On Talk,
444− Urbit’s built-in chat front-end, the first circle that you will likely
445− encounter is `~dopzod/urbit-help`.
446−
447−### Hood
448−
449−_Hood_ orchestrates many of the Urbit initialization systems necessary
450−for boot.
451−
452−### Hoon
453−
454−Hoon is a strict, higher-order typed functional language that compiles itself
455−to Nock.
456−
457−The Hoon source file is located in `/home/sys/hoon.hoon` within your urbit.
458−
459−_More information can be found in the [hoon](@/docs/hoon/_index.md) section._
460−
461−#### Mint
462−
463− _Mint_ is the Hoon compiler function. Mint takes the subject type and the
464− expression source (a [hoon](#a-hoon), for example) and produces the product
465− type and nock formula. So [type hoon] is mapped to [type nock].
466−
467−### hoon
468−
469−A _hoon_ (lowercase) is the result of parsing a Hoon source expression into an
470−AST node. These AST nodes are nouns, like all other Hoon data. Because every
471−Hoon program is, in its entirety, a single expression of Hoon, the result of
472−parsing the whole thing into an AST is a single `hoon`.
473−
474−A hoon is a tagged union of the form `[%tag data]`, where the tag
475−is a constant such as `%brts` (from the source [rune](#rune) `|=`,
476−i.e. "bartis"), and is matched up with the appropriate type of data
477−(often more `hoon`s, from source subexpressions). For example, the
478−expression `:-(2 17)`, once parsed into an AST, becomes the following:
479−
480−```
481−[%clhp p=[%sand p=%ud q=2] q=[%sand p=%ud q=17]]
482−```
483−
484−The `%clhp` is produced from the rune `:-` (i.e. "colhep"). The 2 and
485−17 have each been parsed as `%sand`-tagged hoons, which represent
486−atoms (in this case each with an aura of `%ud`, i.e. unsigned
487−decimal).
488−
489−To parse Hoon source into a hoon AST, use `ream` on a `cord`
490−containing Hoon source. Try the following in [Dojo](@/operations.md#using-the-shell):
491−
492−```
493−(ream ':+(12 7 %a)')
494−```
495−
496−The result should be:
497−
498−```
499−[%clls p=[%sand p=%ud q=12] q=[%sand p=%ud q=7] r=[%rock p=%tas q=97]]
500−```
501−
502−See [expression reference](@/docs/hoon/hoon-expressions/rune/_index.md) for the full list of hoons.
503−
504−### irregular form
505−
506−Irregular forms are alternative ways of writing Hoon expressions, alternatives
507−to the digraphic runes such as `:~`. Irregular forms are usually more compact
508−than regular forms.=
509−
510−_See [irregular forms](@/docs/hoon/hoon-expressions/irregular.md)._
511−
512−### jet
513−
514−A _jet_ is a piece of C code that have equivalent products to a piece of Hoon or
515−Nock code. They are used for performance reasons; jets are meant to be faster
516−than the code that they are substituting for.
517−
518−Jets are necessary for mathematics, performance-wise, because Nock handles it
519−so inefficiently. Nock, for example, can’t decrement (reduce a number by one)
520−except by starting building a loop that starts from zero and increments to a
521−number just below.
522−
523−_See [API overview](@/docs/vere/api.md)._
524−
525−### lark
526−
527−A lark is an expression that returns a [limb](#limb) at the specified
528−address in a cell. Using `-` by itself returns the head of the subject, and
529−using `+` by itself returns the tail:
530−
531−```
532−> -:[[4 5] [6 [14 15]]]
533−[4 5]
534−
535−> +:[[4 5] [6 [14 15]]]
536−[6 14 15]
537−```
538−
539−You can combine `+` or `-` with either of `>` or `<` to get a more specific limb
540−of the subject. `-<` returns the head of the head; `->` returns the tail of the
541−head; `+<` returns the head of the tail; and `+>` returns the tail of the tail.
542−By alternating the `+`/`-` symbols with `<`/`>` symbols, you can go as deep as
543−you desire.
544−
545−```
546−> +>-:[[4 5] [6 [14 15]]]
547−14
548−
549−> +>+:[[4 5] [6 [14 15]]]
550−15
551−```
552−
553−### limb
554−
555−A _limb_ is an attribute or variable reference. A limb is an [arm](#arm) or a
556−[leg](#leg).
557−
558−To resolve a _limb_ named "foo", the subject is searched depth-first,
559−head-first for either a face named "foo" or a core with an arm of
560−"foo". If a face is found, the result is a leg, if a core is
561−found, the result is the product of the arm.
562−
563−#### leg
564−
565− a subexpression, or subtree of the
566− [subject](#nock-subject).
567−
568−#### wing
569−
570− a search path into the subject, composed of
571− limbs. Search occurs from right to left (`a.b` means `b` within `a`).
572−
573−_See [Limbs and wings](@/docs/hoon/hoon-expressions/limb/_index.md)_
574−
575−### move
576−
577−A move is the [Arvo](#arvo) equivalent of a syscall.
578−
579−### noun
580−
581−In [Nock](#nock) and [Hoon](#hoon), a _noun_ is an atom or a cell.
582−
583−### Nock
584−
585−Nock is a Turing-complete, non-lambda combinator interpreter. It's
586−Urbit's low-level programming language. Nock is functional and typeless.
587−
588−#### noun
589−
590− an _atom_ or a _cell_.
591−
592−#### atom
593−
594− any natural number, including zero.
595−
596−#### cell
597−
598− any ordered pair of nouns.
599−
600−
601−#### subject
602−
603− a noun - the data against which a _formula_ is evaluated.
604−
605−#### formula
606−
607− a noun - a function at the nock level.
608−
609−#### product
610−
611− a noun - the result of evaluating a formula against a subject.
612−
613−_See the [Nock definition](@/docs/nock/definition.md)._
614−
615−### mark
616−
617−A _mark_ is Urbit's version of a MIME type, if a MIME type was an
618−executable specification. The mark is just a label that's used as a path
619−to a local source file in the Arvo filesystem. This source file defines
620−a core that can mold untrusted data, diff and patch, convert to other
621−marks, etc.
622−
623−If this sounds like magic, it isn't quite magic. There's no way
624−for different urbits to make sure they mean the same thing by the
625−same mark. However, when incompatibility happens, marks ensure
626−that we at least handle the situation in a predictable way.
627−
628−#### metal
629−
630−Every core has a _metal_ which defines its variance model (ie, the
631−properties of the type of a compatible core). The default is `gold`
632−(invariant).
633−
634−- `gold`: _invariant_
635−- `lead`: _bivariant_
636−- `zinc`: _covariant_
637−- `iron`: _contravariant_
638−
639−_See [advanced types](@/docs/hoon/hoon-expressions/advanced.md)_.
640−
641−### ship
642−
643−An Urbit _ship_ is: a cryptographic title on a _will_ signed by private key; a
644−human-memorable name; and a packet-routing address. Ships are classed by the
645−number of bits in their address:
646−
647−```
648− Size Name Parent Object Example
649− ----- ------ ------ ------ -------
650− 2^8 galaxy ~ supernode ~zod
651− 2^16 star galaxy supernode ~dozbud
652− 2^32 planet star user ~tasfyn-partyv
653− 2^64 moon planet device ~sigsam-nimbot-tasfyn-partyv
654− 2^128 comet ~ bot ~racmus-mollen-fallyt-linpex--watres-sibbur-modlux-rinmex
655−```
656−
657−Any ship can be called an _urbit_. The lowercase "u" distinguishes it from Urbit
658−the software stack and Urbit the network.
659−
660−_You can find a longer-form summary [here.](https://urbit.org/posts/essays/the-urbit-address-space/)._
661−
662−An Urbit identity is a string like `~firbyr-napbes`. It means nothing,
663−but it's easy to remember and say out loud. `~firbyr-napbes` is actually
664−just a 32-bit number (`3.237.967.392`, to be exact), like an IP address,
665−that we turn into a human-memorable string. The full name of this string
666−can be viewed by typing `our` in the Dojo, Urbit's shell. This is useful
667−when running a ship with a longer name, such as a _moon_ or a _comet_.
668−
669−Technically, an urbit is a secure digital identity that you own and
670−control with a cryptographic key, like a Bitcoin wallet. As in Bitcoin,
671−the supply of urbits is mathematically limited. This keeps the network
672−friendly, by making spam and abuse expensive.
673−
674−An urbit name is just a number; smaller numbers make shorter names.
675−Shorter names are easier to remember, so they're more valuable. So
676−urbits are classified by the number of bits in their name. (A ship name
677−is just a scrambled base-256 representation of the number.)
678−
679−A 32-bit urbit (like `~firbyr-napbes`) is called a _planet._ A 16-bit
680−urbit (like `~pollev)` is a _star._ An 8-bit ship (like `~mun`) is a
681−_galaxy._ A planet is an identity for an independent, adult human. Stars
682−and galaxies are network infrastructure.
683−
684−Each planet or star is launched by its _parent,_ the star or galaxy
685−whose number is its bottom half. So the planet `~firbyr-napbes`,
686−`0xdead.beef` or `3.735.928.559`, is the child of `~pollev`, `0xbeef` or
687−`48.879`, whose parent is `~mun`, `0xef`, `239`. The galaxy at the address of
688−`0` is `~zod`.
689−
690−#### pier
691−
692− A ship's _pier_ is its Unix directory. For planets, the name of the pier is
693− usually the planet name.
694−
695−### structure
696−
697−A _structure_ is an idempotent [gate](#gate) (function) that constructs and
698−validates types in Hoon.
699−
700−An example: Arvo [marks](#mark) use Hoon's type system via structures to
701−validate untrusted network data.
702−
703−Here's some common structure terminology:
704−
705−#### bunt
706−
707− A bunt is the default value of a [structure](#structure). It's also a verb;
708− to _bunt_ a structure is to produce the bunt of that structure. For example,
709− bunting `@` results in `0`, and bunting `@t` results in `''`. Bunting is
710− performed with `*` followed by the structure in question:
711−
712− ```
713− > *@
714− 0
715− > *@t
716− ''
717− ```
718−
719−#### icon: The type of the mold's range
720−
721−_See [mold hoons](/docs/hoon/hoon-expressions/rune/buc/)._
722−
723−### rune
724−
725−A Hoon _rune_ is a pair of ASCII symbols used to begin a
726−[Hoon expression](#a-hoon).
727−
728−For example, the rune [`?:`](@/docs/hoon/hoon-expressions/rune/wut.md#wutcol) is
729−Hoon's most common conditional, a branch on a boolean test. The first
730−symbol in a rune represents a family of related runes. For example, the
731−[`?` family](@/docs/hoon/hoon-expressions/rune/wut.md) are all conditionals.
732−
733−The result of parsing a Hoon source expression&mdash;the rune, followed
734−by its respective children&mdash;into an AST node is simply called
735−a [`hoon`](#a-hoon).
736−
737−Runes have two syntactic forms, _tall_ and _flat_:
738−
739−#### tall
740−
741− multiple lines, no parentheses, two or more spaces between tokens
742−
743− Example:
744−
745− ```
746− > %+ add 2 2
747− 4
748− ```
749−
750−#### flat
751−
752− one line, parentheses, one space between tokens
753−
754− Example:
755− ```
756− > %+(add 2 2) :: regular flat form
757− 4
758−
759− > (add 2 2) :: irregular flat form
760− 4
761− ```
762−
763−Tall hoons can contain flat hoons, but not vice versa. All irregular
764−forms are flat.
765−
766−_See [hoon concept](#a-hoon),
767−[expressions](@/docs/hoon/hoon-expressions/rune/_index.md).
768−
769−### Sail
770−
771−_Sail_ is the Hoon markup language for XML.
772−
773−### scry
774−
775−To _scry_ means to request data from the Arvo namespace and bring it
776−to userspace.
777−
778−_See [.^ (dot-ket)](@/docs/hoon/hoon-expressions/rune/dot.md#dotket)._
779−
780−### slot
781−
782−`slot` is the name for Hoon's tree-addressing scheme.
783−
784−Every cell has a head and a tail, each of which may be either an atom or
785−a cell. Therefore every noun is a binary tree. `+1` or `.` resolves to
786−the whole cell (technically this would work against an atom as well).
787−The head of `+n` is `+2n`, the tail is `+(2n+1)`.
788−
789−`+7` is a special address for gates, because the position is defined
790−(by convention) as the context of a gate and of all cores.
791−
792−### talk
793−
794−_Talk_ is Urbit's built-in chat app. It’s one example of an app that can be
795−built on top of Hall, the Urbit back-end messaging system.
796−
797−_See [Messaging](@/operations.md#messaging). for more information._
798−
799−### type
800−
801−A Hoon _type_ defines a set (finite or infinite) of nouns and ascribes
802−some semantics to it. There is no direct syntax for defining
803−types; they are always defined by inference (i.e., by
804−[`mint`](#mint)), usually using a constructor ([structure](#structure)).
805−
806−All types are assembled out of base types defined in `++type`.
807−(Look up `++ type` in hoon.hoon for examples.) When the compiler
808−does type-inference on a program, it assembles complex types out
809−of the simpler built-in types.
810−
811−#### nest
812−
813− `nest` is an internal Hoon function on two types which performs a type
814− compatibility test. `nest` produces yes if the
815− set of nouns in the second type is provably a subset of the first.
816− If `nest` produces no, the Hoon programmer will receive a `nest-fail`
817− error. This is one of the most commons errors in Hoon programming.
818−
819− _See [advanced types](@/docs/hoon/hoon-expressions/advanced.md)_ and [troubleshooting](@/docs/arvo/ship-troubleshooting.md).
820−
821−
822−### Unit
823−
824−Hoon's equivalent of a nullable pointer or a Haskell Maybe. If `q` is `~`,
825−null, the type is _warm_; any atom is in the type. If `q` is `[~ x]`, where
826−`x` is any atom, the type is _cold_; its only legal value is the constant `x`.
827−
828−### Vane
829−
830−A _vane_ is an [Arvo](#arvo) module. Each Vane is a single file because Arvo
831−cannot, on its own, deal with programs that are split between multiple files.
832−Some vanes can do this, however.
833−
834−### Vere (pronounced “vair”)
835−
836−The runtime system, written in C, that implements [Nock](#nock). All
837−It’s written in C. Vere-level errors are prepended with as `bail:`.
838−
839−Vere is a virtual machine: it pretends to be hardware, and is the single point
840−of contact between your Urbit and the rest of your system. But more than that,
841−Vere handles the Urbit event log and handles jets. It’s also contains the i/o
842−drivers for Urbit’s vanes, responsible for generating events from Unix and
843−applying effects to Unix.
844−
845−### Zuse
846−
847−_Zuse_ is a defined interface for vanes. It contains the part of the Hoon
848−standard library that is specific to Arvo functionality.
849−
850−Arvo is located in `/home/sys/zuse.hoon` within your urbit.
tutorials/hoon-tutorial/workbook/_index.mddeleted−17
@@ -1,17 +0,0 @@
1−+++
2−title = "Hoon Workbook"
3−weight = 150
4−sort_by = "weight"
5−template = "sections/docs/chapters.html"
6−aliase = ["docs/learn/hoon/workbook/"]
7−+++
8−The Workbook is the place to sharpen your Hoon skills. Each entry in the
9−Workbook is a code walkthrough followed by exercises.
10−
11−- The [Digits](@/docs/hoon/workbook/digits.md) example demonstrates how to decompose a number into a list of its digits.
12−
13−- The [Magic 8-Ball](@/docs/hoon/workbook/eightball.md) example emulates everyone's favorite decision-making machine.
14−
15−- The [Traffic-light](@/docs/hoon/workbook/traffic-light.md) example demonstrates how to creates a state machine in Hoon.
16−
17−- The [Bomb-defusing](@/docs/hoon/workbook/bomb.md) exercise shows how to program, well, a bomb-defusing scenario.
tutorials/hoon-tutorial/_index.md → tutorials/hoon/_index.mdrenamed+3−3
@@ -54,9 +54,9 @@ Chapter 2 covers the type system, and writing apps, and the workings of the Arvo
54
54
55Want to know how to style your code? Check out the [style guide](../style).
55Want to know how to style your code? Check out the [style guide](../style).
56
56
57−Consult the [standard library documentation](@/docs/hoon/library/_index.md) or [rune reference](@/docs/hoon/hoon-expressions/_index.md) to look up any unknown rune or standard library function you don't understand.
57+Consult the [standard library documentation](@/docs/reference/library/_index.md) or [rune reference](@/docs/reference/hoon-expressions/_index.md) to look up any unknown rune or standard library function you don't understand.
58
58
59−As you work your way through these lessons you may want to work on example problems from the [Hoon Workbook](@/docs/hoon/workbook/_index.md) for practice. Once you finish the lessons here you may want to write more versatile Hoon programs which can make use of more of your urbit's environment, in which case you'll want to check out the [Generators](@/docs/hoon/hoon-tutorial/generators.md) documentation. Or maybe you'd like to learn how to write a [Gall app](@/docs/arvo/gall.md). Learn about [Udon](@/docs/arvo/sail-and-udon.md), Urbit's stripped-down version of Markdown. Or learn [Sail](@/docs/arvo/sail-and-udon.md), a subset of Hoon used for generating XML nodes.
59+As you work your way through these lessons you may want to work on example problems from the [Hoon Workbook](@/docs/tutorial/hoon/workbook/_index.md) for practice. Once you finish the lessons here you may want to write more versatile Hoon programs which can make use of more of your urbit's environment, in which case you'll want to check out the [Generators](@/docs/tutorials/hoon/generators.md) documentation. Learn about [Udon and Sail](@/docs/tutorials/sail-and-udon.md), Urbit's stripped-down version of Markdown, and a subset of Hoon used for generating XML nodes respectively.
60
60
61
61
62−> Last major revision of this section: February 2019
62+> Last major revision of this section: October 2019
tutorials/hoon-tutorial/ackermann.md → tutorials/hoon/ackermann.mdrenamed

The content is the same.

tutorials/hoon-tutorial/arms-and-cores.md → tutorials/hoon/arms-and-cores.mdrenamed

The content is the same.

tutorials/hoon-tutorial/atoms-auras-and-simple-cell-types.md → tutorials/hoon/atoms-auras-and-simple-cell-types.mdrenamed+1−1
@@ -18,7 +18,7 @@ In this lesson we'll cover (1)-(4) as they pertain to atoms and simple cell type
18
18
19## Atoms and Auras
19## Atoms and Auras
20
20
21−In [lesson 1.2](@/docs/hoon/hoon-tutorial/nouns.md) we defined what an atom is: any unsigned integer. In this lesson we'll expand on that discussion, going over how Hoon's type system implements auras.
21+In [lesson 1.2](@/docs/tutorials/hoon/nouns.md) we defined what an atom is: any unsigned integer. In this lesson we'll expand on that discussion, going over how Hoon's type system implements auras.
22
22
23In the most straightforward sense, atoms simply are unsigned integers. But they can also be interpreted as representing signed integers, ASCII symbols, floating-point values, dates, binary numbers, hexadecimal numbers, and more. Every atom is, in and of itself, just an unsigned integer; but Hoon keeps track of type information about each atom, and this info tells Hoon how to interpret the atom in question.
23In the most straightforward sense, atoms simply are unsigned integers. But they can also be interpreted as representing signed integers, ASCII symbols, floating-point values, dates, binary numbers, hexadecimal numbers, and more. Every atom is, in and of itself, just an unsigned integer; but Hoon keeps track of type information about each atom, and this info tells Hoon how to interpret the atom in question.
24
24
tutorials/hoon-tutorial/bank-account.md → tutorials/hoon/bank-account.mdrenamed

The content is the same.

tutorials/hoon-tutorial/caesar.md → tutorials/hoon/caesar.mdrenamed

The content is the same.

tutorials/hoon-tutorial/conditionals.md → tutorials/hoon/conditionals.mdrenamed

The content is the same.

tutorials/hoon-tutorial/doors.md → tutorials/hoon/doors.mdrenamed

The content is the same.

tutorials/hoon-tutorial/egg-timer.md → tutorials/hoon/egg-timer.mdrenamed

The content is the same.

tutorials/hoon-tutorial/fibonacci.md → tutorials/hoon/fibonacci.mdrenamed

The content is the same.

tutorials/hoon-tutorial/gall.md → tutorials/hoon/gall.mdrenamed

The content is the same.

tutorials/hoon-tutorial/gates.md → tutorials/hoon/gates.mdrenamed

The content is the same.

tutorials/hoon-tutorial/generators.md → tutorials/hoon/generators.mdrenamed

The content is the same.

tutorials/hoon-tutorial/hoon-syntax.md → tutorials/hoon/hoon-syntax.mdrenamed+7−7
@@ -84,7 +84,7 @@ We start with atom literals. Each of these is a basic expression of Hoon that e
84~zod
84~zod
85```
85```
86
86
87−Recall from [lesson 1.2](@/docs/hoon/hoon-tutorial/nouns.md) that even though atoms are unsigned integers, they can be pretty-printed in different ways. The way an atom is to be represented depends on its aura. The literal syntax for each of the hard-coded auras will be explained further in [lesson 2.4](@/docs/hoon/hoon-tutorial/atoms-auras-and-simple-cell-types.md).
87+Recall from [lesson 1.2](@/docs/tutorials/hoon/nouns.md) that even though atoms are unsigned integers, they can be pretty-printed in different ways. The way an atom is to be represented depends on its aura. The literal syntax for each of the hard-coded auras will be explained further in [lesson 2.4](@/docs/tutorials/hoon/atoms-auras-and-simple-cell-types.md).
88
88
89Cell literals can be written in Hoon using `[ ]`. Cell literals are complex, because other expressions are put inside the square brackets. Examples:
89Cell literals can be written in Hoon using `[ ]`. Cell literals are complex, because other expressions are put inside the square brackets. Examples:
90
90
@@ -111,7 +111,7 @@ You can also put complex expressions inside square brackets to make a cell. The
111
111
112### Wings
112### Wings
113
113
114−A wing expression is a series of limb expressions separated by `.`. A deeper explanation can be found on the [wing](@/docs/hoon/hoon-expressions/limb/wing.md) and [limb](@/docs/hoon/hoon-expressions/limb/limb.md) reference pages.
114+A wing expression is a series of limb expressions separated by `.`. A deeper explanation can be found on the [wing](@/docs/tutorials/hoon/limb/wing.md) and [limb](@/docs/tutorials/hoon/limb/limb.md) reference pages.
115
115
116Let's start with the base case: a single limb. A limb expression is a trivial wing expression -- there is only one limb in the series. Some one-limb wings:
116Let's start with the base case: a single limb. A limb expression is a trivial wing expression -- there is only one limb in the series. Some one-limb wings:
117
117
@@ -124,7 +124,7 @@ Let's start with the base case: a single limb. A limb expression is a trivial w
124- `add`
124- `add`
125- `mul`
125- `mul`
126
126
127−As a special limb we also have `$`. This is the name of the arm in special one-armed cores called "gates". (We'll cover the role of `$` in [lesson 1.5](@/docs/hoon/hoon-tutorial/gates.md).)
127+As a special limb we also have `$`. This is the name of the arm in special one-armed cores called "gates". (We'll cover the role of `$` in [lesson 1.5](@/docs/tutorials/hoon/gates.md).)
128
128
129Wing expressions with multiple limbs are complex expressions. Examples:
129Wing expressions with multiple limbs are complex expressions. Examples:
130
130
@@ -141,7 +141,7 @@ Wing expressions with multiple limbs are complex expressions. Examples:
141
141
142Hoon is a statically typed language. You'll learn more about the type system later in the chapter. For now, just know that Hoon's type system uses special symbols to indicate certain fundamental types: `~` (null), `*` (noun), `@` (atom), `^` (cell), and `?` (flag). Each of these symbols can be used as a stand-alone expression of Hoon. In the case of `@` there may be a series of letters following it, to indicate an atom aura; e.g., `@s`, `@rs`, `@tas`, and `@tD`.
142Hoon is a statically typed language. You'll learn more about the type system later in the chapter. For now, just know that Hoon's type system uses special symbols to indicate certain fundamental types: `~` (null), `*` (noun), `@` (atom), `^` (cell), and `?` (flag). Each of these symbols can be used as a stand-alone expression of Hoon. In the case of `@` there may be a series of letters following it, to indicate an atom aura; e.g., `@s`, `@rs`, `@tas`, and `@tD`.
143
143
144−They may also be put in brackets to indicate compound types, e.g., `[@ ^]`, `[@ud @sb]`, `[[? *] ^]`. (Technically these expressions don't _always_ indicate compound types. In certain contexts they're interpreted in a different way. We'll address this variation of meaning in [lesson 2.6](@/docs/hoon/hoon-tutorial/structures-and-complex-types.md).)
144+They may also be put in brackets to indicate compound types, e.g., `[@ ^]`, `[@ud @sb]`, `[[? *] ^]`. (Technically these expressions don't _always_ indicate compound types. In certain contexts they're interpreted in a different way. We'll address this variation of meaning in [lesson 2.6](@/docs/tutorials/hoon/structures-and-complex-types.md).)
145
145
146### Rune Expressions
146### Rune Expressions
147
147
@@ -151,7 +151,7 @@ Expressions with a rune at the beginning are rune expressions. Most runes are u
151
151
152Runes are classified by family (with the exceptions of `--` and `==`). The first of the two symbols indicates the family -- e.g., the `^-` rune is in the `^` family of runes, and the `|=` and `|%` runes are in the `|` family. The runes of particular family usually have related meanings. Two simple examples: the runes in the `|` family are all used to create cores, and the runes in the `:` family are all used to create cells.
152Runes are classified by family (with the exceptions of `--` and `==`). The first of the two symbols indicates the family -- e.g., the `^-` rune is in the `^` family of runes, and the `|=` and `|%` runes are in the `|` family. The runes of particular family usually have related meanings. Two simple examples: the runes in the `|` family are all used to create cores, and the runes in the `:` family are all used to create cells.
153
153
154−Rune expressions are usually complex, which means they usually have one or more subexpressions. The appropriate syntax varies from rune to rune; after all, they're used for different purposes. To see the syntax rules for a particular rune, consult the [rune reference](@/docs/hoon/hoon-expressions/rune/_index.md). Nevertheless, there are some general principles that hold of all rune expressions.
154+Rune expressions are usually complex, which means they usually have one or more subexpressions. The appropriate syntax varies from rune to rune; after all, they're used for different purposes. To see the syntax rules for a particular rune, consult the [rune reference](@/docs/reference/hoon-expressions/rune/_index.md). Nevertheless, there are some general principles that hold of all rune expressions.
155
155
156Runes generally do not need to be closed. In other languages you'll see an abundance of terminators, such as opening and closing parentheses, and this way of doing this is largely absent from Urbit. That's because all runes take a fixed number of children. Children can themselves be runes (with more children), and Hoon programs work by chaining through these series of children until a value -- not another rune -- is arrived at. This makes Hoon code nice and neat to look at.
156Runes generally do not need to be closed. In other languages you'll see an abundance of terminators, such as opening and closing parentheses, and this way of doing this is largely absent from Urbit. That's because all runes take a fixed number of children. Children can themselves be runes (with more children), and Hoon programs work by chaining through these series of children until a value -- not another rune -- is arrived at. This makes Hoon code nice and neat to look at.
157
157
@@ -250,7 +250,7 @@ The irregular `( )` gate-calling syntax is versatile -- it is also a shortcut fo
250
250
251The `( )` gate-calling syntax can be used for gates with any number of arguments.
251The `( )` gate-calling syntax can be used for gates with any number of arguments.
252
252
253−You can find other irregular forms in the irregular expression [reference document](@/docs/hoon/hoon-expressions/irregular.md).
253+You can find other irregular forms in the irregular expression [reference document](@/docs/reference/hoon-expressions/irregular.md).
254
254
255### Expressions That Are Only Irregular
255### Expressions That Are Only Irregular
256
256
@@ -285,7 +285,7 @@ b=[16 18]
285[16 18]
285[16 18]
286```
286```
287
287
288−To see other irregular expressions, check the irregular expression [reference document](@/docs/hoon/hoon-expressions/irregular.md).
288+To see other irregular expressions, check the irregular expression [reference document](@/docs/reference/hoon-expressions/irregular.md).
289
289
290
290
291## The Standard Library
291## The Standard Library
tutorials/hoon-tutorial/iron-polymorphism.md → tutorials/hoon/iron-polymorphism.mdrenamed

The content is the same.

tutorials/hoon-tutorial/lead-polymorphism.md → tutorials/hoon/lead-polymorphism.mdrenamed

The content is the same.

tutorials/hoon-tutorial/libraries.md → tutorials/hoon/libraries.mdrenamed

The content is the same.

tutorials/hoon-tutorial/list-of-numbers.md → tutorials/hoon/list-of-numbers.mdrenamed+1−1
@@ -107,7 +107,7 @@ $(count (add 1 count))
107
107
108The above code is, once again, a compact way of writing a rune expression. All you need to know is that this line of code restarts the program at `|-`, except with the value stored in `count` incremented by 1. The construction of `(count (add 1 count))` tells the computer, "replace the value of count with count+1".
108The above code is, once again, a compact way of writing a rune expression. All you need to know is that this line of code restarts the program at `|-`, except with the value stored in `count` incremented by 1. The construction of `(count (add 1 count))` tells the computer, "replace the value of count with count+1".
109
109
110−You'll notice that we use an unfamiliar word here: `add`. Unlike `count` and `end`, `add` is not defined anywhere in our program. That's because it's a gate that's predefined in the Hoon **standard library**. The standard library is filled with pre-defined gates that are generally useful, and these gates can be used just like something that you defined in your own program. You can see this gate, and other mathematical operators, in [section 1a](@/docs/hoon/library/1a.md) of the standard-library documentation.
110+You'll notice that we use an unfamiliar word here: `add`. Unlike `count` and `end`, `add` is not defined anywhere in our program. That's because it's a gate that's predefined in the Hoon **standard library**. The standard library is filled with pre-defined gates that are generally useful, and these gates can be used just like something that you defined in your own program. You can see this gate, and other mathematical operators, in [section 1a](@/docs/reference/library/1a.md) of the standard-library documentation.
111
111
112## Explanation
112## Explanation
113
113
tutorials/hoon-tutorial/lists.md → tutorials/hoon/lists.mdrenamed

The content is the same.

tutorials/hoon-tutorial/molds.md → tutorials/hoon/molds.mdrenamed

The content is the same.

tutorials/hoon-tutorial/nouns.md → tutorials/hoon/nouns.mdrenamed

The content is the same.

tutorials/hoon-tutorial/recursion.md → tutorials/hoon/recursion.mdrenamed+1−1
@@ -179,7 +179,7 @@ of. That's because a gate is just a core with a single arm named `$`. The
179subject is searched depth-first, head before tail, with faces skipped, and
179subject is searched depth-first, head before tail, with faces skipped, and
180stopping on the first result. In other words, the first match found in the head
180stopping on the first result. In other words, the first match found in the head
181will be returned. If you wished to refer to the outer `$` in this context, the
181will be returned. If you wished to refer to the outer `$` in this context, the
182−idiomatic way would be to use [`^$`](@/docs/hoon/hoon-expressions/rune/ket.md). The `^` operator
182+idiomatic way would be to use [`^$`](@/docs/reference/hoon-expressions/rune/ket.md). The `^` operator
183skips the first match of a name.
183skips the first match of a name.
184
184
185### Exercises
185### Exercises
tutorials/hoon-tutorial/setup.md → tutorials/hoon/setup.mdrenamed+1−1
@@ -61,7 +61,7 @@ You'll see:
6117
6117
62```
62```
63
63
64−You asked dojo to evaluate `17` and it echoed the number back at you. This value is a 'noun'. We'll talk more about nouns in [Chapter 1.2](docs/hoon/hoon-tutorial/nouns/), but first let's write a very basic program.
64+You asked dojo to evaluate `17` and it echoed the number back at you. This value is a 'noun'. We'll talk more about nouns in [Chapter 1.2](docs/hoon/nouns/), but first let's write a very basic program.
65
65
66## Generators
66## Generators
67
67
tutorials/hoon-tutorial/structures-and-complex-types.md → tutorials/hoon/structures-and-complex-types.mdrenamed+1−1
@@ -352,6 +352,6 @@ Often `$@` is used to define a type with a null or trivial case for the `@` case
352
352
353Now the `~` value is included as a possible value for `user`.
353Now the `~` value is included as a possible value for `user`.
354
354
355−That's all we have to say about types in this chapter. More on types in [Chapter 3](@/docs/hoon/hoon-tutorial/type-polymorphism.md).
355+That's all we have to say about types in this chapter. More on types in [Chapter 2](@/docs/tutorials/hoon/type-polymorphism.md).
356
356
357### [Next Up: Walkthrough -- Libraries](../libraries)
357### [Next Up: Walkthrough -- Libraries](../libraries)
tutorials/hoon-tutorial/style.md → tutorials/hoon/style.mdrenamed+1−1
@@ -41,7 +41,7 @@ or
41```
41```
42
42
43These are regular forms -- every rune can be written this way.
43These are regular forms -- every rune can be written this way.
44−Hoon also has a variety of wide [irregular forms](@/docs/hoon/hoon-expressions/irregular.md). All tall
44+Hoon also has a variety of wide [irregular forms](@/docs/reference/hoon-expressions/irregular.md). All tall
45forms are regular. All code within a wide form is wide.
45forms are regular. All code within a wide form is wide.
46Almost all code has both wide and tall forms, the exception
46Almost all code has both wide and tall forms, the exception
47being named cores.
47being named cores.
tutorials/hoon-tutorial/the-subject-and-its-legs.md → tutorials/hoon/the-subject-and-its-legs.mdrenamed

The content is the same.

tutorials/hoon-tutorial/trees-sets-and-maps.md → tutorials/hoon/trees-sets-and-maps.mdrenamed

The content is the same.

tutorials/hoon-tutorial/type-checking-and-type-inference.md → tutorials/hoon/type-checking-and-type-inference.mdrenamed

The content is the same.

tutorials/hoon-tutorial/type-polymorphism.md → tutorials/hoon/type-polymorphism.mdrenamed

The content is the same.

tutorials/hoon/workbook/_index.mdnew file+17
@@ -0,0 +1,17 @@
1++++
2+title = "Hoon Workbook"
3+weight = 150
4+sort_by = "weight"
5+template = "sections/docs/chapters.html"
6+aliase = ["docs/learn/hoon/workbook/"]
7++++
8+The Workbook is the place to sharpen your Hoon skills. Each entry in the
9+Workbook is a code walkthrough followed by exercises.
10+
11+- The [Digits](@/docs/tutorials/hoon/workbook/digits.md) example demonstrates how to decompose a number into a list of its digits.
12+
13+- The [Magic 8-Ball](@/docs/tutorials/hoon/workbook/eightball.md) example emulates everyone's favorite decision-making machine.
14+
15+- The [Traffic-light](@/docs/tutorials/hoon/workbook/traffic-light.md) example demonstrates how to creates a state machine in Hoon.
16+
17+- The [Bomb-defusing](@/docs/tutorials/hoon/workbook/bomb.md) exercise shows how to program, well, a bomb-defusing scenario.
tutorials/hoon-tutorial/workbook/bomb.md → tutorials/hoon/workbook/bomb.mdrenamed

The content is the same.

tutorials/hoon-tutorial/workbook/digits.md → tutorials/hoon/workbook/digits.mdrenamed+1−1
@@ -22,7 +22,7 @@ of its digits.
22==
22==
23```
23```
24
24
25−We're creating a [`%say` generator](@/docs/hoon/hoon-tutorial/generators.md). That means we
25+We're creating a [`%say` generator](@/docs/tutorials/hoon/generators.md). That means we
26need some "boilerplate" code in the format of `[%say [%noun "data"]]`:
26need some "boilerplate" code in the format of `[%say [%noun "data"]]`:
27
27
28```hoon
28```hoon
tutorials/hoon-tutorial/workbook/eightball.md → tutorials/hoon/workbook/eightball.mdrenamed+1−1
@@ -60,7 +60,7 @@ is good practice whenever developing something in Hoon.
60
60
61To make our program produce a random result, we need entropy. To get entropy,
61To make our program produce a random result, we need entropy. To get entropy,
62we need data from Arvo. To get data from Arvo, we use a generator of the
62we need data from Arvo. To get data from Arvo, we use a generator of the
63−[`%say`](@/docs/hoon/hoon-tutorial/generators.md) variety. The above code chunk is
63+[`%say`](@/docs/tutorials/hoon/generators.md) variety. The above code chunk is
64the template that is followed for all `%say` generators.
64the template that is followed for all `%say` generators.
65
65
66`:- %say` creates a cell with `%say` as that cell's head to define
66`:- %say` creates a cell with `%say` as that cell's head to define
tutorials/hoon-tutorial/workbook/traffic-light.md → tutorials/hoon/workbook/traffic-light.mdrenamed+2−2
@@ -37,7 +37,7 @@ Let's look at the code piece-by-piece.
37```
37```
38
38
39Here's the boilerplate code to designate our generator as being a
39Here's the boilerplate code to designate our generator as being a
40−[`%say` generator](@/docs/hoon/hoon-tutorial/generators.md). We're using this variant because
40+[`%say` generator](@/docs/tutorial/hoon/generators.md). We're using this variant because
41it allows us to run the generator without any arguments. It's otherwise not
41it allows us to run the generator without any arguments. It's otherwise not
42relevant to the functionality of our program.
42relevant to the functionality of our program.
43
43
@@ -98,7 +98,7 @@ We first produce a core with one arm named `$`. That `$` arm will produce a new
98core with `current-state` changed to match the `s` provided when it was called.
98core with `current-state` changed to match the `s` provided when it was called.
99How does this work?
99How does this work?
100
100
101−Remember that `.` is [wing syntax](@/docs/hoon/hoon-expressions/limb/wing.md) that
101+Remember that `.` is [wing syntax](@/docs/reference/hoon-expressions/limb/wing.md) that
102applies the wing expression on the left of it to the noun to the right of it.
102applies the wing expression on the left of it to the noun to the right of it.
103`$` is the arm of the core. Then by using the wing expression `+>`, which means
103`$` is the arm of the core. Then by using the wing expression `+>`, which means
104"return the head of the tail", we traverse the subject to the core to latch onto
104"return the head of the tail", we traverse the subject to the core to latch onto
tutorials/nock/_index.md+4−4
@@ -9,18 +9,18 @@ aliases = ["docs/learn/nock/"]
9
9
10Nock is the low-level functional programming language that is interpreted by Vere. You don't need to know Nock to write Hoon, or even to work on most parts of Vere. But if you want to understand the foundations of Urbit and are mathematically-inclined, dive right in.
10Nock is the low-level functional programming language that is interpreted by Vere. You don't need to know Nock to write Hoon, or even to work on most parts of Vere. But if you want to understand the foundations of Urbit and are mathematically-inclined, dive right in.
11
11
12−## [Nock Definition](@/docs/nock/definition.md)
12+## [Nock Definition](@/docs/tutorials//nock/definition.md)
13
13
14The Nock specification.
14The Nock specification.
15
15
16−## [An explanation of Nock](@/docs/nock/explanation.md)
16+## [An explanation of Nock](@/docs/tutorials/nock/explanation.md)
17
17
18A comprehensive walkthrough of the Nock spec.
18A comprehensive walkthrough of the Nock spec.
19
19
20−## [Nock by hand](@/docs/nock/example.md)
20+## [Nock by hand](@/docs/tutorials/nock/example.md)
21
21
22Learn Nock by example.
22Learn Nock by example.
23
23
24−## [Nock Implementations](@/docs/nock/implementations.md)
24+## [Nock Implementations](@/docs/tutorials/nock/implementations.md)
25
25
26The many ways that Nock has been implemented.
26The many ways that Nock has been implemented.
tutorials/nock/implementations.md+1−1
@@ -34,7 +34,7 @@ We use a C implementation for our Nock interpreter. But building a Nock interpre
34
34
35The actual production Nock interpreter. Note gotos for tail-call elimination,
35The actual production Nock interpreter. Note gotos for tail-call elimination,
36and manual reference counting. More about the C environment can be found
36and manual reference counting. More about the C environment can be found
37−in the [runtime system documentation](@/docs/vere/runtime.md).
37+in the [runtime system documentation](@/docs/learn/vere/runtime.md).
38```
38```
39/* _n_nock_on(): produce .*(bus fol). Do not virtualize.
39/* _n_nock_on(): produce .*(bus fol). Do not virtualize.
40*/
40*/
tutorials/vere/_index.md+5−5
@@ -11,26 +11,26 @@ Keep reading if you're planning to work on the Urbit interpreter, you're a
11language implementation geek, or you don't really understand anything until
11language implementation geek, or you don't really understand anything until
12you've seen the actual structs.
12you've seen the actual structs.
13
13
14−## [C runtime system](@/docs/vere/runtime.md)
14+## [C runtime system](@/docs/tutorials/vere/runtime.md)
15
15
16The Urbit interpreter is built on a Nock runtime system written
16The Urbit interpreter is built on a Nock runtime system written
17in C, `u3`. This section is a relatively complete description.
17in C, `u3`. This section is a relatively complete description.
18
18
19−## [c3: C in Urbit](@/docs/vere/c.md)
19+## [c3: C in Urbit](@/docs/tutorials/c.md)
20
20
21Under `u3` is the simple `c3` layer, which is just how we write C
21Under `u3` is the simple `c3` layer, which is just how we write C
22in Urbit.
22in Urbit.
23
23
24−## [u3: Land of nouns](@/docs/vere/nouns.md)
24+## [u3: Land of nouns](@/docs/tutorials/nouns.md)
25
25
26The division between `c3` and `u3` is that you could theoretically
26The division between `c3` and `u3` is that you could theoretically
27imagine using `c3` as just a generic C environment. Anything to do
27imagine using `c3` as just a generic C environment. Anything to do
28with nouns is in `u3`.
28with nouns is in `u3`.
29
29
30−## [u3: API overview by prefix](@/docs/vere/api.md)
30+## [u3: API overview by prefix](@/docs/tutorials/api.md)
31
31
32A walkthrough of each of the `u3` modules.
32A walkthrough of each of the `u3` modules.
33
33
34−## [How to write a jet](@/docs/vere/jetting.md)
34+## [How to write a jet](@/docs/tutorials/jetting.md)
35
35
36A jetting guide by for new Urbit developers.
36A jetting guide by for new Urbit developers.
tutorials/vere/jetting.md+2−2
@@ -505,7 +505,7 @@ A `u3_noun` will want to be further disassembled into atoms.
505A `u3_atom` represents a simple number, but the implementation may or
505A `u3_atom` represents a simple number, but the implementation may or
506may not be simple. If the value held in the atom is 31 bits or less,
506may not be simple. If the value held in the atom is 31 bits or less,
507it's stored directly in the atom. If the value is 32 bits the atom
507it's stored directly in the atom. If the value is 32 bits the atom
508−holds a pointer into the loom where the actual value is stored. ( see [Nouns](@/docs/vere/nouns.md) )
508+holds a pointer into the loom where the actual value is stored. ( see [Nouns](@/docs/tutorials/vere/nouns.md) )
509
509
510You don't want to get bogged down in the details of this -- you just
510You don't want to get bogged down in the details of this -- you just
511want to get data out of your atoms.
511want to get data out of your atoms.
@@ -618,7 +618,7 @@ are just recursive calls to the cell constructor `u3i_cell()` e.g.
618 u3i_cell(a, u3i_cell(b, u3i_cell(c, d));
618 u3i_cell(a, u3i_cell(b, u3i_cell(c, d));
619```
619```
620
620
621−Understanding the memory model, allocation, freeing, and ownership ('transfer' vs 'retain' semantics) is important. Some info is available at [Nouns](@/docs/vere/nouns.md).
621+Understanding the memory model, allocation, freeing, and ownership ('transfer' vs 'retain' semantics) is important. Some info is available at [Nouns](@/docs/tutorials/vere/nouns.md).
622
622
623## Compile the C code
623## Compile the C code
624
624