on master help sign in
thru 4k
commit35b7e29eab3a023ccd36382ee971c73e5873d1ae authorHenry Ault <henry@tlon.io> dateMon 21 Mar 2016, 16:29 (11 years ago) parent9d44065
7 files changed+85−81
docs/system/hoon/library/src/4g/gate/rash.md+3−2 docs/system/hoon/library/src/4g/gate/rush.md+4−3 docs/system/hoon/library/src/4g/gate/rust.md+3−2 docs/system/hoon/library/src/4g/gate/scan.md+4−4 docs/system/hoon/library/src/4j/core/ab.md+53−53 docs/system/hoon/library/src/4j/core/mu.md+12−11 docs/system/hoon/library/src/4j/core/ne.md+6−6
docs/system/hoon/library/src/4g/gate/rash.md+3−2
@@ -2,7 +2,7 @@
22
33Parse or crash
44
5−Parse a cord with a given [`++rule`]() and crash if the [`++cord`]() isn't entirely
5+Parse a cord with a given `++rule` and crash if the `++cord` isn't entirely
66parsed.
77
88Accepts
@@ -20,7 +20,8 @@ The value of the parse result, or crash.
2020Source
2121------
2222
23− ++ rash |*([naf=@ sab=_rule] (scan (trip naf) sab)) ::
23+ ++ rash |*({naf/@ sab/rule} (scan (trip naf) sab)) ::
24+
2425
2526Examples
2627--------
docs/system/hoon/library/src/4g/gate/rush.md+4−3
@@ -8,9 +8,9 @@ entirely parsed.
88Accepts
99-------
1010
11−`naf` is an [atom]().
11+`naf` is an atom.
1212
13−`sab` is a [rule]().
13+`sab` is a rule.
1414
1515Produces
1616--------
@@ -20,7 +20,8 @@ The value of the parse result, or null.
2020Source
2121------
2222
23− ++ rush |*([naf=@ sab=_rule] (rust (trip naf) sab))
23+ ++ rush |*({naf/@ sab/rule} (rust (trip naf) sab))
24+
2425
2526Examples
2627--------
docs/system/hoon/library/src/4g/gate/rust.md+3−2
@@ -2,7 +2,7 @@
22
33Parse tape or null
44
5−Parse a [`++tape`]() with a given [`++rule`]() and produce null if the `++tape` isn't
5+Parse a `++tape` with a given `++rule` and produce null if the `++tape` isn't
66entirely parsed.
77
88Accepts
@@ -20,10 +20,11 @@ A `(unit ,@t)`
2020Source
2121------
2222
23− ++ rust |* [los=tape sab=_rule]
23+ ++ rust |* {los/tape sab/rule}
2424 =+ vex=((full sab) [[1 1] los])
2525 ?~(q.vex ~ [~ u=p.u.q.vex])
2626
27+
2728Examples
2829--------
2930
docs/system/hoon/library/src/4g/gate/scan.md+4−4
@@ -2,15 +2,15 @@
22
33Parse tape or crash
44
5−Parse a [`++tape`]() with a given [`++rule`]() and crash if the `++tape` isn't entirely
5+Parse a `++tape` with a given `++rule` and crash if the `++tape` isn't entirely
66parsed.
77
88Accepts
99-------
1010
11−`los` is a [tape]().
11+`los` is a tape.
1212
13−`sab` is a [rule]().
13+`sab` is a rule.
1414
1515Produces
1616--------
@@ -20,7 +20,7 @@ Either a `++tape` or a crash.
2020Source
2121------
2222
23− ++ scan |* [los=tape sab=_rule]
23+ ++ scan |* {los/tape sab/rule}
2424 =+ vex=((full sab) [[1 1] los])
2525 ?~ q.vex
2626 ~_ (show [%m '{%d %d}'] p.p.vex q.p.vex ~)
docs/system/hoon/library/src/4j/core/ab.md+53−53
@@ -22,7 +22,7 @@ Examples
2222
2323Parse hex pair
2424
25−Parsing [`++rule`](). Parses a pair of base-16 digits. Used in escapes.
25+Parsing `++rule`. Parses a pair of base-16 digits. Used in escapes.
2626
2727Accepts
2828-------
@@ -55,7 +55,7 @@ Examples
5555
5656Parse phonetic pair
5757
58−Parsing [`++rule`](). Parses an atom of [odor]() [`@pE`](), a phrase of two bytes
58+Parsing `++rule`. Parses an atom of odor `@pE`, a phrase of two bytes
5959encoded phonetically.
6060
6161Accepts
@@ -87,7 +87,7 @@ Examples
8787
8888Parse two phonetic pairs
8989
90−Parsing [`++rule`](). Parses and unscrambles an atom of odor [@pF](), a phrase
90+Parsing `++rule`. Parses and unscrambles an atom of odor @pF, a phrase
9191of two two-byte pairs that are encoded (and scrambled) phonetically.
9292
9393Accepts
@@ -104,7 +104,7 @@ Source
104104------
105105
106106 ++ huf %+ cook
107− |=([a=@ b=@] (wred:un ~(zug mu ~(zag mu [a b]))))
107+ |=([a/@ b/@] (wred:un ~(zug mu ~(zag mu [a b]))))
108108 ;~(plug hif ;~(pfix hep hif))
109109
110110Examples
@@ -123,13 +123,13 @@ Examples
123123
124124Parse 8 phonetic bytes
125125
126−Parsing [`++rule`](). Parses an atom of odor [@pG](), a phrase of eight of
126+Parsing `++rule`. Parses an atom of odor @pG, a phrase of eight of
127127phonetic bytes.
128128
129129Accepts
130130-------
131131
132−An atom of odor [`@pG`]()
132+An atom of odor `@pG`
133133
134134Produces
135135--------
@@ -155,12 +155,12 @@ Examples
155155
156156Parse \<= 5 base-32
157157
158−Parsing [`++rule`](). Parses up to five base-32 digits without a leading zero.
158+Parsing `++rule`. Parses up to five base-32 digits without a leading zero.
159159
160160Accepts
161161-------
162162
163−Up to five [@uv]() (base 64) digits.
163+Up to five @uv (base 64) digits.
164164
165165Produces
166166--------
@@ -191,12 +191,12 @@ Examples
191191
192192Parse \<= 5 base-64
193193
194−Parsing [`++rule`](). Parses up to five base-64 digits without a leading zero.
194+Parsing `++rule`. Parses up to five base-64 digits without a leading zero.
195195
196196Accepts
197197-------
198198
199−Up to five [@uw]() (base 64) digits.
199+Up to five @uw (base 64) digits.
200200
201201Produces
202202--------
@@ -230,7 +230,7 @@ Examples
230230
231231Parse 5 base-32
232232
233−Parsing [`++rule`](). Parses exactly five base-32 digits.
233+Parsing `++rule`. Parses exactly five base-32 digits.
234234
235235Accepts
236236-------
@@ -258,7 +258,7 @@ Examples
258258
259259Parse 5 base-64
260260
261−Parsing [`++rule`](). Parses exactly five base-64 digits.
261+Parsing `++rule`. Parses exactly five base-64 digits.
262262
263263Accepts
264264-------
@@ -266,8 +266,6 @@ Accepts
266266Produces
267267--------
268268
269−My name henry let's see how fast I can type.
270−
271269Source
272270------
273271
@@ -288,7 +286,7 @@ Examples
288286
289287Parse \<= 4 binary
290288
291−Parsing [`++rule`](). Parses a binary number of up to 4 digits in length without
289+Parsing `++rule`. Parses a binary number of up to 4 digits in length without
292290a leading zero.
293291
294292Accepts
@@ -324,7 +322,7 @@ Examples
324322
325323Parse \<= 4 hex
326324
327−Parsing [`++rule`](). Parses a hexadecimal number of up to 4 digits in length
325+Parsing `++rule`. Parses a hexadecimal number of up to 4 digits in length
328326without a leading zero.
329327
330328Accepts
@@ -358,7 +356,7 @@ Examples
358356
359357Parse 4 binary
360358
361−Parsing [`++rule`](). Parses exactly four binary digits.
359+Parsing `++rule`. Parses exactly four binary digits.
362360
363361Accepts
364362-------
@@ -388,7 +386,7 @@ Examples
388386
389387Parse 4 hex
390388
391−Parsing [`++rule`](). Parses exactly four hexadecimal digits.
389+Parsing `++rule`. Parses exactly four hexadecimal digits.
392390
393391Accepts
394392-------
@@ -418,7 +416,7 @@ Examples
418416
419417Parse 1
420418
421−Parsing [`++rule`](). Parses the number 1.
419+Parsing `++rule`. Parses the number 1.
422420
423421Accepts
424422-------
@@ -449,7 +447,7 @@ Examples
449447
450448Parse decimal
451449
452−Parsing [`++rule`](). Parses a nonzero decimal digit.
450+Parsing `++rule`. Parses a nonzero decimal digit.
453451
454452Accepts
455453-------
@@ -460,7 +458,7 @@ Produces
460458Source
461459------
462460
463− ++ sed (cook |=(a=@ (sub a '0')) (shim '1' '9'))
461+ ++ sed (cook |=(a/@ (sub a '0')) (shim '1' '9'))
464462
465463Examples
466464--------
@@ -477,7 +475,7 @@ Examples
477475
478476Parse base-32
479477
480−Parsing [`++rule`](). Parses a nonzero base-32 digit
478+Parsing `++rule`. Parses a nonzero base-32 digit
481479
482480Accepts
483481-------
@@ -505,7 +503,7 @@ Examples
505503
506504Parse base-64
507505
508−Parsing [`++rule`](). Parses a nonzero base-64 digit
506+Parsing `++rule`. Parses a nonzero base-64 digit
509507
510508Accepts
511509-------
@@ -533,7 +531,7 @@ Examples
533531
534532Parse hex
535533
536−Parsing [`++rule`](). Parses a nonzero hexadecimal digit.
534+Parsing `++rule`. Parses a nonzero hexadecimal digit.
537535
538536Accepts
539537-------
@@ -561,7 +559,7 @@ Examples
561559
562560Parse binary
563561
564−Parsing [`++rule`](). Parses a binary digit.
562+Parsing `++rule`. Parses a binary digit.
565563
566564Accepts
567565-------
@@ -572,7 +570,7 @@ Produces
572570Source
573571------
574572
575− ++ sib (cook |=(a=@ (sub a '0')) (shim '0' '1'))
573+ ++ sib (cook |=(a/@ (sub a '0')) (shim '0' '1'))
576574
577575Examples
578576--------
@@ -588,7 +586,7 @@ Examples
588586
589587Parse decimal
590588
591−Parsing [`++rule`](). Parses a decimal digit.
589+Parsing `++rule`. Parses a decimal digit.
592590
593591Accepts
594592-------
@@ -599,7 +597,7 @@ Produces
599597Source
600598------
601599
602− ++ sid (cook |=(a=@ (sub a '0')) (shim '0' '9'))
600+ ++ sid (cook |=(a/@ (sub a '0')) (shim '0' '9'))
603601
604602Examples
605603--------
@@ -613,7 +611,7 @@ Examples
613611
614612Parse base-32
615613
616−Parsing [`++rule`](). Parses a base-32 digit.
614+Parsing `++rule`. Parses a base-32 digit.
617615
618616Accepts
619617-------
@@ -638,7 +636,7 @@ Examples
638636
639637Parse base-64
640638
641−Parsing [`++rule`](). Parses a base-64 digit.
639+Parsing `++rule`. Parses a base-64 digit.
642640
643641Accepts
644642-------
@@ -663,7 +661,7 @@ Examples
663661
664662Parse hex
665663
666−Parsing [`++rule`](). Parses a hexadecimal digit.
664+Parsing `++rule`. Parses a hexadecimal digit.
667665
668666Accepts
669667-------
@@ -688,7 +686,7 @@ Examples
688686
689687Parse base-32
690688
691−Parsing [`++rule`](). Parses a base-32 letter.
689+Parsing `++rule`. Parses a base-32 letter.
692690
693691Accepts
694692-------
@@ -699,7 +697,7 @@ Produces
699697Source
700698------
701699
702− ++ sov (cook |=(a=@ (sub a 87)) (shim 'a' 'v'))
700+ ++ sov (cook |=(a/@ (sub a 87)) (shim 'a' 'v'))
703701
704702Examples
705703--------
@@ -713,7 +711,7 @@ Examples
713711
714712Parse base-64
715713
716−Parsing [`++rule`](). Parses a base-64 letter/symbol.
714+Parsing `++rule`. Parses a base-64 letter/symbol.
717715
718716Accepts
719717-------
@@ -725,8 +723,8 @@ Source
725723------
726724
727725 ++ sow ;~ pose
728− (cook |=(a=@ (sub a 87)) (shim 'a' 'z'))
729− (cook |=(a=@ (sub a 29)) (shim 'A' 'Z'))
726+ (cook |=(a/@ (sub a 87)) (shim 'a' 'z'))
727+ (cook |=(a/@ (sub a 29)) (shim 'A' 'Z'))
730728 (cold 62 (just '-'))
731729 (cold 63 (just '~'))
732730 ==
@@ -743,7 +741,7 @@ Examples
743741
744742Parse hex letter
745743
746−Parsing [`++rule`](). Parses a hexadecimal letter.
744+Parsing `++rule`. Parses a hexadecimal letter.
747745
748746Accepts
749747-------
@@ -754,7 +752,7 @@ Produces
754752Source
755753------
756754
757− ++ sox (cook |=(a=@ (sub a 87)) (shim 'a' 'f'))
755+ ++ sox (cook |=(a/@ (sub a 87)) (shim 'a' 'f'))
758756
759757Examples
760758--------
@@ -768,7 +766,7 @@ Examples
768766
769767Parse \<= 3 decimal
770768
771−Parsing [`++rule`](). Parses a decimal number of up to 3 digits without a
769+Parsing `++rule`. Parses a decimal number of up to 3 digits without a
772770leading zero.
773771
774772Accepts
@@ -801,7 +799,7 @@ Examples
801799
802800Leading phonetic byte
803801
804−Parsing [`++rule`](). Parses the leading phonetic byte, which represents a
802+Parsing `++rule`. Parses the leading phonetic byte, which represents a
805803syllable.
806804
807805Accepts
@@ -813,7 +811,7 @@ Produces
813811Source
814812------
815813
816− ++ tip (sear |=(a=@ (ins:po a)) til)
814+ ++ tip (sear |=(a/@ (ins:po a)) til)
817815
818816Examples
819817--------
@@ -829,7 +827,7 @@ Examples
829827
830828Trailing phonetic syllable
831829
832−Parsing [`++rule`](). Parses the trailing phonetic byte, which represents a
830+Parsing `++rule`. Parses the trailing phonetic byte, which represents a
833831syllable.
834832
835833Accepts
@@ -841,7 +839,7 @@ Produces
841839Source
842840------
843841
844− ++ tiq (sear |=(a=@ (ind:po a)) til)
842+ ++ tiq (sear |=(a/@ (ind:po a)) til)
845843
846844Examples
847845--------
@@ -857,7 +855,7 @@ Examples
857855
858856Parse 3 decimal digits
859857
860−Parsing [`++rule`](). Parses exactly three decimal digits.
858+Parsing `++rule`. Parses exactly three decimal digits.
861859
862860Accepts
863861-------
@@ -885,7 +883,7 @@ Examples
885883
886884Parse 3 lowercase
887885
888−Parsing [`++rule`](). Parses exactly three lowercase letters.
886+Parsing `++rule`. Parses exactly three lowercase letters.
889887
890888Accepts
891889-------
@@ -915,7 +913,7 @@ Examples
915913
916914Parse span characters
917915
918−Parsing rule. Parses characters from an atom of the span odor [`@ta`]().
916+Parsing rule. Parses characters from an atom of the span odor `@ta`.
919917
920918Accepts
921919-------
@@ -927,7 +925,7 @@ Source
927925------
928926
929927 ++ urs %+ cook
930− |=(a=tape (rap 3 ^-((list ,@) a)))
928+ |=(a/tape (rap 3 ^-((list @) a)))
931929 (star ;~(pose nud low hep dot sig cab))
932930
933931Examples
@@ -944,7 +942,7 @@ Examples
944942
945943Parse non-`_` span
946944
947−Parsing rule. Parses all characters of the span odor [`@ta`]() except
945+Parsing rule. Parses all characters of the span odor `@ta` except
948946for cab, `_`.
949947
950948Accepts
@@ -957,7 +955,7 @@ Source
957955------
958956
959957 ++ urt %+ cook
960− |=(a=tape (rap 3 ^-((list ,@) a)))
958+ |=(a/tape (rap 3 ^-((list @) a)))
961959 (star ;~(pose nud low hep dot sig))
962960
963961Examples
@@ -1034,12 +1032,13 @@ Accepts
10341032Produces
10351033--------
10361034
1037−`fel` is a [`rule`]().
1035+`fel` is a `rule`.
10381036
10391037Source
10401038------
10411039
1042− ++ ape |*(fel=_rule ;~(pose (cold 0 (just '0')) fel))
1040+ ++ ape |*(fel/rule ;~(pose (cold 0 (just '0')) fel))
1041+
10431042
10441043Examples
10451044--------
@@ -1078,7 +1077,7 @@ Examples
10781077
10791078Parse IPv6
10801079
1081−Parsing rule. Parses a [`@is`](), an IPv6 address.
1080+Parsing rule. Parses a `@is`, an IPv6 address.
10821081
10831082Accepts
10841083-------
@@ -1119,6 +1118,7 @@ Source
11191118
11201119 ++ dem (ape (bass 1.000 ;~(plug ted:ab (star ;~(pfix dog tid:ab)))))
11211120
1121+
11221122Examples
11231123--------
11241124
@@ -1190,7 +1190,7 @@ Examples
11901190
11911191Parse phonetic base
11921192
1193−Parsing rule. Parses an atom of odor [`@p`](), the phonetic base.
1193+Parsing rule. Parses an atom of odor `@p`, the phonetic base.
11941194
11951195Accepts
11961196-------
docs/system/hoon/library/src/4j/core/mu.md+12−11
@@ -2,7 +2,7 @@
22
33Core used to scramble 16-bit atoms
44
5−A [door]() that contains arms that are used to scramble two atoms, `top`
5+A door that contains arms that are used to scramble two atoms, `top`
66and `bot`. Used especially in the phonetic base to disguise the
77relationship between a destroyer and its cruiser.
88
@@ -12,15 +12,15 @@ Accepts
1212Produces
1313--------
1414
15−`bot` is an [atom]().
15+`bot` is an atom.
1616
17−`top` is an [atom]().
17+`top` is an atom.
1818
1919Source
2020------
2121
2222 ++ mu
23− |_ [top=@ bot=@]
23+ |_ [top/@ bot/@]
2424
2525Examples
2626--------
@@ -44,15 +44,16 @@ Accepts
4444Produces
4545--------
4646
47−`bot` is an [atom]().
47+`bot` is an atom.
4848
49−`top` is an [atom]().
49+`top` is an atom.
5050
5151Source
5252------
5353
5454 ++ zag [p=(end 4 1 (add top bot)) q=bot]
5555
56+
5657Examples
5758--------
5859
@@ -65,7 +66,7 @@ Examples
6566
6667Subtract bottom from top
6768
68−The inverse of [`++zag`](). Produces the cell of `top` and `bot` with
69+The inverse of `++zag`. Produces the cell of `top` and `bot` with
6970`top` unscrambled. The unscrambled `top` is the sum of the sample `top`
7071and the 16-bit complement of `bot`. Used to unscramble the name of the
7172destroyer.
@@ -76,9 +77,9 @@ Accepts
7677Produces
7778--------
7879
79−`bot` is an [atom]().
80+`bot` is an atom.
8081
81−`top` is an [atom]().
82+`top` is an atom.
8283
8384Source
8485------
@@ -106,9 +107,9 @@ Accepts
106107Produces
107108--------
108109
109−`bot` is an [atom]().
110+`bot` is an atom.
110111
111−`top` is an [atom]().
112+`top` is an atom.
112113
113114Source
114115------
docs/system/hoon/library/src/4j/core/ne.md+6−6
@@ -2,7 +2,7 @@
22
33Digit rendering engine
44
5−A [door]() containing arms that render digits at bases 10, 16, 32, and
5+A door containing arms that render digits at bases 10, 16, 32, and
6664.
77
88Accepts
@@ -11,13 +11,13 @@ Accepts
1111Produces
1212--------
1313
14−`tig` is an [`atom`]().
14+`tig` is an `atom`.
1515
1616Source
1717------
1818
1919 ++ ne
20− |_ tig=@
20+ |_ tig/@
2121
2222Examples
2323--------
@@ -39,7 +39,7 @@ Accepts
3939Produces
4040--------
4141
42−`tig` is an [`atom`]().
42+`tig` is an `atom`.
4343
4444Source
4545------
@@ -66,7 +66,7 @@ Accepts
6666Produces
6767--------
6868
69−`tig` is an [`atom`]().
69+`tig` is an `atom`.
7070
7171Source
7272------
@@ -124,7 +124,7 @@ Accepts
124124Produces
125125--------
126126
127−`tig` is an [`atom`]().
127+`tig` is an `atom`.
128128
129129Source
130130------