4 ms·
Let's Build a Compiler (1988)
- nittanymount 3y ago[flagged]
- sgbeal 3y agoThe site operators cannot change how your browser renders plain text files.
- Paul-Craft 3y agoCSS, motherfucker: http://bettermotherfuckingwebsite.com/ http://bettermotherfuckingwebsite.com/
- rep_lodsb 3y agoit's plain text, not HTML
- nittanymount 3y agoseems that site is basic html, not plain text, isn't it ?
- ofrzeta 3y agohttps://xmonader.github.io/letsbuildacompiler-pretty/ https://xmonader.github.io/letsbuildacompiler-pretty/ "This is a prettified and modern, browsable version of Let’s Build a Compiler by Jack Crenshaw."
- catketch 3y agocompiler writing is always a journey apparently.... > "In the four years since installment fourteen, I've managed to get laid off, get divorced, have a nervous breakdown, begin a new career as a writer, begin another one as a consultant, move, work on two real-time systems, and raise fourteen baby birds, three pigeons, six possums, and a duck. For awhile there, the parsing of source code was not high" on my list of priorities.
- deleted 3y ago[deleted]
- ofrzeta 3y agoI bit of biography on Jack Crenshaw. Among many other things he worked on the Apollo program. https://www.resonancepub.com/jack-crenshaw/ https://www.resonancepub.com/jack-crenshaw/
- userbinator 3y agoHe is indeed a very interesting character, with an actual personality.
- luismedel 3y agoThanks for the link. It was a very interesting interview to read.
- pjmlp 3y agoA great tutorial for its time. It's been a while I saw it.
- x1sec 3y agoA port of the tutorial's Pascal code to C which emits x86 assembly: https://github.com/lotabout/Let-s-build-a-compiler https://github.com/lotabout/Let-s-build-a-compiler
- rep_lodsb 3y agoC and AT&T syntax... because it's not Real Programming™ unless there's cryptic symbols everywhere, everyone today knows that of course! [/s] And then there is some weirdly phrased misinformation in the readme about how on modern OSes you have to link to libraries - this simply isn't true, at least on Linux. A static 32-bit binary using either 'int 80h' or 'syscall' instructions will even run on "pure" x64 systems (i.e. ones with no 32-bit libs installed at all). The only thing this adds is the translated code, and this dubious information about x86 programming, the text of the tutorial itself is unchanged. So I don't see this providing any value except to those people who absolutely refuse to read Pascal code. To anyone who wants a similar bottom-up (but somewhat more advanced) compiler tutorial using C, maybe read this one instead: https://github.com/DoctorWkt/acwj https://github.com/DoctorWkt/acwj
- thaliaarchi 3y agoA rendered Markdown version of this book is available here: https://xmonader.github.io/letsbuildacompiler-pretty/ https://xmonader.github.io/letsbuildacompiler-pretty/
- dang 3y agoRelated: Let's Build a Compiler (1988) - https://news.ycombinator.com/item?id=36054416 https://news.ycombinator.com/item?id=36054416 - May 2023 (19 comments) Let’s Build a Compiler (1995) - https://news.ycombinator.com/item?id=22346532 https://news.ycombinator.com/item?id=22346532 - Feb 2020 (41 comments) Let's Build a Compiler - https://news.ycombinator.com/item?id=20444474 https://news.ycombinator.com/item?id=20444474 - July 2019 (47 comments) Let's Build a Compiler (1995) - https://news.ycombinator.com/item?id=19890918 https://news.ycombinator.com/item?id=19890918 - May 2019 (18 comments) Let’s Build a Compiler (1995) - https://news.ycombinator.com/item?id=6641117 https://news.ycombinator.com/item?id=6641117 - Oct 2013 (56 comments) Let’s Build a Compiler (1995) - https://news.ycombinator.com/item?id=1727004 https://news.ycombinator.com/item?id=1727004 - Sept 2010 (17 comments) Let’s Build a Compiler (1995) - https://news.ycombinator.com/item?id=232024 https://news.ycombinator.com/item?id=232024 - June 2008 (5 comments) Let's build a compiler (dated, but very good) - https://news.ycombinator.com/item?id=63004 https://news.ycombinator.com/item?id=63004 - Oct 2007 (2 comments)
- delta_p_delta_x 3y agoIt seems that in many compiler resources (even the modern ones), there is still a lot of focus on the front-end—things like lexing, parsing, DFAs, regex matching, recursive descent. I would like to see greater focus on the back-end: optimisation strategies like dead code elimination, register allocation, parallelisation, vectorisation, detecting SIMD-able code, and even whole-program optimisation. Even on the front-end, it would be nice to see focus on the failure cases—printing nicely formatted error messages, for instance. IMO these are strictly larger contributors to the quality of a compiler suite than merely lexing and parsing, which are generally solved problems.