Live data from Hacker News

Oracle Contributing GraalVM Community Edition Java Code to OpenJDK

graalvm.org

111–120 of 141 posts

Re: Oracle Contributing GraalVM Community Edition Java Code to OpenJDK

#111
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

Parts of it are written in Java. Over time, more of the JVM has been rewritten in Java. For example recently parts of the reflection subsystem were rewritten in Java. Of course many libraries have been ported over time too. By the way, the .NET CLR is AFAIK written in C++, like with Hotspot. It's not fully self-hosting. It's a tricky process because HotSpot is highly performance sensitive code. People won't accept re…

In each CLR release there are little pieces that transition from C++ to C#, as C# currently is getting quite a few low level features for systems programing.

Re: Oracle Contributing GraalVM Community Edition Java Code to OpenJDK

#112
post #57
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

The core CLR is written in C++ just like HotSpot.

Mostly, since the .NET Core got introduced, the C++ surface area gets reduced with each release, there are occasionally references to it when a new release comes out on MSDN blogs.

Re: Oracle Contributing GraalVM Community Edition Java Code to OpenJDK

#113
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?

The same way the c++ compilers, runtimes and standard libraries are implemented in c++.

Re: Oracle Contributing GraalVM Community Edition Java Code to OpenJDK

#114
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.

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

What dependencies does WASM necessitate? A Javascript VM, for instance, or is that only for DOM connectivity reasons?

Re: Oracle Contributing GraalVM Community Edition Java Code to OpenJDK

#115
post #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.

I agree, I was just pointing that this is not a "donation" because Larry is Santa Claus but just a business move.

Which I have no problem with.

Re: Oracle Contributing GraalVM Community Edition Java Code to OpenJDK

#116
post #108

Earlier quoted context omitted.

There'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 enoug…

It 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 t…

Well, I had a colleague who worked with them directly. He was a product manager who formerly managed incident response, and this was at a company that at one time had incidents that affected significant chunks of the Internet (no longer - that mantle has passed to AWS). It's been a couple years now, so the details are a bit fuzzy, but I remember him saying that dealing with Oracle was about the worst experience he had on the job. Their representatives were outright rude and condescending, and seemingly difficult to no purpose. So that's my (2nd hand) experience with them.

I'm a bit young to have ever known much about Sun, but I get the impression that they were very respected for their products and commitment to open source, and Oracle's purchase seems to have really rankled the community. Interestingly, the only Oracle products I use are all from the Sun era - MySQL, Java, Virtualbox, and ZFS.

Re: Oracle Contributing GraalVM Community Edition Java Code to OpenJDK

#117
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.

Just imagine a Python interpreter written in Python. Then the interpreter could interpret its own code while interpreting its own code.

Re: Oracle Contributing GraalVM Community Edition Java Code to OpenJDK

#118
post #93

Earlier quoted context omitted.

Hi! I was under the impression that Graal reused OpenJDK’s GC implementations - or was it only in the Graal as JIT compiler mode? Also, may I ask how do you know so much about the topic? I would really like to one day work on OpenJDK/Graal, but I just don’t see the road ahead me.. — I’ve just started my master in CS, but I don’t feel it closing the gap at all. Surely I can read up more and more on the topic in small…

When used on HotSpot it does. Native images/SubstrateVM have their own GC written. Native Image EE can also use the G1 GC so then your native image is a mix of C++ and Java. The Graal compiler can be used in both modes. How did I learn about it - mostly by reading their papers, watching their videos and asking lots of inane questions on their Slack. Also, I happen to live around the corner from where the Graal team w…

Thank you very much for the informative answer!

Re: Oracle Contributing GraalVM Community Edition Java Code to OpenJDK

#119
post #46

GraalVM is truly great stuff. GraalVM native compilation helps Java in the data center to avoid being a cost sink and to reduce start-up latency. Oracle needs Java to sell enterprise software. Oracle contributing to OpenJDK may be required for Amazon cooperation (since Amazon is pushing its own JDK build) and probably helps the library ecosystem work towards native compatibility. Native support for reflection (used i…

Does graal native perform better than a non-native running with JIT compilation?

Re: Oracle Contributing GraalVM Community Edition Java Code to OpenJDK

#120
post #53

Earlier quoted context omitted.

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

WASM is not really a replacement for Graal. Graal is more of a language implementation framework, while WASM is a compilation target.

I think down in the comments people mentioned, that the language part of Graal is not actually included in the contribution.
Post reply on HN