Live data from Hacker News

Show HN: Base24 binary-to-text encoding for humans

kuon.ch

21–30 of 69 posts

Re: Show HN: Base24 binary-to-text encoding for humans

#21
I'm wondering maybe in the future, we will use these baseN methods to represent any numbers in everyday life? With the data explosion, I think we will have more opportunity to describe really big numbers than today, so we will abandon the usage of decimal eventually, speak and write in this base24 method or some upcoming base128, base1024?

I know there's Mega or Giga that can describe how big the number is in decimal, but they can do better (represent bigger numbers) in the baseN method where N > 10. So will we shift to these methods?

Re: Show HN: Base24 binary-to-text encoding for humans

#22

Another interesting solution to this problem is that used by plus codes [1]: > The characters that are used in Open Location Codes were chosen by computing all possible 20 character combinations from 0-9A-Z and scoring them on how well they spell 10,000 words from over 30 languages. This was to avoid, as far as possible, Open Location Codes being generated that included recognisable words. The selected 20 character s…

Does not help with the ambiguous character problem at all, though

No I,1,0, or O in their alphabet, though. So they did probably consider the problem at some point. Or got lucky.

Re: Show HN: Base24 binary-to-text encoding for humans

#23
I really like the super high efficiency at the important multiple-of-4-byte increments. Using 7 base-24 characters to encode 32 bits is 99.7% efficient. However, I'd recommend using 7 base-24 digits followed by a blank as standard output format. This would allow for efficient 8 character 32 bit conversions. Also, I think padding output to a multiple of 7 characters would be good, for similar reasons that it's good for base-64. Now you can concatenate encoded streams like you could byte streams, and recover on decode. As multiples of 32 bits are so common, padding would be used little in practice. On input, it would be fine to accept unpadded base-24 sequences, but valid base-24 output should always pad to a multiple of 7 chars (excluding the blanks that should be just for readability and not significant otherwise).

However, I strongly dislike the arbitrary mapping between character values and base-24 digits. There is a strong reason for using the order 2345679ABCEFGHKRSTWXYZ, which is that now encoded values compare the same as the original binary values. I did appreciate the 0x00000000 == ZZZZZZZ equivalence, but consistent ordering is just way more important IMO. Also 2222222 looks a lot like ZZZZZZZ. Just saying.

Re: Show HN: Base24 binary-to-text encoding for humans

#24
post #4

Microsoft product keys were base-24 with the following alphabet: > B C D F G H J K M P Q R T V W X Y 2 3 4 6 7 8 9 they were 115 bits encoded in 24 characters see also human-oriented base32 encoding: https://philzimmermann.com/docs/human-oriented-base-32-encod... which includes this nice trick: > We have permuted the alphabet to make the more commonly occuring characters also be those that we think are easier to read…

Brings me back to the trusty old FCKGW-RHQQ2-YXRKT-8TG6W-2B7Q8

Re: Show HN: Base24 binary-to-text encoding for humans

#26
post #16

Earlier quoted context omitted.

I recently needed to encode a 32-bit value into something easy for QA folks to remember and report. I opted for 3 words out of an 11-bit (2048 entry) dictionary of commonly used words. How to build the dictionary? Well, in order to determine the most commonly used English words, I downloaded a bunch of free texts from Project Gutenberg, and did some simple filtering - nothing less than 5 letters, no duplication of si…

In most cases if you need a short list it's better to use something like the diceware or EFF lists than to make your own from scratch.

Here is one: https://gist.github.com/fogleman/c4a1f69f34c7e8a00da8

Re: Show HN: Base24 binary-to-text encoding for humans

#27

I'm fond us using a base100, made of up 2 letter syllables. It results in a vaguely pronounceable string. For syllables, I use: syllables: %w[ ba be bi bo bu ca ce ci co cu da de di do du fa fe fi fo fu ga ge gi go gu ha he hi ho hu ja je ji jo ju ka ke ki ko ku la le li lo lu ma me mi mo mu na ne ni no nu pa pe pi po pu ra re ri ro ru sa se si so su ta te ti to tu va ve vi vo vu wa we wi wo wu xa xe xi xo xu ya ye y…

https://github.com/kolide/kit/tree/master/munemo

Implements two dialects. An original one compatible with the inspiration, and used in some of our earlier product. And the replacement (syllables above) which is alphabetically sortable.

Re: Show HN: Base24 binary-to-text encoding for humans

#28
post #8

I'm fond us using a base100, made of up 2 letter syllables. It results in a vaguely pronounceable string. For syllables, I use: syllables: %w[ ba be bi bo bu ca ce ci co cu da de di do du fa fe fi fo fu ga ge gi go gu ha he hi ho hu ja je ji jo ju ka ke ki ko ku la le li lo lu ma me mi mo mu na ne ni no nu pa pe pi po pu ra re ri ro ru sa se si so su ta te ti to tu va ve vi vo vu wa we wi wo wu xa xe xi xo xu ya ye y…

I’d love to see your implementation.

(commented above -- https://github.com/kolide/kit/tree/master/munemo)

Re: Show HN: Base24 binary-to-text encoding for humans

#29
post #9

I'm fond us using a base100, made of up 2 letter syllables. It results in a vaguely pronounceable string. For syllables, I use: syllables: %w[ ba be bi bo bu ca ce ci co cu da de di do du fa fe fi fo fu ga ge gi go gu ha he hi ho hu ja je ji jo ju ka ke ki ko ku la le li lo lu ma me mi mo mu na ne ni no nu pa pe pi po pu ra re ri ro ru sa se si so su ta te ti to tu va ve vi vo vu wa we wi wo wu xa xe xi xo xu ya ye y…

> I can dump an implementation somewhere if people are really curious Interested. I've put together a few encoding libraries for fun when I get bored. (base16, morse, etc.) This one looks fun, particularly because it _might_ be possible to serialise it to sound and back, if I put in a little bit of effort, which is something I've done [0] once or twice. [0] https://git.sr.ht/~shakna/soundofsilence

(commented above -- https://github.com/kolide/kit/tree/master/munemo)
Post reply on HN