frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Open in hackernews

Show HN: Word-finder/anagram solver web app for mobile browsers

https://wanderinghorse.net/gaming/paperback/words.html
2•sgbeal•1h ago
This client-side word-finder/anagram solver web app is a side-effect of my recent work on a web app for playing the Paperback word-spelling tabletop game[^1]. After proving its worth embedded in that client, the dictionary was refactored into something almost standalone and now lives at this URL.

Its UI is intended specifically for mobile devices, especially phones - it looks pretty wonky on a full-sized desktop window (and that's okay because that's not where it's intended to be used).

This app was specifically written for use with Paperback but it should be usable with just about any English-language word-spelling/solving game. It supports wildcards and Paperback's multi-letter-cards.

It's fast. Had i not seen with my own eyes that it can scan 150k English words in about 2ms in JS, i'd have been hesitant to believe it. Speaking of...

This app was hand-written. The underlying dictionary structures and algorithms (in both C and JS) were heavily LLM-assisted but have overwhelmingly more human-written code than LLM code. The underlying algorithms, well-documented anagram-solving solutions, were unknown to me until an LLM suggested them for this purpose. The LLM sketched them out and the human filled them in. A separate LLM context created the "typewriter button" CSS styling upon request. What remains was hand-coded in emacs.

The dictionary supports German[^2], but my current German dictionary is just so huge (685k words, 38MB) that i cannot in good conscience host it on my web server or feed it to a JS engine. Once i've got a better-curated list there will be an option to load it in German. (My German copy of Paperback arrived a few days ago, providing the motivation for that support.)

Happy Spelling!

[^1]: <https://wanderinghorse.net/gaming/paperback/>

[^2]: In principle it supports any language which can fit into ISO-8859-1/Latin-1 encoding and which requires only 6 or fewer letters beyond A..Z, but i've no motivation to add any beyond English and German. The 26+6 limit comes from what makes this dictionary performant: it builds masks of which letters a word contains in order to very quickly rule out definite negatives, and we've only got 32 bits in that mask.