I have been watching recently some interesting videos recorded from the last few editions of the PYCON US conference. In particular my passion for (programming) languages attracted me to those from Alex Gaynor ( a VERY young and talented programmer / presenter) and other members of the PyPy project.
In order, Alex develops a lexer, a parser (based on a simple bnf grammar description provided in a txt file), an AST traversal byte code generator (compiler), an interpreter (VM) and he runs it too.
The cleanness of the code and simplicity with which Alex proceeds slide after slide is remarkable. In fact I have no difficulty to compare his work with the most inspiring chapters from Nicklaus Wirth book “Algorithms + Data Structures = Programs”, where he develops a simplified compiler in PASCAL (link). Sign of the times, Alex work is available in video and his code is on Bitbucket rather than on paper.
So the PyPy tools could help us develop (rapidly) a Python compiler that generates (JIT) code for any processor ( x86 was the main target but other architectures are in development) including possibly a MIPS or perhaps even a more humble PIC core!?
I am (day) dreaming about a world of efficient embedded applications written with the clarity and expressive power of the highest level programming languages… (brought to you by PyPy).