Live data from Hacker News

GraalVM: Run Programs Faster Anywhere

graalvm.org

51–60 of 218 posts

Re: GraalVM: Run Programs Faster Anywhere

#51

How is this better than compiling everything to WebAssembly and using V8 as your interpreter?

Because WebAssembly is extremely limited? Unless you need to ship on the web, using WebAssembly is almost certainly a bad decision as it makes highly compromising tradeoffs that you don't need.

Didn't know about this. Can you point me to some references that list the tradeoffs?

Re: GraalVM: Run Programs Faster Anywhere

#52
post #7

Am I correct in reading the license in Github that this is all GPL? Albeit GPL2 but still not some Oracle proprietary license. "One VM to rule them all" reminds me of Parrot VM (for Perl 6). Looks like development slowed down a year or two ago. Back then, it got me excited as it looked like the "open source community" alternative to "Big Corporate Java". https://en.wikipedia.org/wiki/Parrot_virtual_machine

What is the license of GraalVM? There is a community edition (CE) and an enterprise edition (EE) of GraalVM. The community edition is distributed under an open source license. It is free to use in production and comes with no strings attached, but also no guarantees or support. The enterprise edition is available from the Oracle Technology Network under an evaluation license. It provides improved performance and secu…

The CE doesn't run on OSX though. Sigh!

Re: GraalVM: Run Programs Faster Anywhere

#53

To what extent is this compatible with all existing libraries for allegedly supported languages? I'm also curious if .net standard/c# support is being planned.

You can check libraries here: http://www.graalvm.org/docs/reference-manual/compatibility/

We don't test all of them but many.

We have considered .NET support but we are not actively working on it right now. But GraalVM is an open platform. Everyone can develop a language for it: http://www.graalvm.org/docs/graalvm-as-a-platform/

Re: GraalVM: Run Programs Faster Anywhere

#54
I recently stumbled on an announcement for Graal and Truffle in my bookmarks:

https://blog.plan99.net/graal-truffle-134d8f28fb69

discussed at https://news.ycombinator.com/item?id=13343845

The idea there: "Graal is a research compiler. ... Truffle is a framework for implementing languages using nothing more than a simple abstract syntax tree interpreter."

As a bonus, you get high speed, good instrumentation for debugging and profiling, with great garbage collection, and hotswap code as you develop.

Re: GraalVM: Run Programs Faster Anywhere

#55
post #7

Am I correct in reading the license in Github that this is all GPL? Albeit GPL2 but still not some Oracle proprietary license. "One VM to rule them all" reminds me of Parrot VM (for Perl 6). Looks like development slowed down a year or two ago. Back then, it got me excited as it looked like the "open source community" alternative to "Big Corporate Java". https://en.wikipedia.org/wiki/Parrot_virtual_machine

Is anyone else so leery of Oracle's lawyers you want nothing to do with this? Even if it's awesome work, as I expect it is, I don't trust Oracle not to someday find a new way to screw me, whatever the text of the license.

(I'm having doubts if this comment belongs here. But it's my genuine reaction, for what it's worth.)

Re: GraalVM: Run Programs Faster Anywhere

#56
Keep in mind that while this is nice technology, it's Oracle-based, split in CE/EE (which in itself is not a problem, but CE doesn't run on macOS), and they will find a way to screw you over at some point in the future regardless of what you do, use or choose.

Re: GraalVM: Run Programs Faster Anywhere

#57
On the "why graal" page, it says that one benefit is you can use a larger heap size for nodejs applications. I would imagine one other big benefit is that you can have true multithreading since the app now runs on the jvm. Is this indeed possible? Is there any guidance on how to do it? Rhino had the concepts of Scope's and Context's to somewhat safely parallelize code, so curious if there are similar primitives in Graal?

Re: GraalVM: Run Programs Faster Anywhere

#59
I have been paying some scant attention to GraalVM for some time, having been excited by "universal VMs" for decades now (including setups like LLVM, which most people forget was designed as a JIT-compiled VM, despite that being in the name), and I develop Cycript (which is somewhat the "opposite" technology, binding together existing virtual machines all into the same process space and doing crazy interop; though I haven't done a public release now in well over a year).

I am excited to see such a beast coming from a major company with a strong track record in VMs, and particularly given that it is based on their existing JDK, and am particularly excited that it now seems to be available!

I have some questions that I did not managed to easily get answered from looking over the website.

Can I AOT with this (via SubstrateVM) and deploy to "mobile" targets, and specifically iOS?

Are there any examples of embedding GraalVM in an existing native application (such as the noted idea of having GraalVM accessible inside of MySQL)?

Is there an existing embedding for node.js? (I don't mean "can I run node.js apps on GraalVM?"; I mean: from node.js, can I instantiate a GraalVM and give it code to execute in a new context, or will I need to build my own bindings to the GraalVM embedding API for that first?)

I did find some documentation for using an embedded GraalVM in a Java application, but while I work on many projects in many languages, none of them have been written in Java now for over a decade. I guess I was expecting a C/C++ API to be documented somewhere, not a Java API (due to the listed prototypical embeddings, and based on my long experience with embedding other virtual machines, including the Oracle/Sun JVM).

http://www.graalvm.org/docs/graalvm-as-a-platform/

Re: GraalVM: Run Programs Faster Anywhere

#60
> With the SubstrateVM it is possible to produce a single, statically linked native binary executable version of Graal.js, which doesn't need any JVM to run.

How large is the resulting executable? There was some mention of shares libraries — is it possible to build a runtime that is callable from C?

Relatedly, does the GraalVM java executable support JNI?

I’m also curious about the runtime footprint in general; any idea what is the smallest possible VM for a real but relatively-small language like Lua?

Post reply on HN