Speaker Deck

Compilers for Free

by Tom Stuart

Published November 9, 2013 in Programming

Partial evaluation is a powerful tool for timeshifting some aspects of a program's execution from the future into the present. Among other things, it gives us an automatic way to turn a general, abstract program into a faster, more specialized one.

This math-free talk uses Ruby to explain how partial evaluation works, how it can be used to make programs go faster, and how it compares to ideas like currying and partial application from the world of functional programming. It then investigates what happens when you run a partial evaluator on itself, and reveals some surprising results about how these techniques can be used to automatically generate compilers instead of writing them from scratch.

Given at RubyConf 2013 (http://lanyrd.com/2013/rubyconf). A video and transcript are available at http://codon.com/compilers-for-free.

Other Presentations by this Speaker