Skip to main content

Base-wordle

What the world(le) needs is another word-based encoding system for binary data. In this case, a 9-bit encoding system, with one of 512 5 letter words standing in for each set of 9 bits... mostly.

9 bits may seem crazy, but there are a few advantages:

  1. Every word can be five letters long, so the encoded string length has a stepwise linear relationship to the source data.
  2. Every word can be uniquely pronounceable, such that there is no ambiguity when restricted to the list of common 5 letter English words.
  3. Every word can have its accent on the first syllable, to make reading out loud easier for everyone.
  4. Base64 is a very common 6 bit format, and 6 and 9 have a least common multiple of 18, so it is fairly easy to alternate and convert between base64 and base-wordle.

The words are built on prior art; mostly, this is the BIP39 English wordlist, filtered to 5 letter words, then filtered again for various words that don't fit the above restrictions or that I felt like dropping for no particular reason. Since this leaves less than 512 words, I added some four letter words from the BIPS wordlist that have an adjectival version ending in y.

Why would I actually use this?

There are a lot of cases where we want to represent something determinstically and uniquely. One of the common cases is to provide a unique, unopinionated, compressed reference to it. This is sometimes called a hash.

Hashes have really nice properties, but they also have some not-nice properties, and perhaps the main one is that they are just a jumble of characters. For instance, here is a shortened, 6-character hash of a commit from the BIP39 repo: ce1862. That hash contains 24 bits of entropy, which is sufficient in most cases to uniquely identify a moment in time in the life of your repository.

What it isn't is memorable, or easy to communicate. But 24 bits is very easy to communicate using base-wordle, because you can use 3 of these 9-bit words to represent those three bytes. ce1862 (in hexadecimal) is SprayCrawlNight in base-wordle. I bet you can remember that for long enough to switch browser tabs!

Leftovers/padding

...docs coming soon.

base-wordle1, base-wordle2, etc.

Numbers can make these things even easier to communicate!

When encoding, you can add one or more digits after each 5-letter word.

Numbers actually encode more information per character, and most of them are one syllable, easy to read, and easy to remember.

This behavior is not enabled by default but is available via the minimal CLI and also via the encode Python function.

Installation/Usage

pip install basewordle

  • encode:

cat <file> | python -m basewordle python -m basewordle --input-file <file>

  • decode:

echo "CrashHairySpawnPolarErrorRebelOrbitZilch" | python -m basewordle -d > output.b python -m basewordle -d --input-file input.b --output-file output.b

Metadata

Release files for basewordle 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for basewordle 0.1.0
File Interpreter ABI Platform
basewordle-0.1.0-py3-none-any.whl Python 3 none any Details

Release files / basewordle-0.1.0-py3-none-any.whl

Download URL basewordle-0.1.0-py3-none-any.whl
Size 11.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5d44fe039394d96fadc719436c00a6ea46566e78476c7cef6403337ec97ce65f
BLAKE2b-256 checksum
How to use checksums
bbf91efe8f2297673673643962ff5239cffb9795652ce707248b76f4b17106f4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.8.12

Release history Release notifications | RSS feed

This release

0.1.0 This release

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page