Live data from Hacker News

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

experimentlog.com

41–50 of 58 posts

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

#41
post #9

Since the map just has two states - land or water - I wonder if there's a way to represent the same information more efficiently bits rather than bytes.

Here's a map in one bit, where 0 is water and 1 is land: 0

Rather lossy

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

#43

I know this doesn't meet the spirit of the challenge, but... _,--', _._.--._____ .--.--';_'-.', ";_ _.,-' .'--'. _.' {`'-;_ .-.>.' '-:_ ) / `' '=. ) > {_/, /~) snd |/ `^ .'

U+1F5FA does it in 4 bytes! https://www.compart.com/en/unicode/U+1F5FA

I asked deepseek to turn this into an offscreen-canvas-based ascii renderer: https://retr0.id/stuff/worldgolf.html

Weighs in at 379 bytes (or 378 if you trim the newline). Obviously it is font-dependent, but it works on my machine!

Edit: golfed a bit further, but unsure how reliable it'll be with different fonts: https://retr0.id/stuff/worldgolf2.html

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

#45
Its a fun challenge.

I used https://squoosh.app to make a pretty good one. Mostly just a resize and then OxiPNG for compression. Managed a 124x62 black/white image. OP has a resolution of 195x53, so I had very similar, but slightly worse i think? mostly a different aspect ratio + map projection i think.

playing with Squoosh.app is very fun, and you can very easily see how the jump from 500b to 1-2kb turns a map from "awful" to "very good" with the right settings.

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

#47

Earlier quoted context omitted.

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.

Fable did that, I pretty much just told it to find the best Fourier sum which can draw a map of the world in less than 500 bytes of R. It downloaded geo data and made the curves to fit that on its own.

Can you post the unencode version? It would be nice to see the vector with the data, for example to count how many coefficients each continent got.

Have you tried with Bezier curves? Your images show a lot of pointy parts, like Southeast Asia and that usually needs a lot of high frequencies in the Fourier representation, so I think something piecewise may be better. (Perhaps a polygon is better.)

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

#48

I know this doesn't meet the spirit of the challenge, but... _,--', _._.--._____ .--.--';_'-.', ";_ _.,-' .'--'. _.' {`'-;_ .-.>.' '-:_ ) / `' '=. ) > {_/, /~) snd |/ `^ .'

BTW... full credit to the artist, Shanaka Dias.

https://asciiart.website/artist.php?artist_id=121

https://asciiart.website/preservation/poster.php?person_id=1...

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

#49

What's the point in doing things like this if you just get Claude to do it?

I wonder how many people hallucinated the word "can" in your comment and downvoted because of it..

To be fair, the greyed-out text is hard to read.

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

#50
post #18

Earlier quoted context omitted.

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.

I can see leas than half of it. Imgur?

Thanks? for the obtrusive ads and the downvote?

HN can do better.

Post reply on HN