Yesterday we had a great meeting on GraalVM, presented by
It was a great meeting which sparkled a lot of interest. Thank you to everyone who joined!
In the chat we exchanged a lot of useful resources.
Here they are.
On Twitter using GraalVM
Graal & Truffle to write JVM interpreters
In this post, we look at the benefits of Graal and Truffle, its general code optimization, performance comparisons, and why it might be worth your time.
List of resources on Graal(VM)
GraalVM to write MPS-based interpreters
Some information on using Truffle:
This file has been truncated.
# Using Truffle
GraalVM is an open ecosystem and we invite third party systems to participate via connecting their own programming languages, tools, or platforms.
For that purpose we have developed Truffle, a languages and tools development framework.
The Truffle bits are uploaded to Maven central. You can use them from your
`pom.xml` file as:
<version>20.0.0</version> <!-- or any later version -->
Motivations for Truffle DSL:
Luna, a language using Truffle
Another interesting (but old) article on Truffle:
Recent tutorial by Nicolas Laurent on Truffle:
On AST vs. Bytecode: Fabio Niephaus’ paper compares AST-based :
Thank you for the recap
I couldn’t join but fortunately found this useful post
We had a great second meeting on GraalVM.
@rafael asked if exception stack traces look different and @fniephaus replied that yes they do. He also said that RedHat people are adding more debug info, so you can see Java stack frame info more or less from within GDB. Here there are some related PRs: https://github.com/oracle/graal/pulls?q=is%3Apr+is%3Aclosed+author%3Aadinn
@neomatrix369 shared this link: https://github.com/neomatrix369/awesome-ai-ml-dl/blob/master/examples/data/databases/graph/grakn/builder.sh It is an example to convert Jar into Native Image
Starting point for native image:
And here a description of the limitations:
And specifically on reflection:
@neomatrix369 also suggest to look for the .md files in here https://github.com/oracle/graal/tree/master/substratevm . There you should find docs on the individual aspects of java config and how to handle them like JNA/JNI etc…
Article that covers
also native image: https://medium.com/graalvm/graalvm-ten-things-12d9111f307d Polyglot
Article on running Java inside a Jupyter Notebooks using GraalVM (java 11 or higher)
Espresso is an implementation in Truffle of Java. You can find more about it here:
@rafael points out this https://github.com/oracle/graal/issues/1656#issuecomment-527882248
We’re currently working on making Espresso 100% TCK compliant (about 1% to go). Soon after that, we plan to open source it.
@fniephaus GraalVM comes with an extension for VSCode with support for the LSP…the integration is built on top of the instrumentation API: https://github.com/oracle/graal/tree/master/vscode/graalvm#language-server-integration Truffle
@chrisseaton pointed out that you can also parse binary files and he has also generated an AST without going through any serialised format Other stuff
You should subscribe to the GraalVM slack. Get an invitation here:
I shared the link to an RPG interpreter which we co-developed and is open-source:
Thinking again about Truffle, I was wondering how this “specialization via annotations” approach compares to generating Java source code (using whatever method available) then compiling it for the GraalVM or any other VM. The point is, when generating Java source code, you have to resolve all specializations anyway.
The flow is more complex, since you have to generate an intermediate representation as source code rather than work directly on the AST. But this have some advantages as well, such as easier debugging.
Any thoughts ?
But how would be the information for generation be provided? I think it is useful to have it in a source connected to the code of the interpreter, as they seem strongly related