this post was submitted on 16 Mar 2025
790 points (98.2% liked)

Programmer Humor

21706 readers
391 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
790
C++ (ani.social)
submitted 4 days ago* (last edited 4 days ago) by kiri@ani.social to c/programmer_humor@programming.dev
 
you are viewing a single comment's thread
view the rest of the comments
[–] brucethemoose@lemmy.world 136 points 4 days ago* (last edited 4 days ago) (2 children)

Meanwhile, Rust punches you in the face for the mere suggestion. Again. And again.

Python happily nods, runs it one page at a time, very slowly, randomly handing things off to a C person standing to the side, then returns a long poem. You wanted a number.

Assembly does no checking, and reality around you tears from an access violation.

EDIT: Oh, and the CUDA/PyTorch person is holding a vacuum sucking money from your wallet, with a long hose running to Jensen Huang's kitchen.

[–] caseyweederman@lemmy.ca 37 points 4 days ago (1 children)

Rust just keeps telling me "you didn't actually learn how references work" over and over

[–] SatouKazuma@programming.dev 12 points 4 days ago

Lifetime annotations go brr

[–] stingpie@lemmy.world 11 points 3 days ago (2 children)

I refuse to believe the python one ever happens. Unless you are importing libraries you don't understand, and refuse to read the documentation for, I don't see how a string could magically appear from numeric types.

[–] expr@programming.dev 4 points 2 days ago (1 children)

You don't see how type mismatch errors can happen in a dynamically-typed language? Then why do they happen all the time? Hell, I literally had a Python CLI tool crash with a TypeError last week.

[–] stingpie@lemmy.world 3 points 2 days ago (1 children)

That's not what I'm saying at all. What I'm trying to say is that I can't think of any way a program working with numeric types could start outputting string types. I could maybe believe a calculator program that disables exceptions could do that, but even then, who would do that?

[–] expr@programming.dev 1 points 1 day ago

The point of the joke is not that the Python interpreter will change types mid-program on its own, but that you don't have any real way of knowing if you're going to get the type you expect.

Programs are messy and complicated, and data might flow through many different systems before finally being used for output. It can and often does happen that one of those systems does not behave as expected, and you get bugs where one type is expected but another is used in actuality.

Yes, most likely what would happen in Python is a TypeError, not actual output, but it was pretty clearly minor hyperbole for the sake of the joke.

[–] ArsonButCute@lemmy.dbzer0.com 3 points 3 days ago

LLMs are often python based, so they're not wrong per se, I just wouldn't consider them to be correct