on f3ca521 help sign in
217 lines 4.3 kB history raw
1+++
2title = "4a: Exotic Bases"
3weight = 28
4template = "doc.html"
5aliases = ["/docs/reference/library/4a"]
6+++
7### `++po`
9Phonetic base
11Container core for providing phonetic syllables and name generators for the
12Urbit naming system. The two faces, `sis` and `dex`, are available to the
13contained arms.
15#### Source
17```hoon
18 ~/ %po
19 =+ :- ^= sis :: prefix syllables
20 'dozmarbinwansamlitsighidfidlissogdirwacsabwissib\
21 /rigsoldopmodfoglidhopdardorlorhodfolrintogsilmir\
22 /holpaslacrovlivdalsatlibtabhanticpidtorbolfosdot\
23 /losdilforpilramtirwintadbicdifrocwidbisdasmidlop\
24 /rilnardapmolsanlocnovsitnidtipsicropwitnatpanmin\
25 /ritpodmottamtolsavposnapnopsomfinfonbanmorworsip\
26 /ronnorbotwicsocwatdolmagpicdavbidbaltimtasmallig\
27 /sivtagpadsaldivdactansidfabtarmonranniswolmispal\
28 /lasdismaprabtobrollatlonnodnavfignomnibpagsopral\
29 /bilhaddocridmocpacravripfaltodtiltinhapmicfanpat\
30 /taclabmogsimsonpinlomrictapfirhasbosbatpochactid\
31 /havsaplindibhosdabbitbarracparloddosbortochilmac\
32 /tomdigfilfasmithobharmighinradmashalraglagfadtop\
33 /mophabnilnosmilfopfamdatnoldinhatnacrisfotribhoc\
34 /nimlarfitwalrapsarnalmoslandondanladdovrivbacpol\
35 /laptalpitnambonrostonfodponsovnocsorlavmatmipfip'
36 ^= dex :: suffix syllables
37 'zodnecbudwessevpersutletfulpensytdurwepserwylsun\
38 /rypsyxdyrnuphebpeglupdepdysputlughecryttyvsydnex\
39 /lunmeplutseppesdelsulpedtemledtulmetwenbynhexfeb\
40 /pyldulhetmevruttylwydtepbesdexsefwycburderneppur\
41 /rysrebdennutsubpetrulsynregtydsupsemwynrecmegnet\
42 /secmulnymtevwebsummutnyxrextebfushepbenmuswyxsym\
43 /selrucdecwexsyrwetdylmynmesdetbetbeltuxtugmyrpel\
44 /syptermebsetdutdegtexsurfeltudnuxruxrenwytnubmed\
45 /lytdusnebrumtynseglyxpunresredfunrevrefmectedrus\
46 /bexlebduxrynnumpyxrygryxfeptyrtustyclegnemfermer\
47 /tenlusnussyltecmexpubrymtucfyllepdebbermughuttun\
48 /bylsudpemdevlurdefbusbeprunmelpexdytbyttyplevmyl\
49 /wedducfurfexnulluclennerlexrupnedlecrydlydfenwel\
50 /nydhusrelrudneshesfetdesretdunlernyrsebhulryllud\
51 /remlysfynwerrycsugnysnyllyndyndemluxfedsedbecmun\
52 /lyrtesmudnytbyrsenwegfyrmurtelreptegpecnelnevfes'
53 |%
54```
56---
57### `++ind:po`
59Parse suffix
61Produces the byte of the right-hand syllable `a`.
63#### Accepts
65`a` is an atom.
67#### Produces
69A `unit`.
71#### Source
73```hoon
74 ++ ind ~/ %ind
75 |= a=@tas
76 =+ b=0
77 |- ^- (unit @)
78 ?:(=(256 b) ~ ?:(=(a (tod b)) [~ b] $(b +(b))))
79```
81#### Examples
83```
84 > (ind:po 'zod')
85 [~ u=0]
87 > (ind:po 'zam')
88 ~
90 > (ind:po 'del')
91 [~ u=37]
92```
94---
95### `++ins:po`
97Parse prefix
99Produces the byte of the left-hand phonetic syllable `a`.
101#### Accepts
103`a` is an atom.
105#### Produces
107A `unit` of an atom.
109#### Source
111```hoon
112 ++ ins ~/ %ins
113 |= a=@tas
114 =+ b=0
115 |- ^- (unit @)
116 ?:(=(256 b) ~ ?:(=(a (tos b)) [~ b] $(b +(b))))
117```
119#### Examples
121```
122 > (ins:po 'mar')
123 [~ u=1]
125 > (ins:po 'son')
126 [~ u=164]
128 > (ins:po 'pit')
129 [~ u=242]
131 > (ins:po 'pok')
132 ~
133```
135---
136### `++tod:po`
138Fetch suffix
140Produces the phonetic suffix syllable from index `a` within `dex` as an atom.
142#### Accepts
144`a` is an atom
146#### Produces
148An atom.
150#### Source
152```hoon
153 ++ tod ~/ %tod
154 |=(a=@ ?>((lth a 256) (cut 3 [(mul 3 a) 3] dex)))
155```
157#### Examples
159```
160 > `@t`(tod:po 1)
161 'nec'
163 > `@t`(tod:po 98)
164 'dec'
166 > `@t`(tod:po 0)
167 'zod'
169 > `@t`(tod:po 150)
170 'ryg'
172 > `@t`(tod:po 255)
173 'fes'
175 > `@t`(tod:po 256)
176 ! exit
177```
179---
180### `++tos:po`
182Fetch prefix
184Produces the phonetic prefix syllable from index `a` within `sis` as an atom.
186#### Accepts
188`a` is an atom.
190#### Produces
192An atom.
194#### Source
196```hoon
197 ++ tos ~/ %tos
198 |=(a=@ ?>((lth a 256) (cut 3 [(mul 3 a) 3] sis)))
199```
201#### Examples
203```
204 > `@t`(tos:po 0)
205 'doz'
207 > `@t`(tos:po 120)
208 'fab'
210 > `@t`(tos:po 43)
211 'pid'
213 > `@t`(tos:po 253)
214 'mat'
215```
217---