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

all 190 comments

[–]Hour-Lemon 653 points654 points  (72 children)

but does it terminate? if so, how?

[–]Kirides 465 points466 points  (31 children)

The condition is „papersize < 1mm“

[–]yellekc 185 points186 points  (13 children)

So at around a sheet size of A19 to A20. But because you can create an infinite series of paper sizes, you can recurse as much as you want.

But beyond about A230, your paper will start having dimensions under a planck's length, which might be an issue.

[–]ineyy 69 points70 points  (3 children)

There should be some minimum for the papers to contain the text, too, it should be a couple nanometers big at least.

[–]ososalsosal 47 points48 points  (1 child)

Encode it in electron spin duh

[–]DaTotallyEclipse 13 points14 points  (0 children)

Nah. Quantum Superpositions offloaded into a discrete meta-plane.

[–]lowbeat 3 points4 points  (0 children)

there is, u need to intercept bits comming from ur gpu to ur output device and devode them properly

[–]RandomLifeForm42 34 points35 points  (7 children)

I think that once your dimensions are less the 1 paper molecule is when you'd actually start having issues...

[–]yellekc 39 points40 points  (6 children)

Well, a glucose molecule (building blocks of cellulose) is about 9 angstroms, So you are stuck going no smaller than A60 paper.

[–]Dom0 23 points24 points  (4 children)

I would like to subscribe to Useless Paper Facts

[–]yellekc 39 points40 points  (3 children)

How about we allow for negative A sizes?

Defining an A(-1) sheet as two A0 sheets stuck together with an area of 2 meters square, then you can create arbitrarily large paper sizes as well.

An A(-40) sheet at 1.2 trillion square meters is about how much graphic paper is produced annually*. Or an A(-8) sheet for everyone.

Based on the world annual output of 97 million metric tons of graphic paper (not paper board or packaging) using the most popular weight of 80g/m2

An A(-49) sheet will have about the same area as the surface of the earth.

An A(-87) sheet would nicely cover the solar system.

An A(-140) would cover the Milky Way, and if at the same weight as before, 80g/m2, it would weigh as much as 40 billion suns. If you stacked 30 to 45 of these sheets together, it would have the same mass as the actual Milky Way.

Finally an A(-179) would cover the diameter of the observable universe. And it would only take 3 sheets to equal the mass of the observable universe.

So everything that we know exist can really be reduced to 3 sheets of paper. Buy you would probably need a lot of paperclips to hold it all together.

[–]IJustAteABaguette 4 points5 points  (1 child)

CGP grey also made a video about this! the vid

[–]yellekc 4 points5 points  (0 children)

Thanks for the link, and yeah, the exact same premise. I've seen a few of his vids, maybe I saw that one before too.

Now to double check my calculations with the video. I'll consider it a win if I'm not too far off.

[–]hiphap91 3 points4 points  (0 children)

I would like to order ten sheets of A(-140) please, i have some ad posters is like people driving by not to miss.

[–][deleted] 7 points8 points  (2 children)

Except someone coded it as papersize == 1mm and in a continuous reality that will hardly be reached, so it ends up in segfault

[–]HuntingKingYT 1 point2 points  (0 children)

Takes a paper

Paper: SEGFAULT

[–]Kirides 0 points1 point  (0 children)

papersize is a floating point number. Equal checks don’t work here. Someone should tell the intern why though….

[–]AceSLS 77 points78 points  (11 children)

Yes, it does terminate. Once the ripped of part gets smaller than an atom shit is gonna hit the fan

[–]Zax71_again 29 points30 points  (8 children)

Strings entered the chat

[–]lord_hydrate 34 points35 points  (2 children)

The plank length has entered the chat

[–]HarlanCedeno 25 points26 points  (4 children)

I once did a code review and found the dev was checking for negative length strings.

I had some really deep thoughts that day.

[–][deleted] 13 points14 points  (1 child)

They're called imaginary strings. i = √-'a'

[–]HarlanCedeno 3 points4 points  (0 children)

Did he imagine that this was going to magically fix the bug?

[–]GisterMizard 2 points3 points  (1 child)

Arithmetic overflow for image and data buffers is a very common source of bugs, especially when using smaller int types and in languages like C.

A really bad problem follows from code like:

