on master help sign in
first pass thru ~
commitb0a390c017e0257751f64f1d4409f4efe24be521 authorHenry Ault <henry@tlon.io> dateTue 29 Mar 2016, 17:35 (11 years ago) parent62bdfab
21 files changed+103−694
docs/system/hoon/runes/br/brfs.md−93 docs/system/hoon/runes/kt/ktbr.md+8−28 docs/system/hoon/runes/kt/ktdt.md+4−20 docs/system/hoon/runes/kt/kthp.md+8−28 docs/system/hoon/runes/kt/ktls.md+8−34 docs/system/hoon/runes/kt/ktpm.md+10−39 docs/system/hoon/runes/kt/ktsg.md+3−22 docs/system/hoon/runes/kt/ktts.md+4−31 docs/system/hoon/runes/kt/ktwt.md+5−28 docs/system/hoon/runes/sg/sgbc.md+3−24 docs/system/hoon/runes/sg/sgbr.md+7−21 docs/system/hoon/runes/sg/sgcb.md+4−25 docs/system/hoon/runes/sg/sgcn.md+6−34 docs/system/hoon/runes/sg/sgfs.md+5−26 docs/system/hoon/runes/sg/sggl.md+4−33 docs/system/hoon/runes/sg/sggr.md+4−33 docs/system/hoon/runes/sg/sgls.md+4−24 docs/system/hoon/runes/sg/sgpm.md+5−50 docs/system/hoon/runes/sg/sgts.md+3−24 docs/system/hoon/runes/sg/sgwt.md+4−43 docs/system/hoon/runes/sg/sgzp.md+4−34
docs/system/hoon/runes/br/brfs.mddeleted−93
@@ -1,93 +0,0 @@
1−---
2−sort: 8
3−---
4−
5−`|/ barfas`
6−===========
7−
8−`|_` with well typed output.
9−
10−Similar to `|_` except that it takes and produces well-typed output. XX
11−
12−`|/` is a synthetic rune that produces a [`%gold`]() [door]() with
13−[sample]() `[%bctr p]` and list of [wet or %ash]() [arm]()s `q`. The list of arms must be
14−closed with a `--`.
15−
16−Produces
17−--------
18−
19−Twig: `[%brfs p=mold q=(map term foot)]`
20−
21−Accepts
22−-------
23−
24−`p` is a [mold](). `q` is a [`++map`]() with [`++term`]() keys and
25−[`++foot`]() values.
26−
27−Tall form
28−---------
29−
30− |/ p
31− +- p.n.q
32− q.n.q
33− --
34−
35−Examples
36−--------
37−
38− /~zod/try=> =fas |/
39− a=@
40− +- two (mul a 2)
41− +- for (div a 2)
42− --
43− new var %fas
44− /~zod/try=> ~(two fas 2)
45− 4
46− /~zod/try=> ~(for fas ~(for fas ~(two fas 12)))
47− 6
48−
49−In this simple example we're creating a door with two arms. One arm
50−divides our sample by two, the other divides by two.
51−
52− /~zod/try=> =kom
53− |_ a=(list)
54− ++ hed -.a
55− ++ tal +.a
56− --
57− new var %kom
58− /~zod/try=> =kot
59− |/ a=(list)
60− +- hed -.a
61− +- tal +.a
62− --
63− new var %kot
64− /~zod/try=> ~(tal kom "abc")
65− t=~[98 99]
66− /~zod/try=> ~(tal kot "abc")
67− t="bc"
68− /~zod/try=> ~(tal kot [1 2 3 ~])
69− [2 3 ~]
70− /~zod/try=> ~(tal kom [1 2 3 ~])
71− t=~[2 3]
72−
73−Here we're demonstrating the difference between `|_` and `|/`. We create
74−a nearly identical door using both runes, each with an arm that produces
75−the tail of the sample, `a`. You can see that our wet gates use the
76−[sample]() as a mold to produce well-typed output.
77−
78− ++ by :: map engine
79− ~/ %by
80− |/ a=(map)
81− ::
82− +- all
83− ~/ %all
84− |* b=$+(* ?)
85− |- ^- ?
86− ?@ a
87− &
88− ?&((b q.n.a) $(a l.a) $(a r.a))
89−
90−All of the container engines in `hoon.hoon` use `|/` to set up the mold
91−for their operations. In `++by`, the map engine, `|/` creates a door
92−that takes a map that is passed to its arms. See more about using `++by`
93−in the [library]().
docs/system/hoon/runes/kt/ktbr.md+8−28
@@ -1,36 +1,16 @@
1−`^| ketbar`
2−===========
1+# `:iron`, `^|`, "ketbar", `{$iron p/twig}`
32
43Make core context unreadable.
54
6−Converts a core to a core whose [context]() is unreadable. Useful in
7−preventing type fails when replacing one core with one context
8−with another core with a different context. In hoon-specific terminonlogy, `^|` is a natural rune that converts a [`%gold`]() core into an [`%iron`]() core.
5+Converts an %gold core `p` to an %iron core. Useful in preventing type
6+fails when replacing one core with one context with another core with a
7+different context.
98
10−Produces
11−--------
9+Regular form: *1-fixed*
1210
13−Twig: `[%ktbr p=twig]`
11+Examples:
1412
15−Accepts
16−-------
17−
18−`p` is a [`++twig`]().
19−
20−Tall form
21−---------
22−
23− ^| p
24−
25−Wide form
26−---------
27−
28− ^|(p)
29−
30−Examples
31−--------
32−
33− /~zod/try=> =cor |= a=@
13+ /~zod/try=> =cor |= a/@
3414 +(a)
3515 new var %cor
3616 /~zod/try=> +<.cor
@@ -43,4 +23,4 @@ Examples
4323 ! exit
4424
4525Here we crete a simple gate and assign it to the shell variable `cor`.
46−We can examine the sample of `cor` with `+<` (the [head]() of the [tail]()) to produce `a=0`. Assigning a new shell variable, `iro` as the `^|` of `cor` we can no longer peek in to its subject.
26+We can examine the sample of `cor` with `+<` (the head of the tail) to produce `a=0`. Assigning a new shell variable, `iro` as the `^|` of `cor` we can no longer peek in to its subject.
docs/system/hoon/runes/kt/ktdt.md+4−20
@@ -1,5 +1,4 @@
1−`^. ketdot`
2−===========
1+# `:ward`, `^.`, "ketdot", `{$ward p/twig q/twig}`
32
43Cast `q` to product type of `p`.
54
@@ -8,26 +7,11 @@ as casting `q` to the product type of `p`. Useful when you want
87to cast to the type of a function that you don't want to actually
98run at runtime.
109
11−Produces
12−--------
10+Regular form: *2-fixed*
1311
14−Twig: `[%ktdt p=twig q=twig]`
12+Examples:
1513
16−Accepts
17−-------
18−
19−`p` is a [`++twig`](). `q` is a twig.
20−
21−Tall form
22−---------
23−
24− ^. p
25− q
26−
27−Examples
28−--------
29−
30− /~zod/try=> =cor |= [~ a=@]
14+ /~zod/try=> =cor |= [~ a/@]
3115 [~ p=a]
3216 changed %cor
3317 /~zod/try=> ^.(cor [~ 97])
docs/system/hoon/runes/kt/kthp.md+8−28
@@ -1,38 +1,18 @@
1−`^- kethep`
2−===========
1+# `:cast`, `^-`, "kethep", `{$cast p/twig q/twig}`
32
43Cast.
54
6−Casts `q` to the [span]() of `p`. The same as `^+`, except for that `q` is actually cast to the bunt of `q` (`$,(q)`). The easiest way to make a basic cast. Used when you already have already created a validator function ([mold]()) for a span.
5+Casts `q` to the span of `p`. The same as `^+`, except for that `q` is actually cast to the bunt of `q` (`$,(q)`). The easiest way to make a basic cast; used when you already have already created a validator function (mold) for a span.
76
8−Produces
9−--------
7+Regular form: *2-fixed*
108
11−Twig: `[%kthp p=mold q=twig]`
9+Irregular form:
1210
13−Accepts
14−-------
1511
16−`p` is a mold. `q` is a [`++twig`]().
12+ `p`q ^-(p q)
1713
18−Tall form
19−---------
2014
21− ^- p
22− q
23−
24−Wide form
25−---------
26−
27− ^-(p q)
28−
29−Irregular form
30−--------------
31−
32− `p`q
33−
34−Examples
35−--------
15+Examples:
3616
3717 ~zod/try=> (add 90 7)
3818 97
@@ -45,8 +25,8 @@ Here we see a straightforward use of `^-` in both irregular and wide
4525forms, simply casting an atom to a `@t`. `97` is the ASCII code for
4626`'a'`.
4727
48− /~zod/try=> =cor |= a=@
49− ^- (unit ,@ta)
28+ /~zod/try=> =cor |= a/@
29+ ^- (unit @ta)
5030 [~ u=a]
5131 new var %cor
5232 /~zod/try=> (cor 97)
docs/system/hoon/runes/kt/ktls.md+8−34
@@ -1,52 +1,31 @@
1−`^+ ketlus`
2−===========
1+# `:like`, `^+`, "ketlus", `{$like p/twig q/twig}`
32
43Cast `q` to an unbunted `p`.
54
65Casts `q` to the type of `p`, verifying that it contains
76the type of `q`. Similar to `^+`, but doesn't bunt `p`. Used to
87cast to types that have previously been made into validator
9−functions (clams) with `$,`. For example, the arguments to a [`|=`]() are
10−automatically bunted with a [`=|`](), so `^+` is used. Most often we use `^+` to cast when our type is already defined by something inside our context.
8+functions (clams) with `$,`. For example, the arguments to a `|=` are
9+automatically bunted with a `=|`, so `^+` is used. Most often we use `^+` to cast when our type is already defined by something inside our context.
1110
12−Produces
13−--------
11+Regular form: *2 fixed*
1412
15−Twig: `[%ktls p=twig q=twig]`
16−
17−Sample
18−------
19−
20−`p` is a [`++twig`](). `q` is a twig.
21−
22−Tall form
23−---------
24−
25− ^+ p
26− q
27−
28−Wide form
29−---------
30−
31− ^+(p q)
32−
33−Examples
34−--------
13+Examples:
3514
3615 ~zod/try=> (add 90 7)
3716 97
3817 ~zod/try=> ^+('any text' (add 90 7))
3918 'a'
4019
41−Here we use a ['++cord']() (which could be any cord), `'any text'` to cast our
20+Here we use a '++cord' (which could be any cord), `'any text'` to cast our
4221result to a cord.
4322
44− /~zod/try=> =cor |= a=[q=@ta r=@ s=@]
23+ /~zod/try=> =cor |= a/{q/@ta r/@ s/@}
4524 [(cat 3 'new' q.a) (add r.a s.a) (sub r.a s.a)]
4625 new var %cor
4726 /~zod/try=> (cor 'start' 6 3)
4827 [8.390.876.208.525.960.558 9 3]
49− /~zod/try=> =cor |= a=[q=@ta r=@ s=@]
28+ /~zod/try=> =cor |= a/[q/@ta r/@ s/@]
5029 ^+ a
5130 [(cat 3 'new' q.a) (add r.a s.a) (sub r.a s.a)]
5231 changed %cor
@@ -60,8 +39,3 @@ the sum of the latter two as the second, and the differene as the third.
6039In the first call you can see that our type information is lost, and we
6140produce our cord as an atom. By adding a `^+ a` we cast the result to
6241our input, and type information is retained.
63−
64−Equivalent to
65−-------------
66−
67− ^-(_p q)
docs/system/hoon/runes/kt/ktpm.md+10−39
@@ -1,46 +1,17 @@
1−`^& ketpam`
2−===========
1+# `:zinc`, `^&`, "ketpam", `{$zinc p/twig}`
32
43Convert `%gold` to `%zinc`.
54
6−`^&` is a natural rune that converts a `%gold` core into a `%zinc` core.
7−At present, `%zinc` cores are not commonly used.
5+Converts a `%gold` core `p` into a `%zinc` core.
86
9−See also
10−--------
11−
12−ketbar, `^|`, %ktbr
13−============================
14−
15−Produces
16−--------
17−
18−Twig: `[%ktpm p=twig]`
19−
20−Sample
21−------
22−
23−`p` is a [twig]().
24−
25−Tall form
26−---------
27−
28− ^& p
29−
30−Wide form
31−---------
32−
33− ^&(p)
34−
35−Irregular form
36−--------------
37−
38−None
39−
40−Examples
41−--------
7+Examples:
428
439 ~zod/try=> |=(@ 1)
44− <1.gcq [@ @n <250.yur 41.wda 374.hzt 100.kzl 1.ypj %164>]>
10+ < 1.odf
11+ {@ {our/@p now/@da eny/@uvI} $~ <282.ucw 42.juj 402.arm 110.jyx 1.ztu $151>}
12+ >
4513 ~zod/try=> ^&(|=(@ 1))
46− <1&gcq [@ @n <250.yur 41.wda 374.hzt 100.kzl 1.ypj %164>]>
14+ < 1&odf
15+ {@ {our/@p now/@da eny/@uvI} $~ <282.ucw 42.juj 402.arm 110.jyx 1.ztu $151>}
16+ >
17+
docs/system/hoon/runes/kt/ktsg.md+3−22
@@ -1,5 +1,4 @@
1−`^~ ketsig`
2−===========
1+# `:burn`, `^~`, "ketsig", `{$burn p/twig}`
32
43Try executing `p` at compile time.
54
@@ -7,25 +6,7 @@ Tries to execute `p` statically at compile time. If this
76fails, `p` remains dynamic. Primarily useful for
87optimization: when a value is static, `^~` can simplify the compilation.
98
10−Produces
11−--------
12−
13−Twig: `[%ktsg p=twig]`
14−
15−Accepts
16−-------
17−
18−`p` is a [`++twig`]().
19−
20−Tall form
21−---------
22−
23− ^~ a
24−
25−Wide form
26−---------
27−
28− ^~(a)
9+Regular form *1-fixed*
2910
3011Examples
3112--------
@@ -35,7 +16,7 @@ Examples
3516 /~zod/try=> (make '^~(|-(42))')
3617 [%1 p=42]
3718
38−Here we use [`++make`]() to examine the nock generated for a particular
19+Here we use `++make` to examine the nock generated for a particular
3920computation. We start with a simple kicked trap, `|-`, that just
4021generates the static value `42`. When we wrap our `|-` in a `^~` you can
4122see that our compilation is much simpler.
docs/system/hoon/runes/kt/ktts.md+4−31
@@ -1,41 +1,14 @@
1−`^= kettis`
2−===========
1+# `:name`, `^=`, "kettis", `{$name p/toga q/twig}`
32
43Wraps a variable name around a value.
54
6−
75`^=`, `kettis`, `[%ktts p=toga q=twig]` is a natural rune that wraps `q`
8−in the [`++toga`]() `p`. `^=` is most commonly used for assignment,
6+in the `++toga` `p`. `^=` is most commonly used for assignment,
97adding one or more names to values.
108
11−Produces
12−--------
13−
14−Twig: `[%ktts p=toga q=twig]`
15−
16−Accepts
17−-------
18−
19−`p` is a `++toga`. `q` is a [`++twig`]().
20−
21−Tall form
22−---------
23−
24− ^= p
25− q
26−
27−Wide form
28−---------
29−
30− ^=(p q)
31−
32−Irregular form
33−--------------
34−
35− p=q
9+Regular form: *2-fixed*
3610
37−Examples
38−--------
11+Examples:
3912
4013 ~zod/try=> a=1
4114 a=1
docs/system/hoon/runes/kt/ktwt.md+5−28
@@ -1,36 +1,13 @@
1−`^? ketwut`
2−===========
1+# `:lead`, `^?` "ketwut", `{$lead p/twig}`
32
4−Convert `%gold` to `%lead`.
3+Convert core with unreadable sample to have unreadable sample and context.
54
6−Used to convert a [core]() whose context is unreadable (aka
7−a %gold core) to a core both of whose context and sample are
8−unreadable (aka a %lead core). XX
5+Converts a %gold core `p` to a %lead core.
96
7+Regular form: *1-fixed*
108
119
12−Produces
13−--------
14−
15−Twig: `[%ktwt p=twig]`
16−
17−Sample
18−------
19−
20−`p` is a [`++twig`]().
21−
22−Tall form
23−---------
24−
25− ^? p
26−
27−Wide form
28−---------
29−
30− ^?(p)
31−
32−Examples
33−--------
10+Examples:
3411
3512 ~zod/try=> |=(@ 1)
3613 <1.gcq [@ @n <250.yur 41.wda 374.hzt 100.kzl 1.ypj %164>]>
docs/system/hoon/runes/sg/sgbc.md+3−24
@@ -1,33 +1,12 @@
1−`~$ sigbuc`
2−===========
1+# `:poll`, `~$` "sigbuc", `{$poll p/term q/twig}`
32
43Label for profiling.
54
65Labels computation `q` as `p` for profiling.
76
8−Produces
9−--------
7+Irregular form: *2-fixed*
108
11−Twig: `[%sgbc p=term q=twig]`
12−
13−Accepts
14−-------
15−
16−`p` is a [`++term`](). `q` is a [`++twig`]().
17−
18−Tall form
19−---------
20−
21− ~$ p
22− q
23−
24−Wide form
25−---------
26−
27− ~$(p q)
28−
29−Examples
30−--------
9+Examples:
3110
3211 ~zod/try=> (make '~$(foo |-($))')
3312 [%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]]]]
docs/system/hoon/runes/sg/sgbr.md+7−21
@@ -1,28 +1,14 @@
1−`~| sigbar`
2−===========
1+# `:show`, `~|` "sigbar", `{$show p/twig q/twig}`
32
43`p` in stack trace if `q` crashes.
54
6−Presents the product of `p` in the stack trace if `q` crashes. `p` is only
5+Produces: `p` in the stack trace if `q` crashes. `p` is only
76evaluated if `q` crashes.
87
9−Produces
10−--------
8+Regular form: *2-fixed*
119
12−Twig: `[%sgbr p=twig q=twig]`
10+Examples:
1311
14−Accepts
15−-------
16−
17−`p` is a [`++twig`](). `q` is a twig.
18−
19−Tall form
20−---------
21−
22− ~| p
23− q
24−
25−Wide form
26−---------
27−
28− ~|(p q)
12+ > ~|('sample error message' !!)
13+ 'sample error message'
14+ ford: build failed ~[/g/~sivtyv-barnel/use/dojo/~sivtyv-barnel/inn/hand /g/~sivtyv-barnel/use/hood/~sivtyv-barnel/out/dojo/drum/phat/~sivtyv-barnel/dojo /d //term/1]
docs/system/hoon/runes/sg/sgcb.md+4−25
@@ -1,34 +1,13 @@
1−`~_ sigcab`
2−===========
1+# `:lurk`, `~_`, "sigcab", `{$lurk p/twig q/twig}`
32
43Pre-formatted stackframe into stacktrace.
54
65Inserts pre-formatted stackframe `p` into the stacktrace of `q`.
7−In hoon terminology, inserts `p`, a [trap]() producing a [++`tank`]() (pretty printed text), in the trace of `q`.
6+In hoon terminology, inserts `p`, a trap producing a ++`tank` (pretty printed text), in the trace of `q`.
87
9−Produces
10−--------
8+Regular form: *2-fixed*
119
12−Twig: `[%sgcb p=twig q=twig]`
13−
14−Accepts
15−-------
16−
17−`p` is a [`++twig`]() `q` is a twig
18−
19−Tall form
20−---------
21−
22− ~_ p
23− q
24−
25−Wide form
26−---------
27−
28− ~_(p q)
29−
30−Examples
31−--------
10+Examples:
3211
3312 ~zod/try=> (make '~_(+216 ~)')
3413 [%10 p=[p=1.851.876.717 q=[p=[%1 p=[0 216]] q=[%0 p=1]]] q=[%1 p=0]]
docs/system/hoon/runes/sg/sgcn.md+6−34
@@ -1,52 +1,24 @@
1−`~% sigcen`
2−===========
1+# `:fast`, `~%` "sigcen", `{$fast p/chum q/twig r/tyre s/twig}`
32
4−Register jet.
3+General jet hint.
54
65Registers a jet in core `s` so that it can be called when that code is run.
76
8−Produces
9−--------
7+Regularm form: *4-fixed*
108
11−Twig: `[%sgcn p=term q=twig r=tyre s=twig]`
12−
13−Accepts
14−-------
15−
16−`p` is a [`++term`]() `q` is a [`++twig`]() `r` is a [`++tyre`]() `s` is a
17−twig.
18−
19−Tall form
20−---------
21−
22− ~% p
23− q
24− ==
25− p.i.r q.i.r
26− p.i.t.r q.i.t.r
27− ==
28− s
29−
30− ~% p
31− q
32− ~
33− s
34−
35−
36−Examples
37−--------
9+Examples:
3810
3911 ++ aesc :: AES-256
4012 ~% %aesc + ~
4113 |%
4214 ++ en :: ECB enc
4315 ~/ %en
44− |= [a=@I b=@H] ^- @uxH
16+ |= {a/@I b/@H} ^- @uxH
4517 =+ ahem
4618 (be & (ex a) b)
4719 ++ de :: ECB dec
4820 ~/ %de
49− |= [a=@I b=@H] ^- @uxH
21+ |= {a/@I b/@H} ^- @uxH
5022 =+ ahem
5123 (be | (ix (ex a)) b)
5224 --
docs/system/hoon/runes/sg/sgfs.md+5−26
@@ -1,34 +1,13 @@
1−`~/ sigfas`
2−===========
1+# `:funk`, `~/`, "sigfas", `{$funk p/chum q/twig}`
32
4−XX.
3+XX HELP
54
65`~/` is a synthetic rune that implements one common case - a function arm in
7−a [book](), i.e. a library function - of the [`~%`]() [jet]() hint. Assumes the parent axis is `7` and that there are no children.
6+a book, i.e. a library function - of the `~%` jet hint. Assumes the parent axis is `7` and that there are no children.
87
9−Produces
10−--------
8+Regular form: *2fixed*
119
12−Twig: `[%sgfs p=term q=twig]`
13−
14−Accepts
15−-------
16−
17−`p` is a [`++term`](). `q` is a [`++twig`]().
18−
19−Tall form
20−---------
21−
22− ~/ p
23− q
24−
25−Wide form
26−---------
27−
28− ~/(p q)
29−
30−Examples
31−--------
10+Examples:
3211
3312 ~zod/try=> (make '~/ %bam |.(40)')
3413 [%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]]]
docs/system/hoon/runes/sg/sggl.md+4−33
@@ -1,43 +1,14 @@
1−`~< siggal`
2−===========
1+# `~<`, "siggal", `{$thin p/$@(term {p/term q/twig}) q/twig}`
32
43Hint to product.
54
6−`~<` is a synthetic rune that applies arbitrary [hint]() `p` to the
5+`~<` is a synthetic rune that applies arbitrary hint `p` to the
76product of `q`. `~<` is similar to `~>`, but computes `q` before
87applying the hint `p`.
98
10−Produces
11−--------
9+Irregular form: *2-fixed*
1210
13−Twig: `[%sggl p=$|(term [p=term q=twig]) q=twig]`
14−
15−Accepts
16−-------
17−
18−`p` is either a [`++term`]() or a `++term` twig pair. `q` is a twig.
19−
20−Tall form
21−---------
22−
23−`p=%foo`:
24−
25− ~< %foo
26− q
27−
28−`p=[p=%foo q=bar]`:
29−
30− ~< %foo.bar
31− q
32−
33−Wide form
34−---------
35−
36− ~<(%foo q)
37− ~<(%foo.bar q)
38−
39−Examples
40−--------
11+Examples:
4112
4213 ~zod/try=> (make '~<(%a 42)')
4314 [%7 p=[%1 p=42] q=[%10 p=97 q=[%0 p=1]]]
docs/system/hoon/runes/sg/sggr.md+4−33
@@ -1,41 +1,12 @@
1−`~> siggar`
2−===========
1+# `:hint`, `~>` "siggar", {$hint p/$@(term {p/term q/twig}) q/twig}
32
43Arbitrary hint
54
6−`~>` is a natural rune that applies arbitrary hint `p` to `q`.
5+Applies arbitrary hint `p` to `q`.
76
8−Produces
9−--------
7+Regular form: *2-fixed*
108
11−Twig: `[%sggr p=$|(term [p=term q=twig]) q=twig]`
12−
13−Accepts
14−-------
15−
16−`p` is either a [`++term`]() or a term [`++twig`] pair. `q` is a twig.
17−
18−Tall form
19−---------
20−
21−`p=%foo`:
22−
23− ~> %foo
24− q
25−
26−`p=[p=%foo q=bar]`:
27−
28− ~> %foo.bar
29− q
30−
31−Wide form
32−---------
33−
34− ~>(%foo q)
35− ~>(%foo.bar q)
36−
37−Examples
38−--------
9+Examples:
3910
4011 ~zod/try=> (make '~>(%a 42)')
4112 [%10 p=97 q=[%1 p=42]]
docs/system/hoon/runes/sg/sgls.md+4−24
@@ -1,32 +1,12 @@
1−`~+ siglus`
2−===========
1+# `:memo`, `~+`, "siglus", `{$memo p/@ q/twig}`
32
43Memoize computation.
54
65Hints to the interpreter to memoize (cache) the computation of `p`.
76
8−Produces
9−--------
7+Regular form: *1-fixed*
108
11−Twig: `[%sgls p=twig]`
12−
13−Accepts
14−-------
15−
16−`p` is a [`++twig`]()
17−
18−Tall form
19−---------
20−
21− ~+ p
22−
23−Wide form
24−---------
25−
26− ~+(p)
27−
28−Examples
29−--------
9+Examples:
3010
3111 ~zod/try=> 20
3212 20
@@ -40,5 +20,5 @@ Examples
4020 ~zod/try=> `@tas`1.869.440.365
4121 %memo
4222
43−By using [`++make`]() to display the compiled nock, we can see that `~+`
23+By using `++make` to display the compiled nock, we can see that `~+`
4424inserts a `%memo` hint.
docs/system/hoon/runes/sg/sgpm.md+5−50
@@ -1,60 +1,15 @@
1−`~& sigpam`
2−===========
1+# `:dump`, `~&`, "sigpam", `{$dump p/@ud q/twig r/twig}`
32
43Printf.
54
6−'Printf' or 'log' in other languages. Often used for debugging.
5+Prints `q` on the console before computing `r`. `p` is the log priority, 0-3
6+defaulting to 0. `p` is optional and is rarely used.
77
8−More specifically in hoon terminology, prints `q` on the console
9−before computing `r`. `p` is the log priority, 0-3 defaulting to 0. `~&`
10−is similar to `printf` or `log` in other languages, and is very commonly
11−used for debugging.
8+Regular form: *fixed 2 or 3*
129
13−`p` is optional and is rarely used.
1410
15−Produces
16−--------
11+Examples:
1712
18−Twig: `[%sgpm p=@ud q=twig r=twig]`
19−
20−Accepts
21−-------
22−
23−`p` is a [`@ud`]() `q` is a [`++twig`]() `r` is a twig.
24−
25−Tall form
26−---------
27−
28−Priority 0 (debug):
29−
30− ~& q
31− r
32−
33−Priority 1 (notice):
34−
35− ~& > q
36− r
37−
38−Priority 2 (warning):
39−
40− ~& >> q
41− r
42−
43−Priority 3 (alarm):
44−
45− ~& >>> q
46− r
47−
48−Wide form
49−---------
50−
51− ~&(>> q r)
52−
53−Examples
54−--------
55−
56− ~zod/try=> ~
57− ~
5813 ~zod/try=> ~&('oops' ~)
5914 'oops'
6015 ~
docs/system/hoon/runes/sg/sgts.md+3−24
@@ -1,34 +1,13 @@
1−`~= sigtis`
2−===========
1+# `:ddup`, `~=` "sigtis", `{$ddup p/twig q/twig}`
32
43Hint to avoid duplication.
54
65Hints to the interpreter that `q` may produce a noun equal to the
76already existing `p` in order to avoid storing the same noun twice.
87
9−Produces
10−--------
8+Regular form: *2-fixed*
119
12−Twig `[%sgts p=twig q=twig]`
13−
14−Accepts
15−-------
16−
17−`p` is a [`++twig`](). `q` is a twig.
18−
19−Tall form
20−---------
21−
22− ~= p
23− q
24−
25−Wide form
26−---------
27−
28− ~=(p q)
29−
30−Examples
31−--------
10+Examples:
3211
3312 ~zod/try=> 20
3413 20
docs/system/hoon/runes/sg/sgwt.md+4−43
@@ -1,52 +1,13 @@
1−`~? sigwut`
2−===========
1+# `:warn`, `~?`, "sigwut", `{$warn p/@ud q/twig r/twig s/twig}`
32
43PrintF if `q` true.
54
65Same as `~&` except for that `r` is printed to the console if and only
7−if `q` evaluates to true.
6+if `q` evaluates to true. `p` is the priority level between 1-3 (defaults to 0) and is both optional and rarely used.
87
9−Produces
10−--------
8+Regularm form *4-fixed*
119
12−Twig: `[%sgwt p=@ud q=twig r=twig s=twig]`
13−
14−Accepts
15−-------
16−
17−`p` is a [`@ud`](). `q` is a [`++twig`](). `r` is a twig. `s` is a
18−twig.
19−
20−Tall form
21−---------
22−
23−Priority 0 (debug):
24−
25− ~& q
26− r
27−
28−Priority 1 (notice):
29−
30− ~& > q
31− r
32−
33−Priority 2 (warning):
34−
35− ~& >> q
36− r
37−
38−Priority 3 (alarm):
39−
40− ~& >>> q
41− r
42−
43−Wide form
44−---------
45−
46− ~&(>> q r)
47−
48−Examples
49−--------
10+Examples:
5011
5112 ~zod/try=> ~?((gth 1 2) 'oops' ~)
5213 ~
docs/system/hoon/runes/sg/sgzp.md+4−34
@@ -1,40 +1,10 @@
1−`~! sigzap`
2−===========
1+# `:peep`, `~!`, "sigzap", `{$peep p/twig q/twig}`
32
43Print type on compilation fail.
54
6−`~!` is a natural rune for debugging uses only, semantically equivalent
7−to [`++twig`] `q`. If compilation fails within `q`, `~!` will show the
8−type of `p` on the stacktrace.
5+Produces the type of `p` on the stacktrace if `q` fails. Used only for debugging purposes.
96
10−Produces
11−--------
12−
13−Twig: `[%sgzp p=twig q=twig]`
14−
15−Sample
16−------
17−
18−`p` is a twig, `q` is a twig.
19−
20−Tall form
21−---------
22−
23− ~! p
24− q
25−
26−Wide form
27−---------
28−
29− ~!(p q)
30−
31−Irregular form
32−--------------
33−
34−None
35−
36−Examples
37−--------
7+Examples:
388
399 ~zod/try=> a
4010 ! -find-limb.a
@@ -55,5 +25,5 @@ of `'foo'`, `@t`.
5525 ! find-none
5626 ! exit
5727
58−Again, we use our unassigned variable `a` and the [cube]() `%foo`, whose
28+Again, we use our unassigned variable `a` and the cube `%foo`, whose
5929type is in fact `%foo`.