| ▲ | sigbottle 2 hours ago | |
https://learn.microsoft.com/en-us/shows/seth-juarez/anders-h... https://news.ycombinator.com/item?id=11685317 https://lobste.rs/s/dwf2yn/sixten_s_query_based_compiler https://ericlippert.com/2012/06/08/red-green-trees/ Rust's salsa, etc. Related search terms are incremental compilation and red-green trees. It's primarily an ide driven workflow (well, the original use case was driven by ides), but the principles behind it are very interesting. You can grok the difference by thinking through, for example, the difference between invoking `g++` on the command line - include all headers, then compile object files via includes, re-do all template deduction, etc. and one where editing a single line in a single file doesn't change the entire data structure much and force entire recompilation (this doesn't need full ownership of editing either by hooking UI events or keylogging: have a directory watcher treat the file diff as a patch, and then send it to the server in patch form; the observation being that compiling an O(n) size file is often way more expensive than a program that goes through the entire file a few times and generates a patch) AST's are similar to these kinds of trees only insofar as the underlying data structure to understand programming languages are syntax trees. I've always wanted to get into this stuff but it's hard! | ||