42 ms·
GraalVM: Run Programs Faster Anywhere
- oneplane 8y agoKeep 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.
- grashalm 8y agoThe reason why we don't build CE on Mac OS is purely technical. Its because there was no OpenJDK 8 build for Mac that we could use. We hope we can change that soon. OpenJDK builds got a lot more regular with Java version >= 10. Currently we have the same APIs for CE and EE. So applications are easily portable between those two. We have no plans to change this. But. You don't have to take our word for it. CE is open source and you may build, extend and maintain it yourself if you want to.
- bitL 8y agoIs it Oracle Oracle, or Oracle SUN product? BTW, it sounds pretty cool, I am wondering how do you convert between complex datatypes while passing parameters between different languages and not losing much speed with it?
- weberc2 8y agoMe too. I’m thinking there must be some library that knows how to marshal between object representations. Surely Graal doesn’t have universal objects that suit every language.
- miguro 8y agoThat's the thing - there is no marshaling. The objects are passed between the languages as pointers under-the-hood. There is a standard way of invoking methods/functions on those pointers, that works across all languages.
- chrisseaton 8y agoTo give you an idea of how deep this goes - you can pass a Ruby object to a C function and the C function can read and write it as if it was a pointer to a structure. http://chrisseaton.com/truffleruby/structs/ http://chrisseaton.com/truffleruby/structs/
- mike_hearn 8y agoIt has a form of universal object used for scripting languages (but not more static languages like Java or C++). But using it is not required, it's just a convenience to make implementing languages easier. What it actually provides is a form of "universal abstract syntax tree". So if a C program wants to access a JavaScript object by writing "a->b = c" then the dereference is turned into a snippet of JavaScript code (in effect) and inlined right into the C function.
- grashalm 8y agoWe don't convert. We have defined a contract that all languages can work with (quite a challenge and still evolving). From the website: > In order to provide foreign polyglot values meaning in languages we have developed the so-called polyglot interoperability protocol. This interoperability protocol consists of a set of standardized messages that every Graal language implements and uses for foreign polyglot values. The protocol allows GraalVM to support interoperability between any combination of languages without requiring them to know of each other. This technique is based on some research we did in 2015: http://chrisseaton.com/rubytruffle/dls15-interop/dls15-interop.pdf http://chrisseaton.com/rubytruffle/dls15-interop/dls15-inter...
- BrandiATMuhkuh 8y agoCoincidentally I met the creators last week and it's actually developed at the Johannes Kepler University in Linz/Austria. They have a oracle sponsored lab working on compilers etc.
- rch 8y ago> CE is open source GPL. No comment beyond that but I thought I might save someone a few clicks.
- grashalm 8y agoI posted all the license below in a comment.
- jokr004 8y agoOh come on, I'm no fan of Oracle but this is some FUD nonesense..
- oneplane 8y agoWell, you may have a different experience, but for me and my companies (current/prev) it wasn't a lot of fun working with Oracle. It's not that all the stuff is bad or that all the 'free' things turn sour, most of the things are technologically sound, but there is just so much lawyering, licensing and IP fighting that takes all the joy out of life. This isn't unique to Oracle, but not even IBM is as passive-agressive as their non-tech people and documents are.
- realusername 8y agoOracle has an extensive history of screwing developers and companies with IP laws, being suspicious of projects coming from Oracle is only a valid reaction on the history of the company.
- thiagocsf 8y agoI think it’s a legitimate licensing concern. I’m surprised you called it FUD, given the high-profile case against Android (google). I was about to recommend we try it at my company and gave up as soon as I read “Oracle” in the company name. Call it FUD if you want but Oracle does have a damaged reputation.
- pjmlp 8y agoIt happens when companies don't behave as they should, and others lack the money to enforce how things should be. "James Gosling: Oracle vs Google" https://www.youtube.com/watch?v=JQ7xVO9lqD0 https://www.youtube.com/watch?v=JQ7xVO9lqD0
- madmulita 8y agoI don't understand the point of the clip. He says that the code was similar to Sun's, but clearly admits that, not being involved with the trial, he didn't get to see Google's code.
- white-flame 8y agoI am curious how GPL2 will intersect with "You can't reimplement our API in your own project."
- deleted 8y ago[deleted]
- pjmlp 8y agoLike Google, Microsoft, Apple dropping tech, or replacing it with something else, just because. Oracle has done lots of nice things for Java, some of them with uncertain future or even tabu at Sun, like Graal's percusor MaximeVM or AOT compilation. It might not be a company loved by FOSS, but other than IBM there wasn't anyone else caring that much for Java's fate, Google specially did not even bothered. So I appreciate every improvement Oracle does to Java.
- sametmax 8y agoYour point being ? We are all aware of the danger of using techs from those companies.
- miguro 8y agoAnd yet, we use techs from those companies on a daily basis. JVM especially. GraalVM is the next step in JVM's evolution. It's not hard to imagine that this will motivate other JVM vendors to add serious support for other languages.
- sametmax 8y agoVery few people make conscious choices to build their life or society.
- deleted 8y ago[deleted]
- ploxiln 8y agoComparing Oracle to Google is like comparing China gov to US gov. They both do bad things, but they are not remotely the same, the difference is well over 10x. Recent story about Oracle exercising copyright over the word "javascript": https://news.ycombinator.com/item?id=16862949 https://news.ycombinator.com/item?id=16862949 Remember when Oracle sued Google for re-implementing the Java standard library. Remember the OpenOffice -> LibreOffice thing. Remember the Hudson -> Jenkins thing. There's the enterprise sales/licensing tactics which I guess is not very familiar or visceral for most of us, me included. But I'm sure there's more I'm forgetting ...
- jacobush 8y agoCE edition with Mac and Windows builds is a must for me to consider it. I realize I am not a prospective Oracle customer, but I would have been a part of the common people making it more popular overall. The idea of interoperating languages is great though. From the other polar end of the corporate world, we have .NET and its open source versions, and I hear IronPython, Javascript etc work pretty well in the .NET ecosystem. Not my cup of tea though.
- ajpalkovic 8y agoOn 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?
- dboreham 8y ago>I would imagine one other big benefit is that you can have true multithreading Thank The Maker.
- ruffrey 8y agoIt sounds amazing. But Oracle's legal reputation means I can never safely choose their tech stack, especially not something open source and free. One of a million examples, this happens on the front page of HN at the same time: https://www.reddit.com/r/javascript/comments/8d0bg2/oracle_owns_javascript_so_apple_is_taking_down_my/ https://www.reddit.com/r/javascript/comments/8d0bg2/oracle_o...
- meddlepal 8y agoYou have to rigorously defend trademarks otherwise you lose them. Oracles a shit tier company but I don't hold that against them.
- rockostrich 8y agoOracle can't sue you for using Java and OpenJDK.
- ksec 8y agoIs SubstrateVM part of this release ?
- grashalm 8y agoYes. Its behind the native-image command. http://www.graalvm.org/docs/getting-started/#native-images http://www.graalvm.org/docs/getting-started/#native-images
- holydude 8y agoThis is seriously huge. I wonder if it actually gets popular. Can anyone comment on TruffleRuby ? What remains to be done for it to be production ready ? GraalVM page still mentions it's experimental.
- aardvark179 8y agoWe are getting there, lots of things work right out of the box just fine. C extensions are still being actively worked on as they often need some amount of patching because of assumptions they make about types and so forth. I think we can reduce that, but I doubt it can will disappear entirely, but in the end I hope extension authors will test on TruffleRuby themselves and patch the code themselves.
- cutler 8y agoDoes that mean languages like Python and Ruby, which rely heavily on C extensions, will be waiting a long time to be fully compatible?
- aardvark179 8y agoIt depends on their C API. Ruby doesn't really have one, it just has the exposed internals of the vm, and assumptions that can be made about those which are normally true. That includes type assumptions like VALUE being an integer that you can switch on, and _some_ values such as Qfalse and Qnil being constants that can be used in such switch statements, but it also includes things like being able to have a custom GC mark function for a C data structure. It's very hard to produce another Ruby implementation without breaking some of those assumptions, but we can hopefully get it down to a small set so the changes needed are minimal. There are other things like throwing Ruby exceptions across C library boundaries which may work in MRI, but whose behaviour may not be intentional and could already have subtle problems, and I don't think we should be aiming for compatibility in those areas at all. Finding and fixing things like that is normally a good thing to do anyway.
- holydude 8y ago
- mc13 8y agoGreat! Benchmarks of TruffleRuby vs JRuby vs Ruby looks very promising. edit: https://pragtob.wordpress.com/2017/01/24/benchmarking-a-go-ai-in-ruby-cruby-vs-rubinius-vs-jruby-vs-truffle-a-year-later/ https://pragtob.wordpress.com/2017/01/24/benchmarking-a-go-a...
- aardvark179 8y agoIf we can successfully JIT it we normally do very well. The caveat is that we do have warm up time and if we can’t compile stuff then you won’t see the same level of performance.
- dang 8y agoWe changed the URL from the announcement post at https://blogs.oracle.com/developers/announcing-graalvm https://blogs.oracle.com/developers/announcing-graalvm. Pretty sure the project page will be better for HN.
- nirvdrum 8y agoI was uncertain which to use and went with the site announcing what was new, even if a bit corporate. I guess I picked wrong. Thanks for fixing.
- Steltek 8y agoAm 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 https://en.wikipedia.org/wiki/Parrot_virtual_machine
- Operyl 8y agoIf it really is, I’ll gladly start poking at it! That’s the only issue (licensing that is) that’s been pushing me away from Oracle these days.
- kodablah 8y ago> Am I correct in reading the license in Github that this is all GPL? Albeit GPL2 but still not some Oracle proprietary license. Ref https://github.com/oracle/graal#license https://github.com/oracle/graal#license, appears that the parts you would want to distribute have the classpath exception which allows linking without messing with the license of your code (same as the JVM). The FAQ also covers this: http://www.graalvm.org/docs/faq/ http://www.graalvm.org/docs/faq/.
- pjmlp 8y ago"One VM to rule them all" goes all the way back to mainframes and their language environments, with UNCOL being one of the first attempts in 1958. https://en.wikipedia.org/wiki/UNCOL https://en.wikipedia.org/wiki/UNCOL
- joeschmoe3 8y agoWhat 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 security for production deployments. If you are interested in using the enterprise edition in production, please contact graalvm-enterprise_grp_ww@oracle.com.
- claytongulick 8y agoThis project is remarkable! Really excited to see where it goes. The biggest problem I see so far is sparse docs on interop. I see docs with a trivial example of importing simple types from java and using them in node, which is amazing! However, this is pretty far from a real world example. In the real world there are deep type graphs and dependencies and functions that look like IWidgetInterface createWidget(IAbstractWidgetFactory<CoolWidget> factory) etc... seeing examples of dealing with complex types, anonymous Callables, generics, etc... would be great.
- grashalm 8y agoThanks for the feedback. We will definitely improve the polyglot docs in the next weeks. There is lots more to show. Are you calling from Java? Then there are more examples here: http://www.graalvm.org/docs/graalvm-as-a-platform/embed/ http://www.graalvm.org/docs/graalvm-as-a-platform/embed/ Also some of the examples on the website use interop: http://www.graalvm.org/docs/examples/ http://www.graalvm.org/docs/examples/
- grashalm 8y agoGraal dev here. If you want to checkout all the sources/licenses of GraalVM CE. They are here: Graal: https://github.com/oracle/graal https://github.com/oracle/graal (GPLv2 with CPE) JavaScript with Node Integration: https://github.com/graalvm/graaljs https://github.com/graalvm/graaljs (UPL - BSD license) Ruby: https://github.com/oracle/truffleruby https://github.com/oracle/truffleruby (EPL, GPLv2, LGPL) R: https://github.com/oracle/fastr https://github.com/oracle/fastr (GPLv2) Python: https://github.com/graalvm/graalpython https://github.com/graalvm/graalpython (UPL - BSD license) LLVM/Sulong: https://github.com/graalvm/sulong https://github.com/graalvm/sulong
- leoh 8y agoThanks! Out of curiosity — if I built an application with truffleruby, could I distribute it as a JAR (provided that it was run under JDK 9)? Are there ways to call out to Java like JRuby? Having some difficulty finding documentation around this.
- chrisseaton 8y ago> if I built an application with truffleruby, could I distribute it as a JAR Yes there is a Java embedding API. http://www.graalvm.org/docs/graalvm-as-a-platform/embed/ http://www.graalvm.org/docs/graalvm-as-a-platform/embed/ > (provided that it was run under JDK 9) It can run on 8. It'll be fast on JDK 9 or 10 because these have the interface to use Graal. > Are there ways to call out to Java like JRuby? JRuby compatible interop: https://github.com/oracle/truffleruby/blob/master/doc/user/jruby-java-interop.md https://github.com/oracle/truffleruby/blob/master/doc/user/j... Our own interop: https://github.com/oracle/truffleruby/blob/master/doc/user/polyglot.md https://github.com/oracle/truffleruby/blob/master/doc/user/p... > Having some difficulty finding documentation around this. https://github.com/oracle/truffleruby/tree/master/doc https://github.com/oracle/truffleruby/tree/master/doc
- aardvark179 8y agoBe warned, the jruby compatible interop isn’t complete, and I don’t have the jruby test suite running for it because that requires a much more complete implementation to run at all. It’s good for quite a lot though.
- _wmd 8y agoMight this (today, tomorrow) become another way to get access to the wonderful Lucene from non-Java environments? A long, long time ago there was a GCJ-based solution, but it was never loved much (either the port or GCJ itself). SubstrateVM looks potentially delicious here edit: lol: talk about a low blow! > The community version does not support DWARF information. The enterprise version supports all native tools that rely on DWARF information, like debuggers (gdb) and profilers (VTune).
- mike_hearn 8y agoWell, there has always been JNI. If you want to access Lucene from C or runtimes that can call into C then you could do that for years. Otherwise with GraalVM you could run your non-Java environments on Graal and go at it the other way around.
- mkj 8y agoWhere's that quote from about DWARF? Pay for a backtrace, pah!
- maltalex 8y agoCan someone please explain this? > Are you working on a Java application? Do you want a faster runtime? Enhance your code with JavaScript! First, the JVM already has the Nashorn JS engine. Second, if I'm "working on a Java app", that means that it's already running in a JVM. Where does the faster runtime come from? Is executing JS from Java using Graal faster than running actual Java code? Is it just faster than Nashorn? Something else?
- aardvark179 8y agoSo Graal can do more than Hotspot's C2 compiler so may be able to run your code faster than a stick JVM, Twitter have had some very good experiences with it. The JS implementation is very different to Nashorn's so it may be faster for your application.
- pradn 8y agoI think that copy is best read in two parts. "Are you working on a Java application? Do you want a faster runtime?" Graal provides an ahead of time compiler for Java, which can speed things up by removing JVM warm up time. I'm unsure how much faster Graal is compared to steady-state JVM. "Enhance your code with JavaScript!" Embedding Graal is an alternative to Nashorn.
- grashalm 8y agoThe Graal compiler is compiling Java code to faster machine code on top of the JVM. Also GraalVM's JavaScript implementation uses an entirely different approach by using Truffle for its implementation making it significantly faster. Also GraalVM ships with Node.js support, tooling and other languages. Here is a full list of reasons: http://www.graalvm.org/docs/why-graal/ http://www.graalvm.org/docs/why-graal/ Here are some (maybe a bit outdated, but independent) benchmarks comparing it to Nashorn: http://blog.nidi.guru/tech/javascript/2018/04/02/javascript-benchmarks/ http://blog.nidi.guru/tech/javascript/2018/04/02/javascript-... We have some way to go to beat V8.
- thinkloop 8y agoFrom the provided link: - graal has superior compiler technology based off of a research paper [1] that: -- has superior ability to remove costly object allocations in many scenarios -- has better inlining and more aggressive speculative optimizations -- has smarter jit compilation [1] http://www.ssw.uni-linz.ac.at/Research/Papers/Stadler14/Stadler2014-CGO-PEA.pdf http://www.ssw.uni-linz.ac.at/Research/Papers/Stadler14/Stad... (pdf)
- chrisaycock 8y agoTruffle makes it possible to implement a JITed dynamically-typed language simply by annotating actions on the AST. http://www.graalvm.org/docs/graalvm-as-a-platform/implement-language/ http://www.graalvm.org/docs/graalvm-as-a-platform/implement-... Here's an example of the addition operator from Graal's SimpleLanguage: @NodeInfo(shortName = "+") public abstract class SLAddNode extends SLBinaryNode { @Specialization(rewriteOn = ArithmeticException.class) protected long add(long left, long right) { return Math.addExact(left, right); } @Specialization @TruffleBoundary protected SLBigNumber add(SLBigNumber left, SLBigNumber right) { return new SLBigNumber(left.getValue().add(right.getValue())); } @Specialization(guards = "isString(left, right)") @TruffleBoundary protected String add(Object left, Object right) { return left.toString() + right.toString(); } protected boolean isString(Object a, Object b) { return a instanceof String || b instanceof String; } } https://github.com/graalvm/simplelanguage https://github.com/graalvm/simplelanguage By default it uses an arbitrary precision adder. But node rewriting on the AST (predicated by the "guard") provides specializations for long and String types. The long-type execution is a "fast path" that executes machine instructions directly; the String-type execution is a string concatenation. A research paper provides further details: https://dl.acm.org/citation.cfm?id=2658776 https://dl.acm.org/citation.cfm?id=2658776 The full tutorial is at: https://github.com/oracle/graal/blob/master/truffle/docs/LanguageTutorial.md https://github.com/oracle/graal/blob/master/truffle/docs/Lan...
- deleted 8y ago[deleted]
- deleted 8y ago[deleted]
- chc4 8y agoSomeone I know wrote a Java implementation of the small VM for an open source project that had a simple C interpreter. My first thought was "wait, why?", until they mentioned that it was more than 10x faster and much, much easier to write and extend. You basically get a very good JIT engine for free. Not gonna underestimate Truffle after that.
- zackbloom 8y agoHow is this better than compiling everything to WebAssembly and using V8 as your interpreter?
- kllrnohj 8y agoBecause 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.
- abc_lisper 8y agoDidn't know about this. Can you point me to some references that list the tradeoffs?
- scriptproof 8y agoWebAssembly is a tool in work, supported by Google, Microsoft, Apple, etc... Currently it lacks a garbage collector, but this is planned. I would bet on wasm to be the holly graal in the future, more than anything else.
- discreteevent 8y agoWe'll one reason would be that it looks like it actually works with a lot of languages right now. Do we have any idea when ruby will work in V8? BTW. In my experience so far, when it comes to software - a bird in the hand is worth ten in the bush
- jashmatthews 8y agoMany optimizations need to be performed at a higher level, using language details. By compiling something to WebAssembly you lose all the ability to do that. For dynamic languages like JS you can’t actually make these optimizations AOT, which is why we JIT JS in the first place.
- tom_mellior 8y agoIt has GC. (As does V8, but it's not exposed to WebAssembly.)
- polskibus 8y agoTo 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.
- gcommer 8y agoI tested it out with some fairly dependency-heavy node JS projects and it worked great (albeit with a human-noticeable perf difference vs node). R projects suffer the usual R-on-JVM issues, see eg https://github.com/oracle/fastr#status-and-limitations https://github.com/oracle/fastr#status-and-limitations . I could, however, use ggplot2 and dplyr, which I don't recall working the last time I tried R-on-JVM. So that's awesome. Being able to reasonably use R stuff from clojure (and other languages better for general purpose programming) is my data science dream. Though I can't say I'm sad with my current unix-y solutions.
- grashalm 8y agoYou can check libraries here: http://www.graalvm.org/docs/reference-manual/compatibility/ 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/ http://www.graalvm.org/docs/graalvm-as-a-platform/
- bitmapbrother 8y agoIt would be hilarious to discover if C# runs better on the JVM then CLR.
- jahlqvis 8y agoDoes this mean I can convert my C++ win32 desktop app to run on virtually all platforms?
- earenndil 8y agoProbably not. Win32 itself is a windows-only API -- although wine is a thing.
- royjacobs 8y agoThis is wonderful. I'm looking forward to playing around with JavaFX. Being able to compile that to a native image is huge! It would effectively invalidate the Electron approach of building "native" applications.
- pjmlp 8y agoThat approach was already invalidated long time ago. All major commercial JDKs do support AOT compilation and ExcelsiorJET is free for open source projects.
- royjacobs 8y agoThis is completely free, though.
- mike_hearn 8y agoI don't think SubstrateVM supports JavaFX. However bear in mind you can already bundle JavaFX and the JRE together into native installers for each platform that don't require a JRE or JVM, and don't mention Java anywhere, using the javapackager tool. I've used it several times, it works well enough.
- pronoiac 8y agoI recently stumbled on an announcement for Graal and Truffle in my bookmarks: https://blog.plan99.net/graal-truffle-134d8f28fb69 https://blog.plan99.net/graal-truffle-134d8f28fb69 discussed at https://news.ycombinator.com/item?id=13343845 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.
- saurik 8y agoI 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/ http://www.graalvm.org/docs/graalvm-as-a-platform/
- grashalm 8y agoThank you for those questions. > Can I AOT with this (via SubstrateVM) and deploy to "mobile" targets, and specifically iOS? Technically there is no reason to not support it. But support is not implemented yet. > Are there any examples of embedding GraalVM in an existing native application (such as the noted idea of having GraalVM accessible inside of MySQL)? Yes. Oracle MLE[1] and MySQL already work. Oracle MLE you can try already. We have a native embedding API (its very similar to the Java API). We could not yet quite finish the documentation of it for website. But its already included look for a file polyglot_api.h in the binary. [1] https://oracle.github.io/oracle-db-mle/releases/0.2.7/ https://oracle.github.io/oracle-db-mle/releases/0.2.7/
- ihnorton 8y ago> 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?
- chrisseaton 8y ago> How large is the resulting executable? A minimal executable is about 5 MB. > There was some mention of shares libraries — is it possible to build a runtime that is callable from C? Yes you can compile a JAR to a shared library with C function entry points. > Relatedly, does the GraalVM java executable support JNI? Yes. > 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? Real language VMs are quite a bit bigger - a hundred MB or so.
- pritambaral 8y ago>> 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? > Real language VMs are quite a bit bigger - a hundred MB or so. Don't know if you're trying to say Lua is not a real language, or just skipped the part about Lua.
- chrisseaton 8y agoNo, hello-world executables built using SVM are 5 MB or so. Real world language VMs built using SVM are a hundred MB or so. If you had a language VM for the real world language that is Lua built using SVM it would probably be a hundred MB or so. I'm not passing any opinions about any languages or VMs here.
- pritambaral 8y ago
- rajangdavis 8y agoGoing to try it out, but does anyone know offhand whether GraalVM can be ran within the Linux subsystem in Windows 10?
- grashalm 8y agoIf you can run a HotSpot JVM there then also GraalVM should work. I don't think we tested that.
- rajangdavis 8y agoWill let you know what I find out, thanks! Edit: It works (for Ruby and Python) Here is how to set up GraalVM for the Linux Subsystem on Windows 10: 1. Enable and Install Ubuntu for Windows 10: https://docs.microsoft.com/en-us/windows/wsl/install-win10 https://docs.microsoft.com/en-us/windows/wsl/install-win10 2. Download the EE edition of GraalVM to Windows: http://www.graalvm.org/downloads/ http://www.graalvm.org/downloads/ 3. Mount the folder that has the tar file: https://stackoverflow.com/a/42586455/2548452 https://stackoverflow.com/a/42586455/2548452 4. Unzip the files (tar xvfs graalvm-ee-1.0.0-rc1-linux-amd64.tar.gz) 5. Create a .bash_profile for setting the $PATH (my personal preference) 6. Follow the instructions from the following up until the "Running Programs": http://www.graalvm.org/docs/getting-started/ http://www.graalvm.org/docs/getting-started/ 7. Follow instructions for installing LLVM and locales: https://github.com/oracle/truffleruby#system-compatibility https://github.com/oracle/truffleruby#system-compatibility 8. Follow instructions for installing libssl-dev: https://github.com/oracle/truffleruby/blob/master/doc/user/installing-libssl.md https://github.com/oracle/truffleruby/blob/master/doc/user/i... 9. NOW continue on with everything _after_ "Running Programs": http://www.graalvm.org/docs/getting-started/ http://www.graalvm.org/docs/getting-started/ Getting npm to work: I could run node -v, but could not run npm and I was getting this error: jvm library could not be loaded: /home/raj/graalvm/jre/lib/polyglot/libpolyglot.so: cannot enable executable stack as shared object requires: Invalid argument I fixed it by running the following: 1. sudo apt-get install prelink 2. sudo execstack -c ~/graalvm/jre/lib/polyglot/libpolyglot.so Going to do some experimenting, but so far so good!
- gbraad 8y agowhy would you want that... it should run directly on Windows too?!? Not sure what you gain from using the linux binary from LXSS. If you really insist, invoke instead as .exe so you can still use bash and other tools, but run the actual compile or runtime using the system-native implementation.
- bitmapbrother 8y agoThis is an epic announcement and it further extends the JVM as the best VM to develop new languages for and port existing ones to. I'm curious though, is there a Truffle version of the Java language that the Graal JIT uses?
- grashalm01 8y agoNot yet. It's on our roadmap.
- ChickeNES 8y agoI wouldn't touch this with a ten-foot-pole without an explicit patent grant. Oracle has misbehaved too much in the past (and present) to ever be trusted again by the open source community in my opinion.
- jake_the_third 8y agoThis was the first thought that crossed my mind. If I have a choice between running our stack 50 times slower (and thereby 50 times the cost) or running anything Oracle, I know which choice is cheaper and doesn't come with an existential threat to my company. Only governments and big corp are rich and reckless enough to take on this kind of risk willingly.
- carterehsmith 8y ago>> existential threat to my company There is like a bajillion people out there running Oracle Java, MySql, Virtualbox and so on. All of them Oracle products, and with permissive licenses. Where is this "existential treat" thing coming from?
- jake_the_third 8y ago>There is like a bajillion people out there running Oracle Java, MySql, Virtualbox and so on. All of them Oracle products, and with permissive licenses. Where is this "existential treat" thing coming from? Oracle. (see, I can be sarcastic too) Ignoring the fact that most of those users were likely acquired back when those products were still known as Sun Java, Sun MySql, and Sun Virtualbox, those "bajillion" people are not lucrative enough to warrant the effort. The moment one of those people becomes large enough, Oracle's lawyers will come knocking. If you're large enough, they will even go as far as to change how copyright law itself is interpreted to get their fill. With a company like that, entering any form of contract or agreement is a major liability and an existential threat.
- Kiro 8y agoYour points are valid but you're exaggerating.
- kristianp 8y agoRuns a small erb template more than 50 times faster than jruby [1]. No mention of rails on that page though. It can also run C extensions. [1]: http://www.graalvm.org/docs/reference-manual/languages/ruby/ http://www.graalvm.org/docs/reference-manual/languages/ruby/
- wemdyjreichert 8y agoDoes it support lisp? If not, any plans to add soon?
- iLemming 8y agoI wonder what this means for Clojure and Clojurescript developers
- didibus 8y agoFor Clojure, I think it means native compilation, with fast startup times, and the ability to interop with Python, Ruby, or any of the other Graal languages. Not sure there would be an advantage to re-implementing a Clojure on Graal. Clojure is not an interpreted language like Ruby, JavaScript and Python is, so I don't think Graal adds as much benefit here. For ClojureScript, it would mean full circle. You could run your ClojureScript back on the JVM, and have Java interop from it.
- youdontknowtho 8y agoThat is super interesting. Im particularly interested in C++ with the other languages mentioned.
- RandomBK 8y agoIs there public documentation for the differences between the CE and EE editions? The website mentions that EE "provides improved performance and security for production deployments". What types of performance and security optimizations are locked behind the EE edition? What is your criteria for determining whether a new optimization belongs in CE or EE? I also want to echo others' concerns about the license, lock-in, and lack of explicit patent grant. It's a shame that Oracle's (well-deserved) reputation is tainting so many excellent engineering efforts. I hope that these comments serve as some form of feedback about the very real cost the Oracle brand has suffered as a result of its legal activities.
- deleted 8y ago[deleted]
- deleted 8y ago[deleted]
- ksec 8y agoOne VM to Rule them All. https://news.ycombinator.com/item?id=6358772 https://news.ycombinator.com/item?id=6358772 https://news.ycombinator.com/item?id=6232240 https://news.ycombinator.com/item?id=6232240 That was the earliest post I remember from HN. But I record there some other information scattered around a little before that. So this is nearly 5 years coming. I am amazed what at first seems like fantasy, impossible work is now actually thing. 2012 / 2013 was the year when VM and JIT has lots of innovation. Rubinus, LuaJIT, SpiderMonkey and all those Javascript VM.
- SureshG 8y agoReally excited to see 1.0 release. Have been following Graal and SubtrateVM as a way to create native binaries (specifically CLI tools). So, any plans to support Windows and MacOSx for CE? Also, any support for cross-compilation to generate native-binary for a different target(something like Golang GOOS) ?
- viach 8y agoGraalVM 1. Community Edition (CE) > GraalVM CE is available for free for development and production use. It is built from the GraalVM sources available on GitHub 2. Enterprise Edition (EE) > GraalVM EE provides additional performance, security, and scalability relevant for running critical applications in production. It is free for evaluation uses and available for download from the Oracle Technology Network. "performance, security, and scalability" words don't present in p1. Is it just me or...?
- psandersen 8y agoThis looks really interesting. Can anyone comment on how mature the R and python support is? I'm coming at this from an ML/data science background, so anything that speeds up the above while maintaining broad library support would be a great help.
- grashalm 8y ago- 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.com/docs/reference-manual/compatibility/ http://graal-staging.us.oracle.com/docs/reference-manual/com...
- psandersen 8y agoThanks 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. typical interactive finished in 1 second instead of 50ms, but large loops that would take an hour finish in 10 minutes.
- grashalm01 8y agoYou 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/ http://www.graalvm.org/docs/reference-manual/compatibility/ (Accidentally posted the internal link :D)
- psandersen 8y agoAwesome, thanks for that. I'll definitely give it a shot once rstudio is supported.
- claudiug 8y agothere is any roadmap to make available for MacOS?
- grashalm 8y agoGraalVM EE has a MacOS version that is free for evaluation uses. http://www.graalvm.org/downloads/ http://www.graalvm.org/downloads/ There are technical reasons we cannot have a CE for Mac OS as well. But we are working on that.
- claudiug 8y agohttps://github.com/oracle/truffleruby/releases/tag/vm-1.0.0-rc1 https://github.com/oracle/truffleruby/releases/tag/vm-1.0.0-... this will contain EE or CE version?
- grashalm 8y agoNeither. You download EE or CE from graalvm.org. Then you install using the component installer. gu -c install org.graalvm.ruby or from a local file gu install ruby-installable-linux-amd64.jar
- PedroBatista 8y agoDoes GraalVM truly supports hotreload/class reloading without any hacks (Agent, new classloader every reload) unlike Hotspot? Until then, areas like web development always will be a torture.
- ksec 8y agoI know lots of people are worry about Oracle. But the license is extremely clear, it is the same as Java. So like the JVM or JDK, there is nothing stopping you from for forking the code, as long as you don't call it Java, and "your" JVM would not get the test suit. GPL 2 with Classpath exception has been with us for so long. I know you hate Oracle, but I don't see any downside to it. I mean half of the Internet literally runs on JVM and MySQL. I had to look hard and it doesn't seems to have any strings attached.
- shthed 8y agoSo to contribute to this you have to sign the Oracle Contributors Agreement: http://www.oracle.com/technetwork/community/oca-486395.html http://www.oracle.com/technetwork/community/oca-486395.html "The OCA gives Oracle and the contributor joint copyright interests in thre code." What does 'thre' mean? ;P They want it physically printed and signed.. sigh, I haven't printed anything in years. Is this normal to require a scanned signature for CLAs? I noticed Apache CLA is the same (they want scanned paper signature), but all others I've seen are an online form.
- ksec 8y agoSome benchmarks I saw on Twitter. https://gist.github.com/havenwood/6fed7dd17131330ae4fd36a06fd2c19b https://gist.github.com/havenwood/6fed7dd17131330ae4fd36a06f... *( Scroll to the bottom for Summary )
- otabekyr 8y agoNo for oracle
- otabekyr 8y agoA BIG NO for oracle. Registered to write this