Rendered at 23:29:43 GMT+0000 (Coordinated Universal Time) with Cloudflare Workers.
ianjbutler 5 hours ago [-]
Incredible, this should be more famous.. even if it doesn't work in modern ruby (?) the class of quine seems fascinating and something I've never seen or heard of. What even is this, I mean the effect on the image itself is fun but also in a sense incidental, and the "rotational quine" code-core cycling inside some kind of permutation group is the meat? The zlib piece is the crux I guess but I can't grok the trick well enough to say more.
Skimming comments, the answer to "Any chance on having a writeup on it's logic?" was "Please read the source code :-)" of course.. hah
omoikane 4 hours ago [-]
> even if it doesn't work in modern ruby
Seems to work just fine with ruby 4.0.7
> Please read the source code :-)
- %q quotes a string literal, so if you extract all the characters between the two '~' and put that in another ruby file, you can get syntax highlighting for most of the code.
- Lines 1..10 contains encoded data (quoted inside %!!).
- Lines 10..13 cleans up the data before passing it to zlib to decompress.
Skimming comments, the answer to "Any chance on having a writeup on it's logic?" was "Please read the source code :-)" of course.. hah
Seems to work just fine with ruby 4.0.7
> Please read the source code :-)
- %q quotes a string literal, so if you extract all the characters between the two '~' and put that in another ruby file, you can get syntax highlighting for most of the code.
- Lines 1..10 contains encoded data (quoted inside %!!).
- Lines 10..13 cleans up the data before passing it to zlib to decompress.
- Lines 14..17 decodes the data.
- Rest of the lines draws the globe.