Hacker News new | ask | show | jobs
by omoikane 21 days 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.

- Lines 14..17 decodes the data.

- Rest of the lines draws the globe.