r/rustjerk 2d ago

Well, actually (unlike Rust)

214 Upvotes

r/rustjerk 4d ago

Never use an unsafe block in rust.

Post image
198 Upvotes

Just write C since its unsafe by default!

repo


r/rustjerk 5d ago

just started rust, so excited!!!

Post image
307 Upvotes

what season are you guys on??


r/rustjerk 5d ago

1.97.1 slander

Post image
478 Upvotes

r/rustjerk 8d ago

Just found an unbelievable oversight with Cargo workspaces

Enable HLS to view with audio, or disable this notification

191 Upvotes

Do you like using Cargo workspaces? Think again.

I just discovered a fatal bottleneck with them. Can't believe the team behind haven't fixed this yet:

Once you start having closer to 1000 workspace member crates (very reasonable for a beginner/junior level codebase) expect compilation to take AGES!

I'm actively working on finding out how deep this rabbithole goes by exhaustively generating ALL possible Rust crates. I'm calling this endeavour the workspace-of-babel.

This kind of blatant disregard for user experience makes me sick 🤮.

https://github.com/sermuns/workspace-of-babel


r/rustjerk 9d ago

Finally, a crate for the working class 🇺🇸

Post image
125 Upvotes

Tired of NaN gatekeeping you out of .max()? Tired of the elite establishment (Rust std) telling you Ord is a requirement to find the biggest number? Not anymore.

Introducing WalmartMaxxingâ„¢, peak API design. .walmart_max() / .walmart_min(), works on anything with PartialOrd, because if it can be compared, it can be compared, and the constitution guarantees your right to fold() over it in O(n) unoptimized freedom.

No Ord. No NaN propaganda. No total order. Just vibes and PartialOrd.

Rollback pricing on borrow checker requirements. Always low, always safeâ„¢ (narrator: it was not always safe).


r/rustjerk 9d ago

What started as a joke became a huge deal

Post image
410 Upvotes

r/rustjerk 10d ago

Why do people use round brackets incorrectly?

110 Upvotes

In Rust, we have many different brackets: curly {}, square [], angle <>, flat ||, round (). Every single kind has its semantics, but it's a bit inconsistent, and that irritates me.

Curly brackets are for code evaluation. You need to actually do something, you put it into curly brackets. Plain and simple.

Angle brackets are for generics. They are the most consistent. You declare a generic with it; you turbofish a generic with it. Almost perfect, save '::' in turbofish. Duh.

Flat brackets are for lambdas, but for some reason, to call lambdas, we use round ones. Inconsistency, but tolerable.

Round brackets are for static lists. Tuples and function arguments. Fine.

Square brackets are for arrays and indexes, and this is strange. [1,2,3][1] - it's readable, but we have () for static lists, right? It should be (1,2,3)[1] - but this fails, we need (1,2,3).1. WAT? What does [0][0] even mean? Why do the first three characters mean something completely different from the second three? Why [1,2,3][1] compiles, but [1][1,2,3] don't? I'm furious, but ok. Square brackets are array-related, and even if the exact syntax is unclear, you can figure it out from the context. Not user-friendly for sure.

But why, WHY did language designers decide to allow round brackets for some - only some - evaluations? If you need to evaluate anything, you put it in curly brackets:

{3 + 5} * {10 - 4} // this works

(3 + 5) * (10 - 4) // WTF is tuple multiplication? 
// Why it works like tuple.0 * tuple.0, but only for 1-sized tuples? Madness!

{ // evaluate everything one by one, perfect
    do_first();
    do_second();
    do_third();
}

( // but yet this is an error! WHY????!!!
    do_first();
    do_second();
    do_third();
)

I think we need a major language overhaul to remove at least some of these inconsistencies.

Also a shoutout for language designers for operators. It was a great idea to build in the dot into some of the most common operations. Just imagine if we had to write something like a.*(b) instead of a*b. This helps a lot.

UPD: fixed wording, thanks to u/sphere_cornue


r/rustjerk 11d ago

Huge if trué. If not, also huge

Post image
252 Upvotes

r/rustjerk 13d ago

I just want to return

Post image
218 Upvotes

r/rustjerk 13d ago

Anon likes Rust

83 Upvotes

r/rustjerk 14d ago

what the fuck was past me thinking when writing this

Post image
160 Upvotes

r/rustjerk 14d ago

I ran out of lifetimes

Post image
279 Upvotes

What do I do?

There's only 27 letters in the alphabet. I need more lifetimes.


r/rustjerk 15d ago

Zealotry got perma'd from a C sub, need cope from church of ferris

147 Upvotes

hello fellow borrowers in christ. got permabanned from r/C_Programming today for going through their weekly showcase thread and informing every poster that their code was objectively dangerous, definitionally UB, and probably leaking memory somewhere even if they couldn't see it. guy posted a bubble sort, i told him his pointer arithmetic was a ticking time bomb. mods didn't love that.

so what did you do today in the name of ferris. confess below, ferris is watching and ferris is pleased


r/rustjerk 15d ago

Anyone can prompt an llm to rewrite into Rust, but does Anthropic have the courage to rewrite critical software in C?

80 Upvotes

r/rustjerk 16d ago

Careful out there everyone

162 Upvotes

r/rustjerk 17d ago

Can someone report? This should not compile

Post image
271 Upvotes

I knew I should have just learned C


r/rustjerk 17d ago

I wouldn't said it's borrowed.

Post image
226 Upvotes

r/rustjerk 18d ago

Running any function on a computer with non-ECC memory is undefined behavior.

143 Upvotes

r/rustjerk 20d ago

WTF the standard document contains book advertisements

Post image
287 Upvotes

r/rustjerk 20d ago

Do you know the answer?

Post image
297 Upvotes

r/rustjerk 22d ago

I'm tired of hearing people pronounce "serde" incorrectly

167 Upvotes

It's not:

  • SERDAY
  • SEERDAY
  • SERDEE
  • SEERDUH
  • SERDEEZNUTS

It's "serde" as in merde. Please for the love of god pronounce it with a proper french accent.


r/rustjerk 24d ago

Rust programming is addictive because it is like a toxic ex.

161 Upvotes

You begin to build something, and the analyzer starts yelling at you. „A field never read here! A missing match arm there! Stupid idiot!“

The whole file is one big squiggly accusation, aimed at your very existence. How dare you write any code at all? You try to guard yourself with todo!()s, you do everything to not provoke its wrath. You never succeed.

But then, you build a little more, things fall in place, and suddenly, Rust calms down. Stops yelling at you. And you get these happy feels inside, knowing you did something right! Rust still loves you, see how nice and warning-free it can compile!

Until you start with the next feature, and the vicious cycle repeats.

Edit: This post is not written by an LLM. It was hand-crafted, inspired by the muse of sleep deprivation. When we can‘t jerk anymore, are we still human? Whatever. I‘m logging off.


r/rustjerk 26d ago

Rust Reference

14 Upvotes

Ferris