461
submitted 2 days ago* (last edited 2 days ago) by siriusmart@lemmy.world to c/programmer_humor@programming.dev

made in gimp, with <3

Context for actual rust programmersI was having massive beef with the rust compiler yesterday, every cargo check takes 20 seconds.

And then look at the three functions below, only one of them are Send, if you know why, please let me know.

(Note: value that is not Send cannot be held across an await point, and Box is not Send)

async fn one() {
    let res: Result<(), Box<dyn Error>> = do_stuff();
    if let Err(err) = res {
        let content = err.to_string();
        let _ = do_stuff(content).await;
    }
}

async fn two() {
    let res: Result<(), Box<dyn Error>> = do_stuff();
    let content = if let Err(err) = res {
        Some(err.to_string())
    } else {
        None
    };
    drop(res);
    if let Some(content) = content {
        let _ = do_stuff(content).await;
    }
}

async fn three() {
    let content = {
        let res: Result<(), Box<dyn Error>> = do_stuff();
        if let Err(err) = res {
            Some(err.to_string())
        } else {
            None
        }
    };
    if let Some(content) = content {
        let _ = do_stuff(content).await;
    }
}

you are viewing a single comment's thread
view the rest of the comments
[-] anyhow2503@lemmy.world 79 points 2 days ago

I get that it's supposed to be a meme, but aside from the first one these aren't even rust stereotypes. Is this a meme specifically for people who haven't used rust, know nothing about rust but have maybe heard that it's a programming language?

[-] nightlily@leminal.space 28 points 2 days ago

Yeah, part of the point of Rust is that it does exactly what you tell it - sometimes to the point of absurdity. No implicit casting for instance.

[-] MoffKalast@lemmy.world 7 points 2 days ago* (last edited 2 days ago)

And here I was thinking most of our programming problems come from the thing doing exactly what we told it to, but didn't quite think the process through enough. Or at all.

[-] Fontasia@feddit.nl 15 points 2 days ago

This is for people who learnt C++ in 2008 and refuse to believe that they've never fucked up a malloc in their lives

[-] limer@lemmy.ml 2 points 2 days ago

Hah I learned c++ in the 90s and never felt shame for messing up an allocation.

I think when this happens, I have a puddle of memory, the spilled ram “lubricates” the pointers, which often rub against each other. The wasted memory acts like oil does to a rusted chain. It’s helping push the program through the finish line.

Yes, I am having fun here

[-] communism@lemmy.ml 15 points 2 days ago

I mean Rust is definitely known for long compilation times but yeah otherwise I am not sure how any of this is Rust-specific. Maybe by "doesn't do what you tell it to do" they mean the borrow checker and strict compile time checks...?

[-] siriusmart@lemmy.world 7 points 2 days ago

i've edited the post content for context, and a small puzzle for rust programmers

[-] anyhow2503@lemmy.world 2 points 1 day ago

I was actually wondering if this was supposed to be about a specific problem someone has with rust (not like I haven't gotten stuck on some weird corner with rust before), but looking at the meme, that seemed unlikely to me. Thanks for the context.

this post was submitted on 18 Apr 2026
461 points (100.0% liked)

Programmer Humor

31064 readers
1612 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