Codecs are a font of insanity.
See: previous threads about base-58-btc and timing side-channels. https://bsky.app/profile/did:plc:qfqibtrg2k7r2p345p4pbgpi/post/3m4ygfrrxlk2q
But also, a lot of Iota's problems were their obsession with ternary logic (as if "binary" is somehow inferior), except you need your implementations of base-2 and base-3 to be isomorphic in order for the outputs of cryptographic functions to be meaningful.
But hackers have done crazy and stupid things with codecs.
For example: have you ever heard of base-1 encoding? You might think, "But you can't logically go smaller than binary!"
Not true. Just repeat the number 1 until the string length is isomorphic to the number you're trying to represent.
I never said it was fast :P
@soatok@furry.engineer I always found "unary" code as opposed to (or in analogy with) "binary" kind of a misnomer.
you still need two symbols, the "1" and the "absence of 1" or a terminator, or a synchronization marker, to tell where there is a 1 and where there is none. so it's just a specific variable-length numerical representation with a binary alphabet. Even the tally is still a binary code (in which you use an arbitrary number of consecutive "empty spaces" to represent "0").
In general unary codes just use "0" for the second symbol.
https://en.wikipedia.org/wiki/Unary_numeral_system
@varx@infosec.exchange @soatok@furry.engineer I see your point, it's valid, and it provides a way to solve my discomfort with the term.
Probably my issue is that "unary" is used for both a numeral system and a set of codes (which use that numeral system, so totally legit).
Numeral systems are writing systems that imply the capability to tell empty space from the symbol, so the essential minimum binary possibility. But this aspect is implied and out of relevance for the numeral systems.
Instead it's important for codes, which need some synchronization mechanism to be actually used (read, transmitted), and unary codes are self-synchronizing (and are a case of binary code).
P.S. as @halosghost@chaos.social highlighted, the expansion of the base-1 (unary) representation works perfectly well as a positional representation.
Thanks everyone, I love you and this fediverse thing.