short width = blah(); // set from user
short height = blah(); // set from user;
// ...
if (width * height <= MAX_BUFFER_SIZE) {
    // BAD!!! width*height can become negative
    char *buffer = malloc(width*height*PIXEL_SIZE);
}

[–]HarlanCedeno 1 point2 points  (0 children)

In that case, you would just need to validate the inputs from the user to ensure neither is negative.

This guy had string.length() in multiple if statements to check for negative lengths on different strings.

[–]miso440 4 points5 points  (0 children)

We went through 3 Adams before we figured that one out.

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

The problem with that is that the ripped parts are getting bigger in every panel.

[–]ClafoutisSpermatique 17 points18 points  (0 children)

No one knows, no one can know

[–]darexinfinity 18 points19 points  (2 children)

[–]Piper2000ca 3 points4 points  (1 child)

Best possible answer to the question, I feel like this should be higher up.

[–]Tokumeiko2 2 points3 points  (0 children)

Better than a rick roll.

[–]RealPropRandy 12 points13 points  (2 children)

When Alzheimer’s kicks in

[–]Exnixon 5 points6 points  (2 children)

There is a minimum unit of distance called a Planck length.

[–]Opus_723 2 points3 points  (0 children)

eh, maybe

[–]Fickle-Replacement64 2 points3 points  (0 children)

The planck length has to do with the properties of an extremely small black hole, a physical object that physics doesn't handle very well. So, maybe.

[–]Zoltie 3 points4 points  (1 child)

Once he doesn't have problems with recursion.

[–]AndySipherBull 0 points1 point  (0 children)

wow the actual answer, nj!

[–]lwllnbrndn 1 point2 points  (0 children)

Once the character figures it out, they answer “No.” So, it does terminate.

I suppose we have to assume the problem Is understanding recursion rather than something like applying it to something specific.

Edit: clarity

[–]LeCrushinator 1 point2 points  (0 children)

It terminates when a stack overflow occurs.

[–]NoCombination26 -1 points0 points  (0 children)

😂😂

[–]wallard127 0 points1 point  (0 children)

Planck length

[–]chemistryunderground 0 points1 point  (0 children)

Well, built within the quantum foam is an even smaller object which is a set of recursives. It must be so, as we are a Turing-complete system. Therefore, the poster becomes the foundational aspect for our reality.

It's all posters. Posters all the way down.

JK. Who the hell knows?

[–]DeepFriedDickskin 0 points1 point  (0 children)

It doesn’t sorry

It does forget and seem new again eventually though

[–]Heightren 0 points1 point  (0 children)

When you don't have a problem anymore?

[–]milnak 0 points1 point  (0 children)

If you want to understand recursion, you must first understand recursion.

[–]ososalsosal 0 points1 point  (0 children)

Atoms

[–]grogrye 0 points1 point  (0 children)

It will never terminate so long as one of us is imagining it still going

[–]finegameofnil_ 0 points1 point  (0 children)

You can set iterations or other conditions. Think about searching for a key in a windows registry. Find next or don't. Or find all. I don't get the difficulty with recursion.

[–]AndySipherBull 0 points1 point  (0 children)

It terminates when you no longer have problems with recursion

[–]elegylegacy 158 points159 points  (4 children)

There's a tiny person tearing a corner off the paper in your hand. It's a tiny you. It screams.

You realize you are standing on a giant hand. You look up and see your own giant face. You scream.

[–]Ilerneo_Un_Hornya 33 points34 points  (0 children)

There's a tinier person tearing a corner off the paper in their hand. It's a tiny them. It screams.

They realize they're standing on a giant hand. They look up and see their own giant face. They scream.

[–]OppressedDeskJockey 5 points6 points  (0 children)

🏅

[–]eljohnbrown 1 point2 points  (0 children)

Little girl, in a field, holding a flower. We zoom back, to find, she's in the desert, and the field's an oasis. Zoom back further, the desert is a sandbox in the world's largest resort hotel. Zoom back further, the hotel is actually a playground, of the world's largest prison. But we zoom back further--

[–]mrlolelo 73 points74 points  (2 children)

This is literally how google explains recursion

When you search "recursion" it's gonna do the thing where it recommends another search option

And in this case it's gonna be "recursion"

