403
top 50 comments
sorted by: hot top controversial new old
[-] parlaptie@feddit.org 146 points 1 month ago

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

[-] puchaczyk@lemmy.blahaj.zone 148 points 1 month ago

You could say they have rewritten the joke in Rust

[-] dave@feddit.uk 18 points 1 month ago

But you get the joke faster now.

[-] davidagain@lemmy.world 8 points 1 month 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 1 month ago
[-] enemenemu@lemm.ee 15 points 1 month ago

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

[-] merc@sh.itjust.works 5 points 1 month 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 84 points 1 month ago

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 169 points 1 month ago* (last edited 1 month ago)

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

[-] ryannathans@aussie.zone 48 points 1 month ago
[-] Viking_Hippie@lemmy.dbzer0.com 22 points 1 month ago
[-] zlatko@programming.dev 13 points 1 month ago

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 month ago

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 month 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 23 points 1 month ago

Oh, so Rust is like JavaScript!

[-] barsoap@lemm.ee 7 points 1 month 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)
[-] duckythescientist@sh.itjust.works 9 points 1 month ago

Oh... Oh god

[-] dgriffith@aussie.zone 72 points 1 month ago* (last edited 1 month ago)

rustfmt

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

[-] killeronthecorner@lemmy.world 62 points 1 month ago

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 month ago

Crap, thats what I was thinking.

[-] verstra@programming.dev 10 points 1 month ago

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

[-] killeronthecorner@lemmy.world 5 points 1 month ago

Slow down satan

load more comments (1 replies)
[-] TheAgeOfSuperboredom@lemmy.ca 60 points 1 month ago

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

[-] wise_pancake@lemmy.ca 30 points 1 month ago

Can't you fix the default format to this?

[-] Feathercrown@lemmy.world 51 points 1 month ago

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

[-] mostlikelyaperson@lemmy.world 34 points 1 month ago

My medication mostly.

[-] PhobosAnomaly@feddit.uk 30 points 1 month ago

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 month ago

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

load more comments (1 replies)
[-] villainy@lemmy.world 14 points 1 month 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 month ago

Wow, so this is possible.

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

[-] Lightfire228@pawb.social 2 points 1 month ago

If you do that, you lose formatting and comments every time you load the source from disk

[-] CanadaPlus@lemmy.sdf.org 3 points 1 month ago* (last edited 1 month ago)

Losing formatting other than what you've set in your deparser would be the point. Losing comments would be bad, but that seems easily fixable just by giving each comment block a symbol that points to it's contents.

[-] djehuti@programming.dev 3 points 1 month ago

Or by including comments in the parse tree. (& Yes, it is done various places for various languages and formats.)

load more comments (2 replies)
load more comments (1 replies)
[-] poireCartable@lemm.ee 10 points 1 month ago

My eyes! My eyes!!!!

[-] tonytins@pawb.social 9 points 1 month ago

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

[-] stefenauris@pawb.social 9 points 1 month ago
[-] BigMikeInAustin@lemmy.world 8 points 1 month ago

I’ll allow it!

[-] bitcrafter@programming.dev 6 points 1 month ago

My humanity.

[-] muntedcrocodile@lemm.ee 5 points 1 month ago

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

[-] pineapplelover@lemm.ee 4 points 1 month ago
[-] Kolanaki@pawb.social 3 points 1 month ago* (last edited 1 month ago)

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 month 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 month ago

Look at the right side of the code editor

[-] Kissaki@programming.dev 7 points 1 month ago

These scrollbars with issue indicators are becoming more and more fancy

[-] asudox@lemmy.asudox.dev 6 points 1 month ago

lmao I didn't even notice

[-] mariusafa@lemmy.sdf.org 3 points 1 month ago

This is why python has to be putdown

load more comments (1 replies)
load more comments
view more: next ›
this post was submitted on 27 Feb 2025
403 points (97.9% liked)

Programmer Humor

22233 readers
1929 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