this post was submitted on 05 Feb 2025
121 points (85.0% liked)

Programmer Humor

20357 readers
1605 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 2 years ago
MODERATORS
 
top 11 comments
sorted by: hot top controversial new old
[–] DjMeas@lemm.ee 4 points 15 hours ago

To learn about recursion, first we must talk about recursion.

[–] drmoose@lemmy.world 7 points 19 hours ago* (last edited 19 hours ago)

Took me a while to get it because it's a bit of a stretch but still somewhat funny

[–] Jumuta@sh.itjust.works 34 points 1 day ago (4 children)

is tail recursion really recursion?

[–] frezik@midwest.social 1 points 12 hours ago

Yes.

Structure and Interpretation of Computer Programs makes a distinction between recursive procedures and recursive process. A recursive procedure calls itself, but the compiler or runtime could potentially process it in an iterative way. The stack won't blow up. A recursive process, however, will always blow up the stack if left unchecked.

[–] qarbone@lemmy.world 20 points 1 day ago (1 children)

I wouldn't even really call this recursion. This is closer to a wrapper around the enjoy function to set variables so that "enjoy" doesn't throw an error.

[–] entropicdrift 8 points 19 hours ago (2 children)

The more accurate, yet not at all funny interpretation

[–] qarbone@lemmy.world 2 points 15 hours ago

I find it as funny as the original post

[–] HeckGazer@programming.dev 1 points 16 hours ago

The best kind of funny

[–] sik0fewl@lemmy.ca 16 points 1 day ago

Depends on your optimization level.

[–] MajorHavoc@programming.dev 8 points 1 day ago

Oh. Now I get it. Thanks.

[–] CanadaPlus 11 points 1 day ago* (last edited 20 hours ago)

Out of milk: Killed process 8008135

Or, alternately, if step one doesn't internally handle the cap being missing it silently hangs or halts there, and the user is too busy catatonically staring at the spout to enjoy anything.