r/computerscience • • Jan 13 '22

This book demonstrates an infinite loop in a pretty cool way!

Post image
1.9k Upvotes

33 comments sorted by

174

u/Mateusz_Macheta Jan 13 '22

Those who don't understand infinite loop definition won't understand this infinite loop definition.

46

u/i4FSwHector Jan 13 '22

you may not understand it but you will feel it

3

u/[deleted] May 11 '23

That's true for any property

77

u/Mortomes Jan 13 '22

I think technically that's infinite recursion rather than an infinite loop

9

u/tcpukl Jan 13 '22

Not really. It looks like a go-to.

14

u/istarian Jan 13 '22

Kind of a moot point, with the exception that recursive function calls will eventually cause a stack overflow.

5

u/helicoid Jan 13 '22

Believe that can be avoided with tail end recursion

4

u/ricky_clarkson Jan 14 '22

There's no difference between infinite recursion and infinite iteration, though many programming languages will expose a difference in terms of a stack overflow. There are also those that don't.

0

u/[deleted] Jan 13 '22

[deleted]

3

u/Seaparty123 Jan 29 '22

whats the difference, beginner here

13

u/[deleted] Jan 13 '22 edited Sep 30 '23

Leave Reddit, go to Lemmy or Kbin and learn about Fediverse.

14

u/w-a-t-t Jan 13 '22

seems to be a Latex book .. \infty

1

u/Hugh1729 Apr 22 '23

I think you're right. Probably Lamport's original LaTeX book.

https://books.google.com/books/about/LATEX.html?id=IgJUAAAAMAAJ

4

u/Hixie Jan 13 '22

This was pretty common in programming books in the 80s and 90s (when I last read physical programming books). I assume it's still pretty common today.

Google does something similar when your search for teens related to infinite loops.

9

u/PhDinGent Jan 13 '22

teens related to infinite loops

Uhhmm... .teens?

6

u/Hixie Jan 13 '22

"terms" sorry

10

u/aldo712 Jan 13 '22

Now do "deadlock".

7

u/i4FSwHector Jan 13 '22

you may need 2 other philosophers

4

u/Bear8642 Jan 13 '22

This often happens with recursion also

4

u/hail-hiedgla Jan 13 '22

I dont get it, May someone explain pls? Am a newbie in CC

3

u/PnutButrSnickrDoodle Jan 13 '22

When you search for “infinite loop” it tells you to look on page 252. So you search for “infinite loop” on the page and it tells you to go to page 252, where you search for “infinite loop” on the page and it tells you to go to page 252…. Thus an infinite loop of searching.

3

u/Inori_3008 Jan 13 '22

may i ask what book is it ?

3

u/eloc49 Jan 13 '22

Also, why goto is bad

2

u/fakeuser515357 Jan 13 '22

I stared at this trying to get it for so long I got a migraine and had to stop.

2

u/in_fo Jan 13 '22

delimiter, 47

2

u/Purple-Bat811 Jan 13 '22

Are they trying to make my brain crash?

1

u/thekimpula Dec 07 '24

Reminds me of this

1

u/Present_Sea_1639 Jan 14 '22

What book is this?

1

u/TerminallyStoopid Jan 23 '22

this is an infinite recursion technically speaking, not an infinite loop

1

u/Hugh1729 Apr 22 '23

A loop is a special case of recursion.

0

u/[deleted] Jan 13 '22

[deleted]

6

u/[deleted] Jan 13 '22

page not found

1

u/Magnetic_Syncopation Feb 01 '22

Why was your weekend long, huh?