Hacker Newsnew | past | comments | ask | show | jobs | submit | CompilerWriter's commentslogin

I've been considering making a video tutorial on how to make a compiler from scratch. I'll try to keep it very concise yet include the very basics for anyone who isn't a computer scientist. (I am one by education).

Would you be willing to pay for it (how much)? And what would be a good platform for this?

I'm doing this to pay bills while I work on something of my own. I will use C myself (might include a couple of 'parallel' videos for Rust too wherever applicable) but the way I explain, one would be able to use any programming language.

The contents would roughtly go like this-

1) Explaining the 'theory of computation', theoretical and not really necessary for learning how to build compilers but I love this topic and it does give you formal insight in the 'power' of computers and if you're going to build non-toy compilers, may help you write more efficient algorithms.

2) Tokenization and parsing.

3) Type system

4) Symbol table

5) Assembly

6) Brief introduction to some basic optimization techniques.

I want to hear if people here have ideas on how to go about doing this. Is there a good platform for interactive online coding+slides class?


"written in C" is not compatible with "basics for anyone who isn't a computer scientist", IMO. It just gets you so bogged down with low level details which is not necessary for an introductory course.

I still haven't found a better introductory text than Appel's "Modern Compiler Implementation in ML". I also like pairing this with "Language Implementation Patterns", which uses ANTLR.


Video makes it easy to ramble about design-choices, etc. But I'd rather read content. Seeing snippets of text on-screen, at my own pace, is much better than seeing shots of a monitor or slides. Much like this story.

That said there are a couple of great books out there already, interpreterbook.com, compilerbook.com, and craftinginterpreters.com - all recommended. If you're doin g this for money you'll struggle, unless you have a lot of clarity / something new to offer.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: