Massive reorganization.
commit8c634ff17e7ada8584069ee7018490471b112fb2
authorC. Guy Yarvin <cgyarvin@gmail.com>
dateFri 15 Apr 2016, 15:40 (11 years ago)
parent2ed5238
744 files changed+1500−3087
docs/programming.md+11−1
@@ -4,4 +4,14 @@ sort: 3
44
55# Programming
66
7−<list />
7+Urbit's programming language is called Hoon. It's a strict,
8+typed functional language without category theory. Hoon is not
9+closely related to any older language.
10+
11+Hoon is named after a Wallace Stevens poem. Coincidentally, it
12+means "hooligan" in Australian. Practically, "Hoon" is a short
13+punchy name which search engines handle well.
14+
15+To learn to program in Urbit, traverse this tree depth-first:
16+
17+<list/>
docs/programming/advanced.mdnew file+10
@@ -0,0 +1,10 @@
1+---
2+sort: 11
3+---
4+
5+# Advanced
6+
7+You've read through, or at least skimmed, the Core Hoon documents.
8+Here's the rest of what you need to know to program in Urbit.
9+
10+<list/>
docs/programming/advanced/arvo.mdnew file+9
@@ -0,0 +1,9 @@
1+---
2+sort: 1
3+---
4+
5+# Arvo programming
6+
7+Once you know Hoon, it's time to write programs that actually use Arvo.
8+
9+<list></list>
docs/programming/reference/arvo.md → docs/programming/advanced/arvo/internals.mdrenamed+4−7
@@ -1,13 +1,10 @@
11---
2−sort: 3
2+sort: 2
33---
44
5−Arvo
6−====
5+# Arvo internals
76
8−Our operating system.
9−
10−arvo is composed of modules called vanes:
7+Arvo is composed of modules called vanes:
118
129<list dataPreview="true"></list>
1310
@@ -147,4 +144,4 @@ context as its subject.
147144This overview has detailed how to pass a card to a particular vane. To
148145see the cards each vane can be `%pass`ed as a `++kiss` or return as a
149146`++gift` (as well as the semantics tied to them), each vane's public
150−interface is explained in detail in its respective overview.
147+interface is explained in detail in its respective overview.
docs/programming/reference/arvo/ames.md → docs/programming/advanced/arvo/internals/ames.mdrenamed
The content is the same.
docs/programming/reference/arvo/ames/commentary.md → docs/programming/advanced/arvo/internals/ames/commentary.mdrenamed
The content is the same.
docs/programming/reference/arvo/behn.md → docs/programming/advanced/arvo/internals/behn.mdrenamed
The content is the same.
docs/programming/reference/arvo/clay.md → docs/programming/advanced/arvo/internals/clay.mdrenamed
The content is the same.
docs/programming/reference/arvo/clay/architecture.md → docs/programming/advanced/arvo/internals/clay/architecture.mdrenamed
The content is the same.
docs/programming/reference/arvo/clay/commentary.md → docs/programming/advanced/arvo/internals/clay/commentary.mdrenamed
The content is the same.
docs/programming/reference/arvo/dill.md → docs/programming/advanced/arvo/internals/dill.mdrenamed
The content is the same.
docs/programming/reference/arvo/eyre.md → docs/programming/advanced/arvo/internals/eyre.mdrenamed
The content is the same.
docs/programming/reference/arvo/eyre/commentary.md → docs/programming/advanced/arvo/internals/eyre/commentary.mdrenamed
The content is the same.
docs/programming/reference/arvo/ford.md → docs/programming/advanced/arvo/internals/ford.mdrenamed
The content is the same.
docs/programming/reference/arvo/ford/commentary.md → docs/programming/advanced/arvo/internals/ford/commentary.mdrenamed
The content is the same.
docs/programming/reference/arvo/gall.md → docs/programming/advanced/arvo/internals/gall.mdrenamed
The content is the same.
docs/programming/system.md → docs/programming/advanced/arvo/system.mdrenamed+1−1
@@ -1,5 +1,5 @@
11---
2−sort: 3
2+sort: 1
33---
44
55# Systems programming
docs/programming/system/basic.md → docs/programming/advanced/arvo/system/basic.mdrenamed
The content is the same.
docs/programming/system/generators.md → docs/programming/advanced/arvo/system/generators.mdrenamed
The content is the same.
docs/programming/system/http.md → docs/programming/advanced/arvo/system/http.mdrenamed
The content is the same.
docs/programming/system/marks.md → docs/programming/advanced/arvo/system/marks.mdrenamed
The content is the same.
docs/programming/system/network.md → docs/programming/advanced/arvo/system/network.mdrenamed
The content is the same.
docs/programming/system/security-driver.md → docs/programming/advanced/arvo/system/security-driver.mdrenamed
The content is the same.
docs/programming/system/state.md → docs/programming/advanced/arvo/system/state.mdrenamed
The content is the same.
docs/programming/system/subject.md → docs/programming/advanced/arvo/system/subject.mdrenamed
The content is the same.
docs/programming/system/subscriptions.md → docs/programming/advanced/arvo/system/subscriptions.mdrenamed
The content is the same.
docs/programming/system/web-apps.md → docs/programming/advanced/arvo/system/web-apps.mdrenamed
The content is the same.
docs/programming/advanced/arvo/zuse.mdnew file+7
@@ -0,0 +1,7 @@
1+---
2+sort: 3
3+---
4+
5+# `%zuse` (Arvo standard library)
6+
7+<list></list>
docs/programming/reference/zuse/core/crua.md → docs/programming/advanced/arvo/zuse/core/crua.mdrenamed
The content is the same.
docs/programming/reference/zuse/core/epur.md → docs/programming/advanced/arvo/zuse/core/epur.mdrenamed
The content is the same.
docs/programming/reference/zuse/core/fu.md → docs/programming/advanced/arvo/zuse/core/fu.mdrenamed
The content is the same.
docs/programming/reference/zuse/core/jo.md → docs/programming/advanced/arvo/zuse/core/jo.mdrenamed
The content is the same.
docs/programming/reference/zuse/core/poja.md → docs/programming/advanced/arvo/zuse/core/poja.mdrenamed
The content is the same.
docs/programming/reference/zuse/core/poxa.md → docs/programming/advanced/arvo/zuse/core/poxa.mdrenamed
The content is the same.
docs/programming/reference/zuse/core/poxo.md → docs/programming/advanced/arvo/zuse/core/poxo.mdrenamed
The content is the same.
docs/programming/reference/zuse/core/yu.md → docs/programming/advanced/arvo/zuse/core/yu.mdrenamed
The content is the same.
docs/programming/reference/zuse/diff.md → docs/programming/advanced/arvo/zuse/diff.mdrenamed
The content is the same.
docs/programming/reference/zuse/gate/clan.md → docs/programming/advanced/arvo/zuse/gate/clan.mdrenamed
The content is the same.
docs/programming/reference/zuse/gate/dawn.md → docs/programming/advanced/arvo/zuse/gate/dawn.mdrenamed
The content is the same.
docs/programming/reference/zuse/gate/daws.md → docs/programming/advanced/arvo/zuse/gate/daws.mdrenamed
The content is the same.
docs/programming/reference/zuse/gate/deal.md → docs/programming/advanced/arvo/zuse/gate/deal.mdrenamed
The content is the same.
docs/programming/reference/zuse/gate/deft.md → docs/programming/advanced/arvo/zuse/gate/deft.mdrenamed
The content is the same.
docs/programming/reference/zuse/gate/dust.md → docs/programming/advanced/arvo/zuse/gate/dust.mdrenamed
The content is the same.
docs/programming/reference/zuse/gate/earl.md → docs/programming/advanced/arvo/zuse/gate/earl.mdrenamed
The content is the same.
docs/programming/reference/zuse/gate/earn.md → docs/programming/advanced/arvo/zuse/gate/earn.mdrenamed
The content is the same.
docs/programming/reference/zuse/gate/fain.md → docs/programming/advanced/arvo/zuse/gate/fain.mdrenamed
The content is the same.
docs/programming/reference/zuse/gate/feel.md → docs/programming/advanced/arvo/zuse/gate/feel.mdrenamed
The content is the same.
docs/programming/reference/zuse/gate/file.md → docs/programming/advanced/arvo/zuse/gate/file.mdrenamed
The content is the same.
docs/programming/reference/zuse/gate/foal.md → docs/programming/advanced/arvo/zuse/gate/foal.mdrenamed
The content is the same.
docs/programming/reference/zuse/gate/fray.md → docs/programming/advanced/arvo/zuse/gate/fray.mdrenamed
The content is the same.
docs/programming/reference/zuse/gate/fuel.md → docs/programming/advanced/arvo/zuse/gate/fuel.mdrenamed
The content is the same.
docs/programming/reference/zuse/gate/furl.md → docs/programming/advanced/arvo/zuse/gate/furl.mdrenamed
The content is the same.
docs/programming/reference/zuse/gate/glam.md → docs/programming/advanced/arvo/zuse/gate/glam.mdrenamed
The content is the same.
docs/programming/reference/zuse/gate/glon.md → docs/programming/advanced/arvo/zuse/gate/glon.mdrenamed
The content is the same.
docs/programming/reference/zuse/gate/gnom.md → docs/programming/advanced/arvo/zuse/gate/gnom.mdrenamed
The content is the same.
docs/programming/reference/zuse/gate/jape.md → docs/programming/advanced/arvo/zuse/gate/jape.mdrenamed
The content is the same.
docs/programming/reference/zuse/gate/jesc.md → docs/programming/advanced/arvo/zuse/gate/jesc.mdrenamed
The content is the same.
docs/programming/reference/zuse/gate/joba.md → docs/programming/advanced/arvo/zuse/gate/joba.mdrenamed
The content is the same.
docs/programming/reference/zuse/gate/jobe.md → docs/programming/advanced/arvo/zuse/gate/jobe.mdrenamed
The content is the same.
docs/programming/reference/zuse/gate/jone.md → docs/programming/advanced/arvo/zuse/gate/jone.mdrenamed
The content is the same.
docs/programming/reference/zuse/gate/lead.md → docs/programming/advanced/arvo/zuse/gate/lead.mdrenamed
The content is the same.
docs/programming/reference/zuse/gate/mang.md → docs/programming/advanced/arvo/zuse/gate/mang.mdrenamed
The content is the same.
docs/programming/reference/zuse/gate/meat.md → docs/programming/advanced/arvo/zuse/gate/meat.mdrenamed
The content is the same.
docs/programming/reference/zuse/gate/moon.md → docs/programming/advanced/arvo/zuse/gate/moon.mdrenamed
The content is the same.
docs/programming/reference/zuse/gate/mung.md → docs/programming/advanced/arvo/zuse/gate/mung.mdrenamed
The content is the same.
docs/programming/reference/zuse/gate/perk.md → docs/programming/advanced/arvo/zuse/gate/perk.mdrenamed
The content is the same.
docs/programming/reference/zuse/gate/pojo.md → docs/programming/advanced/arvo/zuse/gate/pojo.mdrenamed
The content is the same.
docs/programming/reference/zuse/gate/saxo.md → docs/programming/advanced/arvo/zuse/gate/saxo.mdrenamed
The content is the same.
docs/programming/reference/zuse/gate/scanf.md → docs/programming/advanced/arvo/zuse/gate/scanf.mdrenamed
The content is the same.
docs/programming/reference/zuse/gate/sein.md → docs/programming/advanced/arvo/zuse/gate/sein.mdrenamed
The content is the same.
docs/programming/reference/zuse/gate/sifo.md → docs/programming/advanced/arvo/zuse/gate/sifo.mdrenamed
The content is the same.
docs/programming/reference/zuse/gate/stud.md → docs/programming/advanced/arvo/zuse/gate/stud.mdrenamed
The content is the same.
docs/programming/reference/zuse/gate/taco.md → docs/programming/advanced/arvo/zuse/gate/taco.mdrenamed
The content is the same.
docs/programming/reference/zuse/gate/tact.md → docs/programming/advanced/arvo/zuse/gate/tact.mdrenamed
The content is the same.
docs/programming/reference/zuse/gate/tame.md → docs/programming/advanced/arvo/zuse/gate/tame.mdrenamed
The content is the same.
docs/programming/reference/zuse/gate/tell.md → docs/programming/advanced/arvo/zuse/gate/tell.mdrenamed
The content is the same.
docs/programming/reference/zuse/gate/tome.md → docs/programming/advanced/arvo/zuse/gate/tome.mdrenamed
The content is the same.
docs/programming/reference/zuse/gate/tope.md → docs/programming/advanced/arvo/zuse/gate/tope.mdrenamed
The content is the same.
docs/programming/reference/zuse/gate/txml.md → docs/programming/advanced/arvo/zuse/gate/txml.mdrenamed
The content is the same.
docs/programming/reference/zuse/gate/unt.md → docs/programming/advanced/arvo/zuse/gate/unt.mdrenamed
The content is the same.
docs/programming/reference/zuse/gate/urld.md → docs/programming/advanced/arvo/zuse/gate/urld.mdrenamed
The content is the same.
docs/programming/reference/zuse/gate/urle.md → docs/programming/advanced/arvo/zuse/gate/urle.mdrenamed
The content is the same.
docs/programming/reference/zuse/mold/udal.md → docs/programming/advanced/arvo/zuse/mold/udal.mdrenamed
The content is the same.
docs/programming/reference/zuse/mold/udon.md → docs/programming/advanced/arvo/zuse/mold/udon.mdrenamed
The content is the same.
docs/programming/reference/zuse/mold/umph.md → docs/programming/advanced/arvo/zuse/mold/umph.mdrenamed
The content is the same.
docs/programming/reference/zuse/mold/unce.md → docs/programming/advanced/arvo/zuse/mold/unce.mdrenamed
The content is the same.
docs/programming/reference/zuse/mold/upas.md → docs/programming/advanced/arvo/zuse/mold/upas.mdrenamed
The content is the same.
docs/programming/reference/zuse/mold/urge.md → docs/programming/advanced/arvo/zuse/mold/urge.mdrenamed
The content is the same.
docs/programming/reference/zuse/rsa.md → docs/programming/advanced/arvo/zuse/rsa.mdrenamed
The content is the same.
docs/programming/advanced/catalog.mdnew file+75
@@ -0,0 +1,75 @@
1+---
2+sort: 3
3+---
4+
5+# Stems
6+
7+#### A catalog of all Hoon stems:
8+
9+<div class="book">
10+
11+## `$ buc` (mold)
12+
13+<list src="buc-mold" dataPreview="true" className="runes" childIsFragment="true"></list>
14+
15+---
16+
17+## `| bar` (core)
18+
19+<list src="bar-core" dataPreview="true" className="runes" childIsFragment="true"></list>
20+
21+---
22+
23+## `: col` (cell)
24+
25+<list src="col-cell" dataPreview="true" className="runes" childIsFragment="true"></list>
26+
27+---
28+
29+## `% cen` (call)
30+
31+<list src="cen-call" dataPreview="true" className="runes" childIsFragment="true"></list>
32+
33+---
34+
35+## `. dot` (nock)
36+
37+<list src="dot-nock" dataPreview="true" className="runes" childIsFragment="true"></list>
38+
39+---
40+
41+## `^ ket` (cast)
42+
43+<list src="ket-cast" dataPreview="true" className="runes" childIsFragment="true"></list>
44+
45+---
46+
47+## `~ sig` (hint)
48+
49+<list src="sig-hint" dataPreview="true" className="runes" childIsFragment="true"></list>
50+
51+---
52+
53+## `; sem` (make)
54+
55+<list src="sem-make" dataPreview="true" className="runes" childIsFragment="true"></list>
56+
57+---
58+
59+## `= tis` (flow)
60+
61+<list src="tis-flow" dataPreview="true" className="runes" childIsFragment="true"></list>
62+
63+---
64+
65+## `? wut` (test)
66+
67+<list src="wut-test" dataPreview="true" className="runes" childIsFragment="true"></list>
68+
69+---
70+
71+## `! zap` (wild)
72+
73+<list src="zap-wild" dataPreview="true" className="runes" childIsFragment="true"></list>
74+
75+</div>
docs/programming/advanced/catalog/bar-core.mdnew file+29
@@ -0,0 +1,29 @@
1+---
2+sort: 1
3+---
4+
5+# `| bar` (core)
6+
7+<list dataPreview="true" className="runes" linkToFragments="true"></list>
8+
9+<kids className="runes"></kids>
10+
11+## Twigs
12+
13+```
14+|%
15+++ foot
16+ $% {$dry p/twig}
17+ {$wet p/twig}
18+ ==
19+::
20+++ twig
21+ $% {$door p/moss q/(map term foot)} :: |_
22+ {$core p/(map term foot)} :: |%
23+ {$trap p/twig} :: |.
24+ {$loop p/twig} :: |-
25+ {$gill p/moss q/twig} :: |*
26+ {$gate p/moss q/twig} :: |=
27+ ==
28+--
29+```
docs/programming/advanced/catalog/bar-core/cab-door.mdnew file+69
@@ -0,0 +1,69 @@
1+---
2+sort: 5
3+---
4+
5+# `:door, |_, "buccab", {$door p/moss q/(map term foot)}`
6+
7+Make a door, a many-armed core with a sample.
8+
9+## Expands to
10+
11+```
12+:new p
13+:core
14+ q
15+==
16+```
17+
18+## Syntax
19+
20+Regular: *1-fixed*, then *battery*.
21+
22+## Discussion
23+
24+A door is the general case of a gate (function). A gate is a
25+door with only one arm, the empty name `$`.
26+
27+Other languages have no real equivalent of a door, but we often
28+see the pattern of multiple functions with the same argument
29+list, or with shared argument structure. In Hoon, this shared
30+structure becomes a door.
31+
32+Calling a door is just like calling a gate, but the caller needs
33+to specify the arm. For instance, to call the gate `foo` as a
34+door, instead of `(foo bar)` we would write `~($ foo bar)`. This
35+is an irregular form for `:open($ foo bar)`, `%~`, "censig".
36+
37+## Examples
38+
39+A trivial door:
40+
41+```
42+/~zod:dojo> =mol |_ a/@ud
43+ ++ succ +(a)
44+ ++ prev (dec a)
45+ --
46+/~zod:dojo> ~(succ mol 1)
47+2
48+/~zod:dojo> ~(succ mol ~(succ mol ~(prev mol 5)))
49+6
50+```
51+
52+A more interesting door, from the kernel library:
53+
54+```
55+++ ne
56+ |_ tig=@
57+ ++ d (add tig '0')
58+ ++ x ?:((gte tig 10) (add tig 87) d)
59+ ++ v ?:((gte tig 10) (add tig 87) d)
60+ ++ w ?:(=(tig 63) '~' ?:(=(tig 62) '-' ?:((gte tig 36) (add tig 29) x)))
61+ --
62+```
63+
64+The `ne` door prints a digit in base 10, 16, 32 or 64:
65+
66+```
67+~zod:dojo> `@t`~(x ne 12)
68+'c'
69+```
docs/programming/advanced/catalog/bar-core/cen-core.mdnew file+41
@@ -0,0 +1,41 @@
1+---
2+sort: 1
3+---
4+
5+# `:core, |%, "barcen", {$core p/(map term foot)}`
6+
7+Make a core, a code-data pair with functional attributes.
8+
9+## Produces
10+
11+A core with battery `p`. Payload is the subject.
12+
13+## Syntax
14+
15+Regular: *battery*.
16+
17+## Discussion
18+
19+A core is like an "object" in a conventional language, but its
20+attributes (*arms*) are functions on the core, not the core and
21+an argument. A "method" on a core is an arm producing a gate.
22+gate.
23+
24+## Examples
25+
26+A trivial core:
27+
28+```
29+~zod:dojo> =foo =+ x 58
30+ |%
31+ ++ n (add 42 x)
32+ ++ g |= b/@
33+ (add b n)
34+ --
35+~zod:dojo> n.foo
36+100
37+~zod:dojo> (g.foo 1)
38+101
39+```
40+
41+In this trivial example, `g` id ther
docs/programming/advanced/catalog/bar-core/dot-trap.mdnew file+52
@@ -0,0 +1,52 @@
1+---
2+sort: 3
3+---
4+
5+# `:trap. |., "bardot", {$trap p/twig}`
6+
7+Make a trap, a core with no sample and one arm `$`.
8+
9+## Expands to
10+
11+```
12+:core
13+++ $ p
14+--
15+```
16+
17+## Syntax
18+
19+Regular: *1-fixed*.
20+
21+## Discussion
22+
23+A trap is a deferred computation.
24+
25+## Examples
26+
27+A trivial trap:
28+
29+```
30+~zod:dojo> =foo |.(42)
31+~zod:dojo> $:foo
32+42
33+~zod:dojo> (foo)
34+42
35+```
36+
37+A more interesting trap:
38+
39+```
40+~zod:dojo> =foo :var reps 10
41+ :var step 0
42+ :var outp 0
43+ :trap
44+ :if =(step reps)
45+ outp
46+ :moar(outp (add outp 2), step +(step))
47+~zod:dojo> (foo)
48+20
49+```
50+
51+Note that we can use `:moar()` or `$()` to recurse back into the
52+trap, since it's a core with an `$` arm.
docs/programming/advanced/catalog/bar-core/hep-loop.mdnew file+42
@@ -0,0 +1,42 @@
1+---
2+sort: 4
3+---
4+
5+# `:loop, |-, "barhep", {$loop p/twig}`
6+
7+Make a trap and kick it.
8+
9+## Expands to
10+
11+```
12+:rap $
13+:core
14+++ $ p
15+--
16+```
17+
18+## Syntax
19+
20+Regular: *1-fixed*.
21+
22+## Examples
23+
24+A trivial loop doesn't even recurse:
25+
26+```
27+~zod:dojo> |-(42)
28+42
29+```
30+
31+The classic loop is a decrement:
32+
33+```
34+~zod:dojo> =foo :var a 42
35+ :var b 0
36+ :loop
37+ :if =(a +(b))
38+ b
39+ :moar(b +(b))
40+~zod:dojo> foo
41+41
42+```
docs/programming/advanced/catalog/bar-core/tar-gill.mdnew file+45
@@ -0,0 +1,45 @@
1+---
2+sort: 6
3+---
4+
5+# `:gill, |*, "bartar", {$gill p/moss q/twig}`
6+
7+Make a wet gate, a generically typed Hoon function.
8+
9+## Expands to
10+
11+```
12+:new p
13+:core
14++- $
15+ q
16+--
17+```
18+
19+## Syntax
20+
21+Regular: *2-fixed*.
22+
23+## Discussion
24+
25+In a normal (dry) gate, your argument is converted into the
26+sample type. In a generic (wet) gate, your argument type passes
27+through the function, rather as if it was a macro (there is still
28+only one copy of the code, however).
29+
30+Genericity is a powerful and dangerous tool. Use wet gates only
31+if you think you know what you're doing. They are generally used
32+for system infrastructure, not user-level code.
33+
34+## Examples
35+
36+Wet and dry gates in a nutshell:
37+
38+```
39+~zod:dojo> =foo :gate({a/* b/*} [b a])
40+~zod:dojo> =bar :gill({a/* b/*} [b a])
41+~zod:dojo> (foo %cat %dog)
42+[6.778.724 7.627.107]
43+~zod:dojo> (bar %cat %dog)
44+[%dog %cat]
45+```
docs/programming/advanced/catalog/bar-core/tis-gate.mdnew file+40
@@ -0,0 +1,40 @@
1+---
2+sort: 2
3+---
4+
5+# `:gate, |=, "bartis", {$gate p/moss q/twig}`
6+
7+Make a gate, a Hoon function.
8+
9+## Expands to
10+
11+```
12+:new p
13+:core
14+++ $
15+ q
16+--
17+```
18+
19+## Syntax
20+
21+Regular: *2-fixed*.
22+
23+## Examples
24+
25+A trivial gate:
26+
27+```
28+~zod:dojo> =foo |=(a/@ +(a))
29+~zod:dojo> (foo 20)
30+21
31+```
32+
33+A slightly less trivial gate:
34+
35+```
36+~zod:dojo> =foo :gate {a/@ b/@}
37+ (add a b)
38+~zod:dojo> (foo 20 400)
39+420
40+```
docs/programming/advanced/catalog/buc-mold.mdnew file+26
@@ -0,0 +1,26 @@
1+---
2+sort: 2
3+---
4+
5+# `$ buc` (mold)
6+
7+<list dataPreview="true" className="runes" linkToFragments="true"></list>
8+
9+<kids className="runes"></kids>
10+
11+## Twigs
12+
13+```
14+|%
15+++ twig
16+ $% {$claw p/moss q/moss} :: $@
17+ {$shoe p/twig} :: $_
18+ {$bank p/(list moss)} :: $:
19+ {$book p/(list moss)} :: $%
20+ {$lamb p/moss q/moss} :: $-
21+ {$bush p/moss q/moss} :: $^
22+ {$pick p/(list moss)} :: $?
23+ {$coat p/term q/moss} :: $=
24+ ==
25+--
26+```
docs/programming/reference/runes/bc/bccb.md → docs/programming/advanced/catalog/buc-mold/cab-shoe.mdrenamed
The content is the same.
docs/programming/reference/runes/bc/bccn.md → docs/programming/advanced/catalog/buc-mold/cen-book.mdrenamed
The content is the same.
docs/programming/reference/runes/bc/bccl.md → docs/programming/advanced/catalog/buc-mold/col-bank.mdrenamed
The content is the same.
docs/programming/reference/runes/bc/bchp.md → docs/programming/advanced/catalog/buc-mold/hep-lamb.mdrenamed
The content is the same.
docs/programming/reference/runes/bc/bcpm.md → docs/programming/advanced/catalog/buc-mold/ket-bush.mdrenamed
The content is the same.
docs/programming/reference/runes/bc/bcpt.md → docs/programming/advanced/catalog/buc-mold/pat-claw.mdrenamed
The content is the same.
docs/programming/reference/runes/bc/bcts.md → docs/programming/advanced/catalog/buc-mold/tis-coat.mdrenamed
The content is the same.
docs/programming/reference/runes/bc/bcwt.md → docs/programming/advanced/catalog/buc-mold/wut-pick.mdrenamed
The content is the same.
docs/programming/advanced/catalog/cen-call.mdnew file+27
@@ -0,0 +1,27 @@
1+---
2+sort: 4
3+---
4+
5+# `% cen` (call)
6+
7+<list dataPreview="true" className="runes" linkToFragments="true"></list>
8+
9+<kids className="runes"></kids>
10+
11+## Twigs
12+
13+```
14+|%
15+++ twig
16+ $% {$bunt p/twig} :: %$
17+ {$keep p/wing q/(list (pair wing twig))} :: %_
18+ {$lace p/twig q/twig} :: %.
19+ {$call p/twig q/(list twig)} :: %-
20+ {$bake p/wing q/twig r/(list (pair wing twig))} :: %*
21+ {$calq p/twig q/twig r/twig s/twig} :: %^
22+ {$calt p/twig q/twig r/twig} :: %+
23+ {$open p/wing q/twig r/(list twig)} :: %~
24+ {$make p/wing q/(list (pair wing twig))} :: %=
25+ ==
26+--
27+```
docs/programming/reference/library/5g.md → docs/programming/advanced/catalog/cen-call/buc-bunt.mdrenamed
The content is the same.
docs/programming/reference/runes/cn/cncb.md → docs/programming/advanced/catalog/cen-call/cab-keep.mdrenamed+6−6
@@ -35,26 +35,26 @@ Wide form
3535Examples
3636--------
3737
38− /~zod/try=> =a [b=1 c=2 d=3]
38+ /~zod:dojo> =a [b=1 c=2 d=3]
3939 new var %a
40− /~zod/try=> %_(a b (add 3 b.a), c (add 3 c.a), d (add 3 d.a))
40+ /~zod:dojo> %_(a b (add 3 b.a), c (add 3 c.a), d (add 3 d.a))
4141 [b=4 c=5 d=6]
4242
4343Here we're using `%_` to add 3 to all of the values inside of our shell
4444variable `a`.
4545
46− /~zod/try=> =a [b='odors' c='twigs' d='molds']
46+ /~zod:dojo> =a [b='odors' c='twigs' d='molds']
4747 changed %a
48− /~zod/try=> %_(a b c.a, c d.a, d b.a)
48+ /~zod:dojo> %_(a b c.a, c d.a, d b.a)
4949 [b='twigs' c='molds' d='odors']
5050
5151In this case we're using `%_` to swap the values of the faces in `a`.
5252
53− /~zod/try=> =+ a=1
53+ /~zod:dojo> =+ a=1
5454 =+ z=|=(b=@ (add a b))
5555 (z 1)
5656 2
57− /~zod/try=> =+ a=1
57+ /~zod:dojo> =+ a=1
5858 =+ z=|=(b=@ (add a b))
5959 (%_(z a 100) 1)
6060 101
docs/programming/reference/runes/cn/cndt.md → docs/programming/advanced/catalog/cen-call/dot-lace.mdrenamed+3−3
@@ -32,15 +32,15 @@ Wide form
3232Examples
3333--------
3434
35− /~zod/try=> (dec 42)
35+ /~zod:dojo> (dec 42)
3636 41
37− ~zod/try=> %.(42 dec)
37+ ~zod:dojo> %.(42 dec)
3838 41
3939
4040In the most straightforward case `%.` allows us to reverse the order of
4141arm and arguments.
4242
43− /~zod/try=> %.
43+ /~zod:dojo> %.
4444 %+ add
4545 %+ mul 2 20
4646 2
docs/programming/reference/runes/cn/cnhp.md → docs/programming/advanced/catalog/cen-call/hep-call.mdrenamed
The content is the same.
docs/programming/reference/runes/cn/cnkt.md → docs/programming/advanced/catalog/cen-call/ket-calq.mdrenamed
The content is the same.
docs/programming/reference/runes/cn/cnls.md → docs/programming/advanced/catalog/cen-call/lus-calt.mdrenamed+3−3
@@ -36,14 +36,14 @@ None
3636Examples
3737--------
3838
39− /~zod/try=> =a |= [b=@ c=@]
39+ /~zod:dojo> =a |= [b=@ c=@]
4040 (add b c)
4141 new var %a
42− /~zod/try=> %+ a
42+ /~zod:dojo> %+ a
4343 2
4444 1
4545 3
46− /~zod/try=> %+(a 2 3)
46+ /~zod:dojo> %+(a 2 3)
4747 5
4848
4949First we set a shell variable `a` to be a function that takes two arguments
docs/programming/reference/runes/cn/cnsg.md → docs/programming/advanced/catalog/cen-call/sig-open.mdrenamed+6−6
@@ -37,14 +37,14 @@ Irregular form
3737Examples
3838--------
3939
40− /~zod/try=> =door |_ a=@
40+ /~zod:dojo> =door |_ a=@
4141 ++ fort |= b=@
4242 (add b a)
4343 --
4444 new var %door
45− /~zod/try=> (~(fort door 10) 1)
45+ /~zod:dojo> (~(fort door 10) 1)
4646 11
47− /~zod/try=> (~(fort door 10) 10)
47+ /~zod:dojo> (~(fort door 10) 10)
4848 20
4949
5050Here we create a door using [`|_`]() as the shell variable `door` which
@@ -52,11 +52,11 @@ takes an atom. `door` has one arm `fort`, a gate, which takes an atom as
5252well and produces the sum. We use the irregular form of `%~` to set the
5353sample in `door`, and call it.
5454
55− /~zod/try=> =a (mo (limo [['a' 1] ['b' 2] ~]))
55+ /~zod:dojo> =a (mo (limo [['a' 1] ['b' 2] ~]))
5656 changed %a
57− /~zod/try=> a
57+ /~zod:dojo> a
5858 {[p='a' q=1] [p='b' q=2]}
59− /~zod/try=> (~(get by a) 'b')
59+ /~zod:dojo> (~(get by a) 'b')
6060 [~ 2]
6161
6262In this case we create a simple map, `a` using [`++mo`]() and
docs/programming/reference/runes/cn/cntr.md → docs/programming/advanced/catalog/cen-call/tar-bake.mdrenamed+4−4
@@ -31,15 +31,15 @@ Wide form
3131Examples
3232--------
3333
34− /~zod/try=> =a 42
34+ /~zod:dojo> =a 42
3535 new var %a
36− /~zod/try=> =b |%
36+ /~zod:dojo> =b |%
3737 ++ mult (mul 2 a)
3838 --
3939 new var %b
40− /~zod/try=> mult.b
40+ /~zod:dojo> mult.b
4141 84
42− /~zod/try=> %*(mult b a 2)
42+ /~zod:dojo> %*(mult b a 2)
4343 4
4444
4545Here we add a variable `a` to our context, and a door `b` with a wing
docs/programming/reference/runes/cn/cnts.md → docs/programming/advanced/catalog/cen-call/tis-make.mdrenamed+3−3
@@ -40,21 +40,21 @@ Irregular form
4040Examples
4141--------
4242
43− /~zod/try=> =+ a=[p=5 q=6]
43+ /~zod:dojo> =+ a=[p=5 q=6]
4444 a(p 2)
4545 [p=2 q=6]
4646
4747In this example we are using the irregular form of `%=` to replace `p`
4848in `a`.
4949
50− /~zod/try=> =+ a=[p=1 q=2 r=3 s=4]
50+ /~zod:dojo> =+ a=[p=1 q=2 r=3 s=4]
5151 a(p 5, q 6, r 7, s 8)
5252 [p=5 q=6 r=7 s=8]
5353
5454Here we show how you can replace multiple faces at once. We start with a
5555new `a` and replace all of its values with the irregular form of `%=`.
5656
57− /~zod/try=> =+ step=0
57+ /~zod:dojo> =+ step=0
5858 =+ leng=10
5959 =+ valu=0
6060 |-
docs/programming/advanced/catalog/col-cell.mdnew file+24
@@ -0,0 +1,24 @@
1+---
2+sort: 3
3+---
4+
5+# `: col` (cell)
6+
7+<list dataPreview="true" className="runes" linkToFragments="true"></list>
8+
9+<kids className="runes"></kids>
10+
11+## Twigs
12+
13+```
14+|%
15+++ twig
16+ $% {$scon p/twig q/twig} :: :_
17+ {$conq p/twig q/twig r/twig s/twig} :: :^
18+ {$cons p/twig q/twig} :: :-
19+ {$cont p/twig q/twig r/twig} :: :+
20+ {$conl p/(list twig)} :: :~
21+ {$conp p/(list twig)} :: :*
22+ ==
23+--
24+```
docs/programming/reference/runes/cl/clcb.md → docs/programming/advanced/catalog/col-cell/cab-scon.mdrenamed+3−3
@@ -8,19 +8,19 @@ Regular form: *2-fixed*
88
99Examples:
1010
11− ~zod/try=> :_(1 2)
11+ ~zod:dojo> :_(1 2)
1212 [2 1]
1313
1414A simple example. `:_` produces the cell of any two twigs, but in
1515reverse order.
1616
17− ~zod/try=> `tape`:_(~ 'a')
17+ ~zod:dojo> `tape`:_(~ 'a')
1818 "a"
1919
2020Since a `++tape` is a null-terminated list of characters, casting
2121the result of `:_(~ 'a')` to a `tape` produces `"a"`.
2222
23− /~zod/try=>
23+ /~zod:dojo>
2424 :_ (add 2 2)
2525 |- (div 4 2)
2626 [2 4]
docs/programming/reference/runes/cl/clhp.md → docs/programming/advanced/catalog/col-cell/hep-cons.mdrenamed+12−11
@@ -1,10 +1,11 @@
11# `:cons`, `:-`, "colhep", `{$cons p/twig q/twig}`
22
3−Tuple of two.
3+*Construct a cell (2-tuple*).
44
5−Produces: a cell of `p` and `q`.
5+Syntax: *2-fixed*.
66
7−Regular form: *2-fixed*
7+The product: the cell of `p` and `q`, each compiled against
8+the subject.
89
910Irregular forms:
1011
@@ -18,16 +19,16 @@ a+1 [%a 1]
1819
1920Examples:
2021
21− ~zod/try=> :-(1 2)
22+ ~zod:dojo> :-(1 2)
2223 [1 2]
23− ~zod/try=> :- 'a'
24+ ~zod:dojo> :- 'a'
2425 %b
2526 ['a' %b]
2627
2728This is the most straightforward case of `:-`, producing a cell of
2829static data in either tall or wide form.
2930
30− /~zod/try=>
31+ /~zod:dojo>
3132 :- (add 2 2)
3233 |- (div 4 2)
3334 [4 2]
@@ -40,25 +41,25 @@ Some obscure `:-` irregular forms
4041
4142### Infix `^`
4243
43− ~zod/main=/app> 1^2^3
44+ ~zod:dojo> 1^2^3
4445 [1 2 3]
4546
4647`a^b` is equivalent to `:- a b`
4748
4849### Infix `/`
4950
50− ~zod/main=/app> a/1
51+ ~zod:dojo> a/1
5152 [%a 1]
52− ~zod/main=/app> a/'twig'
53+ ~zod:dojo> a/'twig'
5354 [%a 'twig']
5455
5556Like `^`, but first item must be a `++term`, and is cubed. Used to construct `path`s and frond.
5657
5758### Prefix `` ` ``, postfix `~`
5859
59− ~zod/main=/app> ````20
60+ ~zod:dojo> ````20
6061 [~ ~ ~ ~ 20]
61− ~zod/main=/app> [42 30]~
62+ ~zod:dojo> [42 30]~
6263 [[42 30] ~]
6364
6465Complimenting each other, these construct pairs with `~` in the head and
docs/programming/reference/runes/cl/clkt.md → docs/programming/advanced/catalog/col-cell/ket-conq.mdrenamed+3−3
@@ -8,9 +8,9 @@ Regular form: *4-fixed*
88
99Examples
1010
11− /~zod/try=> :^(1 2 3 4)
11+ /~zod:dojo> :^(1 2 3 4)
1212 [1 2 3 4]
13− /~zod/try=> :^ 5 6
13+ /~zod:dojo> :^ 5 6
1414 7
1515 8
1616 [5 6 7 8]
@@ -18,7 +18,7 @@ Examples
1818These are the most straightforward cases of `:^`, producing a tuple of four
1919values in both tall and wide forms respectively.
2020
21− /~zod/try=>
21+ /~zod:dojo>
2222 :^ (add 2 4) (add 2 6)
2323 |- (div 4 2)
2424 ~
docs/programming/reference/runes/cl/clls.md → docs/programming/advanced/catalog/col-cell/lus-cont.mdrenamed+3−3
@@ -11,17 +11,17 @@ Regular form:
1111
1212Examples:
1313
14− /~zod/try=> :+ 1
14+ /~zod:dojo> :+ 1
1515 2
1616 3
1717 [1 2 3]
18− /~zod/try=> :+(%a ~ 'b')
18+ /~zod:dojo> :+(%a ~ 'b')
1919 [%a ~ 'b']
2020
2121This is the most straightforward case of `:+`, producing a tuple of three
2222values in both tall and wide form.
2323
24− /~zod/try=>
24+ /~zod:dojo>
2525 :+ (add 2 4) (add 2 6)
2626 |- (div 4 2)
2727 [6 8 2]
docs/programming/reference/runes/cl/clsg.md → docs/programming/advanced/catalog/col-cell/sig-conl.mdrenamed+4−4
@@ -9,11 +9,11 @@ Regular form: *running*
99
1010Examples:
1111
12− /~zod/try=> :~(5 3 4 2 1)
12+ /~zod:dojo> :~(5 3 4 2 1)
1313 [5 3 4 2 1 ~]
14− /~zod/try=> ~[5 3 4 2 1]
14+ /~zod:dojo> ~[5 3 4 2 1]
1515 [5 3 4 2 1 ~]
16− /~zod/try=> :~ 5
16+ /~zod:dojo> :~ 5
1717 3
1818 4
1919 2
@@ -23,7 +23,7 @@ Examples:
2323
2424This is the most straightforward case of `:~`, producing a tuple in wide, irregular and tall form.
2525
26− /~zod/try=> %- flop
26+ /~zod:dojo> %- flop
2727 %- limo
2828 :~ 5
2929 3
docs/programming/reference/runes/cl/cltr.md → docs/programming/advanced/catalog/col-cell/tar-conp.mdrenamed+3−3
@@ -9,11 +9,11 @@ Regular form: *running*
99Examples
1010--------
1111
12− /~zod/try=> :*(5 3 4 1 4 9 0 ~ 'a')
12+ /~zod:dojo> :*(5 3 4 1 4 9 0 ~ 'a')
1313 [5 3 4 1 4 9 0 ~ 'a']
14− /~zod/try=> [5 3 4 1 4 9 0 ~ 'a']
14+ /~zod:dojo> [5 3 4 1 4 9 0 ~ 'a']
1515 [5 3 4 1 4 9 0 ~ 'a']
16− /~zod/try=> :* 5
16+ /~zod:dojo> :* 5
1717 3
1818 4
1919 1
docs/programming/reference/runes/dt.md → docs/programming/advanced/catalog/dot-nock.mdrenamed
The content is the same.
docs/programming/reference/runes/dt/dtkt.md → docs/programming/advanced/catalog/dot-nock/ket-wish.mdrenamed
The content is the same.
docs/programming/reference/runes/dt/dtls.md → docs/programming/advanced/catalog/dot-nock/lus-bump.mdrenamed+10−10
@@ -12,31 +12,31 @@ Irregular form:
1212
1313Examples
1414
15− ~zod/try=> +(6)
15+ ~zod:dojo> +(6)
1616 7
17− ~zod/try=> +(2)
17+ ~zod:dojo> +(2)
1818 3
1919
2020In the most straightforward case `.+` increments its operand.
2121
22− ~zod/try=> +(~zod)
22+ ~zod:dojo> +(~zod)
2323 1
24− /~zod/try=> `@`~zod
24+ /~zod:dojo> `@`~zod
2525 0
26− /~zod/try=> `@`'a'
26+ /~zod:dojo> `@`'a'
2727 97
28− ~zod/try=> +('a')
28+ ~zod:dojo> +('a')
2929 98
30− /~zod/try=> `@`0xff
30+ /~zod:dojo> `@`0xff
3131 255
32− ~zod/try=> +(0xff)
32+ ~zod:dojo> +(0xff)
3333 256
34− ~zod/try=> +(41)
34+ ~zod:dojo> +(41)
3535 42
3636
3737When passed a non-atomic odored atom `.+` down-casts to an atom (of just `@`).
3838
39− ~zod/try=> +([1 2])
39+ ~zod:dojo> +([1 2])
4040 ! type-fail
4141 ! exit
4242
docs/programming/reference/runes/dt/dttr.md → docs/programming/advanced/catalog/dot-nock/tar-nock.mdrenamed+6−6
@@ -7,17 +7,17 @@ nock subject `p`.
77
88Examples:
99
10− ~zod/try=> .*([20 30] [0 2])
10+ ~zod:dojo> .*([20 30] [0 2])
1111 20
12− ~zod/try=> .*(33 [4 0 1])
12+ ~zod:dojo> .*(33 [4 0 1])
1313 34
14− ~zod/try=> .*(|.(50) [9 2 0 1])
14+ ~zod:dojo> .*(|.(50) [9 2 0 1])
1515 50
16− ~zod/try=> .*(12 [7 [`1 [4 `1]] [`2 `3 `2]])
16+ ~zod:dojo> .*(12 [7 [`1 [4 `1]] [`2 `3 `2]])
1717 [12 13 12]
18− ~zod/try=> .*(~ [5 1^4 [4 1^3]])
18+ ~zod:dojo> .*(~ [5 1^4 [4 1^3]])
1919 0
20− ~zod/try=> .*(~ [5 1^5 [4 1^3]])
20+ ~zod:dojo> .*(~ [5 1^5 [4 1^3]])
2121 1
2222
2323See the nock tutorial for further discussion of Nock.
docs/programming/reference/runes/dt/dtts.md → docs/programming/advanced/catalog/dot-nock/tis-same.mdrenamed+9−9
@@ -8,20 +8,20 @@ Regular form: *2-fixed*
88
99Examples:
1010
11− ~zod/try=> =(0 0)
11+ ~zod:dojo> =(0 0)
1212 %.y
13− ~zod/try=> =(1 2)
13+ ~zod:dojo> =(1 2)
1414 %.n
1515
1616Comparing two atoms is the most straightforward case of `.=`.
1717
18− ~zod/try=> =("a" [97 ~])
18+ ~zod:dojo> =("a" [97 ~])
1919 %.y
20− ~zod/try=> =(~nec 1)
20+ ~zod:dojo> =(~nec 1)
2121 %.y
22− ~zod/try=> =([%a 2] a/(dec 3))
22+ ~zod:dojo> =([%a 2] a/(dec 3))
2323 %.y
24− ~zod/try=> =([%b 2] a/(dec 3))
24+ ~zod:dojo> =([%b 2] a/(dec 3))
2525 %.n
2626
2727It's important to keep in mind that `.=` compares the atomic equivalent
@@ -29,14 +29,14 @@ of each `p` and `q`. In the first case of this example the tape `"a"` is
2929actually the list `[97 0]` since the ASCII code for `'a'` is 97. The
3030following cases serve to show similar implicit down-casts.
3131
32− /~zod/try=> =isa |= a/@t
32+ /~zod:dojo> =isa |= a/@t
3333 ?: =(a 'a')
3434 'yes a'
3535 'not a'
3636 new var %isa
37− /~zod/try=> (isa 'b')
37+ /~zod:dojo> (isa 'b')
3838 'not a'
39− /~zod/try=> (isa 'a')
39+ /~zod:dojo> (isa 'a')
4040 'yes a'
4141
4242In common practice `.=` is often used inside of `?` runes, where
docs/programming/reference/runes/dt/dtwt.md → docs/programming/advanced/catalog/dot-nock/wut-deep.mdrenamed+7−7
@@ -9,23 +9,23 @@ Regular form: *1-fixed*
99
1010Examples:
1111
12− ~zod/try=> .?(~)
12+ ~zod:dojo> .?(~)
1313 %.n
14− ~zod/try=> .?(5)
14+ ~zod:dojo> .?(5)
1515 %.n
16− ~zod/try=> .?(~porlep)
16+ ~zod:dojo> .?(~porlep)
1717 %.n
1818
1919In all of these cases our sample is implicitly down-cast to an atom,
2020which produces `|`.
2121
22− ~zod/try=> .?([1 2 3])
22+ ~zod:dojo> .?([1 2 3])
2323 %.y
24− ~zod/try=> .?("ha")
24+ ~zod:dojo> .?("ha")
2525 %.y
26− ~zod/try=> ._a_b__
26+ ~zod:dojo> ._a_b__
2727 [%a %b]
28− ~zod/try=> .?(._a_b__)
28+ ~zod:dojo> .?(._a_b__)
2929 %.y
3030
3131`[1 2 3]` is clearly a cell, `"ha"` is equivalent to the null-terminated
docs/programming/advanced/catalog/ket-cast.mdnew file+24
@@ -0,0 +1,24 @@
1+---
2+sort: 6
3+---
4+
5+# `^ ket` (cast)
6+
7+<list dataPreview="true" className="runes" linkToFragments="true"></list>
8+
9+<kids className="runes"></kids>
10+
11+## Twigs
12+
13+```
14+|%
15+++ twig
16+ $% {$iron p/twig} :: ^|
17+ {$like p/twig q/twig} :: ^+
18+ {$cast p/twig q/twig} :: ^-
19+ {$zinc p/twig} :: ^&
20+ {$burn p/twig} :: ^~
21+ {$name p/toga q/twig} :: ^=
22+ {$lead p/twig} :: ^?
23+ ==
24+--
docs/programming/reference/runes/kt/ktbr.md → docs/programming/advanced/catalog/ket-cast/bar-iron.mdrenamed+4−4
@@ -10,14 +10,14 @@ Regular form: *1-fixed*
1010
1111Examples:
1212
13− /~zod/try=> =cor |= a/@
13+ /~zod:dojo> =cor |= a/@
1414 +(a)
1515 new var %cor
16− /~zod/try=> +<.cor
16+ /~zod:dojo> +<.cor
1717 a=0
18− /~zod/try=> =iro ^|(cor)
18+ /~zod:dojo> =iro ^|(cor)
1919 new var %iro
20− /~zod/try=> +<.iro
20+ /~zod:dojo> +<.iro
2121 ! -axis.6
2222 ! peek-park
2323 ! exit
docs/programming/reference/runes/kt/kthp.md → docs/programming/advanced/catalog/ket-cast/hep-cast.mdrenamed+5−5
@@ -14,22 +14,22 @@ Irregular form:
1414
1515Examples:
1616
17− ~zod/try=> (add 90 7)
17+ ~zod:dojo> (add 90 7)
1818 97
19− ~zod/try=> `@t`(add 90 7)
19+ ~zod:dojo> `@t`(add 90 7)
2020 'a'
21− ~zod/try=> ^-(@t (add 90 7))
21+ ~zod:dojo> ^-(@t (add 90 7))
2222 'a'
2323
2424Here we see a straightforward use of `^-` in both irregular and wide
2525forms, simply casting an atom to a `@t`. `97` is the ASCII code for
2626`'a'`.
2727
28− /~zod/try=> =cor |= a/@
28+ /~zod:dojo> =cor |= a/@
2929 ^- (unit @ta)
3030 [~ u=a]
3131 new var %cor
32− /~zod/try=> (cor 97)
32+ /~zod:dojo> (cor 97)
3333 [~ ~.a]
3434
3535In this case we see a very common use of `^-`, at the top of a function.
docs/programming/reference/runes/kt/ktls.md → docs/programming/advanced/catalog/ket-cast/lus-like.mdrenamed+6−6
@@ -12,24 +12,24 @@ Regular form: *2 fixed*
1212
1313Examples:
1414
15− ~zod/try=> (add 90 7)
15+ ~zod:dojo> (add 90 7)
1616 97
17− ~zod/try=> ^+('any text' (add 90 7))
17+ ~zod:dojo> ^+('any text' (add 90 7))
1818 'a'
1919
2020Here we use a '++cord' (which could be any cord), `'any text'` to cast our
2121result to a cord.
2222
23− /~zod/try=> =cor |= a/{q/@ta r/@ s/@}
23+ /~zod:dojo> =cor |= a/{q/@ta r/@ s/@}
2424 [(cat 3 'new' q.a) (add r.a s.a) (sub r.a s.a)]
2525 new var %cor
26− /~zod/try=> (cor 'start' 6 3)
26+ /~zod:dojo> (cor 'start' 6 3)
2727 [8.390.876.208.525.960.558 9 3]
28− /~zod/try=> =cor |= a/[q/@ta r/@ s/@]
28+ /~zod:dojo> =cor |= a/[q/@ta r/@ s/@]
2929 ^+ a
3030 [(cat 3 'new' q.a) (add r.a s.a) (sub r.a s.a)]
3131 changed %cor
32− /~zod/try=> (cor 'start' 6 3)
32+ /~zod:dojo> (cor 'start' 6 3)
3333 [q=~.newstart r=9 s=3]
3434
3535In this example we create a gate `cor` and lightly manipulate the tuple
docs/programming/reference/runes/kt/ktpm.md → docs/programming/advanced/catalog/ket-cast/pam-zinc.mdrenamed+2−2
@@ -6,11 +6,11 @@ Converts a `%gold` core `p` into a `%zinc` core.
66
77Examples:
88
9− ~zod/try=> |=(@ 1)
9+ ~zod:dojo> |=(@ 1)
1010 < 1.odf
1111 {@ {our/@p now/@da eny/@uvI} $~ <282.ucw 42.juj 402.arm 110.jyx 1.ztu $151>}
1212 >
13− ~zod/try=> ^&(|=(@ 1))
13+ ~zod:dojo> ^&(|=(@ 1))
1414 < 1&odf
1515 {@ {our/@p now/@da eny/@uvI} $~ <282.ucw 42.juj 402.arm 110.jyx 1.ztu $151>}
1616 >
docs/programming/reference/runes/kt/ktsg.md → docs/programming/advanced/catalog/ket-cast/sig-burn.mdrenamed+2−2
@@ -11,9 +11,9 @@ Regular form *1-fixed*
1111Examples
1212--------
1313
14− /~zod/try=> (make '|-(42)')
14+ /~zod:dojo> (make '|-(42)')
1515 [%8 p=[%1 p=[1 42]] q=[%9 p=2 q=[%0 p=1]]]
16− /~zod/try=> (make '^~(|-(42))')
16+ /~zod:dojo> (make '^~(|-(42))')
1717 [%1 p=42]
1818
1919Here we use `++make` to examine the nock generated for a particular
docs/programming/reference/runes/kt/ktts.md → docs/programming/advanced/catalog/ket-cast/tis-name.mdrenamed+3−3
@@ -10,16 +10,16 @@ Regular form: *2-fixed*
1010
1111Examples:
1212
13− ~zod/try=> a=1
13+ ~zod:dojo> a=1
1414 a=1
15− ~zod/try=> ^= a
15+ ~zod:dojo> ^= a
1616 1
1717 a=1
1818
1919In this straightforward example we see the irregular and tall forms of
2020`^=`, both of which assign `a` to be `1`.
2121
22− ~zod/try=> [b ~ c]=[1 2 3 4]
22+ ~zod:dojo> [b ~ c]=[1 2 3 4]
2323 [b=1 2 c=[3 4]]
2424
2525Here we see multiple names being applied at once, using the irregular
docs/programming/reference/runes/kt/ktwt.md → docs/programming/advanced/catalog/ket-cast/wut-lead.mdrenamed+2−2
@@ -9,7 +9,7 @@ Regular form: *1-fixed*
99
1010Examples:
1111
12− ~zod/try=> |=(@ 1)
12+ ~zod:dojo> |=(@ 1)
1313 <1.gcq [@ @n <250.yur 41.wda 374.hzt 100.kzl 1.ypj %164>]>
14− ~zod/try=> ^?(|=(@ 1))
14+ ~zod:dojo> ^?(|=(@ 1))
1515 <1?gcq [@ @n <250.yur 41.wda 374.hzt 100.kzl 1.ypj %164>]>
docs/programming/advanced/catalog/misc.mdnew file+50
@@ -0,0 +1,50 @@
1+---
2+sort: 12
3+---
4+
5+# Irregular leaves
6+
7+<list dataPreview="true" className="runes" linkToFragments="true"></list>
8+
9+<kids className="runes"></kids>
10+
11+## Twigs
12+
13+```
14+|%
15+++ base :: base mold
16+ $@ $? $noun :: any noun
17+ $cell :: any cell
18+ $bean :: loobean
19+ $void :: no nouns
20+ $null :: ~ == 0
21+ == ::
22+ {$atom p/odor} :: atom
23+:: ::
24+++ pint {p/{p/@ q/@} q/{p/@ q/@}} :: line+column range
25+++ spot {p/path q/pint} :: range in file
26+++ woof $@(@ {$~ p/twig}) :: string w/embed
27+:: ::
28+++ tune :: complex face
29+ $: p/(map term (unit twig)) :: definitions
30+ q/(list twig) :: bridges
31+ == ::
32+:: ::
33+++ twig ::
34+ $% {$base p/base} :: base
35+ {$bust p/base} :: bunt base
36+ {$dbug p/spot q/twig} :: debug info in trace
37+ {$hand p/span q/nock} :: premade result
38+ {$knit p/(list woof)} :: assemble string
39+ {$leaf p/(pair term @)} :: symbol
40+ {$limb p/term} :: pulls limb p
41+ {$lost p/twig} :: not to be taken
42+ {$rock p/term q/*} :: fixed constant
43+ {$sand p/term q/*} :: unfixed constant
44+ {$tell p/(list twig)} :: render as tape
45+ {$tune p/$@(term tune)} :: face on subject
46+ {$wing p/wing} :: pulls p
47+ {$yell p/(list twig)} :: render as tank
48+ ==
49+--
50+```
docs/programming/advanced/catalog/misc/base.mdnew file
No changes to the content.
docs/programming/advanced/catalog/misc/bust.mdnew file
No changes to the content.
docs/programming/advanced/catalog/misc/dbug.mdnew file
No changes to the content.
docs/programming/advanced/catalog/misc/hand.mdnew file
No changes to the content.
docs/programming/advanced/catalog/misc/knit.mdnew file
No changes to the content.
docs/programming/advanced/catalog/misc/leaf.mdnew file
No changes to the content.
docs/programming/advanced/catalog/misc/limb.mdnew file
No changes to the content.
docs/programming/advanced/catalog/misc/lost.mdnew file
No changes to the content.
docs/programming/advanced/catalog/misc/rock.mdnew file
No changes to the content.
docs/programming/advanced/catalog/misc/sand.mdnew file
No changes to the content.
docs/programming/advanced/catalog/misc/tell.mdnew file
No changes to the content.
docs/programming/advanced/catalog/misc/tune.mdnew file
No changes to the content.
docs/programming/advanced/catalog/misc/wing.mdnew file
No changes to the content.
docs/programming/advanced/catalog/misc/yell.mdnew file
No changes to the content.
docs/programming/advanced/catalog/sem-make.mdnew file+22
@@ -0,0 +1,22 @@
1+---
2+sort: 9
3+---
4+
5+# `; sem` (make)
6+
7+<list dataPreview="true" className="runes" linkToFragments="true"></list>
8+
9+<kids className="runes"></kids>
10+
11+## Twigs
12+
13+```
14+|%
15+++ twig
16+ $% {$wad p/twig q/(list twig)} :: ;:
17+ {$nub p/twig} :: ;/
18+ {$dip p/twig q/(list twig)} :: ;~
19+ {$fry p/twig q/twig} :: ;;
20+ ==
21+--
22+```
docs/programming/reference/runes/sm/smcl.md → docs/programming/advanced/catalog/sem-make/col-wad.mdrenamed+6−6
@@ -12,21 +12,21 @@ Irregular form:
1212
1313Examples:
1414
15− ~zod/try=> (add 3 (add 4 5))
15+ ~zod:dojo> (add 3 (add 4 5))
1616 12
17− ~zod/try=> ;:(add 3 4 5)
17+ ~zod:dojo> ;:(add 3 4 5)
1818 12
19− ~zod/try=> :(add 3 4 5)
19+ ~zod:dojo> :(add 3 4 5)
2020 12
2121
2222Here we see how `;:` is equivalent to nesting our calls to the binary
2323gate `++add`.
2424
25− ~zod/try=> :(weld "foo" "bar" "baz")
25+ ~zod:dojo> :(weld "foo" "bar" "baz")
2626 ~[~~f ~~o ~~o ~~b ~~a ~~r ~~b ~~a ~~z]
27− ~zod/try=> `tape`:(weld "foo" "bar" "baz")
27+ ~zod:dojo> `tape`:(weld "foo" "bar" "baz")
2828 "foobarbaz"
29− ~zod/try=> `tape`(weld "foo" (weld "bar" "baz"))
29+ ~zod:dojo> `tape`(weld "foo" (weld "bar" "baz"))
3030 "foobarbaz"
3131
3232Following on from our previous example, using `;:` with `++weld` is
docs/programming/reference/runes/cl/clfs.md → docs/programming/advanced/catalog/sem-make/fas-nub.mdrenamed
The content is the same.
docs/programming/reference/runes/sm/smsm.md → docs/programming/advanced/catalog/sem-make/sem-fry.mdrenamed+4−4
@@ -7,12 +7,12 @@ resulting noun is equal to `.=` the original, and produces it.
77
88Examples: XX Review closely
99
10− ~zod/try=> ^-(tape ~[97 98 99])
10+ ~zod:dojo> ^-(tape ~[97 98 99])
1111 ! type-fail
1212 ! exit
13− ~zod/try=> ;;(tape ~[97 98 99])
13+ ~zod:dojo> ;;(tape ~[97 98 99])
1414 "abc"
15− ~zod/try=> (tape [50 51 52])
15+ ~zod:dojo> (tape [50 51 52])
1616 "23"
17− ~zod/try=> ;;(tape [50 51 52])
17+ ~zod:dojo> ;;(tape [50 51 52])
1818 ! exit
docs/programming/reference/runes/sm/smsg.md → docs/programming/advanced/catalog/sem-make/sig-dip.mdrenamed+45−45
@@ -8,32 +8,32 @@ Regular form: 1-fixed, `q` is *running*
88
99Examples:
1010
11− ~zod/try=> =cmp |=([a=tape b=$+(char tape)] `tape`?~(a ~ (weld (b i.a) t.a)))
12− ~zod/try=> ;~(cmp trip)
11+ ~zod:dojo> =cmp |=([a=tape b=$+(char tape)] `tape`?~(a ~ (weld (b i.a) t.a)))
12+ ~zod:dojo> ;~(cmp trip)
1313 <1.xef [a=@ <374.hzt 100.kzl 1.ypj %164>]>
14− ~zod/try=> (;~(cmp trip) 'a')
14+ ~zod:dojo> (;~(cmp trip) 'a')
1515 "a"
1616
1717`;~` accepts a composer and a nonempty list of functions; at one gate, the
1818composer is ignored, and the gate applied directly.
1919
20− ~zod/try=> (;~(cmp trip |=(a=@ ~[a a])) 'a')
20+ ~zod:dojo> (;~(cmp trip |=(a=@ ~[a a])) 'a')
2121 "aa"
22− ~zod/try=> (;~(cmp trip |=(a=@ ~[a a])) '')
22+ ~zod:dojo> (;~(cmp trip |=(a=@ ~[a a])) '')
2323 ""
2424
2525For multiple gates, `;~` uses the composer to connect the gates in
2626order.
2727
28− ~zod/try=> (;~(cmp trip ;~(cmp |=(a=@ ~[a a]) |=(a=@ <(dec a)>))) 'b')
28+ ~zod:dojo> (;~(cmp trip ;~(cmp |=(a=@ ~[a a]) |=(a=@ <(dec a)>))) 'b')
2929 "97b"
30− ~zod/try=> (;~(cmp trip |=(a=@ ~[a a]) |=(a=@ <(dec a)>)) 'b')
30+ ~zod:dojo> (;~(cmp trip |=(a=@ ~[a a]) |=(a=@ <(dec a)>)) 'b')
3131 "97b"
32− ~zod/try=> (;~(cmp trip |=(a=@ ~[a a]) |=(a=@ <(dec a)>)) '')
32+ ~zod:dojo> (;~(cmp trip |=(a=@ ~[a a]) |=(a=@ <(dec a)>)) '')
3333 ""
34− ~zod/try=> (;~(cmp trip |=(a=@ ~[a a]) |=(a=@ <(dec a)>)) 'a')
34+ ~zod:dojo> (;~(cmp trip |=(a=@ ~[a a]) |=(a=@ <(dec a)>)) 'a')
3535 "96a"
36− ~zod/try=> (;~(cmp trip |=(a=@ ~[a a]) |=(a=@ <(dec a)>)) 'acd')
36+ ~zod:dojo> (;~(cmp trip |=(a=@ ~[a a]) |=(a=@ <(dec a)>)) 'acd')
3737 "96acd"
3838
3939Multiple gates are equivalent to stacked semsigs.
@@ -41,51 +41,51 @@ Multiple gates are equivalent to stacked semsigs.
4141------------------------------------------------------------------------
4242
4343 [~ 0]
44− ~zod/try=> ((slat %p) '~nec')
44+ ~zod:dojo> ((slat %p) '~nec')
4545 [~ 1]
46− ~zod/try=> ((slat %p) 'nec')
46+ ~zod:dojo> ((slat %p) 'nec')
4747 ~
48− ~zod/try=> ;~(biff (slat %p))
48+ ~zod:dojo> ;~(biff (slat %p))
4949 <1.ags [txt=@ta <1.wqj [mod=@tas <374.hzt 100.kzl 1.ypj %164>]>]>
50− ~zod/try=> (;~(biff (slat %p)) '~zod')
50+ ~zod:dojo> (;~(biff (slat %p)) '~zod')
5151 [~ 0]
52− ~zod/try=> (;~(biff (slat %p)) '~')
52+ ~zod:dojo> (;~(biff (slat %p)) '~')
5353 ~
54− ~zod/try=> (;~(biff (slat %p)) '~nec')
54+ ~zod:dojo> (;~(biff (slat %p)) '~nec')
5555 [~ 1]
5656
5757More commonly, this can be used for unit composition. `(slat %p)` parses
5858cords in phonetic base, failure case: invalid text
5959
60− ~zod/try=> (mo [~nec 12] [~tug 16] ~)
60+ ~zod:dojo> (mo [~nec 12] [~tug 16] ~)
6161 {[p=~nec q=12] [p=~tug q=16]}
62− ~zod/try=> ~(get by (mo [~nec 12] [~tug 16] ~))
62+ ~zod:dojo> ~(get by (mo [~nec 12] [~tug 16] ~))
6363 <1.yvn [* <18.wzi [a=nlr([p=@p q=@ud]) <374.hzt 100.kzl 1.ypj %164>]>]>
64− ~zod/try=> =yaz ~(get by (mo [~nec 12] [~tug 16] ~))
65− ~zod/try=> (yaz ~nec)
64+ ~zod:dojo> =yaz ~(get by (mo [~nec 12] [~tug 16] ~))
65+ ~zod:dojo> (yaz ~nec)
6666 [~ 12]
67− ~zod/try=> (yaz ~zod)
67+ ~zod:dojo> (yaz ~zod)
6868 ~
69− ~zod/try=> (yaz ~tug)
69+ ~zod:dojo> (yaz ~tug)
7070 [~ 16]
7171
7272`mo` makes a map, and `+-get`:by is used to retrieve values from one,
7373failure case: no such key
7474
75− ~zod/try=> (;~(biff (slat %p) yaz) '~zod')
75+ ~zod:dojo> (;~(biff (slat %p) yaz) '~zod')
7676 ~
77− ~zod/try=> (;~(biff (slat %p) yaz) '~nec')
77+ ~zod:dojo> (;~(biff (slat %p) yaz) '~nec')
7878 [~ 12]
79− ~zod/try=> (;~(biff (slat %p) yaz) 'tug')
79+ ~zod:dojo> (;~(biff (slat %p) yaz) 'tug')
8080 ~
81− ~zod/try=> (;~(biff (slat %p) yaz) '~tug')
81+ ~zod:dojo> (;~(biff (slat %p) yaz) '~tug')
8282 [~ 16]
8383
84− ~zod/try=> (;~(biff (slat %p) yaz |=(a=@ud [~ (add 100 a)])) '~nec')
84+ ~zod:dojo> (;~(biff (slat %p) yaz |=(a=@ud [~ (add 100 a)])) '~nec')
8585 [~ 112]
86− ~zod/try=> (;~(biff (slat %p) yaz |=(a=@ud [~ (add 100 a)])) '~zod')
86+ ~zod:dojo> (;~(biff (slat %p) yaz |=(a=@ud [~ (add 100 a)])) '~zod')
8787 ~
88− ~zod/try=> (;~(biff (slat %p) yaz |=(a=@ud [~ (add 100 a)])) 'mal')
88+ ~zod:dojo> (;~(biff (slat %p) yaz |=(a=@ud [~ (add 100 a)])) 'mal')
8989 ~
9090
9191These can be combined with `biff`, which connects a previous succeeded
@@ -93,37 +93,37 @@ unit result by a gate that itself produces a unit from it.
9393
9494------------------------------------------------------------------------
9595
96− ~zod/try=> (hep [1 1] "")
96+ ~zod:dojo> (hep [1 1] "")
9797 [p=[p=1 q=1] q=~]
98− ~zod/try=> (hep [1 1] "-")
98+ ~zod:dojo> (hep [1 1] "-")
9999 [p=[p=1 q=2] q=[~ [p=~~- q=[p=[p=1 q=2] q=""]]]]
100− ~zod/try=> `(like cord)`(hep [1 1] "-")
100+ ~zod:dojo> `(like cord)`(hep [1 1] "-")
101101 [p=[p=1 q=2] q=[~ [p='-' q=[p=[p=1 q=2] q=""]]]]
102− ~zod/try=> `(like cord)`(hep [1 1] "?")
102+ ~zod:dojo> `(like cord)`(hep [1 1] "?")
103103 [p=[p=1 q=1] q=~]
104− ~zod/try=> (lus [1 1] "+")
104+ ~zod:dojo> (lus [1 1] "+")
105105 [p=[p=1 q=2] q=[~ [p=~~~2b. q=[p=[p=1 q=2] q=""]]]]
106− ~zod/try=> `(like cord)`(lus [1 1] "+")
106+ ~zod:dojo> `(like cord)`(lus [1 1] "+")
107107 [p=[p=1 q=2] q=[~ [p='+' q=[p=[p=1 q=2] q=""]]]]
108− ~zod/try=> `(like cord)`(lus [1 1] "++")
108+ ~zod:dojo> `(like cord)`(lus [1 1] "++")
109109 [p=[p=1 q=2] q=[~ [p='+' q=[p=[p=1 q=2] q="+"]]]]
110− ~zod/try=> `(like cord)`(lus [1 1] " +")
110+ ~zod:dojo> `(like cord)`(lus [1 1] " +")
111111 [p=[p=1 q=1] q=~]
112− ~zod/try=> `(like cord)`(;~(pose hep lus) [1 1] "?")
112+ ~zod:dojo> `(like cord)`(;~(pose hep lus) [1 1] "?")
113113 [p=[p=1 q=1] q=~]
114− ~zod/try=> `(like cord)`(;~(pose hep lus) [1 1] "-")
114+ ~zod:dojo> `(like cord)`(;~(pose hep lus) [1 1] "-")
115115 [p=[p=1 q=2] q=[~ [p='-' q=[p=[p=1 q=2] q=""]]]]
116− ~zod/try=> `(like cord)`(;~(pose hep lus) [1 1] "+")
116+ ~zod:dojo> `(like cord)`(;~(pose hep lus) [1 1] "+")
117117 [p=[p=1 q=2] q=[~ [p='+' q=[p=[p=1 q=2] q=""]]]]
118− ~zod/try=> `(like cord)`(;~(pose hep lus) [1 1] "a")
118+ ~zod:dojo> `(like cord)`(;~(pose hep lus) [1 1] "a")
119119 [p=[p=1 q=1] q=~]
120− ~zod/try=> `(like cord)`(;~(pose hep lus) [1 1] "-+")
120+ ~zod:dojo> `(like cord)`(;~(pose hep lus) [1 1] "-+")
121121 [p=[p=1 q=2] q=[~ [p='-' q=[p=[p=1 q=2] q="+"]]]]
122− ~zod/try=> `(like ,[cord cord])`(;~(plug hep lus) [1 1] "+")
122+ ~zod:dojo> `(like ,[cord cord])`(;~(plug hep lus) [1 1] "+")
123123 [p=[p=1 q=1] q=~]
124− ~zod/try=> `(like ,[cord cord])`(;~(plug hep lus) [1 1] "-+")
124+ ~zod:dojo> `(like ,[cord cord])`(;~(plug hep lus) [1 1] "-+")
125125 [p=[p=1 q=3] q=[~ [p=['-' '+'] q=[p=[p=1 q=3] q=""]]]]
126− ~zod/try=> `(like ,[cord cord])`(;~(plug hep lus) [1 1] "-+ ")
126+ ~zod:dojo> `(like ,[cord cord])`(;~(plug hep lus) [1 1] "-+ ")
127127 [p=[p=1 q=3] q=[~ [p=['-' '+'] q=[p=[p=1 q=3] q=" "]]]]
128128
129129Most prominently, however, `;~` is used for combinator parsers,
docs/programming/advanced/catalog/sig-hint.mdnew file+36
@@ -0,0 +1,36 @@
1+---
2+sort: 7
3+---
4+
5+# `~ sig` (hint)
6+
7+<list dataPreview="true" className="runes" linkToFragments="true"></list>
8+
9+<kids className="runes"></kids>
10+
11+## Twigs
12+
13+```
14+|%
15+++ chum :: jet hint
16+ $? lef/term :: jet name
17+ {std/term kel/@} :: kelvin version
18+ {ven/term pro/term kel/@} :: vendor and product
19+ {ven/term pro/term ver/@ kel/@} :: all of the above
20+ == ::
21+:: ::
22+++ twig ::
23+ $% {$show p/twig q/twig} :: ~|
24+ {$lurk p/twig q/twig} :: ~_
25+ {$fast p/chum q/twig r/tyre s/twig} :: ~%
26+ {$funk p/chum q/twig} :: ~/
27+ {$thin p/$@(term {p/term q/twig}) q/twig} :: ~<
28+ {$hint p/$@(term {p/term q/twig}) q/twig} :: ~>
29+ {$poll p/term q/twig} :: ~$
30+ {$memo p/@ q/twig} :: ~+
31+ {$dump p/@ud q/twig r/twig} :: ~&
32+ {$ddup p/twig q/twig} :: ~=
33+ {$warn p/@ud q/twig r/twig s/twig} :: ~?
34+ {$peep p/twig q/twig} :: ~!
35+ ==
36+--
docs/programming/reference/runes/sg/sgbr.md → docs/programming/advanced/catalog/sig-hint/bar-show.mdrenamed
The content is the same.
docs/programming/reference/runes/sg/sgbc.md → docs/programming/advanced/catalog/sig-hint/buc-poll.mdrenamed+3−3
@@ -8,9 +8,9 @@ Irregular form: *2-fixed*
88
99Examples:
1010
11− ~zod/try=> (make '~$(foo |-($))')
11+ ~zod:dojo> (make '~$(foo |-($))')
1212 [%10 p=[p=1.702.259.052 q=[%1 p=7.303.014]] q=[%8 p=[%1 p=[9 2 0 1]] q=[%9 p=2 q=[%0 p=1]]]]
13− ~zod/try=> `@tas`1.702.259.052
13+ ~zod:dojo> `@tas`1.702.259.052
1414 %live
15− ~zod/try=> `@tas`7.303.014
15+ ~zod:dojo> `@tas`7.303.014
1616 %foo
docs/programming/reference/runes/sg/sgcb.md → docs/programming/advanced/catalog/sig-hint/cab-lurk.mdrenamed+2−2
@@ -9,7 +9,7 @@ Regular form: *2-fixed*
99
1010Examples:
1111
12− ~zod/try=> (make '~_(+216 ~)')
12+ ~zod:dojo> (make '~_(+216 ~)')
1313 [%10 p=[p=1.851.876.717 q=[p=[%1 p=[0 216]] q=[%0 p=1]]] q=[%1 p=0]]
14− ~zod/try=> `@tas`1.851.876.717
14+ ~zod:dojo> `@tas`1.851.876.717
1515 %mean
docs/programming/reference/runes/sg/sgcn.md → docs/programming/advanced/catalog/sig-hint/cen-fast.mdrenamed
The content is the same.
docs/programming/reference/runes/sg/sgfs.md → docs/programming/advanced/catalog/sig-hint/fas-funk.mdrenamed+3−3
@@ -9,9 +9,9 @@ Regular form: *2fixed*
99
1010Examples:
1111
12− ~zod/try=> (make '~/ %bam |.(40)')
12+ ~zod:dojo> (make '~/ %bam |.(40)')
1313 [%8 p=[%1 p=[1 40]] q=[%10 p=[p=1.953.718.630 q=[%1 p=[7.168.354 [0 7] 0]]] q=[%0 p=1]]]
14− ~zod/try=> `@`%bam
14+ ~zod:dojo> `@`%bam
1515 7.168.354
16− ~zod/try=> `@tas`1.953.718.630
16+ ~zod:dojo> `@tas`1.953.718.630
1717 %fast
docs/programming/reference/runes/sg/sggl.md → docs/programming/advanced/catalog/sig-hint/gal-thin.mdrenamed+2−2
@@ -10,7 +10,7 @@ Irregular form: *2-fixed*
1010
1111Examples:
1212
13− ~zod/try=> (make '~<(%a 42)')
13+ ~zod:dojo> (make '~<(%a 42)')
1414 [%7 p=[%1 p=42] q=[%10 p=97 q=[%0 p=1]]]
15− ~zod/try=> (make '~<(%a.+(.) 42)')
15+ ~zod:dojo> (make '~<(%a.+(.) 42)')
1616 [%7 p=[%1 p=42] q=[%10 p=[p=97 q=[%4 p=[%0 p=1]]] q=[%0 p=1]]]
docs/programming/reference/runes/sg/sggr.md → docs/programming/advanced/catalog/sig-hint/gar-hint.mdrenamed+2−2
@@ -8,7 +8,7 @@ Regular form: *2-fixed*
88
99Examples:
1010
11− ~zod/try=> (make '~>(%a 42)')
11+ ~zod:dojo> (make '~>(%a 42)')
1212 [%10 p=97 q=[%1 p=42]]
13− ~zod/try=> (make '~>(%a.+(2) 42)')
13+ ~zod:dojo> (make '~>(%a.+(2) 42)')
1414 [%10 p=[p=97 q=[%4 p=[%1 p=2]]] q=[%1 p=42]]
docs/programming/reference/runes/sg/sgls.md → docs/programming/advanced/catalog/sig-hint/lus-memo.mdrenamed+6−6
@@ -8,16 +8,16 @@ Regular form: *1-fixed*
88
99Examples:
1010
11− ~zod/try=> 20
11+ ~zod:dojo> 20
1212 20
13− ~zod/try=> ~+(20)
13+ ~zod:dojo> ~+(20)
1414 20
15− ~zod/try=> 20
16− ~zod/try=> (make '20')
15+ ~zod:dojo> 20
16+ ~zod:dojo> (make '20')
1717 [%1 p=20]
18− ~zod/try=> (make '~+(20)')
18+ ~zod:dojo> (make '~+(20)')
1919 [%10 p=[p=1.869.440.365 q=[%1 p=0]] q=[%1 p=20]]
20− ~zod/try=> `@tas`1.869.440.365
20+ ~zod:dojo> `@tas`1.869.440.365
2121 %memo
2222
2323By using `++make` to display the compiled nock, we can see that `~+`
docs/programming/reference/runes/sg/sgpm.md → docs/programming/advanced/catalog/sig-hint/pam-dump.mdrenamed+1−1
@@ -10,7 +10,7 @@ Regular form: *fixed 2 or 3*
1010
1111Examples:
1212
13− ~zod/try=> ~&('oops' ~)
13+ ~zod:dojo> ~&('oops' ~)
1414 'oops'
1515 ~
1616
docs/programming/reference/runes/sg/sgts.md → docs/programming/advanced/catalog/sig-hint/tis-ddup.mdrenamed+6−6
@@ -9,15 +9,15 @@ Regular form: *2-fixed*
99
1010Examples:
1111
12− ~zod/try=> 20
12+ ~zod:dojo> 20
1313 20
14− ~zod/try=> =+(a=20 20)
14+ ~zod:dojo> =+(a=20 20)
1515 20
16− ~zod/try=> =+(a=20 ~=(a 20))
16+ ~zod:dojo> =+(a=20 ~=(a 20))
1717 20
18− ~zod/try=> (make '=+(a=20 20)')
18+ ~zod:dojo> (make '=+(a=20 20)')
1919 [%8 p=[%1 p=20] q=[%1 p=20]]
20− ~zod/try=> (make '=+(a=20 ~=(a 20))')
20+ ~zod:dojo> (make '=+(a=20 ~=(a 20))')
2121 [%8 p=[%1 p=20] q=[%10 p=[p=1.836.213.607 q=[%0 p=2]] q=[%1 p=20]]]
22− ~zod/try=> `@tas`1.836.213.607
22+ ~zod:dojo> `@tas`1.836.213.607
2323 %germ
docs/programming/reference/runes/sg/sgwt.md → docs/programming/advanced/catalog/sig-hint/wut-warn.mdrenamed+2−2
@@ -9,9 +9,9 @@ Regularm form *4-fixed*
99
1010Examples:
1111
12− ~zod/try=> ~?((gth 1 2) 'oops' ~)
12+ ~zod:dojo> ~?((gth 1 2) 'oops' ~)
1313 ~
14− ~zod/try=> ~?((gth 1 0) 'oops' ~)
14+ ~zod:dojo> ~?((gth 1 0) 'oops' ~)
1515 'oops'
1616 ~
1717
docs/programming/reference/runes/sg/sgzp.md → docs/programming/advanced/catalog/sig-hint/zap-peep.mdrenamed+3−3
@@ -6,11 +6,11 @@ Produces the type of `p` on the stacktrace if `q` fails. Used only for debugging
66
77Examples:
88
9− ~zod/try=> a
9+ ~zod:dojo> a
1010 ! -find-limb.a
1111 ! find-none
1212 ! exit
13− ~zod/try=> ~!('foo' a)
13+ ~zod:dojo> ~!('foo' a)
1414 ! @t
1515 ! -find-limb.a
1616 ! find-none
@@ -19,7 +19,7 @@ Examples:
1919When trying to compute an unassigned variable, `a` we produce the type
2020of `'foo'`, `@t`.
2121
22− ~zod/try=> ~!(%foo a)
22+ ~zod:dojo> ~!(%foo a)
2323 ! %foo
2424 ! -find-limb.a
2525 ! find-none
docs/programming/advanced/catalog/tis-flow.mdnew file+31
@@ -0,0 +1,31 @@
1+---
2+sort: 8
3+---
4+
5+# `= tis` (flow)
6+
7+<list dataPreview="true" className="runes" linkToFragments="true"></list>
8+
9+<kids className="runes"></kids>
10+
11+## Twigs
12+
13+```
14+|%
15+++ taco $@(term (pair term twig)) :: optional face
16+++ twig ::
17+ $% {$new p/twig q/twig} :: =|
18+ {$fix p/(list (pair wing twig)) q/twig} :: =:
19+ {$var p/taco q/twig r/twig} :: =/
20+ {$rev p/taco q/twig r/twig} :: =;
21+ {$set p/wing q/twig r/twig} :: =.
22+ {$rap p/twig q/twig} :: =<
23+ {$nip p/twig q/twig} :: =-
24+ {$per p/twig q/twig} :: =>
25+ {$sip p/taco q/wing r/twig s/twig} :: =^
26+ {$pin p/twig q/twig} :: =+
27+ {$tow p/(list twig)} :: =~
28+ {$aka p/term q/twig r/twig} :: =*
29+ ==
30+--
31+```
docs/programming/advanced/catalog/tis-flow/bar-new.mdnew file
No changes to the content.
docs/programming/advanced/catalog/tis-flow/col-fix.mdnew file
No changes to the content.
docs/programming/advanced/catalog/tis-flow/dot-set.mdnew file
No changes to the content.
docs/programming/advanced/catalog/tis-flow/fas-var.mdnew file
No changes to the content.
docs/programming/advanced/catalog/tis-flow/gal-rap.mdnew file
No changes to the content.
docs/programming/advanced/catalog/tis-flow/gar-per.mdnew file
No changes to the content.
docs/programming/advanced/catalog/tis-flow/hep-nip.mdnew file
No changes to the content.
docs/programming/advanced/catalog/tis-flow/ket-sip.mdnew file
No changes to the content.
docs/programming/advanced/catalog/tis-flow/lus-pin.mdnew file
No changes to the content.
docs/programming/advanced/catalog/tis-flow/sem-rev.mdnew file
No changes to the content.
docs/programming/advanced/catalog/tis-flow/sig-tow.mdnew file
No changes to the content.
docs/programming/advanced/catalog/tis-flow/tar-aka.mdnew file
No changes to the content.
docs/programming/reference/runes/ts/tsbr.md → docs/programming/advanced/catalog/tis-flow/ts/tsbr.mdrenamed+2−2
@@ -33,13 +33,13 @@ Wide form
3333Examples
3434--------
3535
36− ~zod/try=> =|(a/@p a)
36+ ~zod:dojo> =|(a/@p a)
3737 ~zod
3838
3939Here we use `=|` to generate the default value of a `@p`, which is
4040`~zod`.
4141
42− /~zod/try=>
42+ /~zod:dojo>
4343 =| a=[b/@ c/@]
4444 [+(b.a) +(+(c.a))]
4545 [1 2]
docs/programming/reference/runes/ts/tscl.md → docs/programming/advanced/catalog/tis-flow/ts/tscl.mdrenamed+1−1
@@ -9,7 +9,7 @@ Regular form: *jogging*
99
1010Examples:
1111
12− ~zod/try=> =+ a=[b=1 c=2]
12+ ~zod:dojo> =+ a=[b=1 c=2]
1313 =: c.a 4
1414 b.a 3
1515 ==
docs/programming/reference/runes/ts/tsdt.md → docs/programming/advanced/catalog/tis-flow/ts/tsdt.mdrenamed+2−2
@@ -9,11 +9,11 @@ Regular form: *3-fixed*
99
1010Examples:
1111
12− ~zod/try=> =+ a=[b=1 c=2]
12+ ~zod:dojo> =+ a=[b=1 c=2]
1313 =. b.a 3
1414 a
1515 [b=3 c=2]
16− ~zod/try=> =+ a=[b=1 c=2]
16+ ~zod:dojo> =+ a=[b=1 c=2]
1717 =.(b.a 3 a)
1818 [b=3 c=2]
1919
docs/programming/reference/runes/ts/tsgl.md → docs/programming/advanced/catalog/tis-flow/ts/tsgl.mdrenamed+3−3
@@ -11,16 +11,16 @@ Regular form: *2-fixed*
1111Examples:
1212
1313
14− ~zod/try=> b:[a=1 b=2 c=3]
14+ ~zod:dojo> b:[a=1 b=2 c=3]
1515 2
16− ~zod/try=> [. .]:(add 2 4)
16+ ~zod:dojo> [. .]:(add 2 4)
1717 [6 6]
1818
1919In this simple example we first produce `b` from the tuple
2020`[a=1 b=2 c=3]` using the irregular form of `=<`. Then we use `.` to
2121produce our context from the computation `(add 2 4)` as a cell, `[6 6]`.
2222
23− ~zod/try=> =< lom
23+ ~zod:dojo> =< lom
2424 |%
2525 ++ lom (add 2 tak)
2626 ++ tak 4
docs/programming/reference/runes/ts/tsgr.md → docs/programming/advanced/catalog/tis-flow/ts/tsgr.mdrenamed+4−4
@@ -10,23 +10,23 @@ Regular form: *2-fixed*
1010
1111Examples:
1212
13− ~zod/try=> =>([a=1 b=2 c=3] b)
13+ ~zod:dojo> =>([a=1 b=2 c=3] b)
1414 2
15− ~zod/try=> =>((add 2 4) [. .])
15+ ~zod:dojo> =>((add 2 4) [. .])
1616 [6 6]
1717
1818In this simple example we first produce `b` from the tuple
1919`[a=1 b=2 c=3]` using the wide form of `=>`. Then we use `.` to produce
2020our context from the computation `(add 2 4)` as a cell, `[6 6]`.
2121
22− ~zod/try=>
22+ ~zod:dojo>
2323 =cor |= a=@
2424 =+ b=0
2525 => .(b (add 2 b))
2626 => .(a (add a b))
2727 [a b]
2828 new var %cor
29− /~zod/try=>
29+ /~zod:dojo>
3030 (cor 4)
3131 [6 2]
3232
docs/programming/reference/runes/ts/tshp.md → docs/programming/advanced/catalog/tis-flow/ts/tshp.mdrenamed+3−3
@@ -11,7 +11,7 @@ Regular form: *2-fixed*
1111
1212Examples:
1313
14− ~zod/try=> =- [%a a]
14+ ~zod:dojo> =- [%a a]
1515 [a=1]
1616 [%a 1]
1717
@@ -19,12 +19,12 @@ In this simple example we push `[a=1]` on to our subject, and produce
1919`[%a a]` which pulls the value of `a` from the subject producing
2020`[%a 1]`.
2121
22− ~zod/try=>
22+ ~zod:dojo>
2323 =cor |= [a/@ b/@]
2424 =- [[%a a] [%b b]]
2525 [a b]=[(add a 2) (add a b)]
2626 new var %cor
27− ~zod/try=> (cor 2 4)
27+ ~zod:dojo> (cor 2 4)
2828 [[%a 4] %b 6]
2929
3030Here we create a gate `cor` that takes two atoms `a` and `b`. We use
docs/programming/reference/runes/ts/tskt.md → docs/programming/advanced/catalog/tis-flow/ts/tskt.mdrenamed
The content is the same.
docs/programming/reference/runes/ts/tsls.md → docs/programming/advanced/catalog/tis-flow/ts/tsls.mdrenamed+3−3
@@ -7,7 +7,7 @@ Can use `$=` to put an optional face (variable name) on the value.
77
88Examples:
99
10− ~zod/try=>
10+ ~zod:dojo>
1111 =+ a=1
1212 a
1313 1
@@ -15,13 +15,13 @@ Examples:
1515The simplest case of a `=+`, we push `a=1` on to our subject, and
1616produce `a`.
1717
18− ~zod/try=>
18+ ~zod:dojo>
1919 =cor |= a=@
2020 =+ b=1
2121 =+ c=2
2222 :(add a b c)
2323 new var %cor
24− ~zod/try=>
24+ ~zod:dojo>
2525 (cor 0)
2626 3
2727
docs/programming/reference/runes/ts/tssg.md → docs/programming/advanced/catalog/tis-flow/ts/tssg.mdrenamed+2−2
@@ -10,7 +10,7 @@ Regularm form: *running*
1010
1111Examples:
1212
13− ~zod/try=> =~(1 +(.) +(.))
13+ ~zod:dojo> =~(1 +(.) +(.))
1414 3
15− ~zod/try=> =~([1 2] [. [3 4]] [. [5 6]] [. ~])
15+ ~zod:dojo> =~([1 2] [. [3 4]] [. [5 6]] [. ~])
1616 [[[[1 2] 3 4] 5 6] ~]
docs/programming/reference/runes/ts/tstr.md → docs/programming/advanced/catalog/tis-flow/ts/tstr.mdrenamed+2−2
@@ -7,12 +7,12 @@ out a long address multiple times, for example `p.s.+.variable`, which translate
77
88Examples:
99
10− ~zod/try=>
10+ ~zod:dojo>
1111 =+ a=1
1212 =* b a
1313 [a b]
1414 [1 1]
15− ~zod/try=>
15+ ~zod:dojo>
1616 =+ a=1
1717 =* b a
1818 =. a 2
docs/programming/advanced/catalog/wut-test.mdnew file+31
@@ -0,0 +1,31 @@
1+---
2+sort: 10
3+---
4+
5+# `? wut` (test)
6+
7+<list dataPreview="true" className="runes" linkToFragments="true"></list>
8+
9+<kids className="runes"></kids>
10+
11+## Twigs
12+
13+```
14+|%
15+++ twig
16+ $% {$or p/(list twig)} :: ?|
17+ {$case p/wing q/(list (pair twig twig))} :: ?-
18+ {$if p/twig q/twig r/twig} :: ?:
19+ {$lest p/twig q/twig r/twig} :: ?.
20+ {$ifcl p/wing q/twig r/twig} :: ?^
21+ {$deny p/twig q/twig} :: ?<
22+ {$sure p/twig q/twig} :: ?>
23+ {$deft p/wing q/twig r/(list (pair twig twig))} :: ?+
24+ {$and p/(list twig)} :: ?&
25+ {$ifat p/wing q/twig r/twig} :: ?@
26+ {$ifno p/wing q/twig r/twig} :: ?~
27+ {$fits p/twig q/wing} :: ?=
28+ {$not p/twig} :: ?!
29+ ==
30+--
31+```
docs/programming/reference/runes/wt/wtbr.md → docs/programming/advanced/catalog/wut-test/bar-or.mdrenamed+8−8
@@ -12,19 +12,19 @@ Irregular form:
1212
1313Examples:
1414
15− ~zod/try=> ?|(& |)
15+ ~zod:dojo> ?|(& |)
1616 %.y
17− ~zod/try=> |(& |)
17+ ~zod:dojo> |(& |)
1818 %.y
19− ~zod/try=> |(| |)
19+ ~zod:dojo> |(| |)
2020 %.n
21− ~zod/try=> (gth 2 1)
21+ ~zod:dojo> (gth 2 1)
2222 %.y
23− ~zod/try=> |((gth 2 1) |)
23+ ~zod:dojo> |((gth 2 1) |)
2424 %.y
25− ~zod/try=> |((gth 1 2) |)
25+ ~zod:dojo> |((gth 1 2) |)
2626 %.n
27− ~zod/try=> |((gth 2 1) &)
27+ ~zod:dojo> |((gth 2 1) &)
2828 %.y
29− ~zod/try=> |((gth 1 2) &)
29+ ~zod:dojo> |((gth 1 2) &)
3030 %.y
docs/programming/reference/runes/wt/wtcl.md → docs/programming/advanced/catalog/wut-test/col-if.mdrenamed+2−2
@@ -8,9 +8,9 @@ Regular form: *3-fixed*
88
99Examples:
1010
11− ~zod/try=> ?:((gth 1 2) 1 2)
11+ ~zod:dojo> ?:((gth 1 2) 1 2)
1212 2
13− ~zod/try=> ?:(?=(%a 'a') %yup %not-a)
13+ ~zod:dojo> ?:(?=(%a 'a') %yup %not-a)
1414 %yup
1515
1616Here we see two common cases of `?:` in the wide form, one uses an
docs/programming/reference/runes/wt/wtdt.md → docs/programming/advanced/catalog/wut-test/dot-lest.mdrenamed+2−2
@@ -8,9 +8,9 @@ Regular form: *3-fixed*
88
99Examples:
1010
11− ~zod/try=> ?.((gth 1 2) 1 2)
11+ ~zod:dojo> ?.((gth 1 2) 1 2)
1212 1
13− ~zod/try=> ?.(?=(%a 'a') %not-a %yup)
13+ ~zod:dojo> ?.(?=(%a 'a') %not-a %yup)
1414 %yup
1515 > ?. %.y
1616 'this false case is less heavy than the true case'
docs/programming/reference/runes/wt/wtgl.md → docs/programming/advanced/catalog/wut-test/gal-deny.mdrenamed+2−2
@@ -9,7 +9,7 @@ Regular form: *2-fixed*
99
1010Examples:
1111
12− ~zod/try=> ?<(=(0x1 0) %foo)
12+ ~zod:dojo> ?<(=(0x1 0) %foo)
1313 %foo
14− ~zod/try=> ?<(=(0x1 1) %foo)
14+ ~zod:dojo> ?<(=(0x1 1) %foo)
1515 ! exit
docs/programming/reference/runes/wt/wtgr.md → docs/programming/advanced/catalog/wut-test/gar-sure.mdrenamed+2−2
@@ -8,7 +8,7 @@ Regular form: *2-fixed*
88
99Examples:
1010
11− ~zod/try=> ?>(=(0x1 1) %foo)
11+ ~zod:dojo> ?>(=(0x1 1) %foo)
1212 %foo
13− ~zod/try=> ?>(=(0x1 0) %foo)
13+ ~zod:dojo> ?>(=(0x1 0) %foo)
1414 ! exit
docs/programming/reference/runes/wt/wthp.md → docs/programming/advanced/catalog/wut-test/hep-case.mdrenamed+5−5
@@ -12,17 +12,17 @@ Regular form: *1-fixed, followed by jogging*
1212
1313Examples:
1414
15− ~zod/try=>
15+ ~zod:dojo>
1616 =cor |= typ/$?(%a %b)
1717 ?- typ
1818 %a 1
1919 %b 2
2020 ==
2121 new var %cor
22− ~zod/try=>
22+ ~zod:dojo>
2323 (cor %a)
2424 1
25− ~zod/try=>
25+ ~zod:dojo>
2626 (cor %b)
2727 2
2828
@@ -31,7 +31,7 @@ defined type for which all of the cases are covered. We create a core,
3131`cor`, that takes an input `typ` which must be either `%a` or `%b` with
3232`$%`. Calling `cor` with valid arguments selects one of our cases.
3333
34− ~zod/try=>
34+ ~zod:dojo>
3535 ?- 'a'
3636 %a 0
3737 %b 1
@@ -39,7 +39,7 @@ defined type for which all of the cases are covered. We create a core,
3939 ! /~zod/try/~2014.11.2..16.56.40..fca2:<[1 1].[4 7]>
4040 ! -lost.@t
4141 ! mint-lost
42− ~zod/try=>
42+ ~zod:dojo>
4343 ?- (?(%a %b) 0)
4444 %a 'a'
4545 %b 'b'
docs/programming/reference/runes/wt/wtkt.md → docs/programming/advanced/catalog/wut-test/ket-ifcl.mdrenamed+6−6
@@ -9,13 +9,13 @@ Regular form: *3-fixed*
99
1010Examples:
1111
12− ~zod/try=> =(*@tas "")
12+ ~zod:dojo> =(*@tas "")
1313 %.y
14− ~zod/try=> ?^ ""
14+ ~zod:dojo> ?^ ""
1515 %full
1616 %empty
1717 %empty
18− ~zod/try=> ?^ "asd"
18+ ~zod:dojo> ?^ "asd"
1919 %full
2020 %empty
2121 %full
@@ -23,13 +23,13 @@ Examples:
2323Here we show that `*@tas`, the bunt of `@tas` is equivalent to the empty
2424`++tape` `""`, then use it in two `?^` cases.
2525
26− ~zod/try=> *(unit)
26+ ~zod:dojo> *(unit)
2727 ~
28− ~zod/try=> ?^ `(unit)`~
28+ ~zod:dojo> ?^ `(unit)`~
2929 %full
3030 %empty
3131 %empty
32− ~zod/try=> ?^ `(unit)`[~ u=20]
32+ ~zod:dojo> ?^ `(unit)`[~ u=20]
3333 %full
3434 %empty
3535 %full
docs/programming/reference/runes/wt/wtls.md → docs/programming/advanced/catalog/wut-test/lus-deft.mdrenamed+6−6
@@ -14,17 +14,17 @@ Examples:
1414 p.i.t.t.r q.i.t.t.r
1515 * q
1616 ==
17− ~zod/try=>
17+ ~zod:dojo>
1818 =cor |= typ/@ta
1919 ?+ typ 0
2020 %a 1
2121 %b 2
2222 ==
2323 new var %cor
24− ~zod/try=>
24+ ~zod:dojo>
2525 (cor 'a')
2626 1
27− ~zod/try=>
27+ ~zod:dojo>
2828 (cor 'c')
2929 0
3030
@@ -34,12 +34,12 @@ since `?+` has a default case. We create a core, `cor` that takes an
3434input `typ`, a `@ta`. Calling `cor` selects one of our cases when it is
3535covered, or the default.
3636
37− ~zod/try=>
37+ ~zod:dojo>
3838 ?+ 'a' 0
3939 %a 1
4040 ==
4141 1
42− ~zod/try=>
42+ ~zod:dojo>
4343 ?+ [0 'a'] 0
4444 %a 1
4545 ==
@@ -49,7 +49,7 @@ covered, or the default.
4949 ! ford: call ~hidper-sommur
5050 ! poking %poke-txt
5151 ! error in app %shell on ~zod at instance /shell/terminal
52− ~zod/try=>
52+ ~zod:dojo>
5353 ?+ [0 1] 0
5454 [0 %a] 1
5555 ==
docs/programming/reference/runes/wt/wtpm.md → docs/programming/advanced/catalog/wut-test/pam-and.mdrenamed+5−5
@@ -12,13 +12,13 @@ Irregular form:
1212
1313Examples:
1414
15− ~zod/try=> ?&(& &)
15+ ~zod:dojo> ?&(& &)
1616 %.y
17− ~zod/try=> &(& &)
17+ ~zod:dojo> &(& &)
1818 %.y
19− ~zod/try=> &(& |)
19+ ~zod:dojo> &(& |)
2020 %.n
21− ~zod/try=> &((gth 2 1) |)
21+ ~zod:dojo> &((gth 2 1) |)
2222 %.n
23− ~zod/try=> &((gth 2 1) &)
23+ ~zod:dojo> &((gth 2 1) &)
2424 %.y
docs/programming/reference/runes/wt/wtpt.md → docs/programming/advanced/catalog/wut-test/pat-ifat.mdrenamed+6−6
@@ -6,18 +6,18 @@ If-then-else statement that tests whether `p` is an atom, producing `q` if true
66
77Examples:
88
9− ~zod/try=> ?@(~ 1 2)
9+ ~zod:dojo> ?@(~ 1 2)
1010 ! mint-vain
1111 ! exit
12− ~zod/try=> ?@(%ha 1 2)
12+ ~zod:dojo> ?@(%ha 1 2)
1313 1
14− ~zod/try=> ?@("" 1 2)
14+ ~zod:dojo> ?@("" 1 2)
1515 1
16− ~zod/try=> ?@("a" 1 2)
16+ ~zod:dojo> ?@("a" 1 2)
1717 2
18− ~zod/try=> ?@([1 1] 1 2)
18+ ~zod:dojo> ?@([1 1] 1 2)
1919 ! mint-vain
2020 ! exit
21− ~zod/try=> ?@(`*`[1 1] 1 2)
21+ ~zod:dojo> ?@(`*`[1 1] 1 2)
2222 2
2323
docs/programming/reference/runes/wt/wtsg.md → docs/programming/advanced/catalog/wut-test/sig-ifno.mdrenamed+4−4
@@ -10,12 +10,12 @@ Regular form: *3-fixed*
1010
1111Examples:
1212
13− ~zod/try=> ?~('a' 1 2)
13+ ~zod:dojo> ?~('a' 1 2)
1414 2
15− ~zod/try=> ?~('' 1 2)
15+ ~zod:dojo> ?~('' 1 2)
1616 1
17− ~zod/try=> ?~(~zod 1 2)
17+ ~zod:dojo> ?~(~zod 1 2)
1818 1
19− ~zod/try=> ?~((sub 20 20) 1 2)
19+ ~zod:dojo> ?~((sub 20 20) 1 2)
2020 1
2121
docs/programming/reference/runes/wt/wtts.md → docs/programming/advanced/catalog/wut-test/tis-fits.mdrenamed+4−4
@@ -9,11 +9,11 @@ Regular form: *2-fixed*
99
1010Examples:
1111
12− ~zod/try=> ?=(@ 'a')
12+ ~zod:dojo> ?=(@ 'a')
1313 %.y
14− ~zod/try=> ?=(^ 'a')
14+ ~zod:dojo> ?=(^ 'a')
1515 %.n
16− ~zod/try=> ?=(%b 'a')
16+ ~zod:dojo> ?=(%b 'a')
1717 %.n
18− ~zod/try=> ?=(%a 'a')
18+ ~zod:dojo> ?=(%a 'a')
1919 %.y
docs/programming/reference/runes/wt/wtzp.md → docs/programming/advanced/catalog/wut-test/zap-not.mdrenamed+5−5
@@ -8,14 +8,14 @@ Regular form: *1-fixed*
88
99Examples:
1010
11− ~zod/try=> !&
11+ ~zod:dojo> !&
1212 %.n
13− ~zod/try=> !|
13+ ~zod:dojo> !|
1414 %.y
15− ~zod/try=> (gth 5 6)
15+ ~zod:dojo> (gth 5 6)
1616 %.n
17− ~zod/try=> !(gth 5 6)
17+ ~zod:dojo> !(gth 5 6)
1818 %.y
19− ~zod/try=> !1
19+ ~zod:dojo> !1
2020 ! type-fail
2121 ! exit
docs/programming/advanced/catalog/zap-wild.mdnew file+23
@@ -0,0 +1,23 @@
1+---
2+sort: 11
3+---
4+
5+# `! zap` (wild)
6+
7+<list dataPreview="true" className="runes" linkToFragments="true"></list>
8+
9+<kids className="runes"></kids>
10+
11+## Twigs
12+
13+```
14+|%
15+++ twig
16+ $% {$twig p/twig q/twig} :: !,
17+ {$wrap p/twig} :: !>
18+ {$spit p/twig q/twig} :: !;
19+ {$code p/twig} :: !=
20+ {$need p/$@(p/@ {p/@ q/@}) q/twig} :: !?
21+ {$fail $~} :: !!
22+ ==
23+--
docs/programming/reference/runes/zp/zpcm.md → docs/programming/advanced/catalog/zap-wild/com-twig.mdrenamed
The content is the same.
docs/programming/reference/runes/zp/zpgr.md → docs/programming/advanced/catalog/zap-wild/gar-wrap.mdrenamed+4−4
@@ -8,17 +8,17 @@ Regular form: *1-fixed*
88
99Examples:
1010
11− ~zod/try=> !>(1)
11+ ~zod:dojo> !>(1)
1212 [p=[%atom p=%ud] q=1]
13− ~zod/try=> !>(~zod)
13+ ~zod:dojo> !>(~zod)
1414 [p=[%atom p=%p] q=0]
1515
1616In these simple examples we see constant type information printed. `1`
1717and `~zod` are shown to be odored atoms of `%ud` and `%p` respectively.
1818
19− ~zod/try=> !>([1 2])
19+ ~zod:dojo> !>([1 2])
2020 [p=[%cell p=[%atom p=%ud] q=[%atom p=%ud]] q=[1 2]]
21− ~zod/try=> !>([|.(20)]:~)
21+ ~zod:dojo> !>([|.(20)]:~)
2222 [ p
2323 [ %core
2424 p=[%cube p=0 q=[%atom p=%n]]
docs/programming/reference/runes/zp/zpsm.md → docs/programming/advanced/catalog/zap-wild/sem-spit.mdrenamed+3−3
@@ -9,9 +9,9 @@ Regular form: *2-fixed*
99
1010Examples:
1111
12− ~zod/try=> !;(*type 1)
12+ ~zod:dojo> !;(*type 1)
1313 [[%atom p=%ud] 1]
14− ~zod/try=> !;(*type [1 2])
14+ ~zod:dojo> !;(*type [1 2])
1515 [[%cell p=[%atom p=%ud] q=[%atom p=%ud]] 1 2]
16− ~zod/try=> !;([%atom ''] ~doznec)
16+ ~zod:dojo> !;([%atom ''] ~doznec)
1717 [[%atom 'p'] ~doznec]
docs/programming/reference/runes/zp/zpts.md → docs/programming/advanced/catalog/zap-wild/tis-code.mdrenamed+10−10
@@ -8,23 +8,23 @@ Regular form: *1-fixed*
88
99Examples:
1010
11− ~zod/try=> !=(20)
11+ ~zod:dojo> !=(20)
1212 [1 20]
13− ~zod/try=> !=(~zod)
13+ ~zod:dojo> !=(~zod)
1414 [1 0]
15− ~zod/try=> !=((add 2 2))
15+ ~zod:dojo> !=((add 2 2))
1616 [8 [9 3.110.356 0 31] 9 2 [0 4] [7 [0 3] 1 2 2] 0 11]
17− ~zod/try=> !=(|=(a=@ [a a]))
17+ ~zod:dojo> !=(|=(a=@ [a a]))
1818 [8 [1 0] [1 [0 6] 0 6] 0 1]
19− ~zod/try=> !=(+(2))
19+ ~zod:dojo> !=(+(2))
2020 [4 1 2]
21− ~zod/try=> !=(.?(2))
21+ ~zod:dojo> !=(.?(2))
2222 [3 1 2]
23− ~zod/try=> !=(.*(~ 2))
23+ ~zod:dojo> !=(.*(~ 2))
2424 [2 [1 0] 1 2]
25− ~zod/try=> !=(2)
25+ ~zod:dojo> !=(2)
2626 [1 2]
27− ~zod/try=> !=(.)
27+ ~zod:dojo> !=(.)
2828 [0 1]
29− ~zod/try=> !=(!!)
29+ ~zod:dojo> !=(!!)
3030 [0 0]
docs/programming/reference/runes/zp/zpwt.md → docs/programming/advanced/catalog/zap-wild/wut-need.mdrenamed+3−3
@@ -8,9 +8,9 @@ Regular form: *2-fixed*
88
99Examples: XX help
1010
11− ~zod/try=> !?(264 (add 2 2))
11+ ~zod:dojo> !?(264 (add 2 2))
1212 4
13− ~zod/try=> !?(164 (add 2 2))
13+ ~zod:dojo> !?(164 (add 2 2))
1414 4
15− ~zod/try=> !?(163 (add 2 2))
15+ ~zod:dojo> !?(163 (add 2 2))
1616 ! exit
docs/programming/reference/runes/zp/zpzp.md → docs/programming/advanced/catalog/zap-wild/zap-fail.mdrenamed+5−5
@@ -10,14 +10,14 @@ Regularm form: doesnt even accept input as it causes an immediate crash. XX???
1010
1111Examples:
1212
13− ~zod/try=> !!
13+ ~zod:dojo> !!
1414 ! exit
15− ~zod/try=> =|(a=(unit) ?^(a !! %none))
15+ ~zod:dojo> =|(a=(unit) ?^(a !! %none))
1616 %none
17− ~zod/try=> :type; =|(a=(unit) ?^(a !! %none))
17+ ~zod:dojo> :type; =|(a=(unit) ?^(a !! %none))
1818 %none
1919 %none
20− ~zod/try=> ?+('a' !! %a 1, %b 2)
20+ ~zod:dojo> ?+('a' !! %a 1, %b 2)
2121 1
22− ~zod/try=> ?+('c' !! %a 1, %b 2)
22+ ~zod:dojo> ?+('c' !! %a 1, %b 2)
2323 ! exit
docs/programming/reference/library.md → docs/programming/advanced/library.mdrenamed
The content is the same.
docs/programming/reference/library/$.md → docs/programming/advanced/library/$.mdrenamed
The content is the same.
docs/programming/reference/library/1a.md → docs/programming/advanced/library/1a.mdrenamed
The content is the same.
docs/programming/reference/library/1b.md → docs/programming/advanced/library/1b.mdrenamed
The content is the same.
docs/programming/reference/library/1c.md → docs/programming/advanced/library/1c.mdrenamed
The content is the same.
docs/programming/reference/library/2a.md → docs/programming/advanced/library/2a.mdrenamed
The content is the same.
docs/programming/reference/library/2b.md → docs/programming/advanced/library/2b.mdrenamed
The content is the same.
docs/programming/reference/library/2c.md → docs/programming/advanced/library/2c.mdrenamed
The content is the same.
docs/programming/reference/library/2d.md → docs/programming/advanced/library/2d.mdrenamed
The content is the same.
docs/programming/reference/library/2e.md → docs/programming/advanced/library/2e.mdrenamed
The content is the same.
docs/programming/reference/library/2f.md → docs/programming/advanced/library/2f.mdrenamed
The content is the same.
docs/programming/reference/library/2g.md → docs/programming/advanced/library/2g.mdrenamed
The content is the same.
docs/programming/reference/library/2h.md → docs/programming/advanced/library/2h.mdrenamed
The content is the same.
docs/programming/reference/library/2i.md → docs/programming/advanced/library/2i.mdrenamed
The content is the same.
docs/programming/reference/library/2j.md → docs/programming/advanced/library/2j.mdrenamed
The content is the same.
docs/programming/reference/library/2k.md → docs/programming/advanced/library/2k.mdrenamed
The content is the same.
docs/programming/reference/library/2l.md → docs/programming/advanced/library/2l.mdrenamed
The content is the same.
docs/programming/reference/library/2m.md → docs/programming/advanced/library/2m.mdrenamed
The content is the same.
docs/programming/reference/library/2n.md → docs/programming/advanced/library/2n.mdrenamed
The content is the same.
docs/programming/reference/library/2o.md → docs/programming/advanced/library/2o.mdrenamed
The content is the same.
docs/programming/reference/library/2p.md → docs/programming/advanced/library/2p.mdrenamed
The content is the same.
docs/programming/reference/library/2q.md → docs/programming/advanced/library/2q.mdrenamed
The content is the same.
docs/programming/reference/library/3a.md → docs/programming/advanced/library/3a.mdrenamed
The content is the same.
docs/programming/reference/library/3b.md → docs/programming/advanced/library/3b.mdrenamed
The content is the same.
docs/programming/reference/library/3c.md → docs/programming/advanced/library/3c.mdrenamed
The content is the same.
docs/programming/reference/library/3d.md → docs/programming/advanced/library/3d.mdrenamed
The content is the same.
docs/programming/reference/library/3e.md → docs/programming/advanced/library/3e.mdrenamed
The content is the same.
docs/programming/reference/library/3f.md → docs/programming/advanced/library/3f.mdrenamed
The content is the same.
docs/programming/reference/library/3g.md → docs/programming/advanced/library/3g.mdrenamed
The content is the same.
docs/programming/reference/library/4a.md → docs/programming/advanced/library/4a.mdrenamed
The content is the same.
docs/programming/reference/library/4b.md → docs/programming/advanced/library/4b.mdrenamed
The content is the same.
docs/programming/reference/library/4c.md → docs/programming/advanced/library/4c.mdrenamed
The content is the same.
docs/programming/reference/library/4d.md → docs/programming/advanced/library/4d.mdrenamed
The content is the same.
docs/programming/reference/library/4e.md → docs/programming/advanced/library/4e.mdrenamed
The content is the same.
docs/programming/reference/library/4f.md → docs/programming/advanced/library/4f.mdrenamed
The content is the same.
docs/programming/reference/library/4g.md → docs/programming/advanced/library/4g.mdrenamed
The content is the same.
docs/programming/reference/library/4h.md → docs/programming/advanced/library/4h.mdrenamed
The content is the same.
docs/programming/reference/library/4i.md → docs/programming/advanced/library/4i.mdrenamed
The content is the same.
docs/programming/reference/library/4j.md → docs/programming/advanced/library/4j.mdrenamed
The content is the same.
docs/programming/reference/library/4k.md → docs/programming/advanced/library/4k.mdrenamed
The content is the same.
docs/programming/reference/library/4l.md → docs/programming/advanced/library/4l.mdrenamed
The content is the same.
docs/programming/reference/library/4m.md → docs/programming/advanced/library/4m.mdrenamed
The content is the same.
docs/programming/reference/library/4n.md → docs/programming/advanced/library/4n.mdrenamed
The content is the same.
docs/programming/reference/library/4o.md → docs/programming/advanced/library/4o.mdrenamed
The content is the same.
docs/programming/reference/library/5a.md → docs/programming/advanced/library/5a.mdrenamed
The content is the same.
docs/programming/reference/library/5b.md → docs/programming/advanced/library/5b.mdrenamed
The content is the same.
docs/programming/reference/library/5c.md → docs/programming/advanced/library/5c.mdrenamed
The content is the same.
docs/programming/reference/library/5d.md → docs/programming/advanced/library/5d.mdrenamed
The content is the same.
docs/programming/reference/library/5e.md → docs/programming/advanced/library/5e.mdrenamed
The content is the same.
docs/programming/reference/library/5f.md → docs/programming/advanced/library/5f.mdrenamed
The content is the same.
docs/programming/advanced/library/5g.mdnew file
No changes to the content.
docs/programming/reference/library/src/1a/gate/add.md → docs/programming/advanced/library/src/1a/gate/add.mdrenamed
The content is the same.
docs/programming/reference/library/src/1a/gate/dec.md → docs/programming/advanced/library/src/1a/gate/dec.mdrenamed
The content is the same.
docs/programming/reference/library/src/1a/gate/div.md → docs/programming/advanced/library/src/1a/gate/div.mdrenamed
The content is the same.
docs/programming/reference/library/src/1a/gate/gte.md → docs/programming/advanced/library/src/1a/gate/gte.mdrenamed
The content is the same.
docs/programming/reference/library/src/1a/gate/gth.md → docs/programming/advanced/library/src/1a/gate/gth.mdrenamed
The content is the same.
docs/programming/reference/library/src/1a/gate/lte.md → docs/programming/advanced/library/src/1a/gate/lte.mdrenamed
The content is the same.
docs/programming/reference/library/src/1a/gate/lth.md → docs/programming/advanced/library/src/1a/gate/lth.mdrenamed
The content is the same.
docs/programming/reference/library/src/1a/gate/max.md → docs/programming/advanced/library/src/1a/gate/max.mdrenamed
The content is the same.
docs/programming/reference/library/src/1a/gate/min.md → docs/programming/advanced/library/src/1a/gate/min.mdrenamed
The content is the same.
docs/programming/reference/library/src/1a/gate/mod.md → docs/programming/advanced/library/src/1a/gate/mod.mdrenamed
The content is the same.
docs/programming/reference/library/src/1a/gate/mul.md → docs/programming/advanced/library/src/1a/gate/mul.mdrenamed
The content is the same.
docs/programming/reference/library/src/1a/gate/sub.md → docs/programming/advanced/library/src/1a/gate/sub.mdrenamed
The content is the same.
docs/programming/reference/library/src/1a/title.md → docs/programming/advanced/library/src/1a/title.mdrenamed
The content is the same.
docs/programming/reference/library/src/1b/gate/cap.md → docs/programming/advanced/library/src/1b/gate/cap.mdrenamed
The content is the same.
docs/programming/reference/library/src/1b/gate/mas.md → docs/programming/advanced/library/src/1b/gate/mas.mdrenamed
The content is the same.
docs/programming/reference/library/src/1b/gate/peg.md → docs/programming/advanced/library/src/1b/gate/peg.mdrenamed
The content is the same.
docs/programming/reference/library/src/1b/title.md → docs/programming/advanced/library/src/1b/title.mdrenamed
The content is the same.
docs/programming/reference/library/src/1c/mold/bloq.md → docs/programming/advanced/library/src/1c/mold/bloq.mdrenamed
The content is the same.
docs/programming/reference/library/src/1c/mold/each.md → docs/programming/advanced/library/src/1c/mold/each.mdrenamed
The content is the same.
docs/programming/reference/library/src/1c/mold/gate.md → docs/programming/advanced/library/src/1c/mold/gate.mdrenamed
The content is the same.
docs/programming/reference/library/src/1c/mold/list.md → docs/programming/advanced/library/src/1c/mold/list.mdrenamed
The content is the same.
docs/programming/reference/library/src/1c/mold/lone.md → docs/programming/advanced/library/src/1c/mold/lone.mdrenamed
The content is the same.
docs/programming/reference/library/src/1c/mold/pair.md → docs/programming/advanced/library/src/1c/mold/pair.mdrenamed
The content is the same.
docs/programming/reference/library/src/1c/mold/pole.md → docs/programming/advanced/library/src/1c/mold/pole.mdrenamed
The content is the same.
docs/programming/reference/library/src/1c/mold/qual.md → docs/programming/advanced/library/src/1c/mold/qual.mdrenamed
The content is the same.
docs/programming/reference/library/src/1c/mold/trap.md → docs/programming/advanced/library/src/1c/mold/trap.mdrenamed
The content is the same.
docs/programming/reference/library/src/1c/mold/tree.md → docs/programming/advanced/library/src/1c/mold/tree.mdrenamed
The content is the same.
docs/programming/reference/library/src/1c/mold/trel.md → docs/programming/advanced/library/src/1c/mold/trel.mdrenamed
The content is the same.
docs/programming/reference/library/src/1c/mold/unit.md → docs/programming/advanced/library/src/1c/mold/unit.mdrenamed
The content is the same.
docs/programming/reference/library/src/1c/title.md → docs/programming/advanced/library/src/1c/title.mdrenamed
The content is the same.
docs/programming/reference/library/src/2a/gate/biff.md → docs/programming/advanced/library/src/2a/gate/biff.mdrenamed
The content is the same.
docs/programming/reference/library/src/2a/gate/bind.md → docs/programming/advanced/library/src/2a/gate/bind.mdrenamed
The content is the same.
docs/programming/reference/library/src/2a/gate/bond.md → docs/programming/advanced/library/src/2a/gate/bond.mdrenamed
The content is the same.
docs/programming/reference/library/src/2a/gate/both.md → docs/programming/advanced/library/src/2a/gate/both.mdrenamed
The content is the same.
docs/programming/reference/library/src/2a/gate/clap.md → docs/programming/advanced/library/src/2a/gate/clap.mdrenamed
The content is the same.
docs/programming/reference/library/src/2a/gate/drop.md → docs/programming/advanced/library/src/2a/gate/drop.mdrenamed
The content is the same.
docs/programming/reference/library/src/2a/gate/fall.md → docs/programming/advanced/library/src/2a/gate/fall.mdrenamed
The content is the same.
docs/programming/reference/library/src/2a/gate/lift.md → docs/programming/advanced/library/src/2a/gate/lift.mdrenamed
The content is the same.
docs/programming/reference/library/src/2a/gate/mate.md → docs/programming/advanced/library/src/2a/gate/mate.mdrenamed
The content is the same.
docs/programming/reference/library/src/2a/gate/need.md → docs/programming/advanced/library/src/2a/gate/need.mdrenamed
The content is the same.
docs/programming/reference/library/src/2a/gate/some.md → docs/programming/advanced/library/src/2a/gate/some.mdrenamed
The content is the same.
docs/programming/reference/library/src/2a/title.md → docs/programming/advanced/library/src/2a/title.mdrenamed
The content is the same.
docs/programming/reference/library/src/2b/gate/flop.md → docs/programming/advanced/library/src/2b/gate/flop.mdrenamed
The content is the same.
docs/programming/reference/library/src/2b/gate/homo.md → docs/programming/advanced/library/src/2b/gate/homo.mdrenamed
The content is the same.
docs/programming/reference/library/src/2b/gate/lent.md → docs/programming/advanced/library/src/2b/gate/lent.mdrenamed
The content is the same.
docs/programming/reference/library/src/2b/gate/levy.md → docs/programming/advanced/library/src/2b/gate/levy.mdrenamed
The content is the same.
docs/programming/reference/library/src/2b/gate/lien.md → docs/programming/advanced/library/src/2b/gate/lien.mdrenamed
The content is the same.
docs/programming/reference/library/src/2b/gate/limo.md → docs/programming/advanced/library/src/2b/gate/limo.mdrenamed
The content is the same.
docs/programming/reference/library/src/2b/gate/murn.md → docs/programming/advanced/library/src/2b/gate/murn.mdrenamed
The content is the same.
docs/programming/reference/library/src/2b/gate/reap.md → docs/programming/advanced/library/src/2b/gate/reap.mdrenamed
The content is the same.
docs/programming/reference/library/src/2b/gate/reel.md → docs/programming/advanced/library/src/2b/gate/reel.mdrenamed
The content is the same.
docs/programming/reference/library/src/2b/gate/roll.md → docs/programming/advanced/library/src/2b/gate/roll.mdrenamed
The content is the same.
docs/programming/reference/library/src/2b/gate/scag.md → docs/programming/advanced/library/src/2b/gate/scag.mdrenamed
The content is the same.
docs/programming/reference/library/src/2b/gate/skid.md → docs/programming/advanced/library/src/2b/gate/skid.mdrenamed
The content is the same.
docs/programming/reference/library/src/2b/gate/skim.md → docs/programming/advanced/library/src/2b/gate/skim.mdrenamed
The content is the same.
docs/programming/reference/library/src/2b/gate/skip.md → docs/programming/advanced/library/src/2b/gate/skip.mdrenamed
The content is the same.
docs/programming/reference/library/src/2b/gate/slag.md → docs/programming/advanced/library/src/2b/gate/slag.mdrenamed
The content is the same.
docs/programming/reference/library/src/2b/gate/snag.md → docs/programming/advanced/library/src/2b/gate/snag.mdrenamed
The content is the same.
docs/programming/reference/library/src/2b/gate/sort.md → docs/programming/advanced/library/src/2b/gate/sort.mdrenamed
The content is the same.
docs/programming/reference/library/src/2b/gate/swag.md → docs/programming/advanced/library/src/2b/gate/swag.mdrenamed
The content is the same.
docs/programming/reference/library/src/2b/gate/turn.md → docs/programming/advanced/library/src/2b/gate/turn.mdrenamed
The content is the same.
docs/programming/reference/library/src/2b/gate/weld.md → docs/programming/advanced/library/src/2b/gate/weld.mdrenamed
The content is the same.
docs/programming/reference/library/src/2b/gate/welp.md → docs/programming/advanced/library/src/2b/gate/welp.mdrenamed
The content is the same.
docs/programming/reference/library/src/2b/gate/zing.md → docs/programming/advanced/library/src/2b/gate/zing.mdrenamed
The content is the same.
docs/programming/reference/library/src/2b/title.md → docs/programming/advanced/library/src/2b/title.mdrenamed
The content is the same.
docs/programming/reference/library/src/2c/gate/bex.md → docs/programming/advanced/library/src/2c/gate/bex.mdrenamed
The content is the same.
docs/programming/reference/library/src/2c/gate/can.md → docs/programming/advanced/library/src/2c/gate/can.mdrenamed
The content is the same.
docs/programming/reference/library/src/2c/gate/cat.md → docs/programming/advanced/library/src/2c/gate/cat.mdrenamed
The content is the same.
docs/programming/reference/library/src/2c/gate/cut.md → docs/programming/advanced/library/src/2c/gate/cut.mdrenamed
The content is the same.
docs/programming/reference/library/src/2c/gate/end.md → docs/programming/advanced/library/src/2c/gate/end.mdrenamed
The content is the same.
docs/programming/reference/library/src/2c/gate/fil.md → docs/programming/advanced/library/src/2c/gate/fil.mdrenamed
The content is the same.
docs/programming/reference/library/src/2c/gate/lsh.md → docs/programming/advanced/library/src/2c/gate/lsh.mdrenamed
The content is the same.
docs/programming/reference/library/src/2c/gate/met.md → docs/programming/advanced/library/src/2c/gate/met.mdrenamed
The content is the same.
docs/programming/reference/library/src/2c/gate/rap.md → docs/programming/advanced/library/src/2c/gate/rap.mdrenamed
The content is the same.
docs/programming/reference/library/src/2c/gate/rep.md → docs/programming/advanced/library/src/2c/gate/rep.mdrenamed
The content is the same.
docs/programming/reference/library/src/2c/gate/rip.md → docs/programming/advanced/library/src/2c/gate/rip.mdrenamed
The content is the same.
docs/programming/reference/library/src/2c/gate/rsh.md → docs/programming/advanced/library/src/2c/gate/rsh.mdrenamed
The content is the same.
docs/programming/reference/library/src/2c/gate/swp.md → docs/programming/advanced/library/src/2c/gate/swp.mdrenamed
The content is the same.
docs/programming/reference/library/src/2c/gate/xeb.md → docs/programming/advanced/library/src/2c/gate/xeb.mdrenamed
The content is the same.
docs/programming/reference/library/src/2c/title.md → docs/programming/advanced/library/src/2c/title.mdrenamed
The content is the same.
docs/programming/reference/library/src/2d/gate/con.md → docs/programming/advanced/library/src/2d/gate/con.mdrenamed
The content is the same.
docs/programming/reference/library/src/2d/gate/dis.md → docs/programming/advanced/library/src/2d/gate/dis.mdrenamed
The content is the same.
docs/programming/reference/library/src/2d/gate/mix.md → docs/programming/advanced/library/src/2d/gate/mix.mdrenamed
The content is the same.
docs/programming/reference/library/src/2d/gate/not.md → docs/programming/advanced/library/src/2d/gate/not.mdrenamed
The content is the same.
docs/programming/reference/library/src/2d/title.md → docs/programming/advanced/library/src/2d/title.mdrenamed
The content is the same.
docs/programming/reference/library/src/2e/gate/fnv.md → docs/programming/advanced/library/src/2e/gate/fnv.mdrenamed
The content is the same.
docs/programming/reference/library/src/2e/gate/mug.md → docs/programming/advanced/library/src/2e/gate/mug.mdrenamed
The content is the same.
docs/programming/reference/library/src/2e/gate/mum.md → docs/programming/advanced/library/src/2e/gate/mum.mdrenamed
The content is the same.
docs/programming/reference/library/src/2e/title.md → docs/programming/advanced/library/src/2e/title.mdrenamed
The content is the same.
docs/programming/reference/library/src/2f/gate/aor.md → docs/programming/advanced/library/src/2f/gate/aor.mdrenamed
The content is the same.
docs/programming/reference/library/src/2f/gate/dor.md → docs/programming/advanced/library/src/2f/gate/dor.mdrenamed
The content is the same.
docs/programming/reference/library/src/2f/gate/gor.md → docs/programming/advanced/library/src/2f/gate/gor.mdrenamed
The content is the same.
docs/programming/reference/library/src/2f/gate/hor.md → docs/programming/advanced/library/src/2f/gate/hor.mdrenamed
The content is the same.
docs/programming/reference/library/src/2f/gate/vor.md → docs/programming/advanced/library/src/2f/gate/vor.mdrenamed
The content is the same.
docs/programming/reference/library/src/2f/title.md → docs/programming/advanced/library/src/2f/title.mdrenamed
The content is the same.
docs/programming/reference/library/src/2g/title.md → docs/programming/advanced/library/src/2g/title.mdrenamed
The content is the same.
docs/programming/reference/library/src/2h/core/in.md → docs/programming/advanced/library/src/2h/core/in.mdrenamed
The content is the same.
docs/programming/reference/library/src/2h/title.md → docs/programming/advanced/library/src/2h/title.mdrenamed
The content is the same.
docs/programming/reference/library/src/2i/core/by.md → docs/programming/advanced/library/src/2i/core/by.mdrenamed
The content is the same.
docs/programming/reference/library/src/2i/title.md → docs/programming/advanced/library/src/2i/title.mdrenamed
The content is the same.
docs/programming/reference/library/src/2j/core/ja.md → docs/programming/advanced/library/src/2j/core/ja.mdrenamed
The content is the same.
docs/programming/reference/library/src/2j/core/ju.md → docs/programming/advanced/library/src/2j/core/ju.mdrenamed
The content is the same.
docs/programming/reference/library/src/2j/title.md → docs/programming/advanced/library/src/2j/title.mdrenamed
The content is the same.
docs/programming/reference/library/src/2k/core/to.md → docs/programming/advanced/library/src/2k/core/to.mdrenamed
The content is the same.
docs/programming/reference/library/src/2k/title.md → docs/programming/advanced/library/src/2k/title.mdrenamed
The content is the same.
docs/programming/reference/library/src/2l/title.md → docs/programming/advanced/library/src/2l/title.mdrenamed
The content is the same.
docs/programming/reference/library/src/2m/title.md → docs/programming/advanced/library/src/2m/title.mdrenamed
The content is the same.
docs/programming/reference/library/src/2n/gate/cork.md → docs/programming/advanced/library/src/2n/gate/cork.mdrenamed
The content is the same.
docs/programming/reference/library/src/2n/gate/corl.md → docs/programming/advanced/library/src/2n/gate/corl.mdrenamed
The content is the same.
docs/programming/reference/library/src/2n/gate/curr.md → docs/programming/advanced/library/src/2n/gate/curr.mdrenamed
The content is the same.
docs/programming/reference/library/src/2n/gate/cury.md → docs/programming/advanced/library/src/2n/gate/cury.mdrenamed
The content is the same.
docs/programming/reference/library/src/2n/gate/hard.md → docs/programming/advanced/library/src/2n/gate/hard.mdrenamed
The content is the same.
docs/programming/reference/library/src/2n/gate/soft.md → docs/programming/advanced/library/src/2n/gate/soft.mdrenamed
The content is the same.
docs/programming/reference/library/src/2n/title.md → docs/programming/advanced/library/src/2n/title.mdrenamed
The content is the same.
docs/programming/reference/library/src/2o/mold/jar.md → docs/programming/advanced/library/src/2o/mold/jar.mdrenamed
The content is the same.
docs/programming/reference/library/src/2o/mold/jug.md → docs/programming/advanced/library/src/2o/mold/jug.mdrenamed
The content is the same.
docs/programming/reference/library/src/2o/mold/map.md → docs/programming/advanced/library/src/2o/mold/map.mdrenamed
The content is the same.
docs/programming/reference/library/src/2o/mold/qeu.md → docs/programming/advanced/library/src/2o/mold/qeu.mdrenamed
The content is the same.
docs/programming/reference/library/src/2o/mold/set.md → docs/programming/advanced/library/src/2o/mold/set.mdrenamed
The content is the same.
docs/programming/reference/library/src/2o/title.md → docs/programming/advanced/library/src/2o/title.mdrenamed
The content is the same.
docs/programming/reference/library/src/2p/gate/cue.md → docs/programming/advanced/library/src/2p/gate/cue.mdrenamed
The content is the same.
docs/programming/reference/library/src/2p/gate/jam.md → docs/programming/advanced/library/src/2p/gate/jam.mdrenamed
The content is the same.
docs/programming/reference/library/src/2p/gate/mat.md → docs/programming/advanced/library/src/2p/gate/mat.mdrenamed
The content is the same.
docs/programming/reference/library/src/2p/gate/rub.md → docs/programming/advanced/library/src/2p/gate/rub.mdrenamed
The content is the same.
docs/programming/reference/library/src/2p/title.md → docs/programming/advanced/library/src/2p/title.mdrenamed
The content is the same.
docs/programming/reference/library/src/2q/mold/char.md → docs/programming/advanced/library/src/2q/mold/char.mdrenamed
The content is the same.
docs/programming/reference/library/src/2q/mold/cord.md → docs/programming/advanced/library/src/2q/mold/cord.mdrenamed
The content is the same.
docs/programming/reference/library/src/2q/mold/date.md → docs/programming/advanced/library/src/2q/mold/date.mdrenamed
The content is the same.
docs/programming/reference/library/src/2q/mold/tang.md → docs/programming/advanced/library/src/2q/mold/tang.mdrenamed
The content is the same.
docs/programming/reference/library/src/2q/mold/tank.md → docs/programming/advanced/library/src/2q/mold/tank.mdrenamed
The content is the same.
docs/programming/reference/library/src/2q/mold/tape.md → docs/programming/advanced/library/src/2q/mold/tape.mdrenamed
The content is the same.
docs/programming/reference/library/src/2q/mold/tarp.md → docs/programming/advanced/library/src/2q/mold/tarp.mdrenamed
The content is the same.
docs/programming/reference/library/src/2q/mold/term.md → docs/programming/advanced/library/src/2q/mold/term.mdrenamed
The content is the same.
docs/programming/reference/library/src/2q/mold/wain.md → docs/programming/advanced/library/src/2q/mold/wain.mdrenamed
The content is the same.
docs/programming/reference/library/src/2q/mold/wall.md → docs/programming/advanced/library/src/2q/mold/wall.mdrenamed
The content is the same.
docs/programming/reference/library/src/2q/title.md → docs/programming/advanced/library/src/2q/title.mdrenamed
The content is the same.
docs/programming/reference/library/src/3a/core/fe.md → docs/programming/advanced/library/src/3a/core/fe.mdrenamed
The content is the same.
docs/programming/reference/library/src/3a/core/si.md → docs/programming/advanced/library/src/3a/core/si.mdrenamed
The content is the same.
docs/programming/reference/library/src/3a/gate/egcd.md → docs/programming/advanced/library/src/3a/gate/egcd.mdrenamed
The content is the same.
docs/programming/reference/library/src/3a/title.md → docs/programming/advanced/library/src/3a/title.mdrenamed
The content is the same.
docs/programming/reference/library/src/3b/title.md → docs/programming/advanced/library/src/3b/title.mdrenamed
The content is the same.
docs/programming/reference/library/src/3c/core/yo.md → docs/programming/advanced/library/src/3c/core/yo.mdrenamed
The content is the same.
docs/programming/reference/library/src/3c/gate/yall.md → docs/programming/advanced/library/src/3c/gate/yall.mdrenamed
The content is the same.
docs/programming/reference/library/src/3c/gate/yawn.md → docs/programming/advanced/library/src/3c/gate/yawn.mdrenamed
The content is the same.
docs/programming/reference/library/src/3c/gate/year.md → docs/programming/advanced/library/src/3c/gate/year.mdrenamed
The content is the same.
docs/programming/reference/library/src/3c/gate/yell.md → docs/programming/advanced/library/src/3c/gate/yell.mdrenamed
The content is the same.
docs/programming/reference/library/src/3c/gate/yelp.md → docs/programming/advanced/library/src/3c/gate/yelp.mdrenamed
The content is the same.
docs/programming/reference/library/src/3c/gate/yore.md → docs/programming/advanced/library/src/3c/gate/yore.mdrenamed
The content is the same.
docs/programming/reference/library/src/3c/gate/yule.md → docs/programming/advanced/library/src/3c/gate/yule.mdrenamed
The content is the same.
docs/programming/reference/library/src/3c/title.md → docs/programming/advanced/library/src/3c/title.mdrenamed
The content is the same.
docs/programming/reference/library/src/3d/core/og.md → docs/programming/advanced/library/src/3d/core/og.mdrenamed
The content is the same.
docs/programming/reference/library/src/3d/gate/shad.md → docs/programming/advanced/library/src/3d/gate/shad.mdrenamed
The content is the same.
docs/programming/reference/library/src/3d/gate/shaf.md → docs/programming/advanced/library/src/3d/gate/shaf.mdrenamed
The content is the same.
docs/programming/reference/library/src/3d/gate/shak.md → docs/programming/advanced/library/src/3d/gate/shak.mdrenamed
The content is the same.
docs/programming/reference/library/src/3d/gate/shal.md → docs/programming/advanced/library/src/3d/gate/shal.mdrenamed
The content is the same.
docs/programming/reference/library/src/3d/gate/sham.md → docs/programming/advanced/library/src/3d/gate/sham.mdrenamed
The content is the same.
docs/programming/reference/library/src/3d/gate/shan.md → docs/programming/advanced/library/src/3d/gate/shan.mdrenamed
The content is the same.
docs/programming/reference/library/src/3d/gate/shas.md → docs/programming/advanced/library/src/3d/gate/shas.mdrenamed
The content is the same.
docs/programming/reference/library/src/3d/gate/shaw.md → docs/programming/advanced/library/src/3d/gate/shaw.mdrenamed
The content is the same.
docs/programming/reference/library/src/3d/gate/shax.md → docs/programming/advanced/library/src/3d/gate/shax.mdrenamed
The content is the same.
docs/programming/reference/library/src/3d/gate/shaz.md → docs/programming/advanced/library/src/3d/gate/shaz.mdrenamed
The content is the same.
docs/programming/reference/library/src/3d/title.md → docs/programming/advanced/library/src/3d/title.mdrenamed
The content is the same.
docs/programming/reference/library/src/3e/core/aesc.md → docs/programming/advanced/library/src/3e/core/aesc.mdrenamed
The content is the same.
docs/programming/reference/library/src/3e/title.md → docs/programming/advanced/library/src/3e/title.mdrenamed
The content is the same.
docs/programming/reference/library/src/3f/core/ob.md → docs/programming/advanced/library/src/3f/core/ob.mdrenamed
The content is the same.
docs/programming/reference/library/src/3f/core/un.md → docs/programming/advanced/library/src/3f/core/un.mdrenamed
The content is the same.
docs/programming/reference/library/src/3f/title.md → docs/programming/advanced/library/src/3f/title.mdrenamed
The content is the same.
docs/programming/reference/library/src/3g/mold/coin.md → docs/programming/advanced/library/src/3g/mold/coin.mdrenamed
The content is the same.
docs/programming/reference/library/src/3g/mold/dime.md → docs/programming/advanced/library/src/3g/mold/dime.mdrenamed
The content is the same.
docs/programming/reference/library/src/3g/mold/edge.md → docs/programming/advanced/library/src/3g/mold/edge.mdrenamed
The content is the same.
docs/programming/reference/library/src/3g/mold/hair.md → docs/programming/advanced/library/src/3g/mold/hair.mdrenamed
The content is the same.
docs/programming/reference/library/src/3g/mold/like.md → docs/programming/advanced/library/src/3g/mold/like.mdrenamed
The content is the same.
docs/programming/reference/library/src/3g/mold/nail.md → docs/programming/advanced/library/src/3g/mold/nail.mdrenamed
The content is the same.
docs/programming/reference/library/src/3g/mold/path.md → docs/programming/advanced/library/src/3g/mold/path.mdrenamed
The content is the same.
docs/programming/reference/library/src/3g/mold/pint.md → docs/programming/advanced/library/src/3g/mold/pint.mdrenamed
The content is the same.
docs/programming/reference/library/src/3g/mold/rule.md → docs/programming/advanced/library/src/3g/mold/rule.mdrenamed
The content is the same.
docs/programming/reference/library/src/3g/mold/spot.md → docs/programming/advanced/library/src/3g/mold/spot.mdrenamed
The content is the same.
docs/programming/reference/library/src/3g/mold/toon.md → docs/programming/advanced/library/src/3g/mold/toon.mdrenamed
The content is the same.
docs/programming/reference/library/src/3g/mold/wonk.md → docs/programming/advanced/library/src/3g/mold/wonk.mdrenamed
The content is the same.
docs/programming/reference/library/src/3g/title.md → docs/programming/advanced/library/src/3g/title.mdrenamed
The content is the same.
docs/programming/reference/library/src/4a/core/po.md → docs/programming/advanced/library/src/4a/core/po.mdrenamed
The content is the same.
docs/programming/reference/library/src/4a/title.md → docs/programming/advanced/library/src/4a/title.mdrenamed
The content is the same.
docs/programming/reference/library/src/4b/core/at.md → docs/programming/advanced/library/src/4b/core/at.mdrenamed
The content is the same.
docs/programming/reference/library/src/4b/gate/cass.md → docs/programming/advanced/library/src/4b/gate/cass.mdrenamed
The content is the same.
docs/programming/reference/library/src/4b/gate/crip.md → docs/programming/advanced/library/src/4b/gate/crip.mdrenamed
The content is the same.
docs/programming/reference/library/src/4b/gate/cuss.md → docs/programming/advanced/library/src/4b/gate/cuss.mdrenamed
The content is the same.
docs/programming/reference/library/src/4b/gate/mesc.md → docs/programming/advanced/library/src/4b/gate/mesc.mdrenamed
The content is the same.
docs/programming/reference/library/src/4b/gate/runt.md → docs/programming/advanced/library/src/4b/gate/runt.mdrenamed
The content is the same.
docs/programming/reference/library/src/4b/gate/sand.md → docs/programming/advanced/library/src/4b/gate/sand.mdrenamed
The content is the same.
docs/programming/reference/library/src/4b/gate/sane.md → docs/programming/advanced/library/src/4b/gate/sane.mdrenamed
The content is the same.
docs/programming/reference/library/src/4b/gate/teff.md → docs/programming/advanced/library/src/4b/gate/teff.mdrenamed
The content is the same.
docs/programming/reference/library/src/4b/gate/trim.md → docs/programming/advanced/library/src/4b/gate/trim.mdrenamed
The content is the same.
docs/programming/reference/library/src/4b/gate/trip.md → docs/programming/advanced/library/src/4b/gate/trip.mdrenamed
The content is the same.
docs/programming/reference/library/src/4b/gate/tuba.md → docs/programming/advanced/library/src/4b/gate/tuba.mdrenamed
The content is the same.
docs/programming/reference/library/src/4b/gate/tufa.md → docs/programming/advanced/library/src/4b/gate/tufa.mdrenamed
The content is the same.
docs/programming/reference/library/src/4b/gate/tuft.md → docs/programming/advanced/library/src/4b/gate/tuft.mdrenamed
The content is the same.
docs/programming/reference/library/src/4b/gate/turf.md → docs/programming/advanced/library/src/4b/gate/turf.mdrenamed
The content is the same.
docs/programming/reference/library/src/4b/gate/wack.md → docs/programming/advanced/library/src/4b/gate/wack.mdrenamed
The content is the same.
docs/programming/reference/library/src/4b/gate/wick.md → docs/programming/advanced/library/src/4b/gate/wick.mdrenamed
The content is the same.
docs/programming/reference/library/src/4b/gate/woad.md → docs/programming/advanced/library/src/4b/gate/woad.mdrenamed
The content is the same.
docs/programming/reference/library/src/4b/gate/wood.md → docs/programming/advanced/library/src/4b/gate/wood.mdrenamed
The content is the same.
docs/programming/reference/library/src/4b/title.md → docs/programming/advanced/library/src/4b/title.mdrenamed
The content is the same.
docs/programming/reference/library/src/4c/core/re.md → docs/programming/advanced/library/src/4c/core/re.mdrenamed
The content is the same.
docs/programming/reference/library/src/4c/gate/show.md → docs/programming/advanced/library/src/4c/gate/show.mdrenamed
The content is the same.
docs/programming/reference/library/src/4c/title.md → docs/programming/advanced/library/src/4c/title.mdrenamed
The content is the same.
docs/programming/reference/library/src/4d/gate/last.md → docs/programming/advanced/library/src/4d/gate/last.mdrenamed
The content is the same.
docs/programming/reference/library/src/4d/gate/lust.md → docs/programming/advanced/library/src/4d/gate/lust.mdrenamed
The content is the same.
docs/programming/reference/library/src/4d/title.md → docs/programming/advanced/library/src/4d/title.mdrenamed
The content is the same.
docs/programming/reference/library/src/4e/gate/bend.md → docs/programming/advanced/library/src/4e/gate/bend.mdrenamed
The content is the same.
docs/programming/reference/library/src/4e/gate/comp.md → docs/programming/advanced/library/src/4e/gate/comp.mdrenamed
The content is the same.
docs/programming/reference/library/src/4e/gate/fail.md → docs/programming/advanced/library/src/4e/gate/fail.mdrenamed
The content is the same.
docs/programming/reference/library/src/4e/gate/glue.md → docs/programming/advanced/library/src/4e/gate/glue.mdrenamed
The content is the same.
docs/programming/reference/library/src/4e/gate/less.md → docs/programming/advanced/library/src/4e/gate/less.mdrenamed
The content is the same.
docs/programming/reference/library/src/4e/gate/pfix.md → docs/programming/advanced/library/src/4e/gate/pfix.mdrenamed
The content is the same.
docs/programming/reference/library/src/4e/gate/plug.md → docs/programming/advanced/library/src/4e/gate/plug.mdrenamed
The content is the same.
docs/programming/reference/library/src/4e/gate/pose.md → docs/programming/advanced/library/src/4e/gate/pose.mdrenamed
The content is the same.
docs/programming/reference/library/src/4e/gate/sfix.md → docs/programming/advanced/library/src/4e/gate/sfix.mdrenamed
The content is the same.
docs/programming/reference/library/src/4e/gate/simu.md → docs/programming/advanced/library/src/4e/gate/simu.mdrenamed
The content is the same.
docs/programming/reference/library/src/4e/title.md → docs/programming/advanced/library/src/4e/title.mdrenamed
The content is the same.
docs/programming/reference/library/src/4f/gate/bass.md → docs/programming/advanced/library/src/4f/gate/bass.mdrenamed
The content is the same.
docs/programming/reference/library/src/4f/gate/boss.md → docs/programming/advanced/library/src/4f/gate/boss.mdrenamed
The content is the same.
docs/programming/reference/library/src/4f/gate/cold.md → docs/programming/advanced/library/src/4f/gate/cold.mdrenamed
The content is the same.
docs/programming/reference/library/src/4f/gate/cook.md → docs/programming/advanced/library/src/4f/gate/cook.mdrenamed
The content is the same.
docs/programming/reference/library/src/4f/gate/easy.md → docs/programming/advanced/library/src/4f/gate/easy.mdrenamed
The content is the same.
docs/programming/reference/library/src/4f/gate/full.md → docs/programming/advanced/library/src/4f/gate/full.mdrenamed
The content is the same.
docs/programming/reference/library/src/4f/gate/funk.md → docs/programming/advanced/library/src/4f/gate/funk.mdrenamed
The content is the same.
docs/programming/reference/library/src/4f/gate/here.md → docs/programming/advanced/library/src/4f/gate/here.mdrenamed
The content is the same.
docs/programming/reference/library/src/4f/gate/ifix.md → docs/programming/advanced/library/src/4f/gate/ifix.mdrenamed
The content is the same.
docs/programming/reference/library/src/4f/gate/jest.md → docs/programming/advanced/library/src/4f/gate/jest.mdrenamed
The content is the same.
docs/programming/reference/library/src/4f/gate/just.md → docs/programming/advanced/library/src/4f/gate/just.mdrenamed
The content is the same.
docs/programming/reference/library/src/4f/gate/knee.md → docs/programming/advanced/library/src/4f/gate/knee.mdrenamed
The content is the same.
docs/programming/reference/library/src/4f/gate/mask.md → docs/programming/advanced/library/src/4f/gate/mask.mdrenamed
The content is the same.
docs/programming/reference/library/src/4f/gate/more.md → docs/programming/advanced/library/src/4f/gate/more.mdrenamed
The content is the same.
docs/programming/reference/library/src/4f/gate/most.md → docs/programming/advanced/library/src/4f/gate/most.mdrenamed
The content is the same.
docs/programming/reference/library/src/4f/gate/next.md → docs/programming/advanced/library/src/4f/gate/next.mdrenamed
The content is the same.
docs/programming/reference/library/src/4f/gate/plus.md → docs/programming/advanced/library/src/4f/gate/plus.mdrenamed
The content is the same.
docs/programming/reference/library/src/4f/gate/sear.md → docs/programming/advanced/library/src/4f/gate/sear.mdrenamed
The content is the same.
docs/programming/reference/library/src/4f/gate/shim.md → docs/programming/advanced/library/src/4f/gate/shim.mdrenamed
The content is the same.
docs/programming/reference/library/src/4f/gate/slug.md → docs/programming/advanced/library/src/4f/gate/slug.mdrenamed
The content is the same.
docs/programming/reference/library/src/4f/gate/stag.md → docs/programming/advanced/library/src/4f/gate/stag.mdrenamed
The content is the same.
docs/programming/reference/library/src/4f/gate/star.md → docs/programming/advanced/library/src/4f/gate/star.mdrenamed
The content is the same.
docs/programming/reference/library/src/4f/gate/stet.md → docs/programming/advanced/library/src/4f/gate/stet.mdrenamed
The content is the same.
docs/programming/reference/library/src/4f/gate/stew.md → docs/programming/advanced/library/src/4f/gate/stew.mdrenamed
The content is the same.
docs/programming/reference/library/src/4f/gate/stir.md → docs/programming/advanced/library/src/4f/gate/stir.mdrenamed
The content is the same.
docs/programming/reference/library/src/4f/gate/stun.md → docs/programming/advanced/library/src/4f/gate/stun.mdrenamed
The content is the same.
docs/programming/reference/library/src/4f/title.md → docs/programming/advanced/library/src/4f/title.mdrenamed
The content is the same.
docs/programming/reference/library/src/4g/gate/rash.md → docs/programming/advanced/library/src/4g/gate/rash.mdrenamed
The content is the same.
docs/programming/reference/library/src/4g/gate/rush.md → docs/programming/advanced/library/src/4g/gate/rush.mdrenamed
The content is the same.
docs/programming/reference/library/src/4g/gate/rust.md → docs/programming/advanced/library/src/4g/gate/rust.mdrenamed
The content is the same.
docs/programming/reference/library/src/4g/gate/scan.md → docs/programming/advanced/library/src/4g/gate/scan.mdrenamed
The content is the same.
docs/programming/reference/library/src/4g/title.md → docs/programming/advanced/library/src/4g/title.mdrenamed
The content is the same.
docs/programming/reference/library/src/4h/gate/ace.md → docs/programming/advanced/library/src/4h/gate/ace.mdrenamed
The content is the same.
docs/programming/reference/library/src/4h/gate/bar.md → docs/programming/advanced/library/src/4h/gate/bar.mdrenamed
The content is the same.
docs/programming/reference/library/src/4h/gate/bas.md → docs/programming/advanced/library/src/4h/gate/bas.mdrenamed
The content is the same.
docs/programming/reference/library/src/4h/gate/buc.md → docs/programming/advanced/library/src/4h/gate/buc.mdrenamed
The content is the same.
docs/programming/reference/library/src/4h/gate/cab.md → docs/programming/advanced/library/src/4h/gate/cab.mdrenamed
The content is the same.
docs/programming/reference/library/src/4h/gate/cen.md → docs/programming/advanced/library/src/4h/gate/cen.mdrenamed
The content is the same.
docs/programming/reference/library/src/4h/gate/col.md → docs/programming/advanced/library/src/4h/gate/col.mdrenamed
The content is the same.
docs/programming/reference/library/src/4h/gate/com.md → docs/programming/advanced/library/src/4h/gate/com.mdrenamed
The content is the same.
docs/programming/reference/library/src/4h/gate/doq.md → docs/programming/advanced/library/src/4h/gate/doq.mdrenamed
The content is the same.
docs/programming/reference/library/src/4h/gate/dot.md → docs/programming/advanced/library/src/4h/gate/dot.mdrenamed
The content is the same.
docs/programming/reference/library/src/4h/gate/fas.md → docs/programming/advanced/library/src/4h/gate/fas.mdrenamed
The content is the same.
docs/programming/reference/library/src/4h/gate/gal.md → docs/programming/advanced/library/src/4h/gate/gal.mdrenamed
The content is the same.
docs/programming/reference/library/src/4h/gate/gar.md → docs/programming/advanced/library/src/4h/gate/gar.mdrenamed
The content is the same.
docs/programming/reference/library/src/4h/gate/hax.md → docs/programming/advanced/library/src/4h/gate/hax.mdrenamed
The content is the same.
docs/programming/reference/library/src/4h/gate/hep.md → docs/programming/advanced/library/src/4h/gate/hep.mdrenamed
The content is the same.
docs/programming/reference/library/src/4h/gate/kel.md → docs/programming/advanced/library/src/4h/gate/kel.mdrenamed
The content is the same.
docs/programming/reference/library/src/4h/gate/ker.md → docs/programming/advanced/library/src/4h/gate/ker.mdrenamed
The content is the same.
docs/programming/reference/library/src/4h/gate/ket.md → docs/programming/advanced/library/src/4h/gate/ket.mdrenamed
The content is the same.
docs/programming/reference/library/src/4h/gate/lus.md → docs/programming/advanced/library/src/4h/gate/lus.mdrenamed
The content is the same.
docs/programming/reference/library/src/4h/gate/pam.md → docs/programming/advanced/library/src/4h/gate/pam.mdrenamed
The content is the same.
docs/programming/reference/library/src/4h/gate/pat.md → docs/programming/advanced/library/src/4h/gate/pat.mdrenamed
The content is the same.
docs/programming/reference/library/src/4h/gate/pel.md → docs/programming/advanced/library/src/4h/gate/pel.mdrenamed
The content is the same.
docs/programming/reference/library/src/4h/gate/per.md → docs/programming/advanced/library/src/4h/gate/per.mdrenamed
The content is the same.
docs/programming/reference/library/src/4h/gate/sel.md → docs/programming/advanced/library/src/4h/gate/sel.mdrenamed
The content is the same.
docs/programming/reference/library/src/4h/gate/sem.md → docs/programming/advanced/library/src/4h/gate/sem.mdrenamed
The content is the same.
docs/programming/reference/library/src/4h/gate/ser.md → docs/programming/advanced/library/src/4h/gate/ser.mdrenamed
The content is the same.
docs/programming/reference/library/src/4h/gate/sig.md → docs/programming/advanced/library/src/4h/gate/sig.mdrenamed
The content is the same.
docs/programming/reference/library/src/4h/gate/soq.md → docs/programming/advanced/library/src/4h/gate/soq.mdrenamed
The content is the same.
docs/programming/reference/library/src/4h/gate/tar.md → docs/programming/advanced/library/src/4h/gate/tar.mdrenamed
The content is the same.
docs/programming/reference/library/src/4h/gate/tec.md → docs/programming/advanced/library/src/4h/gate/tec.mdrenamed
The content is the same.
docs/programming/reference/library/src/4h/gate/tis.md → docs/programming/advanced/library/src/4h/gate/tis.mdrenamed
The content is the same.
docs/programming/reference/library/src/4h/gate/wut.md → docs/programming/advanced/library/src/4h/gate/wut.mdrenamed
The content is the same.
docs/programming/reference/library/src/4h/gate/zap.md → docs/programming/advanced/library/src/4h/gate/zap.mdrenamed
The content is the same.
docs/programming/reference/library/src/4h/title.md → docs/programming/advanced/library/src/4h/title.mdrenamed
The content is the same.
docs/programming/reference/library/src/4i/title.md → docs/programming/advanced/library/src/4i/title.mdrenamed
The content is the same.
docs/programming/reference/library/src/4j/core/ab.md → docs/programming/advanced/library/src/4j/core/ab.mdrenamed
The content is the same.
docs/programming/reference/library/src/4j/core/mu.md → docs/programming/advanced/library/src/4j/core/mu.mdrenamed
The content is the same.
docs/programming/reference/library/src/4j/core/ne.md → docs/programming/advanced/library/src/4j/core/ne.mdrenamed
The content is the same.
docs/programming/reference/library/src/4j/title.md → docs/programming/advanced/library/src/4j/title.mdrenamed
The content is the same.
docs/programming/reference/library/src/4k/core/co.md → docs/programming/advanced/library/src/4k/core/co.mdrenamed
The content is the same.
docs/programming/reference/library/src/4k/gate/alf.md → docs/programming/advanced/library/src/4k/gate/alf.mdrenamed
The content is the same.
docs/programming/reference/library/src/4k/gate/aln.md → docs/programming/advanced/library/src/4k/gate/aln.mdrenamed
The content is the same.
docs/programming/reference/library/src/4k/gate/alp.md → docs/programming/advanced/library/src/4k/gate/alp.mdrenamed
The content is the same.
docs/programming/reference/library/src/4k/gate/bet.md → docs/programming/advanced/library/src/4k/gate/bet.mdrenamed
The content is the same.
docs/programming/reference/library/src/4k/gate/bin.md → docs/programming/advanced/library/src/4k/gate/bin.mdrenamed
The content is the same.
docs/programming/reference/library/src/4k/gate/but.md → docs/programming/advanced/library/src/4k/gate/but.mdrenamed
The content is the same.
docs/programming/reference/library/src/4k/gate/cit.md → docs/programming/advanced/library/src/4k/gate/cit.mdrenamed
The content is the same.
docs/programming/reference/library/src/4k/gate/dem.md → docs/programming/advanced/library/src/4k/gate/dem.mdrenamed
The content is the same.
docs/programming/reference/library/src/4k/gate/dit.md → docs/programming/advanced/library/src/4k/gate/dit.mdrenamed
The content is the same.
docs/programming/reference/library/src/4k/gate/dog.md → docs/programming/advanced/library/src/4k/gate/dog.mdrenamed
The content is the same.
docs/programming/reference/library/src/4k/gate/doh.md → docs/programming/advanced/library/src/4k/gate/doh.mdrenamed
The content is the same.
docs/programming/reference/library/src/4k/gate/dun.md → docs/programming/advanced/library/src/4k/gate/dun.mdrenamed
The content is the same.
docs/programming/reference/library/src/4k/gate/duz.md → docs/programming/advanced/library/src/4k/gate/duz.mdrenamed
The content is the same.
docs/programming/reference/library/src/4k/gate/gah.md → docs/programming/advanced/library/src/4k/gate/gah.mdrenamed
The content is the same.
docs/programming/reference/library/src/4k/gate/gap.md → docs/programming/advanced/library/src/4k/gate/gap.mdrenamed
The content is the same.
docs/programming/reference/library/src/4k/gate/gaq.md → docs/programming/advanced/library/src/4k/gate/gaq.mdrenamed
The content is the same.
docs/programming/reference/library/src/4k/gate/gaw.md → docs/programming/advanced/library/src/4k/gate/gaw.mdrenamed
The content is the same.
docs/programming/reference/library/src/4k/gate/gay.md → docs/programming/advanced/library/src/4k/gate/gay.mdrenamed
The content is the same.
docs/programming/reference/library/src/4k/gate/gon.md → docs/programming/advanced/library/src/4k/gate/gon.mdrenamed
The content is the same.
docs/programming/reference/library/src/4k/gate/gul.md → docs/programming/advanced/library/src/4k/gate/gul.mdrenamed
The content is the same.
docs/programming/reference/library/src/4k/gate/hex.md → docs/programming/advanced/library/src/4k/gate/hex.mdrenamed
The content is the same.
docs/programming/reference/library/src/4k/gate/hig.md → docs/programming/advanced/library/src/4k/gate/hig.mdrenamed
The content is the same.
docs/programming/reference/library/src/4k/gate/hit.md → docs/programming/advanced/library/src/4k/gate/hit.mdrenamed
The content is the same.
docs/programming/reference/library/src/4k/gate/iny.md → docs/programming/advanced/library/src/4k/gate/iny.mdrenamed
The content is the same.
docs/programming/reference/library/src/4k/gate/low.md → docs/programming/advanced/library/src/4k/gate/low.mdrenamed
The content is the same.
docs/programming/reference/library/src/4k/gate/mes.md → docs/programming/advanced/library/src/4k/gate/mes.mdrenamed
The content is the same.
docs/programming/reference/library/src/4k/gate/nix.md → docs/programming/advanced/library/src/4k/gate/nix.mdrenamed
The content is the same.
docs/programming/reference/library/src/4k/gate/nud.md → docs/programming/advanced/library/src/4k/gate/nud.mdrenamed
The content is the same.
docs/programming/reference/library/src/4k/gate/prn.md → docs/programming/advanced/library/src/4k/gate/prn.mdrenamed
The content is the same.
docs/programming/reference/library/src/4k/gate/qat.md → docs/programming/advanced/library/src/4k/gate/qat.mdrenamed
The content is the same.
docs/programming/reference/library/src/4k/gate/qit.md → docs/programming/advanced/library/src/4k/gate/qit.mdrenamed
The content is the same.
docs/programming/reference/library/src/4k/gate/qut.md → docs/programming/advanced/library/src/4k/gate/qut.mdrenamed
The content is the same.
docs/programming/reference/library/src/4k/gate/soz.md → docs/programming/advanced/library/src/4k/gate/soz.mdrenamed
The content is the same.
docs/programming/reference/library/src/4k/gate/sym.md → docs/programming/advanced/library/src/4k/gate/sym.mdrenamed
The content is the same.
docs/programming/reference/library/src/4k/gate/ven.md → docs/programming/advanced/library/src/4k/gate/ven.mdrenamed
The content is the same.
docs/programming/reference/library/src/4k/gate/vit.md → docs/programming/advanced/library/src/4k/gate/vit.mdrenamed
The content is the same.
docs/programming/reference/library/src/4k/gate/vul.md → docs/programming/advanced/library/src/4k/gate/vul.mdrenamed
The content is the same.
docs/programming/reference/library/src/4k/title.md → docs/programming/advanced/library/src/4k/title.mdrenamed
The content is the same.
docs/programming/reference/library/src/4l/core/so.md → docs/programming/advanced/library/src/4l/core/so.mdrenamed
The content is the same.
docs/programming/reference/library/src/4l/title.md → docs/programming/advanced/library/src/4l/title.mdrenamed
The content is the same.
docs/programming/reference/library/src/4m/gate/scot.md → docs/programming/advanced/library/src/4m/gate/scot.mdrenamed
The content is the same.
docs/programming/reference/library/src/4m/gate/scow.md → docs/programming/advanced/library/src/4m/gate/scow.mdrenamed
The content is the same.
docs/programming/reference/library/src/4m/gate/slat.md → docs/programming/advanced/library/src/4m/gate/slat.mdrenamed
The content is the same.
docs/programming/reference/library/src/4m/gate/slav.md → docs/programming/advanced/library/src/4m/gate/slav.mdrenamed
The content is the same.
docs/programming/reference/library/src/4m/gate/slaw.md → docs/programming/advanced/library/src/4m/gate/slaw.mdrenamed
The content is the same.
docs/programming/reference/library/src/4m/gate/slay.md → docs/programming/advanced/library/src/4m/gate/slay.mdrenamed
The content is the same.
docs/programming/reference/library/src/4m/gate/smyt.md → docs/programming/advanced/library/src/4m/gate/smyt.mdrenamed
The content is the same.
docs/programming/reference/library/src/4m/gate/spat.md → docs/programming/advanced/library/src/4m/gate/spat.mdrenamed
The content is the same.
docs/programming/reference/library/src/4m/gate/spud.md → docs/programming/advanced/library/src/4m/gate/spud.mdrenamed
The content is the same.
docs/programming/reference/library/src/4m/gate/stab.md → docs/programming/advanced/library/src/4m/gate/stab.mdrenamed
The content is the same.
docs/programming/reference/library/src/4m/title.md → docs/programming/advanced/library/src/4m/title.mdrenamed
The content is the same.
docs/programming/reference/library/src/4n/gate/mack.md → docs/programming/advanced/library/src/4n/gate/mack.mdrenamed
The content is the same.
docs/programming/reference/library/src/4n/gate/mink.md → docs/programming/advanced/library/src/4n/gate/mink.mdrenamed
The content is the same.
docs/programming/reference/library/src/4n/gate/mock.md → docs/programming/advanced/library/src/4n/gate/mock.mdrenamed
The content is the same.
docs/programming/reference/library/src/4n/gate/mong.md → docs/programming/advanced/library/src/4n/gate/mong.mdrenamed
The content is the same.
docs/programming/reference/library/src/4n/gate/mook.md → docs/programming/advanced/library/src/4n/gate/mook.mdrenamed
The content is the same.
docs/programming/reference/library/src/4n/gate/mule.md → docs/programming/advanced/library/src/4n/gate/mule.mdrenamed
The content is the same.
docs/programming/reference/library/src/4n/gate/mute.md → docs/programming/advanced/library/src/4n/gate/mute.mdrenamed
The content is the same.
docs/programming/reference/library/src/4n/title.md → docs/programming/advanced/library/src/4n/title.mdrenamed
The content is the same.
docs/programming/reference/library/src/4o/mold/abel.md → docs/programming/advanced/library/src/4o/mold/abel.mdrenamed
The content is the same.
docs/programming/reference/library/src/4o/mold/aura.md → docs/programming/advanced/library/src/4o/mold/aura.mdrenamed
The content is the same.
docs/programming/reference/library/src/4o/mold/axis.md → docs/programming/advanced/library/src/4o/mold/axis.mdrenamed
The content is the same.
docs/programming/reference/library/src/4o/mold/base.md → docs/programming/advanced/library/src/4o/mold/base.mdrenamed
The content is the same.
docs/programming/reference/library/src/4o/mold/bean.md → docs/programming/advanced/library/src/4o/mold/bean.mdrenamed
The content is the same.
docs/programming/reference/library/src/4o/mold/beer.md → docs/programming/advanced/library/src/4o/mold/beer.mdrenamed
The content is the same.
docs/programming/reference/library/src/4o/mold/beet.md → docs/programming/advanced/library/src/4o/mold/beet.mdrenamed
The content is the same.
docs/programming/reference/library/src/4o/mold/chum.md → docs/programming/advanced/library/src/4o/mold/chum.mdrenamed
The content is the same.
docs/programming/reference/library/src/4o/mold/coil.md → docs/programming/advanced/library/src/4o/mold/coil.mdrenamed
The content is the same.
docs/programming/reference/library/src/4o/mold/foot.md → docs/programming/advanced/library/src/4o/mold/foot.mdrenamed
The content is the same.
docs/programming/reference/library/src/4o/mold/limb.md → docs/programming/advanced/library/src/4o/mold/limb.mdrenamed
The content is the same.
docs/programming/reference/library/src/4o/mold/line.md → docs/programming/advanced/library/src/4o/mold/line.mdrenamed
The content is the same.
docs/programming/reference/library/src/4o/mold/metl.md → docs/programming/advanced/library/src/4o/mold/metl.mdrenamed
The content is the same.
docs/programming/reference/library/src/4o/mold/nock.md → docs/programming/advanced/library/src/4o/mold/nock.mdrenamed
The content is the same.
docs/programming/reference/library/src/4o/mold/noun.md → docs/programming/advanced/library/src/4o/mold/noun.mdrenamed
The content is the same.
docs/programming/reference/library/src/4o/mold/null.md → docs/programming/advanced/library/src/4o/mold/null.mdrenamed
The content is the same.
docs/programming/reference/library/src/4o/mold/port.md → docs/programming/advanced/library/src/4o/mold/port.mdrenamed
The content is the same.
docs/programming/reference/library/src/4o/mold/span.md → docs/programming/advanced/library/src/4o/mold/span.mdrenamed
The content is the same.
docs/programming/reference/library/src/4o/mold/tiki.md → docs/programming/advanced/library/src/4o/mold/tiki.mdrenamed
The content is the same.
docs/programming/reference/library/src/4o/mold/toga.md → docs/programming/advanced/library/src/4o/mold/toga.mdrenamed
The content is the same.
docs/programming/reference/library/src/4o/mold/tone.md → docs/programming/advanced/library/src/4o/mold/tone.mdrenamed
The content is the same.
docs/programming/reference/library/src/4o/mold/tuna.md → docs/programming/advanced/library/src/4o/mold/tuna.mdrenamed
The content is the same.
docs/programming/reference/library/src/4o/mold/tusk.md → docs/programming/advanced/library/src/4o/mold/tusk.mdrenamed
The content is the same.
docs/programming/reference/library/src/4o/mold/twig.md → docs/programming/advanced/library/src/4o/mold/twig.mdrenamed
The content is the same.
docs/programming/reference/library/src/4o/mold/tyke.md → docs/programming/advanced/library/src/4o/mold/tyke.mdrenamed
The content is the same.
docs/programming/reference/library/src/4o/mold/typo.md → docs/programming/advanced/library/src/4o/mold/typo.mdrenamed
The content is the same.
docs/programming/reference/library/src/4o/mold/tyre.md → docs/programming/advanced/library/src/4o/mold/tyre.mdrenamed
The content is the same.
docs/programming/reference/library/src/4o/mold/vase.md → docs/programming/advanced/library/src/4o/mold/vase.mdrenamed
The content is the same.
docs/programming/reference/library/src/4o/mold/vise.md → docs/programming/advanced/library/src/4o/mold/vise.mdrenamed
The content is the same.
docs/programming/reference/library/src/4o/mold/wing.md → docs/programming/advanced/library/src/4o/mold/wing.mdrenamed
The content is the same.
docs/programming/reference/library/src/4o/title.md → docs/programming/advanced/library/src/4o/title.mdrenamed
The content is the same.
docs/programming/reference/library/src/5a/title.md → docs/programming/advanced/library/src/5a/title.mdrenamed
The content is the same.
docs/programming/reference/library/src/5b/title.md → docs/programming/advanced/library/src/5b/title.mdrenamed
The content is the same.
docs/programming/reference/library/src/5c/title.md → docs/programming/advanced/library/src/5c/title.mdrenamed
The content is the same.
docs/programming/reference/library/src/5d/title.md → docs/programming/advanced/library/src/5d/title.mdrenamed
The content is the same.
docs/programming/reference/library/src/5e/title.md → docs/programming/advanced/library/src/5e/title.mdrenamed
The content is the same.
docs/programming/reference/library/src/5f/mold/mane.md → docs/programming/advanced/library/src/5f/mold/mane.mdrenamed
The content is the same.
docs/programming/reference/library/src/5f/mold/manx.md → docs/programming/advanced/library/src/5f/mold/manx.mdrenamed
The content is the same.
docs/programming/reference/library/src/5f/mold/marl.md → docs/programming/advanced/library/src/5f/mold/marl.mdrenamed
The content is the same.
docs/programming/reference/library/src/5f/mold/mars.md → docs/programming/advanced/library/src/5f/mold/mars.mdrenamed
The content is the same.
docs/programming/reference/library/src/5f/mold/mart.md → docs/programming/advanced/library/src/5f/mold/mart.mdrenamed
The content is the same.
docs/programming/reference/library/src/5f/mold/marx.md → docs/programming/advanced/library/src/5f/mold/marx.mdrenamed
The content is the same.
docs/programming/reference/library/src/5f/mold/pass.md → docs/programming/advanced/library/src/5f/mold/pass.mdrenamed
The content is the same.
docs/programming/reference/library/src/5f/mold/ring.md → docs/programming/advanced/library/src/5f/mold/ring.mdrenamed
The content is the same.
docs/programming/reference/library/src/5f/mold/time.md → docs/programming/advanced/library/src/5f/mold/time.mdrenamed
The content is the same.
docs/programming/reference/library/src/5f/title.md → docs/programming/advanced/library/src/5f/title.mdrenamed
The content is the same.
docs/programming/advanced/nock.mdnew file+7
@@ -0,0 +1,7 @@
1+---
2+sort: 4
3+---
4+
5+# Nock, in more depth
6+
7+<list></list>
docs/programming/reference/nock/reference.md → docs/programming/advanced/nock/reference.mdrenamed
The content is the same.
docs/programming/reference/nock/tutorial.md → docs/programming/advanced/nock/tutorial.mdrenamed
The content is the same.
docs/programming/reference/runtime.md → docs/programming/advanced/runtime.mdrenamed+2−2
@@ -1,8 +1,8 @@
11---
2−sort: 4
2+sort: 5
33---
44
5−# Interpreter
5+# Interpreter (`vere`) runtime system
66
77## u3: noun processing in C
88
docs/programming/cheat-sheets.mdnew file+9
@@ -0,0 +1,9 @@
1+---
2+sort: 12
3+---
4+
5+# Quick references
6+
7+Some quick-reference sheets to print out or keep on your other monitor.
8+
9+<list></list>
docs/programming/reference/cheat-sheets/hoon.md → docs/programming/cheat-sheets/hoon.mdrenamed
The content is the same.
docs/programming/reference/cheat-sheets/odors.md → docs/programming/cheat-sheets/odors.mdrenamed
The content is the same.
docs/programming/reference/cheat-sheets/pronunciation.md → docs/programming/cheat-sheets/pronunciation.mdrenamed
The content is the same.
docs/programming/concepts.mdnew file+213
@@ -0,0 +1,213 @@
1+---
2+sort: 3
3+next: true
4+title: Concepts
5+---
6+
7+# Concepts and terminology
8+
9+Usually, a new language is an improvement on one you already
10+know. If it isn't, it probably at least shares concepts with a
11+large family of relatives. These concepts come with words, like
12+*type* or *function*, that map cleanly onto its semantics.
13+
14+In Hoon we throw away almost all these words and invent new
15+ones, which mean almost the same things. But why?
16+
17+## Motivation
18+
19+Hoon has no close relatives, and the normal jargon of programming
20+maps poorly onto its semantics. For example, although Hoon is a
21+typed language, the term "type" is not formally defined in Hoon.
22+"Type" is a great word, but Hoon has three quite separate
23+concepts which could comfortably claim it. We say "type" all the
24+time; we mean `span`, or `mold`, or `mark`, or possibly all
25+three.
26+
27+Other common programming concepts used only informally in Hoon
28+are "function," "object," "event," "expression," "variable,"
29+"label," "closure", "environment," "scope," and probably a few
30+more. We do use these words informally, but we're always making
31+an analogy whose precision depends on context.
32+
33+## Overview
34+
35+This document is a quick overview of Hoon, structured as a
36+glossary of a few major concepts: `noun` (data), `nock`
37+(interpreter), `mint` (compiler), `span` (type), `twig`
38+(expression), `gate` (function), `mold` (constructor), `core`
39+(object), `mark` (protocol).
40+
41+### `noun` (data value)
42+
43+A value in Hoon is called a [`noun`](noun). A noun is either a
44+unsigned integer of any size (`atom`), or an ordered pair of any
45+two nouns (`cell`). Nouns are like Lisp S-expressions, but
46+simpler (Lisp atoms effectively have dynamic type bits).
47+
48+The simplest noun syntax uses brackets, like `[a b]` for the cell
49+of `a` and `b`. Brackets nest right; `[a b c d]` is `[a [b [c
50+d]]]`. You'll also see braces: `{a b c d}`.
51+
52+A noun list, by convention, points right and is zero-terminated.
53+Hoon uses tuples (improper nouns) more freely than Lisp; only
54+genuinely iterative structures are null-terminated lists.
55+
56+When an atom is used as a string (a `cord`), the bytes are always
57+UTF-8 in LSB first order. When you see `foo`, `$foo`, `%foo`,
58+etc, this refers to the integer `0x6f.6f66`, aka `7.303.014`.
59+(Hoon syntax breaks integer atoms in the German style.)
60+
61+One common operation on nouns is `slot`, a tree addressing
62+scheme which maps an atom to a subtree. The whole noun is slot
63+`1`; the left child of `n` is `2n`, the right child `2n+1`.
64+
65+### `nock` (interpreter)
66+
67+Hoon compiles itself to the [Nock](nock) VM. Nock is a
68+Turing-complete, non-lambda combinator function. The function
69+takes a cell `{subject formula}`, and produces a noun `product`.
70+
71+To program in Hoon, this is all you need to know about Nock. But
72+it's still fun and useful to [learn more](nock).
73+
74+## Compilation concepts
75+
76+### `mint` (compiler)
77+
78+[`mint`](mint) is the Hoon compiler. It maps a cell `{span twig}` to a
79+cell `{span nock}`, where a `span` is a type, a `twig` is a compiled
80+expression (AST), and a `nock` is a Nock formula. `mint` accepts
81+a subject type and a source expression; it produces a product type
82+and an executable formula.
83+
84+### `twig` (expression)
85+
86+A [`twig`](twig) is a Hoon AST node, the result of parsing a
87+source expression. A Hoon source file encodes one twig.
88+
89+As the noun that the parser produces, a twig is a tagged union of
90+the form `{stem bulb}`, where `stem` (the tag) is a `cord` which
91+controls the type of `bulb` (the data).
92+
93+As text, each twig has both regular and irregular syntax forms.
94+Regular syntax can be either *tall* or *flat*: multiline or
95+single-line. Irregular syntax is always flat. Tall twigs can
96+contain flat twigs, but not vice versa.
97+
98+Regular forms always start with a *sigil*, which is either a
99+*keyword* or a *rune* at the programmer's choice. A keyword is
100+the stem cord,
101+
102+For most stems, tall regular form has no delimiter or terminator,
103+eliminating the `)))))` problem common in functional languages.
104+Hoon also uses an unusual "backstep" indentation pattern to
105+control left-margin drift.
106+
107+Hoon is mildly whitespace-sensitive. It knows the difference
108+between no whitespace, one-space, and more-space. But all cases
109+of more-space mean the same thing. Flat syntax uses one-space,
110+tall syntax more-space.
111+
112+As an example, the regular flat keyword syntax `:call(a b)` means
113+the same thing as the flat rune syntax `%-(a b)`, the tall
114+keyword syntax
115+
116+```
117+:call a
118+b
119+```
120+or the tall rune syntax (here on one line, with double spaces):
121+```
122+:- a b
123+```
124+
125+### `span` (type, as range)
126+
127+A [`span`](span) is a Hoon type. It defines a set (finite or
128+infinite) of nouns and ascribes some semantics to it. There is
129+no syntax for spans; they are always defined by inference (ie, by
130+`mint`), usually using a constructor (`mold`).
131+
132+### `gate` (function)
133+
134+A `gate` is a Hoon function (lambda or closure). Other
135+constructs Urbit are functions in the mathematical sense -- for
136+instance, a Nock formula is also a function. But a gate is not a
137+formula. The gate's argument is its *sample*; the result is its
138+*product*.
139+
140+### `core` (object)
141+
142+A `core` has no exact equivalent in conventional languages, but
143+the closest equivalent is an object. An object has methods; a
144+core has functionally computed attributes (*arms*). An arm that
145+produces a gate is the Hoon equivalent of a conventional method;
146+think of it as a computed attribute whose value is a lambda.
147+
148+A gate is a special case of a core: a core with one arm, whose
149+name is the empty string. The shape of a core is `[battery
150+payload]`, where *battery* is a tree of Nock formulas
151+
152+### `mold` (type, as constructor)
153+
154+A `mold` is a constructor function (`gate`). Its sample is any
155+noun; its product is a structured noun. A mold is idempotent;
156+`(mold (mold x))` always equals `(mold x)`.
157+
158+Since there's no such thing as a span declaration, we use molds
159+to define useful spans by example; we also use them to validate
160+untrusted network input.
161+
162+### `face` (named variable)
163+
164+In a conventional language, we have a scope, environment or
165+symbol table. Declaring a variable, like `var foo: atom`, adds
166+the name `foo` to the table with type `atom`.
167+
168+The Hoon equivalent is `:var foo atom`. But Hoon has a
169+homoiconic heap; there is no inscrutable scope or environment.
170+There is just the subject, which is one noun. To "declare a
171+variable" is to make a cell `[variable old-subject]`, and use it
172+as the subject of the twig below.
173+
174+So the label `foo` isn't a key in a symbol table; it's in the
175+type (`span`) of the new value. It's not a variable named `foo`,
176+whose value is of type `atom`; it's a subtree of type `foo:atom`.
177+
178+### `limb` (attribute or variable reference)
179+
180+A [`limb`](limb), like `foo`, is Hoon's equivalent of a variable
181+reference. A limb is a twig; given a subject span, `mint`
182+resolves it to a Nock formula and a product span.
183+
184+To resolve limb `foo`, `mint` searches the subject depth-first,
185+head-first for either a `face` named `foo`, or a `core` with the
186+arm `foo`. If it finds a face, the product is a *leg*, or
187+subtree of the subject. If it finds a core, it computes the arm
188+formula with that core as the subject.
189+
190+A limb can also be a slot (tree address), like `+15`, which
191+takes a leg directly.
192+
193+### `wing` (limb path)
194+
195+A wing is a list of limbs. Like attribute references in a
196+conventional language, it uses the syntax `a.b.c`, but inside
197+out: Hoon `a.b.c` means "a within b within c", the equivalent of
198+`c.b.a` in any other language. All limbs but the last, here `a`,
199+must be legs.
200+
201+### `mark` (type, as protocol name)
202+
203+A `mark` (really an Arvo concept, not a Hoon concept) is Urbit's
204+version of a MIME type, if a MIME type was an executable
205+specification. The mark is just a label that's used as a path to
206+a local source file in the Arvo filesystem. This source file
207+defines a core that can mold untrusted data, diff and patch,
208+convert to other marks, etc.
209+
210+If this sounds like magic, it isn't quite magic. There's no way
211+for different urbits to make sure they mean the same thing by the
212+same mark. However, when incompatibility happens, marks ensure
213+that we at least handle the situation in a predictable way.
docs/programming/core.mddeleted−22
@@ -1,22 +0,0 @@
1−---
2−sort: 1
3−---
4−
5−# Core Hoon
6−
7−Hoon is strict, typed functional programming without category
8−theory.
9−
10−Hoon is named after a Wallace Stevens poem. Coincidentally, it
11−means "hooligan" in Australian. Practically, "Hoon" is a short
12−punchy name which search engines handle well.
13−
14−Hoon has simple principles and a lot of details. To keep the
15−details from getting overwhelming, we start out learning a
16−simplified subset called Core Hoon. (Note that some of the
17−internal structures we show are simplified to match the subset.
18−These simplifications are corrected under Advanced Types.)
19−
20−To learn Hoon, traverse this tree in depth-first order:
21−
22−<list/>
docs/programming/core/concepts.mddeleted−85
@@ -1,85 +0,0 @@
1−---
2−sort: 3
3−next: true
4−title: Concepts
5−---
6−
7−# Concepts and terminology
8−
9−Usually, a new language is an improvement on one you already
10−know. If it isn't, it probably at least shares concepts with a
11−large family of relatives. These concepts come with words, like
12−*type* or *function*, that map cleanly onto its semantics.
13−
14−In Hoon we throw away almost all these words and invent new
15−ones, which mean almost the same things. But wait, wat?
16−
17−## Motivation
18−
19−Hoon has no close relatives, and the normal jargon of programming
20−maps poorly onto its semantics. For example, although Hoon is a
21−typed language, the term *type* is not formally defined in Hoon.
22−It's a great word, but Hoon has three quite separate concepts
23−which could comfortably claim it. We say *type* all the time;
24−we mean `span`, or `mold`, or `mark`, or possibly all three.
25−Sometimes this is ok and sometimes it isn't.
26−
27−Other common programming concepts used only informally in Hoon
28−are "function," "object," "event," "expression," "variable,"
29−"label," "closure", "environment," "stack," and probably a few
30−more. We can get away with any of these conventional words --
31−and we do. But when we do, we're making an analogy that relies
32−on context for precision.
33−
34−## Notation
35−
36−Any `word` in code font is a `limb` (label) in the Hoon kernel.
37−Any jargon that isn't a limb is in *italics*.
38−
39−## Enumeration
40−
41−Top-level Hoon concepts: `noun` (data), `nock` (interpreter),
42−`mint` (compiler), `span` (type), `twig` (expression).
43−
44−## Execution
45−
46−### `noun` (data)
47−
48−A value in Hoon is called a [`noun`](noun). A noun is either a
49−unsigned integer of any size (`atom`), or an ordered pair of any
50−two nouns (`cell`). Nouns are like Lisp S-expressions, but
51−simpler (Lisp atoms effectively have dynamic type bits).
52−
53−### `nock` (interpreter)
54−
55−Hoon compiles itself to the [Nock](nock) VM, a "functional assembly
56−language" whose spec fits on a T-shirt. You don't need to know
57−Nock to use Urbit, but it helps. Nock is an interpreter function
58−that maps a pair `{data nock}` to a *product* noun, where `data`
59−is the *subject* (input) and `nock` is the *formula* (program).
60−
61−## Compilation
62−
63−### `mint` (compiler)
64−
65−[`mint`](mint) is the Hoon compiler. It maps a cell `{span twig}` to a
66−cell `{span nock}`, where a `span` is a type, a `twig` is a compiled
67−expression (AST), and a `nock` is a Nock formula. `mint` accepts
68−a subject type and a source expression; it produces a product type
69−and an executable formula.
70−
71−### `span` (type, as range)
72−
73−A [`span`](span) is a Hoon type. It defines a set (finite or
74−infinite) of nouns and ascribes some semantics to it. There is
75−no syntax for spans; they are always defined by inference (ie, by
76−`mint`), usually using a constructor (`mold`).
77−### `twig` (expression)
78−
79−A [`twig`](twig) is a Hoon AST node, the result of parsing a
80−source expression. In general, a twig is a tagged union of the
81−form `{stem bulb}`, where `stem` is a symbolic atom which
82−controls the type of `bulb`. The regular form is a Hoon keyword
83−`:stem` and a *rune*, or digraph keyword, made of two ASCII
84−punctuation marks. The rune prefix character defines a twig
85−category, like `:`
docs/programming/deep.mddeleted−10
@@ -1,10 +0,0 @@
1−---
2−sort: 2
3−---
4−
5−# Deep Hoon
6−
7−If you want to learn Hoon from the bottom up, start here.
8−
9−<list>
10−</list>
docs/programming/deep/0-nouns.mddeleted−286
@@ -1,286 +0,0 @@
1−---
2−next: true
3−sort: 0
4−spam: true
5−title: Hoon 101.0: nouns, spans, and molds
6−---
7−
8−# Hoon 101.0: nouns, spans and molds
9−
10−Hoon is a strict, higher-order typed pure-functional language.
11−
12−Why Hoon? Typed functional languages are known for a pleasant
13−phenomenon: once your code compiles, it's quite likely to work.
14−But most typed functional languages are conceptually dependent on
15−abstract advanced math, and difficult to understand without it.
16−
17−Hoon is a typed FP language for the common street programmer.
18−Well-written Hoon is as concrete and data-oriented as possible.
19−The less functional magic you use, the better. But the magic is
20−there, mostly, if you need it.
21−
22−The main disadvantage of Hoon is that its syntax and semantics
23−are unfamiliar. The syntax will remind too many of Perl, but
24−like most human languages (and unlike Perl) it combines a regular
25−core structure with irregular variations. And Hoon's semantic
26−complexity is bounded by the size of the compiler: type inference plus code
27−generation are 2000 lines of Hoon. Most peoples' experience is that the
28−language is much easier to learn than it looks.
29−
30−> The name "Hoon" is from the Wallace Stevens poem, _Tea at the
31−Palaz of Hoon_. It also means "hooligan" in Australian.
32−
33−## How to use this tutorial
34−
35−Ideally, you've installed an Urbit planet (if you have a ticket)
36−or comet (if you don't). See the [user doc](../../../user). We
37−recommend opening up the dojo and just typing the examples; you
38−don't know a language until you know it in your fingers.
39−
40−## Nouns: data made boring
41−
42−A noun is an atom or a cell. An atom is any unsigned integer. A
43−cell is an ordered pair of nouns.
44−
45−Nouns are trees; they have no cycles. Noun comparison is always
46−by value (the programmer can't test pointer equality). Nouns are
47−strict; there is no such thing as an infinite noun. And nouns are
48−immutable. There's just no way to have any real fun with nouns.
49−
50−> Nouns are Lisp's S-expressions, minus a lot of hacks, tricks,
51−and features that made sense 50 years ago. In particular,
52−because atoms are not tagged (an atom can encode a string, for
53−instance), nouns depend on a static type system at a higher
54−layer. How do you print an atom if you don't know whether it's a
55−string or a number?
56−
57−## A type system for nouns
58−
59−One obstacle to learning Hoon is that it has two quite distinct
60−concepts that might equally be called a "type." Worse, most
61−other typed functional languages are mathy and share a basically
62−mathematical concept of "type." Hoon does not have this concept
63−at all. We can't avoid using the T-word occasionally, but it has
64−no precise meaning in Hoon and can be extremely confusing.
65−
66−Hoon's two kinds of "type" are `span` and `mold`. A span is both
67−a constructively defined set of nouns, and a semantic convention
68−for users in that set. A `mold` is a function whose range is
69−some useful span. A mold is always idempotent (for any noun `x`,
70−`f(x)` equals `f(f(x))`), and its domain is any noun.
71−
72−One way to explain this is that while a span is what most
73−languages call a "type," Hoon has no syntax for the programmer to
74−define a span directly. Instead, we use inference to define it
75−as the range of a mold function. This mold can also be used to
76−validate or normalize untrusted, untyped data -- a common problem
77−in modern programming, because networks.
78−
79−> Sending a noun over the network is a good example of why Hoon
80−is different. In a normal modern language, you serialize and
81−deserialize a data type by extending your type to implement a
82−serialization interface. A really good language can process your
83−type definition and automatically generate this code. In Hoon,
84−we have one function `jam` that converts any noun to an atom,
85−and another `cue` that inverts `jam`. To validate, the receiver
86−applies its own mold to the cued noun, and we've sent typed data
87−over the network without any attack surface (except `jam` and
88−`cue`, which fit on a page). No custom serialization code,
89−manual or generated, is required. The mold itself is not sent;
90−protocol agreement is out of band.
91−
92−Hoon's inference algorithm is dumber than the unification
93−algorithms (Hindley-Milner) used in most typed functional
94−languages. Hoon thinks only forward, not backward. Eg, Haskell
95−can infer the result type of a function from its argument
96−(forward), or the argument type from the result (backward).
97−Hoon can do the first but not the second.
98−
99−So Hoon needs more manual annotations, which you usually want
100−anyway for prosaic software-engineering reasons. Otherwise its
101−typesystem solves more or less the same job, including
102−pattern-matching, genericity / typeclasses, etc.
103−
104−> A good test of a static higher-order typesystem is whether it can
105−infer the product type of a grammar defined as a combinator
106−parser. The Hoon parser passes this test; when it typechecks,
107−the parser's range nests within the span of the expression mold.
108−
109−## Let's make some nouns
110−
111−Let's make a noun:
112−```
113−~tasfyn-partyv:dojo> 42
114−```
115−You'll see the expression you entered, then the result:
116−```
117−> 42
118−42
119−```
120−Let's try a different noun. Or is it different?
121−```
122−~tasfyn-partyv:dojo> 0x2a
123−```
124−You'll see:
125−```
126−> 0x2a
127−0x2a
128−```
129−`42` and `0x2a` are actually *the same noun*, because they're the
130−same number. But we don't just have the noun to print - we have
131−a `[span noun]` cell (sometimes called a `vase`).
132−
133−As you recall, a span defines a set of nouns and a semantic
134−interpretation. As sets, both spans here are "any number". But
135−semantically, `42` has a decimal span and `0x2a` hexadecimal, so
136−they print differently.
137−
138−> It's important to remember that Hoon is a statically typed language.
139−We don't work with vases unless we're dynamically compiling code,
140−which is of course what we're doing here in the dojo. In Hoon,
141−dynamic type equals static type plus runtime compilation.
142−
143−Let's make some cells. Try these on your own urbit:
144−```
145−~tasfyn-partyv:dojo> [42 0x2a]
146−~tasfyn-partyv:dojo> [42 [0x2a 420]]
147−~tasfyn-partyv:dojo> [42 0x2a 420]
148−```
149−We observe that cells associate right: `[a b c]` is just another
150−way of writing `[a [b c]]`.
151−
152−Lisp masters beware: Hoon `[a b]` is Lisp `(a . b)`, Lisp
153−`(a b)` is Hoon `[a b ~]`. `~` means nil, with value zero. Lisp
154−and Hoon are both pair-oriented languages down below, but Lisp
155−has a layer of sugar that makes it look list-oriented. Hoon
156−loves its "improper lists," ie, tuples.
157−
158−## Looking at spans
159−
160−What are these mysterious spans? We can see them with the `?`
161−prefix, which prints the span along with the result. Moving to
162−a more compact example format:
163−```
164−~tasfyn-partyv:dojo> ? 42
165− @ud
166−42
167−~tasfyn-partyv:dojo> ? 0x2a
168− @ux
169−0x2a
170−```
171−`@ud` and `@ux` stand for "unsigned decimal" and "unsigned hex,"
172−obviously.
173−
174−> What is this span syntax? We only derive spans through
175−inference. So there's no parsing grammar for a span. We have to
176−be able to print spans, if only for debugging and diagnostics,
177−but the syntax is output-only. As in this case, it often looks
178−like the `mold` syntax, but the two are at opposite ends of the
179−type food chain.
180−
181−## Looking at spans, part 2
182−
183−Usually, good style in Hoon is concrete style. When a Hoon
184−programmer defines an abstract semantic value in terms of a noun,
185−we rarely put a conceptual layer of abstraction between value and
186−noun. We think of the value as an interpretation of the noun.
187−We don't think of the noun as an implementation of the noun.
188−
189−But rules are made to be broken. With the `?` command, we *do*
190−use an abstract layer, by printing our span noun in that custom
191−syntax. But we can also look at the span noun directly, with the
192−`??` command. As we'll see, `??` is mainly for newbies, but
193−newbies love it.
194−
195−```
196−~tasfyn-partyv:dojo> ?? 42
197− [%atom %ud]
198−42
199−~tasfyn-partyv:dojo> ?? [42 0x2a]
200− [%cell [%atom %ud] [%atom %ux]]
201−[42 0x2a]
202−```
203−What is this `%atom` syntax? Is it a real noun? Can anyone
204−make one?
205−```
206−~tasfyn-partyv:dojo> %atom
207−%atom
208−~tasfyn-partyv:dojo> %foo
209−%foo
210−~tasfyn-partyv:dojo> [%foo %bar]
211−[%foo %bar]
212−```
213−What's the span of one of these symbols?
214−```
215−~tasfyn-partyv:dojo> ? %foo
216− %foo
217−%foo
218−~tasfyn-partyv:dojo> ?? %foo
219− [%cube 7.303.014 [%atom %tas]]
220−%foo
221−```
222−This takes a little bit of explaining. `7.303.014` is just the
223−Urbit (and German) way of writing the English number `7,303,014`,
224−or the Urbit hex number `0x6f.6f66`, or the string "foo" as an
225−unsigned integer with least-significant byte first.
226−
227−A `%cube` span is a constant -- a set of one noun, the atom
228−`7.303.014`. But we still need to know how to print that noun.
229−In this case, it's an `[%atom %tas]`, ie, a text symbol.
230−
231−Cubes don't have to be symbols -- in fact, we can take the
232−numbers we've just been using, and make them constants:
233−```
234−~tasfyn-partyv:dojo> %42
235−%42
236−~tasfyn-partyv:dojo> ? %42
237− %42
238−%42
239−~tasfyn-partyv:dojo> ?? %42
240− [%cube 42 [%atom %ud]]
241−%42
242−```
243−
244−> Why `??`? Spans are an exception to concrete style, because they
245−use "manual laziness" to define logically recursive structures.
246−A recursive span contains Hoon code which is evaluated to apply
247−it. In practice, this noun often contains the entire Urbit
248−kernel, so you wouldn't want to try to print it in the dojo. If
249−you find `??` taking a weirdly long time, this may have happened;
250−press ^C.
251−
252−## Our first mold
253−
254−After seeing a few span examples, are we ready to describe the
255−set of all spans with a Hoon mold? Well, no, but let's try it
256−anyway. Ignore the syntax (which we'll explain later; this is a
257−tutorial, not a reference manual), and you'll get the idea:
258−```
259−++ span
260− $% [%atom p=@tas]
261− [%cell p=span q=span]
262− [%cube p=* q=span]
263− ==
264−```
265−This mold is not the entire definition of `span`, just the cases
266−we've seen so far. In English, a valid span is either:
267−
268−- a cell with head `%atom`, and tail some symbol.
269−- a cell with head `%cell`, and tail some pair of spans.
270−- a cell with head `%cube`, and tail a noun-span pair.
271−
272−The head of a span is essentially the tag in a variant record,
273−a pattern every programming language has. To use the span, we
274−look at the head and then decide what to do with the tail.
275−
276−> A conventional naming strategy for simple, self-explaining
277−structures is to name the legs of a tuple `p`, `q`, `r`, `s` and
278−`t`. If you get all the way to `t`, your noun is probably not
279−simple or self-explaining; meaningful names are recommended.
280−
281−## Progress
282−
283−Believe it or not, at this point we understand nouns completely.
284−We don't understand spans and molds completely, but we get the
285−basics. In the [next chapter](1-twigs), we'll see how Hoon
286−expressions (twigs) turn one noun into another.
docs/programming/deep/1-twigs.mddeleted−286
@@ -1,286 +0,0 @@
1−---
2−next: true
3−sort: 1
4−spam: true
5−title: Hoon 101.1: twigs and legs
6−---
7−# Hoon 101.1: twigs and legs
8−
9−In the [last chapter](0-nouns), we learned how to make nouns. In
10−this chapter we'll get into Hoon expressions, or *twigs*.
11−
12−## How to use this tutorial
13−
14−Ideally, you've installed an Urbit planet (if you have a ticket)
15−or comet (if you don't). See the [user doc](../../../user).
16−
17−We recommend opening up the dojo and just typing the examples;
18−you don't know a language until you know it in your fingers.
19−Also, make sure you've worked through the chapters in order.
20−
21−## Nock for Hoon programmers
22−
23−Hoon compiles itself to a pico-interpreter called
24−[Nock](../../nock), a combinator algebra defined in 200 words. This
25−isn't the place to explain Nock (which relates to Hoon much as
26−assembly language relates to C), but Nock is just a way to
27−express a function as a noun.
28−
29−Nock is a Turing-complete interpreter shaped like (pseudocode):
30−```
31−Nock(problem) => product
32−```
33−The `problem` is always a cell `[subject formula]`. The
34−function is the `formula`. The input to the function is the
35−`subject`. The output is the `product`.
36−
37−## From Hoon to Nock
38−
39−The Hoon parser turns a source expression (even one as simple as
40−`42` from the last chapter) into a noun called a `twig`. If you
41−know what an AST is, a twig is an AST. (If you don't know what
42−an AST is, it's not necessarily worth the student loans.)
43−
44−To simplify slightly, the Hoon compiler is shaped like:
45−```
46−Hoon(subject-span function-twig) => [product-span formula-nock]
47−```
48−Hoon, like Nock, is a *subject-oriented* language. Your code is
49−always executed against one input noun, the subject. For any
50−subject noun in `subject-span` (ie, argument type), the compiler
51−produces a Nock formula that computes `function-twig` on that
52−subject, and a `product-span` that is the span of the product
53−(ie, result type).
54−
55−> This is really a nontrivial difference. In a normal,
56−non-subject-oriented language, your code executes against a
57−scope, stack, environment, or other variable context, probably
58−not even a regular user-level value. For ordinary coders,
59−"subject-oriented programming" is one of the hardest things to
60−understand about Hoon; for some reason, your brain keeps wanting
61−the interpreter state to be more interesting.
62−
63−## From constants to twigs
64−
65−In the last chapter we were entering degenerate twigs like `42`.
66−Obviously a numeric constant doesn't use the subject at all, so
67−it's not a very interesting example.
68−
69−Let's save a test subject as a dojo variable:
70−```
71−~tasfyn-partyv:dojo> =test [[[8 9] 5] [6 7]]
72−```
73−The `=test` command tells the dojo to rearrange its stock subject
74−to include this `test` noun. Let's check that it's there:
75−```
76−~tasfyn-partyv:dojo> test
77−[[[8 9] 5] 6 7]
78−```
79−> If you're wondering why `[6 7]` got printed as `6 7`, remember
80−that `[]` associates to the right. Also, `=test` is not in any
81−way Hoon syntax; it's dojo syntax. Every Hoon twig is a valid
82−dojo command, but not vice versa.
83−
84−We want to use `test`, this harmless little noun, as the subject
85−for some equally harmless twigs. We can do this with the `:`
86−syntax, which composes twigs in the functional sense. The twig
87−`a:b` uses the product of twig `b` as the subject of twig `a`.
88−Trivial cases:
89−```
90−~tasfyn-partyv:dojo> 42:test
91−42
92−~tasfyn-partyv:dojo> 42:420
93−42
94−```
95−
96−## Tree addressing
97−
98−The simplest twigs produce a subtree, or "leg", of the subject.
99−A cell, of course, is a binary tree. The very simplest twig is
100−`.`, which produces the root of the tree - the whole subject:
101−```
102−~tasfyn-partyv:dojo> .:test
103−[[[8 9] 5] 6 7]
104−```
105−Like human languages, Hoon is full of irregular abbreviations.
106−The `.` syntax is a shorthand for `+1`:
107−```
108−~tasfyn-partyv:dojo> +1:test
109−[[[8 9] 5] 6 7]
110−```
111−Hoon has a simple tree addressing scheme (inherited from Nock):
112−the root is `1`, the head of `n` is `2n`, the tail is `2n+1`.
113−The twig syntax for a tree address is `+n`.
114−
115−In our example noun, each leaf is its own tree address:
116−```
117−~tasfyn-partyv:dojo> +2:test
118−[[8 9] 5]
119−~tasfyn-partyv:dojo> +3:test
120−[6 7]
121−~tasfyn-partyv:dojo> +4:test
122−[8 9]
123−~tasfyn-partyv:dojo> +5:test
124−5
125−~tasfyn-partyv:dojo> +6:test
126−6
127−~tasfyn-partyv:dojo> +7:test
128−7
129−```
130−> An instinct for binary tree geometry develops over time as you
131−use the system, rather the way most programmers learn to do
132−binary math. No, really.
133−
134−## Lark syntax
135−
136−This alternative syntax for a tree address maps noun geometry
137−directly to a glyph. Lark syntax creates a recognizable
138−geometric shape by alternating between two head/tail pairs, read
139−left to right: `-` and `+`, `<` and `>`.
140−
141−Thus `-` is `+2`, `+` is `+3`, `+<` is `+6`, `->` is `+5`, `-<+`
142−is `+9`, etc.
143−
144−> Why lark syntax? Code full of numbers is ugly and distracting,
145−and looks like hardcoded constants. We actually almost never use
146−the `+` syntax.
147−
148−## Simple faces
149−
150−Tree addressing is cool, but it would be pretty tough to program
151−in Hoon if it was the only way of getting data out of a subject.
152−
153−Let's introduce some new syntax:
154−```
155−~tasfyn-partyv:dojo> foo=42
156−foo=42
157−~tasfyn-partyv:dojo> ? foo=42
158− foo=@ud
159−foo=42
160−~tasfyn-partyv:dojo> ?? foo=42
161− [%face %foo [%atom %ud]]
162−foo=42
163−```
164−To extend our `++span` mold from the last chapter:
165−```
166−++ span
167− $% [%atom p=@tas]
168− [%cell p=span p=span]
169− [%cube p=* q=span]
170− [%face p=@tas q=span]
171− ==
172−```
173−The `%face` span wraps a label around a noun. Then we can
174−get a leg by name. Let's make a new dojo variable:
175−```
176−~tasfyn-partyv:dojo> =test [[[8 9] 5] foo=[6 7]]
177−```
178−The syntax is what you might expect:
179−```
180−~tasfyn-partyv:dojo> test
181−[[[8 9] 5] foo=[6 7]]
182−~tasfyn-partyv:dojo> foo:test
183−[6 7]
184−```
185−Does this do what you expect it to do?
186−```
187−~tasfyn-partyv:dojo> +3:test
188−foo=[6 7]
189−~tasfyn-partyv:dojo> ? +3:test
190− foo=[@ud @ud]
191−foo=[6 7]
192−~tasfyn-partyv:dojo> ?? +3:test
193− [%face %foo [%cell [%atom %ud] [%atom %ud]]]
194−foo=[6 7]
195−```
196−
197−## Interesting faces; wings
198−
199−Let's look at a few more interesting face cases. First, suppose
200−we have two cases of `foo`?
201−```
202−~tasfyn-partyv:dojo> =test [[foo=[8 9] 5] foo=[6 7]]
203−~tasfyn-partyv:dojo> foo:test
204−[8 9]
205−```
206−In the tree search, the head wins. We can overcome this with a
207−`^` prefix, which tells the search to skip its first hit:
208−```
209−~tasfyn-partyv:dojo> ^foo:test
210−[6 7]
211−```
212−`^^foo` will skip two foos, `^^^foo` three, *ad infinitum*.
213−But what about nested labels?
214−```
215−~tasfyn-partyv:dojo> =test [[[8 9] 5] foo=[6 bar=7]]
216−~tasfyn-partyv:dojo> bar:test
217−/~tasfyn-partyv/home/~2015.11.7..21.40.21..1aec:<[1 1].[1 9]>
218−-find-limb.bar
219−find-none
220−```
221−We can't search *through* a label. If we want to get our `bar`
222−out, we need to search *into* it:
223−```
224−~tasfyn-partyv:dojo> bar.foo:test
225−7
226−```
227−`bar.foo` is what we call a `wing`, a search path in a noun.
228−Note that the wing runs from left to right, ie, the opposite of
229−most languages: `bar.foo` means "bar within foo."
230−
231−Each step in a wing is a `limb`. (Most languages use metaphors;
232−Hoon abuses them.) A limb can be a tree address, like `+3` or
233−`.`, or a label like `foo`. We can combine them in one wing:
234−```
235−~tasfyn-partyv:dojo> bar.foo.+3:test
236−7
237−```
238−It's important to note the difference between `bar.foo:test`
239−and `bar:foo:test`, even though they produce the same product:
240−```
241−~tasfyn-partyv:dojo> bar:foo:test
242−7
243−```
244−`bar.foo` is one twig, which we run on the product of `test`.
245−That's different from running `bar` on the product of `foo` on
246−the product of `test`.
247−
248−> You're probably used to name resolution in variable scopes
249−and flat records, but not in trees. Partly this is because the
250−tradition in language design is to prefer semantics that make it
251−easy to build simple symbol tables, because linear search of a
252−nontrivial tree is a bad idea on '80s hardware.
253−
254−## Mutation
255−
256−Mutation? Well, not really. We can't modify nouns; the concept
257−doesn't even make sense in Hoon (or Nock).
258−
259−Rather, we build new nouns which are copies of old ones, but
260−with mutations. Let's build a "mutated" copy of our test noun:
261−```
262−~tasfyn-partyv:dojo> test
263−[[[8 9] 5] foo=[6 bar=7]]
264−~tasfyn-partyv:dojo> test(foo 42)
265−[[[8 9] 5] foo=42]
266−~tasfyn-partyv:dojo> test(+8 %eight, bar.foo [%hello %world])
267−[[[%eight 9] 5] foo=[6 [%hello %world]]]
268−```
269−As we see, there's no need for the mutant noun to be shaped
270−anything like the old noun. They're different nouns.
271−
272−A mutation, like `+8 %eight`, specifies a wing and a twig.
273−The wing, like `+8` or `bar.foo`, defines a leg to replace.
274−The twig runs against the original subject.
275−
276−Can we use mutation to build a cyclical noun? Nice try, but no:
277−```
278−~tasfyn-partyv:dojo> test(+8 test)
279−[[[[[[8 9] 5] foo=[6 bar=7]] 9] 5] foo=[6 bar=7]]
280−```
281−
282−## Progress
283−
284−Now, not only can you build a noun, you can get data out of it and
285−even evolve new, related nouns. We've still seen only two very
286−restricted kinds of twigs: constants and legs. In the [next chapter](2-syntax), we'll actually write some interesting expressions.
docs/programming/deep/2-syntax.mddeleted−476
@@ -1,476 +0,0 @@
1−---
2−next: false
3−sort: 2
4−spam: true
5−title: Hoon 101.2: syntax
6−---
7−# Hoon 101.2: full-contact syntax
8−
9−In [chapter 0](0-nouns), we read about nouns. In [chapter 1](1-twigs),
10−we discovered twigs and legs.
11−
12−Up till now, we've done everything in the dojo, Hoon's shell /
13−REPL. Now it's time to actually write a real Hoon source file,
14−and get a bit deeper into the syntax.
15−
16−## How to use this tutorial
17−
18−Ideally, you've installed an Urbit planet (if you have a ticket)
19−or comet (if you don't). See the [user doc](../../../user).
20−
21−We recommend opening up the dojo and just typing the examples;
22−you don't know a language until you know it in your fingers.
23−Also, make sure you've worked through the chapters in order.
24−
25−## Building a simple generator
26−
27−In Urbit there's a variety of source file roles, distinguished by
28−the magic paths they're loaded from: `/gen` for generators,
29−`/ape` for appliances, `/lib` for libraries, etc.
30−
31−We'll start with a generator, the simplest kind of Urbit program.
32−
33−### Create a sandbox desk
34−
35−A desk is the Urbit equivalent of a `git` branch. We're just
36−playing around here and don't intend to soil our `%home` desk with
37−test files. So let's make a sandbox:
38−```
39−|sync %sandbox our %home
40−```
41−
42−You just merged the `%home` desk on your own ship into a new
43−`%sandbox` desk. `%sandbox` has everything in `%home`, but we'll
44−add more. Future changes in `%home` (such as our over-the-air
45−updates) will also propagate into `%sandbox`.
46−
47−> Desks are always born in merges; it makes no sense to create an
48−empty desk, because anything you do in a desk depends on other
49−files in the desk. For instance, your file types (marks) are
50−defined by source files in the same desk.
51−
52−### Mount the sandbox from Unix
53−
54−Run the command
55−```
56−~tasfyn-partyv:dojo> |mount /=sandbox=/gen %gen
57−```
58−This mounts the `/gen` folder from the `%sandbox` desk in your Unix
59−directory `~/tasfyn-partyv/gen`.
60−
61−The mount is a two-way sync, "Dropbox style." When you edit a
62−Unix file and save, your edit is automatically committed as a
63−change in the `%sandbox` desk. If you change `%sandbox` files
64−from Urbit, these changes will also propagate to Unix.
65−
66−### Execute from the sandbox
67−
68−Let's set the dojo desk to `%sandbox`:
69−```
70−~tasfyn-partyv:dojo> =dir /=sandbox=
71−=% /~tasfyn-partyv/sandbox/~2015.11.13..02.49.37..9e6c/
72−```
73−Your prompt will change to:
74−```
75−~tasfyn-partyv:dojo/sandbox
76−```
77−
78−### Write hello, world
79−
80−Let's build the simplest possible kind of generator, a builder.
81−
82−First, configure your favorite Unix text editor to work with
83−Hoon. There are Hoon modes for vim, emacs and Sublime in the
84−`extras/` directory of the github repo.
85−
86−Second, create the file `~/tasfyn-partyv/gen/test.hoon`.
87−Paste this text into it:
88−```
89−:- %say |= * :- %noun
90−[%hello %world]
91−```
92−Get the spaces exactly right, please. Hoon is not in general a
93−whitespace-sensitive language, but the difference between one space and
94−two-or-more matters. And for the moment, think of
95−```
96−:- %say |= * :- %noun
97−```
98−as gibberish boilerplate, like `#include "stdio.h"` at the start of a C
99−program.
100−
101−Now, run your builder:
102−```
103−~tasfyn-partyv:dojo/sandbox> +test
104−[%hello %world]
105−```
106−This is your first Hoon *program* per se. Congrats!
107−
108−## Hoon syntax 101
109−
110−But what's up with this syntax?
111−
112−### Some syntactic relatives
113−
114−The relationship between ASCII and human programming languages
115−is like the relationship between the electric guitar and
116−rock-and-roll. If it doesn't have a guitar, it's not rock.
117−If it doesn't use ASCII, it's not a programming language.
118−
119−Some great rock guitarists play three chords, like Johnny Ramone;
120−some shred it up, like Jimmy Page. If Lisp is the Ramones of
121−syntax, Perl or APL is Led Zeppelin. No one has any right to rag
122−on Perl or APL, but Hoon is a "metalhead" language that shreds
123−its ASCII very differently.
124−
125−### The case for heavy metal
126−
127−The philosophical case for a metalhead language is threefold.
128−One, human beings are much better at associating meaning with
129−symbols than they think they are. Two, a programming language is
130−a professional tool and not a plastic beach shovel.
131−
132−> "There's a guitar player, a harp player, a double-bass player,
133−all holding up their blisters. Imagine if you downloaded a
134−library off the internet... and it gave you blisters! Right? The
135−horror! And yet... every musician has overcome a barrier to entry
136−similar to this." — Rich Hickey
137−
138−And three, the alternative to heavy metal is keywords. When you
139−use a keyword language, not only are you forcing the programmer
140−to tiptoe around a ridiculous maze of reserved words. You're
141−expressing your program through two translation steps:
142−symbol->English and English->computation.
143−
144−When you shred, you are going direct: symbol->computation. A
145−pure-functional language with syntax on the metalhead principle
146−creates a sense of "seeing the function" which no keyword
147−language can quite duplicate. Also, all the words you see on the
148−screen are actually meaningful terms in the program.
149−
150−But a great metalhead language should *not* be user-extensible.
151−That way lies King Crimson. (Maybe Haskell is King Crimson: the
152−prog-rock of programming languages.) A language is a standard;
153−if users can do whatever with ASCII, there is no standard. If a
154−metal language can work, it's only by rigorous consistency and
155−predictability. No macros, operator overloading, etc, etc.
156−
157−### A glyphic bestiary
158−
159−Any metalhead language you don't yet know is line noise. Let's
160−get you up to speed as fast as possible.
161−
162−A programming language needs to be not just read but said. But
163−no one wants to say "ampersand." Therefore, we've taken the
164−liberty of assigning three-letter names to all ASCII glyphs.
165−
166−Some of these bindings are obvious and some aren't. You'll be
167−genuinely surprised at how easy they are to remember:
168−```
169− ace [1 space] gal < pel (
170− bar | gap [>1 space, nl] per )
171− bas \ gar > sel [
172− buc $ hax # sem ;
173− cab _ hep - ser ]
174− cen % kel { soq '
175− col : ker } tar *
176− com , ket ^ tec `
177− doq " lus + tis =
178− dot . pam & wut ?
179− fas / pat @ zap !
180− sig ~
181−```
182−It's fun to confuse the muggles by using these outside Urbit.
183−
184−Hoon is not whitespace-sensitive, except that its grammar defines
185−two distinct whitespace tokens: `ace`, a single space, and `gap`,
186−anything else. `\t`, `\r`, and `\l` choke the parser and should
187−not appear in your file.
188−
189−A few digraphs also have irregular sounds:
190−```
191−== stet
192−-- shed
193−++ slus
194−-> lark
195−-< lush
196−+> dark
197−+< dush
198−```
199−
200−You might remember wondering where the "lark syntax" of chapter 1
201−got its name. Lark syntax is read in digraphs from the left, so
202−`+>+` is `darklus`.
203−
204−> `+>+` is of course `cdddr` in Lisp.
205−
206−### The shape of a twig
207−
208−As we learned in chapter 1, a twig - the parsed form of a Hoon
209−expression - is a noun. As usual in Hoon, the easiest way to
210−explain both the syntax that compiles into that noun, and the
211−semantic meaning of the noun, is the noun's physical structure.
212−
213−#### Autocons
214−
215−A twig is always a cell, and any cell of twigs is a twig
216−producing a cell. As an homage to Lisp, we call this
217−"autocons."
218−
219−Where you'd write `(cons a b)` in Lisp, you write `[a b]` in
220−Hoon. The Lisp expression, in Hoon syntax, would be `[%cons a b
221−~]`. But the Hoon twig is just `[a b]`.
222−
223−The `???` prefix prints a twig as a noun instead of running it.
224−Let's see autocons in action:
225−```
226−~tasfyn-partyv:dojo/sandbox> ??? 42
227−[%dtzy p=%ud q=42]
228−~tasfyn-partyv:dojo/sandbox> ??? 0x2a
229−[%dtzy p=%ux q=42]
230−~tasfyn-partyv:dojo/sandbox> ??? [42 0xa]
231−[[%dtzy p=%ud q=42] [%dtzy p=%ux q=42]]
232−```
233−
234−#### The stem-bulb pattern
235−
236−If the head of your twig is a cell, it's an autocons. If the
237−head is an atom, it's an unpronounceable four-letter symbol like
238−the `%dtzy` above.
239−
240−Except for the funny autocons case, twigs have the same shape
241−we see in the `span` mold, which we met in chapter 0. It's
242−essentially a variant record, the most common data structure
243−ever. In Hoon it's called a *kelp*.
244−
245−The head of a kelp (like `%dtzy` above) is called the *stem*.
246−The tail (like `[%ux 42]`) is the *bulb*.
247−
248−> Think about how to encode tagged data in a noun. It seems
249−obvious that the noun is a cell, where the head of the cell is
250−the tag (stem) and the tail is the data (bulb). Then, all these
251−nouns are cells whose head is an atom. This leaves two noun
252−shapes "out of band": atoms, and cells whose head is a cell.
253−
254−> Since no twig is an atom, a cell `[twig twig]` is always a cell
255−whose head is a cell. So we can distinguish "autocons" from all
256−stem-bulb nouns, and assign it specific semantics.
257−
258−#### Runes and stems
259−
260−A *rune* is a digraph - a sequence of two ASCII glyphs. If you
261−know C, you know digraphs like `!=` and `?:` and are used to
262−reading them as single characters.
263−
264−In Hoon you can *say* runes as words: "zaptis" and "wutcol"
265−respectively. If we had to say "exclamation point equals" and
266−"question-colon" all the time, we'd just die.
267−
268−Most twig stems are made from runes, by concatenating the glyph
269−names and removing the vowels. For example, the rune `=+`,
270−pronounced "tislus," becomes the stem `%tsls`. (Note that in
271−most noun implementations, this is a 31-bit direct value.)
272−
273−> Some twig stems (like `%dtzy`) are not runes, simply because
274−they don't have regular-form syntax and don't need to use
275−precious ASCII real estate. They are otherwise no different.
276−
277−An important point to note about runes: they're organized. The
278−first glyph in the rune defines a category. For instance, runes
279−starting with `.` compute intrinsics; runes starting with `|`
280−produce cores; etc.
281−
282−Another important point about runes: they come in two flavors,
283−"natural" (stems interpreted directly by the compiler) and
284−"synthetic" (macros, essentially).
285−
286−> Language food fight warning: one advantage of Hoon over Lisp
287−is no gensyms. All Hoon macros are perfectly hygienic. Another
288−advantage is that Hoon has no (user-level) macros. In Hoon
289−terms, nobody gets to invent their own runes, because that way
290−lies DSL write-only chaos. But if we had user-level macros,
291−they'd be perfectly hygienic as well.
292−
293−#### Tall and wide regular forms
294−
295−A good rune example is the simple rune `=+`, pronounced "tislus",
296−which becomes the stem `%tsls`. A `%tsls` twig has the mold
297−`[%tsls p=twig q=twig]`.
298−
299−The very elegance of functional languages creates a visual
300−problem that imperative languages lack. An imperative language
301−has distinct statements (with side effects) and (usually pure)
302−expressions; it's natural that in most well-formatted code,
303−statements flow vertically down the screen, and expressions grow
304−horizontally across this. This interplay creates a natural and
305−relaxing shape on your screen.
306−
307−In a functional language, there's no difference. The trivial
308−functional syntax is Lisp's, which has two major problems. One:
309−piles of expression terminators build up at the bottom of complex
310−functions. Two: the natural shape of code is diagonal. The more
311−complex a function, the more it wants to besiege the right
312−margin. The children of a node have to start to the right of its
313−parent, so the right margin bounds the tree depth.
314−
315−Hoon does not completely solve these problems, but alleviates
316−them. In Hoon, there are actually two regular syntax forms for
317−most twig cases: "tall" and "wide" form. Tall twigs can contain
318−wide twigs, but not vice versa, so the visual shape of a program
319−is very like that of a statements-and-expressions language.
320−
321−Also, in tall mode, most runes don't need terminators. Take
322−`=+`, for example. Since the parser knows to expect exactly
323−two twigs after the `=+` rune, it doesn't need any extra syntax
324−to tell it that it's done.
325−
326−Let's try a wide `=+` in the dojo:
327−```
328−~tasfyn-partyv:dojo/sandbox> =+(planet=%world [%hello planet])
329−[%hello %world]
330−```
331−(`=+` seems to be some sort of variable declaration? Let's not
332−worry about it right now. We're on syntax.)
333−
334−The wide syntax for a `=+` twig, or any binary rune: `(`, the
335−first subtwig, one space, the second subtwig, and `)`). To read
336−this twig out loud, you'd say:
337−```
338−tislus pel planet tis cen world ace sel cen hello ace planet ser per
339−```
340−> Various colloquialisms inevitably creep into this usage. "tis" not
341−in a rune gets contracted to "is"; "ace" is often just assumed; etc.
342−
343−Let's try a tall `=+` in `test.hoon`:
344−```
345−:- %say |= * :- %noun
346−=+ planet=%world
347−[%hello planet]
348−```
349−The tall syntax for a `=+` twig, or any binary rune: the rune, at
350−least two spaces or one newline, the first subtwig, at least two
351−spaces or one newline, the second subtwig. Again, tall subtwigs
352−can be tall or wide; wide subtwigs have to be wide.
353−
354−(Note that our boilerplate line is a bunch of tall runes on one
355−line, with two-space gaps. This is unusual but quite legal, and
356−not to be confused with the actual wide form.)
357−
358−To read this twig out loud, you'd say:
359−```
360−tislus gap planet is cen world gap nep cen hello ace planet pen
361−```
362−#### Layout conventions
363−
364−Should you use wide twigs or tall twigs? When? How? What
365−should your code look like? You're the artist. Except for the
366−difference between one space (`ace`) and more space (`gap`), the
367−parser doesn't care how you format your code. Hoon is not Go --
368−there are no fixed rules for doing it right.
369−
370−> Keep lines under 80 characters, though. The parser doesn't
371−enforce this yet. But it will, so watch out!
372−
373−#### Backstep indentation
374−
375−Note that the "variable declaration" metaphor of `=+` works
376−perfectly here. Because `[%hello planet]` -- despite being a
377−subtree of the the `=+` twig -- is at the same indent level. A
378−variable declaration shouldn't add indent depth. And `=+`
379−doesn't. Our code flows down the screen, not down and to the
380−right, and of course there are no superfluous terminators.
381−
382−Another example, using a ternary rune with a strange resemblance
383−to C:
384−```
385−:- %say |= * :- %noun
386−=+ planet=%world
387−?: =(%world planet)
388− [%hello planet]
389−[%goodbye planet]
390−```
391−This is called "backstep" indentation. Not all the children of
392−`?:` ("wutcol", `%wtcl`) are at the same indent as the parent;
393−but one of them is.
394−
395−It's not always the case when backstepping that the largest
396−subtwig is at the bottom and loses no indent, but it often is.
397−And we do a lot to help you maintain this.
398−
399−For instance, `=+` ("tislus") is a binary rune: `=+(a b)`. In
400−most cases of `=+` the heavy twig is `b`, but sometimes it's `a`.
401−So we can use its friend the `=-` rune ("tishep") to get the same
402−semantics with the right shape: `=-(b a)`. Similarly, instead of
403−`?:(a b c)`, we can write `?.(a c b)`.
404−
405−Not all runes have tuple structure; some are n-ary, and use
406−the `==` terminator (again, pronounced "stet"):
407−```
408−:- %say |= * :- %noun
409−=+ planet=%world
410−?+ planet
411− [%unknown planet]
412− %world [%hello planet]
413− %ocean [%goodbye planet]
414−==
415−```
416−So we occasionally lose right-margin as we descend a deep twig.
417−But we can keep this lossage low with good layout design.
418−
419−#### Irregular forms
420−
421−There are more regular forms than we've shown above, but not a
422−lot more. Hoon would be quite easy to learn if it was only its
423−regular forms. It wouldn't be as easy to read or use, though.
424−The learning curve is important, but not all-important.
425−
426−Some stems (like the `%dtzy` constants above) obviously don't and
427−can't have any kind of regular form (which is why `%dtzy` is not
428−a real digraph rune). Many of the true runes have only regular
429−forms. But some have irregular forms. Irregular forms are
430−always wide, but there is no other constraint on their syntax.
431−
432−We've already encountered one of the irregular forms: `foo=42`
433−from the last chapter, and `planet=%world` here. Let's unpack
434−this twig:
435−```
436−~tasfyn-partyv:dojo/sandbox> ?? %world
437− [%cube 431.316.168.567 %atom %tas]
438−%world
439−
440−~tasfyn-partyv:dojo/sandbox> ??? %world
441−[%dtzz %tas 431.316.168.567]
442−```
443−Clearly, `%dtzz` is one of our non-regulars. But we can wrap it
444−with our irregular form:
445−```
446−~tasfyn-partyv:dojo/sandbox> ?? planet=%world
447− [%face %planet [%cube 431.316.168.567 %atom %tas]]
448−planet=%world
449−
450−~tasfyn-partyv:dojo/sandbox> ??? planet=%world
451−[%ktts %planet %dtzz %tas 431.316.168.567]
452−```
453−Since `%ktts` is "kettis", ie, `^=`, this has to be the irregular
454−form of
455−```
456−~tasfyn-partyv:dojo/sandbox> ^=(planet %world)
457−planet=world
458−```
459−So if we wrote our example without this irregular form, it'd be
460−```
461−:- %say |= * :- %noun
462−=+ ^=(planet %world)
463−[%hello planet]
464−```
465−Or with a gratuitous use of tall form:
466−```
467−:- %say |= * :- %noun
468−=+ ^= planet %world
469−[%hello planet]
470−```
471−## Progress
472−
473−Now you know how to read Hoon! For fun, try to pronounce more of
474−the code on this page. Please don't laugh too hard at yourself.
475−
476−In the [next chapter](3-program), we'll actually write a real program...
docs/programming/deep/3-program.mddeleted−350
@@ -1,350 +0,0 @@
1−---
2−next: false
3−sort: 3
4−spam: true
5−title: Hoon 101.3: an algorithm
6−---
7−# Hoon 101.3: an algorithm
8−
9−In [chapter 0](0-nouns), we read about nouns. In [chapter 1](1-twigs),
10−we discovered twigs and legs. In [chapter 2](2-syntax), we learned
11−Hoon syntax and created our first source file.
12−
13−Now it's time for an actual, meaningful *algorithm*.
14−
15−## How to use this tutorial
16−
17−Ideally, you've installed an Urbit planet (if you have a ticket)
18−or comet (if you don't). See the [user doc](../../../user).
19−
20−We recommend opening up the dojo and just typing the examples;
21−you don't know a language until you know it in your fingers.
22−Also, make sure you've worked through the chapters in order.
23−
24−## Goal: a decrement generator
25−
26−Our algorithm is the classic Urbit example: decrement.
27−
28−If you learned [Nock](../../nock) before Hoon, you've already
29−written decrement. If not, all you need to know is that the only
30−built-in arithmetic operator in Nock is increment. To decrement,
31−we need to count up to the result with a simple loop.
32−
33−## A practical subject
34−
35−As we've seen, Hoon works by running a twig against a subject.
36−In chapter 1, we made a simple test subject that was just a few
37−constants, and applied some simple twigs to it.
38−
39−This time, we'll actually put useful working data in the subject,
40−building up more and more complex subjects as we go.
41−
42−## Subject: nil
43−
44−We'll start with the empty subject `~`:
45−```
46−:- %say |= * :- %noun
47−=> ~
48−[%hello %world]
49−```
50−The `=>` rune ("tisgar", `%tsgr`)), for `=>(p q)` executes `p`
51−against the subject, then uses that product as the subject of
52−`q`.
53−
54−> We've already used an irregular form of `=>`, or to be more
55−precise its mirror `=<` ("tisgal", `%tsgl`). In chapter 1, when we wrote
56−`+3:test`, we meant `=>(test +3)` or `=<(+3 test)`.
57−
58−What is `~`? It's Hoon `nil`, a zero atom:
59−```
60−~tasfyn-partyv:dojo/sandbox> ?? ~
61− [%cube 0 [%atom %n]]
62−~
63−```
64−We use `~` for list terminators and the like. Obviously, since
65−`[%hello %world]` is just a constant, a nil subject works as
66−well as any:
67−
68−```
69−~tasfyn-partyv:dojo/sandbox> +test
70−[%hello %world]
71−```
72−
73−## Subject: `arg=@`
74−
75−Above, we used an empty subject to avoid the very complex,
76−interesting subject your generator twig gets by default.
77−
78−But a decrement generator needs to get an argument from the
79−command line -- the number we're trying to decrement.
80−
81−This involves changing the `test.hoon` boilerplate a little.
82−Again, don't worry about the boilerplate line just yet:
83−```
84−:- %say |= [* [[arg=@ud ~] ~]] :- %noun
85−=> arg=arg
86−[%hello arg]
87−
88−~tasfyn-partyv:dojo/sandbox> +test 42
89−[%hello 42]
90−```
91−> `=> arg=arg` looks a little odd. We wouldn't ordinarily do
92−this; we're just trying to keep the subject simple.
93−
94−In case there's any doubt about the subject (remember from
95−chapter 1 that `.` means `+1`, the whole subject):
96−```
97−:- %say |= [* [[arg=@ud ~] ~]] :- %noun
98−=> arg=arg
99−.
100−
101−~tasfyn-partyv:dojo/sandbox> +test 42
102−arg=42
103−```
104−
105−## An increment generator
106−
107−We can even write a trivial increment generator using `.+`,
108−or even better its irregular form `+`:
109−```
110−:- %say |= [* [[arg=@ud ~] ~]] :- %noun
111−=> arg=arg
112−+(arg)
113−
114−~tasfyn-partyv:dojo/sandbox> +test 42
115−43
116−```
117−We'll assume these same first two lines for the rest of the
118−examples in this chapter.
119−
120−## Cores: one more kind of span
121−
122−To decrement, we need a loop. To write a loop, we need yet
123−another kind of noun: the *core*. Briefly, a core is a `[code
124−data]` pair. Our new `span` mold:
125−```
126−++ span
127− $% [%atom p=@tas]
128− [%cell p=span p=span]
129− [%core p=span q=(map ,@tas twig)]
130− [%cube p=* q=span]
131− [%face p=@tas q=span]
132− ==
133−```
134−
135−### Structure of a core
136−
137−The core is a cell `[battery payload]`. The payload is data, the
138−battery is code -- a tree of Nock formulas.
139−
140−In the `%core` span, the payload is described by an arbitrary
141−span. The battery is described by a map of symbol to twig.
142−
143−> Yes, the span contains the complete AST of the whole core.
144−This is a very different approach from most typed languages,
145−which compute function signatures. To infer the product of an
146−arm, we retrace the code in theory, but cache in practice.
147−
148−### Arms are computed attributes
149−
150−How do we use a core? Remember that Nock is a function
151−```
152−Nock(subject formula) -> product
153−```
154−To activate a core, we pull one formula from the battery, and
155−execute with the whole core as the subject. Coincidentally,
156−Nock has one macro instruction, `9`, that does just this.
157−
158−So the formula defines an arbitrary function on the core. The
159−name of this function (as defined in the twig map) is a computed
160−attribute, or *arm*.
161−
162−> Is a core an object? Not quite, because an arm is not a method.
163−Methods in an OO language have arguments. Arms are functions
164−only of the payload. (A method in Hoon is an arm that produces a
165−gate, which is another core -- but we're getting too far ahead.)
166−However, the battery does look a lot like a classic "vtable."
167−
168−### Arms and wing resolution
169−
170−It might be a good time to brush up on your [chapter 1](1-twigs).
171−The wing resolution algorithm gets a little more complicated.
172−
173−Hoon overloads computed attributes (arms) and literal attributes
174−(legs) in the same namespace. A label in a wing may refer to
175−either. when searching a core, we look for a matching arm. If
176−we find it we're done. If we don't, or if a `^` mark makes us
177−skip, we search into the payload.
178−
179−Only the last limb in the wing can activate an arm. If a name
180−resolves to a core arm, but it's not the last limb in the wing,
181−the arm produces the core itself. Similarly, when the wing is
182−not an access but a mutation, the arm refers to the core. Only
183−the end of the wing is activated.
184−
185−> Suppose `foo` is a core. `bar` is an arm on foo. Then `bar.foo`
186−computes the `bar` arm. Perhaps the product is another core.
187−Even if `moo` is an arm in this new core, `bar.foo`, the wing
188−`moo.bar.foo` does not compute `moo` on the core `bar.foo`.
189−Instead, it looks for `moo` within the payload of the core `foo`.
190−(You're looking for `moo:bar.foo`, ie, `=>(bar.foo moo)`.)
191−
192−Does this sound too tricky? Hopefully not, but it's about the
193−most complicated semantic rule you'll find in Hoon.
194−
195−## Increment with a core
196−
197−Keeping our two-line boilerplate, let's increment with a core:
198−```
199−=< inc
200−|%
201−++ inc
202− +(arg)
203−--
204−
205−~tasfyn-partyv:dojo/sandbox> +test 42
206−43
207−```
208−What's going on? We used the `|%` rune ("barcen") to produce a
209−core. (There are a lot of runes which create cores; they all
210−start with `|`, and are basically macros that turn into `|%`.)
211−
212−The payload of a core produced with `|%` is the subject with
213−which `|%` is compiled. We might say that `|%` wraps a core
214−around its subject. In this case, the subject of the `|%`,
215−and thus payload, is our `arg=@ud` argument.
216−
217−Then we used this core as the subject of the simple wing `inc`.
218−
219−> Remember that `=<(a b)` is just `=>(b a)`. The core is heavy
220−and `inc` is light, so we use `=<` to put the heavy part last.
221−
222−The prettyprinter can even print a core, sort of. Take out the
223−`=< inc`:
224−```
225−|%
226−++ inc
227− +(arg)
228−--
229−
230−~tasfyn-partyv:dojo/sandbox> +test 42
231−<1.bgq arg=42>
232−
233−~tasfyn-partyv:dojo/sandbox> ? +test 42
234− <1.bgq arg=@ud>
235−<1.bgq arg=42>
236−```
237−In this notation, `1` means the number of arms in the core, `bgq`
238−is a very short fingerprint, and `arg=42` is the payload (and
239−`arg=@ud` is the payload span).
240−
241−> Cores can be large and complex, and we obviously can't render all
242−the data in them, either when printing a type or a value. At
243−some point, you'll probably make the mistake of printing a big
244−core, maybe even the whole kernel, as an untyped noun. Just
245−press ^C.
246−
247−## Adding a counter
248−
249−To decrement, we need to count up to the argument. So we need a
250−counter in our subject, because where else would it go?
251−
252−Let's change the subject to add a counter, `pre`:
253−```
254−=> [pre=0 .]
255−=< inc
256−|%
257−++ inc
258− +(arg)
259−--
260−
261−~tasfyn-partyv:dojo/sandbox> +test 42
262−43
263−```
264−Once again, `.` is the whole subject, so we're wrapping it in a
265−cell whose head is `pre=0`. This doesn't change the way we use
266−`arg`, even though it's one level deeper in the subject tree.
267−Let's look at the subject again:
268−```
269−=> [pre=0 .]
270−.
271−
272−~tasfyn-partyv:dojo/sandbox> +test 42
273−[pre=0 arg=42]
274−~tasfyn-partyv:dojo/sandbox> ? +test 42
275− [pre=@ud arg=@ud]
276−[pre=0 arg=42]
277−```
278−There's a less cluttered way to write `=>([a .] b)`. In wide
279−mode, `=+(a b)`. A tall example:
280−```
281−=+ pre=0
282−.
283−
284−~tasfyn-partyv:dojo/sandbox> +test 42
285−[pre=0 arg=42]
286−```
287−This rune `=+`, "tislus", `%tsls`, is of course the "variable
288−declaration" we saw in chapter 2.
289−
290−## We actually decrement
291−
292−Now we can write our actual decrement program, combining the
293−features we've explored above:
294−```
295−=+ pre=0
296−=< dec
297−|%
298−++ dec
299− ?: =(arg +(pre))
300− pre
301− dec(pre +(pre))
302−--
303−
304−~tasfyn-partyv:dojo/sandbox> +test 42
305−41
306−```
307−`=(a b)` is an irregular form of `.=(a b)`, ie, "dottis" or the
308−noun `[%dtts a b]`. Likewise, `+(a)` is `.+(a)`, ie, "dotlus"
309−or `[%dtls a]`.
310−
311−`?:`, "wuttis", `%wtts`, does exactly what it does in C.
312−
313−The real action is in `dec(pre +(pre))`. We saw this same
314−mutation form in chapter 1. It's an irregular form of the `%=`
315−rune, "centis", `%cnts`.
316−
317−Here, of course, we're computing an arm of a mutated core. We're
318−recomputing the loop arm, `dec`, against a new core with an
319−incremented `pre` leg. Basically, everything interesting in Hoon
320−happens when you compute an arm of a mutated core.
321−
322−The whole program, using only regular forms, wide and tall:
323−```
324−=+ ^=(pre 0)
325−=< dec
326−|%
327−++ dec
328− ?: .=(arg .+(pre))
329− pre
330− %= dec
331− pre .+(pre)
332− ==
333−--
334−~tasfyn-partyv:dojo/sandbox> +test 42
335−41
336−```
337−A good illustration of why we need irregular forms.
338−
339−## Progress
340−
341−Now we've actually done something useful. Well, if you count
342−O(n) decrement as something useful.
343−
344−We've actually seen most of the major tools in Hoon's toolbox,
345−just in a super-minimalist selection. But we'll need a few more
346−runes to get to something that looks like real programming.
347−
348−For instance, we have a decrement algorithm, but we don't have a
349−decrement *function* - in the Hoon sense of the word, anyway. We
350−don't see `(dec arg)` in this code. That'll be the next chapter.
docs/programming/deep/4-functions.mddeleted−327
@@ -1,327 +0,0 @@
1−---
2−next: false
3−sort: 4
4−spam: true
5−title: Hoon 101.4: functions
6−---
7−# Hoon 4: toward actual functions
8−
9−In [chapter 0](0-nouns), we read about nouns. In [chapter 1](1-twigs),
10−we discovered twigs and legs. In [chapter 2](2-syntax), we learned
11−Hoon syntax and created our first source file. In [chapter 3](3-algorithm)
12−we wrote an actual algorithm.
13−
14−Now we'll go a step farther and actually define a *function*.
15−
16−## Goal: `(decrement arg)`
17−
18−Of course, Hoon is a functional language and every twig defines a
19−function of the subject. But we haven't seen the Hoon equivalent
20−of a function *declaration*. Where is Lisp `defun`?
21−
22−Also, the Hoon equivalent of a normal function call can't just
23−involve compiling the function into a Nock formula, whose subject
24−is the function's argument. As Einstein said, everything must be
25−as simple as possible, but no simpler.
26−
27−A function that worked this way would, by definition, have no
28−access to data or code other than the argument. Where would the
29−standard library go? Would we have to pass it in the argument?
30−
31−## Form of the solution
32−
33−Let's get the boilerplate out of the way. We'll keep the same
34−external generator interface, but our solution will look like:
35−
36−```
37−=< :- %say |= [* [[arg=@ud ~] ~]] :- %noun
38− (decrement arg)
39−=> ~
40−!!
41−```
42−In place of the `!!`, we'll put a core, effectively a library,
43−that exports a function `decrement`. We'll then call that
44−function with `(decrement arg)`, an irregular form of
45−`%-(decrement arg)`. Again, this core uses `=> ~` to clear
46−the subject, so we can't cheat and call `(dec arg)`.
47−
48−> `!!`, or "zapzap" or `[%zpzp ~]`, is a twig that
49−always crashes. Because it produces the empty span (`%void`), it
50−doesn't cause type inference problems.
51−
52−## Not quite a function call
53−
54−As usual, we'll get to our goal gradually. A first try:
55−```
56−=< :- %say |= [* [[arg=@ud ~] ~]] :- %noun
57− =+ gat=decrement
58− =<(run gat(sam arg))
59−=> ~
60−|%
61−++ decrement
62− =+ sam=0
63− =+ pre=0
64− |%
65− ++ run
66− ?: =(sam +(pre))
67− pre
68− run(pre +(pre))
69− --
70−--
71−
72−~tasfyn-partyv:dojo/sandbox> +test 42
73−41
74−```
75−This works, but it's hardly concise or pretty. We'll get there.
76−
77−We replaced the `!!` with a `|%` twig that produces a library
78−core. The payload of our library core is `~`, because that's the
79−subject we sent in. The battery contains one arm, `decrement`.
80−
81−The `decrement` arm produces an inner core. The payload of this
82−inner core is `[pre=0 sam=0 +>]`, where `+>` is the library core.
83−The battery of the inner core has one arm, `run`, which computes
84−our algorithm from the last chapter.
85−
86−To run our algorithm, we put the core that `decrement` produces
87−into a new leg, `gat`. Mutating this core to set `sam` to our
88−argument `arg`, we evaluate the `run` arm.
89−
90−> Why do we need this `gat` leg? Why can't we just write `=<(run
91−decrement(sam arg))`? Remember our `moo:bar.foo` problem from
92−the previous chapter. `decrement(sam arg)` mutates not the
93−*product* of the decrement arm, but the core that computes it.
94−There's no `sam` in that subject, so the twig won't compile.
95−
96−## Better is worse
97−
98−To make this code look simpler, we need to make it more complex.
99−Our next try uses not two nested cores, but *three*:
100−```
101−=< :- %say |= [* [[arg=@ud ~] ~]] :- %noun
102− =+ gat=decrement
103− =<(run gat(sam arg))
104−=> ~
105−|%
106−++ decrement
107− =+ sam=0
108− |%
109− ++ run
110− =+ pre=0
111− =< loop
112− |%
113− ++ loop
114− ?: =(sam +(pre))
115− pre
116− loop(pre +(pre))
117− --
118− --
119−--
120−```
121−This is actually the final structure of our function, but uses
122−none of the syntactic tricks we'll use to make it pretty.
123−
124−> Why do we need to make the code more complex? Because we need
125−it to use the regular form that our synthetic runes, ie macros,
126−use to express function definitions and calls.
127−
128−## Loop sugar
129−
130−Look at little `loop`. It works just like our old `run`. But
131−there's something nice about it: we don't use the symbol `loop`
132−anywhere outside these 7 lines of code. It's not exported.
133−
134−Therefore, the `loop` name is useless and redundant. Making up
135−names is one of the hard problems in computer science, so why
136−solve it for no reason?
137−
138−So Hoon has an *empty name*: `$`. As a constant, `$` is a
139−zero-length symbol (`%$` instead of `%foo`) As a limb is the
140−`buc` symbol (`$`).
141−
142−Replacing `loop` with `$`, our loop becomes:
143−```
144−=< $
145−|%
146−++ $
147− ?: =(sam +(pre))
148− pre
149− $(sam +(run))
150−--
151−```
152−
153−This may not seem like a huge improvement. It's not. But it
154−lets us match and move to the synthetic rune `|-`, "barhep":
155−```
156−|- ?: =(sam +(pre))
157− pre
158− $(pre +(pre))
159−```
160−`|-` is simply the canonical Hoon loop. All we've done to use a
161−core as a loop is to name our arm `$`, and evaluate it on the
162−core we just made.
163−
164−Our program now:
165−```
166−=< :- %say |= [* [[arg=@ud ~] ~]] :- %noun
167− =+ gat=decrement
168− =<(run gat(sam arg))
169−=> ~
170−|%
171−++ decrement
172− =+ sam=0
173− |%
174− ++ run
175− =+ pre=0
176− |- ?: =(sam +(pre))
177− pre
178− $(pre +(pre))
179− --
180−--
181−```
182−
183−## Almost to lambda
184−
185−Could we use `$` for `++run`? It certainly sounds like the same
186−kind of thing as `++loop`. The word "run" just means "do it".
187−Why should we be saying "do it" all the time?
188−
189−Our third try, with this change:
190−```
191−=< :- %say |= [* [[arg=@ud ~] ~]] :- %noun
192− =+ gat=decrement
193− =<($ gat(sam arg))
194−=> ~
195−|%
196−++ decrement
197− =| sam=@ud
198− |%
199− ++ $
200− =+ pre=0
201− |- ?: =(sam +(pre))
202− pre
203− $(pre +(pre))
204− --
205−--
206−
207−~tasfyn-partyv:dojo/sandbox> +test 42
208−41
209−```
210−> Besides `run` to `$`, we changed `=+ sam=0` to `=| sam=@ud`.
211−This is some mold magic we'll explain in the next chapter, but
212−it basically does the same thing: pushes a leg named `sam`, whose
213−value is a number we'll later overwrite.
214−
215−This use of `$` in a core, very similar to the way we used `$` in
216−our `|-` loop, smells like it too should have a rune. It does:
217−```
218−=< :- %say |= [* [[arg=@ud ~] ~]] :- %noun
219− =+ gat=decrement
220− =<($ gat(sam arg))
221−=> ~
222−|%
223−++ decrement
224− |= sam=@ud
225− =+ pre=0
226− |- ?: =(sam +(pre))
227− pre
228− $(pre +(pre))
229−--
230−
231−~tasfyn-partyv:dojo/sandbox> +test 42
232−41
233−```
234−Doesn't `decrement` look like a function? Indeed, we're done with
235−the `decrement` arm. This is what it should look like.
236−
237−> If you squint a little, `|=` ("bartis") might even be a strange,
238−deformed ASCII-art lambda.
239−
240−Since it's doing something simple, we might well even compress
241−the whole body of `decrement` into one wide-form line:
242−```
243−=+(pre=0 |-(?:(=(sam +(pre)) pre $(pre +(pre)))))
244−```
245−This is a bit tight for most. But we can get really compact by
246−dropping the labels and going to full geometry:
247−
248−```
249−=< :- %say |= [* [[arg=@ud ~] ~]] :- %noun
250− =+ gat=decrement
251− =<($ gat(sam arg))
252−=> ~
253−|%
254−++ decrement |=(@ud =+(0 |-(?:(=(+>+< +<) +< $(+< +(+<))))))
255−--
256−```
257−> It's not a good idea to actually program this way. But it does
258−strengthen your Hoon tree-geometry muscles. To use tree
259−geometry, you have to really know the shape of your subject.
260−
261−## Structure of a gate
262−
263−What is the noun produced by `decrement`? In true Hoonese it's
264−a *gate*, but nobody will hate you for saying "function." And
265−while we *slam* our gates, you can feel free to just "call" them.
266−
267−Every gate is a core; not every core is a gate. All cores are
268−shaped like `[battery payload]`. A core is a gate if its payload
269−is a cell, and its battery has one arm, `$`. So a gate is shaped
270−like `[formula [sample context]]`.
271−
272−To slam (call) a gate, you replace its sample (`+6` or `+<`,
273−"lusgal" or "dish") with your argument. "Multiple arguments" are
274−a single sample that's a tuple. So our code should actually read
275−```
276− =+ gat=decrement
277− =<($ gat(+< arg))
278−```
279−This `=+` sequence remains ugly. Once again, `decrement(+< arg)`
280−is not a mutation to the product of `decrement`, but a mutation
281−to the core that produces `decrement`. Fortunately, there's a
282−sugary rune that combines the semantics of both these lines:
283−```
284− %*($ decrement +< arg))
285−```
286−This mutates the product of `decrement` as specified. (`+< arg`
287−in the wide form of `$*` is just the first of n comma-separated
288−pairs; we could write `%*($ decrement +< arg, +> foo, moo 42)`.
289−
290−> Arguably, %* is oversweetened; $:(decrement +< arg)
291−would be simpler and better. Hoon isn't perfect.
292−
293−## Slamming the gate
294−
295−Anyway, it shouldn't come as a surprise that a synonym for
296−`%*($ function +< argument)` is `%-(function argument)`. And an
297−irregular form of this is just `(function argument)`.
298−
299−The irregular syntax constructs multiple-argument syntax as a
300−tuple; `(add 2 2)` is `(add [2 2])`, `(rsh 3 1 5)` is `(rsh [3 1 5])`.
301−If there are no arguments, `(function)`, this means `$:function`,
302−ie, `=>(function $)`.
303−
304−We can also take the `=> ~` out, since we now know what we're
305−doing. The final program:
306−```
307−=< :- %say |= [* [[arg=@ud ~] ~]] :- %noun
308− (decrement arg)
309−|%
310−++ decrement
311− |= sam=@ud
312− =+ pre=0
313− |- ?: =(sam +(pre))
314− pre
315− $(pre +(pre))
316−--
317−```
318−## Progress
319−
320−In most functional languages, a function is a primitive. In Hoon
321−it's a macro, and a pretty complex macro at that. We spent four
322−chapters building the concept up out of much smaller pieces.
323−
324−Fortunately, once you have functions you can do anything. We
325−still have a fair bit to learn, but we've now seen all the
326−fundamental building blocks of programming in Hoon. In the next
327−chapter, we'll get back into molds and spans.
docs/programming/core/demo.md → docs/programming/demo.mdrenamed
The content is the same.
docs/programming/core/examples.md → docs/programming/examples.mdrenamed
The content is the same.
docs/programming/core/mint.md → docs/programming/mint.mdrenamed
The content is the same.
docs/programming/core/nock.md → docs/programming/nock.mdrenamed+17−12
@@ -11,7 +11,7 @@ The Nock VM is a Turing-complete function that maps a cell
1111data, `formula` is the code, and `product` is the result.
1212
1313To program in Hoon, this is all you need to know about Nock.
14−It's probably at least worth skimming this definition, though.
14+It's probably at least worth skimming the definition, though.
1515
1616(Also, the Hoon programmer should know that (a) tail call
1717elimination in Nock is straightforward; and (b) tail calls in
@@ -77,9 +77,9 @@ The pseudocode notation defines five prefix operators: `?`, `+`,
7777`=[x y]` produces `0` if `x` and `y` are the same noun, `1`
7878otherwise.
7979
80−`/` is a tree addressing operator. The root of the tree is `1`;
81−the left child of any node `n` is `2n`; the right child is
82−`2n+1`. `/[x y]` is the subtree of `y` at address `x`.
80+`/` (`slot`) is a tree addressing operator. The root of the tree
81+is `1`; the left child of any node `n` is `2n`; the right child
82+is `2n+1`. `/[x y]` is the subtree of `y` at address `x`.
8383
8484(For instance, `/[1 [531 25 99]]` is `[531 25 99]`; `/[2 [531 25
858599]]` is `531`; `/[3 [531 25 99]]` is `[25 99]`; `/[6 [531 25
@@ -130,11 +130,10 @@ a subject whose head is the product of formula `b` with the
130130original subject, and whose tail is the original subject. (Think
131131of `8` as a ``variable declaration'' or ``stack push.'')
132132
133−`[9 b c]` computes the product of formula `c` with the
134−current subject; from that product `d` it extracts a formula
135−`e` at tree address `b`, then computes `*[d e]`.
136−(Think, very roughly, of `d` as an object and `e` as a
137−method.)
133+`[9 b c]` computes the product of formula `c` with the current
134+subject; from that product `d` it extracts a formula `e` at tree
135+address `b`, then computes `*[d e]`. (`9` is designed to fit
136+Hoon; `d` is a `core` (object), `e` points to an arm (method).)
138137
139138`[10 b c]` is a *hint* semantically equivalent to the formula
140139`c`. If `b` is an atom, it's a *static hint*, which is just
@@ -154,9 +153,15 @@ The reader might wonder how an interpreter whose only arithmetic
154153operation is increment can ever be practical.
155154
156155The short answer is that a Nock interpreter doesn't have to use
157−the algorithm above; it just has to get the same result as the
156+the algorithm above. It just has to get the *same result* as the
158157algorithm above.
159158
160159The algorithm for decrementing an atom is to count up to it, an
161−O(n) operation. But if we know we are running a decrement
162−formula,
160+O(n) operation. But if the interpreter knows it's running a
161+decrement formula, it can use the CPU to decrement directly.
162+
163+Detecting any Nock formula whose semantics match some function,
164+like decrement, is a hard problem. But in practice there is only
165+one decrement we run -- the decrement in the kernel library.
166+Declaring this formula (with a hint, instruction `10` above)
167+and recognizing it is not hard.
docs/programming/core/noun.md → docs/programming/noun.mdrenamed+5−3
@@ -17,9 +17,11 @@ brackets associating right; `[a b c]` means `[a [b c]]`. In Hoon
1717we also see `{a b c}`, a constructor (`mold`) for `[a b c]`.
1818
1919Nouns are almost like Lisp's S-expressions, but S-expressions
20−have dynamic type tags in atoms. Nouns can lose this feature
21−because they're designed to sit under a static type system. For
22−the same reason, nouns tend to be tuple-centric where Lisp is
20+have dynamic type tags in atoms; the difference between a symbol
21+and an integer, for instance, is dynamic type. Lisp needs this
22+dynamic type because it doesn't expect a static type system.
23+
24+For the same reason, nouns tend to be tuple-centric where Lisp is
2325list-centric. Lisp `(a b c)` as a noun is `[a b c 0]`; Nock `[a
2426b c]` is Lisp `(a . b . c)`.
2527
docs/programming/core/philosophy.md → docs/programming/philosophy.mdrenamed+8−1
@@ -34,10 +34,17 @@ better than everyone thinks at learning languages (symbols and/or
3434grammars), and worse at learning abstractions (proofs and/or
3535algorithms). At first glance, Hoon may look gnarly (though its
3636squiggles are more structured than most ASCII-heavy languages).
37−But there's surprisingly little under the hood.
37+But there's less than you might expect under the hood.
38+
39+(Hoon has simple principles and a lot of details. To keep the
40+details from getting overwhelming, we start out learning a
41+simplified subset called Core Hoon. Note that some of the
42+internal structures we show are simplified to match the subset.
43+These simplifications are corrected in the Advanced section.)
3844
3945Keeping the Hoon-to-Nock mapping straightforward is a priority.
4046Very roughly, Hoon is to Haskell as C is to Pascal. Pascal tries
4147to conceal its implementation beneath a layer of abstract
4248concepts; C, an "advanced macro assembler," tries to provide a
4349similar user experience with few abstract ideas as possible.
50+
docs/programming/reference.mddeleted−9
@@ -1,9 +0,0 @@
1−---
2−sort: 4
3−---
4−
5−# Reference
6−
7−Background information on Nock, Hoon, Arvo,
8−
9−<list />
docs/programming/reference/cheat-sheets.mddeleted−10
@@ -1,10 +0,0 @@
1−---
2−sort: 3
3−---
4−
5−Quick references
6−================
7−
8−These are designed to live by your side while programming. Short, simple references for the average hoon programmer.
9−
10−<list></list>
docs/programming/reference/runes.mddeleted−84
@@ -1,84 +0,0 @@
1−---
2−sort: 1
3−---
4−
5−Runes
6−=====
7−
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 src="bc" dataPreview="true" className="runes" childIsFragment="true"></list>
17−
18−---
19−
20−## `| bar` (cores)
21−
22−<list src="br" dataPreview="true" className="runes" childIsFragment="true"></list>
23−
24−---
25−
26−## `: col` (tuples)
27−
28−<list src="cl" dataPreview="true" className="runes" childIsFragment="true"></list>
29−
30−---
31−
32−## `% cen` (invocations)
33−
34−<list src="cn" dataPreview="true" className="runes" childIsFragment="true"></list>
35−
36−---
37−
38−## `. dot` (nock)
39−
40−<list src="dt" dataPreview="true" className="runes" childIsFragment="true"></list>
41−
42−---
43−
44−## `# hax` (printing)
45−
46−<list src="hx" dataPreview="true" className="runes" childIsFragment="true"></list>
47−
48−---
49−
50−## `^ ket` (casting)
51−
52−<list src="kt" dataPreview="true" className="runes" childIsFragment="true"></list>
53−
54−---
55−
56−## `~ sig` (hints)
57−
58−<list src="sg" dataPreview="true" className="runes" childIsFragment="true"></list>
59−
60−---
61−
62−## `; sem` (composition)
63−
64−<list src="sm" dataPreview="true" className="runes" childIsFragment="true"></list>
65−
66−---
67−
68−## `= tis` (subject modifiers)
69−
70−<list src="ts" dataPreview="true" className="runes" childIsFragment="true"></list>
71−
72−---
73−
74−## `? wut` (conditional)
75−
76−<list src="wt" dataPreview="true" className="runes" childIsFragment="true"></list>
77−
78−---
79−
80−## `! zap` (special)
81−
82−<list src="zp" dataPreview="true" className="runes" childIsFragment="true"></list>
83−
84−</div>
docs/programming/reference/runes/bc.mddeleted−11
@@ -1,11 +0,0 @@
1−---
2−sort: 2
3−---
4−
5−# `$ buc` (molds)
6−
7−##### Molds are types, but we don't have types.
8−
9−<list dataPreview="true" className="runes" linkToFragments="true"></list>
10−
11−<kids className="runes"></kids>
docs/programming/reference/runes/br.mddeleted−11
@@ -1,11 +0,0 @@
1−---
2−sort: 1
3−---
4−
5−# `| bar` (cores)
6−
7−##### Cores are sort of like objects, but not quite.
8−
9−<list dataPreview="true" className="runes" linkToFragments="true"></list>
10−
11−<kids className="runes"></kids>
docs/programming/reference/runes/br/brcb.mddeleted−86
@@ -1,86 +0,0 @@
1−---
2−sort: 7
3−---
4−
5−# `:door`, `|_`, "buccab", `{$door p/moss q/(map term twig)}`
6−
7−Door: core with sample (input values).
8−
9−Produces: a core whose sample is `p` and arms are `q`.
10−
11−Regular form: *1-fixed*, then *battery*
12−
13−Similar to `|%`, but also takes input data (aka sample)
14−available within the entire core. Cores of this type are called doors.
15−Moreover, `|_` only accepts dry or `%elm` arms--in other words,
16−type checking on these arms is performed on the input before computation.
17−
18−Examples:
19−
20− /~zod/try=> =mol
21− |_ a/@ud
22− ++ succ +(a)
23− ++ prev (dec a)
24− --
25− /~zod/try=> ~(succ mol 1)
26− 2
27− /~zod/try=> ~(succ mol ~(succ mol ~(prev mol 5)))
28− 6
29−
30−In this example we create a door `mol` that operates on a `@ud`,
31−`a`. We add two arms to our door, `++succ` and `++prev`, and invoke them
32−with the irregular form of `%~`. Doors are commonly invoked with
33−`%~`, irregular form `~(arm door sample)`, which replaces the door's
34−sample and calls the specified arm.
35−
36− /~zod/try=> =kom
37− |_ a/(list)
38− ++ hed -.a
39− ++ tal +.a
40− --
41− new var %kom
42− /~zod/try=> =kot
43− |/ a=(list)
44− +- hed -.a
45− +- tal +.a
46− --
47− new var %kot
48− /~zod/try=> ~(tal kom "abc")
49− t=~[98 99]
50− /~zod/try=> ~(tal kot "abc")
51− t="bc"
52− /~zod/try=> ~(tal kot [1 2 3 ~])
53− [2 3 ~]
54− /~zod/try=> ~(tal kom [1 2 3 ~])
55− t=~[2 3]
56−
57−Here we're demonstrating the difference between `|_` and `|/`. We create
58−a nearly identical door using both runes, each with an arm that produces
59−the tail of the sample `a`. You can see that wet functions use the
60−sample as a mold to produce well-typed output.
61−
62− ++ ne
63− |_ tig=@
64− ++ d (add tig '0')
65− ++ x ?:((gte tig 10) (add tig 87) d)
66− ++ v ?:((gte tig 10) (add tig 87) d)
67− ++ w ?:(=(tig 63) '~' ?:(=(tig 62) '-' ?:((gte tig 36) (add tig 29) x)))
68− --
69− ::
70−
71−`++ne` is used to print a single digit in base 10, 16, 32, or 64 and is
72−a part of the hoon standard library. You can find it in `hoon.hoon`.
73−`|_` is very commonly used throughout our standard library for groups of
74−arms who all take the same sample.
75−
76− ~zod/try=> ~(x ne 12)
77− 99
78− ~zod/try=> `@t`~(x ne 12)
79− 'c'
80− ~zod/try=> `@ux`12
81− 0xc
82−
83−Here we put `++ne` to work a bit. Our first call renders 12 in base 16.
84−Since `99` is within the ASCII character range, we can cast it to a
85−`@t` and get `'c'`. Conveniently, casting `12` to a `@ux`
86−results in `0xc`.
docs/programming/reference/runes/br/brcn.mddeleted−80
@@ -1,80 +0,0 @@
1−---
2−sort: 1
3−---
4−
5−# `:core, |%, "buccab", {$shoe p/twig}`
6−
7−Generic core.
8−
9−Produces: a core with `p`, an associative array with `++term` keys and `++foot` values.
10−
11−Regular form: *Battery*
12−
13−Example:
14−
15− /~zod/try=>
16− =a |%
17− ++ n 100
18− ++ g |= b/@
19− (add b n)
20− --
21− new var %a
22− /~zod/try=>
23− (g.a 1)
24− 101
25−
26−Here we create a core with two arms `n`, a constant, and `g`, a simple
27−function. `g` adds our constant `n` to whatever is passed to it.
28−
29− /~zod/try=>
30− =a |%
31− ++ l |%
32− ++ r 100
33− ++ s 4
34− --
35− ++ g |= b/@
36− (div (add b r:l) s:l)
37− --
38− changed %a
39− /~zod/try=>
40− (g.a 4)
41− 26
42−
43−Extending our previous example a bit, we nest a core inside our arm `l`
44−and make our function `g` a bit more complicated. `g` now computes the
45−sum of its argument and the arm `r` inside `l`, and divides that by `s`
46−inside `l`.
47−
48− ++ si :: signed integer
49− |%
50− ++ abs |=(a/@s (add (end 0 1 a) (rsh 0 1 a)))
51− ++ dif |=([a/@s b/@s] (sum a (new !(syn b) (abs b))))
52− ++ dul |=([a/@s b/@] =+(c=(old a) ?:(-.c (mod +.c b) (sub b +.c))))
53− ++ fra |= [a/@s b/@s]
54− (new =(0 (mix (syn a) (syn b))) (div (abs a) (abs b)))
55− ++ new |=([a/? b/@] `@s`?:(a (mul 2 b) ?:(=(0 b) 0 +((mul 2 (dec b))))))
56− ++ old |=(a/@s [(syn a) (abs a)])
57− ++ pro |= [a/@s b/@s]
58− (new =(0 (mix (syn a) (syn b))) (mul (abs a) (abs b)))
59− ++ rem |=([a/@s b/@s] (dif a (pro b (fra a b))))
60− ++ sum |= [a/@s b/@s]
61− ~| %si-sum
62− =+ [c=(old a) d=(old b)]
63− ?: -.c
64− ?: -.d
65− (new & (add +.c +.d))
66− ?: (gte +.c +.d)
67− (new & (sub +.c +.d))
68− (new | (sub +.d +.c))
69− ?: -.d
70− ?: (gte +.c +.d)
71− (new | (sub +.c +.d))
72− (new & (sub +.d +.c))
73− (new | (add +.c +.d))
74− ++ sun |=(a/@u (mul 2 a))
75− ++ syn |=(a/@s =(0 (end 0 1 a)))
76− --
77−
78−`++si`, found in `hoon.hoon`, uses `|%` to create a core whose arms
79−contain functions used to calculate with signed integers, `@s`. In this
80−case our core is made up entirely of functions.
docs/programming/reference/runes/br/brdt.mddeleted−86
@@ -1,86 +0,0 @@
1−---
2−sort: 3
3−---
4−
5−# `:trap. |., "bardot", {$trap p/twig}`
6−
7−Trap: `|=` with no argument; expression not evaluated automatically.
8−
9−Produces: a core with a single arm `$` that it takes no arguments and is not automatically
10−called (you must activate it with the irregular wideform of `%-`, which is
11−`()`).
12−
13−Regular form: *1-fixed*
14−
15−Examples
16−--------
17−
18− /~zod/try=>
19− =a |.(42)
20− changed %a
21− /~zod/try=>
22− a
23− < 1.yln
24− [ a
25− < 2.yqy
26− [ a
27− < 3.kii
28− [ a
29− < 2.wvx
30− [ a=<2.kqf 2.hng 250.qyy 41.raw 414.hhh 100.xkc 1.ypj %164>
31− <2.hng 250.qyy 41.raw 414.hhh 100.xkc 1.ypj %164>
32− ]
33− >
34− <2.hng 250.qyy 41.raw 414.hhh 100.xkc 1.ypj %164>
35− ]
36− >
37− <2.hng 250.qyy 41.raw 414.hhh 100.xkc 1.ypj %164>
38− ]
39− >
40− <2.hng 250.qyy 41.raw 414.hhh 100.xkc 1.ypj %164>
41− ]
42− >
43− /~zod/try=>
44− (a)
45− 42
46− /~zod/try=>
47− $:a
48− 42
49−
50−This is a simple example. We assign a shell variable `a` to be a trap
51−that simply produces the atom `42`. Printing `a` prints the core and its
52−context. Calling `a` using `(`, the irregular form of `%-`, produces
53−its value. As does pulling the arm `$` from inside it using `$:a`.
54−
55− /~zod/try=>
56− =a 10
57− changed %a
58− /~zod/try=>
59− =b |. (add a 2)
60− changed %b
61− /~zod/try=>
62− (b)
63− 12
64−
65−In this case we assign a variable `a` to be `10`, and create a trap `b`
66−to add `2` to it. This is a trivial example, but is meant to show that
67−traps are useful when you need a gate that only operates on values that
68−are already in its context.
69−
70− /~zod/try=>
71− =loop =+ reps=10
72− =+ step=0
73− =+ outp=0
74− |.
75− ?: =(step reps)
76− outp
77− $(outp (add outp 2), step +(step))
78− changed %loop
79− /~zod/try=> (loop)
80− 20
81−
82−Expanding on our previous example, we create a trap with three local
83−variables, `reps`, `step`, and `outp`. We use a trap to create a loop,
84−testing each time if `step` is equal to `reps`, if so producing `outp`
85−otherwise calling our trap again with `outp` replaced with `outp+2`, and
86−`step` incremented.
docs/programming/reference/runes/br/brhp.mddeleted−46
@@ -1,46 +0,0 @@
1−---
2−sort: 4
3−---
4−
5−# `:loop, |-, "barfas", {$trap p/twig}`
6−
7−Trap: automatically called function with no arguments.
8−
9−Produces: a 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.
10−
11−Regular form: *1-fixed*
12−
13−Examples:
14−
15− /~zod/try=> |-(42)
16− 42
17−
18−In contrast to our `|.` example, `|-` is kicked by default, so its
19−internals are produced immediately.
20−
21− /~zod/try=> =+ a=`*`~[41 42]
22− |-
23− ?~ a
24− ~
25− [-.a %m $(a +.a)]
26− [41 %m [42 %m ~]]
27−
28−In this case we use `|-` for one of its most common applications, a
29−loop. Here we walk across `a` by calling `$` with `a` replaced by `+.a`,
30−producing a nested tuple.
31−
32− ++ dec :: decrement
33− ~/ %dec
34− |= a/@
35− ~| %decrement-underflow
36− ?< =(0 a)
37− =+ b=0
38− |- ^- @
39− ?: =(a +(b))
40− b
41− $(b +(b))
42−
43−In `++dec`, found in `hoon.hoon`, `|-` creates a trap that contains the
44−test and looping semantics. Essentially, we count up to `a-1` by
45−incrementing `b`. Using `|-` inside an existing core as we do here is
46−its most common use.
docs/programming/reference/runes/br/brkt.mddeleted−69
@@ -1,69 +0,0 @@
1−---
2−sort: 6
3−---
4−
5−# `:cork`, `|^`, "barket", `{$cork p/twig q/(map term foot)}`
6−
7−Same as `|-` (expression evaluated automatically) except that it can contain internal arms.
8−
9−Produces a `%gold` (XX elaborate on what gold, book mean?) book with sample `p` as a `%$(p)`, and a list of arms `q`.
10−`q` must be closed with a `--`.
11−
12−Regular form: *1-fixed*
13−
14−Examples:
15−
16− /~zod/try=> =+ a=21
17− |^ [square double]
18− ++ square (mul a a)
19− ++ double (mul 2 a)
20− --
21− [441 42]
22−
23−Here `|^` computes a result by calling its helper arms `++square` and
24−`++double`. Notice that `a` is also in the context. `|^` is most
25−commonly used inside another gate or core.
26−
27− ++ mum :: mug with murmur3
28− ~/ %mum
29− |= a/*
30− |^ (trim ?@(a a (mix $(a -.a) (mix 0x7fff.ffff $(a +.a)))))
31− ++ spec :: standard murmur3
32− |= [syd/@ key/@]
33− ?> (lte (met 5 syd) 1)
34− =+ ^= row
35− |= [a/@ b/@]
36− (con (end 5 1 (lsh 0 a b)) (rsh 0 (sub 32 a) b))
37− =+ mow=|=([a/@ b/@] (end 5 1 (mul a b)))
38− =+ len=(met 5 key)
39− =- =. goc (mix goc len)
40− =. goc (mix goc (rsh 4 1 goc))
41− =. goc (mow goc 0x85eb.ca6b)
42− =. goc (mix goc (rsh 0 13 goc))
43− =. goc (mow goc 0xc2b2.ae35)
44− (mix goc (rsh 4 1 goc))
45− ^= goc
46− =+ [inx/0 goc/syd]
47− |- ^- @
48− ?: =(inx len) goc
49− =+ kop=(cut 5 [inx 1] key)
50− =. kop (mow kop 0xcc9e.2d51)
51− =. kop (row 15 kop)
52− =. kop (mow kop 0x1b87.3593)
53− =. goc (mix kop goc)
54− =. goc (row 13 goc)
55− =. goc (end 5 1 (add 0xe654.6b64 (mul 5 goc)))
56− $(inx +(inx))
57− ::
58− ++ trim :: 31-bit nonzero
59− |= key/@
60− =+ syd=0xcafe.babe
61− |- ^- @
62− =+ haz=(spec syd key)
63− =+ ham=(mix (rsh 0 31 haz) (end 0 31 haz))
64− ?.(=(0 ham) ham $(syd +(syd)))
65− --
66− ::
67−
68−`++mum` is a hashing gate, which uses two helper arms to compute
69−its results. The `|^` at the top performs the computation.
docs/programming/reference/runes/br/brls.mddeleted−32
@@ -1,32 +0,0 @@
1−---
2−sort: 9
3−---
4−
5−`|+ barlus`
6−===========
7−
8−Function with unreadable sample.
9−
10−Produces:a dry `%iron` gate with argument (aka sample) `$*(p)` and arms
11−`q`. Similar to `|=`, but differs in that its input (sample) cannot be
12−read and thus cannot interfere with the type system.
13−
14−Examples:
15−
16− ~zod/try=> +<:|+(a/@ a)
17− ! -axis.6
18− ! peek-park
19− ! exit
20− ~zod/try=> +<:|=(a/@ a)
21− a=0
22−
23−Here we're trying to read the sample, using the head of the tail of two different kinds of functions. With `|+` you can see we cause an error, whereas with `|=` our default sample is `a=0`.
24−
25− ~zod/try=> %.(20 |+(a/@ a))
26− 20
27− ~zod/try=> %.(20 |=(a/@ a))
28− 20
29− ~zod/try=> %.(20 |+(a/@ (add a 12)))
30− 32
31−
32−Kicking a `|+` gate, however, is the same as `|=`.
docs/programming/reference/runes/br/brtr.mddeleted−40
@@ -1,40 +0,0 @@
1−---
2−sort: 10
3−---
4−
5−# `:gill`, `|*`, "bartar", `{$gill p/twig q/twig}`
6−
7−Function with arguments; type checking at call time
8−
9−Produces: a gate with argument `p` and body `q`. Type checking happens at
10−call time.
11−
12−Regular form: *1-fixed*, followed by Battery
13−
14−Examples:
15−
16− ~zod/try=> %.('c' |*(a/@ a))
17− 'c'
18− ~zod/try=> %.('c' |=(a/@ a))
19− 99
20−
21−This is a concise way of understanding the difference between `|*` and
22−`|=`. We use `%.` in both cases to slam each gate with the sample `'c'`.
23−`|=` uses its mold `a=@` to cast `'c'` to an atom (`99` is the ASCII
24−code for `'c'`). `|*` simply ensures that the product type matches the
25−input sample type.
26−
27− ++ flop :: reverse
28− ~/ %flop
29− |* a/(list)
30− => .(a (homo a))
31− ^+ a
32− =+ b=`_a`~
33− |-
34− ?@ a
35− b
36− $(a t.a, b [i.a b])
37−
38−In `++flop`, `|*` is used so the type information within the passed
39−in list is maintained. Without a `|*`, any cords would be cast to nouns
40−as in our previous example.
docs/programming/reference/runes/br/brts.mddeleted−35
@@ -1,35 +0,0 @@
1−---
2−sort: 2
3−---
4−
5−# `:gate`, `|=`, "bartis", `{$gate p/twig q/twig}`
6−
7−Function with argument(s).
8−
9−Produces: a dry `%gold` gate with sample `$*(p)`, arm `q`. A gate is a core with one arm, `$`, the
10−empty name.
11−
12−Examples
13−
14− ~zod/try=> =inc |=(a/@ +(a))
15− ~zod/try=> (inc 20)
16− 21
17−
18−Here we create a very simple gate that increments its sample, `a`. You
19−can think of `|=` as similar to a straightforward function that takes
20−arguments.
21−
22− ++ add :: add
23− ~/ %add
24− |= [a/@ b=@]
25− ^- @
26− ?: =(0 a)
27− b
28− $(a (dec a), b +(b))
29−
30−In ++add, from `hoon.hoon`, `|=` creates a gate whose sample takes
31−two atoms labeled `a` and `b`, and whose arm evaluates an expression
32−that produces the sum of the atoms by decrementing `a` until it is `0`
33−and incrementing `b` at each step. Here, `$` is used for recursion,
34−calling the gate produced by `|=` with `a` replaced by `(dec a)` and `b`
35−replaced by `+(b)`.
docs/programming/reference/runes/br/brwt.mddeleted−30
@@ -1,30 +0,0 @@
1−---
2−sort: 5
3−---
4−
5−# `:tray`, `|?`, "barwut", `{$tray p/twig}`
6−
7−`|-` with hidden context.
8−
9−Produces: a lead trap with expression `p` whose context is hidden to avoid type conflicts.
10−
11−Examples:
12−
13− > |?(20)
14− < 1?aoy
15− { {a/^#3.?({i/@ud t/#3} ^#2.?({i/@ud t/#2} it(@ud))) our/@p now/@da eny/@uvI}
16− $~
17− <282.ucw 42.juj 402.arm 110.jyx 1.ztu $151>
18− }
19− > ~zod/try=> +:|?(20)
20− > +:|.(20)
21− [ [ a=[i=1 t=[i=2 t=[i=3 t=~]]]
22− our=~sivtyv-barnel
23− now=~2016.3.29..04.14.18..9a26
24− eny=0v16.dkepv.qm6er.7v2mh.kcdva.oisv9.th4dl.era7v.pj315.fd6la.76d34
25− ]
26− ~
27− <282.ucw 42.juj 402.arm 110.jyx 1.ztu $151>
28− ]
29−
30−As demonstrated above, a lead core's payload cannot be read or written.
docs/programming/reference/runes/cl.mddeleted−11
@@ -1,11 +0,0 @@
1−---
2−sort: 3
3−---
4−
5−# `: col` (tuples)
6−
7−##### Tuples are easy.
8−
9−<list dataPreview="true" className="runes" linkToFragments="true"></list>
10−
11−<kids className="runes"></kids>
docs/programming/reference/runes/cn.mddeleted−11
@@ -1,11 +0,0 @@
1−---
2−sort: 4
3−---
4−
5−# `% cen` (invocations)
6−
7−##### Calls, but not.
8−
9−<list dataPreview="true" className="runes" linkToFragments="true"></list>
10−
11−<kids className="runes"></kids>
docs/programming/reference/runes/hx.mddeleted−11
@@ -1,11 +0,0 @@
1−---
2−sort: 6
3−---
4−
5−# `# hax` (printing)
6−
7−##### Want to print something? Fine.
8−
9−<list dataPreview="true" className="runes" linkToFragments="true"></list>
10−
11−<kids className="runes"></kids>
docs/programming/reference/runes/hx/hxgl.mddeleted−61
@@ -1,61 +0,0 @@
1−`#< haxgal`
2−===========
3−
4−Prettyprint string `++tape`.
5−
6−`#<` is a synthetic rune that calls the function [`++noah`]() with argument `p`. Used to produce a [`++tape`]() of the expression passed to it, and
7−is only used in the irregular form.
8−
9−Produces
10−--------
11−
12−Twig: `[%hxgl p=tusk]`
13−
14−Sample
15−------
16−
17−`p` is a [`++tusk`](), a list of [`twig`]().
18−
19−Tall form
20−---------
21−
22−None
23−
24−Wide form
25−---------
26−
27−None
28−
29−Irregular form
30−--------------
31−
32− <i.p i.t.p i.t.t.p>
33−
34−Examples
35−--------
36−
37− ~zod/try=> <1>
38− "1"
39−
40−This is the simplest example of `#<`, pass it a constant and it produces
41−a `++tape` of the constant.
42−
43− ~zod/try=> <`path`"abc">
44− "/a/b/c"
45− ~zod/try=> <0x5 ~zod 'a'>
46− "[0x5 ~zod 'a']"
47−
48−In these cases we use `#<` to produce the result of a simple computation
49−as a `++tape`.
50−
51− ~zod/try=> <|.(1)>
52− "<1.gcq [@n <250.yur 41.wda 374.hzt 100.kzl 1.ypj %164>]>"
53−
54−Here you can see what would normally be the pretty-printed result
55−produced as a `++tape`.
56−
57− ~zod/try=> (ream '<~>')
58− [%hxgl p=~[[%bczp p=%null]]]
59−
60−Using `++ream` to unpack how `#<` is parsed we can see that its sample
61−is wrapped in a [`$!`]().
docs/programming/reference/runes/hx/hxgr.mddeleted−83
@@ -1,83 +0,0 @@
1−`#> haxgar`
2−===========
3−
4−Prettyprint `++tank`.
5−
6−`#>`, `haxgar`, `[%hxgr p=tusk]`is a synthetic rune that slams the
7−assumed gate `cain` on `[%zpgr %cntr p]`.
8−
9−`#>` is a synthetic rune that slams the gate [`++cain`]() with `p`. `#>`
10−is used to produce a [`++tank`]() of the computation passed to it, and
11−is only used in the irregular form.
12−
13−Produces
14−--------
15−
16−Twig: `[%hxgr p=tusk]`
17−
18−Sample
19−------
20−
21−`p` is a [++tusk]().
22−
23−Tall form
24−---------
25−
26−None
27−
28−Wide form
29−---------
30−
31−None
32−
33−Irregular form
34−--------------
35−
36− >i.p i.t.p i.t.t.p<
37−
38−Examples
39−--------
40−
41− ~zod/try=/zop> >1<
42− [%leaf p="1"]
43−
44−This is the simplest example of `#>`, pass it a constant and it produces
45−a `++tank` of the constant.
46−
47− ~zod/try=/zop> >`path`"abc"<
48− [%rose p=[p="/" q="/" r=""] q=~[[%leaf p="a"] [%leaf p="b"] [%leaf p="c"]]]
49− ~zod/try=/zop> >0x5 ~zod 'a'<
50− [ %rose
51− p=[p=" " q="[" r="]"]
52− q=~[[%leaf p="0x5"] [%leaf p="~zod"] [%leaf p="'a'"]]
53− ]
54− ~zod/try=/zop> >|.(1)<
55− [ %rose
56− p=[p=" " q="<" r=">"]
57− q
58− ~[
59− [%leaf p="1.gcq"]
60− [ %rose
61− p=[p=" " q="[" r="]"]
62− q
63− ~[
64− [%leaf p="@n"]
65− [ %rose
66− p=[p=" " q="<" r=">"]
67− q
68− ~[
69− [%leaf p="250.xnq"]
70− [%leaf p="41.vrk"]
71− [%leaf p="418.ssa"]
72− [%leaf p="101.jzo"]
73− [%leaf p="1.ypj"]
74− [%leaf p="%164"]
75− ]
76− ]
77− ]
78− ]
79− ]
80− ]
81−
82−In these cases we use `#>` to produce the result of a simple computation
83−as a `++tank`.
docs/programming/reference/runes/kt.mddeleted−11
@@ -1,11 +0,0 @@
1−---
2−sort: 7
3−---
4−
5−# `^ ket` (casting)
6−
7−##### Go ahead, recast that.
8−
9−<list dataPreview="true" className="runes" linkToFragments="true"></list>
10−
11−<kids className="runes"></kids>
docs/programming/reference/runes/kt/ktdt.mddeleted−22
@@ -1,22 +0,0 @@
1−# `:ward`, `^.`, "ketdot", `{$ward p/twig q/twig}`
2−
3−Cast `q` to product type of `p`.
4−
5−Casts `q` to the product of calling `p` on `q`. The same
6−as casting `q` to the product type of `p`. Useful when you want
7−to cast to the type of a function that you don't want to actually
8−run at runtime.
9−
10−Regular form: *2-fixed*
11−
12−Examples:
13−
14− /~zod/try=> =cor |= [~ a/@]
15− [~ p=a]
16− changed %cor
17− /~zod/try=> ^.(cor [~ 97])
18− [~ p=97]
19−
20−In this example we create a function `cor` that takes a cell of `~` and an
21−atom and produces `[~ p=a]`. Using `^.` we can cast without calling
22−`cor` and produce the same result.
docs/programming/reference/runes/sg.mddeleted−11
@@ -1,11 +0,0 @@
1−---
2−sort: 8
3−---
4−
5−# `~ sig` (hints)
6−
7−##### Give the compiler a little help.
8−
9−<list dataPreview="true" className="runes" linkToFragments="true"></list>
10−
11−<kids className="runes"></kids>
docs/programming/reference/runes/sm.mddeleted−11
@@ -1,11 +0,0 @@
1−---
2−sort: 10
3−---
4−
5−# `; sem` (composition)
6−
7−##### Compose at will.
8−
9−<list dataPreview="true" className="runes" linkToFragments="true"></list>
10−
11−<kids className="runes"></kids>
docs/programming/reference/runes/ts.mddeleted−11
@@ -1,11 +0,0 @@
1−---
2−sort: 9
3−---
4−
5−# `= tis` (subject modifiers)
6−
7−##### Feel free to change the subject.
8−
9−<list dataPreview="true" className="runes" linkToFragments="true"></list>
10−
11−<kids className="runes"></kids>
docs/programming/reference/runes/ts/.tsbr.md.swpdeleted
Binary file not shown.
docs/programming/reference/runes/ts/.tscl.md.swpdeleted
Binary file not shown.
docs/programming/reference/runes/ts/.tsdt.md.swpdeleted
Binary file not shown.
docs/programming/reference/runes/ts/.tsgl.md.swpdeleted
Binary file not shown.
docs/programming/reference/runes/ts/.tsgr.md.swpdeleted
Binary file not shown.
docs/programming/reference/runes/ts/.tshp.md.swpdeleted
Binary file not shown.
docs/programming/reference/runes/ts/.tskt.md.swpdeleted
Binary file not shown.
docs/programming/reference/runes/ts/.tsls.md.swpdeleted
Binary file not shown.
docs/programming/reference/runes/ts/.tssg.md.swpdeleted
Binary file not shown.
docs/programming/reference/runes/ts/.tstr.md.swpdeleted
Binary file not shown.
docs/programming/reference/runes/wt.mddeleted−11
@@ -1,11 +0,0 @@
1−---
2−sort: 11
3−---
4−
5−# `? wut` (conditional)
6−
7−##### If this then what?
8−
9−<list dataPreview="true" className="runes" linkToFragments="true"></list>
10−
11−<kids className="runes"></kids>
docs/programming/reference/runes/zp.mddeleted−11
@@ -1,11 +0,0 @@
1−---
2−sort: 12
3−---
4−
5−# `! zap` (special)
6−
7−##### Pow, zap, bam.
8−
9−<list dataPreview="true" className="runes" linkToFragments="true"></list>
10−
11−<kids className="runes"></kids>
docs/programming/reference/runes/zp/.zpcb.md.swpdeleted
Binary file not shown.
docs/programming/reference/runes/zp/.zpcm.md.swpdeleted
Binary file not shown.
docs/programming/reference/runes/zp/.zpfs.md.swpdeleted
Binary file not shown.
docs/programming/reference/runes/zp/.zpgr.md.swpdeleted
Binary file not shown.
docs/programming/reference/runes/zp/.zpsm.md.swpdeleted
Binary file not shown.
docs/programming/reference/runes/zp/.zpts.md.swpdeleted
Binary file not shown.
docs/programming/reference/runes/zp/.zpwt.md.swpdeleted
Binary file not shown.
docs/programming/reference/runes/zp/.zpzp.md.swpdeleted
Binary file not shown.
docs/programming/core/span.md → docs/programming/span.mdrenamed
The content is the same.
docs/programming/troubleshooting.mdnew file+186
@@ -0,0 +1,186 @@
1+---
2+sort: 10
3+---
4+
5+# Troubleshooting
6+
7+Ideally your Hoon works perfectly the first time. But...
8+
9+## Syntax errors
10+
11+When you get a syntax error, you'll see a message like
12+
13+```
14+syntax error: 10 12
15+```
16+
17+This is a line and column number; more exactly, the line and
18+column of the first byte the parser couldn't interpret as part of
19+a correct Hoon file. These values are always correct.
20+
21+Usually, the line and column tell you everything you need to
22+know. But the worst-case scenario for a syntax error is that,
23+somewhere above, you've confused Hoon's tall form by using the
24+wrong fanout for a rune. For example, `%+` (`:calt`, a function
25+call whose sample is a cell) has three subtwigs:
26+
27+```
28+%+ foo
29+ bar
30+baz
31+```
32+
33+But if you make a mistake and write
34+
35+```
36+%+ foo
37+bar
38+```
39+
40+the parser will eat the next twig below and try to treat it as a
41+part of the `%+`. This can cause a cascading error somewhere
42+below, usually stopped by a `==` or `--`.
43+
44+When this happens, don't panic! Binary search actually works
45+quite well. Any twig can be stubbed out as `!!`. Find the
46+prefix of your file that compiles, then work forward until
47+the actual error appears.
48+
49+## Semantic errors
50+
51+Now your code parses but doesn't compile.
52+
53+### Turn on debugging
54+
55+Your first step should be to put a `!:` ("zapcol") rune at the
56+top of the file. This is like calling the C compiler with `-g`;
57+it tells the Hoon compiler to generate tracing twigs.
58+
59+Bear in mind that `!:` breaks tail-call optimization. This is a
60+bug, but a relatively low-priority bug. `!.` turns off `!:`.
61+Note that `!:` and `!.` are twig-level, not file-level; you can
62+wrap any twig in either.
63+
64+### Error trace
65+
66+If you have `!:` on, you'll see an error trace, like
67+
68+```
69+/~zod/home/0/gen/hello:<[7 3].[11 21]>
70+/~zod/home/0/gen/hello:<[8 1].[11 21]>
71+/~zod/home/0/gen/hello:<[9 1].[11 21]>
72+/~zod/home/0/gen/hello:<[10 1].[11 21]>
73+/~zod/home/0/gen/hello:<[11 1].[11 21]>
74+/~zod/home/0/gen/hello:<[11 7].[11 21]>
75+nest-fail
76+```
77+
78+The bottom of this trace is the line and column of the twig which
79+failed to compile, then the cause of the error (`nest-fail`).
80+
81+Hoon does not believe in inundating you with possibly irrelevant
82+debugging information. Your first resort is always to just look
83+at the code and try to figure out what's wrong. This practice
84+strengthens your Hoon muscles.
85+
86+(Consider the opposite extreme; imagine if you had a magic bot
87+that always fixed your compiler errors for you. Pro: no time
88+wasted on compiler errors. Con: you never learn Hoon.)
89+
90+## Common errors
91+
92+Moral fiber is all very well and good, but sometimes you're
93+stumped. Couldn't the compiler help a little? These messages do
94+mean something. Here are the three most common:
95+
96+### `nest-fail`
97+
98+This is a type mismatch (`nest` is the Hoon typechecker). It
99+means you tried to pound a square peg into a round hole.
100+
101+What was the peg and what was the hole? Hoon doesn't tell you by
102+default, because moral fiber, and also because in too many cases
103+trivial errors lead to large intimidating dumps. However, you
104+can use the `~!` rune ("sigzap", `:peep`) to print the type of
105+any twig in your stack trace.
106+
107+For instance, you wrote `(foo bar)` and got a `nest-fail`. Change
108+your code to be:
109+
110+```
111+~! bar
112+~! +6.foo
113+(foo bar)
114+```
115+
116+You'll get the same `nest-fail`, but this will show the type of
117+`bar`, then the type of the sample of the `foo` gate.
118+
119+### `find.foo`
120+
121+A `find.foo` error means limb `foo` wasn't found in the subject.
122+In other words, "undeclared variable."
123+
124+The most common subspecies of `find` error is `find.$`, meaning
125+the empty name `$` was not found. This often happens when you
126+use a twig that does not produce a gate/mold, as a gate/mold.
127+
128+For instance, `(foo bar)` will give `find.$` if `foo` is not
129+actually a function. `?=([%foo %bar] baz)` will give `find.$`,
130+because `?=` ("wuttis", `:fits`) needs a mold rather than a seed
131+(you probably meant `?=({$foo $bar} baz)`).
132+
133+### `mint-vain` and `mint-lost`
134+
135+These are errors caused by type inference in pattern matching.
136+`mint-vain` means this twig is never executed. `mint-lost` means
137+there's a case in a `?-` ("wuthep", `:case`) that isn't handled.
138+
139+## Runtime crashes
140+
141+If your code crashes at runtime or overflows the stack, you'll
142+see a stack trace that looks just like the trace above. Don't
143+confuse runtime crashes with compilation errors, though.
144+
145+If your code goes into an infinite loop, kill it with `^C` (you'll
146+need to be developing on the local console; otherwise, the
147+infinite loop will time out either too slowly or too fast). The
148+stack trace will show what your code was doing when interrupted.
149+
150+The counterpart of `~!` for runtime crashes is `~|` ("sigbar",
151+`:show`):
152+
153+```
154+~| foo
155+(foo bar)
156+```
157+
158+If `(foo bar)` crashes, the value of `foo` is printed in the
159+stack trace. Otherwise, the `~|` has no effect.
160+
161+## Debugging printfs
162+
163+The worst possibility, of course, is that your code runs but does
164+the wrong thing. This is relatively unusual in a typed
165+functional language, but it still happens.
166+
167+`~&` ("sigpam", `:dump`) is Hoon's debugging printf. This
168+pretty-prints its argument:
169+
170+```
171+~& foo
172+(foo bar)
173+```
174+
175+will always print `foo` every time it executes. A variant is
176+`~?` ("sigwut", `:warn`), which prints only if a condition is
177+true:
178+
179+```
180+~? =(37 (lent foo)) foo
181+(foo bar)
182+```
183+
184+For now, you need to be on the local console to see these debug
185+printfs (which are implemented by interpreter hints). This is a
186+bug and, like all bugs, will be fixed at some point.
docs/programming/core/twig.md → docs/programming/twig.mdrenamed+6−11
@@ -29,17 +29,17 @@ of this structure is a *subexpression*.
2929Usually a subexpression is itself a `twig`; sometimes it's an
3030`@tas` (symbol) or a `wing` (reference path).
3131
32−## Moss versus wood
32+## Moss versus seed
3333
3434Solely for clarity, we use the type alias `moss` for twigs whose
3535product is used as a mold. A `moss` is just a twig, both in
3636syntax and semantics; again, the difference is how we use it.
3737
38−Twigs are described as *mossy* and *woody*; an example of X is
39−the woody form of X, a mpld producing X is its woody form. For
40−instance, `$foo` (mossy) is a mold whose product is always `%foo`
41−(woody). (Obviously, wood is *yang* and moss is *yin*, so we
42−can also say "yang foo" or "yin foo".)
38+Twigs are described as *mossy* (or *moldy*) and *seedy*; an
39+example of X is the seedy form of X, a mold producing X is its
40+mossy form. For instance, `$foo` (mossy) is a mold whose product
41+is always `%foo` (seedy). (Obviously, seed is *yang* and moss is
42+*yin*, so we can also say "yang foo" or "yin foo".)
4343
4444## Twig categories
4545
@@ -47,8 +47,3 @@ Fortunately, the twigs fit neatly into clear categories which
4747match their rune prefix. Read forward by category:
4848
4949<div><list/></div>
50−
51−## Twig structure
52−
53−The full Core Hoon `twig`. Note that this is simplified, but
54−everything useful can still be done in Core.
docs/programming/core/twig/atom.md → docs/programming/twig/atom.mdrenamed+5−3
@@ -2,7 +2,7 @@
22sort: 2
33---
44
5−# Constants and interpolations
5+# Atoms, constants, quasi-constants
66
77A constant is a twig whose product does not depend on the
88subject. If you know Nock, the formula produced is always
@@ -35,8 +35,8 @@ style path).
3535Recall the `$atom` span, `{$atom p/aura q/(unit @)}`.
3636
3737Each atom constant syntax implies an aura. Note that the aura is
38−used indiscriminately to convey units, interpretations, parsing
39−syntax, and/or printing syntax.
38+used indiscriminately to convey physical units, semantic
39+interpretations, parsing syntax, and/or printing syntax.
4040
4141### Hardcoded auras
4242
@@ -105,3 +105,5 @@ A path can be dynamically interpolated with `[]`:
105105```
106106
107107equals `/foo/bar/baz`.
108+
109+
docs/programming/core/twig/call.md → docs/programming/twig/call.mdrenamed
The content is the same.
docs/programming/core/twig/cast.md → docs/programming/twig/cast.mdrenamed
The content is the same.
docs/programming/core/twig/cell.md → docs/programming/twig/cell.mdrenamed+6−4
@@ -33,26 +33,28 @@ for list. `$scon` is the reverse.
3333The rune prefix is `:`. Suffixes: `-` for pair, `+` for triple,
3434`^` for quad, `*` for tuple, `~` for list, `_` for reverse.
3535
36−### `:cons`, `:-`, "colhep", `{$cons p/twig q/twig}`, "construct"
36+### `:cons`, `:-`, "colhep", `{$cons p/twig q/twig}`,
37+
38+*Construct a cell (2-tuple*).
3739
3840Syntax: *2-fixed*.
3941
4042The product: the cell of `p` and `q`, each compiled against
4143the subject.
4244
43−### `:cont`, `:+`, "collus", `{$cont p/twig q/twig r/twig}`, "cons-3"
45+### `:cont`, `:+`, "collus", `{$cont p/twig q/twig r/twig}`,
4446
4547Syntax: *3-fixed*.
4648
4749Expands to: `:cons(p :cons(q r))`.
4850
49−### `:conq`, `:^`, "colket", `{$cont p/twig q/twig r/twig s/twig}`, "cons-4"
51+### `:conq`, `:^`, "colket", `{$cont p/twig q/twig r/twig s/twig}`,
5052
5153Syntax: *4-fixed*.
5254
5355Expands to: `:cons(p :cont(q r s))`.
5456
55−### `:conp`, `:*`, "coltar", `{$conp p/(list twig)}`, "construct tuple"
57+### `:conp`, `:*`, "coltar", `{$conp p/(list twig)}`,
5658
5759Syntax: *running*.
5860
docs/programming/core/twig/core.md → docs/programming/twig/core.mdrenamed
The content is the same.
docs/programming/core/twig/flow.md → docs/programming/twig/flow.mdrenamed
The content is the same.
docs/programming/core/twig/limb.md → docs/programming/twig/limb.mdrenamed+5−4
@@ -19,17 +19,18 @@ is an attribute path, ie, a list of limbs.
1919
2020## Twigs
2121
22−Using a mold
22+The limb and wing system, as molds:
23+
2324```
2425++ limb
2526 $% {$& p/@ud}
2627 {$| p/@ud q/@tas}
2728 ==
29+++ wing (list limb)
2830++ twig
2931 $% {$limb p/limb}
3032 {$wing p/wing}
3133 ==
32−++ wing (list limb)
3334```
3435
3536The basic reference twigs are `$limb` and `$wing`. `$limb`
@@ -64,7 +65,7 @@ To resolve the limb to arm or leg, we search the subject
6465headfirst and depth-first. If we descend to a `$face` span whose
6566label matches the limb symbol, the descent address is a leg; the
6667span is the span beneath the label. But if the `$face` label
67−differs, the search ignores this leg.
68+differs, the search skips this subtree.
6869
6970If we descend into a `$core` span in which the limb symbol is an
7071arm, we produce that arm. If the limb symbol is not bound, we
@@ -96,7 +97,7 @@ match, and `^^^foo` skips three.
9697
9798The empty name `$` is the label whose value is 0. By convention,
9899`$` is always an arm, usually on a one-armed core (such as a
99−function or loop).
100+function or loop). To take `$` on a noun is to *kick* it.
100101
101102A wing is written outside-in with `.` as a separator. So
102103`foo.bar.baz` is "foo, in bar, in baz." Yes, this is the
docs/programming/core/twig/mold.md → docs/programming/twig/mold.mdrenamed
The content is the same.
docs/programming/core/twig/nock.md → docs/programming/twig/nock.mdrenamed
The content is the same.
docs/programming/core/twig/syntax.md → docs/programming/twig/syntax.mdrenamed
The content is the same.
docs/programming/core/twig/syntax/design.md → docs/programming/twig/syntax/design.mdrenamed+2−2
@@ -285,8 +285,8 @@ algorithm, the simpler its names should be.
285285### When in doubt, don't be lapidary
286286
287287This works in the other direction: namelessness doesn't scale.
288−Most normal code shouldn't use lapidary naming at all. (There is
289−too much lapidary Hoon in Urbit.)
288+Most normal code shouldn't use lapidary naming at all. (Everyone
289+agrees: there is *way* too much lapidary Hoon in Urbit.)
290290
291291Lapidary naming is only for *inherently simple code*: code that
292292both aspires to high elegance and clarity, and *is solving a
docs/programming/core/twig/syntax/motivation.md → docs/programming/twig/syntax/motivation.mdrenamed+2−3
@@ -1,6 +1,7 @@
11# Motivation
22
3−The three problems are *terminator piles*, *indentation creep*,
3+Three common syntactic problems in functional languages that Hoon
4+is trying to fix: *terminator piles*, *indentation creep*,
45and *feature/label confusion*.
56
67## Terminator piles
@@ -52,5 +53,3 @@ Hoon has very weak FLC in keyword style, none in rune style.
5253It has no user-level macros or overloading. It does support
5354higher-order programming; write-only Hoon can certainly be
5455(and has been) written. But good Hoon style is to avoid it.
55−
56−
docs/programming/core/twig/test.md → docs/programming/twig/test.mdrenamed
The content is the same.