on master help sign in
first pass thru ~
b0a390cHenry Ault
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`
1+# `:iron`, `^|`, "ketbar", `{$iron p/twig}`
2−===========
3
2
4Make core context unreadable.
3Make core context unreadable.
5
4
6−Converts a core to a core whose [context]() is unreadable. Useful in
5+Converts an %gold core `p` to an %iron core. Useful in preventing type
7−preventing type fails when replacing one core with one context
6+fails when replacing one core with one context with another core with a
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.
7+different context.
9
8
10−Produces
9+Regular form: *1-fixed*
11−--------
12
10
13−Twig: `[%ktbr p=twig]`
11+Examples:
14
12
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/@
34 +(a)
14 +(a)
35 new var %cor
15 new var %cor
36 /~zod/try=> +<.cor
16 /~zod/try=> +<.cor
@@ -43,4 +23,4 @@ Examples
43 ! exit
23 ! exit
44
24
45Here we crete a simple gate and assign it to the shell variable `cor`.
25Here 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`
1+# `:ward`, `^.`, "ketdot", `{$ward p/twig q/twig}`
2−===========
3
2
4Cast `q` to product type of `p`.
3Cast `q` to product type of `p`.
5
4
@@ -8,26 +7,11 @@ as casting `q` to the product type of `p`. Useful when you want
8to cast to the type of a function that you don't want to actually
7to cast to the type of a function that you don't want to actually
9run at runtime.
8run at runtime.
10
9
11−Produces
10+Regular form: *2-fixed*
12−--------
13
11
14−Twig: `[%ktdt p=twig q=twig]`
12+Examples:
15
13
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/@]
31 [~ p=a]
15 [~ p=a]
32 changed %cor
16 changed %cor
33 /~zod/try=> ^.(cor [~ 97])
17 /~zod/try=> ^.(cor [~ 97])
docs/system/hoon/runes/kt/kthp.md+8−28
@@ -1,38 +1,18 @@
1−`^- kethep`
1+# `:cast`, `^-`, "kethep", `{$cast p/twig q/twig}`
2−===========
3
2
4Cast.
3Cast.
5
4
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.
7
6
8−Produces
7+Regular form: *2-fixed*
9−--------
10
8
11−Twig: `[%kthp p=mold q=twig]`
9+Irregular form:
12
10
13−Accepts
14−-------
15
11
16−`p` is a mold. `q` is a [`++twig`]().
12+ `p`q ^-(p q)
17
13
18−Tall form
19−---------
20
14
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
15+Examples:
35−--------
36
16
37 ~zod/try=> (add 90 7)
17 ~zod/try=> (add 90 7)
38 97
18 97
@@ -45,8 +25,8 @@ Here we see a straightforward use of `^-` in both irregular and wide
45forms, simply casting an atom to a `@t`. `97` is the ASCII code for
25forms, simply casting an atom to a `@t`. `97` is the ASCII code for
46`'a'`.
26`'a'`.
47
27
48− /~zod/try=> =cor |= a=@
28+ /~zod/try=> =cor |= a/@
49− ^- (unit ,@ta)
29+ ^- (unit @ta)
50 [~ u=a]
30 [~ u=a]
51 new var %cor
31 new var %cor
52 /~zod/try=> (cor 97)
32 /~zod/try=> (cor 97)
docs/system/hoon/runes/kt/ktls.md+8−34
@@ -1,52 +1,31 @@
1−`^+ ketlus`
1+# `:like`, `^+`, "ketlus", `{$like p/twig q/twig}`
2−===========
3
2
4Cast `q` to an unbunted `p`.
3Cast `q` to an unbunted `p`.
5
4
6Casts `q` to the type of `p`, verifying that it contains
5Casts `q` to the type of `p`, verifying that it contains
7the type of `q`. Similar to `^+`, but doesn't bunt `p`. Used to
6the type of `q`. Similar to `^+`, but doesn't bunt `p`. Used to
8cast to types that have previously been made into validator
7cast to types that have previously been made into validator
9−functions (clams) with `$,`. For example, the arguments to a [`|=`]() are
8+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.
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.
11
10
12−Produces
11+Regular form: *2 fixed*
13−--------
14
12
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
13+Examples:
34−--------
35
14
36 ~zod/try=> (add 90 7)
15 ~zod/try=> (add 90 7)
37 97
16 97
38 ~zod/try=> ^+('any text' (add 90 7))
17 ~zod/try=> ^+('any text' (add 90 7))
39 'a'
18 'a'
40
19
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
42result to a cord.
21result to a cord.
43
22
44− /~zod/try=> =cor |= a=[q=@ta r=@ s=@]
23+ /~zod/try=> =cor |= a/{q/@ta r/@ s/@}
45 [(cat 3 'new' q.a) (add r.a s.a) (sub r.a s.a)]
24 [(cat 3 'new' q.a) (add r.a s.a) (sub r.a s.a)]
46 new var %cor
25 new var %cor
47 /~zod/try=> (cor 'start' 6 3)
26 /~zod/try=> (cor 'start' 6 3)
48 [8.390.876.208.525.960.558 9 3]
27 [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/@]
50 ^+ a
29 ^+ a
51 [(cat 3 'new' q.a) (add r.a s.a) (sub r.a s.a)]
30 [(cat 3 'new' q.a) (add r.a s.a) (sub r.a s.a)]
52 changed %cor
31 changed %cor
@@ -60,8 +39,3 @@ the sum of the latter two as the second, and the differene as the third.
60In the first call you can see that our type information is lost, and we
39In the first call you can see that our type information is lost, and we
61produce our cord as an atom. By adding a `^+ a` we cast the result to
40produce our cord as an atom. By adding a `^+ a` we cast the result to
62our input, and type information is retained.
41our 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`
1+# `:zinc`, `^&`, "ketpam", `{$zinc p/twig}`
2−===========
3
2
4Convert `%gold` to `%zinc`.
3Convert `%gold` to `%zinc`.
5
4
6−`^&` is a natural rune that converts a `%gold` core into a `%zinc` core.
5+Converts a `%gold` core `p` into a `%zinc` core.
7−At present, `%zinc` cores are not commonly used.
8
6
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
7+Examples:
41−--------
42
8
43 ~zod/try=> |=(@ 1)
9 ~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+ >
45 ~zod/try=> ^&(|=(@ 1))
13 ~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`
1+# `:burn`, `^~`, "ketsig", `{$burn p/twig}`
2−===========
3
2
4Try executing `p` at compile time.
3Try executing `p` at compile time.
5
4
@@ -7,25 +6,7 @@ Tries to execute `p` statically at compile time. If this
7fails, `p` remains dynamic. Primarily useful for
6fails, `p` remains dynamic. Primarily useful for
8optimization: when a value is static, `^~` can simplify the compilation.
7optimization: when a value is static, `^~` can simplify the compilation.
9
8
10−Produces
9+Regular form *1-fixed*
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)
29
10
30Examples
11Examples
31--------
12--------
@@ -35,7 +16,7 @@ Examples
35 /~zod/try=> (make '^~(|-(42))')
16 /~zod/try=> (make '^~(|-(42))')
36 [%1 p=42]
17 [%1 p=42]
37
18
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
39computation. We start with a simple kicked trap, `|-`, that just
20computation. We start with a simple kicked trap, `|-`, that just
40generates the static value `42`. When we wrap our `|-` in a `^~` you can
21generates the static value `42`. When we wrap our `|-` in a `^~` you can
41see that our compilation is much simpler.
22see that our compilation is much simpler.
docs/system/hoon/runes/kt/ktts.md+4−31
@@ -1,41 +1,14 @@
1−`^= kettis`
1+# `:name`, `^=`, "kettis", `{$name p/toga q/twig}`
2−===========
3
2
4Wraps a variable name around a value.
3Wraps a variable name around a value.
5
4
6−
7`^=`, `kettis`, `[%ktts p=toga q=twig]` is a natural rune that wraps `q`
5`^=`, `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,
9adding one or more names to values.
7adding one or more names to values.
10
8
11−Produces
9+Regular form: *2-fixed*
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
36
10
37−Examples
11+Examples:
38−--------
39
12
40 ~zod/try=> a=1
13 ~zod/try=> a=1
41 a=1
14 a=1
docs/system/hoon/runes/kt/ktwt.md+5−28
@@ -1,36 +1,13 @@
1−`^? ketwut`
1+# `:lead`, `^?` "ketwut", `{$lead p/twig}`
2−===========
3
2
4−Convert `%gold` to `%lead`.
3+Convert core with unreadable sample to have unreadable sample and context.
5
4
6−Used to convert a [core]() whose context is unreadable (aka
5+Converts a %gold core `p` to a %lead core.
7−a %gold core) to a core both of whose context and sample are
8−unreadable (aka a %lead core). XX
9
6
7+Regular form: *1-fixed*
10
8
11
9
12−Produces
10+Examples:
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−--------
34
11
35 ~zod/try=> |=(@ 1)
12 ~zod/try=> |=(@ 1)
36 <1.gcq [@ @n <250.yur 41.wda 374.hzt 100.kzl 1.ypj %164>]>
13 <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`
1+# `:poll`, `~$` "sigbuc", `{$poll p/term q/twig}`
2−===========
3
2
4Label for profiling.
3Label for profiling.
5
4
6Labels computation `q` as `p` for profiling.
5Labels computation `q` as `p` for profiling.
7
6
8−Produces
7+Irregular form: *2-fixed*
9−--------
10
8
11−Twig: `[%sgbc p=term q=twig]`
9+Examples:
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−--------
31
10
32 ~zod/try=> (make '~$(foo |-($))')
11 ~zod/try=> (make '~$(foo |-($))')
33 [%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]]]]
12 [%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`
1+# `:show`, `~|` "sigbar", `{$show p/twig q/twig}`
2−===========
3
2
4`p` in stack trace if `q` crashes.
3`p` in stack trace if `q` crashes.
5
4
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
7evaluated if `q` crashes.
6evaluated if `q` crashes.
8
7
9−Produces
8+Regular form: *2-fixed*
10−--------
11
9
12−Twig: `[%sgbr p=twig q=twig]`
10+Examples:
13
11
14−Accepts
12+ > ~|('sample error message' !!)
15−-------
13+ 'sample error message'
16−
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]
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)
docs/system/hoon/runes/sg/sgcb.md+4−25
@@ -1,34 +1,13 @@
1−`~_ sigcab`
1+# `:lurk`, `~_`, "sigcab", `{$lurk p/twig q/twig}`
2−===========
3
2
4Pre-formatted stackframe into stacktrace.
3Pre-formatted stackframe into stacktrace.
5
4
6Inserts pre-formatted stackframe `p` into the stacktrace of `q`.
5Inserts 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`.
8
7
9−Produces
8+Regular form: *2-fixed*
10−--------
11
9
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
10+Examples:
31−--------
32
11
33 ~zod/try=> (make '~_(+216 ~)')
12 ~zod/try=> (make '~_(+216 ~)')
34 [%10 p=[p=1.851.876.717 q=[p=[%1 p=[0 216]] q=[%0 p=1]]] q=[%1 p=0]]
13 [%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`
1+# `:fast`, `~%` "sigcen", `{$fast p/chum q/twig r/tyre s/twig}`
2−===========
3
2
4−Register jet.
3+General jet hint.
5
4
6Registers a jet in core `s` so that it can be called when that code is run.
5Registers a jet in core `s` so that it can be called when that code is run.
7
6
8−Produces
7+Regularm form: *4-fixed*
9−--------
10
8
11−Twig: `[%sgcn p=term q=twig r=tyre s=twig]`
9+Examples:
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−--------
38
10
39 ++ aesc :: AES-256
11 ++ aesc :: AES-256
40 ~% %aesc + ~
12 ~% %aesc + ~
41 |%
13 |%
42 ++ en :: ECB enc
14 ++ en :: ECB enc
43 ~/ %en
15 ~/ %en
44− |= [a=@I b=@H] ^- @uxH
16+ |= {a/@I b/@H} ^- @uxH
45 =+ ahem
17 =+ ahem
46 (be & (ex a) b)
18 (be & (ex a) b)
47 ++ de :: ECB dec
19 ++ de :: ECB dec
48 ~/ %de
20 ~/ %de
49− |= [a=@I b=@H] ^- @uxH
21+ |= {a/@I b/@H} ^- @uxH
50 =+ ahem
22 =+ ahem
51 (be | (ix (ex a)) b)
23 (be | (ix (ex a)) b)
52 --
24 --
docs/system/hoon/runes/sg/sgfs.md+5−26
@@ -1,34 +1,13 @@
1−`~/ sigfas`
1+# `:funk`, `~/`, "sigfas", `{$funk p/chum q/twig}`
2−===========
3
2
4−XX.
3+XX HELP
5
4
6`~/` is a synthetic rune that implements one common case - a function arm in
5`~/` 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.
8
7
9−Produces
8+Regular form: *2fixed*
10−--------
11
9
12−Twig: `[%sgfs p=term q=twig]`
10+Examples:
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−--------
32
11
33 ~zod/try=> (make '~/ %bam |.(40)')
12 ~zod/try=> (make '~/ %bam |.(40)')
34 [%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]]]
13 [%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`
1+# `~<`, "siggal", `{$thin p/$@(term {p/term q/twig}) q/twig}`
2−===========
3
2
4Hint to product.
3Hint to product.
5
4
6−`~<` is a synthetic rune that applies arbitrary [hint]() `p` to the
5+`~<` is a synthetic rune that applies arbitrary hint `p` to the
7product of `q`. `~<` is similar to `~>`, but computes `q` before
6product of `q`. `~<` is similar to `~>`, but computes `q` before
8applying the hint `p`.
7applying the hint `p`.
9
8
10−Produces
9+Irregular form: *2-fixed*
11−--------
12
10
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
11+Examples:
40−--------
41
12
42 ~zod/try=> (make '~<(%a 42)')
13 ~zod/try=> (make '~<(%a 42)')
43 [%7 p=[%1 p=42] q=[%10 p=97 q=[%0 p=1]]]
14 [%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`
1+# `:hint`, `~>` "siggar", {$hint p/$@(term {p/term q/twig}) q/twig}
2−===========
3
2
4Arbitrary hint
3Arbitrary hint
5
4
6−`~>` is a natural rune that applies arbitrary hint `p` to `q`.
5+Applies arbitrary hint `p` to `q`.
7
6
8−Produces
7+Regular form: *2-fixed*
9−--------
10
8
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
9+Examples:
38−--------
39
10
40 ~zod/try=> (make '~>(%a 42)')
11 ~zod/try=> (make '~>(%a 42)')
41 [%10 p=97 q=[%1 p=42]]
12 [%10 p=97 q=[%1 p=42]]
docs/system/hoon/runes/sg/sgls.md+4−24
@@ -1,32 +1,12 @@
1−`~+ siglus`
1+# `:memo`, `~+`, "siglus", `{$memo p/@ q/twig}`
2−===========
3
2
4Memoize computation.
3Memoize computation.
5
4
6Hints to the interpreter to memoize (cache) the computation of `p`.
5Hints to the interpreter to memoize (cache) the computation of `p`.
7
6
8−Produces
7+Regular form: *1-fixed*
9−--------
10
8
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
9+Examples:
29−--------
30
10
31 ~zod/try=> 20
11 ~zod/try=> 20
32 20
12 20
@@ -40,5 +20,5 @@ Examples
40 ~zod/try=> `@tas`1.869.440.365
20 ~zod/try=> `@tas`1.869.440.365
41 %memo
21 %memo
42
22
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 `~+`
44inserts a `%memo` hint.
24inserts a `%memo` hint.
docs/system/hoon/runes/sg/sgpm.md+5−50
@@ -1,60 +1,15 @@
1−`~& sigpam`
1+# `:dump`, `~&`, "sigpam", `{$dump p/@ud q/twig r/twig}`
2−===========
3
2
4Printf.
3Printf.
5
4
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.
7
7
8−More specifically in hoon terminology, prints `q` on the console
8+Regular form: *fixed 2 or 3*
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.
12
9
13−`p` is optional and is rarely used.
14
10
15−Produces
11+Examples:
16−--------
17
12
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− ~
58 ~zod/try=> ~&('oops' ~)
13 ~zod/try=> ~&('oops' ~)
59 'oops'
14 'oops'
60 ~
15 ~
docs/system/hoon/runes/sg/sgts.md+3−24
@@ -1,34 +1,13 @@
1−`~= sigtis`
1+# `:ddup`, `~=` "sigtis", `{$ddup p/twig q/twig}`
2−===========
3
2
4Hint to avoid duplication.
3Hint to avoid duplication.
5
4
6Hints to the interpreter that `q` may produce a noun equal to the
5Hints to the interpreter that `q` may produce a noun equal to the
7already existing `p` in order to avoid storing the same noun twice.
6already existing `p` in order to avoid storing the same noun twice.
8
7
9−Produces
8+Regular form: *2-fixed*
10−--------
11
9
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
10+Examples:
31−--------
32
11
33 ~zod/try=> 20
12 ~zod/try=> 20
34 20
13 20
docs/system/hoon/runes/sg/sgwt.md+4−43
@@ -1,52 +1,13 @@
1−`~? sigwut`
1+# `:warn`, `~?`, "sigwut", `{$warn p/@ud q/twig r/twig s/twig}`
2−===========
3
2
4PrintF if `q` true.
3PrintF if `q` true.
5
4
6Same as `~&` except for that `r` is printed to the console if and only
5Same 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.
8
7
9−Produces
8+Regularm form *4-fixed*
10−--------
11
9
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
10+Examples:
49−--------
50
11
51 ~zod/try=> ~?((gth 1 2) 'oops' ~)
12 ~zod/try=> ~?((gth 1 2) 'oops' ~)
52 ~
13 ~
docs/system/hoon/runes/sg/sgzp.md+4−34
@@ -1,40 +1,10 @@
1−`~! sigzap`
1+# `:peep`, `~!`, "sigzap", `{$peep p/twig q/twig}`
2−===========
3
2
4Print type on compilation fail.
3Print type on compilation fail.
5
4
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.
9
6
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
7+Examples:
37−--------
38
8
39 ~zod/try=> a
9 ~zod/try=> a
40 ! -find-limb.a
10 ! -find-limb.a
@@ -55,5 +25,5 @@ of `'foo'`, `@t`.
55 ! find-none
25 ! find-none
56 ! exit
26 ! exit
57
27
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
59type is in fact `%foo`.
29type is in fact `%foo`.