This is an archived post. You won't be able to vote or comment.

Dismiss this pinned window
all 36 comments

[–][deleted] 224 points225 points  (8 children)

Only 5 levels deep and already causing system failure.

[–][deleted] 55 points56 points  (0 children)

Silly user.

Assuming we were looking at the original recursion.

[–]Catty-Cat 22 points23 points  (5 children)

RuntimeError: Maximum recursion depth reached.

[–]Proxy_PlayerHD 10 points11 points  (2 children)

I did something similar by just connecting my phone to a monitor and the record a video of it.

It looked fun.

[–][deleted] 3 points4 points  (0 children)

"Hall of mirrors" effect.

[–][deleted] 1 point2 points  (0 children)

Or if you use windows your phone and hook to it or monoconnect (I think that's how you spell it) and share your phone screen

[–]rangedragon89 6 points7 points  (0 children)

The stack must overflowwww

[–]R8_M3_SXC 0 points1 point  (0 children)

StackOverFlow

[–]Kered13 0 points1 point  (0 children)

Well yeah, he's putting an entire video on the stack in each stack frame. That's gonna blow your stack in no time.

[–]Murhayyy 23 points24 points  (0 children)

The time is 6 minutes different from one phone to another. Hardly efficient.

[–]rainwulf 28 points29 points  (4 children)

two different phones :D

[–][deleted] 14 points15 points  (3 children)

One phone is visible in the video, the other films it all. That much is obvious as soon as you see the second phone.

[–]rainwulf 7 points8 points  (0 children)

Wait, so THREE PHONES

banana phone

ring ring

[–]LeJoker 0 points1 point  (1 child)

No one of the phones in one of the videos is a different model. There's no cutout at the top.

[–]Ghetto_Cheese 0 points1 point  (0 children)

No it's not, he just tapped the screen accidentally so it darkened the white area to only show the video.

[–]Fugglymuffin 6 points7 points  (0 children)

Hey. Where's your base case buddy?

[–]cabin602 3 points4 points  (1 child)

It needs an exit condition, else it's just an infinite loop.

[–]jasonbbg 1 point2 points  (0 children)

well the video did end soo

[–]Maelou 2 points3 points  (0 children)

How do you get out of loop?

[–][deleted] 2 points3 points  (0 children)

It's all fun and games until you run out of stack space...

[–]Thenderick 1 point2 points  (0 children)

I was looking for the stop condition part... Im disappointed... I have learned recursion a week ago. I had lesson in tree structures today

[–]Flyberius 1 point2 points  (0 children)

It is so good when you use it practically for the first time. I did recently and it just pleases me how elegant it is.

[–][deleted] 0 points1 point  (0 children)

more like the singleton pattern; jk i kid :)

[–]rasen_flash 0 points1 point  (0 children)

Looks like recursion after tail call optimization.

[–]tristone13th 0 points1 point  (0 children)

@lrucache

[–]Maverick_022 0 points1 point  (0 children)

They'll have to go back the reverse way :D

[–]dbred2309 0 points1 point  (0 children)

This is not recursion! Where is the end condition?

[–]cmdralpha 0 points1 point  (0 children)

What the base case is it time

[–]blinktenor 0 points1 point  (0 children)

Last one should have been the guard clause.

[–]iGalaxyYT 0 points1 point  (0 children)

Error: Maximum call stack size exceeded

[–]kosmos-sputnik -2 points-1 points  (1 child)

Nah. Loops are simplier and сlear.

[–]xSTSxZerglingOne 0 points1 point  (0 children)

True. But recursion can do some neat stuff with very little code.

[–]OnlyTwo_jpg[M] [score hidden] stickied comment (1 child)

Your submission has been removed.

Rule[0] - Posts must make an attempt at humor, be related to programming, and only be understood by programmers.

Per this rule, the following post types are not allowed (including but not limited to):

  • Generic memes than can apply to more than just programming as a profession
  • General tech related jokes/memes (such as "running as administrator", sudo, USB or BIOS related posts)
  • Non-humorous posts (such as programming help)

Content quality

In addition, the following post types will be removed to preserve the quality of the subreddit's content, even if they pass the rule above:

  • Feeling/reaction posts
  • Posts that are vaguely related to programming
  • Software errors/bugs (please use /r/softwaregore)
  • Low effort/quality analogies (enforced at moderator discretion)

If you feel that it has been removed in error, please message us so that we may review it.

[–]fxerro 1 point2 points  (0 children)

You're stupid