3 ms·
What might you recommend to someone who wants to to learn more about these subjects? For example, http://www.muppetlabs.com/~breadbox/software/tiny/teensy.html
by i336_ 9y ago
What might you recommend to someone who wants to to learn more about these subjects?
For example, http://www.muppetlabs.com/~breadbox/software/tiny/teensy.html http://www.muppetlabs.com/~breadbox/software/tiny/teensy.htm... is extremely interesting, but a lot of it is over my head.
I guess at the end of the day there's no real alternative to "just dive into the source code for a while" with these sorts of things - hence the importance of having "decades of experience" under your belt - but I'm curious if there's anywhere in particular that you might recommend as a startpoint.
- nils-m-holm 9y agoYes, examples of minimal ELF files are good starting points for getting the back end part up and running. I'm not sure that reading real-life code will get you very far, because it often deals with lots of edge cases and attempts to be efficient and generate clever code. However, there are compilers that have been made as educational tools or with simplicity as a major design goal. I would stick to those in the beginning. See my home page (http://t3x.org http://t3x.org) for lots of examples! Then, books. I'll make a list some day, I promise! ;) From the top of my head: Wirth's "Compiler Construction", Richard's "BCPL, the Language and its Compiler", and - shameless plug - "Practical Compiler Construction" by myself. I have also read the Dragon Book back then - it's good, but too heavy on theory for a beginner.
- JdeBP 9y agoThere is also Practical Compiling With Pascal-S by Rees and Robinson (ISBN 9780201184877), which took the same approach as you do, 30 years ago.
- nils-m-holm 9y agoInteresting, thanks! Ordered a copy.
- i336_ 9y ago> Yes, examples of minimal ELF files are good starting points for getting the back end part up and running. Mmm, one of several components. > I'm not sure that reading real-life code will get you very far, because it often deals with lots of edge cases and attempts to be efficient and generate clever code. Very good point. It takes a bit more time and effort to build a proper mental map, but there's really no worthwhile alternative. > However, there are compilers that have been made as educational tools or with simplicity as a major design goal. I would stick to those in the beginning. I agree! These help a lot, and make study almost (if not very) fun :) > See my home page (http://t3x.org http://t3x.org) for lots of examples! Will do, thanks! > Then, books. I'll make a list some day, I promise! ;) From the top of my head: Wirth's "Compiler Construction", Richard's "BCPL, the Language and its Compiler", and - shameless plug - "Practical Compiler Construction" by myself. I have also read the Dragon Book back then - it's good, but too heavy on theory for a beginner. Interesting. I actually stumbled on a copy of the Dragon Book while at an op-shop some time ago. I didn't actually know what I was grabbing at the time, just that it looked like a really good idea to prioritize getting it. I'm very happy to have it, and hope to be able to make sense of it at some point :) Looks like Wirth's Compiler Construction can be found at http://www.ethoberon.ethz.ch/WirthPubl/CBEAll.pdf http://www.ethoberon.ethz.ch/WirthPubl/CBEAll.pdf BCPL, the Language and its Compiler and Practical Compiler Construction don't seem to have free options; that's fine, I've added these (and your other books!) to my (burgeoning) wishlist :P