runes, 0.1
commit3e4ad45b23067bcbc7801b604fc4d3363b6aa8db
authorGalen Wolfe-Pauly <root@office-for.com>
dateWed 17 Feb 2016, 17:53 (11 years ago)
parent082109b
126 files changed+466−544
docs.md+1−1
@@ -9,4 +9,4 @@ anchor: none
99
1010<div class="sections lead-offset">
1111 <kids></kids>
12−</div>
12+</div>
docs/setup/install.md+1−7
@@ -19,13 +19,7 @@ cloud virtual machines (Amazon or Digital Ocean), the default
1919memory configuration is smaller than this, and you need to
2020manually configure a swapfile.
2121
22−To add swap to a DO droplet:
23−
24−https://www.digitalocean.com/community/tutorials/how-to-add-swap-on-ubuntu-14-04
25−
26−To add swap on an Amazon instance:
27−
28−http://stackoverflow.com/questions/17173972/how-do-you-add-swap-to-an-ec2-instance
22+Digital Ocean has a post on adding swap [here](https://www.digitalocean.com/community/tutorials/how-to-add-swap-on-ubuntu-14-04). For Amazon there's a StackOverflow thread [here](http://stackoverflow.com/questions/17173972/how-do-you-add-swap-to-an-ec2-instance).
2923
3024Don't spend a lot of time tweaking these settings; the simplest
3125thing is fine.
docs/system/hoon/cheet-sheets.md → docs/system/hoon/cheat-sheets.mdrenamed+4
@@ -1,3 +1,7 @@
1+---
2+sort: 3
3+---
4+
15Quick references
26================
37
docs/system/hoon/library.md+4
@@ -1,3 +1,7 @@
1+---
2+sort: 2
3+---
4+
15Library
26========
37
docs/system/hoon/runes.md+7−10
@@ -1,19 +1,16 @@
1+---
2+sort: 1
3+---
4+
15Runes
26=====
37
4−In Hoon there are no reserved words. Instead, [`++twigs`]() (abstract
5−syntax trees), are formed using a diagraph of two ASCII symbols, which
6−is called a rune.
7−
8−Runes are loosely divided into categories by their first character. To
9−find documentation on each individual category, follow these links:
10−
118<list></list>
129
13−------------------------------------------------------------------------
10+---
1411
15−Introduction
16−------------
12+Rune basics
13+-----------
1714
1815For example, the rune `?:`, pronounced "wutcol", is a rune that accepts
1916three `++twig` expressions to form an "if-then-else statement," where
docs/system/hoon/runes/bc.mdnew file+11
@@ -0,0 +1,11 @@
1+---
2+sort: 2
3+---
4+
5+# `$ buc` (molds)
6+
7+##### Molds are types, but we don't have types.
8+
9+<list dataPath="docs/system/hoon/runes/bc" dataPreview="true" className="runes" linkToFragments="true"></list>
10+
11+<kids dataPath="docs/system/hoon/runes/bc" className="runes"></kids>
docs/system/hoon/runes/bc/bcbr.md+3−3
@@ -1,7 +1,7 @@
1−`$|`
2−====
1+`$| bucbar`
2+===========
33
4−Union between atom and cell
4+Union between atom and cell.
55
66[mold]() that's a union of an atom `p` and cell `q`.
77`$|` is similar to [`$?`](), but is more strict in that in
docs/system/hoon/runes/bc/bccb.md+3−3
@@ -1,7 +1,7 @@
1−`$_`
2−====
1+`$_ buccab`
2+===========
33
4−Unbunt (create mold from example)
4+Unbunt (create mold from example).
55
66Uses a [++twig]() `p` to produce a [mold]() for the type (span)
77of `p`. The validator function has a default value of `p`. Used
docs/system/hoon/runes/bc/bccl.md+3−3
@@ -1,7 +1,7 @@
1−`$:`
2−====
1+`$: buccol`
2+===========
33
4−Tuple of molds
4+Tuple of molds.
55
66Produces
77--------
docs/system/hoon/runes/bc/bccn.md+2−2
@@ -1,7 +1,7 @@
1−`$%`
1+`$% buccen`
22====
33
4−Tagged union
4+Tagged union.
55
66Produces a [mold]() of a tagged union of a list of case pairs.
77
docs/system/hoon/runes/bc/bcls.md+3−3
@@ -1,7 +1,7 @@
1−`$+`
2−====
1+`$+ buclus`
2+===========
33
4−Type of function (type signature)
4+Type of function (type signature).
55
66Produces a [mold]() for a function that accepts `p` and produces `q`. Used when we want to use the type of a function that we do not want to compute.
77
docs/system/hoon/runes/bc/bcpm.md+3−3
@@ -1,7 +1,7 @@
1−`$&`
2−====
1+`$& bucpam`
2+===========
33
4−Union of two cells: one w/cellular head & other w/atomic head
4+Union of two cells: one w/cellular head & other w/atomic head.
55
66Produces a [mold]() that's a union between two different kinds of noun: a cell whose head is a cell (`p`), and cell whose head is an atom (`q`). Its default value ([bunt]()) is the value of `q`. One important use of `$&` is to implement autocons in [`++twig`]().
77
docs/system/hoon/runes/bc/bctr.md+3−3
@@ -1,7 +1,7 @@
1−`$*`
2−====
1+`$* buctar`
2+===========
33
4−Bunt (default value)
4+Bunt (default value).
55
66Produces the default value ([bunt]()) of [mold]() `p`. Does so as a compile-time constant if possible. If not possible, then it is produced dynamically.
77
docs/system/hoon/runes/bc/bcts.md+3−3
@@ -1,7 +1,7 @@
1−`$=`
2−====
1+`$= buctis`
2+===========
33
4−Add variable name
4+Add variable name.
55
66Wraps a [++face]() around another [mold](). Used primarily to add variable names to values.
77
docs/system/hoon/runes/bc/bcwt.md+3−3
@@ -1,7 +1,7 @@
1−`$?`
2−====
1+`$? bucwut`
2+===========
33
4−Union of types
4+Union of types.
55
66Produce a union between a non-empty list of [mold]()s `p`. The default value ([bunt]()) is the value of the first element.
77
docs/system/hoon/runes/br.mdnew file+11
@@ -0,0 +1,11 @@
1+---
2+sort: 1
3+---
4+
5+# `| bar` (cores)
6+
7+##### Cores are sort of like objects, but not quite.
8+
9+<list dataPath="docs/system/hoon/runes/br" dataPreview="true" className="runes" linkToFragments="true"></list>
10+
11+<kids dataPath="docs/system/hoon/runes/br" className="runes"></kids>
docs/system/hoon/runes/br/brcb.md+7−3
@@ -1,7 +1,11 @@
1−`|_`
2−====
1+---
2+sort: 7
3+---
34
4−Door: core with sample (input values)
5+`|_ barcab`
6+===========
7+
8+Door: core with sample (input values).
59
610Similar to [`|%`](), but also takes input data (aka [sample]())
711available within the entire core. Cores of this type are called doors.
docs/system/hoon/runes/br/brcn.md+7−3
@@ -1,7 +1,11 @@
1−`|%`
2−====
1+---
2+sort: 1
3+---
34
4−Generic core
5+`|% barcen`
6+===========
7+
8+Generic core.
59
610Constructs a generic core with n named expressions, closed with `--`. Cores are
711similar to an object with named properties (aka [arms]()) that can contain either functions or data. Accepts both [dry or `%elm`]() and [wet or `%ash`]() arms.
docs/system/hoon/runes/br/brdt.md+7−3
@@ -1,7 +1,11 @@
1−`|.`
2−====
1+---
2+sort: 3
3+---
34
4−Trap: `|=` with no argument & not called automatically
5+`|. bardot`
6+===========
7+
8+Trap: `|=` with no argument & not called automatically.
59
610Similar to `|=` except that it takes no arguments and is not automatically
711called (you must activate it with the irregular wideform of `%-`, which is
docs/system/hoon/runes/br/brfs.md+7−3
@@ -1,7 +1,11 @@
1−`|/`
2−====
1+---
2+sort: 8
3+---
34
4−`|_` with well typed output
5+`|/ barfas`
6+===========
7+
8+`|_` with well typed output.
59
610Similar to `|_` except that it takes and produces well-typed output. XX
711
docs/system/hoon/runes/br/brhp.md+7−3
@@ -1,7 +1,11 @@
1−`|-`
2−====
1+---
2+sort: 4
3+---
34
4−Trap: automatically called function with no arguments
5+`|- barhep`
6+===========
7+
8+Trap: automatically called function with no arguments.
59
610A function with no arguments that's automatically called when constructed. More specifically, it produces a [dry]() [%gold]() [core]() whose single [arm]() [$]() (the empty name) is automatically called when the core is constructed. Similar to creating and calling an anonymous function and is quite commonly used for loops or recursion.
711
docs/system/hoon/runes/br/brkt.md+6−2
@@ -1,5 +1,9 @@
1−`|^`
2−====
1+---
2+sort: 6
3+---
4+
5+`|^ barket`
6+===========
37
48Same as `|-` except that it can contain internal arms.
59
docs/system/hoon/runes/br/brls.md+7−3
@@ -1,7 +1,11 @@
1−`|+`
2−====
1+---
2+sort: 9
3+---
34
4−Function with unreadable sample
5+`|+ barlus`
6+===========
7+
8+Function with unreadable sample.
59
610`|+` is a synthetic rune that produces a [dry]() [`%iron`]() function
711with argument (aka [sample]()) [`$*(p)`]() and [arm]()s `q`. `|+` is similar to `|=`, but differs in that its input (sample) cannot be read and thus cannot interfere with the type system.
docs/system/hoon/runes/br/brtr.md+7−3
@@ -1,7 +1,11 @@
1−`|*`
2−====
1+---
2+sort: 10
3+---
34
4−Wet function
5+`|* bartar`
6+===========
7+
8+Wet function.
59
610Similar to `|=` except that it does type checking at
711call time, and that the product type is checked to be the same as
docs/system/hoon/runes/br/brts.md+7−3
@@ -1,7 +1,11 @@
1−`|=`
2−====
1+---
2+sort: 2
3+---
34
4−Function with argument(s)
5+`|= bartis`
6+===========
7+
8+Function with argument(s).
59
610`|=`, is a synthetic rune that produces a [dry]() [`%gold`]() gate with
711sample [`$*(p)`](), arm `q`. A gate is a core with one arm, [`$`](), the
docs/system/hoon/runes/br/brwt.md+7−3
@@ -1,7 +1,11 @@
1−`|?`
2−====
1+---
2+sort: 5
3+---
34
4−`|-` with hidden context
5+`|? barwut`
6+===========
7+
8+`|-` with hidden context.
59
610Similar to `|-` except for that the [sample]() and
711[context]() of the core being passed is hidden in order to avoid
docs/system/hoon/runes/cl.mdnew file+11
@@ -0,0 +1,11 @@
1+---
2+sort: 3
3+---
4+
5+# `: col` (tuples)
6+
7+##### Tuples are easy.
8+
9+<list dataPath="docs/system/hoon/runes/cl" dataPreview="true" className="runes" linkToFragments="true"></list>
10+
11+<kids dataPath="docs/system/hoon/runes/cl" className="runes"></kids>
docs/system/hoon/runes/cl/clcb.md+3−3
@@ -1,7 +1,7 @@
1−`:_`
2−====
1+`:_ colcab`
2+===========
33
4−Inverted tuple of `p` `q`
4+Inverted tuple of `p` `q`.
55
66Exists for code readability and organization. See the [backstep]() convention.
77
docs/system/hoon/runes/cl/clfs.md+3−3
@@ -1,7 +1,7 @@
1−`:/`
2−====
1+`:/ colfas`
2+===========
33
4−String to XML XX
4+String to XML XX.
55
66`:/`, `colfas`, is a synthetic rune that produces `[%$ [%$ p ~] ~]`,
77i.e., `[0 [0 p 0] 0]`.
docs/system/hoon/runes/cl/clhp.md+3−3
@@ -1,7 +1,7 @@
1−`:-`
2−====
1+`:- colhep`
2+===========
33
4−Tuple of two
4+Tuple of two.
55
66Produces
77--------
docs/system/hoon/runes/cl/clkt.md+3−3
@@ -1,7 +1,7 @@
1−`:^`
2−====
1+`:^ colket`
2+===========
33
4−Tuple of four
4+Tuple of four.
55
66Produces
77--------
docs/system/hoon/runes/cl/clls.md+3−3
@@ -1,7 +1,7 @@
1−`:+`
2−====
1+`:+ collus`
2+===========
33
4−Tuple of 3
4+Tuple of 3.
55
66Produces
77--------
docs/system/hoon/runes/cl/clsg.md+3−3
@@ -1,7 +1,7 @@
1−`:~`
2−====
1+`:~ colsig`
2+===========
33
4−Null-terminated tuple of n elements
4+Null-terminated tuple of n elements.
55
66Closed with `==`.
77
docs/system/hoon/runes/cl/cltr.md+3−3
@@ -1,7 +1,7 @@
1−`:*`
2−====
1+`:* coltar`
2+===========
33
4−Tuple of n elements
4+Tuple of n elements.
55
66Closed with `==`.
77
docs/system/hoon/runes/cn.mdnew file+11
@@ -0,0 +1,11 @@
1+---
2+sort: 4
3+---
4+
5+# `% cen` (invocations)
6+
7+##### Calls, but not.
8+
9+<list dataPath="docs/system/hoon/runes/cn" dataPreview="true" className="runes" linkToFragments="true"></list>
10+
11+<kids dataPath="docs/system/hoon/runes/cn" className="runes"></kids>
docs/system/hoon/runes/cn/cncb.md+3−3
@@ -1,7 +1,7 @@
1−`%_`
2−====
1+`%_ cencab`
2+===========
33
4−`%=`, but product cast to `p`
4+`%=`, but product cast to `p`.
55
66The same as [`%=`](), except for that the product is cast
77back to the type of `p`. Evaluates `p` with the changes specified in `q`, then casts the product back to the type of `p`. `%_` is used to change a batch of [`++wing`]()s all at once, ensuring that the resulting product is type checked.
docs/system/hoon/runes/cn/cndt.md+3−3
@@ -1,7 +1,7 @@
1−`%.`
2−====
1+`%. cendot`
2+===========
33
4−Inverted function call
4+Inverted function call.
55
66Inverts the order of [`%-`](), so the argument is the first
77element and the second element is the function. Exists primarily
docs/system/hoon/runes/cn/cnhp.md+3−3
@@ -1,7 +1,7 @@
1−`%-`
2−====
1+`%- cenhep`
2+===========
33
4−Call function w/one argument
4+Call function w/ one argument.
55
66Call function with one argument. Has an irregular wideform syntax: `(function[arg0 arg1...])`, which can takes n arguments enclosed within the `()`. Note
77that one can also pass a tall form (or wide form) function called with `%-` a tuple with `n` elements for functions that require more than one argument.
docs/system/hoon/runes/cn/cnkt.md+3−3
@@ -1,7 +1,7 @@
1−`%^`
2−====
1+`%^ cenket`
2+===========
33
4−Call function w/three arguments
4+Call function w/ three arguments.
55
66Calls the one arm ([$]()) from the [door]() `p` with its [sample]() set to `[%cntr q r s]`. `%^` in the most common case simply calls `p` with `q`, `r`and `s` as its arguments.
77
docs/system/hoon/runes/cn/cnls.md+3−3
@@ -1,7 +1,7 @@
1−`%+`
2−====
1+`%+ cenlus`
2+===========
33
4−Call function w/two arguments
4+Call function w/ two arguments.
55
66Calls the one arm ([$]()) from the [door]() `p` with its [sample]() set to `[%cntr q r]`.
77
docs/system/hoon/runes/cn/cnsg.md+3−3
@@ -1,7 +1,7 @@
1−`%~`
2−====
1+`%~ censig`
2+===========
33
4−Call arm in door w/argument
4+Call arm in door w/ argument.
55
66Evaluates the expression addressed at `p` within core
77`q` whose input data ([sample]()) is set to `r`. Used frequently with
docs/system/hoon/runes/cn/cntr.md+4−4
@@ -1,9 +1,9 @@
1−centar, `%*`, %cntr
2−============================
1+`%* centar`
2+===========
33
4−`%~` call arm from [door]() w/context changes
4+`%~` call arm from door w/ context changes.
55
6−The same as `%~` but can make changes anywhere in the [context](), not just within the input data ([sample]()). Evaluates the expression `p` within core `q` with changes `r` to the context.
6+The same as `%~` but can make changes anywhere in the context, not just within the input data (sample). Evaluates the expression `p` within core `q` with changes `r` to the context.
77
88Produces
99--------
docs/system/hoon/runes/cn/cnts.md+3−3
@@ -1,7 +1,7 @@
1−`%=`
2−====
1+`%= centis`
2+===========
33
4−Eval `p` w/changes
4+Eval `p` w/ changes.
55
66Evaluates `p` with the changes specified in `q`, where `q` is a list of addresses ([`++wing`]())s followed by the values that will replace whatever value currently lies at that address. Makes the changes all at once to ensure that the product type is checked.
77
docs/system/hoon/runes/dt.mdnew file+11
@@ -0,0 +1,11 @@
1+---
2+sort: 5
3+---
4+
5+# `. dot` (nock)
6+
7+##### Run some nock.
8+
9+<list dataPath="docs/system/hoon/runes/dt" dataPreview="true" className="runes" linkToFragments="true"></list>
10+
11+<kids dataPath="docs/system/hoon/runes/dt" className="runes"></kids>
docs/system/hoon/runes/dt/dtkt.md+3−3
@@ -1,7 +1,7 @@
1−`.^`
2−====
1+`.^ dotket`
2+===========
33
4−Nock 11
4+Nock 11.
55
66Generates nock operator `11`, which--in virtual userspace
77nock, [`++mock`]()--loads a file from the global namespace, [%clay]().
docs/system/hoon/runes/dt/dtls.md+3−3
@@ -1,7 +1,7 @@
1−`.+`
2−====
1+`.+ dotlus`
2+===========
33
4−Increments an atom
4+Increments an atom.
55
66`.+` is a natural rune that generates nock operator `4`, which
77increments an operand that's an atom.
docs/system/hoon/runes/dt/dttr.md+3−3
@@ -1,7 +1,7 @@
1−`.*`
2−====
1+`.* dottar`
2+===========
33
4−Compute nock
4+Compute nock.
55
66Computes nock expressions. Runs nock formula `q` on
77nock subject `p`.
docs/system/hoon/runes/dt/dtts.md+3−3
@@ -1,7 +1,7 @@
1−`.=`
2−====
1+`.= dottis`
2+===========
33
4−Test equality
4+Test equality.
55
66Nock operator 5: tests two nouns `p` and `q` for equality, producing a boolean.
77
docs/system/hoon/runes/dt/dtwt.md+3−3
@@ -1,7 +1,7 @@
1−`.?`
2−====
1+`.? dotwut`
2+===========
33
4−Test if noun is cell or atom
4+Test if noun is cell or atom.
55
66Nock operator 3: tests whether a noun is a cell or an
77atom, producing true if it is the former and false if the latter.
docs/system/hoon/runes/dt/dtzy.md+3−3
@@ -1,7 +1,7 @@
1−[dotzay, %dtzy](#dttr)
2−======================
1+`dotzay`
2+========
33
4−Odored atom
4+Odored atom.
55
66`dotzay` is a natural rune that produces a non-cubed atomic constant of
77odor `p` and value `q`. `dotzay` is never used explicitly, but always
docs/system/hoon/runes/dt/dtzz.md+3−3
@@ -1,7 +1,7 @@
1−dotzaz, %dtzz
2−======================
1+`dotzaz`
2+========
33
4−Cube
4+Cube.
55
66`dotzaz` is a natural rune that produces a cubed noun constant of value
77`q` and odor `p`, if `q` is an atom. A cube is an atom whose type
docs/system/hoon/runes/hx.mdnew file+11
@@ -0,0 +1,11 @@
1+---
2+sort: 6
3+---
4+
5+# `# hax` (printing)
6+
7+##### Want to print something? Fine.
8+
9+<list dataPath="docs/system/hoon/runes/hx" dataPreview="true" className="runes" linkToFragments="true"></list>
10+
11+<kids dataPath="docs/system/hoon/runes/hx" className="runes"></kids>
docs/system/hoon/runes/hx/hxgl.md+3−3
@@ -1,7 +1,7 @@
1−haxgal, `#<`, %hxgl
2−============================
1+`#< haxgal`
2+===========
33
4−Prettyprint string [`++tape`]()
4+Prettyprint string `++tape`.
55
66`#<` is a synthetic rune that calls the function [`++noah`]() with argument `p`. Used to produce a [`++tape`]() of the expression passed to it, and
77is only used in the irregular form.
docs/system/hoon/runes/hx/hxgr.md+3−3
@@ -1,7 +1,7 @@
1−haxgar, `#>`, %hxgr
2−============================
1+`#> haxgar`
2+===========
33
4−Prettyprint `++tank`
4+Prettyprint `++tank`.
55
66`#>`, `haxgar`, `[%hxgr p=tusk]`is a synthetic rune that slams the
77assumed gate `cain` on `[%zpgr %cntr p]`.
docs/system/hoon/runes/kt.mdnew file+11
@@ -0,0 +1,11 @@
1+---
2+sort: 7
3+---
4+
5+# `^ ket` (casting)
6+
7+##### Go ahead, recast that.
8+
9+<list dataPath="docs/system/hoon/runes/kt" dataPreview="true" className="runes" linkToFragments="true"></list>
10+
11+<kids dataPath="docs/system/hoon/runes/kt" className="runes"></kids>
docs/system/hoon/runes/kt/ktbr.md+3−3
@@ -1,7 +1,7 @@
1−`^|`
2−====
1+`^| ketbar`
2+===========
33
4−Make core context unreadable
4+Make core context unreadable.
55
66Converts a core to a core whose [context]() is unreadable. Useful in
77preventing type fails when replacing one core with one context
docs/system/hoon/runes/kt/ktdt.md+3−3
@@ -1,7 +1,7 @@
1−`^.`
2−====
1+`^. ketdot`
2+===========
33
4−Cast `q` to product type of `p`
4+Cast `q` to product type of `p`.
55
66Casts `q` to the product of calling `p` on `q`. The same
77as casting `q` to the product type of `p`. Useful when you want
docs/system/hoon/runes/kt/kthp.md+3−3
@@ -1,7 +1,7 @@
1−`^-`
2−====
1+`^- kethep`
2+===========
33
4−Cast
4+Cast.
55
66Casts `q` to the [span]() of `p`. The same as `^+`, except for that `q` is actually cast to the bunt of `q` (`$,(q)`). The easiest way to make a basic cast. Used when you already have already created a validator function ([mold]()) for a span.
77
docs/system/hoon/runes/kt/ktls.md+3−3
@@ -1,7 +1,7 @@
1−`^+`
2−====
1+`^+ ketlus`
2+===========
33
4−Cast `q` to an unbunted `p`
4+Cast `q` to an unbunted `p`.
55
66Casts `q` to the type of `p`, verifying that it contains
77the type of `q`. Similar to `^+`, but doesn't bunt `p`. Used to
docs/system/hoon/runes/kt/ktpm.md+3−3
@@ -1,7 +1,7 @@
1−ketpam, `^&`, %ktpm
2−============================
1+`^& ketpam`
2+===========
33
4−Convert `%gold` to `%zinc`
4+Convert `%gold` to `%zinc`.
55
66`^&` is a natural rune that converts a `%gold` core into a `%zinc` core.
77At present, `%zinc` cores are not commonly used.
docs/system/hoon/runes/kt/ktsg.md+3−3
@@ -1,7 +1,7 @@
1−`^~`
2−====
1+`^~ ketsig`
2+===========
33
4−Try executing `p` at compile time
4+Try executing `p` at compile time.
55
66Tries to execute `p` statically at compile time. If this
77fails, `p` remains dynamic. Primarily useful for
docs/system/hoon/runes/kt/ktts.md+2−2
@@ -1,5 +1,5 @@
1−`^=`
2−====
1+`^= kettis`
2+===========
33
44Wraps a variable name around a value.
55
docs/system/hoon/runes/kt/ktwt.md+4−2
@@ -1,5 +1,7 @@
1−ketwut, `^?`, %ktwt
2−============================
1+`^? ketwut`
2+===========
3+
4+Convert `%gold` to `%lead`.
35
46Used to convert a [core]() whose context is unreadable (aka
57a %gold core) to a core both of whose context and sample are
docs/system/hoon/runes/sg.mdnew file+11
@@ -0,0 +1,11 @@
1+---
2+sort: 8
3+---
4+
5+# `~ sig` (hints)
6+
7+##### Give the compiler a little help.
8+
9+<list dataPath="docs/system/hoon/runes/sg" dataPreview="true" className="runes" linkToFragments="true"></list>
10+
11+<kids dataPath="docs/system/hoon/runes/sg" className="runes"></kids>
docs/system/hoon/runes/sg/sgbc.md+3−3
@@ -1,7 +1,7 @@
1−`~$`
2−====
1+`~$ sigbuc`
2+===========
33
4−Label for profiling
4+Label for profiling.
55
66Labels computation `q` as `p` for profiling.
77
docs/system/hoon/runes/sg/sgbr.md+3−3
@@ -1,7 +1,7 @@
1−`~|`
2−====
1+`~| sigbar`
2+===========
33
4−`p` in stack trace if `q` crashes
4+`p` in stack trace if `q` crashes.
55
66Presents the product of `p` in the stack trace if `q` crashes. `p` is only
77evaluated if `q` crashes.
docs/system/hoon/runes/sg/sgcb.md+3−3
@@ -1,7 +1,7 @@
1−`~_`
2−====
1+`~_ sigcab`
2+===========
33
4−Pre-formatted stackframe into stacktrace
4+Pre-formatted stackframe into stacktrace.
55
66Inserts pre-formatted stackframe `p` into the stacktrace of `q`.
77In hoon terminology, inserts `p`, a [trap]() producing a [++`tank`]() (pretty printed text), in the trace of `q`.
docs/system/hoon/runes/sg/sgcn.md+3−3
@@ -1,7 +1,7 @@
1−`~%`
2−====
1+`~% sigcen`
2+===========
33
4−Register jet
4+Register jet.
55
66Registers a jet in core `s` so that it can be called when that code is run.
77
docs/system/hoon/runes/sg/sgfs.md+3−3
@@ -1,7 +1,7 @@
1−`~/`
2−====
1+`~/ sigfas`
2+===========
33
4−XX
4+XX.
55
66`~/` is a synthetic rune that implements one common case - a function arm in
77a [book](), i.e. a library function - of the [`~%`]() [jet]() hint. Assumes the parent axis is `7` and that there are no children.
docs/system/hoon/runes/sg/sggl.md+3−3
@@ -1,7 +1,7 @@
1−`~<`
2−====
1+`~< siggal`
2+===========
33
4−Hint to product
4+Hint to product.
55
66`~<` is a synthetic rune that applies arbitrary [hint]() `p` to the
77product of `q`. `~<` is similar to `~>`, but computes `q` before
docs/system/hoon/runes/sg/sggr.md+2−2
@@ -1,5 +1,5 @@
1−`~>`
2−====
1+`~> siggar`
2+===========
33
44Arbitrary hint
55
docs/system/hoon/runes/sg/sgls.md+3−3
@@ -1,7 +1,7 @@
1−`~+`
2−====
1+`~+ siglus`
2+===========
33
4−Memoize computation
4+Memoize computation.
55
66Hints to the interpreter to memoize (cache) the computation of `p`.
77
docs/system/hoon/runes/sg/sgpm.md+4−4
@@ -1,9 +1,9 @@
1−sigpam, `~&`, %sgpm
2−============================
1+`~& sigpam`
2+===========
33
4−PrintF
4+Printf.
55
6−'PrintF' or 'log' in other languages. Often used for debugging.
6+'Printf' or 'log' in other languages. Often used for debugging.
77
88More specifically in hoon terminology, prints `q` on the console
99before computing `r`. `p` is the log priority, 0-3 defaulting to 0. `~&`
docs/system/hoon/runes/sg/sgts.md+3−3
@@ -1,7 +1,7 @@
1−`~=`
2−====
1+`~= sigtis`
2+===========
33
4−Hint to avoid duplication
4+Hint to avoid duplication.
55
66Hints to the interpreter that `q` may produce a noun equal to the
77already existing `p` in order to avoid storing the same noun twice.
docs/system/hoon/runes/sg/sgwt.md+3−3
@@ -1,7 +1,7 @@
1−`~?`
2−====
1+`~? sigwut`
2+===========
33
4−PrintF if `q` true
4+PrintF if `q` true.
55
66Same as `~&` except for that `r` is printed to the console if and only
77if `q` evaluates to true.
docs/system/hoon/runes/sg/sgzp.md+3−3
@@ -1,7 +1,7 @@
1−sigzap, `~!`, %sgzp
2−============================
1+`~! sigzap`
2+===========
33
4−Print type on compilation fail
4+Print type on compilation fail.
55
66`~!` is a natural rune for debugging uses only, semantically equivalent
77to [`++twig`] `q`. If compilation fails within `q`, `~!` will show the
docs/system/hoon/runes/sm.md+7−38
@@ -1,42 +1,11 @@
1−<div class="short">
1+---
2+sort: 10
3+---
24
3−`sem ; %sem`
4−============
5+# `; sem` (composition)
56
6−Composition
7−-----------
7+##### Compose at will.
88
9−The `;` runes are used for composition. They are all synthetic.
9+<list dataPath="docs/system/hoon/runes/sm" dataPreview="true" className="runes" linkToFragments="true"></list>
1010
11−There are three categories of `;` runes.
12−
13−</div>
14−
15−#### Gate composers
16−
17−[`;:`]() Applies a binary gate to multiple arguments.
18−
19−[`;~`]() Uses a monad to compose multiple gates, producing a gate of a similar type.
20−
21−[`;;`]() Composes a [clam]() with a value, slamming the value through
22−the clam and forcefully verifying that it is unchanged. See also:
23−[`++hard`]().
24−
25−<hr></hr>
26−
27−#### Interpolators
28−
29−[`;"`]() Composes [`++tapes`]() and twigs that produce `++tape`s.
30−Generally used in its irregular form, of (text surrounded by double
31−quotes).
32−
33−<hr></hr>
34−
35−#### [++sail] runes:
36−
37−`;-`, `;+`, `;*`, `;%`, and `%smzz` all compose a tree structure. See
38−also: [`++sail`]().
39−
40−<hr></hr>
41−
42−<kids></kids>
11+<kids dataPath="docs/system/hoon/runes/sm" className="runes"></kids>
docs/system/hoon/runes/sm/smcl.md+2−2
@@ -1,7 +1,7 @@
1−`;:`
1+`;: semcol`
22====
33
4−Fold over tuple
4+Fold over tuple.
55
66Apply a binary function `p` to a tuple `q` with n elements. Similar to folding over the tuple `q`.
77
docs/system/hoon/runes/sm/smcn.md+2−2
@@ -1,7 +1,7 @@
1−`;%`
1+`;% semcen`
22====
33
4−`%-` in [`++sail`]()
4+`%-` in `++sail`.
55
66Performs the same function as `%-`, except within XML template syntax
77(aka sail). Passes `q`, a list of n arguments, to function `p`.
docs/system/hoon/runes/sm/smdq.md+2−2
@@ -1,7 +1,7 @@
1−`;"`
1+`;" semdoq`
22====
33
4−Make string
4+Make string.
55
66`semdoq` is a synthetic rune used to make strings, interpreted or not.
77
docs/system/hoon/runes/sm/smhp.md+2−2
@@ -1,7 +1,7 @@
1−`;-`
1+`;- semhep`
22====
33
4−Interpolate string
4+Interpolate string.
55
66Interpolates a string (aka [++tape]()) into a [`++marl`](), our datastructure for XML.
77
docs/system/hoon/runes/sm/smls.md+2−2
@@ -1,7 +1,7 @@
1−`;+`
1+`;+ semlus`
22====
33
4−Interpolate [`++manx`]()
4+Interpolate `++manx`.
55
66`;+` is a virtual rune used within [`++sail`]() to interpolate a manx.
77`;+` is useful when you need to dynamically produce a tag in a `++sail`
docs/system/hoon/runes/sm/smsg.md+2−2
@@ -1,7 +1,7 @@
1−`;~`
1+`;~ semsig`
22====
33
4−Monad composer
4+Monad composer.
55
66`;~` is a synthetic rune used to compose functions under a monad.
77
docs/system/hoon/runes/sm/smsm.md+2−2
@@ -1,7 +1,7 @@
1−`;;`
1+`;; semsem`
22====
33
4−Fixpoint
4+Fixpoint.
55
66`;;` is a synthetic rune that types `q` as a fixpoint of `p`. More
77specifically, `;;` slams `q` through gate `p`, asserting that the
docs/system/hoon/runes/sm/smtr.md+3−3
@@ -1,7 +1,7 @@
1−`;*`
2−====
1+`;* semtar`
2+===========
33
4−Interpolate list of XML nodes
4+Interpolate list of XML nodes.
55
66Interpolates a list of XML nodes within our XML template syntax (aka sail)
77
docs/system/hoon/runes/sm/smzz.md+3−3
@@ -1,7 +1,7 @@
1−semzaz
2−===============
1+`semzaz`
2+========
33
4−[`++sail`]() tag
4+`++sail` tag.
55
66`semzaz`, is a virtual rune frequently referred to as [`++sail`]() in
77reference to `++sail`:vast which parses it. It is the most basic part of
docs/system/hoon/runes/ts.mdnew file+11
@@ -0,0 +1,11 @@
1+---
2+sort: 9
3+---
4+
5+# `= tis` (subject modifiers)
6+
7+##### Feel free to change the subject.
8+
9+<list dataPath="docs/system/hoon/runes/ts" dataPreview="true" className="runes" linkToFragments="true"></list>
10+
11+<kids dataPath="docs/system/hoon/runes/ts" className="runes"></kids>
docs/system/hoon/runes/ts/tsbr.md+3−1
@@ -1,6 +1,8 @@
1−`=|`
1+`=| tisbar`
22====
33
4+Default value.
5+
46Produces the default value of input type (aka mold) `p` and makes it
57available/pushes it onto `q`.
68
docs/system/hoon/runes/ts/tscl.md+3−1
@@ -1,6 +1,8 @@
1−`=:`
1+`=: tiscol`
22====
33
4+List of changes.
5+
46Makes a list of changes `p` to the subject and then evaluates `q`.
57Allows you to change values in your context (not in the hoon sense).
68
docs/system/hoon/runes/ts/tsdt.md+3−1
@@ -1,6 +1,8 @@
1−`=.`
1+`=. tisdot`
22====
33
4+Change value.
5+
46Produces `r` with `p` in the subject set to `q`. Allows you to change
57a value in your subject before executing more code against it.
68
docs/system/hoon/runes/ts/tsgl.md+4−2
@@ -1,7 +1,9 @@
1−`=<`
1+`=< tisgal`
22====
33
4−An inverted `=<`. Uses the product of `q` as the subject of formula
4+Inverted `=>`.
5+
6+An inverted `=>`. Uses the product of `q` as the subject of formula
57`p`. Allows us to keep the heavier of `p` `q` as the bottom expression, which
68makes for more readable code. Please see the section on [backstep]().
79
docs/system/hoon/runes/ts/tsgr.md+2−2
@@ -1,7 +1,7 @@
1−`=>`
1+`=> tisgar`
22====
33
4−Product as subject
4+Product as subject.
55
66`=>` is a natural rune that uses the product of `p` as the subject of
77`q`. `=>` is the inverse of `=<`. Use `=>` when your `p` isn't too long
docs/system/hoon/runes/ts/tshp.md+3−1
@@ -1,6 +1,8 @@
1−`=-`
1+`=- tishep`
22====
33
4+Inverted `=+`.
5+
46An inverted `=+`. Pushes variable `q` onto the subject and then
57executes `p` against the new subject. Allows us to place the larger of `p` and
68`q` as the bottom expression, making for for more readable code (see the
docs/system/hoon/runes/ts/tskt.md+4−2
@@ -1,8 +1,10 @@
1−`=^`
1+`=^ tisket`
22====
33
4+State monad.
5+
46Used to both push a new variable on the subject as well as change the
5−value of another.Similar to `=+` in that it pushes a value on the stack with
7+value of another. Similar to `=+` in that it pushes a value on the stack with
68variable name (face) `p`. However, in addition to pushing a new variable onto
79the subject, it also modifies whatever value is tied to `q` within the subject.
810`r` is the cell of [new-product-p updated-value-1]. You can think of `=^` like
docs/system/hoon/runes/ts/tsls.md+3−1
@@ -1,6 +1,8 @@
1−`=+`
1+`=+ tislus`
22====
33
4+Assign.
5+
46Easiest way to declare variables. Pushes a new variable `p` onto the
57subject and then executes `q` against it.
68
docs/system/hoon/runes/ts/tssg.md+3−1
@@ -1,6 +1,8 @@
1−`=~`
1+`=~ tissig`
22====
33
4+List of twigs.
5+
46Composes a list of twigs. Applies `=>` to a list of expressions, using each result as the
57subject to the following expression.
68
docs/system/hoon/runes/ts/tstr.md+3−1
@@ -1,6 +1,8 @@
1−`=*`
1+`=* tistar`
22====
33
4+Alias.
5+
46Makes `p` an alias of value `q`. Useful when you don't want to write
57out a long address multiple times, for example `p.s.+.variable`, which translates to `p` within `s` within the tail of `variable`.
68
docs/system/hoon/runes/wt.mdnew file+11
@@ -0,0 +1,11 @@
1+---
2+sort: 11
3+---
4+
5+# `? wut` (conditional)
6+
7+##### If this then what?
8+
9+<list dataPath="docs/system/hoon/runes/wt" dataPreview="true" className="runes" linkToFragments="true"></list>
10+
11+<kids dataPath="docs/system/hoon/runes/wt" className="runes"></kids>
docs/system/hoon/runes/wt/wtbr.md+2−2
@@ -1,7 +1,7 @@
1−`?|`
1+`?| wutbar`
22====
33
4−Logical 'or'
4+Logical 'or'.
55
66Computes the logical 'or' operation on a list of boolean expressions `p`.
77
docs/system/hoon/runes/wt/wtcl.md+2−2
@@ -1,7 +1,7 @@
1−`?:`
1+`?: wutcol`
22====
33
4−If-then-else
4+If-then-else.
55
66Produces
77--------
docs/system/hoon/runes/wt/wtdt.md+2−2
@@ -1,7 +1,7 @@
1−`?.`
1+`?. wutdot`
22====
33
4−Inverted if-then-else
4+Inverted if-then-else.
55
66Unless `p` is true, evaluate `r`. Used to keep the heavier of `q` and `r` as the bottom expression, which makes for more readable code (see the section on [backstep]()).
77
docs/system/hoon/runes/wt/wtgl.md+2−2
@@ -1,7 +1,7 @@
1−`?<`
1+`?< wutgal`
22====
33
4−Assert `p` is false
4+Assert `p` is false.
55
66Asserts that `p` is false before evaluating `q`. Crashes if `p` evaluates to false.
77
docs/system/hoon/runes/wt/wtgr.md+2−2
@@ -1,7 +1,7 @@
1−`?>`
1+`?> wutgar`
22====
33
4−Assert `p` is true
4+Assert `p` is true.
55
66Asserts that `p` is true before evaluating `q`. Crashes if `p` evaluates to true.
77
docs/system/hoon/runes/wt/wthp.md+2−2
@@ -1,7 +1,7 @@
1−`?-`
1+`?- wuthep`
22====
33
4−Switch
4+Switch.
55
66Different from the traditional switch statement in that it switches on a type instead of a value. More specifically, the labels in `q` must match the [span]() of `p`. `q` must be terminated with a `==`.
77
docs/system/hoon/runes/wt/wthz.mddeleted−52
@@ -1,52 +0,0 @@
1−wuthaz, %wthz
2−======================
3−
4−[Short description]
5−
6−`wuthaz`, `[%wthz p=wing q=tine]` is a synthetic rune that selects a
7−case in `q` for the actual type of `p`.
8−
9−Produces
10−--------
11−
12−[Twig or mold]
13−
14−Sample
15−------
16−
17−[`p` is a \* `q` is a \*]
18−
19−Tall form
20−---------
21−
22−Kingside:
23−
24− ?- p
25− p.i.q q.i.q
26− p.i.t.q q.i.t.q
27− p.i.t.t.q q.i.t.t.q
28− ==
29−
30−Queenside:
31−
32− ?- p
33− p.i.q
34− q.i.q
35− p.i.t.q
36− q.i.t.q
37− p.i.t.t.q
38− q.i.t.t.q
39− ==
40−
41−Wide form
42−---------
43−
44−?-(p p.i.q q.i.q, p.i.t.q q.i.t.q, p.i.t.t.q q.i.t.t.q)
45−
46−Irregular form
47−--------------
48−
49−None
50−
51−Examples
52−--------
docs/system/hoon/runes/wt/wtkt.md+2−2
@@ -1,7 +1,7 @@
1−`?^`
1+`?^ wutket`
22====
33
4−If `p` is cell-then-else
4+If `p` is cell-then-else.
55
66Produces
77--------
docs/system/hoon/runes/wt/wtkz.mddeleted−34
@@ -1,34 +0,0 @@
1−wutkaz, %wtkz
2−======================
3−
4−[`++tiki`]() version of [`%wtkt`]()
5−
6−`wutkaz` is only used internally.
7−
8−Produces
9−--------
10−
11−Twig: `[%wtkz p=tiki q=twig r=twig]`
12−
13−Sample
14−------
15−
16−`p` is a [`++tiki`](). `q` and `r` are [twig]()s.
17−
18−Tall form
19−---------
20−
21−None
22−
23−Wide form
24−---------
25−
26−None
27−
28−Irregular form
29−--------------
30−
31−None
32−
33−Examples
34−--------
docs/system/hoon/runes/wt/wtls.md+2−2
@@ -1,7 +1,7 @@
1−`?+`
1+`?+ wutlus`
22====
33
4−Switch w/default value
4+Switch w/default value.
55
66Identical to [`?-`]() except for that it takes a default case `q` if none of the cases in `r` match the type of `p`. More specifically, the labels in `q` must match the [span]() of `p`. `q` must be terminated with a `==`.
77
docs/system/hoon/runes/wt/wtlz.mddeleted−35
@@ -1,35 +0,0 @@
1−wutlaz, %wtlz
2−======================
3−
4−[`++tiki`]() version of [`%wtls`]()
5−
6−`wutlaz` is a synthetic rune that selects a case in `q` for the actual
7−type of `p`. Only used internally.
8−
9−Produces
10−--------
11−
12−Twig: `[%wtlz p=wing q=twig r=tine]`
13−
14−Sample
15−------
16−
17−`p` is a [`++wing`](). `q` is a [twig](). `r` is a [`++tine`]().
18−
19−Tall form
20−---------
21−
22−None
23−
24−Wide form
25−---------
26−
27−None
28−
29−Irregular form
30−--------------
31−
32−None
33−
34−Examples
35−--------
docs/system/hoon/runes/wt/wtpm.md+2−2
@@ -1,7 +1,7 @@
1−`?&`
1+`?& wutpam`
22====
33
4−Logical 'and'
4+Logical 'and'.
55
66Computes the logical 'and' operation on a list of boolean expressions.
77
docs/system/hoon/runes/wt/wtpt.md+2−2
@@ -1,7 +1,7 @@
1−`?@`
1+`?@ wutpat`
22====
33
4−If atom-then-else
4+If atom-then-else.
55
66If-then-else statement that tests whether `p` is an atom, producing `q` if true and `r` if false.
77
docs/system/hoon/runes/wt/wtpz.mddeleted−34
@@ -1,34 +0,0 @@
1−wutpaz, %wtpz
2−======================
3−
4−[`++tiki`]() version of [`%wtpt`]()
5−
6−`wutpaz` is used internally.
7−
8−Produces
9−--------
10−
11−Twig: `[%wtpz p=tiki q=twig r=twig]`
12−
13−Sample
14−------
15−
16−`p` is a [`++tiki`](). `q` and `r` are [twig]()s.
17−
18−Tall form
19−---------
20−
21−None
22−
23−Wide form
24−---------
25−
26−None
27−
28−Irregular form
29−--------------
30−
31−None
32−
33−Examples
34−--------
docs/system/hoon/runes/wt/wtsg.md+2−2
@@ -1,7 +1,7 @@
1−`?~`
1+`?~ wutsig`
22====
33
4−If-null-then-else
4+If-null-then-else.
55
66If-then-else statement that tests whether `p` is null, producing `q` if true
77and `r` if false.
docs/system/hoon/runes/wt/wtsz.mddeleted−37
@@ -1,37 +0,0 @@
1−wutsaz, %wtsz
2−======================
3−
4−[`++tiki`]() version of [`%wtsg`]()
5−
6−`wutsaz` is a synthetic rune that produces `q` if `p` is `~`, `r`
7−otherwise.
8−
9−Produces
10−--------
11−
12−Twig: `[%wtsz p=tiki q=twig r=twig]`
13−
14−Sample
15−------
16−
17−`p` is a [`++tiki`](). `q` and `r` are [twig]()s.
18−
19−Tall form
20−---------
21−
22− ?~ p
23− q
24− r
25−
26−Wide form
27−---------
28−
29− ?~(p q r)
30−
31−Irregular form
32−--------------
33−
34−None
35−
36−Examples
37−--------
docs/system/hoon/runes/wt/wtts.md+2−2
@@ -1,7 +1,7 @@
1−`?=`
1+`?= wuttis`
22====
33
4−Is `q` within [span]() `p`
4+Is `q` within `++span` `p`.
55
66Tests whether `q` is of type (mold) `p`.
77
docs/system/hoon/runes/wt/wttz.mddeleted−35
@@ -1,35 +0,0 @@
1−wuttaz, `?=`, %wttz
2−============================
3−
4−[`++tiki`]() version of [`%wtkz`]()
5−
6−`wuttaz` is only used internally.
7−
8−Produces
9−--------
10−
11−Twig: `[%wttz p=mold q=tiki]`
12−
13−Sample
14−------
15−
16−`p` is a [mold](). `q` is a [`++tiki`]().
17−
18−Tall form
19−---------
20−
21− ?= p
22− q
23−
24−Wide form
25−---------
26−
27− ?=(p q)
28−
29−Irregular form
30−--------------
31−
32−None
33−
34−Examples
35−--------
docs/system/hoon/runes/wt/wtzp.md+2−2
@@ -1,7 +1,7 @@
1−`?!`
1+`?! wutzap`
22====
33
4−Logical not
4+Logical not.
55
66Produces the logical "not" of `p`.
77
docs/system/hoon/runes/zp.mdnew file+11
@@ -0,0 +1,11 @@
1+---
2+sort: 12
3+---
4+
5+# `! zap` (special)
6+
7+##### Pow, zap, bam.
8+
9+<list dataPath="docs/system/hoon/runes/zp" dataPreview="true" className="runes" linkToFragments="true"></list>
10+
11+<kids dataPath="docs/system/hoon/runes/zp" className="runes"></kids>
docs/system/hoon/runes/zp/zpcb.md+2−2
@@ -1,7 +1,7 @@
1−`!_`
1+`!_ zapcab`
22====
33
4−Path & range in stack trace
4+Path & range in stack trace.
55
66Traces the stack if debugging is enabled, putting the current path and
77location range of each rune.
docs/system/hoon/runes/zp/zpcm.md+2−2
@@ -1,7 +1,7 @@
1−`!,`
1+`!, zapcol`
22====
33
4−XX
4+XX.
55
66Inserts twig `q` as a constant, typed with the type of twig `p`. XX??
77
docs/system/hoon/runes/zp/zpfs.md+2−2
@@ -1,7 +1,7 @@
1−`!/`
1+`!/ zapfas`
22====
33
4−XX
4+XX.
55
66`!/` is a virtual natural rune that should never be compiled. When
77compiled with error checking turned on, it reports its subject as an
docs/system/hoon/runes/zp/zpgr.md+2−2
@@ -1,7 +1,7 @@
1−`!>`
1+`!> zapgar`
22====
33
4−Produce [type value]
4+Produce `[type value]`.
55
66Produces a cell (known as a [`++vase`]() here) of both the type and value of `p`. Useful for debugging purposes.
77
docs/system/hoon/runes/zp/zpsm.md+2−2
@@ -1,7 +1,7 @@
1−`!;`
1+`!; zapsem`
22====
33
4−`[type noun]` pair
4+`[type noun]` pair.
55
66`!;` is a natural rune that produces the product of twig `q` as a
77`[type noun]` pair, with twig `p` serving as an example of the type.
docs/system/hoon/runes/zp/zpts.md+2−2
@@ -1,7 +1,7 @@
1−`!=`
1+`!= zaptis`
22====
33
4−Show nock
4+Show nock.
55
66`!=` is a natural rune that produces the formula of `p` as a noun.
77
docs/system/hoon/runes/zp/zpwt.md+2−2
@@ -1,7 +1,7 @@
1−`!?`
1+`!? zapwut`
22====
33
4−Restrict version
4+Restrict version.
55
66`!?` is a synthetic rune that enforces a Hoon version restriction.
77
docs/system/hoon/runes/zp/zpzp.md+2−2
@@ -1,7 +1,7 @@
1−`!!`
1+`!! zapzap`
22====
33
4−Crash
4+Crash.
55
66`!!` is a natural rune that always crashes.
77