4 ms·
Not already mentioned include the llvm tutorials, graalvm tutorials for building a truffle language and david beazely runs a paid, expensive course that seems p
by kipply 6y ago
Not already mentioned include the llvm tutorials, graalvm tutorials for building a truffle language and david beazely runs a paid, expensive course that seems pretty good!
- _bxg1 6y agoWow, Beazley's course appears to be live, not a video series I'm okay with paying, but my schedule wouldn't allow for a full-time middle-of-the-day course
- cellularmitosis 6y agoI took both his SICP course and compilers course back-to-back, and I highly recommend both of them. Also, sometimes people need something to get them hooked, and kickstart a habit of working on a project. A compilers book is too heavy there. For that I would recommend what got me started down this rabbit hole, which was Gary Bernhardt’s “Compiler from scratch” screencast (paid, not free, but his half dozen “from scratch” casts are well worth it). In 20 minutes you’ll be taught how to build a regex-based lexer, a recursive descent parser, and do some very basic output generation. I wrote a series of blog posts about using those techniques to implement an alternative syntax for C: https://gist.github.com/cellularmitosis/d4f8d92886061f1629b150dd36619890 https://gist.github.com/cellularmitosis/d4f8d92886061f1629b1... If interpreters is your thing, I’ve hacked around with those a bit as well: https://gist.github.com/cellularmitosis/a46efbf32544cde3a1d156e4903e051f https://gist.github.com/cellularmitosis/a46efbf32544cde3a1d1... https://gist.github.com/cellularmitosis/d8d4034c82b0ef817913a01138b115bf https://gist.github.com/cellularmitosis/d8d4034c82b0ef817913... I also maintain a list of links to simple CPU designs, simple compilers, and simple interpreters (for study): https://gist.github.com/cellularmitosis/1f55f9679f064bcff02905acb44ca510 https://gist.github.com/cellularmitosis/1f55f9679f064bcff029... Edit: ah I forgot the compiler from scratch link! I also forgot that particular video is free!!! https://www.destroyallsoftware.com/screencasts/catalog/a-compiler-from-scratch https://www.destroyallsoftware.com/screencasts/catalog/a-com... Edit: also, a (broken) math interpreter which demonstrates how to use graphviz to visualize the AST https://gist.github.com/cellularmitosis/fa41234f641ce55a737460e9f7ba0c30 https://gist.github.com/cellularmitosis/fa41234f641ce55a7374... Edit: also, don’t be afraid to skip the lexer and parser and just start working with an AST data structure. Whatever it takes to get started! https://gist.github.com/cellularmitosis/074730ddde770f4ac694825ca3fbfaec https://gist.github.com/cellularmitosis/074730ddde770f4ac694...