Talk:Infinite loop

message: Wtf is the deal with this section? This article is part of the computer science wikiproject. It is not social science. 66.190.142.200 (talk) 08:11, 6 April 2008 (UTC)
replies: text: I want to point out that I just checked the "citation" Rmarkosian gives in the "infinite loops in society" paragraph. It redirects to a website he made himself. It has absolutely ZERO to do with the topic of this article and I have removed it accordingly. That is ridiculous. 66.190.142.200 (talk) 08:19, 6 April 2008 (UTC)
thread_title: Infinite loops found in society??

message: If a programmer were to create that 2-line example in QBASIC, QuickBASIC, or similar interpreter/compiler it would not be an infinite loop. The program would crash when it runs out of stack space. I changed it to:
DO
LOOP UNTIL a <> 0
This is a more correct example, as a DO LOOP instruction will not store a location in the stack for use by the RETURN function like a GOTO call does.  —Preceding unsigned comment added by 66.190.142.200 (talk) 01:05, 6 April 2008 (UTC)
replies: text: I believe you are wrong. GOSUB stores a location on the stack (because it has to return again later) but GOTO does not; it's a simple jump. 2001:630:53:26:3035:D7FD:D5B0:4A05 (talk) 14:25, 3 December 2014 (UTC)
thread_title: The example in BASIC

message: The joke here (for the non-computer-programmer) is that infinite loop links to endless loop which links to infinite loop which links to endless loop which links to infinite loop which links to endless loop which links to infinite loop which links to endless loop which links to infinite loop which links to endless loop which links to infinite loop which links to endless loop which links to infinite loop which links to endless loop which links to infinite loop which links to endless loop which . . .
: yes that's funny, but at the same time, not particularly helpful...  sorry.  Wesley
: Can't there be any jokes in the Wikipedia? Sheesh! (I won't un-revert if someone de-humorizes them.) User:Ed Poor
: There are Jokes in Wikipedia, as well as humour, laughs, fun and even Sheesh!
But surely they are not the same thing. 
I suggest that:
*An endless loop is any loop that connects back to its self with no way of getting out.
*An infinite loop is a loop constructed of an infinite number of instructions and therefore only loops back after an infinite amount of time, or, more practically, never.
user:Perry Bebbington
:I've never heard infinite loop used to mean this.  I've always heard  infinite loop used in the meaning above for endless loop:  it is defined this way in the Jargon Lexicon at http://www.tuxedo.org/~esr/jargon/   endless loop does not appear there. -- Olof
----
Thank you, Axel and Lee. It looks just about finished now. User:Ed Poor, unoffical "spirit of Larry"
----
Fair enough. user:Perry Bebbington
It seems fair game to link them to each other, it is not like the article was deleted to just include the other link!  —Preceding unsigned comment added by Bennyj600 (talk • contribs) 21:54, 27 April 2009 (UTC)
thread_title: What a joke!

message: :Technically, an infinite loop can only occur in iterative programming, which is programming that repeats itself until some condition is met.  However, infinite recursion can occur in recursive programming, and an infinitely recursive sequence can be seen as a pseudo-infinite loop. Recursive functions operate by solving part of a problem, then calling on themselves to solve the rest. For example, a recursive function to sum the numbers up to a number n might add n to the sum of the numbers up to n-1. The way this process ends is with a special case. In this situation, for instance, if n were 1 the function would return 1. It is possible to create infinite recursion by failing to have that ending condition, meaning the function theoretically calls itself forever. (It would actually run out of stack space.) Recursion is perfectly safe with an adequate ending condition.
I rewrote this.  The distinction given between infinite loop and infinite recursion above isn't exact (see "LAMBDA: The Ultimate GOTO" by Guy Steele). I used the same example (plus a more trivial one), but with code. --Mgreenbe 13:41, 23 January 2006 (UTC)
thread_title:  Infinite recursion rewrite 

message: ... null result. -- Chris 18:14, 5 November 2006 (UTC)
thread_title:  This should... 

message: Tight loop links to this article. Is it the same as infinite loop? --Abdull 08:02, 6 July 2007 (UTC)
replies: text: No. A tight loop is a loop with few instructions in the body that's executed many times (they are prime candidates for optimization). Infinite loops are often tight, but a tight loop is rarely infinite. The term "tight loop" doesn't warrant a separate article; at best it's dictionary material. The redirect isn't really appropriate, though. 82.95.254.249 15:15, 30 September 2007 (UTC)
thread_title:  tight loop 

message: Is there any standard/provable practices for avoiding and/or detecting infinite loops in a system? Can a check be made to the effect of "is this instruction causing an infinite loop? Or is that perhaps, on the contrary, theoretically impossible due to the halting problem? If so, a link and a blurb about how this problem relates to infinite loops would be useful.  —Preceding unsigned comment added by 83.89.0.118 (talk) 12:56, 27 July 2008 (UTC)
thread_title:  Request for addition 

