on b93c19b help sign in
1655 lines 23 kB history raw
1+++
2title = "4j: Parsing (Bases and Base Digits)"
3weight = 37
4template = "doc.html"
5+++
6### `++ab`
8Primitive parser engine
10A core containing numeric parser primitives.
12#### Source
14```
15 ++ ab
16 |%
17```
19#### Examples
21```
22 > ab
23 <36.ecc 414.gly 100.xkc 1.ypj %164>
24```
26------------------------------------------------------------------------
28### `++bix:ab`
30Parse hex pair
32Parsing `++rule`. Parses a pair of base-16 digits. Used in escapes.
34#### Accepts
36XX
38#### Produces
40A an atom. XX
42#### Source
44```
45 ++ bix (bass 16 (stun [2 2] six))
46```
48#### Examples
50```
51 > (scan "07" bix:ab)
52 q=7
53 > (scan "51" bix:ab)
54 q=81
55 > (scan "a3" bix:ab)
56 q=163
57```
59------------------------------------------------------------------------
61### `++hif:ab`
63Parse phonetic pair
65Parsing `++rule`. Parses an atom of odor `@pE`, a phrase of two bytes
66encoded phonetically.
68#### Accepts
70XX
72#### Produces
74An atom.
76#### Source
78```
79 ++ hif (boss 256 ;~(plug tip tiq (easy ~)))
80```
82#### Examples
84```
85 > (scan "doznec" hif:ab)
86 q=256
87 > (scan "pittyp" hif:ab)
88 q=48.626
89```
91------------------------------------------------------------------------
93### `++huf:ab`
95Parse two phonetic pairs
97Parsing `++rule`. Parses and unscrambles an atom of odor @pF, a phrase
98of two two-byte pairs that are encoded (and scrambled) phonetically.
100#### Accepts
102XX
104#### Produces
106An atom. XX
108#### Source
110```
111 ++ huf %+ cook
112 |=([a/@ b/@] (wred:un ~(zug mu ~(zag mu [a b]))))
113 ;~(plug hif ;~(pfix hep hif))
114```
116#### Examples
118```
119 > (scan "pittyp-pittyp" huf:ab)
120 328.203.557
121 > (scan "tasfyn-partyv" huf:ab)
122 65.792
123 > `@ux`(scan "tasfyn-partyv" huf:ab)
124 0x1.0100
125```
127------------------------------------------------------------------------
129### `++hyf:ab`
131Parse 8 phonetic bytes
133Parsing `++rule`. Parses an atom of odor @pG, a phrase of eight of
134phonetic bytes.
136#### Accepts
138An atom of odor `@pG`
140#### Produces
142An atom. XX
144#### Source
146```
147 ++ hyf (bass 0x1.0000.0000 ;~(plug huf ;~(pfix hep huf) (easy ~)))
148```
150#### Examples
152```
153 > (scan "sondel-forsut-tillyn-nillyt" hyf:ab)
154 q=365.637.097.828.335.095
155 > `@u`~sondel-forsut-tillyn-nillyt
156 365.637.097.828.335.095
157```
159------------------------------------------------------------------------
161### `++pev:ab`
163Parse \<= 5 base-32
165Parsing `++rule`. Parses up to five base-32 digits without a leading zero.
167#### Accepts
169Up to five @uv (base 64) digits.
171#### Produces
173An atom.
175#### Source
177```
178 ++ pev (bass 32 ;~(plug sev (stun [0 4] siv)))
179```
181#### Examples
183```
184 > (scan "a" pev:ab)
185 q=10
186 > (scan "290j" pev:ab)
187 q=74.771
188 > (scan "123456" pev:ab)
189 ! {1 6}
190 ! exit
191 > (scan "090j" pev:ab)
192 ~ <syntax error at [1 11]>
193```
195------------------------------------------------------------------------
197### `++pew:ab`
199Parse \<= 5 base-64
201Parsing `++rule`. Parses up to five base-64 digits without a leading zero.
203#### Accepts
205Up to five @uw (base 64) digits.
207#### Produces
211#### Source
213```
214 ++ pew (bass 64 ;~(plug sew (stun [0 4] siw)))
215```
217#### Examples
219```
220 > (scan "Q" pew:ab)
221 q=52
222 > (scan "aQ~9" pew:ab)
223 q=2.838.473
224 > `@`0waQ~9
225 2.838.473
226 > (scan "123456" pew:ab)
227 ! {1 6}
228 ! exit
229 > (scan "012345" pew:ab)
230 ! {1 1}
231 ! exit
232```
234------------------------------------------------------------------------
236### `++piv:ab`
238Parse 5 base-32
240Parsing `++rule`. Parses exactly five base-32 digits.
242#### Accepts
244#### Produces
246#### Source
248```
249 ++ piv (bass 32 (stun [5 5] siv))
250```
252#### Examples
254```
255 > (scan "10b3l" piv:ab)
256 q=1.059.957
257 > (scan "1" piv:ab)
258 ! {1 2}
259 ! exit
260```
262------------------------------------------------------------------------
264### `++piw:ab`
266Parse 5 base-64
268Parsing `++rule`. Parses exactly five base-64 digits.
270#### Accepts
272#### Produces
274#### Source
276```
277 ++ piw (bass 64 (stun [5 5] siw))
278```
280#### Examples
282```
283 > (scan "2C-pZ" piw:ab)
284 q=43.771.517
285 > (scan "2" piv:ab)
286 ! {1 2}
287 ! exit
288```
291------------------------------------------------------------------------
293### `++qeb:ab`
295Parse \<= 4 binary
297Parsing `++rule`. Parses a binary number of up to 4 digits in length without
298a leading zero.
300#### Accepts
302#### Produces
304#### Source
306```
307 ++ qeb (bass 2 ;~(plug seb (stun [0 3] sib)))
308```
310#### Examples
312```
313 > (scan "1" qeb:ab)
314 q=1
315 > (scan "101" qeb:ab)
316 q=5
317 > (scan "1111" qeb:ab)
318 q=15
319 > (scan "11111" qeb:ab)
320 ! {1 5}
321 ! exit
322 > (scan "01" qeb:ab)
323 ! {1 1}
324 ! exit
325```
327------------------------------------------------------------------------
329### `++qex:ab`
331Parse \<= 4 hex
333Parsing `++rule`. Parses a hexadecimal number of up to 4 digits in length
334without a leading zero.
336#### Accepts
338#### Produces
340#### Source
342```
343 ++ qex (bass 16 ;~(plug sex (stun [0 3] hit)))
344```
346#### Examples
348```
349 > (scan "ca" qex:ab)
350 q=202
351 > (scan "18ac" qex:ab)
352 q=6.316
353 > (scan "18acc" qex:ab)
354 ! {1 5}
355 ! exit
356 > (scan "08ac" qex:ab)
357 ! {1 1}
358 ! exit
359```
361------------------------------------------------------------------------
363### `++qib:ab`
365Parse 4 binary
367Parsing `++rule`. Parses exactly four binary digits.
369#### Accepts
371#### Produces
373#### Source
375```
376 ++ qib (bass 2 (stun [4 4] sib))
377```
379#### Examples
381```
382 > (scan "0001" qib:ab)
383 q=1
384 > (scan "0100" qib:ab)
385 q=4
386 > (scan "110" qib:ab)
387 ! {1 4}
388 ! exit
389```
391------------------------------------------------------------------------
393### `++qix:ab`
395Parse 4 hex
397Parsing `++rule`. Parses exactly four hexadecimal digits.
399#### Accepts
401#### Produces
403#### Source
405```
406 ++ qix (bass 16 (stun [4 4] six))
407```
409#### Examples
411```
412 > (scan "0100" qix:ab)
413 q=256
414 > (scan "10ff" qix:ab)
415 q=4.351
416 > (scan "0" qix:ab)
417 ! {1 2}
418 ! exit
419```
421------------------------------------------------------------------------
423### `++seb:ab`
425Parse 1
427Parsing `++rule`. Parses the number 1.
429#### Accepts
431#### Produces
433#### Source
435```
436 ++ seb (cold 1 (just '1'))
437```
439#### Examples
441```
442 > (scan "1" seb:ab)
443 1
444 > (scan "0" seb:ab)
445 ! ~zod/try/~2014.10.23..22.34.21..bfdd/:<[1 1].[1 18]>
446 ! {1 1}
447 > (scan "2" seb:ab)
448 ! ~zod/try/~2014.10.23..22.34.29..d399/:<[1 1].[1 18]>
449 ! {1 1}
450```
452------------------------------------------------------------------------
454### `++sed:ab`
456Parse decimal
458Parsing `++rule`. Parses a nonzero decimal digit.
460#### Accepts
462#### Produces
464#### Source
466```
467 ++ sed (cook |=(a/@ (sub a '0')) (shim '1' '9'))
468```
470#### Examples
472```
473 > (scan "5" sed:ab)
474 5
475 > (scan "0" sed:ab)
476 ! {1 1}
477 ! exit
478```
480------------------------------------------------------------------------
482### `++sev:ab`
484Parse base-32
486Parsing `++rule`. Parses a nonzero base-32 digit
488#### Accepts
490#### Produces
492#### Source
494```
495 ++ sev ;~(pose sed sov)
496```
498#### Examples
500```
501 > (scan "c" sev:ab)
502 12
503 ~zod/socialnet=> (scan "0" sev:ab)
504 ! {1 1}
505 ! exit
506```
508------------------------------------------------------------------------
510### `++sew:ab`
512Parse base-64
514Parsing `++rule`. Parses a nonzero base-64 digit
516#### Accepts
518#### Produces
520#### Source
522```
523 ++ sew ;~(pose sed sow)
524```
526#### Examples
528```
529 > (scan "M" sew:ab)
530 48
531 > (scan "0" sew:ab)
532 ! {1 1}
533 ! exit
534```
536------------------------------------------------------------------------
538### `++sex:ab`
540Parse hex
542Parsing `++rule`. Parses a nonzero hexadecimal digit.
544#### Accepts
546#### Produces
548#### Source
550```
551 ++ sex ;~(pose sed sox)
552```
554#### Examples
556```
557 > (scan "e" sex:ab)
558 14
559 > (scan "0" sex:ab)
560 ! {1 1}
561 ! exit
562```
564------------------------------------------------------------------------
566### `++sib:ab`
568Parse binary
570Parsing `++rule`. Parses a binary digit.
572#### Accepts
574#### Produces
576#### Source
578```
579 ++ sib (cook |=(a/@ (sub a '0')) (shim '0' '1'))
580```
582#### Examples
584```
585 > (scan "1" sib:ab)
586 1
587 ~zod/socialnet=> (scan "0" sib:ab)
588 0
589```
591------------------------------------------------------------------------
593### `++sid:ab`
595Parse decimal
597Parsing `++rule`. Parses a decimal digit.
599#### Accepts
601#### Produces
603#### Source
605```
606 ++ sid (cook |=(a/@ (sub a '0')) (shim '0' '9'))
607```
609#### Examples
611```
612 > (scan "5" sid:ab)
613 5
614```
616------------------------------------------------------------------------
618### `++siv:ab`
620Parse base-32
622Parsing `++rule`. Parses a base-32 digit.
624#### Accepts
626#### Produces
628#### Source
630```
631 ++ siv ;~(pose sid sov)
632```
634#### Examples
636```
637 > (scan "c" siv:ab)
638 12
639```
641------------------------------------------------------------------------
643### `++siw:ab`
645Parse base-64
647Parsing `++rule`. Parses a base-64 digit.
649#### Accepts
651#### Produces
653#### Source
655```
656 ++ siw ;~(pose sid sow)
657```
659#### Examples
661```
662 > (scan "M" siw:ab)
663 48
664```
666------------------------------------------------------------------------
668### `++six:ab`
670Parse hex
672Parsing `++rule`. Parses a hexadecimal digit.
674#### Accepts
676#### Produces
678#### Source
680```
681 ++ six ;~(pose sid sox)
682```
684#### Examples
686```
687 > (scan "e" six:ab)
688 14
689```
691------------------------------------------------------------------------
693### `++sov:ab`
695Parse base-32
697Parsing `++rule`. Parses a base-32 letter.
699#### Accepts
701#### Produces
703#### Source
705```
706 ++ sov (cook |=(a/@ (sub a 87)) (shim 'a' 'v'))
707```
709#### Examples
711```
712 > (scan "c" sov:ab)
713 12
714```
715------------------------------------------------------------------------
717### `++sow:ab`
719Parse base-64
721Parsing `++rule`. Parses a base-64 letter/symbol.
723#### Accepts
725#### Produces
727#### Source
729```
730 ++ sow ;~ pose
731 (cook |=(a/@ (sub a 87)) (shim 'a' 'z'))
732 (cook |=(a/@ (sub a 29)) (shim 'A' 'Z'))
733 (cold 62 (just '-'))
734 (cold 63 (just '~'))
735 ==
736```
738#### Examples
740```
741 > (scan "M" sow:ab)
742 48
743```
745------------------------------------------------------------------------
747### `++sox:ab`
749Parse hex letter
751Parsing `++rule`. Parses a hexadecimal letter.
753#### Accepts
755#### Produces
757#### Source
759```
760 ++ sox (cook |=(a/@ (sub a 87)) (shim 'a' 'f'))
761```
763#### Examples
765```
766 > (scan "e" sox:ab)
767 14
768```
770------------------------------------------------------------------------
772### `++ted:ab`
774Parse \<= 3 decimal
776Parsing `++rule`. Parses a decimal number of up to 3 digits without a
777leading zero.
779#### Accepts
781#### Produces
783#### Source
785```
786 ++ ted (bass 10 ;~(plug sed (stun [0 2] sid)))
787```
789#### Examples
791```
792 > (scan "21" ted:ab)
793 q=21
794 > (scan "214" ted:ab)
795 q=214
796 > (scan "2140" ted:ab)
797 {1 4}
798 > (scan "0" ted:ab)
799 ! {1 1}
800 ! exit
801```
803------------------------------------------------------------------------
805### `++tip:ab`
807Leading phonetic byte
809Parsing `++rule`. Parses the leading phonetic byte, which represents a
810syllable.
812#### Accepts
814#### Produces
816#### Source
818```
819 ++ tip (sear |=(a/@ (ins:po a)) til)
820```
822#### Examples
824```
825 > (scan "doz" tip:ab)
826 0
828 > (scan "pit" tip:ab)
829 242
830```
832------------------------------------------------------------------------
834### `++tiq:ab`
836Trailing phonetic syllable
838Parsing `++rule`. Parses the trailing phonetic byte, which represents a
839syllable.
841#### Accepts
843#### Produces
845#### Source
847```
848 ++ tiq (sear |=(a/@ (ind:po a)) til)
850```
851#### Examples
853```
854 > (scan "zod" tiq:ab)
855 0
856 > (scan "nec" tiq:ab)
857 1
858```
860------------------------------------------------------------------------
862### `++tid:ab`
864Parse 3 decimal digits
866Parsing `++rule`. Parses exactly three decimal digits.
868#### Accepts
870#### Produces
872#### Source
874```
875 ++ tid (bass 10 (stun [3 3] sid))
876```
878#### Examples
880```
881 > (scan "013" tid:ab)
882 q=13
883 > (scan "01" tid:ab)
884 ! {1 3}
885 ! exit
886```
888------------------------------------------------------------------------
890### `++til:ab`
892Parse 3 lowercase
894Parsing `++rule`. Parses exactly three lowercase letters.
896#### Accepts
898#### Produces
900#### Source
902```
903 ++ til (boss 256 (stun [3 3] low))
904```
906#### Examples
908```
909 > (scan "mer" til:ab)
910 q=7.497.069
911 > `@t`(scan "mer" til:ab)
912 'mer'
913 > (scan "me" til:ab)
914 ! {1 3}
915 ! exit
916```
918------------------------------------------------------------------------
920### `++urs:ab`
922Parse span characters
924Parsing rule. Parses characters from an atom of the span odor `@ta`.
926#### Accepts
928#### Produces
930#### Source
932```
933 ++ urs %+ cook
934 |=(a/tape (rap 3 ^-((list @) a)))
935 (star ;~(pose nud low hep dot sig cab))
936```
938#### Examples
940```
941 > `@ta`(scan "asa-lom_tak" urs:ab)
942 ~.asa-lom_tak
943 > `@t`(scan "asa-lom_tak" urs:ab)
944 'asa-lom_tak'
945```
947------------------------------------------------------------------------
949### `++urt:ab`
951Parse non-`_` span
953Parsing rule. Parses all characters of the span odor `@ta` except
954for cab, `_`.
956#### Accepts
958#### Produces
960#### Source
962```
963 ++ urt %+ cook
964 |=(a/tape (rap 3 ^-((list @) a)))
965 (star ;~(pose nud low hep dot sig))
966```
968#### Examples
970```
971 > `@t`(scan "asa-lom.t0k" urt:ab)
972 'asa-lom.t0k'
973```
975------------------------------------------------------------------------
977### `++voy:ab`
979Parse bas, soq, or bix
981Parsing rule. Parses an escaped backslash, single quote, or hex pair
982byte.
984#### Accepts
986#### Produces
988#### Source
990```
991 ++ voy ;~(pfix bas ;~(pose bas soq bix))
992```
994#### Examples
996```
997 > (scan "\\0a" voy:ab)
998 q=10
999 > (scan "\\'" voy:ab)
1000 q=39
1001```
1003------------------------------------------------------------------------
1005### `++ag`
1007Top-level atom parser engine
1009A core containing top-level atom parsers.
1011#### Accepts
1013#### Produces
1015#### Source
1017```
1018 ++ ag
1019 |%
1020```
1022#### Examples
1024```
1025 > ag
1026 <14.vpu 414.mof 100.xkc 1.ypj %164>
1027```
1029------------------------------------------------------------------------
1031### `++ape:ag`
1033Parse 0 or rule
1035Parser modifier. Parses 0 or the sample rule `fel`.
1037#### Accepts
1039#### Produces
1041`fel` is a `rule`.
1043#### Source
1045```
1046 ++ ape |*(fel/rule ;~(pose (cold 0 (just '0')) fel))
1047```
1049#### Examples
1051```
1052 > (scan "202" (star (ape:ag (cold 2 (just '2')))))
1053 ~[2 0 2]
1054```
1056------------------------------------------------------------------------
1058### `++bay:ag`
1060Parses binary number
1062Parsing rule. Parses a binary number without a leading zero.
1064#### Accepts
1066#### Produces
1068#### Source
1070```
1071 ++ bay (ape (bass 16 ;~(plug qeb:ab (star ;~(pfix dog qib:ab)))))
1072```
1074#### Examples
1076```
1077 > (scan "10.0110" bay:ag)
1078 q=38
1079```
1081------------------------------------------------------------------------
1083### `++bip:ag`
1085Parse IPv6
1087Parsing rule. Parses a `@is`, an IPv6 address.
1089#### Accepts
1091#### Produces
1093#### Source
1095```
1096 ++ bip =+ tod=(ape qex:ab)
1097 (bass 0x1.0000 ;~(plug tod (stun [7 7] ;~(pfix dog tod))))
1098```
1100#### Examples
1102```
1103 > (scan "0.0.ea.3e6c.0.0.0.0" bip:ag)
1104 q=283.183.420.760.121.105.516.068.864
1105 > `@is`(scan "0.0.ea.3e6c.0.0.0.0" bip:ag)
1106 .0.0.ea.3e6c.0.0.0.0
1107```
1109------------------------------------------------------------------------
1111### `++dem:ag`
1113Parse decimal with dots
1115Parsing rule. Parses a decimal number that includes dot separators.
1117#### Accepts
1119#### Produces
1121#### Source
1123```
1124 ++ dem (ape (bass 1.000 ;~(plug ted:ab (star ;~(pfix dog tid:ab)))))
1125```
1127#### Examples
1129```
1130 > (scan "52" dem:ag)
1131 q=52
1132 > (scan "13.507" dem:ag)
1133 q=13.507
1134```
1136------------------------------------------------------------------------
1138### `++dim:ag`
1140Parse decimal number
1142Parsing rule. Parses a decimal number without a leading zero.
1144#### Accepts
1146#### Produces
1148#### Source
1150```
1151 ++ dim (ape (bass 10 ;~(plug sed:ab (star sid:ab))))
1152```
1154#### Examples
1156```
1157 > (scan "52" dim:ag)
1158 q=52
1159 > (scan "013507" dim:ag)
1160 ! {1 2}
1161 ! exit
1162```
1164------------------------------------------------------------------------
1166### `++dum:ag`
1168Parse decimal with leading `0`
1170Parsing rule. Parses a decmial number with leading zeroes.
1172#### Accepts
1174#### Produces
1176#### Source
1178```
1179 ++ dum (bass 10 (plus sid:ab))
1180```
1182#### Examples
1184```
1185 > (scan "52" dum:ag)
1186 q=52
1187 > (scan "0000052" dum:ag)
1188 q=52
1189 > (scan "13507" dim:ag)
1190 q=13.507
1191```
1193------------------------------------------------------------------------
1195### `++fed:ag`
1197Parse phonetic base
1199Parsing rule. Parses an atom of odor `@p`, the phonetic base.
1201#### Accepts
1203#### Produces
1205#### Source
1207```
1208 ++ fed ;~ pose
1209 (bass 0x1.0000.0000.0000.0000 (most doh hyf:ab))
1210 huf:ab
1211 hif:ab
1212 tiq:ab
1213 ==
1214```
1216#### Examples
1218```
1219 > (scan "zod" fed:ag)
1221 > (scan "nec" fed:ag)
1223 > (scan "sondel" fed:ag)
1224 9.636
1225 > ~tillyn-nillyt
1226 ~tillyn-nillyt
1227 > (scan "tillyn-nillyt" fed:ag)
1228 3.569.565.175
1229 > (scan "tillyn-nillyt-tasfyn-partyv" fed:ag)
1230 15.331.165.687.565.582.592
1231 > (scan "tillyn-nillyt-tasfyn-partyv--novweb-talrud-talmud-sonfyr" fed:ag)
1232 282.810.089.790.159.633.869.501.053.313.363.681.181
1233```
1235------------------------------------------------------------------------
1237### `++hex:ag`
1239Parse hex
1241Parsing rule. Parses a hexadecimal number
1243#### Accepts
1245#### Produces
1247#### Source
1249```
1250 ++ hex (ape (bass 0x1.0000 ;~(plug qex:ab (star ;~(pfix dog qix:ab)))))
1251```
1253#### Examples
1255```
1256 > (scan "4" hex:ag)
1257 q=4
1258 > (scan "1a" hex:ag)
1259 q=26
1260 > (scan "3.ac8d" hex:ag)
1261 q=240.781
1262 > `@ux`(scan "3.ac8d" hex:ag)
1263 0x3.ac8d
1264```
1266------------------------------------------------------------------------
1268### `++lip:ag`
1270Parse IPv4 address
1272Parsing rule. Parses an IPv4 address.
1274#### Accepts
1276#### Produces
1278#### Source
1280```
1281 ++ lip =+ tod=(ape ted:ab)
1282 (bass 256 ;~(plug tod (stun [3 3] ;~(pfix dog tod))))
1283```
1285#### Examples
1287```
1288 > (scan "127.0.0.1" lip:ag)
1289 q=2.130.706.433
1290 > `@if`(scan "127.0.0.1" lip:ag)
1291 .127.0.0.1
1292 > `@if`(scan "8.8.8.8" lip:ag)
1293 .8.8.8.8
1294```
1296------------------------------------------------------------------------
1298### `++viz:ag`
1300Parse Base-32 with dots
1302Parsing rule. Parses a Base-32 number with dot separators.
1304#### Accepts
1306#### Produces
1308#### Source
1310```
1311 ++ viz (ape (bass 0x200.0000 ;~(plug pev:ab (star ;~(pfix dog piv:ab)))))
1312```
1314#### Examples
1316```
1317 > (scan "e2.ol4pm" viz:ag)
1318 q=15.125.353.270
1319```
1321------------------------------------------------------------------------
1323### `++vum:ag`
1325Parse base-32 string
1327Parsing rule. Parses a raw base-32 string.
1329#### Accepts
1331#### Produces
1333#### Source
1335```
1336 ++ vum (bass 32 (plus siv:ab))
1337```
1339#### Examples
1341```
1342 > (scan "e2ol4pm" vum:ag)
1343 q=15.125.353.270
1344```
1346------------------------------------------------------------------------
1348### `++wiz:ag`
1350Parse base-64
1352Parsing rule. Parses a base-64 number.
1354#### Accepts
1356#### Produces
1358#### Source
1360```
1361 ++ wiz (ape (bass 0x4000.0000 ;~(plug pew:ab (star ;~(pfix dog piw:ab)))))
1362 --
1363 ::
1364```
1366#### Examples
1368```
1369 > (scan "e2O.l4Xpm" wiz:ag)
1370 q=61.764.130.813.526
1371```
1373---
1374### `++mu`
1376Core used to scramble 16-bit atoms
1378A door that contains arms that are used to scramble two atoms, `top`
1379and `bot`. Used especially in the phonetic base to disguise the
1380relationship between a destroyer and its cruiser.
1382#### Accepts
1384#### Produces
1386`bot` is an atom.
1388`top` is an atom.
1390#### Source
1392```
1393 ++ mu
1394 |_ [top/@ bot/@]
1395```
1397#### Examples
1399```
1400 > ~(. mu 0x20e5 0x5901)
1401 <3.sjm [[@ux @ux] <414.hhh 100.xkc 1.ypj %164>]>
1402```
1404------------------------------------------------------------------------
1406### `++zag:mu`
1408Add bottom into top
1410Produces the cell of `top` and `bot` with `top` scrambled to the result
1411of adding `bot` to `top` modulo 16. Used to scramble the name of a
1412destroyer.
1414#### Accepts
1416#### Produces
1418`bot` is an atom.
1420`top` is an atom.
1422#### Source
1424```
1425 ++ zag [p=(end 4 1 (add top bot)) q=bot]
1426```
1428#### Examples
1430```
1431 > `[@ux @ux]`~(zag mu 0x20e0 0x201)
1432 [0x22e1 0x201]
1433```
1435------------------------------------------------------------------------
1437### `++zig:mu`
1439Subtract bottom from top
1441The inverse of `++zag`. Produces the cell of `top` and `bot` with
1442`top` unscrambled. The unscrambled `top` is the sum of the sample `top`
1443and the 16-bit complement of `bot`. Used to unscramble the name of the
1444destroyer.
1446#### Accepts
1448#### Produces
1450`bot` is an atom.
1452`top` is an atom.
1454#### Source
1456```
1457 ++ zig [p=(end 4 1 (add top (sub 0x1.0000 bot))) q=bot]
1458```
1460#### Examples
1462```
1463 > `[@ux @ux]`~(zig mu 0x2f46 0x1042)
1464 [0x1f04 0x1042]
1465```
1467------------------------------------------------------------------------
1469### `++zug:mu`
1471Concatenate into atom
1473Produces the concatenation of `top` and `bot`. Used to assemble a
1474destroyer name.
1476#### Accepts
1478#### Produces
1480`bot` is an atom.
1482`top` is an atom.
1484#### Source
1486```
1487 ++ zug (mix (lsh 4 1 top) bot)
1488```
1490#### Examples
1492```
1493 > `@ux`~(zug mu 0x10e1 0xfa)
1494 0x10e1.00fa
1495```
1498---
1499### `++ne`
1501Digit rendering engine
1503A door containing arms that render digits at bases 10, 16, 32, and
150464.
1506#### Accepts
1508#### Produces
1510`tig` is an `atom`.
1512#### Source
1514```
1515 ++ ne
1516 |_ tig/@
1517```
1519#### Examples
1521```
1522 > ~(. ne 20)
1523 <4.gut [@ud <414.hhh 100.xkc 1.ypj %164>]>
1524```
1526------------------------------------------------------------------------
1528### `++d:ne`
1530Render decimal
1532Renders a decimal digit as an atom of an ACII byte value.
1534#### Accepts
1536#### Produces
1538`tig` is an `atom`.
1540#### Source
1542```
1543 ++ d (add tig '0')
1544```
1546#### Examples
1548```
1549 > `@t`~(d ne 7)
1550 '7'
1552```
1554------------------------------------------------------------------------
1556### `++x:ne`
1558Render hex
1560Renders a hexadecimal digit as an atom of an ASCII byte value.
1562#### Accepts
1564#### Produces
1566`tig` is an `atom`.
1568#### Source
1570```
1571 ++ x ?:((gte tig 10) (add tig 87) d)
1572```
1574#### Examples
1576```
1577 > `@t`~(x ne 7)
1578 '7'
1580 > `@t`~(x ne 14)
1581 'e'
1582```
1584------------------------------------------------------------------------
1586### `++v:ne`
1588Render base-32
1590Renders a base-32 digit as an atom of an ASCII byte value.
1592#### Accepts
1594#### Produces
1596#### Source
1598```
1599 ++ v ?:((gte tig 10) (add tig 87) d)
1600```
1602#### Examples
1604```
1605 > `@t`~(v ne 7)
1606 '7'
1607 > `@t`~(v ne 14)
1608 'e'
1609 > `@t`~(v ne 25)
1610 'p'
1611```
1613------------------------------------------------------------------------
1615### `++w:ne`
1617Render base-64
1619Renders a base-64 digit as an atom of an ASCII byte value.
1621#### Accepts
1623#### Produces
1625`tig` is an `atom`.
1627#### Source
1629```
1630 ++ w ?:(=(tig 63) '~' ?:(=(tig 62) '-' ?:((gte tig 36) (add tig 29) x)))
1631 --
1632 ::
1633```
1635#### Examples
1637```
1638 > `@t`~(w ne 7)
1639 '7'
1640 > `@t`~(w ne 14)
1641 'e'
1642 > `@t`~(w ne 25)
1643 'p'
1644 > `@t`~(w ne 52)
1645 'Q'
1646 > `@t`~(w ne 61)
1647 'Z'
1648 > `@t`~(w ne 63)
1649 '~'
1650 > `@t`~(w ne 62)
1651 '-'
1652```
1655---