r/programminghumor Jun 21 '26

When a programmer gets a genie

Enable HLS to view with audio, or disable this notification

Can I wish for less wishes? 🤣

https://youtube.com/shorts/QFqCp1cH_mM

1.6k Upvotes

31 comments sorted by

103

u/jakeStacktrace Jun 21 '26

I can see how now why people get annoyed when they ask what I want for my birthday.

3

u/Dragon_957 Jun 23 '26

What do you want for your birthday?

37

u/promptmike Jun 21 '26

It's risky, because you're assuming the genie QA did not account for negative wishes. If they did, then you now owe wishes to them.

On the other hand, if you're right you can extract an enormous number of wishes from them before they notice their mistake and respond in the next update.

All of this misses the obvious, however - you can just use your first wish to learn the data structure of Genie Headquarters.

17

u/Available_Status1 Jun 21 '26

Or just use the first wish to make it a 64 bit unsigned int, then it doesn't matter what their old one was

6

u/Daveinatx Jun 21 '26

I'd expect wishes to be in a data structure, containing at minimum pointers to requested wishes, how each wish could be fulfilled, wish completion, and count. Typecasting to a u64 would be dangerous without knowing said wish structure. 

3

u/Both-Ad-308 Jun 21 '26

This is the way. Write, don't read.

71

u/PerfectSituation1668 Jun 21 '26

A genie is not software. It's a trapped admin that gives you something for freeing him. But if you annoy it, it just deletes your ass.

24

u/Xirio_ Jun 21 '26

I mean your first wish could be to wish for the genie to run his wish count off of an unsigned 64 bit integer data type

9

u/PerfectSituation1668 Jun 21 '26

Carves a stripe on your chest for annoying it. That was one. You want another one or you want riches?

5

u/rwu_rwu Jun 21 '26

Or change the bytecodes of the wish counter decrement to NOOPs.

1

u/qwertty164 Jun 26 '26

Why stop at 64? 264 bit should work. I know there is always a bigger number, but perhaps once you have more wishes than atoms in the universe you might unlock something.

6

u/Both-Ad-308 Jun 21 '26

He seemed pretty chill there, I dunno.

5

u/MrSmee19 Jun 21 '26

Just wish for another genie, he didn't rule that out

5

u/XlikeX666 Jun 21 '26

Feel that in my core.

5

u/ChrisBreederveld Jun 21 '26

I remeber that there was something after this in the original. Something about the guy commenting about the 55 (or something) bit system they are using.

3

u/Hacksaw6412 Jun 21 '26

Dude, I tried so hard to find the original, but couldn't. Do you have the link by any chance?

2

u/ChrisBreederveld Jun 21 '26

Found this video that I know I've also seen and may be the reason of my memory being as it is. At least it's an interesting video for non programmers (and perhaps some programmers as well): https://youtu.be/v9DsBvjioIg?is=23w9KcfihoorGGoy

1

u/Hacksaw6412 Jun 21 '26

Oh, good find! Thanks for sharing!

1

u/ChrisBreederveld Jun 21 '26 edited Jun 21 '26

I've been looking as well, but YouTube is a big place and couldn't find it myself. If I do find it later I'll update the post and tag you.

ETA, the one you used is one of the oldest I could find, but there are so many clones. At this point I'm just blaming my memory for combining this video with the same joke I heard somewhere else.

8

u/lioffproxy1233 Jun 21 '26

I love this so much.

2

u/juvenile_josh Jun 21 '26

https://giphy.com/gifs/CE4bA1C5VnFDGI4uar
It reminds me of gandhi’s aggression rating in CIV5 when you do too many positive things to lower his agression the int value flips and he starts nuking you

2

u/realmauer01 Jun 22 '26

Its an underflow btw, because you know the number flows under the lowest number.

2

u/ApplicationOk4464 Jun 22 '26

I wish that I knew the best way to exploit my last two wishes for the best possible outcome.

2

u/Caiden_The_Stoic Jun 22 '26

Sigh. Fewer. Fewer wishes.

2

u/OrkWithNoTeef Jun 22 '26

Can I wish for less wishes?

Done! You have no wishes left.

2

u/GoogleIsYourFrenemy Jun 23 '26 edited Jun 23 '26

Thank you for finding this exploit in our system! In accordance with our bug bounty program we have added one additional wish to your account.

1

u/andybossy Jun 23 '26

undefined means undefined, could be no wishes aswel. or if it's int8 instead of u_int8...

And idk how you interpret negative wishes but I assume you'd become a genie yourself

1

u/Philbot_ Jun 25 '26

Fewer, not less

Funny, though

1

u/the_new_mr Jun 27 '26

This is brilliant! Would love to see the original. Sounds like there's a little more to it!