Live data from Hacker News

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

experimentlog.com

11–20 of 58 posts

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

#11

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.

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

#14
Going from "SVG/Canvas is wasteful" to a tile based approach is a giant leap. Wouldn't AI suggest delta encoding of polyline coordinates and discretization of deltas as small, maybe just 2-4 bit integers? Storing the X and Y delta vectors separately, rather than interleaved, could lead to a further increase to the compression ratio.

What was asked of Claude? The article is very sparse on this.

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

#16
I like that yours is 45 rows of asterisks.

Makes me think a project-and-rasterize pipeline, sampling a simplified world water boundary map under a variety of projection parameters should give you a range of bitmaps, and then it is up to whoever to decide if the detail lost in all of this renders it incompatible with the world as they know it.

The site below takes detailed map files and removes significant detail for practical purposes:

https://mapshaper.org/

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

#18

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.

I can see leas than half of it. Imgur?

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

#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 of four bits, and interpret as a biased 7 bit number. This came out to 400 bytes not including decompressor.

Post reply on HN