Live data from Hacker News

File system that stores location of file in Pi

github.com

31–40 of 102 posts

Re: File system that stores location of file in Pi

#31
post #5

Now, we all know that it can take a while to find a long sequence of digits in π, so for practical reasons, we should break the files up into smaller chunks that can be more readily found. In this implementation, to maximise performance, we consider each individual byte of the file separately, and look it up in π. Definitely worth a chuckle. Very cute idea and implementation.

You laugh now, but when we develop a trivial method to calculate pi and other irrational constants to quadrillions of digits, this will be wonderful.

Re: File system that stores location of file in Pi

#33
post #5

Now, we all know that it can take a while to find a long sequence of digits in π, so for practical reasons, we should break the files up into smaller chunks that can be more readily found. In this implementation, to maximise performance, we consider each individual byte of the file separately, and look it up in π. Definitely worth a chuckle. Very cute idea and implementation.

If you used small chunks (say, up to four bytes) you could just have a lookup table storing all the indices.

Or - what a genius idea! - we could use Pi itself as a lookup table and use the sequence of n bytes at that position of pi as an implicit lookup table.

Re: File system that stores location of file in Pi

#35
post #34

> They said 100% compression was impossible? You're looking at it! If the offset within pi is so large that any representation of it is larger than my data?

Yep. Consider the minimum case: assume we've described a process for finding any bitstream we want in pi while necessarily saving at least one bit. Attempt to do so for the bitstreams 00, 01, 10, and 11. If we compress 2 bits to 1 bit, by the pigeonhole principle, at least one of 0 and 1 has to represent at least 2 distinct bitstreams, which means we have lost data.

A similar argument works for all compression algorithms and all sizes. It is flatly impossible to compress all data all of the time.

Re: File system that stores location of file in Pi

#37
post #5

Now, we all know that it can take a while to find a long sequence of digits in π, so for practical reasons, we should break the files up into smaller chunks that can be more readily found. In this implementation, to maximise performance, we consider each individual byte of the file separately, and look it up in π. Definitely worth a chuckle. Very cute idea and implementation.

You laugh now, but when we develop a trivial method to calculate pi and other irrational constants to quadrillions of digits, this will be wonderful.

I bet I could take a few moments and come up with a proof that such a method would require P=NP.

Re: File system that stores location of file in Pi

#38
post #22
post #3

This project was posted before and hasn't been updated since. I doubt that it is still in development

Because nobody likes Pi anymore, we need the Tau filesystem.

Nah, e is obviously the best transcendental number.

I hope the author's pending patent is limited to pi though, so I can work on ef^H^H. Hmm, I see why maybe the author preferred pi over e.

Re: File system that stores location of file in Pi

#39
If you're going to use a normal number for this purpose, why not choose a much nicer one? Let's use a number such that its binary representation is the concatenation of consecutive ascending binary numbers.

    0 1 10 11 100 101 110 111 1000...
becomes

    0.0110111001011101111000...
It's much easier to demonstrate that this number is normal than to do so for pi. It's also much easier to calculate the nth digit, and to find an occurrence of a given string of bits.

Re: File system that stores location of file in Pi

#40
post #20
post #9

Earlier quoted context omitted.

Literally forever, right? It's basically scanning a random byte-stream for a 200-byte long exact match. 200 bytes, 1600 bits, or 2^1600 different possible sequences, making the odds 1/2^1600 that any particular 200 bytes pulled out will match the bytes you are looking for.

In fact, it's still not known if pi is normal (contains all finite patterns of numbers[π]), so you can't guarantee that any search will terminate. π: Not quite the definition of normal, but equivalent.

Even if pi isn't normal, there are plenty of normal numbers to choose from (almost all of the reals are normal, in fact), including some really simple and predictable ones like Champernowne's constant (in base 10: 0.1234567891011121314...) that would support simpler index calculations than pi.
Post reply on HN