Generate word combinations like in xkcd.com/936

Marcus Rohrmoser f93dbc45d9 'xkcd936.opam' löschen %!s(int64=3) %!d(string=hai) anos
bin f93dbc45d9 'xkcd936.opam' löschen %!s(int64=2) %!d(string=hai) anos
lib 2feb8d5225 more elegant. %!s(int64=4) %!d(string=hai) anos
test 2feb8d5225 more elegant. %!s(int64=4) %!d(string=hai) anos
.gitignore 354f0cbb41 initial %!s(int64=4) %!d(string=hai) anos
.ocamlformat 2feb8d5225 more elegant. %!s(int64=4) %!d(string=hai) anos
Makefile 354f0cbb41 initial %!s(int64=4) %!d(string=hai) anos
README.md 550395a798 'README.md' ändern %!s(int64=3) %!d(string=hai) anos
deploy.sh f93dbc45d9 'xkcd936.opam' löschen %!s(int64=2) %!d(string=hai) anos
doap.rdf 704cf0be01 Add a doap. %!s(int64=4) %!d(string=hai) anos

README.md

Generate random word combinations from a linefeed-separated list words.txt like e.g. from https://codeberg.org/davidak/wortliste

$ ./xkcd936
Kartoffelkäferbefall-Altersteilzeitregelung-auseinanderbersten-Gezücht

If that sounds odd, see https://xkcd.com/936/

Caution: this approach has a statistical bias toward longer words but avoids to actually read the wordlist (O(1), sic!), so it may be as big as you like.

Similar