7 ms·
"breaking things down into the right primitives" is the real key to programming. There are many books and web pages about algorithms, but I wish there were more
by xyproto 9mo ago
"breaking things down into the right primitives" is the real key to programming. There are many books and web pages about algorithms, but I wish there were more searchable and browsable resources for how to approach problems through primitives.
- zwnow 9mo agoThe process of breaking a complex problem down into the right primitives requires great understanding of the original problem in the first place. Whats blocking me during programming usually are edge cases I had no idea about. Its still hard to find good material on compilers if you are not into reading dry ass books. Thats a me problem though, I simply cant force myself to read boring factual only content (one of the reasons as to why I love beejs guides).
- seg_lol 9mo agoThere is a good body of literature that is distinct from the academic compiler literature. https://t3x.org/ https://t3x.org/ https://compilerbook.com/ https://compilerbook.com/ https://interpreterbook.com/ https://interpreterbook.com/ https://www.craftinginterpreters.com/ https://www.craftinginterpreters.com/ R. G. Loeliger Threaded Interpretive Languages Their Design And Implementation https://news.ycombinator.com/item?id=43973544 https://news.ycombinator.com/item?id=43973544 https://github.com/IUCompilerCourse/Essentials-of-Compilation https://github.com/IUCompilerCourse/Essentials-of-Compilatio... And check out Andy Keep's Nanopass Compiler work, https://nanopass.org/ https://nanopass.org/
- HarHarVeryFunny 9mo ago> The process of breaking a complex problem down into the right primitives requires great understanding of the original problem in the first place. Yes, but with experience that just becomes a matter of recognizing problem and design patterns. When you see a parsing problem, you know that the simplest/best design pattern is just to define a Token class representing the units of the language (keywords, operators, etc), write a NextToken() function to parse characters to tokens, then write a recursive descent parser using that. Any language may have it's own gotchas and edge cases, but knowing that recursive descent is pretty much always going to be a viable design pattern (for any language you are likely to care about), you can tackle those when you come to them.