this post was submitted on 05 Feb 2025
160 points (100.0% liked)

Programmer Humor

22220 readers
1650 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
[–] [email protected] 40 points 1 month ago (4 children)

is tail recursion really recursion?

[–] [email protected] 26 points 1 month 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.

[–] [email protected] 10 points 1 month ago (2 children)

The more accurate, yet not at all funny interpretation

[–] [email protected] 4 points 1 month ago

I find it as funny as the original post

[–] [email protected] 1 points 1 month ago

The best kind of funny

[–] [email protected] 18 points 1 month ago

Depends on your optimization level.

[–] [email protected] 9 points 1 month ago

Oh. Now I get it. Thanks.

[–] [email protected] 1 points 1 month 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.

[–] [email protected] 12 points 1 month ago* (last edited 1 month 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.

[–] [email protected] 8 points 1 month ago* (last edited 1 month ago)

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

[–] [email protected] 5 points 1 month ago

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