Hacker News new | ask | show | jobs
by joelrwilliams1 1121 days ago
Goodness, this takes me back to a my junior year of my Computer Science undergrad degree. One of my classes was one long project of writing a compiler to handle the professor's made up programming language.

That was a long semester.

4 comments

Hah, I had exactly the same experience. I followed a compilers course and the task was similar, but we had to use some whack compiler framework without any documentation. Apparently the professor was the only user of the framework, but nobody dared to ask any questions about it because the professor would ridicule you if you asked any question that was not an open research problem.
I took compilers twice— I had to drop it the first time because I chose to use a different language and tools than the rest of the class, and the parser generator I chose didn't accommodate the kinds of error messages we needed to produce. The issue only became clear to me a few months into the class.

The second time I took it, things were relaxed a bit— the curriculum was designed around working in a high-level language (Java) and we got to write an interpreter for a nice intermediate form based on a simple VM instead of compiling all the way down to machine code.

So there were definitely some differences and they did make things easier! But I still remember this as one of my favorite classes, and I'd love to take it again and go 'all the way'.

Why do you say it was a 'long semester'?

It seems like a lot of CS majors find compilers to be the hardest course of the degree, indeed, it was the capstone for my degree. I found it to be quite fun and not particularly intensive once you wrapped your head around each new concept. I found CS Theory and Operating Systems to be much more difficult material, although both of those courses had less actual work.
Was it really hard to implement? Ours just had us do a subset of C, with strings as extra credit.
nightmares