this post was submitted on 14 Feb 2024
198 points (91.9% liked)

Programmer Humor

19623 readers
96 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
 
top 16 comments
sorted by: hot top controversial new old
[–] Timely_Jellyfish_2077@programming.dev 186 points 9 months ago (3 children)

For those who don't know, Graydon Hoare created rust language after seeing memory bug on out of order elevator.

[–] embed_me@programming.dev 58 points 9 months ago (5 children)

How does one see a memory bug on an out of order elevator

[–] ignotum@lemmy.world 36 points 9 months ago

He knew something was wrong with it's memory when the elevator didn't remember him

[–] Treczoks@lemm.ee 21 points 9 months ago (1 children)

I don't know how to see a memory bug in an out of order elevator, but I once saw and reported a wiring error of a working elevator. It was an interesting talk at the reception desk, but as I could precisely describe what was wrong and the verifyable consequences, they took me seriously. And sent me a "Thank You" email later ;-)

[–] ShepherdPie@midwest.social 7 points 9 months ago (1 children)

Were your working on the elevator or just riding it? If the latter, I imagine even being able to see the wiring was an issue.

[–] Treczoks@lemm.ee 11 points 9 months ago

I was just using it. But the behavior/reaction to button presses showed me that a button was obviously connected to the wrong function.

[–] isVeryLoud@lemmy.ca 14 points 9 months ago

By staring at it really hard

[–] fibojoly@sh.itjust.works 11 points 9 months ago

You know how everything has LCD screens these days? And sometimes you'll witness a good old crash? I know I've seen quite a few.
I'm guessing something like that.

[–] olutukko@lemmy.world 8 points 9 months ago

I have seen elevator complaining no bootable media found

[–] sbv@sh.itjust.works 43 points 9 months ago

Thank you for the context

[–] dejected_warp_core@lemmy.world 6 points 9 months ago

Based. That's a a bit like saying: "enough is enough, people are gonna get hurt. Let's fix this."

[–] ChubakPDP11@programming.dev 33 points 9 months ago

I really recommend creating a compiler or an interpreter from scratch, don't even use an IR like LLVM or MIR. Just hack and slash your way though a C compiler, it's the simplest language most people know. Don't care about 'optimization' at first, fuck optimization. Just grab Yacc/Lex or a PEG parser generator that works with the language you like most and have ot generate assembly code for simple expressions. Like, make a bc(1) native compiler! Interprets are fun too. You can use VMGEN to generate a superfast VM in C, and then bind it to another language using SWIG.
Also never imagine usability. Noobdy is going to use your C compiler for any serious work. It's just for education. Post it online to receive feedback.

You cna start by writing DSLs. For example, I am implementing the ASDL language from this old paper.

Also if you are going to do it as an example in your resume, just stop. Nobody cares, because it's a trivial task to write a compiler, even if you write backend, forntned, and the LP yourself! Do something money-loving people loike, like making some bullshit mobile app that tracks your gym sweat volume.

[–] ExperimentalGuy@programming.dev 20 points 9 months ago (1 children)
[–] Finadil@lemmy.world 18 points 9 months ago (1 children)

OP commented if you didn't notice:

For those who don't know, Graydon Hoare created rust language after seeing memory bug on out of order elevator.

[–] ExperimentalGuy@programming.dev 1 points 9 months ago (1 children)

Oh I commented before that my b

[–] Finadil@lemmy.world 2 points 9 months ago

Yeah, I noticed the times, that's why I was letting you know. 😁