on master help sign in
fix unconverted udon headers
commitf1229c17b955540fd2cbc760a26506f7b549406d authorMorgan Sutherland <morgan@morgansutherland.com> dateTue 7 May 2019, 22:01 (7 years ago) parent0585661
24 files changed+154−770
introduction/installing-urbit.md+1−5 learn/arvo/ames.md+1−5 learn/arvo/clay.md+2−10 learn/arvo/eyre.md+3−15 learn/arvo/ford.md+1−5 learn/arvo/gall.md+9−45 learn/arvo/hall.md+5−25 learn/nock/implementations.md+11−55 reference/glossary.md+1−5 reference/hoon-expressions/rune/bar.md+11−55 reference/hoon-expressions/rune/buc.md+10−50 reference/hoon-expressions/rune/cen.md+9−45 reference/hoon-expressions/rune/col.md+7−35 reference/hoon-expressions/rune/constants.md+4−20 reference/hoon-expressions/rune/dot.md+5−25 reference/hoon-expressions/rune/ket.md+10−50 reference/hoon-expressions/rune/lus.md+4−20 reference/hoon-expressions/rune/mic.md+7−35 reference/hoon-expressions/rune/sig.md+12−60 reference/hoon-expressions/rune/terminators.md+2−10 reference/hoon-expressions/rune/tis.md+14−70 reference/hoon-expressions/rune/wut.md+13−65 reference/hoon-expressions/rune/zap.md+6−30 using/udon.md+6−30
introduction/installing-urbit.md+1−5
@@ -197,11 +197,7 @@ One you've completed your installation, you can continue on to the instructions
197197Or, if you want to try testing and writing code, check out the guide to [getting an unnetworked development ship](../creating-a-development-ship).
198198
199199
200−;=
201− ;h2
202− ;div(id "swap"): Set Up Swap
203− ==
204−==
200+## Set Up Swap
205201
206202If you're running Urbit in the cloud on a small instance, you may need to additionally configure swap space. If you're not, you can safely ignore this section.
207203
learn/arvo/ames.md+1−5
@@ -22,11 +22,7 @@ routing is handled entirely in `%ames`. Finally, the actual `%ames`
2222protocol itself, including how to route incoming packets to the correct
2323vane or app, is defined in `%ames`.
2424
25−;=
26− ;h2
27− ;div(id "commentary"): Commentary
28− ==
29−==
25+## Commentary
3026
3127`%ames` is our networking protocol.
3228
learn/arvo/clay.md+2−10
@@ -20,11 +20,7 @@ zuse. Second is the write, query, and subscription logic. Finally, there
2020is the logic for communicating requests to, and receiving requests from,
2121foreign ships.
2222
23−;=
24− ;h2
25− ;div(id "architecture"): Architecture
26− ==
27−==
23+## Architecture
2824
2925Clay is the primary filesystem for the arvo operating system,
3026which is the core of an urbit. The architecture of clay is
@@ -440,11 +436,7 @@ the other desk, or both desks do not exist. The sync will be
440436activated when the upstream desk comes into existence and will
441437create the downstream desk if needed.
442438
443−;=
444− ;h2
445− ;div(id "commentary"): Commentary
446− ==
447−==
439+## Commentary
448440
449441The first part of this section will be reference documentation for the data
450442types used by our filesystem. In fact, as a general guide, we recommend
learn/arvo/eyre.md+3−15
@@ -16,11 +16,7 @@ essentially stateless, like functional publishing with `%ford`.
1616Additionally, there's a fairly significant component that handles
1717`%gall` messaging and subscriptions, which must be stateful.
1818
19−;=
20− ;h2
21− ;div(id "reference"): Reference
22− ==
23−==
19+## Reference
2420
2521### State
2622
@@ -45,11 +41,7 @@ Runtime
4541- `++ya`
4642- `++ix`
4743
48−;=
49− ;h2
50− ;div(id "commentary"): Commentary
51− ==
52−==
44+## Commentary
5345
5446
5547Let us follow the loading of a simple cli app, as it bounces from
@@ -293,11 +285,7 @@ infrastructure crumbles around you, only imported martian networking can be
293285trusted: the `%get` and `%got` [gram]()s are used to proxy [`%this` requests]() and
294286[`%thou` responses]() respectively.
295287
296−;=
297− ;h2
298− ;div(id "specification"): Specification
299− ==
300−==
288+## Specification
301289
302290The `%eyre` vane serves one purpose: receiving inbound HTTP requests from browsers and clients pretending to be browsers. To facilitate this communication, `%eyre` does two things: 1. provide an API for traditional clients to talk to; and 2. provide a mechanism for saving state that allows the server to keep track of identities/sessions, subscription data, and active connections.
303291
learn/arvo/ford.md+1−5
@@ -104,11 +104,7 @@ Slaps a hoon against a subject silk. The mark of the result is `%noun`.
104104Validates untyped data from a ship against a given mark. This is an
105105extremely useful function.
106106
107−;=
108− ;h2
109− ;div(id "runes"): Ford runes
110− ==
111−==
107+## Ford runes
112108
113109One of the most common ways to use ford is through ford's runes, all of which begin with `/` ("net"). A ford rune runs a step of a ford build and places the result in the subject. There are various kinds of build steps, some of which take other build steps as parameters. The most common pattern is to have a sequence of ford runes at the top of a hoon source file that import the results of evaluating other hoon files. This is how we "import a library" in urbit: we add the result of compiling another hoon file into the current subject, possibly renaming it by wrapping a face around it.
114110
learn/arvo/gall.md+9−45
@@ -10,11 +10,7 @@ This is documentation about how to write Gall apps. Some knowledge of Hoon is a
1010 always accessible enough to beginners. We are planning to rewrite these in the
1111 near future. There is still useful information to be found in the meantime.
1212
13−;=
14− ;h2
15− ;div(id "api"): API Connectors
16− ==
17−==
13+## API Connectors
1814
1915> Note: This lesson depends on some code that needs to be updated before the examples will work correctly. This will be addressed in the near future. We apologize!
2016
@@ -517,11 +513,7 @@ this doc:
517513--
518514```
519515
520−;=
521− ;h2
522− ;div(id "generators"): Generators
523− ==
524−==
516+## Generators
525517
526518Up until now we've poked apps directly. This requires the user to
527519specify the mark, and it requires the app to accept the arguments in a
@@ -685,11 +677,7 @@ Which causes `~sampel-sipnym` to print `[%receiving 'howdy']` and
685677- Create a generator for `:click` from [Web Apps](#backend) so that you can run `:click|poke` to poke it.
686678
687679
688−;=
689− ;h2
690− ;div(id "http"): Writing an HTTP Request
691− ==
692−==
680+## Writing an HTTP Request
693681
694682There's a variety of arvo services we haven't touched on yet.
695683Let's figure out how to make HTTP requests and set timers.
@@ -897,11 +885,7 @@ Let's try it out:
897885~fintud-macrep:dojo> :up &atom 'off'
898886```
899887
900−;=
901− ;h2
902− ;div(id "marks"): Marks
903− ==
904−==
888+## Marks
905889
906890We've used predefined marks already, but we haven't yet created
907891our own marks. Let's write a sample mark of our own, then chain
@@ -1022,11 +1006,7 @@ mark.
10221006
10231007The minimal correct input, then, is `&mime &hymn &cord &atom 17`.
10241008
1025−;=
1026− ;h2
1027− ;div(id "network"): Network Messages
1028− ==
1029−==
1009+## Network Messages
10301010
10311011In the following we assume that you have some knowledge of Hoon. If you don't, check out chapters 1 and 2 of the Hoon tutorial and check back when you're ready.
10321012
@@ -1373,11 +1353,7 @@ urbit as for sending messages between apps on different urbits.
13731353- Put `even` and `odd` on two separate urbits and pass the messages over the network. Post a link to a working solution in :talk to receive a cookie.
13741354
13751355
1376−;=
1377− ;h2
1378− ;div(id "security"): Security Drivers
1379− ==
1380−==
1356+## Security Drivers
13811357
13821358A security driver is a file in `/=home=/sec/<tld>/<domain>/hoon`
13831359that handles the authentication for all HTTP requests to
@@ -1651,11 +1627,7 @@ library.
16511627Remember, of course, that the best strategy for building security
16521628drivers is to copy a similar one and tweak it to taste.
16531629
1654−;=
1655− ;h2
1656− ;div(id "state"): State
1657− ==
1658−==
1630+## State
16591631
16601632In the last section we built a few small apps that sent moves. These apps were
16611633entirely stateless, however. Most useful apps require some amount of state.
@@ -1772,11 +1744,7 @@ Sample output:
17721744```
17731745
17741746
1775−;=
1776− ;h2
1777− ;div(id "subscriptions"): Subscriptions
1778− ==
1779−==
1747+## Subscriptions
17801748
17811749We've dealt fairly extensively with "poke" messages to an app, but these
17821750are somewhat limited. A poke is a one-way message, but more often we
@@ -2102,11 +2070,7 @@ nullability. If `err` is `~`, then the subscription was successful and we tell
21022070that to the user. Otherwise, we print out the error message.
21032071
21042072
2105−;=
2106− ;h2
2107− ;div(id "backend"): Backend
2108− ==
2109−==
2073+## Backend
21102074
21112075We've done purely functional web pages as hook files, and we've
21122076done command line apps, so now let's interact with an app over
learn/arvo/hall.md+5−25
@@ -17,11 +17,7 @@ Hall is the Urbit messaging and notifications protocol. This document details Ha
1717
1818- #### [The New Gall Model](#new-gall)
1919
20−;=
21− ;h1
22− ;div(id "architecture"): Hall Architecture
23− ==
24−==
20+# Hall Architecture
2521
2622This document is complemented by Hall's source code, but doesn't require it. Definitions of data structures, code snippets and diagrams will be provided where useful.
2723
@@ -512,11 +508,7 @@ To gain a more thorough understanding of Hall's inner workings, take a look at i
512508To see an expansive example of a Hall client, take a look at the code of Talk. It, too, comes with inline documentation.
513509[On Github.](https://github.com/urbit/arvo/blob/master/app/talk.hoon)
514510
515−;=
516− ;h1
517− ;div(id "interface"): The Hall Interface
518− ==
519−==
511+# The Hall Interface
520512
521513This document describes the different interfaces Hall provides and the data that is accessible and modifiable through them. Knowledge of the Urbit application model (including [new gall](#new-gall)) and [Hall's architecture](#architecture) is assumed.
522514
@@ -878,11 +870,7 @@ When the user makes any changes to shared UI elements (elements that should pers
878870
879871`%public`: Adds or removes a circle to/from the user's public membership list.
880872
881−;=
882− ;h1
883− ;div(id "new-gall"): The New Gall Model
884− ==
885−==
873+# The New Gall Model
886874
887875This document is complemented by the source code of applications that use the new Gall model (like [Hall](https://github.com/urbit/arvo/blob/master/app/hall.hoon)), but doesn't require it. Code snippets will be provided where useful. Some knowledge of Hoon and the functioning of Hoon apps is assumed.
888876
@@ -1106,11 +1094,7 @@ As we saw earlier, for `/number` queries the `delta`s match one-on-one with the
11061094- Gall should probably cache `++feel` results during a single pass, to avoid the cycles of generating what it can be certain of is the same `(unit rumor)`. (But then for eg `/circle/nom/13` and `/circle/nom/14` it would still recalculate. Better than nothing.)
11071095
11081096
1109−;=
1110− ;h2
1111− ;div(id "spec"): The original new-Gall spec
1112− ==
1113−==
1097+## The original new-Gall spec
11141098
11151099`~sorreg-namtyv`
11161100
@@ -1266,11 +1250,7 @@ As we saw earlier, for `/number` queries the `delta`s match one-on-one with the
12661250--
12671251```
12681252
1269−;=
1270− ;h2
1271− ;div(id "example"): A new-Gall example app
1272− ==
1273−==
1253+## A new-Gall example app
12741254
12751255```
12761256:: counter app
learn/nock/implementations.md+11−55
@@ -29,11 +29,7 @@ We use a C implementation for our Nock interpreter. But building a Nock interpre
2929
3030- #### [Swift](#swift)
3131
32−;=
33− ;h2
34− ;div(id "C"): C Implementation
35− ==
36−==
32+## C Implementation
3733
3834The actual production Nock interpreter. Note gotos for tail-call elimination,
3935and manual reference counting. More about the C environment can be found
@@ -282,11 +278,7 @@ _n_nock_on(u3_noun bus, u3_noun fol)
282278}
283279```
284280
285−;=
286− ;h2
287− ;div(id "clojure"): Clojure
288− ==
289−==
281+## Clojure
290282
291283From [Matt Earnshaw](https://github.com/mattearnshaw/anock/blob/master/src/anock/core.clj):
292284
@@ -405,11 +397,7 @@ From [Matt Earnshaw](https://github.com/mattearnshaw/anock/blob/master/src/anock
405397 (apply* bracket nouns)))
406398```
407399
408−;=
409− ;h2
410− ;div(id "c-sharp"): C#
411− ==
412−==
400+## C#
413401
414402
415403From [Julien Beasley](https://github.com/zass30/Nock5KCSharp):
@@ -882,11 +870,7 @@ namespace NockInterpreter
882870}
883871```
884872
885−;=
886− ;h2
887− ;div(id "groovy"): Groovy
888− ==
889−==
873+## Groovy
890874
891875From [Kohányi Róbert](https://github.com/kohanyirobert/gnock/blob/master/gnock.groovy):
892876
@@ -1086,11 +1070,7 @@ def tar(def a, def r) {
10861070}
10871071```
10881072
1089−;=
1090− ;h2
1091− ;div(id "haskell"): Haskell
1092− ==
1093−==
1073+## Haskell
10941074
10951075From [Steve Dee](https://github.com/mrdomino/hsnock/blob/master/Language/Nock5K/Spec.hs):
10961076
@@ -1196,11 +1176,7 @@ tar a = Left "*a"
11961176==
11971177```
11981178
1199−;=
1200− ;h2
1201− ;div(id "javascript"): JavaScript
1202− ==
1203−==
1179+## JavaScript
12041180
12051181From [Joe Bryan](https://github.com/joemfb/nock.js/blob/master/nock.js):
12061182
@@ -1559,11 +1535,7 @@ From [Joe Bryan](https://github.com/joemfb/nock.js/blob/master/nock.js):
15591535}))
15601536```
15611537
1562−;=
1563− ;h2
1564− ;div(id "python"): Python
1565− ==
1566−==
1538+## Python
15671539
15681540From [James Tauber](https://github.com/jtauber/pynock/blob/master/nock.py):
15691541
@@ -1652,11 +1624,7 @@ def tar(noun):
16521624 return (nock((noun[0], noun[1][0])), nock((noun[0], noun[1][1])))
16531625```
16541626
1655−;=
1656− ;h2
1657− ;div(id "ruby"): Ruby
1658− ==
1659−==
1627+## Ruby
16601628
16611629From [T.J. Corcoran](https://github.com/TJamesCorcoran/nock/blob/master/nock.rb):
16621630
@@ -1789,11 +1757,7 @@ def nock(arr)
17891757end
17901758```
17911759
1792−;=
1793− ;h2
1794− ;div(id "scala"): Scala
1795− ==
1796−==
1760+## Scala
17971761
17981762From [Steve Randy Waldman](https://github.com/swaldman/nnnock/blob/master/src/main/scala/com/mchange/sc/v1/nnnock/package.scala):
17991763
@@ -1875,11 +1839,7 @@ package object nnnock {
18751839 }
18761840```
18771841
1878−;=
1879− ;h2
1880− ;div(id "scheme"): Scheme
1881− ==
1882−==
1842+## Scheme
18831843
18841844From [Kohányi Róbert](https://github.com/kohanyirobert/snock/blob/master/snock.ss):
18851845
@@ -2001,11 +1961,7 @@ From [Kohányi Róbert](https://github.com/kohanyirobert/snock/blob/master/snock
20011961 (else (raise 13)))))))))))))
20021962```
20031963
2004−;=
2005− ;h2
2006− ;div(id "swift"): Swift
2007− ==
2008−==
1964+## Swift
20091965
20101966```
20111967import Foundation
reference/glossary.md+1−5
@@ -474,11 +474,7 @@ _More information can be found in the [hoon](/docs/learn/arvo/hoon) section._
474474 expression source (a [hoon](#a-hoon), for example) and produces the product
475475 type and nock formula. So [type hoon] is mapped to [type nock].
476476
477−;=
478− ;h3
479− ;div(id "a-hoon"): hoon
480− ==
481−==
477+### hoon
482478
483479A _hoon_ (lowercase) is the result of parsing a Hoon source expression into an
484480AST node. These AST nodes are nouns, like all other Hoon data. Because every
reference/hoon-expressions/rune/bar.md+11−55
@@ -13,11 +13,7 @@ with changes, which useful for recursion among other things:
1313
1414## Runes
1515
16−;=
17− ;h3
18− ;div(id "barcab"): |_ "barcab"
19− ==
20−==
16+### |_ "barcab"
2117
2218Produce a *door* (a core with a sample).
2319
@@ -107,11 +103,7 @@ The `ne` door prints a digit in base 10, 16, 32 or 64:
107103'c'
108104```
109105
110−;=
111− ;h3
112− ;div(id "barcen"): |% "barcen"
113− ==
114−==
106+### |% "barcen"
115107
116108Produce a core, `[battery payload]`.
117109
@@ -171,11 +163,7 @@ A trivial core:
171163101
172164```
173165
174−;=
175− ;h3
176− ;div(id "barcol"): |: "barcol"
177− ==
178−==
166+### "barcol"
179167
180168Produce a gate with a custom sample.
181169
@@ -223,11 +211,7 @@ This is useful if you want a gate to have a sample of a particular type, but you
22321112
224212```
225213
226−;=
227− ;h3
228− ;div(id "bardot"): |. "bardot"
229− ==
230−==
214+### |. "bardot"
231215
232216Produce a trap (a core with one arm `$`).
233217
@@ -295,11 +279,7 @@ trap, since it's a core with an `$` arm.
295279
296280> `$(...)` expands to `%=($ ...)` (["centis"](/docs/reference/hoon-expressions/rune/cen#centis)).
297281
298−;=
299− ;h3
300− ;div(id "barhep"): |- "barhep"
301− ==
302−==
282+### |- "barhep"
303283
304284Produce a trap (a core with one arm `$`) and evaluate it.
305285
@@ -355,11 +335,7 @@ The classic loop is a decrement:
35533541
356336```
357337
358−;=
359− ;h3
360− ;div(id "barket"): |^ "barket"
361− ==
362−==
338+### |^ "barket"
363339
364340Produce a core whose battery includes a `$` arm and compute the latter.
365341
@@ -418,11 +394,7 @@ A trivial example:
418394100
419395```
420396
421−;=
422− ;h3
423− ;div(id "barsig"): |~ "barsig"
424− ==
425−==
397+### |~ "barsig"
426398
427399Produce an iron gate.
428400
@@ -461,11 +433,7 @@ See [this discussion of core variance models](/docs/reference/hoon-expressions/a
461433<1|usl {a/@ $~}>
462434```
463435
464−;=
465− ;h3
466− ;div(id "bartar"): |* "bartar"
467− ==
468−==
436+### |* "bartar"
469437
470438Produce a wet gate (one-armed core with sample).
471439
@@ -531,11 +499,7 @@ Wet and dry gates in a nutshell:
531499The dry gate does not preserve the type of `a` and `b`; the wet
532500gate does.
533501
534−;=
535− ;h3
536− ;div(id "bartis"): |= "bartis"
537− ==
538−==
502+### |= "bartis"
539503
540504Produce a gate (a one-armed core with a sample).
541505
@@ -595,11 +559,7 @@ A slightly less trivial gate:
595559430
596560```
597561
598−;=
599− ;h3
600− ;div(id "barvat"): |@ "barvat"
601− ==
602−==
562+### |@ "barvat"
603563
604564Produce a 'wet' core `[battery payload]`.
605565
@@ -632,11 +592,7 @@ A `|@` expression produces a 'wet' core whose payload is the expression's subjec
632592
633593The `|@` 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).
634594
635−;=
636− ;h3
637− ;div(id "barwut"): |? "barwut"
638− ==
639−==
595+### |? "barwut"
640596
641597Produce a lead trap.
642598
reference/hoon-expressions/rune/buc.md+10−50
@@ -32,11 +32,7 @@ instance, `(map foo bar)` is a table from mold `foo` to mold
3232`bar`. `map` is not a mold; it's a function that makes a mold.
3333Molds and mold builders are generally described together.
3434
35−;=
36− ;h2
37− ;div(id "base"): Base Structures
38− ==
39−==
35+## Base Structures
4036
4137`[%base p=$@(?(%noun %cell %bean %null) [%atom p=aura])]`: trivial structures (types).
4238
@@ -55,11 +51,7 @@ Irregular: `*` makes `%noun`, `^` makes `%cell`, `?` makes
5551
5652## Runes
5753
58−;=
59− ;h3
60− ;div(id "buccab"): $_ "buccab"
61− ==
62−==
54+### $_ "buccab"
6355
6456`[%bscb p=hoon]`: structure that normalizes to an example.
6557
@@ -95,11 +87,7 @@ and produces its *example* instead.
9587[%foobaz %moobaz]
9688```
9789
98−;=
99− ;h3
100− ;div(id "buccen"): $% "buccen"
101− ==
102−==
90+### $% "buccen"
10391
10492`[%bscn p=(list spec)]`: structure which recognizes a union tagged by head atom.
10593
@@ -130,11 +118,7 @@ be an infinite loop!
130118[%foo p=0 q=0]~
131119```
132120
133−;=
134− ;h3
135− ;div(id "buccol"): $: "buccol"
136− ==
137−==
121+### "buccol"
138122
139123`[%bscl p=(list spec)]`: form a cell type.
140124
@@ -168,11 +152,7 @@ Irregular (structure mode): `[a b c]` is `$:(a b c)`.
168152[p=0 q=%$]
169153```
170154
171−;=
172− ;h3
173− ;div(id "buchep"): $- "buchep"
174− ==
175−==
155+### $- "buchep"
176156
177157`[%bshp p=spec q=spec]`: structure that normalizes to an example gate.
178158
@@ -200,11 +180,7 @@ Since a `$-` reduces to a [`$_`](#buccab), it is not useful for normalizing, jus
200180%baz
201181```
202182
203−;=
204− ;h3
205− ;div(id "bucket"): $^ "bucket"
206− ==
207−==
183+### $^ "bucket"
208184
209185`[%bskt p=spec q=spec]`: structure which normalizes a union tagged by head depth (cell).
210186
@@ -238,11 +214,7 @@ Regular: *2-fixed*.
238214[%baz p=0]
239215```
240216
241−;=
242− ;h3
243− ;div(id "bucsig"): $~ "bucsig"
244− ==
245−==
217+### $~ "bucsig"
246218
247219`[%bssg p=hoon q=spec]`: define a custom type default value
248220
@@ -305,11 +277,7 @@ Using `$~`:
305277%default-value
306278```
307279
308−;=
309− ;h3
310− ;div(id "bucvat"): $@ "bucvat"
311− ==
312−==
280+### $@ "bucvat"
313281
314282`[%bsvt p=spec q=spec]`: structure which normalizes a union tagged by head depth (atom).
315283
@@ -347,11 +315,7 @@ Example:
347315```
348316
349317
350−;=
351− ;h3
352− ;div(id "buctis"): $= "buctis"
353− ==
354−==
318+### $= "buctis"
355319
356320`[%bsts p=skin q=spec]`: structure which wraps a face around another structure.
357321
@@ -386,11 +350,7 @@ p=%foo
386350p=%foo
387351```
388352
389−;=
390− ;h3
391− ;div(id "bucwut"): $? "bucwut"
392− ==
393−==
353+### $? "bucwut"
394354
395355`[%bswt p=(list spec)]`: form a type from a union of other types.
396356
reference/hoon-expressions/rune/cen.md+9−45
@@ -9,11 +9,7 @@ These runes reduce to the `%=` rune
99
1010## Runes
1111
12−;=
13− ;h3
14− ;div(id "cencab"): %_ "cencab"
15− ==
16−==
12+### %_ "cencab"
1713
1814Resolve a wing with changes, preserving type.
1915
@@ -76,11 +72,7 @@ See [how wings are resolved](/docs/reference/hoon-expressions/limb/wing).
7672! nest-fail
7773```
7874
79−;=
80− ;h3
81− ;div(id "cencol"): %: "cencol"
82− ==
83−==
75+### "cencol"
8476
8577Call a gate with many arguments.
8678
@@ -134,11 +126,7 @@ When `%:` is used in tall-form syntax, the series of expressions after `p` must
13412699
135127```
136128
137−;=
138− ;h3
139− ;div(id "cendot"): %. "cendot"
140− ==
141−==
129+### %. "cendot"
142130
143131Call a gate (function), inverted.
144132
@@ -179,11 +167,7 @@ The `%.` rune is for evaluating the `$` arm of a gate, i.e., calling a function.
1791676
180168```
181169
182−;=
183− ;h3
184− ;div(id "cenhep"): %- "cenhep"
185− ==
186−==
170+### %- "cenhep"
187171
188172Call a gate (function).
189173
@@ -232,11 +216,7 @@ This rune is for evaluating the `$` arm of a gate, i.e., calling a gate as a fun
2322166
233217```
234218
235−;=
236− ;h3
237− ;div(id "cenket"): %^ "cenket"
238− ==
239−==
219+### %^ "cenket"
240220
241221Call gate with triple sample.
242222
@@ -270,11 +250,7 @@ AST:
2702506
271251```
272252
273−;=
274− ;h3
275− ;div(id "cenlus"): %+ "cenlus"
276− ==
277−==
253+### %+ "cenlus"
278254
279255Call gate with a cell sample.
280256
@@ -311,11 +287,7 @@ A `%+` expression is for calling a gate with a cell sample. `a` is the gate to
3112876
312288```
313289
314−;=
315− ;h3
316− ;div(id "censig"): %~ "censig"
317− ==
318−==
290+### %~ "censig"
319291
320292Evaluate an arm in a door.
321293
@@ -367,11 +339,7 @@ See also [`|_`](/docs/reference/hoon-expressions/rune/bar#barcab).
36733920
368340```
369341
370−;=
371− ;h3
372− ;div(id "centar"): %* "centar"
373− ==
374−==
342+### %* "centar"
375343
376344Evaluate an expression, then resolve a wing with changes.
377345
@@ -434,11 +402,7 @@ A `%*` expression evaluates some arbitrary Hoon expression, `b`, and then resolv
434402[a=1 b=7 c=10]
435403```
436404
437−;=
438− ;h3
439− ;div(id "centis"): %= "centis"
440− ==
441−==
405+### %= "centis"
442406
443407Resolve a wing with changes.
444408
reference/hoon-expressions/rune/col.md+7−35
@@ -7,11 +7,7 @@ The `:` ("col") expressions are used to produce cells, which are pairs of values
77
88## Runes
99
10−;=
11− ;h3
12− ;div(id "colcab"): :_ "colcab"
13− ==
14−==
10+### :_ "colcab"
1511
1612`[%clcb p=hoon q=hoon]`; construct a cell, inverted.
1713
@@ -32,11 +28,7 @@ Regular: *2-fixed*.
3228[2 1]
3329```
3430
35−;=
36− ;h3
37− ;div(id "colcol"): :: "colcol"
38− ==
39−==
31+### "colcol"
4032
4133Code comment
4234
@@ -55,11 +47,7 @@ Code comment
5547 :: to the input
5648```
5749
58−;=
59− ;h3
60− ;div(id "colhep"): :- "colhep"
61− ==
62−==
50+### :- "colhep"
6351
6452`[%clhp p=hoon q=hoon]`: construct a cell (2-tuple).
6553
@@ -107,11 +95,7 @@ compiler does), `[a b]` is the same as `:-(a b)`.
10795[~ 1]
10896```
10997
110−;=
111− ;h3
112− ;div(id "colket"): :^ "colket"
113− ==
114−==
98+### :^ "colket"
11599
116100`[%clkt p=hoon q=hoon r=hoon s=hoon]`: construct a quadruple (4-tuple).
117101
@@ -138,11 +122,7 @@ Regular: *4-fixed*.
138122[5 6 7 8]
139123```
140124
141−;=
142− ;h3
143− ;div(id "collus"): :+ "collus"
144− ==
145−==
125+### :+ "collus"
146126
147127
148128`[%clls p=hoon q=hoon r=hoon]`: construct a triple (3-tuple).
@@ -169,11 +149,7 @@ Regular: *3-fixed*.
169149[%a ~ 'b']
170150```
171151
172−;=
173− ;h3
174− ;div(id "cosig"): :~ "colsig"
175− ==
176−==
152+### :~ "colsig"
177153
178154`[%clsg p=(list hoon)]`: construct a null-terminated list.
179155
@@ -217,11 +193,7 @@ Regular: *running*.
217193[5 3 4 2 1 ~]
218194```
219195
220−;=
221− ;h3
222− ;div(id "coltar"): :* "coltar"
223− ==
224−==
196+### :* "coltar"
225197
226198`[%cltr p=(list hoon)]`: construct an n-tuple.
227199
reference/hoon-expressions/rune/constants.md+4−20
@@ -9,11 +9,7 @@ se, because they have interpolations.)
99
1010## Expressions
1111
12−;=
13− ;h3
14− ;div(id "cold"): `:_ "Cold Atom"`
15− ==
16−==
12+### `:_ "Cold Atom"`
1713
1814`[%rock p=term q=@]`; a constant, cold atom.
1915
@@ -48,11 +44,7 @@ We can see the contrast with warm atoms by using the compiler parser function, `
4844[%rock p=%ud q=12]
4945```
5046
51−;=
52− ;h3
53− ;div(id "paths"): `:_ "Paths"`
54− ==
55−==
47+### `:_ "Paths"`
5648
5749`[%path p=(list (each @ta hoon))]`: path with interpolation.
5850
@@ -81,11 +73,7 @@ Irregular: `/this/is/a/path`.
8173~
8274```
8375
84−;=
85− ;h3
86− ;div(id "strings"): `:_ "Strings with Interpolation"`
87− ==
88−==
76+### `:_ "Strings with Interpolation"`
8977
9078`[%knit p=(list (each @t hoon))]`: text string with interpolation.
9179
@@ -133,11 +121,7 @@ String with interpolated prettyprinting:
133121"hello, %world."
134122```
135123
136−;=
137− ;h3
138− ;div(id "warm"): `:_ "Warm Atoms"`
139− ==
140−==
124+### `:_ "Warm Atoms"`
141125
142126`[%sand p=term q=@]`; a constant, warm atom.
143127
reference/hoon-expressions/rune/dot.md+5−25
@@ -7,11 +7,7 @@ Anything Nock can do, Hoon can do also. These runes are used for carrying out N
77
88## Runes
99
10−;=
11− ;h3
12− ;div(id "dotket"): .^ "dotket"
13− ==
14−==
10+### .^ "dotket"
1511
1612`[%dtkt p=spec q=hoon]`: load from the Arvo namespace with a fake Nock instruction: 'Nock `12`''.
1713
@@ -86,11 +82,7 @@ You can modify the time of the file listing quite simply and ask for a listing f
8682
8783`our` is the value for your ship's name.
8884
89−;=
90− ;h3
91− ;div(id "dotlus"): .+ "dotlus"
92− ==
93−==
85+### .+ "dotlus"
9486
9587`[%dtls p=hoon]`: increment an atom with Nock `4`.
9688
@@ -120,11 +112,7 @@ Irregular: `+(6)` is `.+(6)`.
120112nest-fail
121113```
122114
123−;=
124− ;h3
125− ;div(id "dottar"): .* "dottar"
126− ==
127−==
115+### .* "dottar"
128116
129117`[%dttr p=hoon q=hoon]`: evaluate with Nock `2`.
130118
@@ -167,11 +155,7 @@ therefore possible to use Hoon as a typeless language.
1671551
168156```
169157
170−;=
171− ;h3
172− ;div(id "dottis"): .= "dottis"
173− ==
174−==
158+### .= "dottis"
175159
176160`[%dtts p=hoon q=hoon]`: test for equality with Nock `5`.
177161
@@ -215,11 +199,7 @@ is a common cause of performance bugs.)
215199nest-fail
216200```
217201
218−;=
219− ;h3
220− ;div(id "dotwut"): .? "dotwut"
221− ==
222−==
202+### .? "dotwut"
223203
224204`[%dtwt p=hoon]`: test for cell or atom with Nock `3`.
225205
reference/hoon-expressions/rune/ket.md+10−50
@@ -12,11 +12,7 @@ it never allows invalid nests, it sometimes rejects valid nests.
1212
1313## Runes
1414
15−;=
16− ;h3
17− ;div(id "ketbar"): ^| "ketbar"
18− ==
19−==
15+### ^| "ketbar"
2016
2117`[%ktbr p=hoon]`: convert a gold core to an iron core (contravariant).
2218
@@ -52,11 +48,7 @@ The prettyprinter shows the core metal (`.` gold, `|` iron):
5248<1|gcq [@ @n <250.yur 41.wda 374.hzt 100.kzl 1.ypj %151>]>
5349```
5450
55−;=
56− ;h3
57− ;div(id "ketcol"): ^: "ketcol"
58− ==
59−==
51+### "ketcol"
6052
6153`[%ktcl p=spec]`: 'factory' gate for type `p`.
6254
@@ -92,11 +84,7 @@ In older versions of Hoon, a 'mold' was an idempotent gate that was guaranteed t
9284ford: %ride failed to execute:
9385```
9486
95−;=
96− ;h3
97− ;div(id "ketdot"): ^. "ketdot"
98− ==
99−==
87+### ^. "ketdot"
10088
10189`[%ktdt p=hoon q=hoon]`: typecast on value produced by passing `q` to `p`.
10290
@@ -137,11 +125,7 @@ mint-vain
137125~[22 33]
138126```
139127
140−;=
141− ;h3
142− ;div(id "kethep"): ^- "kethep"
143− ==
144−==
128+### ^- "kethep"
145129
146130`[%kthp p=spec q=hoon]`: typecast by explicit type label.
147131
@@ -185,11 +169,7 @@ infinite loop in the compiler).
185169[~ ~.a]
186170```
187171
188−;=
189− ;h3
190− ;div(id "ketlus"): ^+ "ketlus"
191− ==
192−==
172+### ^+ "ketlus"
193173
194174`[%ktls p=hoon q=hoon]`: typecast by inferred type.
195175
@@ -208,11 +188,7 @@ Regular: *2-fixed*.
208188'a'
209189```
210190
211−;=
212− ;h3
213− ;div(id "ketpad"): ^& "ketpad"
214− ==
215−==
191+### ^& "ketpad"
216192
217193`[%ktpd p=hoon]`: convert a core to a zinc core (covariant).
218194
@@ -265,11 +241,7 @@ ford: %slim failed:
265241ford: %ride failed to compute type:
266242```
267243
268−;=
269− ;h3
270− ;div(id "ketsig"): ^~ "ketsig"
271− ==
272−==
244+### ^~ "ketsig"
273245
274246`[%ktsg p=hoon]`: fold constant at compile time.
275247
@@ -291,11 +263,7 @@ Regular: *1-fixed*.
291263[%1 p=42]
292264```
293265
294−;=
295− ;h3
296− ;div(id "kettar"): ^* "kettar"
297− ==
298−==
266+### ^* "kettar"
299267
300268`[%kttr p=spec]`: Produce example type value.
301269
@@ -346,11 +314,7 @@ Irregular:
346314""
347315```
348316
349−;=
350− ;h3
351− ;div(id "kettis"): ^= "kettis"
352− ==
353−==
317+### ^= "kettis"
354318
355319`[%ktts p=skin q=hoon]`: Bind name to a value.
356320
@@ -386,11 +350,7 @@ a=1
386350[b=1 c=2 d=[x=3 y4]]
387351```
388352
389−;=
390− ;h3
391− ;div(id "ketwut"): ^? "ketwut"
392− ==
393−==
353+### ^? "ketwut"
394354
395355`[%ktwt p=hoon]`: convert any core to a lead core (bivariant).
396356
reference/hoon-expressions/rune/lus.md+4−20
@@ -11,11 +11,7 @@ There are various arm runes you can use to produce different kinds of arms. Nor
1111
1212## Runes
1313
14−;=
15− ;h3
16− ;div(id "lusbar"): +| "lusbar"
17− ==
18−==
14+### +| "lusbar"
1915
2016Chapter label.
2117
@@ -63,11 +59,7 @@ Notice that `p.q` has the label `%numbers`. Contrast with:
6359]
6460```
6561
66−;=
67− ;h3
68− ;div(id "lusbuc"): +$ "lusbuc"
69− ==
70−==
62+### +$ "lusbuc"
7163
7264Produce a structure arm (type definition).
7365
@@ -105,11 +97,7 @@ nest-fail
10597[%.y 22]
10698```
10799
108−;=
109− ;h3
110− ;div(id "luslus"): ++ "luslus"
111− ==
112−==
100+### ++ "luslus"
113101
114102Produce a normal arm.
115103
@@ -144,11 +132,7 @@ Any Hoon expression, `q`, may be used to define the arm computation.
14413212
145133```
146134
147−;=
148− ;h3
149− ;div(id "lustar"): +* "lustar"
150− ==
151−==
135+### +* "lustar"
152136
153137
154138Produce a type constructor arm.
reference/hoon-expressions/rune/mic.md+7−35
@@ -7,11 +7,7 @@ Miscellaneous useful macros.
77
88## Runes
99
10−;=
11− ;h3
12− ;div(id "miccol"): ;: "miccol"
13− ==
14−==
10+### "miccol"
1511
1612`[%mccl p=hoon q=(list hoon)]`: call a binary function as an n-ary function.
1713
@@ -61,11 +57,7 @@ Irregular: `:(add a b c)` is `;:(add a b c)`.
615712
6258```
6359
64−;=
65− ;h3
66− ;div(id "miclus"): ;+ "miclus"
67− ==
68−==
60+### ;+ "miclus"
6961
7062make a single XML node (Sail)
7163
@@ -124,11 +116,7 @@ One interesting thing about Sail is that it allows you to use complex Hoon expre
124116]
125117```
126118
127−;=
128− ;h3
129− ;div(id "micmic"): ;; "micmic"
130− ==
131−==
119+### ;; "micmic"
132120
133121`[%mcmc p=spec q=hoon]`: normalize with a mold, asserting fixpoint.
134122
@@ -170,11 +158,7 @@ Fails because not a fixpoint:
170158! exit
171159```
172160
173−;=
174− ;h3
175− ;div(id "micfas"): ;/ "micfas"
176− ==
177−==
161+### ;/ "micfas"
178162
179163`[%mcnt p=hoon]`: tape as XML element.
180164
@@ -191,11 +175,7 @@ Fails because not a fixpoint:
191175[[%~. [%~. "foo] ~] ~]
192176```
193177
194−;=
195− ;h3
196− ;div(id "micsig"): ;~ "micsig"
197− ==
198−==
178+### ;~ "micsig"
199179
200180`[%mcsg p=hoon q=(list hoon)]`: glue a pipeline together with a
201181product-sample adapter.
@@ -293,11 +273,7 @@ But for multiple gates, we need it to connect the pipeline:
293273"96acd"
294274```
295275
296−;=
297− ;h3
298− ;div(id "mictar"): ;* "mictar"
299− ==
300−==
276+### ;* "mictar"
301277
302278make a list of XML nodes from complex Hoon expression (Sail)
303279
@@ -349,11 +325,7 @@ If you need a complex Hoon expression to produce a `marl`, use the `;*` rune. O
349325]
350326```
351327
352−;=
353− ;h3
354− ;div(id "mictis"): ;= "mictis"
355− ==
356−==
328+### ;= "mictis"
357329
358330make a list of XML nodes (Sail)
359331
reference/hoon-expressions/rune/sig.md+12−60
@@ -7,11 +7,7 @@ Runes that use Nock `11` to pass non-semantic info to the interpreter.
77
88## Runes
99
10−;=
11− ;h3
12− ;div(id "sigban"): ~> "sigban"
13− ==
14−==
10+### ~> "sigban"
1511
1612`[%sgbn p=$@(term [p=term q=hoon]) q=hoon]`: raw hint, applied
1713to computation.
@@ -46,11 +42,7 @@ Running the compiler:
4642[%10 p=[p=97 q=[%4 p=[%1 p=2]]] q=[%1 p=42]]
4743```
4844
49−;=
50− ;h3
51− ;div(id "sigbar"): ~| "sigbar"
52− ==
53−==
45+### ~| "sigbar"
5446
5547
5648`[%sgbr p=hoon q=hoon]`: tracing printf.
@@ -80,11 +72,7 @@ ford: build failed
8072ford: build failed
8173```
8274
83−;=
84− ;h3
85− ;div(id "sigbuc"): ~$ "sigbuc"
86− ==
87−==
75+### ~$ "sigbuc"
8876
8977`[%sgbs p=term q=hoon]`: profiling hit counter.
9078
@@ -107,11 +95,7 @@ Regular: *2-fixed*.
107953
10896```
10997
110−;=
111− ;h3
112− ;div(id "sigcab"): ~_ "sigcab"
113− ==
114−==
98+### ~_ "sigcab"
11599
116100`[%sgcb p=hoon q=hoon]`: user-formatted tracing printf.
117101
@@ -140,11 +124,7 @@ ford: build failed
140124ford: build failed
141125```
142126
143−;=
144− ;h3
145− ;div(id "cigcen"): ~% "sigcen"
146− ==
147−==
127+### ~% "sigcen"
148128
149129`[%sgcn p=term q=wing r=(list [term hoon]) s=hoon]`: jet registration.
150130
@@ -234,11 +214,7 @@ Here we label the entire `++aesc` core for optimization. You can see the
234214jet in `jets/e/aesc.c`.
235215
236216
237−;=
238− ;h3
239− ;div(id "sigled"): ~< "sigled"
240− ==
241−==
217+### ~< "sigled"
242218
243219
244220`[%sgld p=$@(term [p=term q=hoon]) q=hoon]`: raw hint, applied to
@@ -268,11 +244,7 @@ rather about its product.
268244[%7 p=[%1 p=42] q=[%10 p=[p=97 q=[%4 p=[%0 p=1]]] q=[%0 p=1]]]
269245```
270246
271−;=
272− ;h3
273− ;div(id "siglus"): ~+ "siglus"
274− ==
275−==
247+### ~+ "siglus"
276248
277249`[%sgls p=hoon]`: cache a computation.
278250
@@ -312,11 +284,7 @@ This should work fine:
312284573.147.844.013.817.084.101
313285```
314286
315−;=
316− ;h3
317− ;div(id "sigfas"): ~/ "signet"
318− ==
319−==
287+### ~/ "signet"
320288
321289`[%sgnt p=term q=hoon]`: jet registration for gate with
322290registered context.
@@ -343,11 +311,7 @@ From the kernel:
343311 $(a (dec a), b +(b))
344312```
345313
346−;=
347− ;h3
348− ;div(id "sigpad"): ~& "sigpad"
349− ==
350−==
314+### ~& "sigpad"
351315
352316`[%sgpd p=hoon q=hoon]`: debugging printf.
353317
@@ -382,11 +346,7 @@ Regular: *2-fixed*.
382346~
383347```
384348
385−;=
386− ;h3
387− ;div(id "sigtis"): ~= "sigtis"
388− ==
389−==
349+### ~= "sigtis"
390350
391351`[%sgts p=hoon q=hoon]`: detect duplicate.
392352
@@ -418,11 +378,7 @@ This code traverses a tree and replaces all instances of `32` with
418378
419379Without `~=`, it would build a copy of a completely unchanged tree. Sad!
420380
421−;=
422− ;h3
423− ;div(id "sigwut"): ~? "sigwut"
424− ==
425−==
381+### ~? "sigwut"
426382
427383`[%sgwt p=hoon q=hoon r=hoon]`: conditional debug printf.
428384
@@ -460,11 +416,7 @@ Regular: *4-fixed*.
460416~
461417```
462418
463−;=
464− ;h3
465− ;div(id "sigzap"): ~! "sigzap"
466− ==
467−==
419+### ~! "sigzap"
468420
469421`[%sgzp p=hoon q=hoon]`: print type on compilation fail.
470422
reference/hoon-expressions/rune/terminators.md+2−10
@@ -7,11 +7,7 @@ The `--` and `==` are used as terminators: `--` for core expressions, and `==` f
77
88## Runes
99
10−;=
11− ;h3
12− ;div(id "hephep"): -- "hephep"
13− ==
14−==
10+### -- "hephep"
1511
1612##### Syntax
1713
@@ -40,11 +36,7 @@ The `|%`, `|_`, and `|^` runes are used to create cores that can have arbitraril
403624
4137```
4238
43−;=
44− ;h3
45− ;div(id "tistis"): == "tistis"
46− ==
47−==
39+### == "tistis"
4840
4941##### Syntax
5042
reference/hoon-expressions/rune/tis.md+14−70
@@ -23,11 +23,7 @@ different situations. Hence the whole family of `=` runes.
2323
2424## Runes
2525
26−;=
27− ;h3
28− ;div(id "tisban"): => "tisban"
29− ==
30−==
26+### => "tisban"
3127
3228`[%tsgr p=hoon q=hoon]`: compose two expressions.
3329
@@ -49,11 +45,7 @@ Regular: *2-fixed*.
4945[6 6]
5046```
5147
52−;=
53− ;h3
54− ;div(id "tisbar"): =| "tisbar"
55− ==
56−==
48+### =| "tisbar"
5749
5850
5951`[%tsbr p=spec q=hoon]`: combine a default type value with the subject.
@@ -85,11 +77,7 @@ Speaking more loosely, `=|` usually "declares a variable" which is "uninitialize
85777
8678```
8779
88−;=
89− ;h3
90− ;div(id "tiscol"): =: "tiscol"
91− ==
92−==
80+### "tiscol"
9381
9482`[%tscl p=(list (pair wing hoon)) q=hoon]`: change multiple legs in the subject.
9583
@@ -118,11 +106,7 @@ This rune is like `=.`, but for modifying the values of multiple legs of the sub
118106[b=3 c=4]
119107```
120108
121−;=
122− ;h3
123− ;div(id "tiscom"): =, "tiscom"
124− ==
125−==
109+### =, "tiscom"
126110
127111`[%tscm p=hoon q=hoon]`: expose namespace
128112
@@ -157,11 +141,7 @@ With a dojo-defined face:
157141[2 4]
158142```
159143
160−;=
161− ;h3
162− ;div(id "tisdot"): =. "tisdot"
163− ==
164−==
144+### =. "tisdot"
165145
166146`[%tsdt p=wing q=hoon r=hoon]`: change one leg in the subject.
167147
@@ -197,11 +177,7 @@ a new subject just like the old one except for a changed value at `p`. Note tha
197177nest-fail
198178```
199179
200−;=
201− ;h3
202− ;div(id "tishep"): =- "tishep"
203− ==
204−==
180+### =- "tishep"
205181
206182`[%tshp p=hoon q=hoon]`: combine a new noun with the subject, inverted.
207183
@@ -230,11 +206,7 @@ Regular: *2-fixed*.
2302068
231207```
232208
233−;=
234− ;h3
235− ;div(id "tisket"): =^ "tisket"
236− ==
237−==
209+### =^ "tisket"
238210
239211`[%tskt p=skin q=wing r=hoon s=hoon]`: pin the head of a pair; change
240212a leg with the tail.
@@ -274,11 +246,7 @@ random number, so we use `=^`:
274246[99 46]
275247```
276248
277−;=
278− ;h3
279− ;div(id "tisled"): =< "tisled"
280− ==
281−==
249+### =< "tisled"
282250
283251`[%tsgl p=hoon q=hoon]`: compose two expressions, inverted.
284252
@@ -315,11 +283,7 @@ Irregular: `foo:baz` is `=<(foo baz)`.
315283[6 6]
316284```
317285
318−;=
319− ;h3
320− ;div(id "tislut"): =+ "tislus"
321− ==
322−==
286+### =+ "tislus"
323287
324288
325289`[%tsls p=hoon q=hoon]`: combine a new noun with the subject.
@@ -342,11 +306,7 @@ Loosely speaking, `=+` is the simplest way of "declaring a variable."
342306
343307##### Examples
344308
345−;=
346− ;h3
347− ;div(id "tismic"): =; "tismic"
348− ==
349−==
309+### =; "tismic"
350310
351311`[%tssm p=skin q=hoon r=hoon]`: combine a named noun with the subject, possibly with type annotation; inverted order.
352312
@@ -375,11 +335,7 @@ Regular: *3-fixed*.
3753358
376336```
377337
378−;=
379− ;h3
380− ;div(id "tisfas"): =/ "tisfas"
381− ==
382−==
338+### =/ "tisfas"
383339
384340`[%tsfs p=skin q=hoon r=hoon]`: combine a named noun with the subject, possibly with type annotation.
385341
@@ -428,11 +384,7 @@ Regular: *3-fixed*.
4283848
429385```
430386
431−;=
432− ;h3
433− ;div(id "tissig"): =~ "tissig"
434− ==
435−==
387+### =~ "tissig"
436388
437389
438390`[%tssg p=(list hoon)]`: compose many expressions.
@@ -468,11 +420,7 @@ Regular: *running*.
4684203
469421```
470422
471−;=
472− ;h3
473− ;div(id "tistar"): =* "tistar"
474− ==
475−==
423+### =* "tistar"
476424
477425`[%tstr p=term q=hoon r=hoon]`: define an alias.
478426
@@ -505,11 +453,7 @@ The difference between aliasing and pinning is that pinning changes the subject,
505453[2 2]
506454```
507455
508−;=
509− ;h3
510− ;div(id "tiswut"): =? "tiswut"
511− ==
512−==
456+### =? "tiswut"
513457
514458`[$tswt p=wing q=hoon r=hoon s=hoon]`: conditionally change one leg in the subject.
515459
reference/hoon-expressions/rune/wut.md+13−65
@@ -29,11 +29,7 @@ side is taken), it fails with an error.
2929
3030## Runes
3131
32−;=
33− ;h3
34− ;div(id "wutban"): ?> "wutban"
35− ==
36−==
32+### ?> "wutban"
3733
3834`[%wtbn p=hoon q=hoon]`: positive assertion.
3935
@@ -71,11 +67,7 @@ nest-fail
7167123
7268```
7369
74−;=
75− ;h3
76− ;div(id "wutbar"): ?| "wutbar"
77− ==
78−==
70+### ?| "wutbar"
7971
8072`[%wtbr p=(list hoon)]`: logical OR.
8173
@@ -114,11 +106,7 @@ Irregular: `|(foo bar baz)` is `?|(foo bar baz)`.
114106%.n
115107```
116108
117−;=
118− ;h3
119− ;div(id "wutcol"): ?: "wutcol"
120− ==
121−==
109+### "wutcol"
122110
123111`[%wtcl p=hoon q=hoon r=hoon]`: branch on a boolean test.
124112
@@ -166,11 +154,7 @@ Note also that all other branching expressions reduce to `?:`.
1661544
167155```
168156
169−;=
170− ;h3
171− ;div(id "wutdot"): ?. "wutdot"
172− ==
173−==
157+### ?. "wutdot"
174158
175159`[%wtdt p=hoon q=hoon r=hoon]`: branch on a boolean test, inverted.
176160
@@ -207,11 +191,7 @@ As is usual with inverted forms, use `?.` when the yes-case expression is much t
207191'but see how \'r is much heavier than \'q?'
208192```
209193
210−;=
211− ;h3
212− ;div(id "wuthep"): ?- "wuthep"
213− ==
214−==
194+### ?- "wuthep"
215195
216196`[%wthp p=wing q=(list (pair spec value))]`: switch against a union, with no default.
217197
@@ -273,11 +253,7 @@ will throw `mint-vain`.
273253! nest-fail
274254```
275255
276−;=
277− ;h3
278− ;div(id "wutket"): ?^ "wutket"
279− ==
280−==
256+### ?^ "wutket"
281257
282258`[%wtkt p=wing q=hoon r=hoon]`: branch on whether a wing
283259of the subject is a cell.
@@ -310,11 +286,7 @@ The type of the wing, `p`, must not be known to be either an atom or a cell, or
3102863
311287```
312288
313−;=
314− ;h3
315− ;div(id "wutled"): ?< "wutled"
316− ==
317−==
289+### ?< "wutled"
318290
319291
320292# `?< "wutled"`
@@ -355,11 +327,7 @@ nest-fail
355327[12 14]
356328```
357329
358−;=
359− ;h3
360− ;div(id "wutlus"): ?+ "wutlus"
361− ==
362−==
330+### ?+ "wutlus"
363331
364332`[%wtls p=wing q=hoon r=(list (pair spec hoon))]`: switch against
365333a union, with a default.
@@ -416,11 +384,7 @@ If there is a case that is never taken you'll get a `mint-vain` error.
416384240
417385```
418386
419−;=
420− ;h3
421− ;div(id "wutpad"): ?& "wutpad"
422− ==
423−==
387+### ?& "wutpad"
424388
425389`[%wtpd p=(list hoon)]`: logical AND.
426390
@@ -459,11 +423,7 @@ Irregular: `&(foo bar baz)` is `?&(foo bar baz)`.
459423%.n
460424```
461425
462−;=
463− ;h3
464− ;div(id "wutsig"): ?~ "wutsig"
465− ==
466−==
426+### ?~ "wutsig"
467427
468428`[%wtsg p=wing q=hoon r=hoon]`: branch on whether a wing of the subject is null.
469429
@@ -490,11 +450,7 @@ It's bad style to use `?~` to test for any zero atom. Use it only for a true nu
4904501
491451```
492452
493−;=
494− ;h3
495− ;div(id "wuttis"): ?= "wuttis"
496− ==
497−==
453+### ?= "wuttis"
498454
499455`[%wtts p=spec q=wing]`: test pattern match.
500456
@@ -530,11 +486,7 @@ A common error is `find.$`, meaning `p` is not a type.
530486%.y
531487```
532488
533−;=
534− ;h3
535− ;div(id "wutvat"): ?@ "wutvat"
536− ==
537−==
489+### ?@ "wutvat"
538490
539491`[%wtpt p=wing q=hoon r=hoon]`: branch on whether a wing of the subject is an atom.
540492
@@ -566,11 +518,7 @@ The type of the wing, `p`, must not be known to be either an atom or a cell, or
5665184
567519```
568520
569−;=
570− ;h3
571− ;div(id "wutzap"): ?! "wutzaps"
572− ==
573−==
521+### ?! "wutzaps"
574522
575523`[%wtzp p=hoon]`: logical NOT.
576524
reference/hoon-expressions/rune/zap.md+6−30
@@ -5,11 +5,7 @@ template = "doc.html"
55+++
66## Runes
77
8−;=
9− ;h3
10− ;div(id "zapban"): !> "zapban"
11− ==
12−==
8+### !> "zapban"
139
1410`[%zpgr p=hoon]`: wrap a noun in its type.
1511
@@ -39,11 +35,7 @@ If you want just the type value, use a 'type spear'. This is `-:!>`, i.e., the
3935#t/@ud
4036```
4137
42−;=
43− ;h3
44− ;div(id "zapcol"): !: "zapcol"
45− ==
46−==
38+### "zapcol"
4739
4840`[%dbug p=hoon]`: turn on stack trace
4941
@@ -75,11 +67,7 @@ ford: %ride failed to execute:
7567ford: %ride failed to execute:
7668```
7769
78−;=
79− ;h3
80− ;div(id "zapdot"): !. "zapdot"
81− ==
82−==
70+### !. "zapdot"
8371
8472Turn off stack trace for a subexpression `p`
8573
@@ -123,11 +111,7 @@ ford: %ride failed to execute:
123111ford: %ride failed to execute:
124112```
125113
126−;=
127− ;h3
128− ;div(id "zaptis"): != "zaptis"
129− ==
130−==
114+### != "zaptis"
131115
132116`[%zpts p=hoon]`: make the Nock formula for a Hoon expression.
133117
@@ -168,11 +152,7 @@ Don't confuse the `!=` rune with:
168152
169153The syntax difference is that a test for equality takes two subexpressions, and the `!=` rune only one.
170154
171−;=
172− ;h3
173− ;div(id "zapwut"): !? "zapwut"
174− ==
175−==
155+### !? "zapwut"
176156
177157`[%zpwt p=@ q=hoon]`: restrict Hoon version.
178158
@@ -198,11 +178,7 @@ Regular: *2-fixed*.
198178! exit
199179```
200180
201−;=
202− ;h3
203− ;div(id "zapzap"): !! "zapzap"
204− ==
205−==
181+### !! "zapzap"
206182
207183`[%zpzp ~]`: crash.
208184
using/udon.md+6−30
@@ -11,11 +11,7 @@ template = "doc.html"
1111
1212- #### [A Static Site](#static)
1313
14−;=
15− ;h2
16− ;div(id "guide"): Udon: A Guide
17− ==
18−==
14+## A Guide
1915
2016Udon is a way to write content for the web. It's a minimalist
2117markup language for creating and rendering text documents, with a
@@ -362,11 +358,7 @@ Four score and seven years ago....
362358
363359It was the best of times, it was the worst of times...
364360
365−;=
366− ;h2
367− ;div(id "the-destination"): Here we are!
368− ==
369−==
361+## Here we are!
370362```
371363
372364###### Produces
@@ -377,11 +369,7 @@ Four score and seven years ago....
377369
378370It was the best of times, it was the worst of times...
379371
380−;=
381− ;h2
382− ;div(id "the-destination"): Here we are!
383− ==
384−==
372+## Here we are!
385373
386374### Double Quote
387375
@@ -584,11 +572,7 @@ indent the text in question with *eight spaces*.
584572 Reel shadows of the indignant desert birds.
585573
586574
587−;=
588− ;h2
589− ;div(id "sail"): Sail Expressions
590− ==
591−==
575+## Sail Expressions
592576
593577It's possible to use Udon as an HTML templating language akin to
594578PHP, ERB, JSP, or Handlebars templates. This facility derives
@@ -625,11 +609,7 @@ Produces:
625609==
626610
627611
628−;=
629− ;h2
630− ;div(id "blog"): A Simple Udon Blog
631− ==
632−==
612+## A Simple Udon Blog
633613
634614Publishing using Udon is really easy. It uses the file extension `.udon`. Here we'll create a very simple blog and publish our first posts.
635615
@@ -770,11 +750,7 @@ Use `;join` to keep up with comments as they get posted:
770750
771751That's it! Easy.
772752
773−;=
774− ;h2
775− ;div(id "static"): A Static Site
776− ==
777−==
753+## A Static Site
778754
779755Hosting a static tree of content is easy. Let's put together a really
780756simple site for an imaginary Urbit meetup group.