on master help sign in
thru 4c
f167964Henry Ault
docs/system/hoon/library/src/4c/core/re.md+30−42
@@ -2,7 +2,7 @@
2
2
3Pretty-printing engine
3Pretty-printing engine
4
4
5−Pretty-printing engine that accepts a [`++tank`](/doc/hoon/library/1#++tank) [sample]() and contains arms that perform computation on it.
5+Pretty-printing engine that accepts a `++tank` sample and contains arms that perform computation on it.
6
6
7Accepts
7Accepts
8-------
8-------
@@ -13,24 +13,24 @@ Produces
13--------
13--------
14
14
15 ++ re
15 ++ re
16− |_ tac=tank
16+ |_ tac/tank
17
17
18Examples
18Examples
19--------
19--------
20
20
21− /~zod/try=> ~(. re leaf/"ham")
21+ /~zod/try=> ~(. re leaf+"ham")
22− <2.ghl [[%leaf ""] <414.gly 100.xkc 1.ypj %164>]>
22+ <2.gdc {tac/{$leaf ""} <402.arm 110.jyx 1.ztu $151>}>
23
23
24### `++ram`
24### `++ram`
25
25
26Flatten to tape
26Flatten to tape
27
27
28−Flatten [`++tank`]() out into a [`++tape`]().
28+Flatten `++tank` out into a `++tape`.
29
29
30Accepts
30Accepts
31-------
31-------
32
32
33−`tac` is a `++tank`, taken from [sample]() of `++re` [core]().
33+`tac` is a `++tank`, taken from sample of `++re` core.
34
34
35Produces
35Produces
36--------
36--------
@@ -43,9 +43,9 @@ Source
43 ++ ram
43 ++ ram
44 ^- tape
44 ^- tape
45 ?- -.tac
45 ?- -.tac
46− %leaf p.tac
46+ $leaf p.tac
47− %palm ram(tac [%rose [p.p.tac (weld q.p.tac r.p.tac) s.p.tac] q.tac])
47+ $palm ram(tac [%rose [p.p.tac (weld q.p.tac r.p.tac) s.p.tac] q.tac])
48− %rose
48+ $rose
49 %+ weld
49 %+ weld
50 q.p.tac
50 q.p.tac
51 |- ^- tape
51 |- ^- tape
@@ -59,9 +59,9 @@ Source
59Examples
59Examples
60--------
60--------
61
61
62− /~zod/try=> ~(ram re leaf/"foo")
62+ /~zod/try=> ~(ram re leaf+"foo")
63 "foo"
63 "foo"
64− /~zod/try=> ~(ram re rose/["." "(" ")"]^~[leaf/"bar" leaf/"baz" leaf/"bam"])
64+ /~zod/try=> ~(ram re rose+["." "(" ")"]^~[leaf+"bar" leaf+"baz" leaf+"bam"])
65 "(bar.baz.bam)"
65 "(bar.baz.bam)"
66
66
67### `++win`
67### `++win`
@@ -73,25 +73,25 @@ Render at indent level `tab` and width `edg`.
73Accepts
73Accepts
74-------
74-------
75
75
76−`tac` is a `++tank`, taken from [sample]() of `++re` [core]().
76+`tac` is a `++tank`, taken from sample of `++re` core.
77
77
78`tab` and `edg` are atoms.
78`tab` and `edg` are atoms.
79
79
80Produces
80Produces
81--------
81--------
82
82
83−A [`++wall`]() ([`++list`]() of [`++tapes`]()).
83+A `++wall` (`++list` of `++tapes`).
84
84
85Source
85Source
86------
86------
87
87
88 ++ win
88 ++ win
89− |= [tab=@ edg=@]
89+ |= {tab/@ edg/@}
90 =+ lug=`wall`~
90 =+ lug=`wall`~
91 |^ |- ^- wall
91 |^ |- ^- wall
92 ?- -.tac
92 ?- -.tac
93− %leaf (rig p.tac)
93+ $leaf (rig p.tac)
94− %palm
94+ $palm
95 ?: fit
95 ?: fit
96 (rig ram)
96 (rig ram)
97 ?~ q.tac
97 ?~ q.tac
@@ -111,30 +111,17 @@ Source
111 ==
111 ==
112 (wig(lug qyr) q.p.tac)
112 (wig(lug qyr) q.p.tac)
113 ::
113 ::
114− %rose
115− ?: fit
116− (rig ram)
117− =+ ^= gyl
118− |- ^- wall
119− ?~ q.tac
120− ?:(=(%$ r.p.tac) lug (rig r.p.tac))
121− ^$(tac i.q.tac, lug $(q.tac t.q.tac), tab din)
122− ?: =(%$ q.p.tac)
123− gyl
124− (wig(lug gyl) q.p.tac)
125− ==
126− ::
127
114
128Examples
115Examples
129--------
116--------
130
117
131− /~zod/try=> (~(win re leaf/"samoltekon-lapdok") 0 20)
118+ /~zod/try=> (~(win re leaf+"samoltekon-lapdok") 0 20)
132 <<"samoltekon-lapdok">>
119 <<"samoltekon-lapdok">>
133− /~zod/try=> (~(win re leaf/"samoltekon-lapdok") 0 10)
120+ /~zod/try=> (~(win re leaf+"samoltekon-lapdok") 0 10)
134 <<"\/samolt\/" " ekon-l" " apdok" "\/ \/">>
121 <<"\/samolt\/" " ekon-l" " apdok" "\/ \/">>
135− /~zod/try=> (~(win re rose/["--" "[" "]"]^~[leaf/"1423" leaf/"2316"]) 0 20)
122+ /~zod/try=> (~(win re rose+["--" "[" "]"]^~[leaf+"1423" leaf+"2316"]) 0 20)
136 <<"[1423--2316]">>
123 <<"[1423--2316]">>
137− /~zod/try=> (~(win re rose/["--" "[" "]"]^~[leaf/"1423" leaf/"2316"]) 0 10)
124+ /~zod/try=> (~(win re rose+["--" "[" "]"]^~[leaf+"1423" leaf+"2316"]) 0 10)
138 <<"[ 1423" " 2316" "]">>
125 <<"[ 1423" " 2316" "]">>
139
126
140### `++din`
127### `++din`
@@ -185,28 +172,28 @@ Examples
185
172
186Wrap in `\/`
173Wrap in `\/`
187
174
188−Wrap [`++tape`]() in `\/` if it doesn't fit at current indentation. Internal to
175+Wrap `++tape` in `\/` if it doesn't fit at current indentation. Internal to
189−[`++win`]()
176+`++win`
190
177
191Accepts
178Accepts
192-------
179-------
193
180
194−`tac` is a `++tank`, taken from [sample]() of `++re` [core]().
181+`tac` is a `++tank`, taken from sample of `++re` core.
195
182
196`hom` is a `++tape`.
183`hom` is a `++tape`.
197
184
198Produces
185Produces
199--------
186--------
200
187
201−A [`++wall`]() (list of `++tape`s).
188+A `++wall` (list of `++tape`s).
202
189
203Source
190Source
204------
191------
205
192
206 ++ rig
193 ++ rig
207− |= hom=tape
194+ |= hom/tape
208 ^- wall
195 ^- wall
209− ?: (lte (lent hom) (sub edg tab))
196+ ?: & ::(lte (lent hom) (sub edg tab))
210 [(runt [tab ' '] hom) lug]
197 [(runt [tab ' '] hom) lug]
211 => .(tab (add tab 2), edg (sub edg 2))
198 => .(tab (add tab 2), edg (sub edg 2))
212 =+ mut=(trim (sub edg tab) hom)
199 =+ mut=(trim (sub edg tab) hom)
@@ -229,12 +216,12 @@ Examples
229
216
230`++win` render tape
217`++win` render tape
231
218
232−Render [`++tape`](). Internal to [`++win`]().
219+Render `++tape`. Internal to `++win`.
233
220
234Accepts
221Accepts
235-------
222-------
236
223
237−`tac` is a `++tank`, taken from [sample]() of `++re` [core]().
224+`tac` is a `++tank`, taken from sample of `++re` core.
238
225
239`hom` is a `++tape`.
226`hom` is a `++tape`.
240
227
@@ -242,7 +229,7 @@ Produces
242--------
229--------
243
230
244 ++ wig
231 ++ wig
245− |= hom=tape
232+ |= hom/tape
246 ^- wall
233 ^- wall
247 ?~ lug
234 ?~ lug
248 (rig hom)
235 (rig hom)
@@ -259,4 +246,5 @@ Produces
259
246
260
247
261
248
249+
262***
250***
docs/system/hoon/library/src/4c/gate/show.md+28−28
@@ -1,49 +1,48 @@
1### `++show`
1### `++show`
2
2
3− ++ show :: XX deprecated, use type
3+ ++ show :: XX deprecated, use span
4− |= vem=*
4+ |= vem/*
5 |^ ^- tank
5 |^ ^- tank
6 ?: ?=(@ vem)
6 ?: ?=(@ vem)
7 [%leaf (mesc (trip vem))]
7 [%leaf (mesc (trip vem))]
8 ?- vem
8 ?- vem
9− [s=~ c=*]
9+ {s/$~ c/*}
10 [%leaf '\'' (weld (mesc (tape +.vem)) `tape`['\'' ~])]
10 [%leaf '\'' (weld (mesc (tape +.vem)) `tape`['\'' ~])]
11 ::
11 ::
12− [s=%a c=@] [%leaf (mesc (trip c.vem))]
12+ {s/$a c/@} [%leaf (mesc (trip c.vem))]
13− [s=%b c=*] (shop c.vem |=(a=@ ~(rub at a)))
13+ {s/$b c/*} (shop c.vem |=(a/@ ~(rub at a)))
14− [s=[%c p=@] c=*]
14+ {s/{$c p/@} c/*}
15 :+ %palm
15 :+ %palm
16 [['.' ~] ['-' ~] ~ ~]
16 [['.' ~] ['-' ~] ~ ~]
17 [[%leaf (mesc (trip p.s.vem))] $(vem c.vem) ~]
17 [[%leaf (mesc (trip p.s.vem))] $(vem c.vem) ~]
18 ::
18 ::
19− [s=%d c=*] (shop c.vem |=(a=@ ~(rud at a)))
19+ {s/$d c/*} (shop c.vem |=(a/@ ~(rud at a)))
20− [s=%k c=*] (tank c.vem)
20+ {s/$k c/*} (tank c.vem)
21− [s=%h c=*]
21+ {s/$h c/*}
22− ?: =(0 c.vem) :: XX remove after 220
23− [%leaf '#' ~]
24 :+ %rose
22 :+ %rose
25 [['/' ~] ['/' ~] ~]
23 [['/' ~] ['/' ~] ~]
26− =+ yol=((list ,@ta) c.vem)
24+ =+ yol=((list @ta) c.vem)
27− (turn yol |=(a=@ta [%leaf (trip a)]))
25+ (turn yol |=(a/@ta [%leaf (trip a)]))
28 ::
26 ::
27+ {s/$l c/*} (shol c.vem)
29− [s=%o c=*]
28+ {s/$o c/*}
30 %= $
29 %= $
31 vem
30 vem
32 :- [%m '%h:<[%d %d].[%d %d]>']
31 :- [%m '%h:<[%d %d].[%d %d]>']
33 [-.c.vem +<-.c.vem +<+.c.vem +>-.c.vem +>+.c.vem ~]
32 [-.c.vem +<-.c.vem +<+.c.vem +>-.c.vem +>+.c.vem ~]
34 ==
33 ==
35 ::
34 ::
36− [s=%p c=*] (shop c.vem |=(a=@ ~(rup at a)))
35+ {s/$p c/*} (shop c.vem |=(a/@ ~(rup at a)))
37− [s=%q c=*] (shop c.vem |=(a=@ ~(r at a)))
36+ {s/$q c/*} (shop c.vem |=(a/@ ~(r at a)))
38− [s=%r c=*] $(vem [[%r ' ' '{' '}'] c.vem])
37+ {s/$r c/*} $(vem [[%r ' ' '{' '}'] c.vem])
39− [s=%t c=*] (shop c.vem |=(a=@ ~(rt at a)))
38+ {s/$t c/*} (shop c.vem |=(a/@ ~(rt at a)))
40− [s=%v c=*] (shop c.vem |=(a=@ ~(ruv at a)))
39+ {s/$v c/*} (shop c.vem |=(a/@ ~(ruv at a)))
41− [s=%x c=*] (shop c.vem |=(a=@ ~(rux at a)))
40+ {s/$x c/*} (shop c.vem |=(a/@ ~(rux at a)))
42− [s=[%m p=@] c=*] (shep p.s.vem c.vem)
41+ {s/{$m p/@} c/*} (shep p.s.vem c.vem)
43− [s=[%r p=@] c=*]
42+ {s/{$r p/@} c/*}
44 $(vem [[%r ' ' (cut 3 [0 1] p.s.vem) (cut 3 [1 1] p.s.vem)] c.vem])
43 $(vem [[%r ' ' (cut 3 [0 1] p.s.vem) (cut 3 [1 1] p.s.vem)] c.vem])
45 ::
44 ::
46− [s=[%r p=@ q=@ r=@] c=*]
45+ {s/{$r p/@ q/@ r/@} c/*}
47 :+ %rose
46 :+ %rose
48 :* p=(mesc (trip p.s.vem))
47 :* p=(mesc (trip p.s.vem))
49 q=(mesc (trip q.s.vem))
48 q=(mesc (trip q.s.vem))
@@ -54,7 +53,7 @@
54 ~
53 ~
55 [^$(vem -.c.vem) $(c.vem +.c.vem)]
54 [^$(vem -.c.vem) $(c.vem +.c.vem)]
56 ::
55 ::
57− [s=%z c=*] $(vem [[%r %$ %$ %$] c.vem])
56+ {s/$z c/*} $(vem [[%r %$ %$ %$] c.vem])
58 * !!
57 * !!
59 ==
58 ==
60
59
@@ -63,7 +62,7 @@ XX document
63### `++shep`
62### `++shep`
64
63
65 ++ shep
64 ++ shep
66− |= [fom=@ gar=*]
65+ |= {fom/@ gar/*}
67 ^- tank
66 ^- tank
68 =+ l=(met 3 fom)
67 =+ l=(met 3 fom)
69 =+ i=0
68 =+ i=0
@@ -84,8 +83,8 @@ XX document
84
83
85### `++shop`
84### `++shop`
86
85
87− ++ shop
86+ ++ shop
88− |= [aug=* vel=$+(a=@ tape)]
87+ |= {aug/* vel/$-(a/@ tape)}
89 ^- tank
88 ^- tank
90 ?: ?=(@ aug)
89 ?: ?=(@ aug)
91 [%leaf (vel aug)]
90 [%leaf (vel aug)]
@@ -96,7 +95,8 @@ XX document
96 ?: ?=(@ aug)
95 ?: ?=(@ aug)
97 [^$ ~]
96 [^$ ~]
98 [^$(aug -.aug) $(aug +.aug)]
97 [^$(aug -.aug) $(aug +.aug)]
99− --
98+ ::
99+
100
100
101XX document
101XX document
102
102