this post was submitted on 27 Feb 2025
392 points (97.8% liked)

Programmer Humor

21460 readers
1765 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 145 points 2 weeks ago (1 children)

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

[–] puchaczyk@lemmy.blahaj.zone 145 points 2 weeks ago (1 children)

You could say they have rewritten the joke in Rust

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

But you get the joke faster now.

[–] davidagain@lemmy.world 8 points 1 week 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 92 points 2 weeks ago (2 children)
[–] enemenemu@lemm.ee 14 points 2 weeks ago

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

[–] merc@sh.itjust.works 5 points 1 week 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 82 points 2 weeks 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 168 points 2 weeks ago* (last edited 2 weeks ago) (3 children)

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

[–] ryannathans@aussie.zone 48 points 2 weeks ago (2 children)
[–] Viking_Hippie@lemmy.dbzer0.com 22 points 2 weeks ago (1 children)
[–] zlatko@programming.dev 13 points 2 weeks 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 2 weeks 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 7 points 2 weeks 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.

[–] merc@sh.itjust.works 2 points 1 week ago

LGTM: Large Glitches, Test More!

[–] Arcka@midwest.social 23 points 2 weeks ago (3 children)

Oh, so Rust is like JavaScript!

[–] barsoap@lemm.ee 6 points 2 weeks 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 72 points 2 weeks ago* (last edited 2 weeks 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 61 points 2 weeks 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 2 weeks ago (1 children)

Crap, thats what I was thinking.

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

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

[–] killeronthecorner@lemmy.world 5 points 2 weeks ago

Slow down satan

load more comments (1 replies)
[–] TheAgeOfSuperboredom@lemmy.ca 60 points 2 weeks ago (1 children)

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

[–] wise_pancake@lemmy.ca 30 points 2 weeks ago

Can't you fix the default format to this?

[–] Feathercrown@lemmy.world 49 points 2 weeks ago (1 children)

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

[–] mostlikelyaperson@lemmy.world 34 points 2 weeks ago

My medication mostly.

[–] PhobosAnomaly@feddit.uk 30 points 2 weeks 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 2 weeks ago (1 children)

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

[–] bitcrafter@programming.dev 2 points 2 weeks ago

More like a scratch you just can't itch.

[–] villainy@lemmy.world 13 points 2 weeks 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 2 weeks 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 2 weeks ago

My eyes! My eyes!!!!

[–] tonytins@pawb.social 9 points 2 weeks ago

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

[–] stefenauris@pawb.social 9 points 2 weeks ago
[–] BigMikeInAustin@lemmy.world 8 points 2 weeks ago

I’ll allow it!

[–] bitcrafter@programming.dev 6 points 2 weeks ago

My humanity.

[–] muntedcrocodile@lemm.ee 5 points 2 weeks ago

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

[–] pineapplelover@lemm.ee 4 points 1 week ago
[–] mariusafa@lemmy.sdf.org 3 points 2 weeks ago (1 children)

This is why python has to be putdown

load more comments (1 replies)
[–] Kolanaki@pawb.social 3 points 2 weeks ago* (last edited 2 weeks 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 2 weeks 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 2 weeks ago (2 children)

Look at the right side of the code editor

[–] Kissaki@programming.dev 7 points 2 weeks ago

These scrollbars with issue indicators are becoming more and more fancy

[–] asudox@lemmy.asudox.dev 6 points 2 weeks ago

lmao I didn't even notice

load more comments
view more: next ›