Blogs >>
Sun 30 October - Fri 4 November 2016 Amsterdam, Netherlands
Sun 30 Oct 2016 11:30 - 12:00 at Matterhorn 3 - Run-time Reflection Chair(s): Stefan Marr

The Ruby programming language has extensive metaprogramming functionality. But unlike most similar languages, the use of these features is idiomatic and much of the Ruby ecosystem uses metaprogramming operations in the inner loops of libraries and applications.

The foundational techniques to make most of these metaprogramming operations efficient have been known since the work on Smalltalk and Self, but their implementation in practice is difficult enough that they are not widely applied in existing Ruby implementations.

The Truffle framework for writing self-specialising AST interpreters, and the Graal dynamic compiler have been designed to make it easy to make high-performance implementations of languages. We have found that the tools they provide also make it dramatically easier to implement efficient metaprogramming. In this paper we present metaprogramming patterns from Ruby, show that with Truffle and Graal their implementation can be easy, concise, elegant and high-performance, and highlight the key tools that were needed.

Paper (meta16-final2.pdf)216KiB

Chris Seaton is a Research Manager at the Virtual Machine Group in Oracle Labs, where he leads the work to implement Ruby using the next generation of Java Virtual Machine technology, and other projects.

Before this he completed a PhD at the University of Manchester under the supervision of Doctor Mikel Luján, where he researched programming languages and irregular parallelism. Before that, he completed an MEng at the University of Bristol on languages with mutable syntax and semantics.

In his spare time he used to develop an award winning medical app that is the first app regulated as a medical device in the UK, and ran a consultancy to help clients such as the NHS to develop revolutionary medical software.