Funding Academic Research to Push Ruby Forward

Shopify has committed nearly half a million dollars over the past year to academic researchers working on Ruby and the language's ecosystem. The goal is to get programming language research applied to Ruby's specific challenges, from metaprogramming performance to garbage collection and interpreter startup times.

Shopify engineers and researchers at a recent meetup in London

The motivation is straightforward: when research is done on Ruby, findings land in Ruby. The language's heavy use of metaprogramming has already inspired a novel inline caching technique presented at a top programming language conference, and its unusually loose C extension API led to a new kind of virtualized C interpreter. These results came out of academic work that explicitly targeted Ruby's quirks.

Shopify also wants researchers to evaluate their ideas against the workloads that actually matter for large-scale Ruby deployments. Much VM research in recent decades has accepted longer warmup in exchange for higher peak performance, which doesn't fit Shopify's rapid redeployment cycles. Unless researchers work directly with engineering teams, they have little reason to consider such constraints.

The hope is that the investment compounds: if established researchers engage with Ruby and talk about it, early-career researchers will follow, and the community gets more people working on problems specific to Ruby at scale.

Professor Laurence Tratt

Professor Laurence Tratt describes his vision for optimizing Ruby

Laurie Tratt holds the Shopify and Royal Academy of Engineering Research Chair in Language Engineering at King's College London. His current work explores automatically generating a just-in-time compiler from the existing Ruby interpreter using hardware meta-tracing and basic-block stitching.

Tratt brings experience from the Python world, including work related to the PyPy project's meta-tracing research. He also co-organizes a summer school series for early-career programming language researchers, bringing them together with established academics and industry practitioners.

Professor Steve Blackburn

Professor Steve Blackburn is building a new model for applied garbage collection

Steve Blackburn is an academic at the Australian National University and Google Research. Shopify funded his group's work on MMTk, a memory management toolkit that provides a framework for garbage collection research while also shipping production-quality collectors. Shopify is integrating MMTk into Ruby so the language benefits from current collectors today and can serve as a testbed for future ones.

Blackburn is a leading researcher in garbage collection, and the funding puts Ruby's particular memory management needs on his group's agenda.

Dr Stefan Marr

Dr Stefan Marr is an expert in benchmarking dynamic language implementations

Stefan Marr is a Senior Lecturer at the University of Kent and a Royal Society Industrial Fellow. With Shopify's support, he is looking at how to make interpreters faster, with particular attention to startup and warmup time.

Marr is known for his work on benchmarking methodology, differential analysis across languages and implementation techniques, and dynamic language implementation. He co-invented the inline caching method that TruffleRuby uses to handle Ruby's metaprogramming efficiently.

Shopify engineers and research collaborators discuss how to work together to improve Ruby

Shopify is bringing these funded researchers together with its senior Ruby engineers so both sides can compare what is already possible with what might be achievable, grounding academic work in the realities of how Ruby and Rails are used at scale today.

These external collaborations sit alongside Shopify's internal research teams working on YJIT, TruffleRuby, and other publishable projects.

Part of Shopify’s Ruby and Rails Infrastructure Team listening to research proposals