3 ms·
These are definitely some interesting ideas on breaking into a new discipline. The little projects list is great and it's definitely good motivation to start i
by xigency 10y ago
These are definitely some interesting ideas on breaking into a new discipline.
The little projects list is great and it's definitely good motivation to start improving skills.
One problem I have with this article though, is not with the idea of becoming a wizard at something, which is a great way at looking at things, but rather the idea of joining a special group.
Personally, I have a bit of an issue with using LLVM to get started. Maybe this isn't fair because I have literally no experience with LLVM outside of clang, but I think part of the idea of becoming a "wizard" means starting from scratch. Obviously, it's not helpful to point someone in the direction of impossible tasks to get them motivated, but the direction this heads quickly turns toward not becoming a leading independent thinker but becoming a mindless bug fixer on another project. I don't think you can learn to write compilers by fixing other people's bugs.
It turns to: solving bugs, getting involved in open source, jumping on someone else's projects, and most of all projects where others are best suited to gain from the developments. It reminds me of the flowchart "Should I work for free?" which programmers should really pay attention to.
It's great to work with others, to collaborate, and to appreciate and understand other's technology; however, computer science and programming are rather miraculous in the amount of distance an individual can travel on their own, and being forced to jump on a bandwagon or join a community seems to be demeaning in the end.
- chrisseaton 10y agoWhat are you suggesting then? Learning about how compilers work with no exposure to any existing compilers?
- lgas 10y agoI'm reminded me of the Sagan quote "If you wish to make apple pie from scratch, you must first create the universe".
- thwarted 10y agoIn the Compiler Design class I took 20 years ago, we used the dragon book, which I found to be pretty accessible for someone who already knows how to program (at least in an academic setting). The only production (non-educational) compiler we had easily available source code for was gcc, which is not something appropriate for a beginner to learn compiler design and structure from.
- xigency 10y agoI think it's great to look at existing compilers, but probably better to look at past compilers. I stumbled upon the first edition of cc the other day: https://github.com/mortdeus/legacy-cc https://github.com/mortdeus/legacy-cc It's also helpful to look at the overall structure of something like LLVM or to study the internals. What seems totally useless, though, is to fix bugs! Compiler writing is a very high level field. Fixing bugs on a database server provides equal experience to fixing bugs on a compiler to compiler writing: which is being able to write bug-free code in the given language. So it seems the author is trying to advertise for free labor. Also, in the first example Learn regular expressions. This isn’t ... how real compilers work, but regular expressions... This is a good example of why practical experience isn't as valuable as knowledge, and that's because the class of regular languages are crucial to compiler writing! So yes, that is how they work, especially for parts and passes of tokenization and parsing. The best advice, which isn't given here, is to read! There are many, many great resources on all of the ins-and-outs of front end, backend, optimization and all the other facets of compiler writing, and there are very few new ideas. Most of the research dates from the 60's and 70's. It's better to be well read on compilers than to have actually written one, depending on the circumstance. Also, many people always ask for resources on compiler writing, but if you spend even a little time looking for books you will find tons.