3 title/'2q: Molds and Mold-Builders'
9# 2q: molds and mold builders
15A single character. Aura `@tD` designates a single UTF-8 byte. All parsers
16consume `tape`s, which are lists of `char`.
40One of Hoon's two string types (the other being `tape`). A cord is an
70Aura `@t` designates a Unicode atom, little-endian: the first character
71in the text is the least-significant byte.
73[`trip`](../4b) converts from `cord` to `tape`, and [`crip`](../4b) converts
83A boolean designating AD or BC, a year atom, a month atom, and a `tarp`,
84which is a day atom and a time.
89 ++ date [[a=? y=@ud] m=@ud t=tarp]
96 [[a=%.y y=0] m=0 t=[d=0 h=0 m=0 s=0 f=~]]
98 > `date`(yore ~2014.6.6..21.09.15..0a16)
99 [[a=%.y y=2.014] m=6 t=[d=6 h=21 m=9 s=15 f=~[0xa16]]]
102 ~2018.5.25..17.55.15..9ad8
108See also: [`year`](../3c), [`yore`](../3c) [`stud`](../2q), [`dust`](../2q)
115An atom type that only permits ASCII characters.
137Generic print structure
139A list of `tank`s. It's for printing types and bottom-up printing of stack
154 > (~(win re [%palm ["1" "2" "3" "4"] [%leaf "foobar"] [%leaf "bazbud"] [%leaf "zzzzzzqaaa"] ~]) 0 50)
155 <<"23foobar1bazbud1zzzzzzqaaa4">>
157 > (~(win re [%palm ["1" "2" "3" "4"] [%leaf "foobar"] [%leaf "bazbud"] [%leaf "zzzzzzqaaa"] ~]) 0 10)
158 <<"2 foobar" " bazbud" "zzzzzzqaaa">>
160 > (~(win re [%rose ["1" "2" "3"] [%leaf "foobar"] [%leaf "bazbud"] ~]) 0 20)
161 <<"2foobar1bazbud3">>
163 > (~(win re [%rose ["1" "2" "3"] [%leaf "foobar"] [%leaf "bazbud"] ~]) 0 10)
164 <<"2 foobar" " bazbud" "3">>
170Pretty-printing structure
172A `tank` is one of three cases: a `%leaf` is simply a string (a printed line);
173a `%palm` is list of `tank` delimited by the strings in `p`, with back-steps at
174new lines; and a `%rose` is a list of `tank` delimited by the strings in `p`
175without back-steps at new lines.
181 ++ tank $% [$leaf p=tape]
183 p=[p=tape q=tape r=tape s=tape]
187 p=[p=tape q=tape r=tape]
198 [%rose p=[p="" q="" r=""] q=~]
200 > (wash [0 80] >(bex 20) (bex 19)<) :: at 80 cols
201 <<"[1.048.576 524.288]">>
203 > (wash [0 15] >(bex 20) (bex 19)<) :: at 15 cols
204 <<"[ 1.048.576" " 524.288" "]">>
206 > [(bex 150) (bex 151)] :: at 80 cols
207 [ 1.427.247.692.705.959.881.058.285.969.449.495.136.382.746.624
208 2.854.495.385.411.919.762.116.571.938.898.990.272.765.493.248
211 > (wash [0 40] >(bex 150) (bex 151)<)
213 "[ \\/1.427.247.692.705.959.881.058.285.\\/"
214 " 969.449.495.136.382.746.624"
216 " \\/2.854.495.385.411.919.762.116.571.\\/"
217 " 938.898.990.272.765.493.248"
229One of Hoon's two string types, the other being `++cord`. A tape is a list of
250 >`(list @tD)`"foobar"
254 ~[102 111 111 98 97 114]
262The time component of a `date`: day, hour, minute, second and a list of `@ux`
268 ++ tarp [d=@ud h=@ud m=@ud s=@ud f=(list @ux)]
275 [d=0 h=0 m=0 s=0 f=~]
278 [d=106.751.991.821.625 h=22 m=58 s=10 f=~[0x44ff]]
280 > `tarp`(yell ~2014.6.6..21.09.15..0a16)
281 [d=106.751.991.820.172 h=21 m=9 s=15 f=~[0xa16]]
284 [d=20 h=0 m=0 s=0 f=~]
293A restricted text atom for Hoon constants. The only characters permitted are
294lowercase ASCII letters, `-`, and `0-9`, the latter two of which cannot be the
295first character. The syntax for `@tas` is the text itself, always preceded by
296`%`. The empty `@tas` has a
328A list of `cord`s. A `wain` is used instead of a single `cord` with `\n`.
350List of list of characters
352A list of `tape`s. `wall` is used instead of a single `tape` with `\n`.
365 > `wall`(wash [0 20] leaf+<(bex 256)>)
367 "\\/115.792.089.237.\\/"
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list