
Show HN: Ecoji, a new base1024 emoji encoding - kturner
https://github.com/keith-turner/ecoji
======
hamandcheese
I made an almost identical program back in 2015 (even the same name!), though
only using base64:

[https://github.com/andrewhamon/encoji](https://github.com/andrewhamon/encoji)

Great idea, op ;)

Edit: this one definitely has had more thought out into it, specifically I
like that the sort order of different input is preserved in the output.

~~~
tgb
_Almost_ the same name!

~~~
hamandcheese
Ah, my bad!

------
dilap
This seems half-jokey, but I think it'd actually be really great if places
where we usually see hex or base64 hashes used emoji instead.

Much easier to compare at a glance, and have a chance of remembering (by sight
-- "is this the same hash", not "let me write down the hash from nothing").

~~~
hamandcheese
A more serious attempt to solve hat problem is base58:
[https://en.m.wikipedia.org/wiki/Base58](https://en.m.wikipedia.org/wiki/Base58)

~~~
Xeoncross
Plus you can actually type base58 using a phone or non-native keyboard.

~~~
myhf
Plus it's the right size for one cryptocat gene per character.

------
maltalex
Base64 encodes groups of 6 bits into one of 64 8-bit characters. OP is doing
the same, but with each character encoding 10bits.

The only problem is that these emojis probably require two bytes each (more?),
so we’re encoding 10 bits into 16 bits (60% overhead) instead of 6 bits to 8
bits (33% overhead)

It’s a nice idea though. These are clearly easier to remember and compare.
Just don’t expect emojis to take less space than base64.

~~~
zitterbewegung
You would hypothetically use this for a file where your communication channel
is limited to emojis and text so... Twitter?

~~~
lalaithion
Here's a serious attempt at encoding arbitrary data into Unicode characters:

[https://github.com/qntm/base65536](https://github.com/qntm/base65536)

------
treve
I'd expect the encoding to be much shorter. Like, 1 emoji per 4 bytes.

~~~
burke
There are about 2600 emoji, so it could plausibly be 1 emoji per 3 bytes. I
wonder why it was implemented so much less compactly.

~~~
bostonpete
For one emoji to represent 3 bytes in an encoding, you'd need 2 __24 ~ 16.7M
unique emojis. With 2600 emojis, the best you could do is have each one
represent 11 bits (which requires 2048 unique emojis).

Am I missing something here...?

~~~
burke
Nope, I just didn’t think that through very well.

------
sorenjan
One of the emojis in the examples, , doesn't work in Firefox 60 on Windows 10.
It's the Emoji "Woozy Face" [0] which was introduced in Unicode 11.0 in 2018,
so it probably has limited support for a while. There's probably better
alternatives.

[0] [https://emojipedia.org/face-with-uneven-eyes-and-wavy-
mouth/](https://emojipedia.org/face-with-uneven-eyes-and-wavy-mouth/)

------
shurcooL
I also made something very similar, except it used hex-encoded hashes as
input. [0]

[0] [https://dmitri.shuralyov.com/projects/hash-
emoji/](https://dmitri.shuralyov.com/projects/hash-emoji/)

------
delinka
How about a base-N project? You configure it with your safe alphabet, it
adapts to consume as many bits as it can for your 'encoding', outputs
efficiency along with encoded data.

------
evmar
[https://github.com/keith-
turner/ecoji/blob/31e543511004597bd...](https://github.com/keith-
turner/ecoji/blob/31e543511004597bd5eff628c9baad28fe957345/encode.go#L79)

this is in the standard library as
[https://golang.org/pkg/io/#ReadFull](https://golang.org/pkg/io/#ReadFull)

------
anc84
How many bytes can we dump into a tweet with this?

------
raymondgh
Our language is evolving back to hieroglyphics

~~~
photojosh
For sure! I think it's pretty funny.

An advantage of emoji is that it makes it so easy to communicate a non-verbal
expression. Looking at my frequently used list: there's the thinking,
facepalm, sly look, and so on... they make text messaging so much more human.

------
1ris
You want to insert a xxd -r -p in before your program in

cat encode.go | openssl dgst -binary -sha1 | ecoji

------
xtf
Base 64 = 256 Ascii represented in 64. Base64 < 256 Base 1024 = ?

Wouldn't "A" be "A", because it is a subset of 1024? Looks more like
obfuscation code for me.

~~~
Xeoncross
Base encodings don't always start at "A" (or even include it).

They just mean that the alphabet they use has N glyphs in it to represent the
numbers 0-N. For example, base10 can be:

0123456789 or qwertyuiop or abcdefghij or ...

------
rplnt
Somehow related:
[https://github.com/emojisum/emojisum](https://github.com/emojisum/emojisum)

------
jclem
I'm curious if there are strings whose emoji encoding still contain a readable
form of the original string, but in emoji.

------
ggggtez
I don't exactly know what the goal here is, but if the goal was to reduce the
number of symbols a human needs to look at (e.g. for confirmation codes etc)
then this is abysmal. 48 ascii characters reduces to 40 emoji, even though
emoji occupy 2-4x the bits as ascii?

~~~
sushisource
The goal is it's funny.

------
randomerr
Waiting for NodeJS version.

~~~
hamandcheese
Not published as an npm module, but I did make a JS version for the web to go
along with the Golang version I made:
[https://github.com/andrewhamon/encoji/blob/master/js/index.j...](https://github.com/andrewhamon/encoji/blob/master/js/index.js)

~~~
randomerr
+1 from me. Thanks!

