this post was submitted on 27 Feb 2025
396 points (97.6% liked)

Programmer Humor

30162 readers
1475 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 50 comments
sorted by: hot top controversial new old
[–] parlaptie@feddit.org 142 points 1 year ago (1 children)

Hang on, this is just a C++ joke slapped onto Rust.

[–] puchaczyk@lemmy.blahaj.zone 144 points 1 year ago (1 children)

You could say they have rewritten the joke in Rust

[–] dave@feddit.uk 17 points 1 year ago (1 children)

But you get the joke faster now.

[–] davidagain@lemmy.world 7 points 1 year ago

No, it's just impossible for it to leak out of a hole in the back of your head that you didn't realise was growing under your pony tail.

[–] Laser@feddit.org 87 points 1 year ago (2 children)
[–] enemenemu@lemm.ee 13 points 1 year ago

To me it just looks like you do not need the braces at all

[–] merc@sh.itjust.works 4 points 1 year ago

A funny, but incredibly subtle joke to do would be to do a post like this, but get the indentation subtly wrong somewhere, so something that's supposed to be inside a loop is outside according to indentation, but is inside according to braces.

[–] duckythescientist@sh.itjust.works 83 points 1 year ago (1 children)

I'm good at Python, and I don't know Rust. This looks fine to me. I've fully missed the joke.

[–] logi@lemmy.world 167 points 1 year ago* (last edited 1 year ago) (3 children)

Same. Until you notice the column of curly braces and semi colons in the right margin.

[–] ryannathans@aussie.zone 46 points 1 year ago (2 children)
[–] Viking_Hippie@lemmy.dbzer0.com 21 points 1 year ago (1 children)
[–] zlatko@programming.dev 13 points 1 year ago (2 children)

You never review code when you have no time to do an actual review? Looks good to me :)

[–] Viking_Hippie@lemmy.dbzer0.com 5 points 1 year ago (1 children)

You never review code when you have no time to do an actual review?

Nope. Then again, I never review code at all 🤷😁

[–] moseschrute@lemmy.world 8 points 1 year ago

Don’t review, don’t write tests, and don’t even do QA. All of those tasks are overhead. It’s time you could be spending completing more story points. All that matters is story points, not the customer, not your coworkers, not your happiness, not your sanity. Just story points.

load more comments (1 replies)
[–] Arcka@midwest.social 22 points 1 year ago (3 children)

Oh, so Rust is like JavaScript!

[–] barsoap@lemm.ee 7 points 1 year ago

No, Rust lacks the semicolon elision rules of Javascript which make everyone always use semicolons in javascript because they're so horribly broken.

Rust is like ML, quite literally, not just by ancestry: The syntax is palpably ugly, but at least it's sane, regular, and concise where it matters.

load more comments (2 replies)
[–] dgriffith@aussie.zone 71 points 1 year ago* (last edited 1 year ago) (1 children)

rustfmt

is stopping me from writing code like this, and I have never been more happier using it after viewing this.

[–] killeronthecorner@lemmy.world 60 points 1 year ago (2 children)

I'm going to write a tool that automatically adds the braces and semicolons to the column as you edit the code.

I will call it rustfml

[–] Irelephant@lemm.ee 11 points 1 year ago (1 children)

Crap, thats what I was thinking.

[–] verstra@programming.dev 10 points 1 year ago (1 children)

It could be run after git checkout and then rustfmt before commit.

[–] killeronthecorner@lemmy.world 5 points 1 year ago

Slow down satan

load more comments (1 replies)
[–] TheAgeOfSuperboredom@lemmy.ca 59 points 1 year ago (1 children)

Then some jerk runs rustfmt and ruins all your hard work!

[–] wise_pancake@lemmy.ca 30 points 1 year ago

Can't you fix the default format to this?

[–] Feathercrown@lemmy.world 50 points 1 year ago (1 children)

It took me way too long to notice the horror on the right

[–] mostlikelyaperson@lemmy.world 34 points 1 year ago

My medication mostly.

[–] PhobosAnomaly@feddit.uk 29 points 1 year ago (3 children)

I hate it with every fibre of my being but also secretly calmed by that column of statement terminators and brackets.

It's like the code representation of the Vancouver riots kiss photo.

load more comments (3 replies)
[–] notabot@lemm.ee 18 points 1 year ago (1 children)

This makes my deeply uncomfortable, like an itch I can't quite scratch.

[–] bitcrafter@programming.dev 2 points 1 year ago

More like a scratch you just can't itch.

[–] villainy@lemmy.world 12 points 1 year ago

DwangoAC and the TASBot crew are maniacs in the best possible way. I would like to continue having a high opinion of him, hence I will pretend that this post does not exist.

[–] CanadaPlus@lemmy.sdf.org 11 points 1 year ago (6 children)

Wow, so this is possible.

Formatting is so damn arbitrary. Somebody has to have tried storing just the parse tree on disk, right?

load more comments (6 replies)
[–] poireCartable@lemm.ee 10 points 1 year ago

My eyes! My eyes!!!!

[–] tonytins@pawb.social 9 points 1 year ago

Oh... Oh! Well, that is creative.

[–] stefenauris@pawb.social 8 points 1 year ago
[–] BigMikeInAustin@lemmy.world 7 points 1 year ago

I’ll allow it!

[–] bitcrafter@programming.dev 6 points 1 year ago

My humanity.

[–] muntedcrocodile@lemm.ee 5 points 1 year ago

I like python like really really like it. But this should be a warcrime

[–] pineapplelover@lemm.ee 4 points 1 year ago
[–] Kolanaki@pawb.social 3 points 1 year ago* (last edited 1 year ago) (2 children)

I don't know Rust. 🤷🏻‍♂️

(I mean, I don't know a lot of Python either so I can't even get the joke. 😞)

[–] Limitless_screaming@kbin.earth 14 points 1 year ago

In Rust and lots of other languages you have to end each statement with a semicolon. The semi colon is usually placed right after the statement, but in this example there's indentation after each statement before the semicolon so they're all aligned.

There's also the curly brackets, they're padded in the same way, but those usually define where a scope (block) starts and ends making it even worse.

[–] MP3Martin@programming.dev 7 points 1 year ago (2 children)

Look at the right side of the code editor

[–] Kissaki@programming.dev 7 points 1 year ago

These scrollbars with issue indicators are becoming more and more fancy

[–] asudox@lemmy.asudox.dev 6 points 1 year ago

lmao I didn't even notice

[–] mariusafa@lemmy.sdf.org 3 points 1 year ago (1 children)

This is why python has to be putdown

load more comments (1 replies)
load more comments
view more: next ›