ECOOP 2022
Mon 6 June - Thu 7 July 2022 Berlin, Germany
Tue 7 Jun 2022 11:30 - 12:00 at Stockholm 1 - Applications

GraalVM enables all Truffle languages to interoperate with each other and call each other, through a set of traits exposed in Truffle’s InteropLibrary. There are many such traits: array elements, hash entries, buffer elements, executable, instantiable, members, iterator, iterable, exception, pointer, meta object, source location, identity, number, string, boolean, etc. This interoperability API is probably the richest available today, but it needs to be integrated deeply in languages so that it is natural to use and does not require special calls or constructs to deal with foreign objects. As a simple example, foreign_array[index] should just work, and not require something like Interop.read_array_element(foreign_array, index). As something more advanced we want all Ruby Array methods, such as map to also be available on foreign arrays.

In this talk we explore how to integrate foreign objects fully into the GraalVM Ruby implementation, TruffleRuby. This means we want foreign objects to behave exactly the same as Ruby objects, to have the same methods, to be given a Ruby class, to use the Ruby class hierarchy, etc. By giving them a Ruby class, we are able to define methods for foreign objects as regular Ruby methods, in Ruby code. Foreign objects can also be extended with new methods by the user, just like it is possible to add methods to any Ruby class at runtime. We hope this deep integration makes it easier to use the polyglot nature of GraalVM, and we hope the design in TruffleRuby inspires other Truffle languages to adopt a similar approach.

Researcher at Oracle Labs, interested about parallelism in the context of TruffleRuby, an implementation of Ruby using the Truffle framework and the Graal dynamic compiler.

Tue 7 Jun

Displayed time zone: Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna change

11:00 - 12:30
ApplicationsTruffle at Stockholm 1
11:00
30m
Short-paper
Efficient Object Graph Recording with Truffle for Live Data-Structure Programming
Truffle
Shusuke Takahashi Tokyo Institute of Technology, Yusuke Izawa Tokyo Institute of Technology, Hidehiko Masuhara Tokyo Institute of Technology, Youyou Cong Tokyo Institute of Technology
Media Attached
11:30
30m
Talk
Designing an intuitive language-agnostic integration of foreign objects in Ruby
Truffle
Benoit Daloze Oracle Labs
Pre-print Media Attached
12:00
30m
Talk
Embedding Truffle Languages
Truffle
Kevin Menard Shopify
Media Attached
Hide past events