on master help sign in
$~ rune and link fixes
c19bc7ajoshuareagan
docs/reference/rune/bus/sig.udonnew file+69
@@ -0,0 +1,69 @@
1+:- :~ navhome/'/docs/'
2+ next/'true'
3+ sort/'10'
4+ title/'$~ "bussig"'
5+ ==
6+;>
7+
8+# `$~ "bussig"`
9+
10+`[%bssg p=hoon q=spec]`: define a custom type default value
11+
12+## Product
13+
14+Creates a structure (custom type) just like `q`, except its default value is `p`.
15+
16+## Defaults to
17+
18+The product of `p`.
19+
20+## Syntax
21+
22+Regular: *2-fixed*.
23+
24+```
25+$~ p=hoon q=spec
26+```
27+
28+`p` defines the default value, and `q` defines everything else about the structure.
29+
30+## Discussion
31+
32+You should make sure that the product type of `p` nests under `q`. You can check the default value of some structure (custom type) `r` with `*r`. (See the [`^*` rune](../../ket/tar).)
33+
34+Do not confuse the `$~` rune with the constant type for null, `$~`. (The latter uses older Hoon syntax that is still accepted. Preferably it would be `%~`.)
35+
36+## Examples
37+
38+First, let's define a type without using `$~`:
39+
40+```
41+> =b $@(@tas $%([%two *] [%three *]))
42+
43+> `b`%hello
44+%hello
45+
46+> `b`[%two %hello]
47+[%two 478.560.413.032]
48+
49+> *b
50+%$
51+
52+> *@tas
53+%$
54+```
55+
56+Using `$~`:
57+
58+```
59+> =c $~(%default-value $@(@tas $%([%two *] [%three *])))
60+
61+> `c`%hello
62+%hello
63+
64+> `c`[%two %hello]
65+[%two 478.560.413.032]
66+
67+> *c
68+%default-value
69+```
docs/reference/rune/mic/lus.udon+1−1
@@ -27,7 +27,7 @@ A `marl`, i.e., a list of `manx`. A `manx` is a noun that represents a single X
27
27
28tl;dr -- `;+` converts a `manx` to a `marl`.
28tl;dr -- `;+` converts a `manx` to a `marl`.
29
29
30−`;+` is a Sail rune. Sail is a part of Hoon used for creating and operating on nouns that represent XML nodes. With the appropriate rendering pipeline, a Sail document can be used to generate a static website. See the [Sail tutorial](../../../../tutorial/sail).
30+`;+` is a Sail rune. Sail is a part of Hoon used for creating and operating on nouns that represent XML nodes. With the appropriate rendering pipeline, a Sail document can be used to generate a static website. See the [Sail tutorial](../../../../tutorials/sail).
31
31
32In Sail a single XML node is represented by a `manx`. A single `<p>` node `manx` can be produced in the following way:
32In Sail a single XML node is represented by a `manx`. A single `<p>` node `manx` can be produced in the following way:
33
33
docs/reference/rune/mic/tar.udon+2−2
@@ -25,11 +25,11 @@ A `marl`, i.e., a list of `manx`. A `manx` is a noun that represents a single X
25
25
26## Discussion
26## Discussion
27
27
28−`;*` is a Sail rune. Sail is a part of Hoon used for creating and operating on nouns that represent XML nodes. With the appropriate rendering pipeline, a Sail document can be used to generate a static website. See the [Sail tutorial](../../../../tutorial/sail).
28+`;*` is a Sail rune. Sail is a part of Hoon used for creating and operating on nouns that represent XML nodes. With the appropriate rendering pipeline, a Sail document can be used to generate a static website. See the [Sail tutorial](../../../../tutorials/sail).
29
29
30If you need a complex Hoon expression to produce a `marl`, use the `;*` rune. Often this rune is used with an expression, `p`, that includes one or more `;=` subexpressions.
30If you need a complex Hoon expression to produce a `marl`, use the `;*` rune. Often this rune is used with an expression, `p`, that includes one or more `;=` subexpressions.
31
31
32−(See also [;=](./tis).)
32+(See also [;=](../tis).)
33
33
34## Examples
34## Examples
35
35
docs/reference/rune/mic/tis.udon+2−2
@@ -25,7 +25,7 @@ A `marl`, i.e., a list of `manx`. A `manx` is a noun that represents a single X
25
25
26## Discussion
26## Discussion
27
27
28−`;=` is a Sail rune. Sail is a part of Hoon used for creating and operating on nouns that represent XML nodes. With the appropriate rendering pipeline, a Sail document can be used to generate a static website. See the [Sail tutorial](../../../../tutorial/sail).
28+`;=` is a Sail rune. Sail is a part of Hoon used for creating and operating on nouns that represent XML nodes. With the appropriate rendering pipeline, a Sail document can be used to generate a static website. See the [Sail tutorial](../../../../tutorials/sail).
29
29
30In Sail a single XML node is represented by a `manx`. A single `<p>` node `manx` can be produced in the following way:
30In Sail a single XML node is represented by a `manx`. A single `<p>` node `manx` can be produced in the following way:
31
31
@@ -36,7 +36,7 @@ In Sail a single XML node is represented by a `manx`. A single `<p>` node `manx
36
36
37Sometimes what is needed is a `marl`, i.e., a list of `manx`. To convert a series of `manx` nodes to a `marl`, use the `;=` rune.
37Sometimes what is needed is a `marl`, i.e., a list of `manx`. To convert a series of `manx` nodes to a `marl`, use the `;=` rune.
38
38
39−(See also [`;*`](./tar).)
39+(See also [`;*`](../tar).)
40
40
41## Examples
41## Examples
42
42