Re:Finding Waldo in π
by worewood on Thursday March 31, 2022 @09:06PM
(#30874106)
If you use a external pallete (one that is not coming from the pi digits themselves) I don't think it's that interesting. With any random set of data you can find a pallete that approximates the desired result
[ Parent
| on HN ]
Can someone explain to me where the palette is defined? If it's not in the bytes of waldo.gif, is it provided by the website itself? If I save the gif file, I still see it as the same on my computer. Is it not true that the bytes of the gif actually 100% match the bytes of pi? Is there some extra metadata not included in the bytes of the file itself? If I were to send those bytes over the wire and save them to a file, would it look different?
The part that's from π is the actual pixel data, which is extracted in the Python snippet "waldo.tobytes()".
More-or-less equivalently, you could use "list(waldo.getdata())".
The GIF file as stored on disk has extra headers, and the pixel data's been compressed. So the whole file isn't found in the digits of π, just the pixel data itself.
I'd guess the chance of actually finding a correctly formatted full GIF file in contiguous bytes of π is effectively nil.
I see, I did find it slightly suspicious that they loaded the file using Image.open instead of just reading the bytes directly. Thanks!
I agree. Relying on an external data for interpretation is less impressive. The most impressive would be finding an exact GIF87a file. But, the cheating technique used here isn't a simple task either.
I converted the smallest valid GIF file[1] (35 bytes) into decimal number: 540959129019042423917857241427143195931235689921032801204995597056286563376232988672
It's nowhere to be found in PI :) I couldn't even find "GIF87a". So, fuzzy search seems to be a must.
[1] https://stackoverflow.com/questions/2570633/smallest-filesiz...
> "It's nowhere to be found in PI :)"
Ooh, did you search all the way to the end?
I must admit, not all the way.
It is in pi, if pi is a normal number, as most think.
Re:Finding Waldo in π
by JoeAltmaier on Thursday March 31, 2022 @09:23PM
(#30874202)
Not really true. It took 27M tries to find that one