Live data from Hacker News

Standalone Nashorn 15.0 is out

mail.openjdk.java.net

11–20 of 35 posts

Re: Standalone Nashorn 15.0 is out

#12
post #3

Earlier quoted context omitted.

To add to that. It was previously included directly in the JDK but is now a standalone product.

Why do they keep doing that, it makes dependecy management etc, more complicated. Sometime ago they did that with JavaFx, while still retaining AWT as part of JDK: what a baffling move, discard the best GUI framework on the platform, while including the most obsolete one.

The team at Oracle can't be responsible for maintaining such a large set of complex and sometimes niche dependencies - it just isn't realistic or reasonable.

Re: Standalone Nashorn 15.0 is out

#13
Hasn't Nashorn been superseded by GraalJS?

Is this just for those who are stuck with Nashorn, or will there be new development?

GraalJS is ECMASCript 2020 compatible and is said to rival V8 on performance, so I would've thought it the obvious choice for new projects going forward.

https://github.com/graalvm/graaljs

Edit: found more info about this release in the initial announcement:

https://mail.openjdk.java.net/pipermail/nashorn-dev/2020-Oct...

Re: Standalone Nashorn 15.0 is out

#15
post #2

For anyone else wondering what Nashorn is: It is Javascript running in the JVM https://en.wikipedia.org/wiki/Nashorn_(JavaScript_engine)

any good reason to use this over v8/Node?

You are using java but want access to Javascript for various reasons. (Maybe you want to add scripting? Maybe you want to use a JS lib? Really sort of depends on the circumstance).

Using node/v8 requires another distributable and starting up a new process.

Re: Standalone Nashorn 15.0 is out

#17

Hasn't Nashorn been superseded by GraalJS? Is this just for those who are stuck with Nashorn, or will there be new development? GraalJS is ECMASCript 2020 compatible and is said to rival V8 on performance, so I would've thought it the obvious choice for new projects going forward. https://github.com/graalvm/graaljs Edit: found more info about this release in the initial announcement: https://mail.openjdk.java.net/pip…

For the most part yes. The only reason to use this is either you care about the smaller runtime or you have some dependency that can't function without nashorn.

Re: Standalone Nashorn 15.0 is out

#18
post #2

For anyone else wondering what Nashorn is: It is Javascript running in the JVM https://en.wikipedia.org/wiki/Nashorn_(JavaScript_engine)

I used it back in the day to provide server side rendering for a Clojure/ClojureScript/Reagent web app.

I remember it being a bit of a pig, both in memory consumption and CPU use, but I'm sure that was just relative to the black magic behind V8.

Re: Standalone Nashorn 15.0 is out

#19

Earlier quoted context omitted.

any good reason to use this over v8/Node?

You are using java but want access to Javascript for various reasons. (Maybe you want to add scripting? Maybe you want to use a JS lib? Really sort of depends on the circumstance). Using node/v8 requires another distributable and starting up a new process.

> (Maybe you want to add scripting? Maybe you want to use a JS lib? Really sort of depends on the circumstance)

I used it to add Markdown to a Java app, because JS-based Markdown libraries were better than Java-based ones.

Re: Standalone Nashorn 15.0 is out

#20

Hasn't Nashorn been superseded by GraalJS? Is this just for those who are stuck with Nashorn, or will there be new development? GraalJS is ECMASCript 2020 compatible and is said to rival V8 on performance, so I would've thought it the obvious choice for new projects going forward. https://github.com/graalvm/graaljs Edit: found more info about this release in the initial announcement: https://mail.openjdk.java.net/pip…

Isn't GraalJS restricted in usage though? Like it can only be used as part of Oracle GraalVM, not any other JVM distribution?
Post reply on HN