Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Grumm18648h@Demolishun stolen from the interwebz. Seen this one on facebook too. It is a nice loophole :)
-
retoor26738hThis only works in real languages. But -1 works right? After two it goes beserk? Not sure, I'm just using the language proper 😂
-
@retoor I believe underflow behaviour is also system dependant - and yeah depending on the lang it could also raise an exception instead
-
Grumm18647h@retoor yes, unsigned int you get an underflow and 0 - 1 = 4,294,967,296.
But technically, the joke is not complete. If the genie is using Rust, he will get an error during debugging. So he will not be able to validate that wish. -
kiki357325hGiven that biblically accurate genies always grant wishes in the least useful way, granting 4,294,967,296 wishes will absolutely mess the world up.
-
@kiki it will be infinite wishes because as soon as it reaches 0, it underflows again.
-
retoor26735h@Grumm oh, recv returns a ssize_t, the signed version. I thought a -1 at least was possible because recv could return -1 and I thought it was a normal unsigned size_t. 0 - 1 underflows indeed, but you're spreading fake news: it's 4294967295! And the correct notation is 4.294.967.295 :p
Hmm nice, meme did led to some education for me. -
@kiki … not that it matters because even if you were using up one wish per second, you wouldn’t live long enough to reach 0 :)
-
retoor26735h@Lensflare that's correct. Checked it, and it would take two average lengths human lifes to do so many wishes every second. You made me realize how much a billion is and how short life is at the same time. Not sure if grateful to you or hate you now. Average human life is around 75 years which stands for 2,37 billion seconds. Weird that a billion is actually thousand times more in Dutch than in English. We also have "Miljard" comming after million. They call that billion. Confused me for years.
-
@kiki … unless you wish for immortality. Than it matters. But I don’t recommend that.
-
@retoor bold of you to assume I didn’t do the calculation before posting ;)
Regarding the billion/trillion in Dutch, it‘s the same in German: Milliarde/Billion. -
@Lensflare Not infinite, since when you have 1 wish it'll roll down to 0, unless you again wish for 0 wishes.
Imagine, the genie turning you into bronze while you have 4_294_967_295 wishes left over -
retoor26733h@Lensflare I would choose immortality by aging process. I have to he able to end myself if the world ends.
-
Grumm18641h@retoor google has proven that the multiverse exists so it is all good. Now that I know there are multiple versions of me in parallel universes, I sleep good. Doesn't that count as immortal ?
-
@Grumm even though there are infinite versions of you, every single one of them is mortal. How can it be considered immortality? It’s not.
-
Grumm18641h@Lensflare Yes, but at any given time (in the past or future) there should always be at least 1 version still alive. Maybe in one universe, I am just a new born. But it could be me.
Still the quote from google is : "Willow performed a standard benchmark computation in under five minutes that would take one of today’s fastest supercomputers 10 septillion years (that is, 10 to the power of 25) — a number that vastly exceeds the age of the Universe."
How can they benchmark that ? Do they take a problem where a supercomputer needs 10 hours to solve and then multiply it by 10 to the power of 24... Do they include to increase in power a supercomputer could have in the future ?
I mean, our laptops were a supercomputer at one point in the past no?
Enjoy! 😉
rant