on master help sign in
Merge branch 'reorg' of github.com:urbit/docs into reorg
commit42fdcbacfc86830202eeeae26ed8b8632926f7dd authorGalen Wolfe-Pauly <mailroom@office-for.com> dateThu 25 Feb 2016, 20:57 (11 years ago) parent6d1657589e9d62
166 files changed+768−745
docs.md+1−1 docs/orientation/repo-guide.md+12−8 docs/setup/install.md+1−7 docs/system/hoon/cheet-sheets.md → docs/system/hoon/cheat-sheets.md+4 docs/system/hoon/library.md+4−3 docs/system/hoon/library/0.md+2−2 docs/system/hoon/library/1.md+7−3 docs/system/hoon/library/2a.md+2−2 docs/system/hoon/library/2b.md+2−2 docs/system/hoon/library/2c.md+2−2 docs/system/hoon/library/2da.md+2−2 docs/system/hoon/library/2db.md+2−2 docs/system/hoon/library/2dc.md+2−2 docs/system/hoon/library/2dd.md+2−2 docs/system/hoon/library/2ea.md+2−2 docs/system/hoon/library/2eb.md+2−2 docs/system/hoon/library/2ec.md+2−2 docs/system/hoon/library/2ed.md+2−2 docs/system/hoon/library/2ee.md+2−2 docs/system/hoon/library/2ef.md+2−2 docs/system/hoon/library/2eg.md+2−2 docs/system/hoon/library/2eh.md+2−2 docs/system/hoon/library/2ei.md+2−2 docs/system/hoon/library/2ej.md+2−2 docs/system/hoon/library/2ek.md+2−2 docs/system/hoon/library/2el.md+2−2 docs/system/hoon/library/2em.md+2−2 docs/system/hoon/library/2en.md+2−2 docs/system/hoon/library/2eo.md+2−2 docs/system/hoon/library/2ep.md+2−2 docs/system/hoon/library/2ew.md+2−2 docs/system/hoon/library/2ex.md+2−2 docs/system/hoon/library/2ey.md+2−2 docs/system/hoon/library/2ez.md+2−2 docs/system/hoon/library/3ba.md+2−2 docs/system/hoon/library/3bb.md+2−2 docs/system/hoon/library/3bc.md+2−2 docs/system/hoon/library/3bd.md+2−2 docs/system/hoon/library/3be.md+2−2 docs/system/hoon/library/3bf.md+2−2 docs/system/hoon/library/3bg.md+2−2 docs/system/hoon/library/3bh.md+2−2 docs/system/hoon/library/3bi.md+2−2 docs/system/hoon/runes.md+81−123 docs/system/hoon/runes/bc.md+11 docs/system/hoon/runes/bc/bcbr.md+3−3 docs/system/hoon/runes/bc/bccb.md+3−3 docs/system/hoon/runes/bc/bccl.md+3−3 docs/system/hoon/runes/bc/bccn.md+2−2 docs/system/hoon/runes/bc/bcls.md+3−3 docs/system/hoon/runes/bc/bcpm.md+3−3 docs/system/hoon/runes/bc/bctr.md+3−3 docs/system/hoon/runes/bc/bcts.md+3−3 docs/system/hoon/runes/bc/bcwt.md+3−3 docs/system/hoon/runes/br.md+11 docs/system/hoon/runes/br/brcb.md+7−3 docs/system/hoon/runes/br/brcn.md+7−3 docs/system/hoon/runes/br/brdt.md+7−3 docs/system/hoon/runes/br/brfs.md+7−3 docs/system/hoon/runes/br/brhp.md+7−3 docs/system/hoon/runes/br/brkt.md+6−2 docs/system/hoon/runes/br/brls.md+7−3 docs/system/hoon/runes/br/brtr.md+7−3 docs/system/hoon/runes/br/brts.md+7−3 docs/system/hoon/runes/br/brwt.md+7−3 docs/system/hoon/runes/cl.md+11 docs/system/hoon/runes/cl/clcb.md+3−3 docs/system/hoon/runes/cl/clfs.md+3−3 docs/system/hoon/runes/cl/clhp.md+3−3 docs/system/hoon/runes/cl/clkt.md+3−3 docs/system/hoon/runes/cl/clls.md+3−3 docs/system/hoon/runes/cl/clsg.md+3−3 docs/system/hoon/runes/cl/cltr.md+3−3 docs/system/hoon/runes/cn.md+11 docs/system/hoon/runes/cn/cncb.md+3−3 docs/system/hoon/runes/cn/cndt.md+3−3 docs/system/hoon/runes/cn/cnhp.md+3−3 docs/system/hoon/runes/cn/cnkt.md+3−3 docs/system/hoon/runes/cn/cnls.md+3−3 docs/system/hoon/runes/cn/cnsg.md+3−3 docs/system/hoon/runes/cn/cntr.md+4−4 docs/system/hoon/runes/cn/cnts.md+3−3 docs/system/hoon/runes/dt.md+11 docs/system/hoon/runes/dt/dtkt.md+3−3 docs/system/hoon/runes/dt/dtls.md+3−3 docs/system/hoon/runes/dt/dttr.md+3−3 docs/system/hoon/runes/dt/dtts.md+3−3 docs/system/hoon/runes/dt/dtwt.md+3−3 docs/system/hoon/runes/dt/dtzy.md+3−3 docs/system/hoon/runes/dt/dtzz.md+3−3 docs/system/hoon/runes/hx.md+11 docs/system/hoon/runes/hx/hxgl.md+3−3 docs/system/hoon/runes/hx/hxgr.md+3−3 docs/system/hoon/runes/kt.md+11 docs/system/hoon/runes/kt/ktbr.md+3−3 docs/system/hoon/runes/kt/ktdt.md+3−3 docs/system/hoon/runes/kt/kthp.md+3−3 docs/system/hoon/runes/kt/ktls.md+3−3 docs/system/hoon/runes/kt/ktpm.md+3−3 docs/system/hoon/runes/kt/ktsg.md+3−3 docs/system/hoon/runes/kt/ktts.md+2−2 docs/system/hoon/runes/kt/ktwt.md+4−2 docs/system/hoon/runes/sg.md+11 docs/system/hoon/runes/sg/sgbc.md+3−3 docs/system/hoon/runes/sg/sgbr.md+3−3 docs/system/hoon/runes/sg/sgcb.md+3−3 docs/system/hoon/runes/sg/sgcn.md+3−3 docs/system/hoon/runes/sg/sgfs.md+3−3 docs/system/hoon/runes/sg/sggl.md+3−3 docs/system/hoon/runes/sg/sggr.md+2−2 docs/system/hoon/runes/sg/sgls.md+3−3 docs/system/hoon/runes/sg/sgpm.md+4−4 docs/system/hoon/runes/sg/sgts.md+3−3 docs/system/hoon/runes/sg/sgwt.md+3−3 docs/system/hoon/runes/sg/sgzp.md+3−3 docs/system/hoon/runes/sm.md+7−38 docs/system/hoon/runes/sm/smcl.md+2−2 docs/system/hoon/runes/sm/smcn.md+2−2 docs/system/hoon/runes/sm/smdq.md+2−2 docs/system/hoon/runes/sm/smhp.md+2−2 docs/system/hoon/runes/sm/smls.md+2−2 docs/system/hoon/runes/sm/smsg.md+2−2 docs/system/hoon/runes/sm/smsm.md+2−2 docs/system/hoon/runes/sm/smtr.md+3−3 docs/system/hoon/runes/sm/smzz.md+3−3 docs/system/hoon/runes/ts.md+11 docs/system/hoon/runes/ts/tsbr.md+3−1 docs/system/hoon/runes/ts/tscl.md+3−1 docs/system/hoon/runes/ts/tsdt.md+3−1 docs/system/hoon/runes/ts/tsgl.md+4−2 docs/system/hoon/runes/ts/tsgr.md+2−2 docs/system/hoon/runes/ts/tshp.md+3−1 docs/system/hoon/runes/ts/tskt.md+4−2 docs/system/hoon/runes/ts/tsls.md+3−1 docs/system/hoon/runes/ts/tssg.md+3−1 docs/system/hoon/runes/ts/tstr.md+3−1 docs/system/hoon/runes/wt.md+11 docs/system/hoon/runes/wt/wtbr.md+2−2 docs/system/hoon/runes/wt/wtcl.md+2−2 docs/system/hoon/runes/wt/wtdt.md+2−2 docs/system/hoon/runes/wt/wtgl.md+2−2 docs/system/hoon/runes/wt/wtgr.md+2−2 docs/system/hoon/runes/wt/wthp.md+2−2 docs/system/hoon/runes/wt/wthz.md−52 docs/system/hoon/runes/wt/wtkt.md+2−2 docs/system/hoon/runes/wt/wtkz.md−34 docs/system/hoon/runes/wt/wtls.md+2−2 docs/system/hoon/runes/wt/wtlz.md−35 docs/system/hoon/runes/wt/wtpm.md+2−2 docs/system/hoon/runes/wt/wtpt.md+2−2 docs/system/hoon/runes/wt/wtpz.md−34 docs/system/hoon/runes/wt/wtsg.md+2−2 docs/system/hoon/runes/wt/wtsz.md−37 docs/system/hoon/runes/wt/wtts.md+2−2 docs/system/hoon/runes/wt/wttz.md−35 docs/system/hoon/runes/wt/wtzp.md+2−2 docs/system/hoon/runes/zp.md+11 docs/system/hoon/runes/zp/zpcb.md+2−2 docs/system/hoon/runes/zp/zpcm.md+2−2 docs/system/hoon/runes/zp/zpfs.md+2−2 docs/system/hoon/runes/zp/zpgr.md+2−2 docs/system/hoon/runes/zp/zpsm.md+2−2 docs/system/hoon/runes/zp/zpts.md+2−2 docs/system/hoon/runes/zp/zpwt.md+2−2 docs/system/hoon/runes/zp/zpzp.md+2−2 docs/walkthroughs/tree.md+135
docs.md+1−1
@@ -9,4 +9,4 @@ anchor: none
99
1010<div class="sections lead-offset">
1111 <kids></kids>
12−</div>
12+</div>
docs/orientation/repo-guide.md+12−8
@@ -10,14 +10,14 @@ The `urbit` repo can look a little confusing at first. Here we'll take a look a
1010
1111If you `ls urb/zod` from inside the urbit repo you should see something like:
1212
13− app
14− arvo
15− gen
16− lib
17− mar
18− ren
19− sur
20− web
13+ app/
14+ arvo/
15+ gen/
16+ lib/
17+ mar/
18+ ren/
19+ sur/
20+ web/
2121 web.md
2222
2323Let's step through directory by directory.
@@ -104,3 +104,7 @@ Default web requets in urbit are handled as a `.urb`, which is caught by the `ur
104104
105105There are the files publicly accessible to the web, as made possible by `%eyre`.
106106
107+## `web.md`
108+
109+This is the homepage for your urbit. You'll see it at `http://localhost:8080/` or `http://your-urbit.urbit.org/`
110+
docs/setup/install.md+1−7
@@ -19,13 +19,7 @@ cloud virtual machines (Amazon or Digital Ocean), the default
1919memory configuration is smaller than this, and you need to
2020manually configure a swapfile.
2121
22−To add swap to a DO droplet:
23−
24−https://www.digitalocean.com/community/tutorials/how-to-add-swap-on-ubuntu-14-04
25−
26−To add swap on an Amazon instance:
27−
28−http://stackoverflow.com/questions/17173972/how-do-you-add-swap-to-an-ec2-instance
22+Digital Ocean has a post on adding swap [here](https://www.digitalocean.com/community/tutorials/how-to-add-swap-on-ubuntu-14-04). For Amazon there's a StackOverflow thread [here](http://stackoverflow.com/questions/17173972/how-do-you-add-swap-to-an-ec2-instance).
2923
3024Don't spend a lot of time tweaking these settings; the simplest
3125thing is fine.
docs/system/hoon/cheet-sheets.md → docs/system/hoon/cheat-sheets.mdrenamed+4
@@ -1,3 +1,7 @@
1+---
2+sort: 3
3+---
4+
15Quick references
26================
37
docs/system/hoon/library.md+4−3
@@ -1,7 +1,8 @@
1+---
2+sort: 2
3+---
4+
15Library
26========
37
48<list dataPreview="true" titlesOnly="true"></list>
5−
6−
7−<search/>
docs/system/hoon/library/0.md+2−2
@@ -1,5 +1,5 @@
1−volume 0, Kelvin Versioning.
2−===========================
1+0 Kelvin Versioning
2+===================
33
44### `++hoon`
55
docs/system/hoon/library/1.md+7−3
@@ -1,7 +1,9 @@
1−volume 1, Hoon Structures
2−=========================
1+1 Hoon Structures
2+=================
33
4−------------------------------------------------------------------------
4+<toc noHeader="true" match="h3" preview="p"></toc>
5+
6+<div id="toc">
57
68### `++abel`
79
@@ -2235,3 +2237,5 @@ See also: `++ju`, `++by`, `++map`, `++set`
22352237 {[p=%a q={1 2}] [p=%b q={5 4 3}]}
22362238
22372239------------------------------------------------------------------------
2240+
2241+</div>
docs/system/hoon/library/2a.md+2−2
@@ -1,5 +1,5 @@
1−2a - basic unsigned math
2−========================
1+2a basic unsigned math
2+======================
33
44### `++add`
55
docs/system/hoon/library/2b.md+2−2
@@ -1,5 +1,5 @@
1−chapter 2b, basic containers
2−============================
1+2b basic containers
2+===================
33
44Section 2bA, units
55------------------
docs/system/hoon/library/2c.md+2−2
@@ -1,5 +1,5 @@
1−chapter 2c, simple noun surgery
2−===============================
1+2c simple noun surgery
2+======================
33
44section 2cA, bit surgery
55------------------------
docs/system/hoon/library/2da.md+2−2
@@ -1,5 +1,5 @@
1−section 2dA, sets
2−=================
1+2dA sets
2+========
33
44### `++apt`
55
docs/system/hoon/library/2db.md+2−2
@@ -1,5 +1,5 @@
1−section 2dB, maps
2−=================
1+2dB maps
2+========
33
44### `++ept`
55
docs/system/hoon/library/2dc.md+2−2
@@ -1,5 +1,5 @@
1−section 2dC, queues
2−===================
1+2dC queues
2+==========
33
44### `++to`
55
docs/system/hoon/library/2dd.md+2−2
@@ -1,5 +1,5 @@
1−section 2dD, casual containers
2−==============================
1+2dD casual containers
2+=====================
33
44### `++mo`
55
docs/system/hoon/library/2ea.md+2−2
@@ -1,5 +1,5 @@
1−section 2eA, packing
2−====================
1+2eA packing
2+===========
33
44### `++cue`
55
docs/system/hoon/library/2eb.md+2−2
@@ -1,5 +1,5 @@
1−section 2eB, parsing (tracing)
2−==============================
1+2eB parsing (tracing)
2+=====================
33
44### `++last`
55
docs/system/hoon/library/2ec.md+2−2
@@ -1,5 +1,5 @@
1−section 2eC, parsing (custom rules)
2−===================================
1+2eC parsing (custom rules)
2+==========================
33
44### `++cold`
55
docs/system/hoon/library/2ed.md+2−2
@@ -1,5 +1,5 @@
1−section 2eD
2−===========
1+2eD parsing (combinators)
2+=========================
33
44### `++bend`
55
docs/system/hoon/library/2ee.md+2−2
@@ -1,5 +1,5 @@
1−section 2ee, parsing (composers)
2−================================
1+2ee parsing (composers)
2+=======================
33
44### `++bass`
55
docs/system/hoon/library/2ef.md+2−2
@@ -1,5 +1,5 @@
1−section 2eF, parsing (ascii)
2−============================
1+2eF parsing (ascii)
2+===================
33
44### `++ace`
55
docs/system/hoon/library/2eg.md+2−2
@@ -1,5 +1,5 @@
1−section 2eG, parsing (whitespace)
2−=================================
1+2eG parsing (whitespace)
2+========================
33
44### `++dog`
55
docs/system/hoon/library/2eh.md+2−2
@@ -1,5 +1,5 @@
1−section 2eH, parsing (idioms)
2−=============================
1+2eH parsing (idioms)
2+====================
33
44### `++alf`
55
docs/system/hoon/library/2ei.md+2−2
@@ -1,5 +1,5 @@
1−section 2eI, parsing (external)
2−===============================
1+2eI parsing (external)
2+======================
33
44### `++rash`
55
docs/system/hoon/library/2ej.md+2−2
@@ -1,5 +1,5 @@
1−section 2eJ, formatting (basic text)
2−====================================
1+2eJ formatting (basic text)
2+===========================
33
44### `++cass`
55
docs/system/hoon/library/2ek.md+2−2
@@ -1,5 +1,5 @@
1−section 2eK, formatting (layout)
2−================================
1+2eK formatting (layout)
2+=======================
33
44### `++re`
55
docs/system/hoon/library/2el.md+2−2
@@ -1,5 +1,5 @@
1−section 2eL, formatting (path)
2−==============================
1+2eL formatting (path)
2+=====================
33
44### `++ab`
55
docs/system/hoon/library/2em.md+2−2
@@ -1,5 +1,5 @@
1−section 2eM, regular-expressions
2−================================
1+2eM regular-expressions
2+=======================
33
44### `++pars`
55
docs/system/hoon/library/2en.md+2−2
@@ -1,5 +1,5 @@
1−section 2eN, pseudo-cryptography
2−================================
1+2eN pseudo-cryptography
2+=======================
33
44### `++un`
55
docs/system/hoon/library/2eo.md+2−2
@@ -1,5 +1,5 @@
1−section 2eO, virtualization
2−===========================
1+2eO virtualization
2+==================
33
44### `++mack`
55
docs/system/hoon/library/2ep.md+2−2
@@ -1,5 +1,5 @@
1−section 2eP, diff
2−=================
1+2eP diff
2+========
33
44A- more or less low priority and/or currently in the wrong section
55anyway.
docs/system/hoon/library/2ew.md+2−2
@@ -1,5 +1,5 @@
1−section 2eW, lite number theory
2−===============================
1+2eW lite number theory
2+======================
33
44### `++egcd`
55
docs/system/hoon/library/2ex.md+2−2
@@ -1,5 +1,5 @@
1−section 2eX, jetted crypto
2−==========================
1+2eX jetted crypto
2+=================
33
44------------------------------------------------------------------------
55
docs/system/hoon/library/2ey.md+2−2
@@ -1,5 +1,5 @@
1−section 2eY, SHA-256
2−====================
1+2eY SHA-256
2+===========
33
44### `++shad`
55
docs/system/hoon/library/2ez.md+2−2
@@ -1,5 +1,5 @@
1−section 2eZ, OLD rendering
2−==========================
1+2eZ OLD rendering
2+=================
33
44### `++show`
55
docs/system/hoon/library/3ba.md+2−2
@@ -1,5 +1,5 @@
1−section 3bA, lite number theory
2−===============================
1+3bA lite number theory
2+======================
33
44### `++fu`
55
docs/system/hoon/library/3bb.md+2−2
@@ -1,5 +1,5 @@
1−section 3bB, cryptosuites
2−=========================
1+3bB cryptosuites
2+================
33
44### `++crua`
55
docs/system/hoon/library/3bc.md+2−2
@@ -1,5 +1,5 @@
1−section 3bC, Gregorian UTC
2−==========================
1+3bC Gregorian UTC
2+=================
33
44### `++dawn`
55
docs/system/hoon/library/3bd.md+2−2
@@ -1,5 +1,5 @@
1−section 3bD, JSON and XML
2−=========================
1+3bD JSON and XML
2+================
33
44### `++moon`
55
docs/system/hoon/library/3be.md+2−2
@@ -1,5 +1,5 @@
1−section 3bE, tree sync
2−======================
1+3bE tree sync
2+=============
33
44### `++invert-miso`
55
docs/system/hoon/library/3bf.md+2−2
@@ -1,5 +1,5 @@
1−section 3bF, filesystem interface
2−=================================
1+3bF filesystem interface
2+========================
33
44### `++feel`
55
docs/system/hoon/library/3bg.md+2−2
@@ -1,5 +1,5 @@
1−section 3bG, URL handling
2−=========================
1+3bG URL handling
2+================
33
44### `++deft`
55
docs/system/hoon/library/3bh.md+2−2
@@ -1,5 +1,5 @@
1−section 3bH, names etc
2−======================
1+3bH names etc
2+=============
33
44### `++clan`
55
docs/system/hoon/library/3bi.md+2−2
@@ -1,5 +1,5 @@
1−section 3bI, Arvo models
2−========================
1+3bI Arvo models
2+===============
33
44### `++acru`
55
docs/system/hoon/runes.md+81−123
@@ -1,126 +1,84 @@
1+---
2+sort: 1
3+---
4+
15Runes
26=====
37
4−In Hoon there are no reserved words. Instead, [`++twigs`]() (abstract
5−syntax trees), are formed using a diagraph of two ASCII symbols, which
6−is called a rune.
7−
8−Runes are loosely divided into categories by their first character. To
9−find documentation on each individual category, follow these links:
10−
11−<list></list>
12−
13−------------------------------------------------------------------------
14−
15−Introduction
16−------------
17−
18−For example, the rune `?:`, pronounced "wutcol", is a rune that accepts
19−three `++twig` expressions to form an "if-then-else statement," where
20−`p` is the predicate, `q` is the "then" statement, and `r` is the "else"
21−statement:
22−
23− [%wtcl p=twig q=twig r=twig]
24−
25−In a program, it is used like so:
26−
27− ++ add
28− |= [a=@ b=@]
29− ^- @
30− ?: =(0 a) b
31− $(a (dec a), b +(b))
32−
33−Here the `=(0 a)` is `p`, the `b` is `q`, and the bottom line is the
34−`r`.
35−
36−There are several benefits to using runes in lieu of reserved words.
37−First, it prevents the programmer from accidentally misusing a reserved
38−word as a variable name, which also allows her to be sure that any word
39−in her progam is an identifier. Next, as the first ASCII symbol of the
40−rune digraphs bears semantic significance, the programmer can look at
41−any rune and immediately have a basic, intuitive understanding as to
42−what it does.
43−
44−Next, rune syntax addresses several issues that arise in other
45−languages. First, it produces cleaner, less verbose code that
46−conveniently flows downward. To highlight the verbosity Hoon avoids by
47−implementing runes, here is the C equivalent of the `++add` source code
48−printed above:
49−
50− attribute add {
51− function(left-operand: atom, right-operand: atom)
52− produce atom
53− if equals(0, left-operand) {
54− right-operand
55− } else {
56− recurse(left-operand (decrement left-operand)),
57− right-operand (increment right-operand))
58− }
59− }
60−
61−What is more, Hoon solves two problems that arise in functional
62−programming languages with very deep expression trees: first, the
63−collection of huge piles of closing parens at the end of large blocks;
64−and second, the fact that the depth of expression trees are thus bounded
65−by the width of the text box, as subexpressions tend to be indented.
66−Some languages solve the bracket-terminator problem by parsing
67−whitespace in order to use indentation to express tree depth:
68−
69− ?:
70− &
71− 47
72− 52
73−
74−While this is actually valid Hoon, it does not solve the width problem.
75−
76−To address this problem, most Hoon `++twigs` have a short, fixed
77−fan-out. Thus, the parser does not need significant whitespace nor a
78−terminator to determine how many twigs follow a `?:`--it already knows
79−that the answer is three. A smart parser allows the Hoon programmer to
80−format her code using a [backstep pattern]() that allows her to descend
81−into a deep tree without losing right margin.
82−
83−Lastly, but perhaps most significantly, code is meant to be seen, and
84−not read. Anyone who has even slight experience coding Hoon will tell
85−you that they can understand and connect with properly formatted Hoon
86−code on a deeper, more intuitive level that cannot be explained but must
87−be experienced. One doesn't read `++add`, she sees it.
88−
89−Names and Categories
90−--------------------
91−
92−While the second glyph in a rune means little or nothing, the first
93−defines a rough semantic category:
94−
95− | bar Core construction
96− $ buc Tile construction
97− % cen Invocations
98− : col Tuple construction
99− . dot Nock operations
100− # hax Pretty printing
101− ^ ket Type conversions
102− ; sem Composers (and XML generators)
103− ~ sig Hints
104− = tis Subject modifiers
105− ? wut Conditionals, booleans, and tests
106− ! zap Special operations
107−
108−As shown above, each glyph has its own monosyllabic name, designed to be
109−pronounced quickly in combination with another glyph to form a rune
110−name. As languages are often read-aloud, this saves the programmer from
111−having to say "dollar sign, question mark"--"bucwut" is much more
112−compact.
113−
114−Irregular pronuncations
115−-----------------------
116−
117−To avoid a few tongue-twisters, some runes have irregular pronunciations
118−that should be noted:
119−
120− -- hephep phep
121− +- lushep slep
122− ++ luslus slus
123− == tistis stet
124−
125−Note: these runes are not members of any of the categories above, but
126−are mostly used to....
8+#### Hoon has no reserved words. Instead we use ASCII pairs we call runes.
9+
10+#### This is the complete index.
11+
12+<div class="book">
13+
14+## `$ buc` (molds)
15+
16+<list dataPath="docs/system/hoon/runes/bc" dataPreview="true" className="runes" childIsFragment="true"></list>
17+
18+---
19+
20+## `| bar` (cores)
21+
22+<list dataPath="docs/system/hoon/runes/br" dataPreview="true" className="runes" childIsFragment="true"></list>
23+
24+---
25+
26+## `: col` (tuples)
27+
28+<list dataPath="docs/system/hoon/runes/cl" dataPreview="true" className="runes" childIsFragment="true"></list>
29+
30+---
31+
32+## `% cen` (invocations)
33+
34+<list dataPath="docs/system/hoon/runes/cn" dataPreview="true" className="runes" childIsFragment="true"></list>
35+
36+---
37+
38+## `. dot` (nock)
39+
40+<list dataPath="docs/system/hoon/runes/dt" dataPreview="true" className="runes" childIsFragment="true"></list>
41+
42+---
43+
44+## `# hax` (printing)
45+
46+<list dataPath="docs/system/hoon/runes/hx" dataPreview="true" className="runes" childIsFragment="true"></list>
47+
48+---
49+
50+## `^ ket` (casting)
51+
52+<list dataPath="docs/system/hoon/runes/kt" dataPreview="true" className="runes" childIsFragment="true"></list>
53+
54+---
55+
56+## `~ sig` (hints)
57+
58+<list dataPath="docs/system/hoon/runes/sg" dataPreview="true" className="runes" childIsFragment="true"></list>
59+
60+---
61+
62+## `; sem` (composition)
63+
64+<list dataPath="docs/system/hoon/runes/sm" dataPreview="true" className="runes" childIsFragment="true"></list>
65+
66+---
67+
68+## `= tis` (subject modifiers)
69+
70+<list dataPath="docs/system/hoon/runes/ts" dataPreview="true" className="runes" childIsFragment="true"></list>
71+
72+---
73+
74+## `? wut` (conditional)
75+
76+<list dataPath="docs/system/hoon/runes/wt" dataPreview="true" className="runes" childIsFragment="true"></list>
77+
78+---
79+
80+## `! zap` (special)
81+
82+<list dataPath="docs/system/hoon/runes/zp" dataPreview="true" className="runes" childIsFragment="true"></list>
83+
84+</div>
docs/system/hoon/runes/bc.mdnew file+11
@@ -0,0 +1,11 @@
1+---
2+sort: 2
3+---
4+
5+# `$ buc` (molds)
6+
7+##### Molds are types, but we don't have types.
8+
9+<list dataPath="docs/system/hoon/runes/bc" dataPreview="true" className="runes" linkToFragments="true"></list>
10+
11+<kids dataPath="docs/system/hoon/runes/bc" className="runes"></kids>
docs/system/hoon/runes/bc/bcbr.md+3−3
@@ -1,7 +1,7 @@
1−`$|`
2−====
1+`$| bucbar`
2+===========
33
4−Union between atom and cell
4+Union between atom and cell.
55
66[mold]() that's a union of an atom `p` and cell `q`.
77`$|` is similar to [`$?`](), but is more strict in that in
docs/system/hoon/runes/bc/bccb.md+3−3
@@ -1,7 +1,7 @@
1−`$_`
2−====
1+`$_ buccab`
2+===========
33
4−Unbunt (create mold from example)
4+Unbunt (create mold from example).
55
66Uses a [++twig]() `p` to produce a [mold]() for the type (span)
77of `p`. The validator function has a default value of `p`. Used
docs/system/hoon/runes/bc/bccl.md+3−3
@@ -1,7 +1,7 @@
1−`$:`
2−====
1+`$: buccol`
2+===========
33
4−Tuple of molds
4+Tuple of molds.
55
66Produces
77--------
docs/system/hoon/runes/bc/bccn.md+2−2
@@ -1,7 +1,7 @@
1−`$%`
1+`$% buccen`
22====
33
4−Tagged union
4+Tagged union.
55
66Produces a [mold]() of a tagged union of a list of case pairs.
77
docs/system/hoon/runes/bc/bcls.md+3−3
@@ -1,7 +1,7 @@
1−`$+`
2−====
1+`$+ buclus`
2+===========
33
4−Type of function (type signature)
4+Type of function (type signature).
55
66Produces a [mold]() for a function that accepts `p` and produces `q`. Used when we want to use the type of a function that we do not want to compute.
77
docs/system/hoon/runes/bc/bcpm.md+3−3
@@ -1,7 +1,7 @@
1−`$&`
2−====
1+`$& bucpam`
2+===========
33
4−Union of two cells: one w/cellular head & other w/atomic head
4+Union of two cells: one w/cellular head & other w/atomic head.
55
66Produces a [mold]() that's a union between two different kinds of noun: a cell whose head is a cell (`p`), and cell whose head is an atom (`q`). Its default value ([bunt]()) is the value of `q`. One important use of `$&` is to implement autocons in [`++twig`]().
77
docs/system/hoon/runes/bc/bctr.md+3−3
@@ -1,7 +1,7 @@
1−`$*`
2−====
1+`$* buctar`
2+===========
33
4−Bunt (default value)
4+Bunt (default value).
55
66Produces the default value ([bunt]()) of [mold]() `p`. Does so as a compile-time constant if possible. If not possible, then it is produced dynamically.
77
docs/system/hoon/runes/bc/bcts.md+3−3
@@ -1,7 +1,7 @@
1−`$=`
2−====
1+`$= buctis`
2+===========
33
4−Add variable name
4+Add variable name.
55
66Wraps a [++face]() around another [mold](). Used primarily to add variable names to values.
77
docs/system/hoon/runes/bc/bcwt.md+3−3
@@ -1,7 +1,7 @@
1−`$?`
2−====
1+`$? bucwut`
2+===========
33
4−Union of types
4+Union of types.
55
66Produce a union between a non-empty list of [mold]()s `p`. The default value ([bunt]()) is the value of the first element.
77
docs/system/hoon/runes/br.mdnew file+11
@@ -0,0 +1,11 @@
1+---
2+sort: 1
3+---
4+
5+# `| bar` (cores)
6+
7+##### Cores are sort of like objects, but not quite.
8+
9+<list dataPath="docs/system/hoon/runes/br" dataPreview="true" className="runes" linkToFragments="true"></list>
10+
11+<kids dataPath="docs/system/hoon/runes/br" className="runes"></kids>
docs/system/hoon/runes/br/brcb.md+7−3
@@ -1,7 +1,11 @@
1−`|_`
2−====
1+---
2+sort: 7
3+---
34
4−Door: core with sample (input values)
5+`|_ barcab`
6+===========
7+
8+Door: core with sample (input values).
59
610Similar to [`|%`](), but also takes input data (aka [sample]())
711available within the entire core. Cores of this type are called doors.
docs/system/hoon/runes/br/brcn.md+7−3
@@ -1,7 +1,11 @@
1−`|%`
2−====
1+---
2+sort: 1
3+---
34
4−Generic core
5+`|% barcen`
6+===========
7+
8+Generic core.
59
610Constructs a generic core with n named expressions, closed with `--`. Cores are
711similar to an object with named properties (aka [arms]()) that can contain either functions or data. Accepts both [dry or `%elm`]() and [wet or `%ash`]() arms.
docs/system/hoon/runes/br/brdt.md+7−3
@@ -1,7 +1,11 @@
1−`|.`
2−====
1+---
2+sort: 3
3+---
34
4−Trap: `|=` with no argument & not called automatically
5+`|. bardot`
6+===========
7+
8+Trap: `|=` with no argument & not called automatically.
59
610Similar to `|=` except that it takes no arguments and is not automatically
711called (you must activate it with the irregular wideform of `%-`, which is
docs/system/hoon/runes/br/brfs.md+7−3
@@ -1,7 +1,11 @@
1−`|/`
2−====
1+---
2+sort: 8
3+---
34
4−`|_` with well typed output
5+`|/ barfas`
6+===========
7+
8+`|_` with well typed output.
59
610Similar to `|_` except that it takes and produces well-typed output. XX
711
docs/system/hoon/runes/br/brhp.md+7−3
@@ -1,7 +1,11 @@
1−`|-`
2−====
1+---
2+sort: 4
3+---
34
4−Trap: automatically called function with no arguments
5+`|- barhep`
6+===========
7+
8+Trap: automatically called function with no arguments.
59
610A function with no arguments that's automatically called when constructed. More specifically, it produces a [dry]() [%gold]() [core]() whose single [arm]() [$]() (the empty name) is automatically called when the core is constructed. Similar to creating and calling an anonymous function and is quite commonly used for loops or recursion.
711
docs/system/hoon/runes/br/brkt.md+6−2
@@ -1,5 +1,9 @@
1−`|^`
2−====
1+---
2+sort: 6
3+---
4+
5+`|^ barket`
6+===========
37
48Same as `|-` except that it can contain internal arms.
59
docs/system/hoon/runes/br/brls.md+7−3
@@ -1,7 +1,11 @@
1−`|+`
2−====
1+---
2+sort: 9
3+---
34
4−Function with unreadable sample
5+`|+ barlus`
6+===========
7+
8+Function with unreadable sample.
59
610`|+` is a synthetic rune that produces a [dry]() [`%iron`]() function
711with argument (aka [sample]()) [`$*(p)`]() and [arm]()s `q`. `|+` is similar to `|=`, but differs in that its input (sample) cannot be read and thus cannot interfere with the type system.
docs/system/hoon/runes/br/brtr.md+7−3
@@ -1,7 +1,11 @@
1−`|*`
2−====
1+---
2+sort: 10
3+---
34
4−Wet function
5+`|* bartar`
6+===========
7+
8+Wet function.
59
610Similar to `|=` except that it does type checking at
711call time, and that the product type is checked to be the same as
docs/system/hoon/runes/br/brts.md+7−3
@@ -1,7 +1,11 @@
1−`|=`
2−====
1+---
2+sort: 2
3+---
34
4−Function with argument(s)
5+`|= bartis`
6+===========
7+
8+Function with argument(s).
59
610`|=`, is a synthetic rune that produces a [dry]() [`%gold`]() gate with
711sample [`$*(p)`](), arm `q`. A gate is a core with one arm, [`$`](), the
docs/system/hoon/runes/br/brwt.md+7−3
@@ -1,7 +1,11 @@
1−`|?`
2−====
1+---
2+sort: 5
3+---
34
4−`|-` with hidden context
5+`|? barwut`
6+===========
7+
8+`|-` with hidden context.
59
610Similar to `|-` except for that the [sample]() and
711[context]() of the core being passed is hidden in order to avoid
docs/system/hoon/runes/cl.mdnew file+11
@@ -0,0 +1,11 @@
1+---
2+sort: 3
3+---
4+
5+# `: col` (tuples)
6+
7+##### Tuples are easy.
8+
9+<list dataPath="docs/system/hoon/runes/cl" dataPreview="true" className="runes" linkToFragments="true"></list>
10+
11+<kids dataPath="docs/system/hoon/runes/cl" className="runes"></kids>
docs/system/hoon/runes/cl/clcb.md+3−3
@@ -1,7 +1,7 @@
1−`:_`
2−====
1+`:_ colcab`
2+===========
33
4−Inverted tuple of `p` `q`
4+Inverted tuple of `p` `q`.
55
66Exists for code readability and organization. See the [backstep]() convention.
77
docs/system/hoon/runes/cl/clfs.md+3−3
@@ -1,7 +1,7 @@
1−`:/`
2−====
1+`:/ colfas`
2+===========
33
4−String to XML XX
4+String to XML XX.
55
66`:/`, `colfas`, is a synthetic rune that produces `[%$ [%$ p ~] ~]`,
77i.e., `[0 [0 p 0] 0]`.
docs/system/hoon/runes/cl/clhp.md+3−3
@@ -1,7 +1,7 @@
1−`:-`
2−====
1+`:- colhep`
2+===========
33
4−Tuple of two
4+Tuple of two.
55
66Produces
77--------
docs/system/hoon/runes/cl/clkt.md+3−3
@@ -1,7 +1,7 @@
1−`:^`
2−====
1+`:^ colket`
2+===========
33
4−Tuple of four
4+Tuple of four.
55
66Produces
77--------
docs/system/hoon/runes/cl/clls.md+3−3
@@ -1,7 +1,7 @@
1−`:+`
2−====
1+`:+ collus`
2+===========
33
4−Tuple of 3
4+Tuple of 3.
55
66Produces
77--------
docs/system/hoon/runes/cl/clsg.md+3−3
@@ -1,7 +1,7 @@
1−`:~`
2−====
1+`:~ colsig`
2+===========
33
4−Null-terminated tuple of n elements
4+Null-terminated tuple of n elements.
55
66Closed with `==`.
77
docs/system/hoon/runes/cl/cltr.md+3−3
@@ -1,7 +1,7 @@
1−`:*`
2−====
1+`:* coltar`
2+===========
33
4−Tuple of n elements
4+Tuple of n elements.
55
66Closed with `==`.
77
docs/system/hoon/runes/cn.mdnew file+11
@@ -0,0 +1,11 @@
1+---
2+sort: 4
3+---
4+
5+# `% cen` (invocations)
6+
7+##### Calls, but not.
8+
9+<list dataPath="docs/system/hoon/runes/cn" dataPreview="true" className="runes" linkToFragments="true"></list>
10+
11+<kids dataPath="docs/system/hoon/runes/cn" className="runes"></kids>
docs/system/hoon/runes/cn/cncb.md+3−3
@@ -1,7 +1,7 @@
1−`%_`
2−====
1+`%_ cencab`
2+===========
33
4−`%=`, but product cast to `p`
4+`%=`, but product cast to `p`.
55
66The same as [`%=`](), except for that the product is cast
77back to the type of `p`. Evaluates `p` with the changes specified in `q`, then casts the product back to the type of `p`. `%_` is used to change a batch of [`++wing`]()s all at once, ensuring that the resulting product is type checked.
docs/system/hoon/runes/cn/cndt.md+3−3
@@ -1,7 +1,7 @@
1−`%.`
2−====
1+`%. cendot`
2+===========
33
4−Inverted function call
4+Inverted function call.
55
66Inverts the order of [`%-`](), so the argument is the first
77element and the second element is the function. Exists primarily
docs/system/hoon/runes/cn/cnhp.md+3−3
@@ -1,7 +1,7 @@
1−`%-`
2−====
1+`%- cenhep`
2+===========
33
4−Call function w/one argument
4+Call function w/ one argument.
55
66Call function with one argument. Has an irregular wideform syntax: `(function[arg0 arg1...])`, which can takes n arguments enclosed within the `()`. Note
77that one can also pass a tall form (or wide form) function called with `%-` a tuple with `n` elements for functions that require more than one argument.
docs/system/hoon/runes/cn/cnkt.md+3−3
@@ -1,7 +1,7 @@
1−`%^`
2−====
1+`%^ cenket`
2+===========
33
4−Call function w/three arguments
4+Call function w/ three arguments.
55
66Calls the one arm ([$]()) from the [door]() `p` with its [sample]() set to `[%cntr q r s]`. `%^` in the most common case simply calls `p` with `q`, `r`and `s` as its arguments.
77
docs/system/hoon/runes/cn/cnls.md+3−3
@@ -1,7 +1,7 @@
1−`%+`
2−====
1+`%+ cenlus`
2+===========
33
4−Call function w/two arguments
4+Call function w/ two arguments.
55
66Calls the one arm ([$]()) from the [door]() `p` with its [sample]() set to `[%cntr q r]`.
77
docs/system/hoon/runes/cn/cnsg.md+3−3
@@ -1,7 +1,7 @@
1−`%~`
2−====
1+`%~ censig`
2+===========
33
4−Call arm in door w/argument
4+Call arm in door w/ argument.
55
66Evaluates the expression addressed at `p` within core
77`q` whose input data ([sample]()) is set to `r`. Used frequently with
docs/system/hoon/runes/cn/cntr.md+4−4
@@ -1,9 +1,9 @@
1−centar, `%*`, %cntr
2−============================
1+`%* centar`
2+===========
33
4−`%~` call arm from [door]() w/context changes
4+`%~` call arm from door w/ context changes.
55
6−The same as `%~` but can make changes anywhere in the [context](), not just within the input data ([sample]()). Evaluates the expression `p` within core `q` with changes `r` to the context.
6+The same as `%~` but can make changes anywhere in the context, not just within the input data (sample). Evaluates the expression `p` within core `q` with changes `r` to the context.
77
88Produces
99--------
docs/system/hoon/runes/cn/cnts.md+3−3
@@ -1,7 +1,7 @@
1−`%=`
2−====
1+`%= centis`
2+===========
33
4−Eval `p` w/changes
4+Eval `p` w/ changes.
55
66Evaluates `p` with the changes specified in `q`, where `q` is a list of addresses ([`++wing`]())s followed by the values that will replace whatever value currently lies at that address. Makes the changes all at once to ensure that the product type is checked.
77
docs/system/hoon/runes/dt.mdnew file+11
@@ -0,0 +1,11 @@
1+---
2+sort: 5
3+---
4+
5+# `. dot` (nock)
6+
7+##### Run some nock.
8+
9+<list dataPath="docs/system/hoon/runes/dt" dataPreview="true" className="runes" linkToFragments="true"></list>
10+
11+<kids dataPath="docs/system/hoon/runes/dt" className="runes"></kids>
docs/system/hoon/runes/dt/dtkt.md+3−3
@@ -1,7 +1,7 @@
1−`.^`
2−====
1+`.^ dotket`
2+===========
33
4−Nock 11
4+Nock 11.
55
66Generates nock operator `11`, which--in virtual userspace
77nock, [`++mock`]()--loads a file from the global namespace, [%clay]().
docs/system/hoon/runes/dt/dtls.md+3−3
@@ -1,7 +1,7 @@
1−`.+`
2−====
1+`.+ dotlus`
2+===========
33
4−Increments an atom
4+Increments an atom.
55
66`.+` is a natural rune that generates nock operator `4`, which
77increments an operand that's an atom.
docs/system/hoon/runes/dt/dttr.md+3−3
@@ -1,7 +1,7 @@
1−`.*`
2−====
1+`.* dottar`
2+===========
33
4−Compute nock
4+Compute nock.
55
66Computes nock expressions. Runs nock formula `q` on
77nock subject `p`.
docs/system/hoon/runes/dt/dtts.md+3−3
@@ -1,7 +1,7 @@
1−`.=`
2−====
1+`.= dottis`
2+===========
33
4−Test equality
4+Test equality.
55
66Nock operator 5: tests two nouns `p` and `q` for equality, producing a boolean.
77
docs/system/hoon/runes/dt/dtwt.md+3−3
@@ -1,7 +1,7 @@
1−`.?`
2−====
1+`.? dotwut`
2+===========
33
4−Test if noun is cell or atom
4+Test if noun is cell or atom.
55
66Nock operator 3: tests whether a noun is a cell or an
77atom, producing true if it is the former and false if the latter.
docs/system/hoon/runes/dt/dtzy.md+3−3
@@ -1,7 +1,7 @@
1−[dotzay, %dtzy](#dttr)
2−======================
1+`dotzay`
2+========
33
4−Odored atom
4+Odored atom.
55
66`dotzay` is a natural rune that produces a non-cubed atomic constant of
77odor `p` and value `q`. `dotzay` is never used explicitly, but always
docs/system/hoon/runes/dt/dtzz.md+3−3
@@ -1,7 +1,7 @@
1−dotzaz, %dtzz
2−======================
1+`dotzaz`
2+========
33
4−Cube
4+Cube.
55
66`dotzaz` is a natural rune that produces a cubed noun constant of value
77`q` and odor `p`, if `q` is an atom. A cube is an atom whose type
docs/system/hoon/runes/hx.mdnew file+11
@@ -0,0 +1,11 @@
1+---
2+sort: 6
3+---
4+
5+# `# hax` (printing)
6+
7+##### Want to print something? Fine.
8+
9+<list dataPath="docs/system/hoon/runes/hx" dataPreview="true" className="runes" linkToFragments="true"></list>
10+
11+<kids dataPath="docs/system/hoon/runes/hx" className="runes"></kids>
docs/system/hoon/runes/hx/hxgl.md+3−3
@@ -1,7 +1,7 @@
1−haxgal, `#<`, %hxgl
2−============================
1+`#< haxgal`
2+===========
33
4−Prettyprint string [`++tape`]()
4+Prettyprint string `++tape`.
55
66`#<` is a synthetic rune that calls the function [`++noah`]() with argument `p`. Used to produce a [`++tape`]() of the expression passed to it, and
77is only used in the irregular form.
docs/system/hoon/runes/hx/hxgr.md+3−3
@@ -1,7 +1,7 @@
1−haxgar, `#>`, %hxgr
2−============================
1+`#> haxgar`
2+===========
33
4−Prettyprint `++tank`
4+Prettyprint `++tank`.
55
66`#>`, `haxgar`, `[%hxgr p=tusk]`is a synthetic rune that slams the
77assumed gate `cain` on `[%zpgr %cntr p]`.
docs/system/hoon/runes/kt.mdnew file+11
@@ -0,0 +1,11 @@
1+---
2+sort: 7
3+---
4+
5+# `^ ket` (casting)
6+
7+##### Go ahead, recast that.
8+
9+<list dataPath="docs/system/hoon/runes/kt" dataPreview="true" className="runes" linkToFragments="true"></list>
10+
11+<kids dataPath="docs/system/hoon/runes/kt" className="runes"></kids>
docs/system/hoon/runes/kt/ktbr.md+3−3
@@ -1,7 +1,7 @@
1−`^|`
2−====
1+`^| ketbar`
2+===========
33
4−Make core context unreadable
4+Make core context unreadable.
55
66Converts a core to a core whose [context]() is unreadable. Useful in
77preventing type fails when replacing one core with one context
docs/system/hoon/runes/kt/ktdt.md+3−3
@@ -1,7 +1,7 @@
1−`^.`
2−====
1+`^. ketdot`
2+===========
33
4−Cast `q` to product type of `p`
4+Cast `q` to product type of `p`.
55
66Casts `q` to the product of calling `p` on `q`. The same
77as casting `q` to the product type of `p`. Useful when you want
docs/system/hoon/runes/kt/kthp.md+3−3
@@ -1,7 +1,7 @@
1−`^-`
2−====
1+`^- kethep`
2+===========
33
4−Cast
4+Cast.
55
66Casts `q` to the [span]() of `p`. The same as `^+`, except for that `q` is actually cast to the bunt of `q` (`$,(q)`). The easiest way to make a basic cast. Used when you already have already created a validator function ([mold]()) for a span.
77
docs/system/hoon/runes/kt/ktls.md+3−3
@@ -1,7 +1,7 @@
1−`^+`
2−====
1+`^+ ketlus`
2+===========
33
4−Cast `q` to an unbunted `p`
4+Cast `q` to an unbunted `p`.
55
66Casts `q` to the type of `p`, verifying that it contains
77the type of `q`. Similar to `^+`, but doesn't bunt `p`. Used to
docs/system/hoon/runes/kt/ktpm.md+3−3
@@ -1,7 +1,7 @@
1−ketpam, `^&`, %ktpm
2−============================
1+`^& ketpam`
2+===========
33
4−Convert `%gold` to `%zinc`
4+Convert `%gold` to `%zinc`.
55
66`^&` is a natural rune that converts a `%gold` core into a `%zinc` core.
77At present, `%zinc` cores are not commonly used.
docs/system/hoon/runes/kt/ktsg.md+3−3
@@ -1,7 +1,7 @@
1−`^~`
2−====
1+`^~ ketsig`
2+===========
33
4−Try executing `p` at compile time
4+Try executing `p` at compile time.
55
66Tries to execute `p` statically at compile time. If this
77fails, `p` remains dynamic. Primarily useful for
docs/system/hoon/runes/kt/ktts.md+2−2
@@ -1,5 +1,5 @@
1−`^=`
2−====
1+`^= kettis`
2+===========
33
44Wraps a variable name around a value.
55
docs/system/hoon/runes/kt/ktwt.md+4−2
@@ -1,5 +1,7 @@
1−ketwut, `^?`, %ktwt
2−============================
1+`^? ketwut`
2+===========
3+
4+Convert `%gold` to `%lead`.
35
46Used to convert a [core]() whose context is unreadable (aka
57a %gold core) to a core both of whose context and sample are
docs/system/hoon/runes/sg.mdnew file+11
@@ -0,0 +1,11 @@
1+---
2+sort: 8
3+---
4+
5+# `~ sig` (hints)
6+
7+##### Give the compiler a little help.
8+
9+<list dataPath="docs/system/hoon/runes/sg" dataPreview="true" className="runes" linkToFragments="true"></list>
10+
11+<kids dataPath="docs/system/hoon/runes/sg" className="runes"></kids>
docs/system/hoon/runes/sg/sgbc.md+3−3
@@ -1,7 +1,7 @@
1−`~$`
2−====
1+`~$ sigbuc`
2+===========
33
4−Label for profiling
4+Label for profiling.
55
66Labels computation `q` as `p` for profiling.
77
docs/system/hoon/runes/sg/sgbr.md+3−3
@@ -1,7 +1,7 @@
1−`~|`
2−====
1+`~| sigbar`
2+===========
33
4−`p` in stack trace if `q` crashes
4+`p` in stack trace if `q` crashes.
55
66Presents the product of `p` in the stack trace if `q` crashes. `p` is only
77evaluated if `q` crashes.
docs/system/hoon/runes/sg/sgcb.md+3−3
@@ -1,7 +1,7 @@
1−`~_`
2−====
1+`~_ sigcab`
2+===========
33
4−Pre-formatted stackframe into stacktrace
4+Pre-formatted stackframe into stacktrace.
55
66Inserts pre-formatted stackframe `p` into the stacktrace of `q`.
77In hoon terminology, inserts `p`, a [trap]() producing a [++`tank`]() (pretty printed text), in the trace of `q`.
docs/system/hoon/runes/sg/sgcn.md+3−3
@@ -1,7 +1,7 @@
1−`~%`
2−====
1+`~% sigcen`
2+===========
33
4−Register jet
4+Register jet.
55
66Registers a jet in core `s` so that it can be called when that code is run.
77
docs/system/hoon/runes/sg/sgfs.md+3−3
@@ -1,7 +1,7 @@
1−`~/`
2−====
1+`~/ sigfas`
2+===========
33
4−XX
4+XX.
55
66`~/` is a synthetic rune that implements one common case - a function arm in
77a [book](), i.e. a library function - of the [`~%`]() [jet]() hint. Assumes the parent axis is `7` and that there are no children.
docs/system/hoon/runes/sg/sggl.md+3−3
@@ -1,7 +1,7 @@
1−`~<`
2−====
1+`~< siggal`
2+===========
33
4−Hint to product
4+Hint to product.
55
66`~<` is a synthetic rune that applies arbitrary [hint]() `p` to the
77product of `q`. `~<` is similar to `~>`, but computes `q` before
docs/system/hoon/runes/sg/sggr.md+2−2
@@ -1,5 +1,5 @@
1−`~>`
2−====
1+`~> siggar`
2+===========
33
44Arbitrary hint
55
docs/system/hoon/runes/sg/sgls.md+3−3
@@ -1,7 +1,7 @@
1−`~+`
2−====
1+`~+ siglus`
2+===========
33
4−Memoize computation
4+Memoize computation.
55
66Hints to the interpreter to memoize (cache) the computation of `p`.
77
docs/system/hoon/runes/sg/sgpm.md+4−4
@@ -1,9 +1,9 @@
1−sigpam, `~&`, %sgpm
2−============================
1+`~& sigpam`
2+===========
33
4−PrintF
4+Printf.
55
6−'PrintF' or 'log' in other languages. Often used for debugging.
6+'Printf' or 'log' in other languages. Often used for debugging.
77
88More specifically in hoon terminology, prints `q` on the console
99before computing `r`. `p` is the log priority, 0-3 defaulting to 0. `~&`
docs/system/hoon/runes/sg/sgts.md+3−3
@@ -1,7 +1,7 @@
1−`~=`
2−====
1+`~= sigtis`
2+===========
33
4−Hint to avoid duplication
4+Hint to avoid duplication.
55
66Hints to the interpreter that `q` may produce a noun equal to the
77already existing `p` in order to avoid storing the same noun twice.
docs/system/hoon/runes/sg/sgwt.md+3−3
@@ -1,7 +1,7 @@
1−`~?`
2−====
1+`~? sigwut`
2+===========
33
4−PrintF if `q` true
4+PrintF if `q` true.
55
66Same as `~&` except for that `r` is printed to the console if and only
77if `q` evaluates to true.
docs/system/hoon/runes/sg/sgzp.md+3−3
@@ -1,7 +1,7 @@
1−sigzap, `~!`, %sgzp
2−============================
1+`~! sigzap`
2+===========
33
4−Print type on compilation fail
4+Print type on compilation fail.
55
66`~!` is a natural rune for debugging uses only, semantically equivalent
77to [`++twig`] `q`. If compilation fails within `q`, `~!` will show the
docs/system/hoon/runes/sm.md+7−38
@@ -1,42 +1,11 @@
1−<div class="short">
1+---
2+sort: 10
3+---
24
3−`sem ; %sem`
4−============
5+# `; sem` (composition)
56
6−Composition
7−-----------
7+##### Compose at will.
88
9−The `;` runes are used for composition. They are all synthetic.
9+<list dataPath="docs/system/hoon/runes/sm" dataPreview="true" className="runes" linkToFragments="true"></list>
1010
11−There are three categories of `;` runes.
12−
13−</div>
14−
15−#### Gate composers
16−
17−[`;:`]() Applies a binary gate to multiple arguments.
18−
19−[`;~`]() Uses a monad to compose multiple gates, producing a gate of a similar type.
20−
21−[`;;`]() Composes a [clam]() with a value, slamming the value through
22−the clam and forcefully verifying that it is unchanged. See also:
23−[`++hard`]().
24−
25−<hr></hr>
26−
27−#### Interpolators
28−
29−[`;"`]() Composes [`++tapes`]() and twigs that produce `++tape`s.
30−Generally used in its irregular form, of (text surrounded by double
31−quotes).
32−
33−<hr></hr>
34−
35−#### [++sail] runes:
36−
37−`;-`, `;+`, `;*`, `;%`, and `%smzz` all compose a tree structure. See
38−also: [`++sail`]().
39−
40−<hr></hr>
41−
42−<kids></kids>
11+<kids dataPath="docs/system/hoon/runes/sm" className="runes"></kids>
docs/system/hoon/runes/sm/smcl.md+2−2
@@ -1,7 +1,7 @@
1−`;:`
1+`;: semcol`
22====
33
4−Fold over tuple
4+Fold over tuple.
55
66Apply a binary function `p` to a tuple `q` with n elements. Similar to folding over the tuple `q`.
77
docs/system/hoon/runes/sm/smcn.md+2−2
@@ -1,7 +1,7 @@
1−`;%`
1+`;% semcen`
22====
33
4−`%-` in [`++sail`]()
4+`%-` in `++sail`.
55
66Performs the same function as `%-`, except within XML template syntax
77(aka sail). Passes `q`, a list of n arguments, to function `p`.
docs/system/hoon/runes/sm/smdq.md+2−2
@@ -1,7 +1,7 @@
1−`;"`
1+`;" semdoq`
22====
33
4−Make string
4+Make string.
55
66`semdoq` is a synthetic rune used to make strings, interpreted or not.
77
docs/system/hoon/runes/sm/smhp.md+2−2
@@ -1,7 +1,7 @@
1−`;-`
1+`;- semhep`
22====
33
4−Interpolate string
4+Interpolate string.
55
66Interpolates a string (aka [++tape]()) into a [`++marl`](), our datastructure for XML.
77
docs/system/hoon/runes/sm/smls.md+2−2
@@ -1,7 +1,7 @@
1−`;+`
1+`;+ semlus`
22====
33
4−Interpolate [`++manx`]()
4+Interpolate `++manx`.
55
66`;+` is a virtual rune used within [`++sail`]() to interpolate a manx.
77`;+` is useful when you need to dynamically produce a tag in a `++sail`
docs/system/hoon/runes/sm/smsg.md+2−2
@@ -1,7 +1,7 @@
1−`;~`
1+`;~ semsig`
22====
33
4−Monad composer
4+Monad composer.
55
66`;~` is a synthetic rune used to compose functions under a monad.
77
docs/system/hoon/runes/sm/smsm.md+2−2
@@ -1,7 +1,7 @@
1−`;;`
1+`;; semsem`
22====
33
4−Fixpoint
4+Fixpoint.
55
66`;;` is a synthetic rune that types `q` as a fixpoint of `p`. More
77specifically, `;;` slams `q` through gate `p`, asserting that the
docs/system/hoon/runes/sm/smtr.md+3−3
@@ -1,7 +1,7 @@
1−`;*`
2−====
1+`;* semtar`
2+===========
33
4−Interpolate list of XML nodes
4+Interpolate list of XML nodes.
55
66Interpolates a list of XML nodes within our XML template syntax (aka sail)
77
docs/system/hoon/runes/sm/smzz.md+3−3
@@ -1,7 +1,7 @@
1−semzaz
2−===============
1+`semzaz`
2+========
33
4−[`++sail`]() tag
4+`++sail` tag.
55
66`semzaz`, is a virtual rune frequently referred to as [`++sail`]() in
77reference to `++sail`:vast which parses it. It is the most basic part of
docs/system/hoon/runes/ts.mdnew file+11
@@ -0,0 +1,11 @@
1+---
2+sort: 9
3+---
4+
5+# `= tis` (subject modifiers)
6+
7+##### Feel free to change the subject.
8+
9+<list dataPath="docs/system/hoon/runes/ts" dataPreview="true" className="runes" linkToFragments="true"></list>
10+
11+<kids dataPath="docs/system/hoon/runes/ts" className="runes"></kids>
docs/system/hoon/runes/ts/tsbr.md+3−1
@@ -1,6 +1,8 @@
1−`=|`
1+`=| tisbar`
22====
33
4+Default value.
5+
46Produces the default value of input type (aka mold) `p` and makes it
57available/pushes it onto `q`.
68
docs/system/hoon/runes/ts/tscl.md+3−1
@@ -1,6 +1,8 @@
1−`=:`
1+`=: tiscol`
22====
33
4+List of changes.
5+
46Makes a list of changes `p` to the subject and then evaluates `q`.
57Allows you to change values in your context (not in the hoon sense).
68
docs/system/hoon/runes/ts/tsdt.md+3−1
@@ -1,6 +1,8 @@
1−`=.`
1+`=. tisdot`
22====
33
4+Change value.
5+
46Produces `r` with `p` in the subject set to `q`. Allows you to change
57a value in your subject before executing more code against it.
68
docs/system/hoon/runes/ts/tsgl.md+4−2
@@ -1,7 +1,9 @@
1−`=<`
1+`=< tisgal`
22====
33
4−An inverted `=<`. Uses the product of `q` as the subject of formula
4+Inverted `=>`.
5+
6+An inverted `=>`. Uses the product of `q` as the subject of formula
57`p`. Allows us to keep the heavier of `p` `q` as the bottom expression, which
68makes for more readable code. Please see the section on [backstep]().
79
docs/system/hoon/runes/ts/tsgr.md+2−2
@@ -1,7 +1,7 @@
1−`=>`
1+`=> tisgar`
22====
33
4−Product as subject
4+Product as subject.
55
66`=>` is a natural rune that uses the product of `p` as the subject of
77`q`. `=>` is the inverse of `=<`. Use `=>` when your `p` isn't too long
docs/system/hoon/runes/ts/tshp.md+3−1
@@ -1,6 +1,8 @@
1−`=-`
1+`=- tishep`
22====
33
4+Inverted `=+`.
5+
46An inverted `=+`. Pushes variable `q` onto the subject and then
57executes `p` against the new subject. Allows us to place the larger of `p` and
68`q` as the bottom expression, making for for more readable code (see the
docs/system/hoon/runes/ts/tskt.md+4−2
@@ -1,8 +1,10 @@
1−`=^`
1+`=^ tisket`
22====
33
4+State monad.
5+
46Used to both push a new variable on the subject as well as change the
5−value of another.Similar to `=+` in that it pushes a value on the stack with
7+value of another. Similar to `=+` in that it pushes a value on the stack with
68variable name (face) `p`. However, in addition to pushing a new variable onto
79the subject, it also modifies whatever value is tied to `q` within the subject.
810`r` is the cell of [new-product-p updated-value-1]. You can think of `=^` like
docs/system/hoon/runes/ts/tsls.md+3−1
@@ -1,6 +1,8 @@
1−`=+`
1+`=+ tislus`
22====
33
4+Assign.
5+
46Easiest way to declare variables. Pushes a new variable `p` onto the
57subject and then executes `q` against it.
68
docs/system/hoon/runes/ts/tssg.md+3−1
@@ -1,6 +1,8 @@
1−`=~`
1+`=~ tissig`
22====
33
4+List of twigs.
5+
46Composes a list of twigs. Applies `=>` to a list of expressions, using each result as the
57subject to the following expression.
68
docs/system/hoon/runes/ts/tstr.md+3−1
@@ -1,6 +1,8 @@
1−`=*`
1+`=* tistar`
22====
33
4+Alias.
5+
46Makes `p` an alias of value `q`. Useful when you don't want to write
57out a long address multiple times, for example `p.s.+.variable`, which translates to `p` within `s` within the tail of `variable`.
68
docs/system/hoon/runes/wt.mdnew file+11
@@ -0,0 +1,11 @@
1+---
2+sort: 11
3+---
4+
5+# `? wut` (conditional)
6+
7+##### If this then what?
8+
9+<list dataPath="docs/system/hoon/runes/wt" dataPreview="true" className="runes" linkToFragments="true"></list>
10+
11+<kids dataPath="docs/system/hoon/runes/wt" className="runes"></kids>
docs/system/hoon/runes/wt/wtbr.md+2−2
@@ -1,7 +1,7 @@
1−`?|`
1+`?| wutbar`
22====
33
4−Logical 'or'
4+Logical 'or'.
55
66Computes the logical 'or' operation on a list of boolean expressions `p`.
77
docs/system/hoon/runes/wt/wtcl.md+2−2
@@ -1,7 +1,7 @@
1−`?:`
1+`?: wutcol`
22====
33
4−If-then-else
4+If-then-else.
55
66Produces
77--------
docs/system/hoon/runes/wt/wtdt.md+2−2
@@ -1,7 +1,7 @@
1−`?.`
1+`?. wutdot`
22====
33
4−Inverted if-then-else
4+Inverted if-then-else.
55
66Unless `p` is true, evaluate `r`. Used to keep the heavier of `q` and `r` as the bottom expression, which makes for more readable code (see the section on [backstep]()).
77
docs/system/hoon/runes/wt/wtgl.md+2−2
@@ -1,7 +1,7 @@
1−`?<`
1+`?< wutgal`
22====
33
4−Assert `p` is false
4+Assert `p` is false.
55
66Asserts that `p` is false before evaluating `q`. Crashes if `p` evaluates to false.
77
docs/system/hoon/runes/wt/wtgr.md+2−2
@@ -1,7 +1,7 @@
1−`?>`
1+`?> wutgar`
22====
33
4−Assert `p` is true
4+Assert `p` is true.
55
66Asserts that `p` is true before evaluating `q`. Crashes if `p` evaluates to true.
77
docs/system/hoon/runes/wt/wthp.md+2−2
@@ -1,7 +1,7 @@
1−`?-`
1+`?- wuthep`
22====
33
4−Switch
4+Switch.
55
66Different from the traditional switch statement in that it switches on a type instead of a value. More specifically, the labels in `q` must match the [span]() of `p`. `q` must be terminated with a `==`.
77
docs/system/hoon/runes/wt/wthz.mddeleted−52
@@ -1,52 +0,0 @@
1−wuthaz, %wthz
2−======================
3−
4−[Short description]
5−
6−`wuthaz`, `[%wthz p=wing q=tine]` is a synthetic rune that selects a
7−case in `q` for the actual type of `p`.
8−
9−Produces
10−--------
11−
12−[Twig or mold]
13−
14−Sample
15−------
16−
17−[`p` is a \* `q` is a \*]
18−
19−Tall form
20−---------
21−
22−Kingside:
23−
24− ?- p
25− p.i.q q.i.q
26− p.i.t.q q.i.t.q
27− p.i.t.t.q q.i.t.t.q
28− ==
29−
30−Queenside:
31−
32− ?- p
33− p.i.q
34− q.i.q
35− p.i.t.q
36− q.i.t.q
37− p.i.t.t.q
38− q.i.t.t.q
39− ==
40−
41−Wide form
42−---------
43−
44−?-(p p.i.q q.i.q, p.i.t.q q.i.t.q, p.i.t.t.q q.i.t.t.q)
45−
46−Irregular form
47−--------------
48−
49−None
50−
51−Examples
52−--------
docs/system/hoon/runes/wt/wtkt.md+2−2
@@ -1,7 +1,7 @@
1−`?^`
1+`?^ wutket`
22====
33
4−If `p` is cell-then-else
4+If `p` is cell-then-else.
55
66Produces
77--------
docs/system/hoon/runes/wt/wtkz.mddeleted−34
@@ -1,34 +0,0 @@
1−wutkaz, %wtkz
2−======================
3−
4−[`++tiki`]() version of [`%wtkt`]()
5−
6−`wutkaz` is only used internally.
7−
8−Produces
9−--------
10−
11−Twig: `[%wtkz p=tiki q=twig r=twig]`
12−
13−Sample
14−------
15−
16−`p` is a [`++tiki`](). `q` and `r` are [twig]()s.
17−
18−Tall form
19−---------
20−
21−None
22−
23−Wide form
24−---------
25−
26−None
27−
28−Irregular form
29−--------------
30−
31−None
32−
33−Examples
34−--------
docs/system/hoon/runes/wt/wtls.md+2−2
@@ -1,7 +1,7 @@
1−`?+`
1+`?+ wutlus`
22====
33
4−Switch w/default value
4+Switch w/default value.
55
66Identical to [`?-`]() except for that it takes a default case `q` if none of the cases in `r` match the type of `p`. More specifically, the labels in `q` must match the [span]() of `p`. `q` must be terminated with a `==`.
77
docs/system/hoon/runes/wt/wtlz.mddeleted−35
@@ -1,35 +0,0 @@
1−wutlaz, %wtlz
2−======================
3−
4−[`++tiki`]() version of [`%wtls`]()
5−
6−`wutlaz` is a synthetic rune that selects a case in `q` for the actual
7−type of `p`. Only used internally.
8−
9−Produces
10−--------
11−
12−Twig: `[%wtlz p=wing q=twig r=tine]`
13−
14−Sample
15−------
16−
17−`p` is a [`++wing`](). `q` is a [twig](). `r` is a [`++tine`]().
18−
19−Tall form
20−---------
21−
22−None
23−
24−Wide form
25−---------
26−
27−None
28−
29−Irregular form
30−--------------
31−
32−None
33−
34−Examples
35−--------
docs/system/hoon/runes/wt/wtpm.md+2−2
@@ -1,7 +1,7 @@
1−`?&`
1+`?& wutpam`
22====
33
4−Logical 'and'
4+Logical 'and'.
55
66Computes the logical 'and' operation on a list of boolean expressions.
77
docs/system/hoon/runes/wt/wtpt.md+2−2
@@ -1,7 +1,7 @@
1−`?@`
1+`?@ wutpat`
22====
33
4−If atom-then-else
4+If atom-then-else.
55
66If-then-else statement that tests whether `p` is an atom, producing `q` if true and `r` if false.
77
docs/system/hoon/runes/wt/wtpz.mddeleted−34
@@ -1,34 +0,0 @@
1−wutpaz, %wtpz
2−======================
3−
4−[`++tiki`]() version of [`%wtpt`]()
5−
6−`wutpaz` is used internally.
7−
8−Produces
9−--------
10−
11−Twig: `[%wtpz p=tiki q=twig r=twig]`
12−
13−Sample
14−------
15−
16−`p` is a [`++tiki`](). `q` and `r` are [twig]()s.
17−
18−Tall form
19−---------
20−
21−None
22−
23−Wide form
24−---------
25−
26−None
27−
28−Irregular form
29−--------------
30−
31−None
32−
33−Examples
34−--------
docs/system/hoon/runes/wt/wtsg.md+2−2
@@ -1,7 +1,7 @@
1−`?~`
1+`?~ wutsig`
22====
33
4−If-null-then-else
4+If-null-then-else.
55
66If-then-else statement that tests whether `p` is null, producing `q` if true
77and `r` if false.
docs/system/hoon/runes/wt/wtsz.mddeleted−37
@@ -1,37 +0,0 @@
1−wutsaz, %wtsz
2−======================
3−
4−[`++tiki`]() version of [`%wtsg`]()
5−
6−`wutsaz` is a synthetic rune that produces `q` if `p` is `~`, `r`
7−otherwise.
8−
9−Produces
10−--------
11−
12−Twig: `[%wtsz p=tiki q=twig r=twig]`
13−
14−Sample
15−------
16−
17−`p` is a [`++tiki`](). `q` and `r` are [twig]()s.
18−
19−Tall form
20−---------
21−
22− ?~ p
23− q
24− r
25−
26−Wide form
27−---------
28−
29− ?~(p q r)
30−
31−Irregular form
32−--------------
33−
34−None
35−
36−Examples
37−--------
docs/system/hoon/runes/wt/wtts.md+2−2
@@ -1,7 +1,7 @@
1−`?=`
1+`?= wuttis`
22====
33
4−Is `q` within [span]() `p`
4+Is `q` within `++span` `p`.
55
66Tests whether `q` is of type (mold) `p`.
77
docs/system/hoon/runes/wt/wttz.mddeleted−35
@@ -1,35 +0,0 @@
1−wuttaz, `?=`, %wttz
2−============================
3−
4−[`++tiki`]() version of [`%wtkz`]()
5−
6−`wuttaz` is only used internally.
7−
8−Produces
9−--------
10−
11−Twig: `[%wttz p=mold q=tiki]`
12−
13−Sample
14−------
15−
16−`p` is a [mold](). `q` is a [`++tiki`]().
17−
18−Tall form
19−---------
20−
21− ?= p
22− q
23−
24−Wide form
25−---------
26−
27− ?=(p q)
28−
29−Irregular form
30−--------------
31−
32−None
33−
34−Examples
35−--------
docs/system/hoon/runes/wt/wtzp.md+2−2
@@ -1,7 +1,7 @@
1−`?!`
1+`?! wutzap`
22====
33
4−Logical not
4+Logical not.
55
66Produces the logical "not" of `p`.
77
docs/system/hoon/runes/zp.mdnew file+11
@@ -0,0 +1,11 @@
1+---
2+sort: 12
3+---
4+
5+# `! zap` (special)
6+
7+##### Pow, zap, bam.
8+
9+<list dataPath="docs/system/hoon/runes/zp" dataPreview="true" className="runes" linkToFragments="true"></list>
10+
11+<kids dataPath="docs/system/hoon/runes/zp" className="runes"></kids>
docs/system/hoon/runes/zp/zpcb.md+2−2
@@ -1,7 +1,7 @@
1−`!_`
1+`!_ zapcab`
22====
33
4−Path & range in stack trace
4+Path & range in stack trace.
55
66Traces the stack if debugging is enabled, putting the current path and
77location range of each rune.
docs/system/hoon/runes/zp/zpcm.md+2−2
@@ -1,7 +1,7 @@
1−`!,`
1+`!, zapcol`
22====
33
4−XX
4+XX.
55
66Inserts twig `q` as a constant, typed with the type of twig `p`. XX??
77
docs/system/hoon/runes/zp/zpfs.md+2−2
@@ -1,7 +1,7 @@
1−`!/`
1+`!/ zapfas`
22====
33
4−XX
4+XX.
55
66`!/` is a virtual natural rune that should never be compiled. When
77compiled with error checking turned on, it reports its subject as an
docs/system/hoon/runes/zp/zpgr.md+2−2
@@ -1,7 +1,7 @@
1−`!>`
1+`!> zapgar`
22====
33
4−Produce [type value]
4+Produce `[type value]`.
55
66Produces a cell (known as a [`++vase`]() here) of both the type and value of `p`. Useful for debugging purposes.
77
docs/system/hoon/runes/zp/zpsm.md+2−2
@@ -1,7 +1,7 @@
1−`!;`
1+`!; zapsem`
22====
33
4−`[type noun]` pair
4+`[type noun]` pair.
55
66`!;` is a natural rune that produces the product of twig `q` as a
77`[type noun]` pair, with twig `p` serving as an example of the type.
docs/system/hoon/runes/zp/zpts.md+2−2
@@ -1,7 +1,7 @@
1−`!=`
1+`!= zaptis`
22====
33
4−Show nock
4+Show nock.
55
66`!=` is a natural rune that produces the formula of `p` as a noun.
77
docs/system/hoon/runes/zp/zpwt.md+2−2
@@ -1,7 +1,7 @@
1−`!?`
1+`!? zapwut`
22====
33
4−Restrict version
4+Restrict version.
55
66`!?` is a synthetic rune that enforces a Hoon version restriction.
77
docs/system/hoon/runes/zp/zpzp.md+2−2
@@ -1,7 +1,7 @@
1−`!!`
1+`!! zapzap`
22====
33
4−Crash
4+Crash.
55
66`!!` is a natural rune that always crashes.
77
docs/walkthroughs/tree.mdnew file+135
@@ -0,0 +1,135 @@
1+---
2+next: true
3+sort: 5
4+title: Tree
5+---
6+
7+# Tree
8+
9+Tree is a simple publishing platform for files that live on your Urbit. You're probably reading this file using Tree right now. The main driving use-case for Tree has been for us to host our own documentation and the surrounding discussion. Tree remains a pretty simple and flexible tool for getting content online. We think it's pretty great.
10+
11+In spirit Tree is sort of like a combination of Jekyll and Finder: a simple static publishing tool and the basic UI for browsing the filesystem. We take it one step further and make it possible to write modules (tiny little apps), like Talk and Dojo, that can be run directly inside of Tree.
12+
13+In the browser Tree is a [React](https://facebook.github.io/react/) / [Flux](https://facebook.github.io/react/blog/2014/05/06/flux.html) app that uses a slightly modifed version of [Bootstrap](http://getbootstrap.com/). On your Urbit Tree is a set of renderers that translate data in `%clay`, our filesystem, into JSON / JSX that can be read by the client.
14+
15+Your Urbit comes with a pre-built copy of the tree (as a single `.js` file). If you're interested in helping to develop tree or learning about how it works, it has its own GitHub repo [here](https://github.com/urbit/tree). We have our own fork of Bootstrap, which lives [here](https://github.com/urbit/bootstrap).
16+
17+You don't need to know anything about the tree implementation to use it, so we'll start with that and get further into the technical details as we get down the page.
18+
19+## Publishing files
20+
21+Assuming you have an Urbit desk mounted (if not see the [Filesystem Handbook](/walkthroughs/clay)), try opeing up `/web/static.md` in an editor and `http://localhost:8080/static` side by side.
22+
23+It should be pretty obvious what's going on here. Drop a markdown file anywhere in `/web` and we'll do the rest.
24+
25+### Simple blog
26+
27+From unix
28+
29+### Going further
30+
31+The best example of more complicated usage of Tree is covered by the Urbit docs themselves. See anything while perusing the docs that you'd like to use yourself? The docs are all on GitHub [here](https://github.com/urbit/docs).
32+
33+## YAML
34+
35+We use [YAML](http://yaml.org/)-style frontmatter to do odds and ends like override the title. A YAML block looks something like this:
36+
37+```
38+---
39+next: true
40+sort: 5
41+title: Tree
42+---
43+```
44+
45+and appears at the top of a file. YAML values can't contain newlines but can contain spaces. Here are the fields we support:
46+
47+### `title`
48+
49+String. Example: `title: Tree manual`.
50+
51+This sets the title in the nav or in lists as distinct from the filename.
52+
53+### `next`
54+
55+Boolean. Example: `next: true`
56+
57+Adds a 'next' link at the bottom of the page that links to the next item as decided by the sort order.
58+
59+### `sort`
60+
61+Integer. Example: `sort: 7`
62+
63+User-defined sort. Indicates the sort order as distinct from alphabetical sort. These numbers should not be overlapping.
64+
65+### `hide`
66+
67+Boolean. Example: `hide: true`
68+
69+Whether or not to hide the item from the tree.
70+
71+### `date`
72+
73+Urbit date. Example: `~2016.2.22`
74+
75+Used for sorting posts by date.
76+
77+## Using components
78+
79+Tree is built using React with a small library of components that you can add to your pages using [JSX](https://facebook.github.io/jsx/) tags.
80+
81+If you don't know anything about JSX that's okay: basically we just give you a few custom HTML tags that you can use to create components on the page.
82+
83+For those familiar with React / Flux each JSX tag corresponds to a component in [the source](https://github.com/urbit/tree/tree/master/js/components).
84+
85+### <list>
86+
87+Example: `<list dataPath="/posts" titlesOnly="true"></list>`
88+
89+Creates a list of children at a path. Defaults to the current path.
90+
91+Optional properties:
92+
93+- `dataPath`: Path to load kids from.
94+- `titlesOnly`: Only show the 'title' which is either the filename or the first h1.
95+- `sortBy`: Can be `date` if items have a `date` YAML.
96+- `className`: Class to be assigned to the container.
97+
98+### <kids>
99+
100+Example: `<kids dataPath="/posts"></kids>`
101+
102+Includes all the children at the specified path separated by `<hr>` tags.
103+
104+Optional properties:
105+
106+- `dataPath`: Path to load kids from.
107+- `className`: Class to be assigned to the container.
108+
109+### <toc>
110+
111+Example: `<toc noHeader="true"></toc>`
112+
113+Creates a table of contents from the `h1` - `h6` tags on the page.
114+
115+Optional properties:
116+
117+- `match`: Tag name to match. If you wanted to only match `h2` tags it could be `match="h2"`
118+- `noHeader`: By default we add a 'Table of Contents' header to the top. Remove it with `noHeader="true"`.
119+
120+## Module basics
121+
122+A module is a
123+
124+## Implementation
125+
126+
127+
128+### Async component
129+
130+### manx JSON format
131+
132+## `urb.js`
133+
134+
135+