Live data from Hacker News

Oracle Contributing GraalVM Community Edition Java Code to OpenJDK

graalvm.org

81–90 of 141 posts

Re: Oracle Contributing GraalVM Community Edition Java Code to OpenJDK

#81

Earlier quoted context omitted.

>> 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 Kotl…

I've used TeaVM in a past project, to compile some Java to JS. It's very cool tech. Unfortunately I heard that the team ripped out the TeaVM after I left. That's understandable - I had to fix some bugs and missing pieces in TeaVM as part of that project, and I think a lot of codebases would face the same issue, but compiler hacking isn't everyone's, um, cup of tea. It was a great way to get a lot done in the two week…

>> There are programs that do that sort of thing, I think Leaning Technologies makes one.

It looks like you mean CheerpJ: https://leaningtech.com/cheerpj/ https://github.com/leaningtech/cheerpj-meta

>> That wouldn't be of use in any existing Java project though. The only reason you'd ever want to do that is because browsers offer nothing else, even though they could and at that point why not compile to JS, at least that way your GC isn't being interpreted too. If you're not constrained by the WHATWG's decisions though it doesn't offer anything.

It is very use case and "what is the future of your Java application" dependent. Some organizations are looking into migrating off of Java due to a variety of reasons. These kind of "Java conversion" tools help to keep legacy Java applications running until the legacy Java applications can be replaced.

Re: Oracle Contributing GraalVM Community Edition Java Code to OpenJDK

#82
post #32
post #2

Maybe we will soon see the Java Virtual Machine implemented wholly in (a subset of) Java...

This is what it is. GraalVM is implemented in Java, there is a Truffle framework that compiles Java, Ruby, JS, Python to Java Truffle, which then runs on GraalVM JIT compiler.

Wait, GraalVM is implemented in Java?

Does that mean to run it you need another JVM to run it on top of? That sounds stupid... Maybe you need another VM just to run it on once, so it can translate itself to native code on the target?

Re: Oracle Contributing GraalVM Community Edition Java Code to OpenJDK

#83
I refuse to praise Oracle for anything. But I could make an exception if they put Isolates in the CE version of Graal and not only the Enterprise one. :)

Also, obviously Oracle didn't do this out of the kindness of their hearts, if they didn't contribute Graal into the OpenJDK the would risk to Graal never become anything other than a niche VM because most people, specially big clients don't want to change VMs and the CE version will be their new gateway drug to their Enterprise version of Graal.

Re: Oracle Contributing GraalVM Community Edition Java Code to OpenJDK

#84
post #32

Earlier quoted context omitted.

This is what it is. GraalVM is implemented in Java, there is a Truffle framework that compiles Java, Ruby, JS, Python to Java Truffle, which then runs on GraalVM JIT compiler.

Wait, GraalVM is implemented in Java ? Does that mean to run it you need another JVM to run it on top of? That sounds stupid... Maybe you need another VM just to run it on once, so it can translate itself to native code on the target?

> Does that mean to run it you need another JVM to run it on top of?

GraalVM is the regular HotspotVM integrated with the GraalVM compiler (which is normally AOT compiled as a native library, but can be run as a JAR); it also supports tooling with the ability to compile code targeting the JVM to a native executable, as well as leveraging AOT compilation itself.

https://www.graalvm.org/22.3/reference-manual/native-image/

Re: Oracle Contributing GraalVM Community Edition Java Code to OpenJDK

#85
post #47
post #18

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.

I 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 prais…

Is there any “good companies”? I’m fairly sure they all become paperclip optimizers after a certain size and any seemingly good behavior is simply the better option from a profit-maximizing point of view.

Do you honestly think that all those libraries care about Pride or Black Lives Matters? Nope, they just had some calculations and as user-facing companies, marketing has a huge role on their profits. A logistic company won’t have done any such thing as they are likely not even known by the general public.

Oracle is not really an end-user facing company like Facebook or Google is, so they simply don’t care all that much about that (hence the lawnmower analogy). But.. that’s a good thing as well — you can use the lawnmower for its job, you’ll never be surprised. Graal and OpenJDK and other tech at the bottom of the tech stack are long term investments. Looking at the linux kernel, it is not developed primarily by some hacker in a basement, but by employees paid by Intel, Red Hat, Google, pretty much everyone.

Re: Oracle Contributing GraalVM Community Edition Java Code to OpenJDK

#86

I refuse to praise Oracle for anything. But I could make an exception if they put Isolates in the CE version of Graal and not only the Enterprise one. :) Also, obviously Oracle didn't do this out of the kindness of their hearts, if they didn't contribute Graal into the OpenJDK the would risk to Graal never become anything other than a niche VM because most people, specially big clients don't want to change VMs and th…

Linux, Chromium and V8, Java, .NET, and Go, and most other large open source projects these days are developed by for-profit corporations, none of them do it out of kindness. Frankly, if corporations were to bestow gifts worth hundreds of millions of dollars on society, I'd rather those gifts not be free software that is largely enjoyed by other for-profit corporations.

Re: Oracle Contributing GraalVM Community Edition Java Code to OpenJDK

#87
post #5
post #3

Earlier quoted context omitted.

It's a good point, after so long why the JVM is not written in Java actually? For example the Go runtime and I think C# as well are written in their respective language. https://github.com/golang/go/tree/master/src/runtime https://github.com/dotnet/runtime

Maybe it's my ignorance of the Java ecosystem or a lack of imagination but how could a language that requires a heavy runtime be written in itself? Wouldn't you need a runtime for the runtime, and then a runtime for the runtime for the runtime and then...? I can't quite imagine how you'd bootstrap something like that.

Some people at IBM did it in the '90s and wrote a paper about it:

https://dl.acm.org/doi/10.1145/320385.320418

Re: Oracle Contributing GraalVM Community Edition Java Code to OpenJDK

#88
post #32

Earlier quoted context omitted.

This is what it is. GraalVM is implemented in Java, there is a Truffle framework that compiles Java, Ruby, JS, Python to Java Truffle, which then runs on GraalVM JIT compiler.

Wait, GraalVM is implemented in Java ? Does that mean to run it you need another JVM to run it on top of? That sounds stupid... Maybe you need another VM just to run it on once, so it can translate itself to native code on the target?

https://news.ycombinator.com/item?id=33341760

Graal reuses all the insanely good GC implementations, observability tools etc already present in OpenJDK (as throwing all that away would be stupid).

Re: Oracle Contributing GraalVM Community Edition Java Code to OpenJDK

#89
post #47

Earlier quoted context omitted.

I 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 prais…

There isn't any way to spin it negatively. The generalized dislike of Oracle you have seen really comes from a couple of different aspects, neither of which are relevant to this specific announcement: 1. License audits suck. 2. The Google lawsuit (about matters resolved long ago and which don't apply to anyone except Google, really). A lot of ill will comes from people whose companies have been audited. The process i…

I feel like this is a bit too generous to Oracle. The DRM-free thing is indeed a feature, but they know full well that it will encourage more and more unlicensed usage which they can then "extort" additional fees out of a company once it's in place and critical, which they would probably never have gotten if beforehand a trade-off check would've been done for operational expenses or the right gates would've been needed to have gotten over.

Re: Oracle Contributing GraalVM Community Edition Java Code to OpenJDK

#90
post #18

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.

Maybe 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?
Post reply on HN