message: ...it has been done so many times because it is funny and encyclopedic. This page is surely an exception to the "no self-links" rule, which is overwritten by the democratic rule of Wikipedia (the number of people wanting to add the link is greater than the number of people wanting to remove it). Please tell us why this argument is invalid or I'll add the link. ··gracefool☺ 10:21, 10 July 2009 (UTC)
replies: text: Could not agree more. The somewhat snarky HTML comment in that section notwithstanding, it's exactly what that section needs. It's "been done, many times", because it's AWESOME.  —Preceding unsigned comment added by 203.26.95.65 (talk) 05:09, 7 May 2010 (UTC)
thread_title:  Obviously "See also" should include a link to Infinite Loop 

message: I added one that is a perfect infinite loop, correct?  —Preceding unsigned comment added by Segiddins (talk • contribs) 00:55, 19 July 2009 (UTC)
thread_title: C++ Example

message: The image has nothing to do with the subject matter of the article, leading to confusion. There is an article on the street, this image does not belong here.  —Preceding unsigned comment added by 142.103.72.44 (talk) 16:57, 14 July 2010 (UTC)
thread_title:  Image should be removed 

message: Alderson loop is a short article should be merged here. The loop is nothing special, it's just a common type of infinite loops and there is no reason to keep it as a separate article. Zakhalesh (talk) 17:40, 19 February 2011 (UTC)
thread_title:  Merger proposal 

message: This should be redirected to Infinite loop. Ten Pound Hammer, his otters and a clue-bat • (Otters want attention) 01:58, 15 April 2011 (UTC)
thread_title:  Redirect 

message: The C example in section 1.2.1 has undefined behaviour, as the int variables will eventually overflow; on a typical non-optimizing compiler the loop will terminate.
TimothyEBaldwin (talk) 18:06, 10 February 2012 (UTC)
thread_title:  Undefined Behaviour 

message: ...are just very long loops?
This is so scientific. Long in code? Long in execution?
Does someone call a long loop pseudo-infinite?
--91.50.196.105 (talk) 19:04, 11 April 2012 (UTC)
thread_title:  Pseudo-infinite loops?? 

message: The example of an "Alderson loop," near the end of the article, is not an endless loop at all. It's fairly simple to see that if (as the comments) say, the first section of the 'if' block never executes, then the 'else' block (and therefore the 'break' statement) always executes. Am I misunderstanding the intention of the section, or is that code just plain wrong?
If I'm not misunderstanding, the author's intention was this:
while (true) {
    printf("Input a number to add to the sum or 0 to quit");
    i = getUserInput();
    if (!(i * 0)) {     // if i times 0 is false, add i to the sum
        sum += i;       // always executes; the condition should read (!(i == 0))
    } else {
        break;          // terminate the loop; exit condition exists but is never reached
    }
}
Alex Heinz (talk) 16:54, 5 September 2012 (UTC)
replies: text: .  You're right that it was broken; thanks!  I didn't use your exact logic, but tried to make something that was less involved with the if-else path. —chaos5023 (talk) 17:20, 5 September 2012 (UTC)
thread_title:  "Alderson Loop" example is incorrect 

message: This sentence clearly refers specificly to Undecidable problem that is a subcategory of the decision problem and not to decision problems in general, it was laborous to find information about undecibility from that article. Also "Undecidable problem" article refers to "Decision problem" at the very begining so that if the reader does not understand the term he or she can check that out easily. 37.136.56.173 (talk) 10:27, 22 October 2013 (UTC)
thread_title:  Undecidable problem 

message: HSCTF Participants should also be made aware that they should reverse the order of the first part and remove every other letter starting with removing the second to get their key.  — Preceding unsigned comment added by Temptemptemp42 (talk • contribs) 01:59, 20 May 2014 (UTC)
thread_title:  Very Hard HSCTF Problem 

message: I'm not sure if we should bother including it, as it is less useful, but I recently learned the following:
yes This loop is a trap!
Displays:
This loop is a trap!
This loop is a trap!
This loop is a trap!
...and so on.
NickNackGus (talk) 02:25, 8 October 2014 (UTC)
replies: text: That's not a loop per se; there is probably a loop inside the source code of the yes utility, though.--greenrd (talk) 09:21, 7 December 2014 (UTC)
thread_title:  Another BASH Example 

message: The following Wikimedia Commons file used on this page or its Wikidata item has been nominated for deletion:
* 
Participate in the deletion discussion at the . —Community Tech bot (talk) 08:23, 8 August 2020 (UTC)
thread_title:  A Commons file used on this page or its Wikidata item has been nominated for deletion 

message: Nice. Got stuck in many loops. But, why put examples in archaic langauges? Also, JS is now a prominent language. Can you add JS examples?
(or I do) Learning With Ameer (talk) 10:54, 31 January 2023 (UTC)
thread_title:  Wow, where's JS?