• dragontamer@lemmy.world
    link
    fedilink
    English
    arrow-up
    78
    ·
    edit-2
    1 month ago

    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

      • don@lemmy.ca
        link
        fedilink
        arrow-up
        12
        ·
        1 month ago

        I corrected your mistake with the first of my “3” wishes lol

    • greenskye@lemmy.zip
      link
      fedilink
      arrow-up
      25
      ·
      1 month ago

      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.

    • dalekcaan@feddit.nl
      link
      fedilink
      arrow-up
      15
      ·
      1 month ago

      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.

      • dragontamer@lemmy.world
        link
        fedilink
        English
        arrow-up
        14
        ·
        edit-2
        1 month ago

        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.

      • Jerkface@lemmy.world
        link
        fedilink
        arrow-up
        17
        ·
        1 month ago

        Updating the balance after granting the wish is bad practice. This genie is begging for a reentrancy attack.

      • bestelbus22@lemmy.world
        link
        fedilink
        arrow-up
        6
        ·
        edit-2
        1 month ago

        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.

    • pinball_wizard@lemmy.zip
      link
      fedilink
      arrow-up
      28
      ·
      edit-2
      1 month ago

      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.)

    • thirteene@lemmy.world
      link
      fedilink
      arrow-up
      11
      arrow-down
      1
      ·
      1 month ago

      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)
      
  • ZkhqrD5o@lemmy.world
    link
    fedilink
    arrow-up
    14
    ·
    1 month ago
    • 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.

  • Deestan@lemmy.world
    link
    fedilink
    arrow-up
    12
    ·
    1 month ago

    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.

  • SmokeyDope@lemmy.world
    link
    fedilink
    English
    arrow-up
    5
    ·
    edit-2
    1 month ago
    • 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.”

    • ragas@lemmy.ml
      link
      fedilink
      arrow-up
      2
      ·
      1 month ago

      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.