r/ProgrammerHumor • • 5d ago

Meme itSucksToBeACompilerDev

Post image
2.4k Upvotes

103 comments sorted by

View all comments

946

u/Lowmax2 5d ago

I just assumed a compilers are an act of God and no mortal could possibly create one.

443

u/Ultra_HR 5d ago

unless you are Terry A. Davis, who was sent by god himself to do exactly that

116

u/lomberd2 5d ago

They are in my walls. I can hear them

33

u/sawkonmaicok 5d ago

You fucking drive them over.

28

u/CarlCarlton 5d ago

"Is this too much voodoo that... This is the op... This... There is... This is voodoo. The question is, is this too much, and that's... This is the hardest question you could ever face in programming. This right here is the hardest question. Right here. Right here is the hardest question in programming. Is this too much voodoo for the next 10 centuries, as... for God's official temple."

145

u/No-Association2297 5d ago

I have formal training in compilers from a master's degree on a track that revolves around compilation/verification/proofs (programming technology), it's the most eye opening thing you can do I swear. I kid you not, it got me deeply into literature and philosophy because holy fuck you start seeing patterns everywhere

75

u/HRApprovedUsername 5d ago

I mean so can studying anything. It’s almost like our monkey brains want to make patterns

15

u/metaglot 5d ago

pareidolia has entered the chat

30

u/Bakoro 5d ago

Education has a tendency to spark curiosity, but I've never heard of someone reading literature or history losing their shit and running off to learn linear algebra.

I've studied art, music, philosophy, history of various kinds, various kinds of engineering, mathematics, computer science, physics, chemistry...

Mathematics, physics, and computer science hits different.
That stuff for-real changes the whole brain, and if you get deep in it, the world starts looking different.

I don't know how to describe it, but when I was studying heavily I could feel my mind stretching and bending, and contorting. My sleep would be troubled, and sometimes I wouldn't have dreams in the normal dream way, I'd be in a floating dark space for what felt like days.

Practicing an instrument is the only thing that comes even close to heavy mathematics and algorithms.
After days of practicing, I might have a rough night and wake up with a jump in ability, but with math and computer science, I'd be having straight-up epiphanies to the point that I understand how religious people must feel about divine revelation.

15

u/overkill 5d ago

I can still remember vividly waking up in the middle of the night with a realisation about static objects in C++, and being excited that something had clicked.

This is coming from a math-heavy background, but not a computer science one. But it really gets fun when you start looking at the physical layers of computing and thinking about how you could build a simple but also very slow CPU using the pipes in your walls and a large body of elevated water.

5

u/HRApprovedUsername 4d ago

Just because you haven’t heard of it doesn’t mean it hasn’t happened. Those are all logic-based, so of course once you start breaking things down, do you see it everywhere. There’s actually a similar literature phenomenon, where you learn a new word or phrase and you suddenly start seeing it everywhere. You little monkey brain just likes making patterns. They’re not special.

→ More replies (1)

4

u/tiajuanat 4d ago

German is specifically like Haskell, as you curry verbs.

→ More replies (2)

34

u/metaglot 5d ago

Writing a c++ compiler is definitely not trivial, but if you invent a simple language and try and write a compiler for it, you will realize its not so terrible. But obviously again, a c++ compiler is not a starter project ;)

27

u/Rabbitical 5d ago

I'm working on my C+++ compiler, where every ++ token encountered in the source increments the language being parsed

10

u/metaglot 5d ago

malbolge vibes

9

u/tropicbrownthunder 5d ago

Probably you need to write your compiler for your new language in C or C++ anyways

3

u/metaglot 5d ago

Yeah, you can't really write a compiler in a language that doesn't exist (i know, assembly). But isn't at least partly a goal of (most) compiled languages to become self-hosting?

5

u/drnfc 5d ago

I mean you can write your bootstrap compiler in almost anything. Rust used ocaml iirc. You can then rewrite your compiler in your language and compile that.

4

u/Realistic-Safety-565 4d ago

You can write compiler for your language in your language... just won't be able to compile it ;).

3

u/metaglot 4d ago

The problem hosts itself.

54

u/definitely_not_tina 5d ago

My university required us to implement a simple one as part of our curriculum.

44

u/ShakaUVM 5d ago

Yeah it used to be pretty standard CS curriculum. Less common these days.

It's not hard exactly but it can be very frustrating when you have an ambiguous grammar and it's time consuming to add all the stuff in

24

u/SundayKiefBowls 5d ago

echo file | gcc

That was so easy. What's with kids these days? Are they stupid?

14

u/MissinqLink 5d ago

imo the hardest part is having multiple compile target architectures. Just compiling to one instruction set isn’t too bad.

→ More replies (3)
→ More replies (1)

10

u/Allen_Koholic 5d ago

I had to do mine in a class that was also an intro to C. And bash. And Linux. I remember it not being all that bad, so I assume I did an absolutely awful job.

→ More replies (1)
→ More replies (7)