News for hackers. Stuff that matters.
Re:A bootable CD image with a retro game in a single tweet by barbegal on Tuesday July 31, 2018 @04:15PM (#17656680)
I was confused as to how you could represent a bootable CD image in printable characters. It turns out that you can't. This is a tweet of a perl script which creates a cd.iso file that you can then boot from. The perl script significantly decompresses the data in the tweet.

That said, this is a playable game in around 60 bytes of actual data which is impressive.

Re:A bootable CD image with a retro game in a single tweet by mirimir on Tuesday July 31, 2018 @05:12PM (#17657187)
I'm reminded of the RSA in Perl "weapon" t-shirt :)

https://upload.wikimedia.org/wikipedia/commons/9/96/Munition...

Re:A bootable CD image with a retro game in a single tweet by raphlinus on Tuesday July 31, 2018 @09:01PM (#17658780)
Machine readable as well as machine washable[0]!

[0]: http://cypherpunks.venona.com/archive/1995/10/msg00317.html

Re:A bootable CD image with a retro game in a single tweet by cheeze on Tuesday July 31, 2018 @09:18PM (#17658870)
Man that shirt is awesome... But man I would never wear that shirt as that looks like the crown jewel of any neckbeards collection
Re:A bootable CD image with a retro game in a single tweet by OscarCunningham on Wednesday August 01, 2018 @06:24AM (#17661206)
It sounds like you've been trained to hate something that you actually love. That's kind of sad. Couldn't you just wear the awesome shirt while avoiding the negative aspects of neckbeards?
Re:A bootable CD image with a retro game in a single tweet by garaetjjte on Tuesday July 31, 2018 @04:36PM (#17656850)
Not CD images, but there is DOS C compiler generating executables with only printable characters (and also no self-modifying code that could contain non-printable characters)

http://www.cs.cmu.edu/~tom7/abc/paper.txt (view in monospace font, 160 character lines)

Re:A bootable CD image with a retro game in a single tweet by gerdesj on Tuesday July 31, 2018 @06:52PM (#17658018)
That said, this is a playable game in around 60 bytes of actual data which is impressive.

.. and way smaller than your comment .

Re:A bootable CD image with a retro game in a single tweet by makomk on Tuesday July 31, 2018 @05:55PM (#17657579)
It's pretty light compression from what I can tell - basically just squashing down runs of nulls to a single count.
Re:A bootable CD image with a retro game in a single tweet by wtmcc on Tuesday July 31, 2018 @06:39PM (#17657918)
The compression is basic run-length encoding, leveraging the Perl repetition operator (x), and the property of the Perl print/say functions that they concat items passed in a list before writing to STDOUT.

https://en.wikipedia.org/wiki/Run-length_encoding

https://perldoc.perl.org/perlop.html#Multiplicative-Operator...

https://perldoc.perl.org/functions/say.html

https://perldoc.perl.org/functions/print.html

Re:A bootable CD image with a retro game in a single tweet by lucb1e on Wednesday August 01, 2018 @11:18PM (#17669020)
I tried xz -9 on it and found, to my surprise, that it was actually longer than RLE!

Then I tried gzip -9, because perhaps that has a smaller header? Yup, saved a few bytes, now it's about the same size. Finally, I remembered that bzip2 does a lot better on text than gzip, and who knows, it might also have a shorter header than xz. Again, a few more bytes saved! Down to 223, where the original is 249 bytes (including the 'say' part but excluding the unnecessary delimiting apostrophes or the rest of the command).

Re:A bootable CD image with a retro game in a single tweet by SlowRobotAhead on Tuesday July 31, 2018 @06:10PM (#17657710)
Took me a second to figure out after looking at the assembly that it's possible because of base64.
Re:A bootable CD image with a retro game in a single tweet by arcticbull on Wednesday August 01, 2018 @01:42AM (#17659992)
Yeah, it's a really simple run-length encoded ISO expressed as a Perl script.
Re:A bootable CD image with a retro game in a single tweet by pard68 on Wednesday August 01, 2018 @12:45AM (#17659756)
I looked at the that tweet for five or six minutes and was stumped. Now this makes more sense, thanks.
Re:A bootable CD image with a retro game in a single tweet by 0xcde4c3db on Wednesday August 01, 2018 @01:35AM (#17659957)
Most of the "compression" is zero bytes due to fixed offsets of various things (e.g. the first 16 sectors of an ISO 9660 image are a "system area" not used by the actual file system).