?

Log in

No account? Create an account
Those were the days. - Lindsey Kuper [entries|archive|friends|userinfo]
Lindsey Kuper

[ website | composition.al ]
[ userinfo | livejournal userinfo ]
[ archive | journal archive ]

Those were the days. [Feb. 7th, 2009|01:27 pm]
Lindsey Kuper
[Tags|]

I remember when I used to do things on the weekend other than work on my compiler.

LinkReply

Comments:
[User Picture]From: oniugnip
2009-02-08 12:03 am (UTC)
Pretty soon, though -- you will have written a Scheme compiler.

That's mind-blowing! Writing compilers is really hard!
(Reply) (Thread)
[User Picture]From: lindseykuper
2009-02-08 01:02 am (UTC)
Well, we're getting a lot of help. We're given a giant library of helper functions, an ass-kicking pattern matcher, loads of tests, and weekly reference implementations to test against; we have a great associate instructor; and our professor is a world-class compiler writer.

Just now I wondered if anyone thinks that "writing a compiler is easy". Evidently, this person does. I'm not sure what Converge is, but the fact that pretty much his whole article is about parsing, followed by exactly six sentences devoted to "From abstract syntax tree to object code", blows my mind.
(Reply) (Parent) (Thread)
[User Picture]From: pixelherder
2009-02-08 10:26 am (UTC)
My experience has been that writing a basic compiler is fairly easy. Writing a production quality compiler that real people are going to rely is an entirely different matter. True error recovery and generating informative error message -- not just aborting at the first syntax or type checking error -- takes time and a ton of tedious work. And I don't want to think about how much time I've spent debugging basic data flow analysis, graph-coloring register allocation, and simple optimizations. Late-80s stuff, really. Loop re-ordering/splitting/fusing, software pipelining, auto-vectorization and all the other jazz that you see in modern compilers scares me, quite frankly. I never cease to be amazed when I view the assembly output for a tricky piece of code and find that a g++ has correctly parsed it, divined my intentions and then produced efficient code for it.
(Reply) (Parent) (Thread)
[User Picture]From: lindseykuper
2009-02-08 06:58 pm (UTC)
Graph-coloring register allocation is exactly what I'm working on today. It's tricky, even without using the fancy super-efficient data structures that I guess one would use in a production compiler.

One of the goals of this course is to make all that stuff stop seeming like magic. But there's never going to be time to demystify everything.
(Reply) (Parent) (Thread)
(Deleted comment)