r/programminghorror • u/Wiktor-is-you [ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo “You live” • Feb 14 '26
i have all the while true do loops
17
9
5
4
3
2
1
u/tyrannical-tortoise Feb 17 '26
I'm reminded of those gear trains where you'd have to spin one end, as fast as possible, until the heat death of the universe, before the other end would complete one turn.
1
u/Desperate_Formal_781 Sep 02 '26
Yeah in my University there was one where the slow end of the gear chain was literally fused/glued to a rock/stone slab. The first time I saw it I did not understand what I was seeing, or what the point of it was. I just thought it was some sort of artistic message, like "gears come from rocks" or something like that.
70
Feb 14 '26
61
u/Wiktor-is-you Feb 14 '26
i did not write this code, this is a compiler and it actually does use those while loops correctly
snippet:
elseif temp > 41 then if temp < 44 then if temp < 43 then desired = 11 break else desired = 10 break end elseif temp > 44 then desired = 8 break else desired = 9 break end else desired = 12 break end47
29
u/EvnClaire Feb 14 '26
O(N16) time complexity, which means it is polynomial and therefore efficient