on 883cb21 help sign in
221 lines 4.3 kB history raw
1+++
2title = "4a: Exotic Bases"
3weight = 28
4template = "doc.html"
5+++
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---
58### `++ind:po`
60Parse suffix
62Produces the byte of the right-hand syllable `a`.
64#### Accepts
66`a` is an atom.
68#### Produces
70A `unit`.
72#### Source
74```hoon
75 ++ ind ~/ %ind
76 |= a=@tas
77 =+ b=0
78 |- ^- (unit @)
79 ?:(=(256 b) ~ ?:(=(a (tod b)) [~ b] $(b +(b))))
80```
82#### Examples
84```
85 > (ind:po 'zod')
86 [~ 0]
88 > (ind:po 'zam')
89 ~
91 > (ind:po 'del')
92 [~ 37]
93```
95---
97### `++ins:po`
99Parse prefix
101Produces the byte of the left-hand phonetic syllable `a`.
103#### Accepts
105`a` is an atom.
107#### Produces
109A `unit` of an atom.
111#### Source
113```hoon
114 ++ ins ~/ %ins
115 |= a=@tas
116 =+ b=0
117 |- ^- (unit @)
118 ?:(=(256 b) ~ ?:(=(a (tos b)) [~ b] $(b +(b))))
119```
121#### Examples
123```
124 > (ins:po 'mar')
125 [~ 1]
127 > (ins:po 'son')
128 [~ 164]
130 > (ins:po 'pit')
131 [~ 242]
133 > (ins:po 'pok')
134 ~
135```
137---
139### `++tod:po`
141Fetch suffix
143Produces the phonetic suffix syllable from index `a` within `dex` as an atom.
145#### Accepts
147`a` is an atom
149#### Produces
151An atom.
153#### Source
155```hoon
156 ++ tod ~/ %tod
157 |=(a=@ ?>((lth a 256) (cut 3 [(mul 3 a) 3] dex)))
158```
160#### Examples
162```
163 > `@t`(tod:po 1)
164 'nec'
166 > `@t`(tod:po 98)
167 'dec'
169 > `@t`(tod:po 0)
170 'zod'
172 > `@t`(tod:po 150)
173 'ryg'
175 > `@t`(tod:po 255)
176 'fes'
178 > `@t`(tod:po 256)
179 ! exit
180```
182---
184### `++tos:po`
186Fetch prefix
188Produces the phonetic prefix syllable from index `a` within `sis` as an atom.
190#### Accepts
192`a` is an atom.
194#### Produces
196An atom.
198#### Source
200```hoon
201 ++ tos ~/ %tos
202 |=(a=@ ?>((lth a 256) (cut 3 [(mul 3 a) 3] sis)))
203```
205#### Examples
207```
208 > `@t`(tos:po 0)
209 'doz'
211 > `@t`(tos:po 120)
212 'fab'
214 > `@t`(tos:po 43)
215 'pid'
217 > `@t`(tos:po 253)
218 'mat'
219```
221---