Solutions to https://i18n-puzzles.com in goal
- Scilab 100%
|
|
||
|---|---|---|
| d | ||
| goal.diff | ||
| ip.goal | ||
| readme.txt | ||
solutions to "Internationalization Puzzles" (https://i18n-puzzles.com) in
ip.goal written in the k dialect goal (https://codeberg.org/anaseto/goal)
extensions to goal in goal.diff puzzle(s)
cmd/goal/full.go bcr[S] bcrypt hash S with default cost
bcr[i;S] bcrypt hash S with cost i
bcr[s;S] compare hash s with passwords S 10
nfc[S] nfc normalize S 10
swl[s;S] sort S with locale s 12
data in folder d
[ivx]+.t[sx]t (test) input *
xvi.s.t[sx]t solved state of the game 16
https://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/PC/CP437.TXT 16
https://www.unicode.org/Public/UNIDATA/UnicodeData.txt 8,10
https://www.unicode.org/Public/MAPPINGS/ISO8859/8859-1.TXT 13
20(18[cg]|21b|23d) folders with resp. versions of time zone db 19
notes
- UnicodeData.txt fields: https://en.wikipedia.org/wiki/Unicode_character_property
- puzzle 13 line 40: removing 00 bytes with `0 1^` (shorter than `(,0)^`) converts
from utf16 to iso8859-1 assuming only characters from the latter, which exactly
contains the first 256 unicode points: `~/"i"$2#+!rx/^#/^=-read"8859-1.TXT"`
converting to utf8 with `(x;195,x-64)x>222` works assuming only lower case
- puzzle 16: no general solution; play game "by hand" then count rotations
- puzzle 17: dictionary `m` contains the number of bytes missing (0-3) by the
number of leading 1s in the byte representation of the list of trailing bytes
the height of puzzle pieces is divisible by 4 which allows to represent the
tabs and slots by decoding base 4 (line 60)
the solution (putting in the pieces one by one) still feels too complicated
- puzzle 19: tz db files for the different versions compiled in d folder with:
for v in 2018c 2018g 2021b 2023d; do
curl -O https://data.iana.org/time-zones/releases/tzdata$v.tar.gz
mkdir tzdata$v
tar -xvz -C tzdata$v -f tzdata$v.tar.gz
cd tzdata$v
ls | awk -F. "NF==1 && /^[ac-u].*[^s]$/" | xargs -I % zic -d ../$v %
cd ..
rm -r tzdata$v*
done
- puzzle 20: The last (couple of) decorative character(s) are still not decoded
correctly; doesn't affect receiving the solution