Hacker News new | ask | show | jobs
by giancarlostoro 3149 days ago
Do you mind sharing some of the resources you're using to learn? Book titles or URLs?
2 comments

I wrote https://codewords.recurse.com/issues/seven/dragon-taming-wit... about a tutorial-level compiler written in itself. Of course, a recommendation from someone who's learned from it instead of from the author would give a better signal.

I also recommended the same Wirth book as lboasso, and a couple other books, down at the bottom of the page.

I haven't looked at any resources in particular. Basically my compiler has 3 parts--parser -> type checker -> code generation. Parsing was tricky at first, but then I stumbled upon a pattern which is pretty close to parser-combinators. Type checking seemed daunting, but my language happened to be Hindley-Milner compatible, and there's lots of reference information for HM. Code generation is easy in the base case, but I'm still wrapping my mind around template expansion.