this post was submitted on 08 Apr 2025
387 points (98.3% liked)

Programmer Humor

23047 readers
1553 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 16 comments
sorted by: hot top controversial new old
[โ€“] vk6flab@lemmy.radio 33 points 3 weeks ago (1 children)

Fortunately you're likely to run out of memory or swap space and it will stop all by itself ๐Ÿ˜‡

[โ€“] princess@lemmy.blahaj.zone 20 points 3 weeks ago (1 children)

tail call optimization wants to know your location

[โ€“] vk6flab@lemmy.radio 12 points 3 weeks ago (2 children)

I've been writing software for over 40 years and this is the first I have ever heard of this. Much appreciated.

I'm still trying to grok it, but for anyone playing, here's where I started:

https://stackoverflow.com/questions/310974/what-is-tail-call-optimization#310980

[โ€“] princess@lemmy.blahaj.zone 8 points 3 weeks ago (1 children)

i am glad my shitposting was educational

though tbh you're unlikely to ever need this knowledge unless you're heavily into functional programming or golfing or coding interviews or other esoteric arts

[โ€“] vk6flab@lemmy.radio 2 points 3 weeks ago
[โ€“] UndercoverUlrikHD@programming.dev 5 points 3 weeks ago (1 children)

Functional programming would have quite the problem if it wasn't a thing.

[โ€“] vk6flab@lemmy.radio 4 points 3 weeks ago (1 children)

It's funny. When I first started, functional programming was going to be the next big thing. It bubbled along for a decade or so. I interviewed company founders about their functional software projects.

Nothing happened.

Sure there are a few, let's call them niche, applications, but you just have to look around and see that object orientation made a bigger splash and even that is beginning to be evaluated.

Perhaps functional software will have its day in the limelight, but with the latest AI slop fad, it's going to be a while.

[โ€“] wise_pancake@lemmy.ca 3 points 3 weeks ago

The of the ideas of functional programming have gone on to influence the field.

Algebraic data types and monads are used heavily in Swift/Rust/Scala/Typescript.

Concepts like left/right associativity and pure functions are critical to the entire MapReduce paradigm of computing. Apache Spark, pandas, and the entire dataframe programming paradigm is basically functional programming (though most people suck at pandas and treat it like an object oriented tool).

I think a lot of React is also heavily inspired by functional programming, and modern concurrency schemes are inspired by functional programming.

F# and Haskell didn't win the language wars. I've worked on one erlang project and it was neat, but I think you're right, I mostly see MVC apps.

[โ€“] KickMeElmo@sopuli.xyz 9 points 3 weeks ago

Could be worse. I once experimented with a debug-level function that ran on every line of text printed to the console. And had a typo, which threw an error. Which printed to the console.

[โ€“] capuccino@lemmy.world 5 points 3 weeks ago

until your stack runs out of memory

[โ€“] Reptorian@programming.dev 3 points 3 weeks ago (1 children)

I had this problem only once. Luckily, I do not need recursion. I know my way using iterative process.

[โ€“] ulterno@programming.dev 1 points 3 weeks ago (1 children)
[โ€“] Reptorian@programming.dev 2 points 3 weeks ago (1 children)

I actually use repeat(iterations,index_name(optionall),);. No need for i++ or ++i for loop in many cases.

[โ€“] ulterno@programming.dev 1 points 3 weeks ago (1 children)
[โ€“] Reptorian@programming.dev 2 points 2 weeks ago

Yeah. repeat() is unique to a few language. I think just Scala, and G'MIC has it. I use the second one. It's more convenient than say for(p=0,p<5,++p,);. Sometimes, repeat(5,); suffice.

[โ€“] Czarb@lemmy.world 1 points 3 weeks ago

He's not making the function call past n-1