
Graal: How to use the new JVM JIT compiler in real life [video] - pjmlp
https://www.youtube.com/watch?v=yhtrRhNUHvQ
======
sandGorgon
The JVMCI code that Graal depends on was added to Java 9 and is inbuilt.
However, all Graal and Graal-downstream projects use a custom built Java 8
release. This is also the plan for the " _foreseeable future_ "
([https://github.com/oracle/truffleruby/issues/556#issuecommen...](https://github.com/oracle/truffleruby/issues/556#issuecomment-335118818))

It looks like a bureaucratic struggle of some kind - I wonder what's the
behind the scenes story at Oracle.

Additionally, "mx" : the build system that Graal uses is fairly funky - and
everyone including Chris (the engineer that made this video) is trying to get
the team to move on

[https://twitter.com/christhalinger/status/958824900004753408...](https://twitter.com/christhalinger/status/958824900004753408?s=09)

I wish they would use Bazel or something

~~~
grashalm01
Graal dev here. We're testing on jdk 8,9,10 and 11. We are packing graalvm
with jdk 8 atm to keep variability reasonable. Graal will be integrated into
the JVM soon with project Metropolis:
[http://openjdk.java.net/projects/metropolis/](http://openjdk.java.net/projects/metropolis/)

Graal is used for many more things than dynamically compiling Java. Besides
others it's used for SubstrateVM (closed world AOT compilation) and Truffle
languages like TruffleRuby, Graal.JS, FastR, Sulong(llvm integration) and our
newest member Graal.Python.

Graal comes out of Oracle Labs. The build tool mx is short for Maxine, the
spiritual predecessor of the Graal project. If you don't know mx it's quite
intimidating and ugly. It's Python written by Java developers. But it does
it's job coping with our not so standard building and testing requirements. No
we don't run mx on Graal.Python yet, but we are working on it for full build
tool metacircularity ;).

~~~
AlphaSite
Why not Graal.py?

~~~
alcidesfonseca
For me this would mean a python project (graal bindings within CPython) and
not a Python implementation.

CPython Pypy Jython IronPython

I would now go with GraalPython (GrPython or GPython)

~~~
marvy
Graal.py rubbed me the wrong way, until I read your comment I couldn't put my
finger on why. Thank you!

------
PyComfy
Does Graal support tail call optimization? It has been announced for hotspot
+10 years ago but still not implemented as today.

edit: [https://blogs.oracle.com/jrose/tail-calls-in-the-
vm](https://blogs.oracle.com/jrose/tail-calls-in-the-vm)

~~~
grashalm01
When executing on Java we are dependent on hotspot to support it in the native
bytecode interpreter. In truffle interpreters we made some successful
experiments with tail calls emulated using exceptions. It's pretty slow in the
interpreter but as soon as graal optimizes it, it just turns into a tailcall
loop. Here is some more info:
[http://epub.jku.at/obvulihs/content/pageview/508465](http://epub.jku.at/obvulihs/content/pageview/508465)

You may find some blog posts about truffle and tailcalls as well.

------
ZenoArrow
Does Graal VM work on Windows yet? That was the main factor that held me back
from using it the last time I evaluated it.

~~~
pjmlp
Windows support will be made available on Java 10.

[https://bugs.openjdk.java.net/browse/JDK-8172670](https://bugs.openjdk.java.net/browse/JDK-8172670)

~~~
tinco
Weird I remember running Graal on Windows a couple of years ago, was Windows
support dropped along the way?

~~~
_old_dude_
Graal works on Windows since a long time, it's the AOT with Graal that works
only since Java 10.

