Re:Nodyn – Node.js for the JVM
by chrisfarms on Wednesday February 26, 2014 @07:31PM
(#7309382)
Take it this is Rhino under the hood somewhere, or has someone written a new js engine?
[ Parent
| on HN ]
http://dynjs.org/ is, AFAIK, independent of Rhino.
Thanks for that pointer, didn't know of this.
Also for anyone interested in an easy way to use the JVM for other languages, check out crudzilla.com . It is primarily for web development but has basic editor for other development work.
yup, it's independent, you can get more context on why I created dynjs here: http://blog.qmx.me/the-release/
Is there any plan to implement asm.js and JIT to JVM bytecode directly from JS?
Re:Nodyn – Node.js for the JVM
by lucian1900 on Thursday February 27, 2014 @03:09AM
(#7310974)
After a cursory look through the source, it would appear that it already JITs to JVM bytecode.
asm.js isn't relevant here at all.
Re:Nodyn – Node.js for the JVM
by chrisseaton on Thursday February 27, 2014 @03:29AM
(#7311036)
Isn't the idea of asm.js that if a program is written according to the spec you can generate simpler and so hopefully faster code? That applies whether you're generating bytecode or machine code.
Re:Nodyn – Node.js for the JVM
by lucian1900 on Thursday February 27, 2014 @04:29AM
(#7311239)
Sure, but you'd have to generate asm.js in the first place. It's compiler target that also happens to map to a small subset of JavaScript, you're unlikely to find writing asm.js by hand useful.
DynJS could also support asm.js in addition to JavaScript, but that has almost nothing to do with JIT-ing JavaScript applications.
Right. I wasn't thinking of this as the _only_ JIT case, but one that could generate faster code by not having to do complex type tracing or inference. Seems like low hanging fruit to detect asm.js and read it directly into a typed AST.
Re:Nodyn – Node.js for the JVM
by lucian1900 on Thursday February 27, 2014 @04:04PM
(#7315048)
Probably, yes.
Although with invokedynamic, the JVM's object system ends up being remarkably close to that of a dynamic language. This is best seen in JRuby.
Re:Nodyn – Node.js for the JVM
by chrisfarms on Wednesday February 26, 2014 @08:14PM
(#7309602)
Thanks. I'd totally missed that.