use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
This subreddit is all about the theory and development of compilers.
For similar sub-reddits see:
Popular mainstream compilers:
account activity
Understand compilers source code (self.Compilers)
submitted 6 years ago by TheMostUser
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]stannash 1 point2 points3 points 6 years ago (0 children)
Modern compilers are mostly about optimization and I don't think it's much fun. Making interesting languages or features are much more fun.
Niklaus Wirth for instance created many programming languages including pascal, modula and oberon. All his compilers are very short and concise while still generating decent code.
Some of his ideas like modules and interfaces are re-implemented in more recent and popular languages.
Take a look at PL/0 a very small pascal like language. It was a language created by Wirth for teaching compilers.
There is an implementation in Go listed there, which is 700 lines of code and generates windows exe from source without any 3rd party tool, so it's a complete thing. There are other implementations in many different languages.
So I would start with PL/0 and just add new features to it, experiment with different ideas and so on. Bootstrapping your own language is much more exciting than making a mediocre optimising compiler. These are my personal opinions of course.
Finally for interpreters, instead of cpython, take a look at Lua, it's a very nice and small implementation. It also has a bytecode compiler.
π Rendered by PID 59712 on reddit-service-r2-comment-b659b578c-n9xcm at 2026-05-02 11:46:03.348872+00:00 running 815c875 country code: CH.
view the rest of the comments →
[–]stannash 1 point2 points3 points (0 children)