October 8, 2012 – Building a Language

Patrick Lioi

Patrick Lioi


We often take compilers for granted.  Text goes in, executables come out.  They may seem too complex to understand, but in fact they can be broken down into a series of smaller, much more accessible challenges.  We’ll cover the design and implementation of Rook (https://github.com/plioi/rook), an experimental .NET language implemented in C#.  First, we’ll see the language in its current state.  Then, we’ll take a deep-dive into its implementation, showing how this task can be broken down into several test-friendly phases: tokenization, parsing, type checking, and transpilation.  Along the way we’ll cover Parsley (https://github.com/plioi/parsley), a general-purpose text parsing library which was developed alongside Rook.  Whether you want to implement a full-blown programming language, the next time-saving text-twiddling tool like Less (http://lesscss.org/), or just want a more readable alternative to writing complex regexes, much of the same principles and patterns apply.
About Patrick Lioi

Patrick Lioi has been writing code professionally for 9 years, and unprofessionally for 18.  He is a consultant with Headspring, working mainly with C#, but he is also a polyglot: he’s worked with Pascal, C, C++, Perl, Scheme, PHP, Python, Javascript, Tcl, and C#.  He is interested in the differences between languages, as they each lead you to think about problems in their own way.  Although his formal education didn’t cover the design and implementation of compilers, he has been developing a language of his own over the last few years. Rook is an attempt to strike a balance between brevity and type safety while still being familiar to .NET developers.


The talk will take place at Microsoft Austin office from 5:30 p.m. to 8:00 p.m. on 10/8/2012.