this post was submitted on 17 Jul 2024
3 points (100.0% liked)

Programmer Humor

37140 readers
336 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS
top 28 comments
sorted by: hot top controversial new old
[–] Thorry84@feddit.nl 3 points 1 year ago (2 children)

Including relevant XKCD as demanded by internet law: https://xkcd.com/10/

[–] CanadaPlus@lemmy.sdf.org 2 points 1 year ago

Oooh, a rare two-digit.

[–] biscuitswalrus@aussie.zone 0 points 11 months ago (1 children)

Eating the onion is sure popular today!

[–] rain_worl@lemmy.world 0 points 6 months ago

they didn't?

[–] the_beber@lemm.ee 2 points 1 year ago

This just in: Measurements are now limited to ~3M decimals.

Science is ruined!

[–] kibiz0r@midwest.social 1 points 1 year ago

Microsoft sues the Library of Babel

[–] ILikeBoobies@lemmy.ca 1 points 11 months ago

“I may be a staunch atheist,” said Richard Stallman, creator of the GNU + Linux operating system and self-proclaimed architect of the modern world, “but any decent analysis in comparative religion would conclude that the universe is a copyleft creation, thereby pi should automatically fall under the terms of the GNUv3 license.”

Lol, he would actually say that

[–] livingcoder@programming.dev 0 points 11 months ago* (last edited 11 months ago) (3 children)

Is there an algorithm or number such that we could basically pirate data from it by saying "start digit 9,031,643,679 with length 5,345,109 is an MP4 of Shrek"? Something that we could calculate in a day or less?

[–] nova_ad_vitum@lemmy.ca 1 points 11 months ago

Similarly: if you write a program to randomly run through all the combinations of pixels on a decently large screen (say, 1080p) you will eventually see every important question and answer that can be expressed on a screen.

[–] skulblaka@sh.itjust.works 1 points 11 months ago (1 children)

Could we already do this by leveraging the Library of Babel?

Genuinely asking, I'm not really sure.

[–] rain_worl@lemmy.world 0 points 9 months ago

you can bookmark(?) pages

[–] AVincentInSpace@pawb.social 1 points 11 months ago

The short answer is no, and even if we could, the digit index you'd start at would have a larger binary representation than the actual data you were trying to encode.

[–] scottmeme@sh.itjust.works 0 points 1 year ago (1 children)

There's no way the copyright office is actually going to approve this right?

[–] SkyNTP@lemmy.ml 1 points 1 year ago* (last edited 1 year ago)

I think this is satire. Poe's law is stronger than ever

[–] Semi_Hemi_Demigod@lemmy.world 0 points 1 year ago (2 children)

If pi is truly infinite, then it contains all the works of Shakespeare, every version of Windows, and this comment I'm typing right now.

[–] driving_crooner@lemmy.eco.br 3 points 1 year ago (3 children)

That's not how it's works. Being "infinite" is not enough, the number 1.110100100010000... is "infinite", without repeating patterns and dosen't have other digits that 1 or 0.

[–] LodeMike@lemmy.today 0 points 1 year ago (1 children)

Yes that's why they specified pi.

[–] kogasa@programming.dev 0 points 1 year ago (1 children)

Still not enough, or at least pi is not known to have this property. You need the number to be "normal" (or a slightly weaker property) which turns out to be hard to prove about most numbers.

[–] CanadaPlus@lemmy.sdf.org 0 points 1 year ago* (last edited 1 year ago) (1 children)

Wikipedia for normal numbers, and for disjunctive sequences, which is the slightly weaker property mentioned.

[–] barsquid@lemmy.world 0 points 1 year ago (1 children)

"Nearly all real numbers are normal (basically no real numbers are not normal), but we're only aware of a few. This one literally non-computable one for sure. Maybe sqrt(2)."

Gotta love it.

[–] CanadaPlus@lemmy.sdf.org 1 points 1 year ago* (last edited 11 months ago)

We're so used to dealing with real numbers it's easy to forget they're terrible. These puppies are a particularly egregious example I like to point to - functions that preserve addition but literally black out the entire x-y plane when plotted. On rational numbers all additive functions are automatically linear, of the form mx+n. There's no nice in-between on the reals, either; it's the "curve" from hell or a line.

Hot take, but I really hope physics will turn out to work without them.

[–] HatchetHaro@lemmy.blahaj.zone 0 points 1 year ago* (last edited 1 year ago) (1 children)

to be fair, though, 1 and 0 are just binary representations of values, same as decimal and hexadecimal. within your example, we'd absolutely find the entire works of shakespeare encoded in ascii, unicode, and lcd pixel format with each letter arranged in 3x5 grids.

[–] driving_crooner@lemmy.eco.br 2 points 1 year ago (1 children)

Doesn't, the binary pattern 10101010 dosen't exists on that number, for example.

[–] leverage@lemdro.id 1 points 1 year ago

You can encode base 2 as base 10, I don't think anyone is saying it exists in binary form.

[–] fubbernuckin@lemmy.world 0 points 1 year ago (1 children)

If it's infinite without repeating patterns then it just contain all patterns, no? Eh i guess that's not how that works, is it? Half of all patterns is still infinity.

[–] OhNoMoreLemmy@lemmy.ml 0 points 1 year ago (1 children)

No. 1011001110001111... (One 1, one 0, two 1s, two zeros....) Doesn't contain repeating patterns. It also doesn't contain any patterns with '2' in it.

But pi is believed to be normal. https://en.m.wikipedia.org/wiki/Normal_number

So it should contain all finite patterns an infinite number of times.

[–] Ultraviolet@lemmy.world 1 points 1 year ago

However, as the name implies, this is nothing special about pi. Almost all numbers have this property. If anything, it's the integers that we should be finding weird, like you mean to tell me that every single digit after the decimal point is a zero? No matter how far you go, just zeroes forever?

[–] Naz@sh.itjust.works 1 points 11 months ago

shaves the sphere down with a sculptor's knife

There. 3.1416. Not perfectly round but it'll bake in the oven just fine.