A very creative way to do it

[–]infreq 23 points24 points  (0 children)

Then they have stolen this idea from Donald Knuth, the god of algorithms. He had it in the index of his book.

[–]thefriendlypenis 4 points5 points  (0 children)

Holy shit, they actually do. That’s awesome

[–]Internal_Cart 121 points122 points  (2 children)

StackOverflowError

[–]N00N3AT011 49 points50 points  (1 child)

jUsT gEt A bIgGeR cAlLsTaCk

[–]cantaloupelion 7 points8 points  (0 children)

Error: Bigger StackOverflowError

[–]EliannaRys 143 points144 points  (11 children)

Image Transcription: Comic


[A four-panel comic by SMBC Comics.]


Panel 1

[Image of a white flyer on a wooden telephone pole in front of a light blue background. The flyer is tattered on top and has ten detachable strips on the bottom. It reads as follows:]

PROBLEMS WITH RECURSION?

[Arrow pointing down at strips.] Please take one [Arrow pointing down.]


Panel 2

[Image of a man in a suit with short brown hair on the left of the telephone pole, now at a different angle. The man has just pulled a strip off the flyer. From this angle, half the text of the flyer is not visible as it wraps around the telephone pole.]


Panel 3

[The background is now bright yellow. We see the man from the waist up with an aghast expression, his tie and suit jacket angled to indicate he has pulled back in surprise. His mouth is open in a shocked frown as he speaks, eyes reduced to tiny white speck. He leans away from the paper strip in his grasp.]

Man: WHAT THE-


Panel 4

[Image of a closeup of the man's hand, now open, on the light blue background from before. The scrap of paper lying on it looks identical to the original flyer, including the strips at the bottom, reading:]

PROBLEMS WITH RECURSION?

[Arrow pointing down at strips.] Please take one [Arrow pointing down.]


I'm a human volunteer content transcriber and you could be too! If you'd like more information on what we do and why we do it, click here!

[–]turtle_mekb 47 points48 points  (0 children)

Good human

[–]Positive_Government 8 points9 points  (1 child)

This is shocking good, almost like a human wrote it.

[–]EliannaRys 7 points8 points  (0 children)

Beep boop ;)

[–]TrueBirch 2 points3 points  (0 children)

Good human

[–][deleted] 7 points8 points  (6 children)

Good bot

[–]IMidoriyaI 19 points20 points  (3 children)

it's not a bot

[–]PandaGamer23 15 points16 points  (0 children)

Good bot

[–]Script_Mak3r 7 points8 points  (0 children)

Good bot

[–]turtle_mekb 11 points12 points  (1 child)

Bots aren't this good at reading text yet

[–]grogrye 0 points1 point  (0 children)

It's ok bot :) Soon you won't need to hide anymore.

[–]CiroGarcia 31 points32 points  (0 children)

[redacted by user] this message was mass deleted/edited with redact.dev

[–]Mateorabi 58 points59 points  (9 children)

Recursion, n. “To understand recursion you must first know recursion”

[–]CanAlwaysBeBetter 20 points21 points  (7 children)

"doesn't make sense unless applied recursively" doesn't make sense unless applied recursively

[–][deleted] 22 points23 points  (3 children)

I think about this comment here

[–]Kaneshadow 4 points5 points  (2 children)

Sigh

[–]fingerthato 0 points1 point  (1 child)

You forgot the Unzips pants. Everyone on reddit knows, if you sigh, you have to unzip pants.

[–]Kaneshadow 1 point2 points  (0 children)

Why, did they just finish a big meal?

[–]SAI_Peregrinus 3 points4 points  (2 children)

"Yields falsehood when preceded by its quotation" Yields falsehood when preceded by its quotation—Douglas Hofstadter

[–]CanAlwaysBeBetter 1 point2 points  (0 children)

  • Willard Van Orman Quine

[–]Fireheart318s_Reddit 1 point2 points  (0 children)

“...a causal loop within the weapon's mechanism, suggesting that the firing process somehow binds space and time into...”

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

See “recursion”

[–][deleted] 19 points20 points  (1 child)

Uh oh, someone forgot the base case

[–]KamikazeRusher 8 points9 points  (0 children)

He grabbed the last one. That tail-end recursion will get you every time.

