Hacker News new | past | comments | ask | show | jobs | submit login
Write a Compiler in Python - The Experiment Begins (dabeaz.blogspot.com)
99 points by ColinWright on Jan 3, 2012 | hide | past | favorite | 7 comments



PLY is a wonderful toolkit. I used it to write a compiler for ice9 (some made up language used for teaching) that compiled down to JVM bytecode (using Jasmin) for my compilers class.

See the code here: https://github.com/mdwrigh2/pyice


Different class of thing altogether, but a BASIC compiler targeting the ZX Spectrum implemented with Python/PLY:

http://www.boriel.com/software/the-zx-basic-compiler/?lang=e...


As reference, Vidar Hokstad has been writing a series about writing a compiled in Ruby for the past couple of years: http://www.hokstad.com/compiler


Coincidentally, preparing for my compilers class this semester, I was just wondering if it would be easier to write in Python instead of SML, which the class uses. I was just looking into PLY while googling around. Really cool that Beazley would do this, although for purely selfish reasons I wish he would release the material sooner :p


Is he going to release the material? The class (which includes the course notes) cost each student $1000.

I hope he does!


The page mentions "This is an experimental course that will probably have some bugs and kinks. It may or may not be related to the plenary talk I'm giving at PyCon'2012 (wink ;-)". So there are hopefully going to be slides at some point.


Too bad the schedule for awesome chances like this to almost never seem to fit with the spare time I have. I'm way past the only-kiddy projects phase, yet haven't found anything big (as in a project shared with others) to hack on.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: