r/ProgrammerHumor • • 18h ago

Meme blueScriptForBonk

656 Upvotes

60 comments sorted by

View all comments

39

u/RomanProkopov100 18h ago

If unlikely is a constant which is both boolean (used in a perchance statement) and float (defined as a fraction), does the perchance statement choose the branch randomly according to the passed boolean-fraction?

38

u/Lanse012 18h ago

oh no that definition was more to show its a 5% chance, its just a boolean not a float

probably is only 95% chance

maybe is only 50% chance

29

u/WolleTD 18h ago

Having generic float probabilities for perchance statements is a desired feature!

I require 42% chance in certain projects!

12

u/Lanse012 17h ago

oh good idea ill add that

20

u/Mordret10 17h ago

Please only add the 42%. We don't need any more options and it would make it more clunky

6

u/Lanse012 16h ago

oh true

1

u/Snudget 5h ago

If the float is > 1, it behaves like a for loop. And if it's < 0? It, sends all your RAM to Sam Altman

14

u/NoAdsDude 18h ago

does the perchance statement choose the branch randomly according to the passed boolean-fraction

probably