Live data from Hacker News

GraalVM: Run Programs Faster Anywhere

graalvm.org

211–218 of 218 posts

Re: GraalVM: Run Programs Faster Anywhere

#211

Earlier quoted context omitted.

- FastR is around for several years. Language support is pretty much done. Its mostly about getting to run CRAN packages that use native extensions. - Graal.python is pretty new and its really early days. So even basic language things might break right now. But we are investing a lot of resources in Python support. You can check for compatibility of packages here (not yet for Python): http://graal-staging.us.oracle.c…

Thanks for that, link seems down unfortunately. I use data.table a lot but would happily switch if the dplyr family of packages work. Would love to use this in Rstudio for exploratory analysis which would also need ggplot to work. Quite often have to cancel long running tasks when exploring a data set, so even if its a bit slower for interactive tasks but much faster for longer running tasks would be huge. E.g. typic…

You will like to hear that there is some rstudio integration in the works.

Here is the correct link: http://www.graalvm.org/docs/reference-manual/compatibility/

(Accidentally posted the internal link :D)

Re: GraalVM: Run Programs Faster Anywhere

#212

Graal dev here. If you want to checkout all the sources/licenses of GraalVM CE. They are here: Graal: https://github.com/oracle/graal (GPLv2 with CPE) JavaScript with Node Integration: https://github.com/graalvm/graaljs (UPL - BSD license) Ruby: https://github.com/oracle/truffleruby (EPL, GPLv2, LGPL) R: https://github.com/oracle/fastr (GPLv2) Python: https://github.com/graalvm/graalpython (UPL - BSD license) LLVM/Su…

Why is this yet another implementation of Python? If C is supported why not use CPython itself?

Because Graal.python will be a lot faster. Just running cpython on GraalVm is possible but does not get you anything.

Re: GraalVM: Run Programs Faster Anywhere

#213

Earlier quoted context omitted.

Thanks for that, link seems down unfortunately. I use data.table a lot but would happily switch if the dplyr family of packages work. Would love to use this in Rstudio for exploratory analysis which would also need ggplot to work. Quite often have to cancel long running tasks when exploring a data set, so even if its a bit slower for interactive tasks but much faster for longer running tasks would be huge. E.g. typic…

You will like to hear that there is some rstudio integration in the works. Here is the correct link: http://www.graalvm.org/docs/reference-manual/compatibility/ (Accidentally posted the internal link :D)

Awesome, thanks for that. I'll definitely give it a shot once rstudio is supported.

Re: GraalVM: Run Programs Faster Anywhere

#214
post #206

Earlier quoted context omitted.

MoarVM/NQP compares very badly with Graal and Truffle. MoarVM is a ton slower and less flexible.

Thanks for replying. I think MoarVM/NQP are strikingly similar in their approach based on what I've learned so far about Graal/Truffle (which isn't much; perhaps a few hours of exploration; eg reading/watching the One VM to Rule Them All, One VM to Bind Them paper/video). [1] Given the large number of Oracle employees working on Graal/Truffle (40 in 2016 according to the video) it doesn't surprise me that it's curren…

> I think MoarVM/NQP are strikingly similar in their approach

Does MoarVM use a meta-compilation technique? Pypy for example uses meta-tracing and Truffle uses Partial Evaluation to get from an interpreter specification to dynamically compiled code without duplicating the language logic. If yes, could you please point me to further information?

Meta-compilation is the primary innovation in Truffle. It allows to compose languages together and to compile them as one unit.

If you want to know more about the Truffle approach to meta-compilation see this PLDI paper from 2017[1].

[1] http://chrisseaton.com/rubytruffle/pldi17-truffle/pldi17-tru...

Re: GraalVM: Run Programs Faster Anywhere

#215
post #206

Earlier quoted context omitted.

Thanks for replying. I think MoarVM/NQP are strikingly similar in their approach based on what I've learned so far about Graal/Truffle (which isn't much; perhaps a few hours of exploration; eg reading/watching the One VM to Rule Them All, One VM to Bind Them paper/video). [1] Given the large number of Oracle employees working on Graal/Truffle (40 in 2016 according to the video) it doesn't surprise me that it's curren…

> I think MoarVM/NQP are strikingly similar in their approach Does MoarVM use a meta-compilation technique? Pypy for example uses meta-tracing and Truffle uses Partial Evaluation to get from an interpreter specification to dynamically compiled code without duplicating the language logic. If yes, could you please point me to further information? Meta-compilation is the primary innovation in Truffle. It allows to compo…

Thanks for the 2017 link.

Its NQP that does metacompilation, not MoarVM (afaik).

I linked to NQP's (spartan) readme above.

Some other points/links that might be helpful:

* nqp is written in nqp.

* nqp has a first class grammar construct. See wikipedia's Perl 6 Rules page.[1] (nqp's grammar is defined using nqp's grammar construct. So is Perl 6's.)

* nqp and MoarVM implement a protocol for abstracting behavior (eg methods) and representation (memory layout and use) called 6model.[2]

To try set your expectations appropriately, let me emphasize this note from the NQP readme: "NOTE: there's no end-user support for NQP and the behaviour can change without notice. It's a tool for writing Perl 6 compilers, not a low-level module for Perl 6 programmers."

NQP is a tool for writing compilers, not just Perl 6 compilers, and is in fact much more than that, but the Perl 6 project is currently very focused on the Perl 6 language and definitely doesn't want ordinary Perl 6 programmers thinking NQP is a tool for them.

Doc is sparse, again reflecting the focus on the Perl 6 language and the Rakudo compiler that builds atop NQP, analogous to your team focusing on just one of your guest languages.

The best doc for getting into NQP is not even in the NQP repo. It's the support materials for a 2-day workshop held in 2013. The abstract is "This intensive 2-day workshop takes a deep dive into many areas of the Rakudo Perl 6 and NQP internals, mostly focusing on the backend-agnostic parts but with some coverage of the JVM and future MoarVM backends also. During the course, participants will build their own small compiler, complete with a simple class-based object system, to help them understand how the toolchain works.".[3]

Beyond that, there is a doc directory in the nqp repo.[4]

Please write an update here on what you find out.

----

[1] https://en.wikipedia.org/wiki/Perl_6_rules

(nqp rules are Perl 6 Rules grammars but the general purpose DSL (!) for writing procedural code embedded in an nqp grammar is nqp's general purpose DSL rather than Perl 6's general purpose DSL.)

[2] https://github.com/perl6/nqp/tree/master/docs/6model

(MoarVM directly implements 6model -- MoarVM is named for "Metamodel On A Runtime". 6model is how one nqp based language is able to do magic like subclassing a class written in another language (whether nqp based or via an existing compiler) despite them having distinct OO semantics and implementation strategies.)

[3] https://github.com/edumentab/rakudo-and-nqp-internals-course

[4] https://github.com/perl6/nqp/tree/master/docs

Re: GraalVM: Run Programs Faster Anywhere

#218
post #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…

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

The GraalVM in MySQL will be released soon and that will be the best example of embedding GraalVM in native projects.

The API for embedding in native applications is still experimental: it might change slightly in the few following versions. You can find the API with documentation in the polyglot_api.h file in the GraalVM distribution.

Post reply on HN