Re: Online compiler courses?

Philip Herron <herron.philip@googlemail.com>
Wed, 02 Sep 2009 23:23:14 +0100

          From comp.compilers

Related articles
[6 earlier articles]
Online compiler courses? paul.biggar@gmail.com (Paul Biggar) (2009-08-31)
Online compiler courses? inderaj@gmail.com (Inderaj Bains) (2009-08-31)
Re: Online compiler courses? paul.biggar@gmail.com (Paul Biggar) (2009-08-31)
Re: Online compiler courses? bcb@undisclosedlocation.net (Bruce C. Baker) (2009-08-31)
Re: Online compiler courses? sh006d3592@blueyonder.co.uk (Stephen Horne) (2009-09-01)
Re: Online compiler courses? haberg_20080406@math.su.se (Hans Aberg) (2009-09-02)
Re: Online compiler courses? herron.philip@googlemail.com (Philip Herron) (2009-09-02)
Re: Online compiler courses? kamalpr@gmail.com (kamal) (2009-09-07)
| List of all articles for this month |

From: Philip Herron <herron.philip@googlemail.com>
Newsgroups: comp.compilers
Date: Wed, 02 Sep 2009 23:23:14 +0100
Organization: Compilers Central
References: 09-08-046 09-08-048 09-08-054
Keywords: courses
Posted-Date: 02 Sep 2009 23:42:33 EDT

Steve H wrote:
>> If you've been at this long enough to know all about DFAs, CFGs and so
>> on, then you're ready to do what people who wanted to learn something
>> did before they even had the option of going online: Get a book.
>>
>
> Hi Louis,
>
> I've also been going through books at the library, trying to find a
> good compiler text. It's frustrating. The dragon book is considered
> the canonical work, but it's quite meaty and difficult for self
> study. I believe that's the general consensus.
>
> As to other texts, I'm looking at Andrew Appel's book, and it's ok,
> but I think this kind of course is best suited for classroom sessions
> instead of self study, with lots of assignments to help the pedagogy.
> Just my opinion of course but writing a compiler I think takes a lot
> of hands on work, like engine building-- something that's best done by
> doing instead of reading through a Chilton or Haynes manual.
>
> It also doesn't help that a number of compiler texts are over ten
> years old and focus on C development instead of java. Again, I have
> nothing but respect for the C programming language but I'm more
> experienced with Java and would prefer to use that if at all possible.


Hey Steve


Here is my $0.02, a book I like and helped me a lot is "Compilers
Principles, Techniques and Tools" (
http://www.amazon.co.uk/Compilers-Principles-Techniques-Alfred-Aho/dp/0321491696
), though in my opinion it spends too much time on Lexical analysis and
parsing but its very good at it, where as different styles of IR, RTL
and code generation are my main interest though it does talk about this
in good detail.


In my opinion a university won't teach you to build a compiler for 'a'
language, at most you will do a very small part of a compiler probably
parsing, but you won't get the whole picture. I have built my own
interpreter for a language i designed (still working on it) and a very
basic c-compiler ( that breaks very easy ;) - just supporting very
limited subset of C ), just doing it as i saw fit. I am meant to still
be a student but i left university to do a years placement at a company
against my degree path, not sure whether i will go back because my
university lacks a lot of technical details that interest me.


So in my opinion if your serious i would just start implementing 'a'
language the way you think and learn from your mistakes ( I made tonnes
and still do ;) )and read as you go. If your going to start, just
remember your reading a plain text file of 'a' language and outputting
target code. The in between is the 'compiler', but if you go at it from
first principles and read and learn as you go you _will_ learn how to
build a compiler.


If your building a compiler i wouldn't worry about the language too much
i prefer C because its my favorite language, but the
algorithms/heuristics should be transferable to other languages too. And
since generally, a basic compiler will be run once, on a single source
file and then output the target code you don't need to worry about speed
(yes, you still want a fast compiler but Java should be fine for this).


But in my opinion too many universities only teach Java these days and
students never learn how systems work fully and good programming
practices or even how build systems work.


--Phil
http://redbrain.co.uk
[Um, the book you mention IS the dragon book, the new edition. -John]



Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.