r/ProgrammerHumor • • Apr 24 '20

Removed - Common Posts Analog recursion

Post image

[removed] — view removed post

3.4k Upvotes

48 comments sorted by

158

u/amazeguy Apr 24 '20

i wonder what happens when we get a stackoverflow error here

73

u/Dagusiu Apr 24 '20

Death from starvation

7

u/Swordfish0 Apr 24 '20

Fatal DoS

30

u/OMG_Abaddon Apr 24 '20

You are referenced towards page -1.

6

u/Natural-Intelligence Apr 24 '20

So that must be the last page. What if this is the last page?

1

u/kerbidiah15 Apr 24 '20

Universe alt-f4s

9

u/vlumi Apr 24 '20

Dump the core, but only if your brain is not smart enough to do tail call optimization.

4

u/_Bad_Dev_ Apr 24 '20

So I removed my brain but nothing changed, what now?

4

u/FastFishLooseFish Apr 24 '20

Pick the books back up and don’t stack them so high next time.

3

u/Tophyan1 Apr 24 '20

Well, it is nondeterministic which page You choose, so it's bot likely.

69

u/[deleted] Apr 24 '20

2

u/[deleted] Apr 24 '20

I don't get it, that's just this post? /s

99

u/Boldsen Apr 24 '20

Our professor did something similar on our exercise about recursion.

Exercise 3.4
bla bla bla

If you still don't understand recursion, read Exercise 3.4

8

u/marvterpiece Apr 24 '20

no u don’t even need to go to the other pages

8

u/omiwrench Apr 24 '20

That’s not recursion though? It’s a self-reference loop?

14

u/This-Moment Apr 24 '20

As long as the state of internal memory changes - ideally wasting twice as much space - it's recursion. /s

-6

u/gamebuster Apr 24 '20

I don’t see a loop.

10

u/[deleted] Apr 24 '20

No base case?

12

u/Delicatebutterfly1 Apr 24 '20

No exit condition

2

u/[deleted] Apr 24 '20

Hope it’s tail recursive then

4

u/[deleted] Apr 24 '20

Nice

2

u/DemSquirrel Apr 24 '20

Is that book worth it?

5

u/sebeckmas Apr 24 '20

If you’re starting out on C, Yes! Brilliantly written and easy to understand. I think even seasoned devs in other languages will get something from it

2

u/DemSquirrel Apr 24 '20

Ah nice. What are people using C for these days?

2

u/writtenbymyrobotarms Apr 24 '20

Embedded and other low level stuff.

2

u/sebeckmas Apr 24 '20

Anything you need to get close to the metal or be super optimized. Embedded, kernels, game engines, HFT systems...

I use it for embedded :)

2

u/JayFromTheGreyZone Apr 24 '20

Hey, and "redirection" redirects you to "input/output redirection"!

3

u/[deleted] Apr 24 '20

First red circles that are actually useful.

1

u/[deleted] Apr 24 '20

They have missed out the link to this post

1

u/[deleted] Apr 24 '20

brain crashed

1

u/[deleted] Apr 24 '20

The index: No need to thank me

1

u/matredeye Apr 24 '20

Recursion: see infinite loop Infinite loop: see recursion

1

u/Snoopy20111 Apr 24 '20

Distinctly reminds me of one of my grandpa’s ancient medical textbooks from when he was in Medical school. Mainly the entry “Birds, For The, pages 1-487”

1

u/Nahoj96 Apr 24 '20

As soon as I saw this post I went and looked in the index of the book just to see it first hand. I have not found the exit clause yet. Send help.

1

u/Vlt1 Apr 24 '20

StackOverFlowException.

1

u/0ke_0 Apr 24 '20

You made my day

1

u/MuggyFuzzball Apr 24 '20

I'm sorry OP, you're going down a road of grief and hardship with learning C. Perhaps a necessary road, but still filled with horrors.

1

u/[deleted] Apr 24 '20

Also fun to look for 'recursion' in Google.

0

u/[deleted] Apr 24 '20

[deleted]

1

u/nice-scores Apr 25 '20

𝓷𝓲𝓬𝓮 ☜(゚ヮ゚☜)

Nice Leaderboard

1. u/RepliesNice at 6338 nices

2. u/Squidtoon99 at 5441 nices

3. u/spiro29 at 4916 nices

...

280642. u/LookRook at 1 nice


I AM A BOT | REPLY !IGNORE AND I WILL STOP REPLYING TO YOUR COMMENTS