Live data from Hacker News

Can you build a recognizable World Map in under 500 bytes?

experimentlog.com

21–30 of 58 posts

Re: Can you build a recognizable World Map in under 500 bytes?

#23
post #21

Yes. Here's a map of the entire world in 1 byte. Both hemispheres. The northern hemisphere is depicted above, the southern hemisphere is depicted below: : You're welcome.

How is that "recognizable"?

I claim it's obviously recognizable as the entire surface of a 3-sphere projected onto 2 dimensions, and therefore is clearly an acceptable answer to the original question posed. I added some helpful and clarifying prose expounding upon which hemisphere is what, but could have left that as an exercise to the reader without loss of generality.

Re: Can you build a recognizable World Map in under 500 bytes?

#25

Presumably you could precompute some parametric function (probably a Fourier sum) which draws a reasonably close map of the world, and get that into 500 bytes with a math-focused programming environment (R, Julia, etc.)? I might try throwing Fable at this and seeing what I can get.

Well, here's what Fable came up with in 499 bytes of R in about half an hour: https://pastebin.com/sBsiGD9t , result: https://imgur.com/a/W3eDdIC . Probably with sitting down and tweaking you could do even better, but I think this is a decent first start.

Did you or Fable decide to split North and South America?

Can the it also split Africa/Arabia/Eurasia?

Who/how decided which islands to keep and which to erase?

If you want to save a few characters, you can replace `length(v)` with the actual number.

Re: Can you build a recognizable World Map in under 500 bytes?

#30
post #20

Representation for this I came up with: Allocate one magic number for "start line with space" another for "start line with asterisk" then any other number means this many of the current character and then swap character. Then it's a matter of picking a suitable way to encode numbers into bits. I came up with groups of four bits. If the high bit is not set that is the number, if it is set then read an additional group…

> Allocate one magic number for "start line with space" another for "start line with asterisk" then any other number means this many of the current character and then swap character.

The galaxy brain move would be to always arbitrarily start with one character, replace the two special numbers with a single "don't output any characters, just swap" number, and then... congratulations, you just reinvented CompuServe RLE!

http://fileformats.archiveteam.org/index.php?title=CompuServ...

Post reply on HN