AST Specialisation and Partial Evaluation for Easy High-Performance Metaprogramming
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.
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.
Sun 30 Oct
|10:30 - 11:00|
Simon Van de WaterVUB, Thierry RenauxVrije Universiteit Brussel, Wolfgang De MeuterVrije Universiteit Brussel, BelgiumMedia Attached File Attached
|11:00 - 11:30|
Pablo TesoneInria Lille–Nord Europe, France Mines Douai, IA, Univ. Lille, France, Guillermo PolitoInria, Luc FabresseMines Douai, Noury BouraqadiMines Douai, Stéphane Ducasse INRIA LilleMedia Attached File Attached
|11:30 - 12:00|
Chris SeatonOracle LabsPre-print Media Attached File Attached