this post was submitted on 21 Jul 2025
1448 points (99.0% liked)

Programmer Humor

26762 readers
3001 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
 
you are viewing a single comment's thread
view the rest of the comments
[–] Semi_Hemi_Demigod@lemmy.world 267 points 2 months ago (4 children)

I bet the wheel would be better if it was written in Rust.

(Disclaimer: I have never actually written Rust.)

[–] BatmanAoD@programming.dev 144 points 2 months ago* (last edited 2 months ago) (1 children)

Hello, Rust developer. [My name, etc.] It works fine, and is written in C++. [Rest of challenge is the same.]

Truly diabolical

[–] NeatNit@discuss.tchncs.de 63 points 2 months ago (2 children)
[–] BatmanAoD@programming.dev 35 points 2 months ago (1 children)

I know!! How can Jigsaw claim it "works fine"? He'd probably say something like "it's battle-tested and state of the art." What does that even mean??

[–] 0x0@lemmy.zip 9 points 2 months ago

Military-grade.

[–] SubArcticTundra@lemmy.ml 14 points 2 months ago

*passes Valgrind*

[–] FuglyDuck@lemmy.world 77 points 2 months ago (2 children)

rust is a terrible material for wheels. Corrosion is not usually a good thing.

[–] CanadaPlus@lemmy.sdf.org 37 points 2 months ago (1 children)

You just have to rebrand it as "iron-based ceramic".

[–] FuglyDuck@lemmy.world 10 points 2 months ago (1 children)

I shudder at the thought of potholes.

[–] CanadaPlus@lemmy.sdf.org 3 points 2 months ago

I guess we'll have to reinvent a pneumatic tire as well to protect it.

[–] saltesc@lemmy.world 8 points 2 months ago

I think they mean to write the word "wheel" into surface rust.

[–] pivot_root@lemmy.world 48 points 2 months ago* (last edited 2 months ago) (1 children)

Look, I'm not saying the wheel is wrong. It rotates, but what if two people try to turn the wheel at the same time, in opposite directions?

What if—instead of risking misuse of the wheel—we have a my_wheel::Wheel, which only one person can rotate at any given time? The multiverse could enforce this safety at compile time by making it impossible for there to exist a universe where two people both think they own the right to rotate the wheel. In fact, it could even make it impossible for me to lend out the wheel to more than one person at a time.

And, maybe... we could make the wheel even better. Cars rest on top of wheels, sure. But what if I wanted to make a car that rests on top of other cars? If we rotate the super-car's wheels, we don't want to make the sub-cars flap around—we want the sub-car wheels to rotate. It would be more future-proof to make a Wheel trait, then to make RubberTyre implement Wheel. Then, if we ever needed to make cars into wheels, we could have them also implement Wheel—but delegate the responsibility of rotating to their own wheels.

In fact, we should make it into a whole library. Our other projects could need wheels. Mr. Mittens might need them eventually!

[–] nathanjent@programming.dev 7 points 2 months ago

If the goal is speed then just use a few turbofish.

[–] carotte@lemmy.blahaj.zone 26 points 2 months ago (1 children)

Disclaimer: I have never actually written Rust.

neither have most of the people advocating for (or against) rewriting stuff in Rust lol

[–] boonhet@sopuli.xyz 12 points 2 months ago

I'll have you know, I've started several projects in Rust!

Only to realize I don't have time to do unpaid work even if it IS fun.