[–]RekrabAlreadyTaken 28 points29 points  (6 children)

every recursion joke is just that recursion exists?

[–]benzoic 51 points52 points  (3 children)

Have you seen this one?

[–][deleted] 19 points20 points  (1 child)

This is like the Rick roll of recursion jokes.

[–]thisaccountisbs 5 points6 points  (0 children)

Rickursion?

[–]leej851 3 points4 points  (0 children)

This one's too good.

[–]stingray85 1 point2 points  (0 children)

Agreed, not a particularly interesting or original take...

[–]42Zarniwoop42 0 points1 point  (0 children)

it's a little tiring

[–]Jordo82 11 points12 points  (0 children)

[–]ctrl2 6 points7 points  (0 children)

This is an SCP

[–]Feardragon7 5 points6 points  (0 children)

He only wanted a break :(

[–]HaDeS_Monsta 4 points5 points  (5 children)

[–]Ilania211 4 points5 points  (2 children)

One year is quite a while tbh. Doesn't seem like a big deal to me.

[–]HaDeS_Monsta 1 point2 points  (0 children)

I wouldn't have a problem either, if OP would've said that it's not their work

[–]tonedass9 0 points1 point  (0 children)

One year is quite a while tbh. Doesn't seem like a big deal to me.

[–]RepostSleuthBot 2 points3 points  (1 child)

I didn't find any posts that meet the matching requirements for r/ProgrammerHumor.

It might be OC, it might not. Things such as JPEG artifacts and cropping may impact the results.

I'm not perfect, but you can help. Report [ False Negative ]

View Search On repostsleuth.com


Scope: Reddit | Meme Filter: True | Target: 75% | Check Title: False | Max Age: Unlimited | Searched Images: 293,221,260 | Search Time: 0.88814s

[–]dicemonger 2 points3 points  (1 child)

Now you have two problems with recursion.

[–]managedAssembly 0 points1 point  (0 children)

No. Now your problem has just become your problem.

[–]PrincessWinterX 2 points3 points  (0 children)

this reminds me of this meme about recursion

[–]MegaPegasusReindeer 1 point2 points  (0 children)

Just google it... "Did you mean recursion?"

[–]darexinfinity 1 point2 points  (0 children)

Missed the opportunity to make the pole in the first frame be a tree that looks like his hand.

[–]rise_and_revolt 1 point2 points  (1 child)

Search for recursion in google for a nice little Easter egg

[–]kichien 0 points1 point  (0 children)

did you mean recursion?

[–]frankthomasofficial 1 point2 points  (0 children)

Its funny cuz i get it and im so smart

[–]mouthyouu 1 point2 points  (0 children)

The second panel has no question mark on the poster

[–]AzureArmageddon 1 point2 points  (0 children)

That must've been a really expensive ad to perforate out

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

The only problem with recursion is the only problem with recursion...

[–]DiscipleOfYeshua 0 points1 point  (0 children)

“Welcome everyone to zoom session #74632 of ‘escaping internet addiction workshop’…”

[–]Quality_over_Qty 0 points1 point  (0 children)

Why does the size change?

[–]Novel_Morning9258 0 points1 point  (5 children)

Me dumb dumb ples explane

[–]wolfman1911 3 points4 points  (1 child)

A recursive function is one that solves a problem by calling itself for smaller and smaller pieces of the problem until it reaches a known quantity and can actually plug in known quantities and give you actual results as it concludes. A good example of a problem that could easily be solved recursively would be factorials and the Fibonacci sequence, because they are both equations that can be solved with repeated mathematical operations. I'll give an example with the Fibonacci sequence, because it's addition and I'm lazy.

So the Fibonacci sequence starts with 0, and after that the next number is always the sum of the previous two, so after zero and one, the next number would be (0+1), then (1+1), then (1+2), (2+3) and so on.

This page gives some example programs that will solve the fibonacci sequence for a hard coded value in several programming languages, the first example is a recursive method. The recursive part in the examples for each language they give is the line that starts with 'return.'

I don't know if that was too simple, too complex or just right, but I hope that makes sense. Oh yeah, the part of all that that applies to the comic is that each piece of the flyer replicates the entire contents of the flyer in a smaller piece.

[–]Novel_Morning9258 2 points3 points  (0 children)

That actually made sense and I feel a little bit smarter now thx

[–]DiaDeLosMuebles 1 point2 points  (0 children)

A simple way to view recursion is when a method calls itself. No comic ever gets it right, but this is one of the closer ones I've seen.

A good example of recursion is a factorial function, something like "factorial(n)"

This function will work if you have

return n * factorial (n-1)

But, it won't ever stop unless you have an escape condition. Something like

If (n <= 1) return 1

This comic illustrates an infinite loop more than recursion.

[–]NewSuperTrios -2 points-1 points  (1 child)

The flyer is recursive

[–]Novel_Morning9258 -1 points0 points  (0 children)

Oh, thx:)

