7 ms·
I don't say nice things about Oracle very often, but they deserve some praise here. Graal is a very, very ambitious project, and Oracle has been funding it for
by ccleve 4y ago
I don't say nice things about Oracle very often, but they deserve some praise here. Graal is a very, very ambitious project, and Oracle has been funding it for years. It's still rough around the edges, but it promises to enable new programming languages to run on a high-performance JVM, compiled to native code. Write-once, run anywhere, at native speed. And now they're donating it. It's very decent of them.
- bluejekyll 4y agoIt may not only be benevolence though. The JVM and Graal are not the only game in town anymore. Webassembly is growing in various areas, clienside, edge, backend. WASM fills much of the same needs as Graal, and then some since it’s embedded in every major browser. This move is good for Graal, as it will help it compete, but there’s still a big question in my mind at least about if Graal is going to be able to compete long-term. Yes, I know Graal can also execute WASM generated binaries, so it may have a space in this environment, but will it outperform native WASM VMs? And will WASM become the de facto binary format for shipping things where JVM bytecode has been used in the past? What’s Graal’s place in the future?
- dopidopHN 4y agoYeah. I see that as a way to position the JVM for cloud-function and other highly available and disposable compute.
- lostmsu 4y agoWASM is not really a replacement for Graal. Graal is more of a language implementation framework, while WASM is a compilation target.
- lostmsu 4y agoI think down in the comments people mentioned, that the language part of Graal is not actually included in the contribution.
- vips7L 4y agoIs there a current WASM implementation that can out perform HotSpot? Will WASM ever outperform it? I highly doubt it.
- frant-hartm 4y agoGraalVM? :-)
- mike_hearn 4y agoWASM isn't really a replacement for JVM bytecode. It's not like you can take a random JAR and convert it to WASM. Last I checked, WASM doesn't even support GCd languages at all, and at any rate the whole insight that makes GraalVM unique and a big deal is that universal bytecodes are a poor choice for making fast polyglot VMs. The JVM world was doing that long before WASM was even a twinkle in Google's eye, with invokedynamic and other initiatives, and it kinda works. JRuby+indy is a lot faster than MRI. But, there's a lot of compromises involved. Truffle is interesting because it says, no, we should not be trying to compile everything to a universal bytecode. Instead, we should JIT compile the source code directly, using the JVM as a runtime library but bypassing the bytecode layer. The language semantics can be expressed much more clearly, without needing to contort things to make them look like Java, whilst still benefiting from the JVM's core feature set. So really I'd ask it the other way around. If it weren't for the politics of the browser world and the monolithic "Chrome is the OS" approach, would WASM be competitive? Because the Graal team already proved you can run lots of different languages at relatively insane speeds using partial evaluation and bypassing bytecode. The WASM world has proven it can run C++ and Rust at slower speeds than normal, which isn't particularly unexpected. If Chrome and Safari shipped GraalVM accessible via <script> tags, how many people would care about WASM? Remember that you can run WASM and LLVM bitcode on top of GraalVM too, it's not just about textual languages. Arguably, if you wanted to give the web an instant free upgrade that'd make many developers rejoice, integrating Graal into Chrome would be an overnight way to do it. Python, Ruby, JVM bytecode and any other language you want at V8 like speeds, in a script tag? It's technically possible, it's just not politically possible.
- thesuperbigfrog 4y ago>> It's not like you can take a random JAR and convert it to WASM. Maybe you can: "TeaVM is an ahead-of-time compiler for Java bytecode that emits JavaScript and WebAssembly that runs in a browser. Its close relative is the well-known GWT. The main difference is that TeaVM does not require source code, only compiled class files. Moreover, the source code is not required to be Java, so TeaVM successfully compiles Kotlin and Scala." https://teavm.org/ https://teavm.org/ I have never had an opportunity to try out TeaVM, but it seems promising.
- jjtheblunt 4y agoWhat dependencies does WASM necessitate? A Javascript VM, for instance, or is that only for DOM connectivity reasons?
- nvrspyx 4y agoI know absolutely nothing about Oracle, GraalVM, OpenJDK, or Java development in general. I haven't used Java since a CS intro class during my undergrad like 10 years ago. Despite this, I've internally adopted the general consensus that Oracle is a terrible, greedy company. Can someone play devil's advocate to explain how this news may actually favor this negative view of Oracle? The sentiment in this thread is praising Oracle's decision here, so I'm just curious if there's an alternative viewpoint that's skeptical or wary of this decision and Oracle's motivation to make it. With that said, I'm not looking for reason to diminish the positives. I'm just curious. Good moves that benefit the community should absolutely be acknowledged and encouraged. EDIT: It looks like another person commented how this may not be benevolent in the context of WebAssembly while I was slowly typing this comment up on mobile. I'd still be interested in this discussion though.
- hotpotamus 4y agoThere's an epic rant on youtube from one of the old Sun guys that gets linked occasionally. I can't remember all of it, but basically it goes that Larry Ellison/Oracle is just as simple as a lawnmower - if you stick your hand in it; it'll shred it without emotion because it's just an unthinking machine that cuts whatever you put into in the same way that Oracle is a machine to make money. I've been at this long enough to have had my own experiences and they are indeed as bad as everyone has warned me, but it does feel like something you have to experience yourself (or at least through a trusted party like in my case) to totally believe.
- edp 4y agoI think you're talking about Bryan Cantrill : https://www.youtube.com/watch?v=-zRN7XLCRhc&t=33m https://www.youtube.com/watch?v=-zRN7XLCRhc&t=33m
- ethbr0 4y agoIt seems irrational for anyone to feel unexpectedly angry at a lawnmower for shredding their hand though -- you should have known it was a lawnmower, that's not a recent change, and it never claimed to be anything but a lawnmower. You should just be the normal level of angry that lawnmowers are dangerous. The parent apologist was extremely precise in how they described Oracle. Oracle isn't in the "Be warm and fuzzy to developers" business: they're in the "Provide mission critical software to large enterprises" business. Logic for servicing the latter well makes things look screwy or sinister to people used to the former. Which isn't to say the Oracle salespeople aren't scummy. But most salespeople are scummy. That's what happens when you incentivize closing sales, which is how almost all sales orgs are set up. So audit model + scummy salespeople = bad experiences. But to parent's point: what's a better model for their customer persona?
- l2dy 4y ago> Oracle does not currently intend to contribute the polyglot technologies supporting other languages such as Python, Ruby, R, and JavaScript. Beware that this polyglot feature you've mentioned is not moving to OpenJDK.
- norswap 4y agoIt's fully open source still (as it has always been), it just won't be part of OpenJDK.
- emptysongglass 4y agoMaybe a newb question but may I ask for an explanation why someone would want Python to run on the JVM and how they'd get started? Is it adaptable to a Poetry-led workflow?
- chrisseaton 4y ago> why someone would want Python to run on the JVM * to run faster * to get a better JIT compiler, better GC, sandboxing, etc * to run using code from other JVM languages in the same process * to get the JVM's monitoring tools * to embed into a Java application
- jeroenhd 4y agoHere are some nice examples: https://www.graalvm.org/22.2/reference-manual/python/Interoperability/ https://www.graalvm.org/22.2/reference-manual/python/Interop... This may be more readable: https://github.com/oracle/graalpython/blob/master/docs/user/Interoperability.md https://github.com/oracle/graalpython/blob/master/docs/user/...