Jump to content

Three word location: Difference between revisions

→‎{{header|Raku}}: Add some randomness, use much more of the synthetics range
(→‎{{header|Raku}}: Add a Raku example)
(→‎{{header|Raku}}: Add some randomness, use much more of the synthetics range)
Line 285:
Some letters with overlapping pronunciation are removed: c: confusable with k or s, g: overlaps with j, x: overlaps with z, q: just because, v: similar to w and we have way more than enough characters anyway.
 
As it is, with this alphabet we can form 512000 different 6 character "words"; 28126 is a drop in the bucket. (WeTo endspread upout withthe anthe awfulwords lota bit, add a bit of "words"randomness. 28126 fits into 512000 18 and a bit times. Add a random multiple of 28126 to the encoder then modulus it back out on decode. Will get different results startingon withdifferent b)runs.
 
We don't bother to pre-calculate and store themthe thoughwords, just generate them on the fly.
 
Official pronunciation guide:
Line 302:
my $exp = @synth.elems;
 
sub synth (Int $v) { @synth[($v + (^18).pick * 28126).polymod($exp xx *).reverse || 0].join }
 
sub thnys (Str $v) { (sum %htnys{$v.comb(2).reverse} Z* 1, $exp, $exp**2) % 28126 }
 
 
Line 320:
 
# TESTING
for 51.4337, -0.2141, # Wimbledon
21.2596,-157.8117, # Diamond Head crater
-55.9652, -67.2256, # Monumento Cabo De Hornos
Line 332:
}</lang>
{{out}}
;Run 1
<pre>Coordinates: 51.4337, -0.2141
To 3-word: bomehu bupa beyaboyotema fohujo mibire
And back: 51.4337, -0.2141
 
Coordinates: 21.2596, -157.8117
To 3-word: bisiju tufo belefejusafu pufemu nazaka
And back: 21.2596, -157.8117
 
Coordinates: -55.9652, -67.2256
To 3-word: wemi biliwo bifalimazuda yisobu denezo
And back: -55.9652, -67.2256
 
Coordinates: 59.3586, 24.7447
To 3-word: boresi sufi bimiyeselapu najoke zifuro
And back: 59.3586, 24.7447
 
Coordinates: 29.2021, 81.5324
To 3-word: biyiwa wuha bepokojuyasa nutuza likula
And back: 29.2021, 81.5324
 
Coordinates: 28.3852, -81.5638
To 3-word: biyehi betenu heninimale josulu tesope
And back: 28.3852, -81.5638</pre>
;Run 2 (same coordinates)
<pre>Coordinates: 51.4337, -0.2141
To 3-word: tapesi lawapi jowiyo
And back: 51.4337, -0.2141
 
Coordinates: 21.2596, -157.8117
To 3-word: worayu dupika datisi
And back: 21.2596, -157.8117
 
Coordinates: -55.9652, -67.2256
To 3-word: zanohu wokemo denezo
And back: -55.9652, -67.2256
 
Coordinates: 59.3586, 24.7447
To 3-word: hewema lenafu jabuha
And back: 59.3586, 24.7447
 
Coordinates: 29.2021, 81.5324
To 3-word: zipupi wuha yeyonu
And back: 29.2021, 81.5324
 
Coordinates: 28.3852, -81.5638
To 3-word: lorihu pasiju yaneso
And back: 28.3852, -81.5638</pre>
 
=={{header|Symsyn}}==
10,339

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.