[2012-Nov-07] Centimeter of Sand
Re: [2012-November-07] Centimeter of Sand
You could have represented 100 characters in a 2-character pair so capitals and punctuation could be represented, then reduced the number with a reversible hash.stinky613 wrote:Since I'm not a nerd--not even a little bit--I felt absolutely compelled to write some Ruby functions to encode text to centimeters.
https://github.com/stinky613/centimeter-encoding
-
- Posts: 2
- Joined: Wed Nov 07, 2012 3:15 pm
Re: [2012-November-07] Centimeter of Sand
True. The thing is once you start down that path when do you stop? Just a-z and punctuation? Capitals too? Use more than 2-digit pairs and encode all ASCII? All UTF-8 characters?thelordofcheese wrote:You could have represented 100 characters in a 2-character pair so capitals and punctuation could be represented, then reduced the number with a reversible hash.stinky613 wrote:Since I'm not a nerd--not even a little bit--I felt absolutely compelled to write some Ruby functions to encode text to centimeters.
https://github.com/stinky613/centimeter-encoding
I specifically didn't encode punctuation or capitals because I wasn't trying to make any assumptions beyond the A = 01, etc pattern in the comic, and for a ten minute project with relatively few (and simple) cases I felt a switch was plenty sufficient.
[EDIT] Looks like I got carried away when I did this. I just noticed the comic started at A=00. Oh well.
Re: [2012-November-07] Centimeter of Sand
In case anyone was intrigued by the concept of this but isn't aware of the terminology of information theory; Zach pretty much described a derivation of Range-Encoding[1]/Arithmetic-Coding[2]. This is used in popular codecs such as h.264.
[1] http://en.wikipedia.org/wiki/Range_encoding
[2] http://en.wikipedia.org/wiki/Arithmetic_coding
[1] http://en.wikipedia.org/wiki/Range_encoding
[2] http://en.wikipedia.org/wiki/Arithmetic_coding
-
- Posts: 1
- Joined: Wed Nov 07, 2012 3:41 am
Re: [2012-November-07] Centimeter of Sand
By today's standards the grain of sand would be a collection, not a library. In fact, the grain would most likely be used as an archive. In order for a collection to be a library it must have a librarian facilitating access to it.
Had to be said.
Had to be said.