Live data from Hacker News

Ask HN: Recommend an introductory course on compilers

news.ycombinator.com

11–20 of 23 posts

Re: Ask HN: Recommend an introductory course on compilers

#11

Not a full course (apologies in advance) but I have heard a lot of people get a good introduction from: http://compilers.iecc.com/crenshaw/ It was written with Turbo Pascal in mind but many have read the text and transcribed the instructions to a language of their choosing. Should be at least a good introduction to compilers.

x86 version here: http://www.pp4s.co.uk/main/tu-trans-comp-jc-intro.html

Re: Ask HN: Recommend an introductory course on compilers

#13
Allen Holub's book "Compiler Design in C" is excellent. The book is out of print, but you can get it as a free PDF from Holub's site: http://www.holub.com/software/compiler.design.in.c.html

Over the course of the book you implement compiler construction tools (a LEX clone and two YACC clones) and then use those to build a C compiler.

Re: Ask HN: Recommend an introductory course on compilers

#16
post #6

James Kyle (who created Babel) wrote a 'Super Tiny Compiler' that's a really great (low barrier to entry) place to start. The inline docs are super well written, clear and extensive. It's also implemented in JabaScript. It's an amazing learning tool and I really loved reading it! https://github.com/thejameskyle/the-super-tiny-compiler

I thought it was that young aussie guy, Sabastian that created babel? It was initially named 6to5 to my best memory, and later renamed Babel.

Re: Ask HN: Recommend an introductory course on compilers

#17

You should split your study into three parts. 1) Theory of computation (can't recommend a book for this one) 2) Programming language theory (Book: Programming Language Pragmatics) 3) Compiler construction (Book: Engineering a compiler or the Dragon Book)

1) The classic is Introduction to Automata Theory, Languages, and Computation by Hopcroft and Ullman.

Ullman used to have a course on Automata via Coursera but the platform changes have sent it down the memory hole.

Re: Ask HN: Recommend an introductory course on compilers

#19

Very good question. I am interested in reading the suggestions as well. Also, a specific book question: is Engineering a Compiler by Cooper & Torczon any good?

This was the official text when I took the class in 2004 with one of their disciples (Dr. Liebrock) at New Mexico Tech. But the exercises were actually taken from the book Modern Compiler Design by Andrew Appel. Officially, the C version of the book.

I got almost nothing out of the book Engineering a Compiler.

Aside from that the class was amazing. Maybe the next edition has become excellent? I knew people who took the class using the Dragon book and found that book unhelpful too.

I'm currently reading Wirth's book and really enjoying it though.

Re: Ask HN: Recommend an introductory course on compilers

#20

Not a full course (apologies in advance) but I have heard a lot of people get a good introduction from: http://compilers.iecc.com/crenshaw/ It was written with Turbo Pascal in mind but many have read the text and transcribed the instructions to a language of their choosing. Should be at least a good introduction to compilers.

No need for any apologies. I am looking for anything that can introduce me to the topic along with practical knowledge
Post reply on HN