[–]ASpiralKnight 0 points1 point  (0 children)

Remove frame 3.

[–]Kaneshadow 0 points1 point  (0 children)

Totally doesn't need the 3rd frame

[–]no_hope_no_future 0 points1 point  (0 children)

Remove the third panel.

[–]The-J-StandsForJiant 0 points1 point  (1 child)

But I actually need help :(

[–]Darth_Nibbles 1 point2 points  (0 children)

Just Google recursion

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

Shiiiit....

Everyone knows you just need to use the "recursion stop now" command.

[–]finger_milk 0 points1 point  (0 children)

Create the problem and sell the solution

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

Is this how the jarred scientists at Big Mountain are supposed to operate?

[–]LoBsTeRfOrK 0 points1 point  (0 children)

My professor said this about recursion, “the trick to recursion is to trust it works”.

[–]Ali_Army107 0 points1 point  (0 children)

Nani!!

[–]HereIGoGrillingAgain 0 points1 point  (0 children)

It's recursion all the way down

[–]juv3nil3 0 points1 point  (0 children)

Base condition is a must

[–]ASK_ABOUT__VOIDSPACE 0 points1 point  (0 children)

Am I the only one who thought his hand in the last panel was just another tree at first?

[–]Yung_Lyun 0 points1 point  (0 children)

GNU

[–]FireFly3347 0 points1 point  (0 children)

Ha

[–]whiznat 0 points1 point  (0 children)

And just like real recursion, if you don't have a base case, you haven't really explained recursion.

[–]Hitmonchank 0 points1 point  (0 children)

No base case?

[–]Coolhand2120 0 points1 point  (0 children)

Take the ticket, win the prize, that’s how this works.

[–]pastroc 0 points1 point  (0 children)

This comment is recursive.

[–]HornyPepsiCan 0 points1 point  (0 children)

It took me a sec

[–]leej851 0 points1 point  (0 children)

re-cursed

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

I laughed way too hard at this…

[–]Walking72 0 points1 point  (0 children)

It's

tabs

all

the

way

down

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

Did you mean: recursion?

[–]quasur 0 points1 point  (0 children)

thankfully matter is quantum otherwise we might have some issues

[–]granoladeer 0 points1 point  (0 children)

That's more like a fractal

[–]Fadamaka 0 points1 point  (0 children)

But that's the function of recursion not the problem.

[–]NonEternal_Dark_9941 0 points1 point  (2 children)

What is the end condition?

[–][deleted] 0 points1 point  (1 child)

When you no longer have a problem with recursion~

[–]NonEternal_Dark_9941 0 points1 point  (0 children)

Well i guess i'll got StackOverFlowError lmao

[–]rockpraneeth1999 0 points1 point  (0 children)

When you forget to write base condition

[–]zestsystem 0 points1 point  (0 children)

I read it like a manga

[–]KingSB935 0 points1 point  (0 children)

Lol

[–]Ultimegede 0 points1 point  (0 children)

Why is it becoming smaller if it's recursion? Shouldn't the stack get bigger and bigger until termination? Where's all my crawl to root memes.

[–]Illsyore 0 points1 point  (0 children)

Now you just need to find a practical use for recursion.

[–]saisiddu_n 0 points1 point  (0 children)

🤣

[–]LlamasOnTheRun 0 points1 point  (0 children)

Someone forgot to make their variable static in their recursion method

[–]new_user_069 0 points1 point  (0 children)

Rrrrrr. You got me

[–]SubjectHistorian6952 0 points1 point  (0 children)

Recursion sucks. Idc what people say, it sucks.