Stamets@lemmy.dbzer0.com to RPGMemes @ttrpg.network · 3 days agoBard: Get in line. I wish for...lemmy.dbzer0.comimagemessage-square14fedilinkarrow-up1133arrow-down15
arrow-up1128arrow-down1imageBard: Get in line. I wish for...lemmy.dbzer0.comStamets@lemmy.dbzer0.com to RPGMemes @ttrpg.network · 3 days agomessage-square14fedilink
minus-squarekibiz0r@midwest.sociallinkfedilinkEnglisharrow-up17·3 days agoI wish for one unrestricted wish
minus-squareTar_Alcaran@sh.itjust.workslinkfedilinkarrow-up11·3 days agoThen I wish for two more wishes. Then I wish that wishes are an absolute value. Then I wish for a million fewer wishes.
minus-squareOzymandias1688@feddit.orglinkfedilinkEnglisharrow-up7·3 days agoThen I wish for 65,536 wishes. The genie crashes with an integer overflow error.
minus-squareddplf@szmer.infolinkfedilinkarrow-up4·3 days agoThere’s no crash, you just go back to 0. Goodbye.
minus-squarethreelonmusketeers@sh.itjust.workslinkfedilinkEnglisharrow-up2·edit-23 days agoIf num_wishes is a signed int, wouldn’t it overflow back to -65536? I suddenly owe the genie a bunch of wishes?
minus-squarebstix@feddit.dklinkfedilinkarrow-up3·3 days agoAll I have to offer is half a bowl of instant noodles, a lawnmower full of grass and toe nail clippings. So Genie, what do you wish for?
minus-squareHugucinogens@lemmy.blahaj.zonelinkfedilinkarrow-up2·edit-22 days agoNah, it doesn’t crash, now you just have to perform 65,535 wishes for the genie.
I wish for one unrestricted wish
Then I wish for two more wishes.
Then I wish that wishes are an absolute value.
Then I wish for a million fewer wishes.
Then I wish for 65,536 wishes. The genie crashes with an integer overflow error.
There’s no crash, you just go back to 0. Goodbye.
If
num_wishesis a signed int, wouldn’t it overflow back to -65536? I suddenly owe the genie a bunch of wishes?All I have to offer is half a bowl of instant noodles, a lawnmower full of grass and toe nail clippings. So Genie, what do you wish for?
Nah, it doesn’t crash, now you just have to perform 65,535 wishes for the genie.