8 bit rule
8 bit rule
8 bit rule
unexpectedfactorial:
\
"Wish granted! You have 1 wish!"
Whispering:
Make it -1 you mean. 0 is still a valid uint_8
-1 comes from the wish to make the total 0.
but they asked for 0! = 1 wishes, so it should be 1 - 1 = 0 wishes remaining, and not 0 - 1 = -1
sorry, but i had to !unexpectedfactorial@sopuli.xyz
Updating the balance after granting the wish is bad practice. This genie is begging for a reentrancy attack.
If the genie knows the wish counter automatically decrements after every wish execution, he should set the wish counter to 1 to fullfill a total of 0 wishes. But since he's a genie I'm sure he has unrestricted rights to modify the wish counter.
But 0!=1, what am I missing here?
Genie grants the wish, and then deducts one from the pool of remaining wishes.
Edit 1: And it is implied that the Genie stored the number of remaining wishes as an eight bit unsigned integer, where subtracting one from zero gives 255.
It is worth noting that unsigned integer subtract-from-zero exploits were common in video games from around the time that Disney's Aladdin was released.
Edit 2: No discussion of amusing subtract-from-zero bugs is complete without a link to Nuclear Gandhi. (Even though it is now believed not to have been a subtract-from-zero bug.)
Its a quirk in binary math with 8 digits. If you "roll the odometer" past 0, it resets to 255
0000 0011 (3) -0000 0001 (1) =0000 0010 (2) 0000 0000 (0) -0000 0001 (1) =1111 1111 (255)
I think you missed the joke
Not only is 0 != 1, but also 0! = 1.
sadly I don't know which one you mean :D
I don't see how the vacuously true statement 0 != 1 has any relevance here.
First, "make it 0!" - * Number *! As a "surprise factorial" (as seen in comments in this very thread making this exact joke) is a common joke in threads like this and that was the only connection I could make for this meme, having no previously knowledge of binary quirks.
Second, I don't know if you were trying to be a dick or you're just some overly wordy ass clown high on your own farts, but how on earth is me explaining what I thought a joke meant, showing why it didn't work, and then asking for help to understand it vacuous?
Result: now be left with 1.8446744073709551616*10^19 Wishes.
Plot twist: The dialogue for "You have X wishes!" was not written beyond 3, so he now overflows into unused memory and just screams incoherent garbage at you.
Gotta wish for a 64-bit genie.
For a moment I read it as 0!
(zero factorial) and was super confused.
Shouldn't it be -1, not 0?
Depends. If the wish counter decrements after fulfilling the wish, then it works.
0 = 0!
false
it is what it would appear to be using the logic that n! = n*(n-1)*...*1, but 0! was "chosen" to be 1
Missingno appears.
I'm having UFO: Enemy Unknown flashbacks.
Ah, turns out that all genies use the same code as nuclear gandhi.
Btw: the original Aladdin story had no three wishes rule.
Aladdin just spammed the heck out of wishes. Got everything he ever wanted.
The only part of the Disney movie that's accurate is when the sorcerer returns, teleports the Sultan (of China) palace to Africa, and Aladdin needs to use the weaker Genie of the Ring to steal the Genie of the Lamp back through trickery.
The princess of China (yeahhhhhh) helps Aladdin out a bit IIRC.
But yes, palace teleportation, sorcerer wishing to be Sultan, that's the legitimate part lol
It was me who wished everyone after me to be limited to three wishes
I corrected your mistake with the first of my “3” wishes lol
I'd kick your ass if I didn't spend all three of my wishes on churros from 7-11. :/
The Disney genie was also just a scam. Aladdin explicitly wished to be a prince. Not look like a prince or be as rich as a prince or have a parade like a prince. But actually be one.
Instead he's revealed to be a 'fake prince' because the genie half assed his wish.
"Eh, good enough, ticket closed"
I always thought he was a "fake prince" because he was the prince of a country that didn't exist. Like, sure, you're the prince of this nonexistent country, see how far that gets you I guess. Otherwise Genie would either have to make new land out of nowhere somehow, or displace people who already lived/ruled in a location, which seems somewhat against the rules.
Next you'll tell me Hercules wasn't a demigod because he drank all but one drop of the humanification juice after he was stolen from Zeus, the ever-faithful husband.
While Hercules is impressively wrong, I knew Aladdin was a fun original read when it began with 'In the Far East Kingdom of China....'
Hercules, for all of its faults, actually takes place in Greece. Which is kinda sorta close to Rome (Hercules is his Roman name lol. Heracles is his Greek name).
On the other hand, Aladdin might be a fake story all together. As in, some French Guy may have made up Aladdin as part of his translation of 1001 Arabian Nights. IIRC, Arabs don't know wtf that story is doing in the (French) book.
So Aladdin might be an entirely fake addition to the 1001 Arabian Nights novel. Canonically fake. So it's in the true spirit of Aladdin (and 1001 Arabian Nights) to screw with the story anyway.
"accurate"