Live data from Hacker News

The Modern Java Platform – 2021 Edition

jamesward.com

11–20 of 259 posts

Re: The Modern Java Platform – 2021 Edition

#11

GraalVM truly has the potential to become the universal, interoperable VM. It would be rational for e.g Julia folks to migrate to the graalVM ecosystem and cotntribute to it instead of living on their small code island. They would get an un inimaginable amount of benefits in the process.

How does a VM (JVM, GraalVM) compare to something like LLVM's IR? From your description as a ``universal, _interoperable_ VM`` it seems like they have some similar goals --- what are the reasons to write a compiler to a VM instead of with LLVM/IR?

Good question: GraalVM support taking LLVM IR as an input https://github.com/oracle/graal/tree/master/sulong Which means that graalVM can support any llvm language almost out of the box (in theory)

Llvm IR however has not been designed with inter language interoperability in mind or at least not enough. E.g rust has no transparant, complete, seamless and efficient interop with swift, go, c++, etc

But in theory llvm is just an AOT and both AOT and JIT can enable true interoperability which is why graalvm support both a jit mode and an AOT mode. However JITs enable better performance at least for any high level, GCed language than would an AOT.

Moreover, GraalVM through the truffle framework enable unprecedented language designer productivity. Through high level constructs the designers can be much more productive than in standard VM/AOT, which explains how with a few engineers Oracle has managed to reimplement Java, ruby, python, js and R in parallel in only a few years...

Re: The Modern Java Platform – 2021 Edition

#12

GraalVM truly has the potential to become the universal, interoperable VM. It would be rational for e.g Julia folks to migrate to the graalVM ecosystem and cotntribute to it instead of living on their small code island. They would get an un inimaginable amount of benefits in the process.

It is interesting Java was supposed to be write once run anywhere already some 20 years ago.

Re: The Modern Java Platform – 2021 Edition

#13
post #7

My biggest gripe with java is developer productivity. It has gotten better but is still far behind interpreted languages like Python and Ruby. Class hot loading and things like that have made it better, but if you change a method signature or interface you have to stop your process, recompile, redeploy, and restart. For big codebases it’s brutal compared to the aforementioned languages and their attendant frameworks.

In big codebases, people don't change Interface (that's a contract btw) that often. They would do the proper "migration" by offering path to the new contract/api. If you have huge codebase in Python or Ruby, you'll rip your hair more often because it's riskier to make changes (dynamic language) according to your use-case :).

Sure, according to some OO professor. In real life these things change all the time. And it’s not just methods and interfaces that force a recompile, those are just examples.

As for dynamic language projects, they should include a test suite to mitigate such issues, but often do not.

Re: The Modern Java Platform – 2021 Edition

#14

GraalVM truly has the potential to become the universal, interoperable VM. It would be rational for e.g Julia folks to migrate to the graalVM ecosystem and cotntribute to it instead of living on their small code island. They would get an un inimaginable amount of benefits in the process.

It is interesting Java was supposed to be write once run anywhere already some 20 years ago.

You do realize the paradigm shift that enable language polyglotism? It is nothing like WORA

Re: The Modern Java Platform – 2021 Edition

#15
post #7

My biggest gripe with java is developer productivity. It has gotten better but is still far behind interpreted languages like Python and Ruby. Class hot loading and things like that have made it better, but if you change a method signature or interface you have to stop your process, recompile, redeploy, and restart. For big codebases it’s brutal compared to the aforementioned languages and their attendant frameworks.

If you change an interface in Python you need to manually verify that everything is correctly using that new interface. That’s much more of a devprod hit.

Re: The Modern Java Platform – 2021 Edition

#16
post #6

GraalVM truly has the potential to become the universal, interoperable VM. It would be rational for e.g Julia folks to migrate to the graalVM ecosystem and cotntribute to it instead of living on their small code island. They would get an un inimaginable amount of benefits in the process.

I'll believe it when I see the performance.

He were are, mostly one developper in only a few years has managed to create ~the fastest R runtime thanks to the graalVM infrastructure https://github.com/oracle/fastr + it get polyglotism for free.

See also graalphp: https://github.com/abertschi/graalphp/blob/master/results.md

Oracle has managed to create a language framework that enable unprecedented performance and polyglotism but there are no human resources allocated to actually tuning the implementations. Without such framework imagining one developer to implement a language and expect it to outperform the reference vm made by an army of people through decades wouldn't be a realistic expectation but now anythings possible. Though it would be nice if others companies than Oracle understood the extent of this technological leap. Actually there is only one: shopify which invest in truffleruby

https://pragtob.wordpress.com/2020/08/24/the-great-rubykon-b...

Re: The Modern Java Platform – 2021 Edition

#17
post #7

My biggest gripe with java is developer productivity. It has gotten better but is still far behind interpreted languages like Python and Ruby. Class hot loading and things like that have made it better, but if you change a method signature or interface you have to stop your process, recompile, redeploy, and restart. For big codebases it’s brutal compared to the aforementioned languages and their attendant frameworks.

Well..there are always commercial tools like JRebel (https://www.jrebel.com/products/jrebel) that one can leverage for live reload

Re: The Modern Java Platform – 2021 Edition

#19
post #7

My biggest gripe with java is developer productivity. It has gotten better but is still far behind interpreted languages like Python and Ruby. Class hot loading and things like that have made it better, but if you change a method signature or interface you have to stop your process, recompile, redeploy, and restart. For big codebases it’s brutal compared to the aforementioned languages and their attendant frameworks.

That's interesting.

I'm not the biggest Java fan, I can tolerate it. Recently working on a Python project I find I'm massively unproductive compared to something like Java or more specifically Scala as using Spark.

Not having strong types and limited type hinting. I have no idea what things are, is it a int, string, object etc, clicking through in an IDE to see code/docs isn't as great as it's hard for an IDE to inspect the code compared to strongly typed language.

Not having a compiler means I have to have unit tests doing what a compiler would do or finding out I have syntax errors or other errors at runtime. This massively throws of my development flow as can't lean on the compiler to find trivial errors. Rather than doing compile I have to hope I have a test case with high coverage to instrument the code to get a syntax error or I have to start / deploy it to get the error.

There's a great deal of issues with dependency management. Venv, Docker etc help with this but it's a bunch of extra stuff on top I now need to worry about and sometimes still hit errors.

The only time I find I'm relatively productive in Python is writing a short 100-200 line script to do one off tasks / sysadmin / devops type scripts.

The fact if I change an interface, rename a method I need to recompile I find a huge advantage as everything breaks and I worth through the errors one by one and once complete and no more errors I have confidence the refactor is complete and the compiler has verified it.

Re: The Modern Java Platform – 2021 Edition

#20

The one thing missing is the innovation happening on the Java front end. Frameworks like TeaVM ( https://blogs.oracle.com/javamagazine/java-in-the-browser-wi... ) let you extend your Java app all the way to the browser.

For more info on full-stack Java, including options for Java based single-page apps and Java-based mobile apps, visit https://frequal.com/FullStackJava/
Post reply on HN