Hey girlies and boyos!! Now that I’ve slowly started to return from a break I’ve been taking from Discord for the past few months, I’m going to (attempt) to start writing updates for projects I’m working on! First off…
Writing my own compiler for (a subset of) C!
What’s a compiler?
Programmers write computer programs using a well-defined, human-readable, human-understandable programming language. However, computers don’t actually know how to run the code the human writes! Computers understand machine code, a type of computer language that the computer can actually run. A compiler is a computer program that translates from a program written in a human-readable programming language to machine code.
The crustydrageon C Compiler
I’m writing my own compiler! You can check it out at newtbytes/crustydrageon on GitHub. I tried this a couple months ago, but that quickly became a much, much larger project, which was too ambitious and ultimately didn’t turn out too well. For this project, I’m reducing the scope of this project quite a bit compared to that project.
The name, crustydrageon, comes from a couple things. It’s a C compiler, it’s written in Rust, and unlike my previous compiler project, it’s supposed to be something I actually finish and less focused on condensing all of my visions for the future of compilers into one project (so it’s ‘crusty’ and realistic). The drageon bit comes from the fact that dragons are a common motif in compilers because of the textbook Compilers: Principles, Techniques, and Tools. Also, the mascot of the LLVM compiler infrastructure is a dragon! The ‘eon’ part comes from me trying to make it a bit quirkier, inspired by the ‘eon’ suffix of the names of the eeveelution Pokémons (Flareon, Sylveon, Vaporeon, etc.).
Anyways I hope people think that’s neat! That’s all for now!! :3333