@@ -5,2237 +5,203 @@
6<div id="toc">
6<div id="toc">
10−Biblical names in hoon are primarily aliases for the compiler.
15− ++ abel typo :: original sin: type
23−------------------------------------------------------------------------
29−A Nock axis inside a [noun](). After the leading 1, in binary, a `1` signfies
35− ++ axis ,@ :: tree address
43− ~zod/try=> :: 0 is not actually a valid axis
44− ~zod/try=> [[4 5] 6 7]
46− ~zod/try=> `axis`0b110
49−-----------------------------------------------------------------------
55−A base type that [noun]()s are built from. A `++base` is either a noun, cell, boolean or
56−null labelled with an [odor]().
61− ++ base ?([%atom p=odor] %noun %cell %bean %null) :: axils, @ * ^ ? ~
69− ~zod/try=> (ream '=|(^ !!)')
70− [%tsbr p=[%axil p=%cell] q=[%zpzp ~]]
71− ~zod/try=> :: p.p is a ++base
72− ~zod/try=> (ream '=|(@t !!)')
73− [%tsbr p=[%axil p=[%atom p=~.t]] q=[%zpzp ~]]
74− ~zod/try=> (ream '=|(? !!)')
75− [%tsbr p=[%axil p=%bean] q=[%zpzp ~]]
77−------------------------------------------------------------------------
83−`0`, `&`, or `%.y` are true, and `1`, `|`, and `%.n` are false.
88− ++ bean ,? :: 0=&=yes, 1=|=no
101−------------------------------------------------------------------------
107−Used to build [tape]()s internally.
112− ++ beer $|(@ [~ p=twig]) :: simple embed
117− ~zod/try=> `beer`'as'
119− ~zod/try=> `beer`[~ (ream 'lan')]
120− [~ p=[%cnzz p=~[%lan]]]
122−------------------------------------------------------------------------
126−XML interpolation cases
133− ++ beet $| @ :: advanced embed
134− $% [%a p=twig] :: take tape
135− [%b p=twig] :: take manx
136− [%c p=twig] :: take marl
137− [%d p=twig] :: take $+(marl marl)
138− [%e p=twig q=(list tuna)] :: element literal
141−------------------------------------------------------------------------
147−Atom representing a blocksize, by convention expressed as a power of 2.
153− ++ bloq ,@ :: blockclass
158− ~zod/try=> :: ++met measures how many bloqs long an atom is
159− ~zod/try=> (met 3 256)
161− ~zod/try=> :: 256 is 2 bloqs of 2^3
163−------------------------------------------------------------------------
167−Cyclical backreferences
169−Encodes cyclical backreferences in types. Used in pretty printing.
174− ++ calf ,[p=(map ,@ud wine) q=wine] ::
179− ~zod/try=> `calf`[~ %atom %ta]
180− [p={} q=[%atom p=%ta]]
182− ~zod/try=> `calf`~(dole ut p:!>(*^))
183− [p={} q=[%plot p=~[%noun %noun]]]
185− ~zod/try=> `calf`~(dole ut p:!>($:|-(?(~ [* $]))))
186− [ p={[p=1 q=[%pick p=~[[%pear p=%n q=0] [%plot p=~[%noun [%stop p=1]]]]]]}
190−------------------------------------------------------------------------
196−A single character. [odor]() [`@tD`]() designates a single unicode byte. All
197−parsers consume [`++tape`]()s, which are lists of `++char`.
203− ++ char ,@tD :: UTF-8 byte
213−------------------------------------------------------------------------
219−Used by the compiler (implicitly by `%sgcn`) to attach jets.
224− ++ chub :: registered battery
225− $: p=(pair chum tyre) :: definition
227− r=(unit (pair axis chub)) :: parent
230−------------------------------------------------------------------------
236−Jet hint information that must be present in the body of a `~/` or `~%`
237−rune. A `++chum` can optionally contain a kelvin version, jet vendor,
238−and "{major}.{minor}" version number.
243− ++ chum $? lef=term :: jet name
244− [std=term kel=@] :: kelvin version
245− [ven=term pro=term kel=@] :: vendor and product
246− [ven=term pro=term ver=@ kel=@] :: all of the above
252−XX there's a ++chum in zuse that's politely causing this not to work
254− ~zod/try=> `chum`'hi'
257− ~zod/try=> (ream '~/(%lob.314 !!)')
258− [%sgfs p=[std=%lob kel=314] q=[%zpzp ~]]
260−------------------------------------------------------------------------
266−Used by compiler to attach jets.
271− ++ clue ,[p=axis q=chum r=tyre] :: battery definition
273−XX implementation does not currenlty match docs
275−------------------------------------------------------------------------
279−Tuple of core information
281−Variance `p`, subject type `q`, and `q`: optional compiled nock, and arms. Used as an
282−intermediate step within Section 2fB. Converted by `++core` to %core type.
287− ++ coil $: p=?(%gold %iron %lead %zinc) :: core type
289− r=[p=?(~ ^) q=(map term foot)] ::
292−------------------------------------------------------------------------
296−Noun literal syntax cases
298−Noun literal syntax cases: atoms, jammed nouns, and nestable tuples.
299−Parsed and printed using [`++so`]() and [`++co`]() cores.
304− ++ coin $% [%$ p=dime] ::
306− [%many p=(list coin)] ::
312− ~zod/try=> `coin`(need (slay '~s1'))
313− [%$ p=[p=~.dr q=18.446.744.073.709.551.616]]
314− ~zod/try=> `coin`(need (slay '0x2b59'))
315− [%$ p=[p=~.ux q=11.097]]
317− ~zod/try=> ~(rend co [%many ~[[%$ %ud 1] [%$ %tas 'a'] [%$ %s -2]]])
319− ~zod/try=> ._1_a_-2__
322− ~zod/try=> `@uv`(jam [3 4])
324− ~zod/try=> (slay '~02cd1')
329−------------------------------------------------------------------------
335−One of Hoon's two string types (the other being [`++tape`]()). A cord is an
336−atom of UTF-8 text. [`++trip`]() and [`++crip`]() convert between cord and
342− ++ cord ,@t :: text atom (UTF-8)
347−Odor [`@t`]() designates a Unicode atom, little-endian: the first character
348−in the text is the low byte.
350− ~zod/try=> `@ux`'foobar'
353− ~zod/try=> `@`'urbit'
355− ~zod/try=> (cord 499.984.265.845)
358−------------------------------------------------------------------------
364−A boolean designating AD or BC, a year atom, a month
365−atom, and a [`++tarp`](), which is a day atom and a time.
370− ++ date ,[[a=? y=@ud] m=@ud t=tarp] :: parsed date
375−See also: [`++year`](), [`++yore`]() [`++stud`](), [`++dust`]()
377− ~zod/try=> `date`(yore ~2014.6.6..21.09.15..0a16)
378− [[a=%.y y=2.014] m=6 t=[d=6 h=21 m=9 s=15 f=~[0xa16]]]
380−------------------------------------------------------------------------
386−Used in [`++coin`](). Convenience methods [`++scot`]() and [`++scow`]() (in
387−Section 2eL) print dimes as [`++cord`]() and [`++tape`](), respectively.
388−[`++slat`](), [`++slav`](), and [`++slaw`]() are used to parse atoms of
394− ++ dime ,[p=@ta q=@] ::
399− ~zod/try=> +>:(slay '0x123')
402−------------------------------------------------------------------------
406−Mold of fork between two
408−[mold]() generator: produces a dicriminated [fork]() between two types.
413− ++ each |*([a=$+(* *) b=$+(* *)] $%([& p=a] [| p=b])) :: either a or b
418− ~zod/try=> :type; *(each cord time)
420− {[%.y p=@t] [%.n p=@da]}
422−------------------------------------------------------------------------
426−Parsing location metadata
428−Optional result `p` and parsing continuation `q`.
433− ++ edge ,[p=hair q=(unit ,[p=* q=nail])] :: parsing output
438−See also: Section 2eD, [`++rule`]()
442− ~zod/try=> (tall:vast [1 1] "a b")
443− [p=[p=1 q=2] q=[~ [p=[%cnzz p=~[%a]] q=[p=[p=1 q=2] q=" b"]]]]
445−------------------------------------------------------------------------
449−Cases of arms by variance model.
451−`%ash` arms are [`dry`]() and [geometric]().
456− ++ foot $% [%ash p=twig] :: dry arm, geometric
457− [%elm p=twig] :: wet arm, generic
458− [%oak ~] :: XX not used
459− [%yew p=(map term foot)] :: XX not used
465−See also: [`++ap`](), [`++ut`]()
470− ~zod/try=> (ream '|% ++ $ foo --')
471− [%brcn p={[p=%$ q=[%ash p=[%cnzz p=~[%foo]]]]}]
472− ~zod/try=> +<+:(ream '|% ++ $ foo --')
473− t=~[%ash %cnzz %foo]
474− ~zod/try=> (foot +<+:(ream '|% ++ $ foo --'))
475− [%ash p=[%cnzz p=~[%foo]]]
476− ~zod/try=> (foot +<+:(ream '|% +- $ foo --'))
477− [%elm p=[%cnzz p=~[%foo]]]
479−------------------------------------------------------------------------
485−A core with one arm, `$`--the empty name--which transforms a sample noun into a product
486−noun. If used [dryly]() as a type, the [subject]() must have a sample type of [`*`]().
492− ++ gate $+(* *) :: general gate
497−See also: [`++lift`](), [`++cork`]()
500− <1|mws [* <101.jzo 1.ypj %164>]>
501− ~zod/try=> `gate`|=(* 0)
502− <1|mws [* <101.jzo 1.ypj %164>]>
504− ~zod/try=> (|=(a=* [a 'b']) 'c')
506− ~zod/try=> (`gate`|=(a=* [a 'b']) 'c')
509−------------------------------------------------------------------------
513−Parsing line and column
515−A pair of two [`@ud`]() used in parsing indicating line and column number.
520− ++ hair ,[p=@ud q=@ud] :: parsing trace
528− ~zod/try=> `hair`[1 1] :: parsing starts at [1 1] as a convention.
530− ~zod/try=> ((plus ace) [1 1] " --")
531− [p=[p=1 q=4] q=[~ u=[p=[~~. " "] q=[p=[p=1 q=4] q="--"]]]]
532− ~zod/try=> `hair`p:((plus ace) [1 1] " --")
535−------------------------------------------------------------------------
539−Mold generator for an edge
541−`++like` generates an `++edge` with a parsed result set to a specific type.
546− ++ like |* a=_,* :: generic edge
549− u=[p=(a +>-.b) q=[p=(hair -.b) q=(tape +.b)]] ::
553− ~zod/try=> *(like char)
556− ~zod/try=> (ace [1 1] " a")
557− [p=[p=1 q=2] q=[~ [p=~~. q=[p=[p=1 q=2] q="a"]]]]
558− ~zod/try=> `(like char)`(ace [1 1] " a")
559− [p=[p=1 q=2] q=[~ [p=~~. q=[p=[p=1 q=2] q="a"]]]]
560− ~zod/try=> `(like ,@)`(ace [1 1] " a")
561− [p=[p=1 q=2] q=[~ [p=32 q=[p=[p=1 q=2] q="a"]]]]
563−------------------------------------------------------------------------
567− ++ limb $|(term $%([%& p=axis] [%| p=@ud q=term])) ::
571−Reference into subject by name/axis
573−See also: section 2fC-2fD
575− ~zod/try=> (ream '^^$')
576− [%cnzz p=~[[%.n p=2 q=%$]]]
577− ~zod/try=> (limb &2:(ream '^^$'))
579− ~zod/try=> (limb &2:(ream '^^^$'))
582−------------------------------------------------------------------------
591− ++ line ,[p=[%leaf p=odor q=@] q=tile] :: %kelp case
597− ~zod/try=> (ream '$%([1 a] [%2 b])')
602− [ i=[p=[%leaf p=~.ud q=1] q=[%herb p=[%cnzz p=~[%a]]]]
603− t=~[[p=[%leaf p=~.ud q=2] q=[%herb p=[%cnzz p=~[%b]]]]]
607− ~zod/try=> &3:(ream '$%([1 a] [%2 b])')
608− p=[p=[%leaf p=%ud q=1] q=[%herb p=[%cnzz p=~[%a]]]]
609− ~zod/try=> (line &3:(ream '$%([1 a] [%2 b])'))
610− [p=[%leaf p=~.ud q=1] q=[%herb p=[%cnzz p=~[%a]]]]
612−------------------------------------------------------------------------
618−[mold]() generator. `++list` generates a mold of a null-termanated list of a
625− ++ list |* a=_,* :: null-term list
630−See also: [`++turn`](), [`++snag`]()
634− ~zod/try=> `(list ,@)`"abc"
636− ~zod/try=> (snag 0 "abc")
639−------------------------------------------------------------------------
643−Tile generator. `++lone` puts face of `p` on something.
650− ++ lone |*(a=$+(* *) ,p=a) :: just one thing
652−------------------------------------------------------------------------
658−An XML name (tag name or attribute name) with an optional namespace. Parsed by
659−[`++name`]() within [`++poxa`](), rendered by [`++name`]() within `++poxo`.
664− ++ mane $|(@tas [@tas @tas]) :: XML name/space
669−See also: [`++sail`]()
674− ~zod/try=> `mane`n.g:`manx`;div:namespace;
676− ~zod/try=> `mane`n.g:`manx`;div_namespace;
679−------------------------------------------------------------------------
685−Parsed by [`++apex`]() within [`++poxa`](), rendered by [`++poxo`]().
690− ++ manx ,[g=marx c=marl] :: XML node
695−See also: [`++sail`]() doc
697−------------------------------------------------------------------------
703−A list of [`++manx`]().
708− ++ marl (list manx) :: XML node list
714−------------------------------------------------------------------------
720−Implicitly produced by [`++chrd`]() within [`++poxa`]()
725− ++ mars ,[t=[n=%$ a=[i=[n=%$ v=tape] t=~]] c=~] :: XML cdata
730−------------------------------------------------------------------------
734−List of XML attributes
736−Each `++mart` is a list of pairs of [`++mane`]() and
739−Parsed by [`++attr`]() within [`++poxa`](), rendered by `++attr` within [`++poxo`]()
744− ++ mart (list ,[n=mane v=tape]) :: XML attributes
749−------------------------------------------------------------------------
755−A `++marx` is a pair of a tag name, `++mane` and a list of attributes,
756−`++mart`. Parsed by [`++head`]() `++poxa`, rendered within `++poxo`.
761− ++ marx ,[n=mane a=mart] :: XML tag
766−------------------------------------------------------------------------
770− ++ metl ?(%gold %iron %zinc %lead) :: core variance
774−See also: [`++coil`]()
776−------------------------------------------------------------------------
780− ++ noun ,* :: any noun
784− ~zod/try=> `noun`~[1 2 3]
787−------------------------------------------------------------------------
791− ++ null ,~ :: null, nil, etc
795− ~zod/try=> :type; *null
799−------------------------------------------------------------------------
805−By convention, a short name for a category of atom. `++odor` is
806−circularly defined, with [`@ta`]() being the `++odor` of the ASCII subset
807−commonly used in urbit.
812− ++ odor ,@ta :: atom format
817−See also: [`++base`](), [odor reference]()
819− ~zod/try=> `odor`%ux
822−------------------------------------------------------------------------
828−The remaining part of a [`++date`](): day, hour, minute, second and a list
829−of [`@ux`]() for precision.
834− @ud h=@ud m=@ud s=@ud f=(list ,@ux)] :: parsed time
839−See also: [`++date`](), [`++yell`[]()/`++yule`]()
842− ~2014.9.20..00.43.33..b52a
843− ~zod/try=> :: the time is always in your context at -<-
844− ~zod/try=> (yell -<-)
845− [d=106.751.991.820.278 h=0 m=43 s=39 f=~[0x54d1]]
847− ~zod/try=> (yell ~d20)
848− [d=20 h=0 m=0 s=0 f=~]
850−------------------------------------------------------------------------
856−The `@da` odor designates an absolute date atom.
861− ++ time ,@da :: galactic time
866−See also: [`++date`](), [odor reference]()
868− ~zod/try=> `time`-<-
869− ~2014.9.25..20.01.47..eeac
870− ~zod/try=> :: the time is always in your context at -<-
871− ~zod/try=> `time`~2014.1.1
874−------------------------------------------------------------------------
880−A `++tree` can be empty, or contain a node of a type and
881−left/right sub `++tree` of the same type. Pretty-printed with `{}`.
886− ++ tree |* a=_,* :: binary tree
891− ~zod/try=> `(tree ,[@ tape])`[[1 "hi"] [[2 "bye"] ~ ~] ~]
892− {[2 "bye"] [1 "hi"]}
894−------------------------------------------------------------------------
898−Location, remainder of parsed text
900−Indicates parsing position `p`, and remaining text to be parsed `q`.
905− ++ nail ,[p=hair q=tape] :: parsing input
910− ~zod/try=> +<:;~(plug cab cab)
911− c=tub=[p=[p=0 q=0] q=""]
912− ~zod/try=> :: tub is a ++nail
914−------------------------------------------------------------------------
918− ++ numb ,@ :: just a number
922−------------------------------------------------------------------------
926−Mold of pair of types
928−[mold]() generator. Produces a tuple of two of the types passed in.
934− ++ pair |*([a=$+(* *) b=$+(* *)] ,[p=a q=b]) :: just a pair
940− ~zod/try=> *(pair bean cord)
943−------------------------------------------------------------------------
949−Used primarily in crypto.
954− ++ pass ,@ :: public key
956−------------------------------------------------------------------------
962−A `++path` is a list of [`++span`]()s aka [`@ta`](). Used in
963−`%clay` and `%eyre` extensively.
968− ++ path (list span) :: filesys location
973− ~zod/try=> `path`"abc"
976−------------------------------------------------------------------------
982−Mostly used for stacktraces. A `++pint` is a pair of
983−[`++hair`](), indicating from `p` to `q`.
988− ++ pint ,[p=[p=@ q=@] q=[p=@ q=@]] :: line/column range
994− ! /~zod/try/~2014.9.20..01.22.04..52e3/:<[1 4].[1 6]>
995− ~zod/try=> :: !! always produces a crash
996− ~zod/try=> `pint`[[1 4] [1 6]]
997− [p=[p=1 q=4] q=[p=1 q=6]]
999−------------------------------------------------------------------------
1005−A [`++list`]() without the [face]()s `i` and `t`.
1010− ++ pole |* a=_,* :: nameless list
1015− ~zod/try=> `(pole char)`"asdf"
1016− [~~a [~~s [~~d [~~f ~]]]]
1018−------------------------------------------------------------------------
1024−Type and location of core-shaped thing? XX Compiler Internals
1029− ++ port $: p=axis ::
1032− [%| p=axis q=(list ,[p=type q=foot])] ::
1040− [p=0 q=[%.y p=%void]]
1042−------------------------------------------------------------------------
1048−Type and location of possibly core-shaped thing? XX Compiler Internals
1053− ++ post $: p=axis ::
1056− [1 p=axis q=(list ,[p=type q=foot])] ::
1057− [2 p=twin q=type] ::
1065− [p=0 q=[%0 p=%void]]
1067−------------------------------------------------------------------------
1073−Verified core-shaped thing? XX Compiler Internals
1078−------------------------------------------------------------------------
1082−Mold of 4 type tuple
1084−A `++qual` is a tuple of four of the types passed in.
1089− ++ qual |* [a=$+(* *) b=$+(* *) c=$+(* *) d=$+(* *)] :: just a quadruple
1094− ~zod/try=> *(qual date time tape cord)
1095− [p=[[a=%.y y=0] m=0 t=[d=0 h=0 m=0 s=0 f=~]] q=~292277024401-.1.1 r="" s='']
1097−------------------------------------------------------------------------
1103−`++rege` defines the cases of a regular expression.
1108− ++ rege $| ?(%dote %ende %sart %empt %boun %bout) :: parsed regex
1109− [%brac p=@] :: p is 256 bitmask
1110− [%eith p=rege q=rege] :: either
1111− [%mant p=rege] :: greedy 0 or more
1112− [%plls p=rege] :: greedy 1 or more
1113− [%betw p=rege q=@u r=@u] :: between q and r
1114− [%bint p=rege q=@u] :: min q
1115− [%bant p=rege q=@u] :: exactly q
1116− [%manl p=rege] :: lazy 0 or more
1117− [%plll p=rege] :: lazy 1 or more
1118− [%betl p=rege q=@u r=@u] :: between q and r lazy
1119− [%binl p=rege q=@u] :: min q lazy
1125−See also: [`++rexp`](), [`++repg`](), [`++pars`]()
1127− ~zod/try=> (pars "[a-z]")
1128− [~ [%brac p=10.633.823.807.823.001.954.701.781.295.154.855.936]]
1129− ~zod/try=> (rexp "[a-z]" "abc1")
1130− [~ [~ {[p=0 q="a"]}]]
1132−------------------------------------------------------------------------
1138−Used primarily in crypto.
1143− ++ ring ,@ :: private key
1145−------------------------------------------------------------------------
1151−`++rule` is an empty parsing rule, but it is used to check
1152−that parsing rules match this with `_`.
1158− ++ rule |=(tub=nail `edge`[p.tub ~ ~ tub]) :: parsing rule
1164− [p=[p=0 q=0] q=[~ [p=0 q=[p=[p=0 q=0] q=""]]]]
1166− ~zod/try=> ^+(rule [|=(a=nail [p.a ~])]:|6)
1167− <1.dww [tub=[p=[p=@ud q=@ud] q=""] <101.jzo 1.ypj %164>]>
1168− ~zod/try=> (^+(rule [|=(a=nail [p.a ~ u=['a' a]])]:|6) [1 1] "hi")
1169− [p=[p=1 q=1] q=[~ [p=97 q=[p=[p=1 q=1] q="hi"]]]]
1170− ~zod/try=> ([|=(a=nail [p.a ~ u=['a' a]])]:|6 [1 1] "hi")
1171− [[p=1 q=1] ~ u=['a' p=[p=1 q=1] q="hi"]]
1173−------------------------------------------------------------------------
1179−A restricted text atom for canonical atom syntaxes. The prefix is `~.`.
1180−There are no escape sequences except `~~`, which means `~`, and `~-`,
1181−which means `_`. `-` and `.` encode themselves. No other characters
1182−besides numbers and lowercase letters are permitted.
1187− ++ span ,@ta :: text-atom (ASCII)
1193− ~zod/try=> `@t`~.foo
1195− ~zod/try=> `@t`~.foo.bar
1197− ~zod/try=> `@t`~.foo~~bar
1199− ~zod/try=> `@t`~.foo~-bar
1201− ~zod/try=> `@t`~.foo-bar
1204−------------------------------------------------------------------------
1210−A [`++spot`]() is what we print after crashing.
1215− ++ spot ,[p=path q=pint] :: range in file
1220− ~zod/try=> :into /=main=/bin/fail/hoon '!: !!'
1221− + /~zod/main/359/bin/fail/hoon
1223− ! /~zod/main/~2014.9.22..18.40.56..ef04/bin/fail/:<[1 5].[1 7]>
1226−------------------------------------------------------------------------
1230− ++ tang (list tank) :: general error
1234−------------------------------------------------------------------------
1238−Pretty-printing structure.
1240−A `++tank` is one of three cases: a `%leaf`
1241−is simply a string; a `%palm` is XX need more information; and a `%rose` is a
1242−list of `++tank` delimted by the strings in `p`.
1248− ++ tank $% [%leaf p=tape] :: printing formats
1249− $: %palm :: backstep list
1250− p=[p=tape q=tape r=tape s=tape] ::
1253− $: %rose :: flat list
1254− p=[p=tape q=tape r=tape] :: mid open close
1262− ~zod/try=> >(bex 20) (bex 19)<
1263− [%rose p=[p=" " q="[" r="]"] q=~[[%leaf p="1.048.576"] [%leaf p="524.288"]]]
1264− ~zod/try=> (wash [0 80] >(bex 20) (bex 19)<) :: at 80 cols
1265− <<"[1.048.576 524.288]">>
1266− ~zod/try=> (wash [0 15] >(bex 20) (bex 19)<) :: at 15 cols (two lines)
1267− <<"[ 1.048.576" " 524.288" "]">>
1269− ~zod/try=> [(bex 150) (bex 151)] :: at 80 cols
1270− [ 1.427.247.692.705.959.881.058.285.969.449.495.136.382.746.624
1271− 2.854.495.385.411.919.762.116.571.938.898.990.272.765.493.248
1274------------------------------------------------------------------------
8------------------------------------------------------------------------
1276−### `++tape`
10+-----------------------------------------------------------------------
1280−One of Hoon's two string types, the other being [`++cord`](). A tape is a
1286− ++ tape (list char) :: like a string
1291− ~zod/try=> `(list ,char)`"foobar"
1293− ~zod/try=> `(list ,@)`"foobar"
1294− ~[102 111 111 98 97 114]
1296------------------------------------------------------------------------
12------------------------------------------------------------------------
1302−A restricted text atom for Hoon constants. The only characters permitted are
1303−lowercase ASCII, `-`, and `0-9`, the latter two of which can neither be the first or last
1304−character. The syntax for [`@tas`]() is the text itself, always preceded by `%`.
1305−This means a term is always [cubical](). The empty `@tas` has a special syntax,
1312− ++ term ,@tas :: Hoon ASCII subset
1320− ~zod/try=> %dead-fish9
1322− ~zod/try=> -:!>(%dead-fish9)
1323− [%cube p=271.101.667.197.767.630.546.276 q=[%atom p=%tas]]
1325------------------------------------------------------------------------
14------------------------------------------------------------------------
1334− ++ tiki :: test case
1339−A `++wing` or `++twig`.
1341− ~zod/try=> (ream '=+ a=4 ?-(a @ ~)')
1343− p=[%ktts p=p=%a q=[%dtzy p=%ud q=4]]
1346− p=[%.y p=~ q=~[%a]]
1347− q=~[[p=[%axil p=[%atom p=~.]] q=[%bczp p=%null]]]
1350− ~zod/try=> (ream '=+ a=4 ?-(4 @ ~)')
1352− p=[%ktts p=p=%a q=[%dtzy p=%ud q=4]]
1355− p=[%.n p=~ q=[%dtzy p=%ud q=4]]
1356− q=~[[p=[%axil p=[%atom p=~.]] q=[%bczp p=%null]]]
1360------------------------------------------------------------------------
17------------------------------------------------------------------------
1366−A [face](), or tree of faces. A `++toga` is applied to anything assigned
1369−XX move to `++ut` and rune doc (for \^= examples)
1374− ++ toga :: face control
1375− [2 p=toga q=toga] :: cell toga
1383− ~zod/try=> (ream 'a=1')
1384− [%ktts p=p=%a q=[%dtzy p=%ud q=1]]
1385− ~zod/try=> [a b]=[1 2 3]
1387− ~zod/try=> (ream '[a b]=[1 2 3]')
1389− p=[%2 p=p=%a q=p=%b]
1390− q=[%cltr p=~[[%dtzy p=%ud q=1] [%dtzy p=%ud q=2] [%dtzy p=%ud q=3]]]
1393− ~zod/try=> [a ~]=[1 2 3]
1395− ~zod/try=> (ream '[a ~]=[1 2 3]')
1397− p=[%2 p=p=%a q=[%0 ~]]
1398− q=[%cltr p=~[[%dtzy p=%ud q=1] [%dtzy p=%ud q=2] [%dtzy p=%ud q=3]]]
1401------------------------------------------------------------------------
19------------------------------------------------------------------------
1405−Core with one arm `$`
1407−A trap is a core with one arm `++$`. Used when XX
1412− ++ trap ,_|.(_*) :: makes perfect sense
1420− <1.mws 101.jzo 1.ypj %164>
1423− ~zod/try=> (|.(42))
1426------------------------------------------------------------------------
22------------------------------------------------------------------------
1432−[`++mold`]() of the tuple of the three types passed in.
1437− ++ trel |* [a=$+(* *) b=$+(* *) c=$+(* *)] :: just a triple
1442− ~zod/try=> *(trel ,@ud ,@t ,@s)
1445------------------------------------------------------------------------
24------------------------------------------------------------------------
1451−An XML template tree.
1457− [%d p=twig] :: dynamic list
1458− [%e p=twig q=(list tuna)] :: element
1459− [%f p=(list tuna)] :: subflow
1465−Leaf %a contains plain-text, %b an empty tag, %c a static list, %d a
1466−dynamic list, %e a full node element containing a twig and a list of
1467−tuna, and %f is a empty node.
1469−See also: [`++sail`]()
1471------------------------------------------------------------------------
26------------------------------------------------------------------------
1477−An expression, or AST.
1479−See Twig section of Hoon reference
1481------------------------------------------------------------------------
28------------------------------------------------------------------------
1485−Switch statement cases
1487−In [`?-`](), for example, your list of cases is a `++tine`.
1492− ++ tine (list ,[p=tile q=twig]) ::
1497− ~zod/try=> (ream '?-(!! @ |, ^ &)')
1499− p=[%.n p=~ q=[%zpzp ~]]
1502− [p=[%axil p=[%atom p=~.]] q=[%dtzy p=%f q=1]]
1503− [p=[%axil p=%cell] q=[%dtzy p=%f q=0]]
1506− ~zod/try=> (tine |2:(ream '?-(!! @ |, ^ &)'))
1508− [p=[%axil p=[%atom p=~.]] q=[%dtzy p=%f q=1]]
1509− [p=[%axil p=%cell] q=[%dtzy p=%f q=0]]
1512------------------------------------------------------------------------
30------------------------------------------------------------------------
1518−List of [`++twig`]()s. In [`:*`](), for example, your contents is
1524− ++ tusk (list twig) ::
1529− ~zod/try=> (ream '[1 2 3]')
1530− [%cltr p=~[[%dtzy p=%ud q=1] [%dtzy p=%ud q=2] [%dtzy p=%ud q=3]]]
1531− ~zod/try=> (tusk +:(ream '[1 2 3]'))
1532− ~[[%dtzy p=%ud q=1] [%dtzy p=%ud q=2] [%dtzy p=%ud q=3]]
1534------------------------------------------------------------------------
32------------------------------------------------------------------------
1540−Associative list of [++term]() [`++twig`](), used in [jet]() hint processing.
1545− ++ tyre (list ,[p=term q=twig]) ::
1547------------------------------------------------------------------------
34------------------------------------------------------------------------
1551−List of 'maybe' twigs
1553−List of [`++unit`]() [`++twig`](), or gaps left to be inferred, in [`++path`]()
1554−parsing. When you use a path such as `/=main=/pub/src/doc` the path is in fact
1555−a `++tyke`, where the `=` are inferred from your current path.
1561− ++ tyke (list (unit twig)) ::
1566− ~zod/try=> (scan "/==as=" porc:vast)
1567− [0 ~[~ ~ [~ [%dtzy p=%tas q=29.537]] ~]]
1568− ~zod/try=> `tyke`+:(scan "/==as=" porc:vast)
1569− ~[~ ~ [~ [%dtzy p=%tas q=29.537]] ~]
1571------------------------------------------------------------------------
36------------------------------------------------------------------------
1577−List of changes by location in context. When using [`%=`](), for example,
1578−the list of changes is a `++tram`.
1583− ++ tram (list ,[p=wing q=twig]) ::
1588− ~zod/try=> (ream '$(a 1, b 2)')
1591− q=~[[p=~[%a] q=[%dtzy p=%ud q=1]] [p=~[%b] q=[%dtzy p=%ud q=2]]]
1593− ~zod/try=> (tram +:(ream '$(a 1, b 2)'))
1594− ~[[p=~ q=[% p=0]] [p=~[%a] q=[%dtzy p=%ud q=1]] [p=~[%b] q=[%dtzy p=%ud q=2]]]
1596------------------------------------------------------------------------
38------------------------------------------------------------------------
1600−Virtual machine. See [Nock doc]().
1606− ++ nock $& [p=nock q=nock] :: autocons
1607− [%3 p=nock] :: cell test
1608− [%4 p=nock] :: increment
1609− [%5 p=nock q=nock] :: equality test
1610− [%6 p=nock q=nock r=nock] :: if, then, else
1611− [%7 p=nock q=nock] :: serial compose
1612− [%8 p=nock q=nock] :: push onto subject
1613− [%9 p=@ q=nock] :: select arm and fire
1614− [%10 p=?(@ [p=@ q=nock]) q=nock] :: hint
1615− [%11 p=nock] :: grab data from sky
1621− ~zod/try=> !=([+(.) 20 -<])
1622− [[4 0 1] [1 20] 0 4]
1623− ~zod/try=> (nock !=([+(.) 20]))
1624− [p=[%4 p=[%0 p=1]] q=[%1 p=20]]
1626------------------------------------------------------------------------
41------------------------------------------------------------------------
1630−Intermediate Nock computation result
1632−Similar to [`++toon`](), but stack trace is not yet rendered.
1637− ++ tone $% [%0 p=*] :: success
1642− ~zod/try=> (mink [[20 21] 0 3] ,~)
1645− ~zod/try=> (mink [[0] !=(.^(cy//=main/1))] ,~)
1646− [%1 p=~[[31.075 1.685.027.454 1.852.399.981 49 0]]]
1647− ~zod/try=> (path [31.075 1.685.027.454 1.852.399.981 49 0])
1650− ~zod/try=> (mink [[1 2] !=(~|(%hi +(.)))] ,~)
1651− [%2 p=~[[~.yelp 26.984]]]
1652− ~zod/try=> (mink [[1 2] !=(!:(+(.)))] ,~)
1659− \/159.445.990.350.374.058.574.398.238.344.143.957.205.628.479.572.65\/
1672------------------------------------------------------------------------
43------------------------------------------------------------------------
1676−Nock computation result
1678−Either success (`%0`), a block with list of requests blocked on (`%1`), or
1679−failure with stack trace (`%2`).
1684− ++ toon $% [%0 p=*] :: success
1688− ~zod/try=> (mock [[20 21] 0 3] ,~)
1691− ~zod/try=> (mock [[0] !=(.^(cy//=main/1))] ,~)
1692− [%1 p=~[[31.075 1.685.027.454 1.852.399.981 49 0]]]
1693− ~zod/try=> (path [31.075 1.685.027.454 1.852.399.981 49 0])
1696− ~zod/try=> (mock [[1 2] !=(!:(+(.)))] ,~)
1697− [%2 p=~[[%leaf p="/~zod/try/~2014.9.23..18.34.32..d3c5/:<[1 20].[1 24]>"]]]
1699------------------------------------------------------------------------
45------------------------------------------------------------------------
1707− ++ tune $% [%0 p=vase] ::
1711−Probably typed `tone`?
1713------------------------------------------------------------------------
47------------------------------------------------------------------------
1719−Used in `%bull` within [`++type`]() to typecheck aliased faces.
1724− ++ twin ,[p=term q=wing r=axis s=type] :: alias info
1729− ~zod/try=> (~(busk ut %cell %noun [%atom %ud]) %fal [%& 3]~)
1731− p=[p=%fal q=~[[%.y p=3]] r=3 s=[%atom p=%ud]]
1732− q=[%cell p=%noun q=[%atom p=%ud]]
1734− ~zod/try=> &2:(~(busk ut %cell %noun [%atom %ud]) %fal [%& 3]~)
1735− p=[p=%fal q=~[[%.y p=3]] r=3 s=[%atom p=%ud]]
1736− ~zod/try=> (twin &2:(~(busk ut %cell %noun [%atom %ud]) %fal [%& 3]~))
1737− [p=%fal q=~[[%.y p=3]] r=3 s=[%atom p=%ud]]
1739------------------------------------------------------------------------
49------------------------------------------------------------------------
1743−See Type section of Hoon reference
1745------------------------------------------------------------------------
51------------------------------------------------------------------------
1749−Pointer for `++type`
1751−Pointer for [`++type`](). `++typo` preserves the previous `++type` in your
1752−context when upating.
1757− ++ typo type :: old type
1762−See also: `++seem`, `++vise`, `++type`
1764------------------------------------------------------------------------
53------------------------------------------------------------------------
1771− ++ udal :: atomic change (%b)
1775------------------------------------------------------------------------
55------------------------------------------------------------------------
1779− ++ udon :: abstract delta
1780− $: p=umph :: preprocessor
1782− $% [%a p=* q=*] :: trivial replace
1783− [%b p=udal] :: atomic indel
1784− [%c p=(urge)] :: list indel
1785− [%d p=upas q=upas] :: tree edit
1791------------------------------------------------------------------------
57------------------------------------------------------------------------
1795− ++ umph :: change filter
1796− $| $? %a :: no filter
1800− $% [%d p=@ud] :: blocklist
1805------------------------------------------------------------------------
60------------------------------------------------------------------------
1809− ++ unce |* a=_,* :: change part
1810− $% [%& p=@ud] :: skip[copy]
1811− [%| p=(list a) q=(list a)] :: p -> q[chunk]
1816------------------------------------------------------------------------
62------------------------------------------------------------------------
1822−[mold]() generator. A `++unit` is either `~` or `[~ u=a]` where `a` is the
1823−type that was passed in.
1829− ++ unit |* a=_,* :: maybe
1834−See also: [`++bind`]()
1836− ~zod/try=> :type; *(unit time)
1839− ~zod/try=> `(unit time)`[~ -<-]
1840− [~ ~2014.9.24..19.25.10..7dd5]
1842------------------------------------------------------------------------
64------------------------------------------------------------------------
1846− ++ upas :: tree change (%d)
1847− $& [p=upas q=upas] :: cell
1848− $% [%0 p=axis] :: copy old
1849− [%1 p=*] :: insert new
1850− [%2 p=axis q=udon] :: mutate!
1855------------------------------------------------------------------------
66------------------------------------------------------------------------
1859− ++ urge |*(a=_,* (list (unce a))) :: list change
1863------------------------------------------------------------------------
68------------------------------------------------------------------------
1867−Typed data. A `++vase` is used wherever typed data is explicitly worked
1874− ++ vase ,[p=type q=*] :: type-value pair
1880− ~zod/try=> `vase`!>(~)
1881− [p=[%cube p=0 q=[%atom p=%n]] q=0]
1883------------------------------------------------------------------------
70------------------------------------------------------------------------
1887−Convert during reboot
1889−Used to convert from previously-typed data during reboot.
1894− ++ vise ,[p=typo q=*] :: old vase
1899−See also: [`++typo`](), [`++seer`]()
1901------------------------------------------------------------------------
72------------------------------------------------------------------------
1908−A `++wall` is used instead of a single [`++tape`]() with
1914− ++ wall (list tape) :: text lines (no \n)
1919−See also: [`++wash`]()
1921− ~zod/try=> `wall`(wash [0 20] leaf/<(bex 256)>)
1923− "\/115.792.089.237.\/"
1924− " 316.195.423.570."
1925− " 985.008.687.907."
1926− " 853.269.984.665."
1927− " 640.564.039.457."
1928− " 584.007.913.129."
1933------------------------------------------------------------------------
74------------------------------------------------------------------------
1937− ++ wain (list cord) :: text lines (no \n)
1939−A list of lines. A `++wain` is used instead of a single [`++cord`]() with
1942−See also: [`++lore`](), [`++role`]()
1944− ~zod/try=> `wain`/som/del/rok
1946− ~zod/try=> `wain`(lore ^:@t/=main=/bin/tree/hoon)
1949− :: /===/bin/tree/hoon
1951− |= [pax=path fla=$|(~ [%full ~])]
1954− =+ rend=?~(fla |=(a=path +:(spud (slag len a))) spud)
1956− =+ ark=;;(arch .^(cy/pax))
1958− [(crip (rend pax)) -]
1960− %- turn :_ |=(a=@t ^$(pax (weld pax `path`/[a])))
1962− %- turn :_ |=([a=@t ~] a)
1966------------------------------------------------------------------------
76------------------------------------------------------------------------
1968−### `++wing`
78+------------------------------------------------------------------------
1970− ++ wing (list limb) ::
1972−Address in subject. A `++wing` is a path to a value in the subject. A
1973−term alone is the trivial case of a `++wing`.
1977− ~zod/try=> (ream 'a.+.c')
80+------------------------------------------------------------------------
1978− [%cnzz p=~[%a [%.y p=3] %c]]
1979− ~zod/try=> (wing +:(ream 'a.+.c'))
1982------------------------------------------------------------------------
82------------------------------------------------------------------------
1984−### `++wine`
84+------------------------------------------------------------------------
1986−Printable type
86+------------------------------------------------------------------------
1988−Used for pretty printing.
88+------------------------------------------------------------------------
1990−Source
90+------------------------------------------------------------------------
1993− ++ wine $| ?(%noun %path %tank %void %wall %wool %yarn)
92+------------------------------------------------------------------------
1994− [%list p=term q=wine] ::
1995− [%pear p=term q=@] ::
1996− [%pick p=(list wine)] ::
1997− [%plot p=(list wine)] ::
1999− [%tree p=term q=wine] ::
2000− [%unit p=term q=wine] ::
2006−See also: [`++calf`]()
2008− ~zod/try=> ~(dole ut p:!>(*@tas))
2009− [p={} q=[%atom p=%tas]]
2010− ~zod/try=> `wine`q:~(dole ut p:!>(*@tas))
2013− ~zod/try=> ~(dole ut p:!>(*path))
2021− [%plot p=~[[%face p=%i q=[%atom p=%ta]] [%face p=%t q=[%stop p=1]]]]
2028− ~zod/try=> `wine`q:~(dole ut p:!>(*path))
2031− ~zod/try=> ~(dole ut p:!>(*(map time cord)))
2046− p=~[[%face p=%p q=[%atom p=%da]] [%face p=%q q=[%atom p=%t]]]
2049− [%face p=%l q=[%stop p=1]]
2050− [%face p=%r q=[%stop p=1]]
2060− q=[%plot p=~[[%face p=%p q=[%atom p=%da]] [%face p=%q q=[%atom p=%t]]]]
2063− ~zod/try=> `wine`q:~(dole ut p:!>(*(map time cord)))
2066− q=[%plot p=~[[%face p=%p q=[%atom p=%da]] [%face p=%q q=[%atom p=%t]]]]
2069------------------------------------------------------------------------
95------------------------------------------------------------------------
2071−### `++wonk`
97+------------------------------------------------------------------------
2073−XX Not a model?
99+------------------------------------------------------------------------
2075−Pull result out of a `++edge`, or crash if there's no result.
101+------------------------------------------------------------------------
2077−Source
103+------------------------------------------------------------------------
2080− ++ wonk |*(veq=edge ?~(q.veq !! p.u.q.veq)) ::
105+------------------------------------------------------------------------
2082−Examples
107+------------------------------------------------------------------------
2085−See also: [`++edge`]()
109+------------------------------------------------------------------------
2087− ~zod/try=> (wide:vast [1 1] "(add 2 2)")
111+------------------------------------------------------------------------
2091− [ p=[%cnhp p=[%cnzz p=~[%add]] q=~[[%dtzy p=%ud q=2] [%dtzy p=%ud q=2]]]
2092− q=[p=[p=1 q=10] q=""]
2096− ~zod/try=> (wonk (wide:vast [1 1] "(add 2 2)"))
2097− [%cnhp p=[%cnzz p=~[%add]] q=~[[%dtzy p=%ud q=2] [%dtzy p=%ud q=2]]]
2099------------------------------------------------------------------------
113------------------------------------------------------------------------
2101−### `++map`
115+------------------------------------------------------------------------
2103−Map
117+------------------------------------------------------------------------
2105−[mold]() generator. A `++map` is a [treap](http://en.wikipedia.org/wiki/Treap) of
119+------------------------------------------------------------------------
121+------------------------------------------------------------------------
2109−Source
123+------------------------------------------------------------------------
2112− ++ map |* [a=_,* b=_,*] :: associative tree
125+------------------------------------------------------------------------
2114−Examples
127+------------------------------------------------------------------------
2117−See also: [`++by`]()
129+------------------------------------------------------------------------
2119− ~zod/try=> :type; *(map ,@t ,@u)
131+------------------------------------------------------------------------
2122− ~zod/try=> `(map ,@ta ,@ud)`(mo (limo a/1 b/2 ~))
2123− {[p=~.a q=1] [p=~.b q=2]}
2125------------------------------------------------------------------------
133------------------------------------------------------------------------
2127−### `++qeu`
135+------------------------------------------------------------------------
2129−Queue
137+------------------------------------------------------------------------
2131−[mold]() generator. An ordered [treap](http://en.wikipedia.org/wiki/Treap) of
139+------------------------------------------------------------------------
2134−Source
141+------------------------------------------------------------------------
2137− ++ qeu |* a=_,* :: queue
143+------------------------------------------------------------------------
2138− $|(~ [n=a l=(qeu a) r=(qeu a)]) ::
2140−See also: [`++to`]()
145+------------------------------------------------------------------------
2142−Examples
147+------------------------------------------------------------------------
2145− ~zod/try=> (qeu time)
149+------------------------------------------------------------------------
2146− <1.qyo [* <1.sxx [a=<1.ebd [* <101.jzo 1.ypj %164>]> <101.jzo 1.ypj %164>]>]>
2147− ~zod/try=> (~(gas to *(qeu time)) [~2014.1.1 ~2014.1.2 ~])
2148− {~2014.1.2 ~2014.1.1}
2150------------------------------------------------------------------------
151------------------------------------------------------------------------
2152−### `++set`
153+------------------------------------------------------------------------
2154−Set
155+------------------------------------------------------------------------
2156−[mold]() generator. A `++set` is a
157+------------------------------------------------------------------------
2157−[treap](http://en.wikipedia.org/wiki/Treap) with unique values.
2159−Source
159+------------------------------------------------------------------------
2162− ++ set |* a=_,* :: set
161+------------------------------------------------------------------------
2163− $|(~ [n=a l=(set a) r=(set a)]) ::
2165−Examples
163+------------------------------------------------------------------------
2168−See also: [`++in`]()
165+------------------------------------------------------------------------
2170− ~zod/try=> (sa "abc")
167+------------------------------------------------------------------------
2172− ~zod/try=> (~(put in (sa "abc")) %d)
2174− ~zod/try=> (~(put in (sa "abc")) %a)
2177------------------------------------------------------------------------
169------------------------------------------------------------------------
2179−### `++jar`
171+------------------------------------------------------------------------
173+------------------------------------------------------------------------
2182−Tile generator. A [`++jar`]() is a [`++map`]() of [`++list`]().
175+------------------------------------------------------------------------
2184−Source
177+------------------------------------------------------------------------
2187− ++ jar |*([a=_,* b=_,*] (map a (list b))) :: map of lists
179+------------------------------------------------------------------------
2189−Examples
181+------------------------------------------------------------------------
2192−See also: [`++ja`](), [`++by`](), [`++map`](), [`++list`]()
183+------------------------------------------------------------------------
2194− ~zod/try=> =a (limo [1 2 ~])
185+------------------------------------------------------------------------
2197− ~zod/try=> =b (limo [3 4 ~])
2200− ~zod/try=> =c (mo (limo [[%a a] [%b b] ~]))
2202− {[p=%a q=[i=1 t=[i=2 t=~]]] [p=%b q=[i=3 t=[i=4 t=~]]]}
2203− ~zod/try=> (~(get ja c) %a)
2205− ~zod/try=> (~(get ja c) %c)
2208------------------------------------------------------------------------
187------------------------------------------------------------------------
2210−### `++jug`
189+------------------------------------------------------------------------
191+------------------------------------------------------------------------
2213−[mold]() generator. A `++jug` is a [`++map`]() of [`++set`]()s.
193+------------------------------------------------------------------------
2215−Source
195+------------------------------------------------------------------------
2218− ++ jug |*([a=_,* b=_,*] (map a (set b))) :: map of sets
197+------------------------------------------------------------------------
2220−Examples
199+------------------------------------------------------------------------
2223−See also: `++ju`, `++by`, `++map`, `++set`
201+------------------------------------------------------------------------
2225− ~zod/try=> =a (sa (limo [1 2 ~]))
203+------------------------------------------------------------------------
2228− ~zod/try=> =b (sa (limo [3 4 ~]))
2231− ~zod/try=> =c (mo (limo [[%a a] [%b b] ~]))
2233− {[p=%a q={1 2}] [p=%b q={4 3}]}
2234− ~zod/try=> (~(get ju c) %b)
2236− ~zod/try=> (~(put ju c) [%b 5])
2237− {[p=%a q={1 2}] [p=%b q={5 4 3}]}
2239------------------------------------------------------------------------
205------------------------------------------------------------------------