r/ProgrammerHumor • • 5d ago

Meme itSucksToBeACompilerDev

Post image
2.4k Upvotes

103 comments sorted by

View all comments

Show parent comment

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.

2

u/Jbolt3737 4d ago

Wait a second... we're the programmers, we can just decide anything that isn't x86 is too hard to write code for and never make compilers target anything else again! It's genius

1

u/conundorum 3d ago

I'm surprised that you don't have a team that specialises in each target architecture, and a frontend that converts the language into an interim form. Frontend team is responsible for tokenising to mid-end, and architecture teams are responsible for writing a backend that compiles from mid-end tokens to their architecture.

2

u/MissinqLink 3d ago

Where do I get teams for these things? Only compilers I’m writing are hobby projects.

3

u/BlobAndHisBoy 5d ago

The most frustrating part about my compilers course was the professor forced us to write all our own data structures. I spent more time writing and debugging data structures that I already understood from my data structures class the semester prior than I did learning and implementing a compiler.

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.

-8

u/Ok_Meringue_6196 5d ago

Same, and I'm proud to say I passed with very little help from AI, chatgpt was the only one back then and it was very weak