3 title/'4m: Formatting Functions'
8# 4m: formatting functions
14Renders a dime `mol` as a cord.
27 ++ scot |=(mol/dime ~(rent co %$ mol))
35 > `@t`(scot %p ~pillyt)
41 > (scot %if .127.0.0.1)
43 > `@t`(scot %if .127.0.0.1)
47 > `@t`(scot %ta ~.asd_a)
57Renders a dime `mol` as a tape.
70 ++ scow |=(mol/dime ~(rend co %$ mol))
79 > (scow %if .127.0.0.1)
91Produces a `gate` that parses a `term` `txt` to an atom of the
92odor specified by `mod`.
96`mod` is a term, an atom of odor `@tas`.
98`txt` is a cord, an atom of odor `@ta`.
107 ++ slat |=(mod/@tas |=(txt/@ta (slaw mod txt)))
113 > `(unit @p)`((slat %p) '~pillyt')
115 > `(unit @ux)`((slat %ux) '0x12')
117 > `(unit @if)`((slat %if) '.127.0.0.1')
119 > `(unit @ta)`((slat %ta) '~.asd_a')
127Demand: parse cord with input odor
129Parses a cord `txt` to an atom of the odor specificed by `mod`.
130Crashes if it fails to parse.
134`mod` is a term, an atom of odor `@tas`.
136`txt` is a cord, an atom of odor `@ta`.
140The atom of a `(unit @)` from `++slaw`, or crash.
145 ++ slav |=([mod/@tas txt/@ta] (need (slaw mod txt)))
151 > `@p`(slav %p '~pillyt')
153 > `@p`(slav %p '~pillam')
155 > `@ux`(slav %ux '0x12')
157 > `@ux`(slav %ux '0b10')
159 > `@if`(slav %if '.127.0.0.1')
161 > `@if`(slav %if '.fe80.0.0.202')
163 > `@ta`(slav %ta '~.asd_a')
165 > `@ta`(slav %ta '~~asd-a')
172Parse cord to input odor
174Parses a cord `txt` to an atom of the odor specified by `mod`.
178`mod` is a term, an atom of odor `@tas`.
180`txt` is a cord, an atom of odor `@ta`.
191 |= {mod/@tas txt/@ta}
194 ?.(&(?=({$~ $$ @ @} con) =(p.p.u.con mod)) ~ [~ q.p.u.con])
200 > `(unit @p)`(slaw %p '~pillyt')
202 > `(unit @p)`(slaw %p '~pillam')
204 > `(unit @ux)`(slaw %ux '0x12')
206 > `(unit @ux)`(slaw %ux '0b10')
208 > `(unit @if)`(slaw %if '.127.0.0.1')
210 > `(unit @if)`(slaw %if '.fe80.0.0.202')
212 > `(unit @ta)`(slaw %ta '~.asd_a')
214 > `(unit @ta)`(slaw %ta '~~asd-a')
224Parses a cord `txt` to the unit of a `++coin`.
238 |= txt/@ta ^- (unit coin)
240 ?: (gth 0x7fff.ffff txt) :: XX petty cache
241 ~+ ((full nuck:so) [[1 1] (trip txt)])
242 ((full nuck:so) [[1 1] (trip txt)])
253 [~ [% p=[p=~.p q=32.819]]]
255 [~ [% p=[p=~.ux q=18]]]
256 > (slay '.127.0.0.1')
257 [~ [% p=[p=~.if q=2.130.706.433]]]
260 > (slay '._20_0w25_sam__')
263 p=~[[% p=[p=~.ud q=20]] [% p=[p=~.uw q=133]] [% p=[p=~.tas q=7.168.371]]]
271 ~ <syntax error at [1 2]>
284Renders the path `bon` as a `tank`, which is used for
298 ++ smyt :: pretty print path
300 :+ %rose [['/' ~] ['/' ~] ~]
301 (turn bon |=(a/@ [%leaf (trip a)]))
310 p=[p="/" q="/" r="/"]
314 [%leaf p="~2014.10.28..18.36.58..a280"]
319 p=[p="/" q="/" r="/"]
320 q=~[[%leaf p="as"] [%leaf p="les"] [%leaf p="top"]]
330Renders a path `pax` as cord.
343 ++ spat |=(pax/path (crip (spud pax))) :: path to cord
350 '~zod/try/~2014.10.28..18.40.20..4287'
352 '~zod/try/~2014.10.28..18.41.12..3bcd/bin'
363Renders a path `pax` as tape.
376 ++ spud |=(pax/path ~(ram re (smyt pax))) :: path to tape
383 "~zod/try/~2014.10.28..18.40.46..e951"
385 "~zod/try/~2014.10.28..18.41.05..16f2/bin"
396Parsing rule. Parses a cord `zep` to a static `++path`.
397Crashes if it fails to parse.
410 ++ stab :: parse cord to path
411 =+ fel=;~(pfix fas (more fas urs:ab))
412 |=(zep/@t `path`(rash zep fel))
418 > (stab '/as/lek/tor')
421 > `(pole ,@ta)`(stab '/as/lek/tor')
422 [~.as [~.lek [~.tor ~]]]
424 > (stab '~zod/arvo/~2014.10.28..18.48.41..335f/zuse')
425 ~zod/arvo/~2014.10.28..18.48.41..335f/zuse
427 > `(pole ,@ta)`(stab '~zod/arvo/~2014.10.28..18.48.41..335f/zuse')
428 [~.~zod [~.arvo [~.~2014.10.28..18.48.41..335f [~.zuse ~]]]]
430 > (stab '/a/~pillyt/pals/1')
433 > `(pole ,@ta)`(stab '/a/~pillyt/pals/1')
434 [~.a [~.~pillyt [~.pals [~.1 ~]]]]
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