this post was submitted on 26 Dec 2024
218 points (98.2% liked)

Asklemmy

44171 readers
1825 users here now

A loosely moderated place to ask open-ended questions

Search asklemmy πŸ”

If your post meets the following criteria, it's welcome here!

  1. Open-ended question
  2. Not offensive: at this point, we do not have the bandwidth to moderate overtly political discussions. Assume best intent and be excellent to each other.
  3. Not regarding using or support for Lemmy: context, see the list of support communities and tools for finding communities below
  4. Not ad nauseam inducing: please make sure it is a question that would be new to most members
  5. An actual topic of discussion

Looking for support?

Looking for a community?

~Icon~ ~by~ ~@Double_A@discuss.tchncs.de~

founded 5 years ago
MODERATORS
 

How about ANY FINITE SEQUENCE AT ALL?

you are viewing a single comment's thread
view the rest of the comments
[–] Yoddel_Hickory@lemmy.ca 37 points 21 hours ago (5 children)
[–] somenonewho@feddit.org 1 points 1 hour ago

Thanks. I love these kind of fun OpenSource community projects/ideas/jokes whatever. The readme reminds me of ed

[–] Arfman@aussie.zone 3 points 15 hours ago (1 children)

I'm a layman here and not a mathematician but how does it store the complete value of pi and not rounded up to a certain amount? Or do one of the libraries generate that?

[–] lukewarm_ozone@lemmy.today 6 points 12 hours ago

You generate it when needed, using one of the known sequences that converges to Ο€. As a simple example, the pi() recipe here shows how to compute Ο€ to arbitrary precision. For an application like pifs you can do even better and use the BBP formula which lets you directly calculate a specific hexadecimal digit of Ο€.

[–] db0@lemmy.dbzer0.com 7 points 19 hours ago* (last edited 19 hours ago)

Thats very cool. It brings to mind some sort of espionage where spies are exchanging massive messages contained in 2 numbers. The index and the Metadata length. All the other spy has to do is pass it though pifs to decode. Maybe adding some salt as well to prevent someone figuring it out.

[–] Nexy@lemmy.sdf.org 1 points 15 hours ago

I want that project continues so hard. Sounds amazing

[–] NotMyOldRedditName@lemmy.world 1 points 16 hours ago* (last edited 16 hours ago) (1 children)

I can't tell if this is a joke or real code... like for this sentence below.

The cat is back.

Will that repo seriously run until it finds where that is in pi? However long it might take, hours, days, years, decades, and then tell you, so you can look it up quickly?

[–] lukewarm_ozone@lemmy.today 8 points 12 hours ago* (last edited 12 hours ago)

I can’t tell if this is a joke or real code

Yes.

Will that repo seriously run until it finds where that is in pi?

Sure. It'll take a very long while though. We can estimate roughly how long - encoded as ASCII and translated to hex your sentence looks like 54686520636174206973206261636b. That's 30 hexadecimal digits. So very roughly, one of each 16^30 30-digit sequences will match this one. So on average, you'd need to look about 16^30 * 30 β‰ˆ 4e37 digits into Ο€ to find a sequence matching this one. For comparison, something on the order of 1e15 digits of pi were ever calculated.

so you can look it up quickly?

Not very quickly, it's still n log n time. More importantly, information theory is ruthless: there exist no compression algorithms that have on average a >1 compression coefficient for arbitrary data. So if you tried to use Ο€ as compression, the offsets you get would on average be larger than the data you are compressing. For example, your data here can be written written as 30 hexadecimal digits, but the offset into pi would be on the order of 4e37, which takes ~90 hexadecimal digits to write down.