News for hackers. Stuff that matters.
Re:Ask HN: Compiler Engineers, what would you advise new gra... by vkaku on Monday September 09, 2019 @01:58AM (#20915545)
I wouldn't ask them to read any existing stuff, because I'd want them to learn how to write some of that themselves.

Things like: Lexer, Parser, Expression Creator, Optimizer, Evaluator, Expression -> Machine Code Template Matcher, and Machine Code Generator.

Where commercial compilers do better than most grad student projects is the modularity, the number of optimizer passes and options, and the run-time tooling and modularity.

Unless a student implements these themselves, they'll be spending more time understanding the discrete implementations, with it's flaws/features more than the concepts itself, or the big picture.

Hence, in order to create better engineers overall, I'd recommend they do it all themselves initially.

Re:Ask HN: Compiler Engineers, what would you advise new gra... by tester346 on Monday September 09, 2019 @03:04AM (#20915854)
I had to write mid size custom markdown parser?/lexer? with many various business requirements or things like attaching additional informations that'd allow frontend to display completion popup menu

I wrote it just as "just" step by step algorithm that transforms e.g 500LoC into flat tree of parsed objects

I thought about learning formal grammar theory, but I couldnt see how it'd help me because at the end everything worked fine. It just needed writing a lot of tests.