News for hackers. Stuff that matters.
Re:PurpleJS – A JavaScript application framework running on ... by smcl on Monday October 24, 2016 @04:55AM (#12777437)
I played around with Nashorn/jjs recently - if anyone's curious how roughly things work I did a little write-up here with a couple of examples showing some simple use-cases: http://blog.mclemon.io/discover-a-linux-utility-jjs
Re:PurpleJS – A JavaScript application framework running on ... by Roboprog on Monday October 24, 2016 @12:01PM (#12779991)
I did a presentation on using Nashorn (and jjs) about a year ago at SacJUG (our local Java user group). It's pretty interesting the level at which you can intermix Java and Javascript in Nashorn.

I tinkered with the idea of using a library called Spark on Netty to make web services in JS, but this library (and others mentioned here) actually did the job :-)

https://docs.google.com/presentation/d/19KTud9_3I3MgJiYlVdF9...

https://github.com/roboprog/nashorn_play

Re:PurpleJS – A JavaScript application framework running on ... by Roboprog on Monday October 24, 2016 @12:08PM (#12780079)
I also did a lightning talk demo on Nashorn vs Node performance a few months ago (local JS user group).

For the little string mashing benchmark I put together (originally to compare sequential / fork / thread performance in various languages), Nashorn's (Java 8) JIT eventually catches up and passes Node. Alas, it's one of those "O(n) for large n" problems where n has to be around a million before this happens.

... And Perl still mops the floor up with all of them. (Perl is good at string handling, even if not so much at many other things)

Re:PurpleJS – A JavaScript application framework running on ... by smcl on Monday October 24, 2016 @03:27PM (#12781984)
I actually used Spark via the "Nasven" wrapper for maven to create the simple thumbnail server I wrote about on my post (it's at the end of a lot of boring text): https://github.com/smcl/thumbooo
Re:PurpleJS – A JavaScript application framework running on ... by softawre on Monday October 24, 2016 @09:46AM (#12778683)
We are using J2V8, found Nashorn to be a bit lacking in performance.
Re:PurpleJS – A JavaScript application framework running on ... by jbrat on Wednesday October 26, 2016 @03:26AM (#12794571)
How these tests are run will potentially create large differences. For instance, pure Nashorn will compile each script _every_ time before executing it. PurpleJS only compiles a script once and then caches it for re-use.
Re:PurpleJS – A JavaScript application framework running on ... by smcl on Monday October 24, 2016 @10:39AM (#12779178)
Yep - you're right in that it's not fast. On my post I nabbed a graph from someone who did some performance measurements and the difference is pretty stark.