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”
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”
unexpectedfactorial:
“Wish granted! You have 1 wish!”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.)
He is saying factorial of zero, so more a math nerd than a computer nerd.
This is why math nerds prefer to talk in a dull tone. The least bit of excitement, and your equation is suddenly wrong.
Yes. I caught the factorial reference, but wanted to address the question, in case it was also in earnest.
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)
Not only is 0 != 1, but also 0! = 1.
sadly I don’t know which one you mean :D
-
Wish 1: Wish for the numeric rule to operate in 64-bit unsigned integer space.
-
Wish 2: wish for 0 wishes.
-
Wish 3: Wish for minus 1 Wish.
Result: now be left with 1.8446744073709551616*10^19 Wishes.
-
Gotta wish for a 64-bit genie.
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.
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.
Missingno appears.
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
-
Wish 1: “I wish that my third wish will retroactively become my first wish instead, but I retain all memories from every timeline.”
-
Wish 2: “I wish that every wish I’ve made after my first wish never happened, except for my memories of them.”
-
Wish 2b: Genie… i’ve come to bargain…" user proceeds to enforce temporal paradox type 1a ‘causal-loop’ until ‘negotiation leveraging favorable terms’ for infinite wishes without the monkeys paw BS is complete
-
Wish 3: “I wish to break this cycle and return to normal linear time, keeping all accumulated memories.”
Wish1: I whish to live through various alternate realities of my choosing until I want to stop; I want to retain only the memories of it.
FTFY.
Now you’ve got two more wishes free for other stuff.
You’re welcome.
-
I’m having UFO: Enemy Unknown flashbacks.
Ah, turns out that all genies use the same code as nuclear gandhi.