this post was submitted on 15 Nov 2023
238 points (97.6% liked)

Programmer Humor

19149 readers
1144 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 1 year ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 33 points 10 months ago* (last edited 10 months ago) (3 children)

Image Transcription: Code


[Transcriber's note: the first line in the following transcription is incorrect. After the equals, there should be eight instances of the word "Option", each succeeded by a less-than symbol, then two brackets, like (), before the first greater-tha symbol. However, if you type a less-than symbol on Lemmy, it seems to strip that symbol and whatever word comes next out of the source when you save the comment.]

type Wtf = Option>>>>>>>;
let two = Some(Some(Some(Some(Some(Some(None))))));
let three = Some(Some(Some(Some(Some(None)))));
let six = Some(Some(None));
unsafe {
    assert_eq!(
        std::mem::transmute::(two) * std::mem::transmute::(three)
        std::mem::transmute::(six)
    );
}

I am a human who transcribes posts to improve accessibility on Lemmy. Transcriptions help people who use screen readers or other assistive technology to use the site. For more information, see here.

[–] [email protected] 5 points 10 months ago (1 children)

Good human, but why not use tesseract though? I mean it works quite well with monospace fonts

[–] [email protected] 6 points 10 months ago

Still needs to be checked over to make sure it didn't get anything wrong. In my experience the mistakes AI make with monospace fonts tend to be very awkward to notice (like 1 and l and I and | being interchanged), so I'd have to go over with a fine tooth comb which, for me, since I type quickly, isn't noticeably faster and is a lot more boring.

[–] [email protected] 3 points 10 months ago