Earlier quoted context omitted.
It's like Car and Carpet. But it's also the kind of car that you can build out of carpets.
...or the carpet that you can build out of cars, considering the Ringojs.
Java Virtual Machine in pure Node.js
101–110 of 143 posts
Re: Java Virtual Machine in pure Node.js
#102Interesting! It looks like you've reimplemented portions of the Java Class Library rather than use e.g the existing class files from OpenJDK. My current research project, Doppio [1], implements the native portions of the OpenJDK Java Class Library so it can use an unmodified copy of the OpenJDK JCL. As a result, it can run a bunch of nontrivial programs (javac/javap/Rhino/Kawa-Scheme). One issue you will run into is…
Is this used in actual apps?
It's too slow at the moment for production use, since it is an interpreter. But if we add JIT compilation support, I believe it will be fast enough for usably running legacy code/libraries in the browser.
Re: Java Virtual Machine in pure Node.js
#103Re: Java Virtual Machine in pure Node.js
#104Re: Java Virtual Machine in pure Node.js
#10518ms for calculating Fibonacci numbers from 1 to 10. This is definitily bringing JAVA back to the good old days of enterprise execution speeds. :-) Really cool proof of concept! I would really enjoy seeing more projects like this!
Who doesn't wish it was still 1999? Hot stock market, millenium mania, cheap gas, dot-coms. Really slow Java makes it all come rushing back.
About that time, I needed to decide whether to use Java or Delphi (an ahead-of-time Pascal compiler) for a new project. I was worried about garbage collection overhead. So, I designed a trivial benchmark wherein an array of simple objects was constructed in a loop (as we revisit each slot in the array, we replace the old object with a new one). Java came out ahead. The superiority of GC, along with platform independence, convinced me to go with Java.
Re: Java Virtual Machine in pure Node.js
#106Interesting! It looks like you've reimplemented portions of the Java Class Library rather than use e.g the existing class files from OpenJDK. My current research project, Doppio [1], implements the native portions of the OpenJDK Java Class Library so it can use an unmodified copy of the OpenJDK JCL. As a result, it can run a bunch of nontrivial programs (javac/javap/Rhino/Kawa-Scheme). One issue you will run into is…
Re: Java Virtual Machine in pure Node.js
#107Mozilla has written pdf.js to replace Adobe's PDF plugin and shumway.js to replace Adobe's Flash plugin. When will we see a java.js that replaces Java applets on the web?
Re: Java Virtual Machine in pure Node.js
#108Earlier quoted context omitted.
Why not just use the javascript x86 emulator that somebody posted to boot an OS? Then you can run the Hotspot JVM, v8, ad infinitum. Piece of cake.
Hotspot runs the program faster than V8? no problem. Emulate x86 in v8 run hotspot inside emulator. now you got your performance back.
Only one problem. Where's node.js?
Re: Java Virtual Machine in pure Node.js
#109Really cool hack, and yet I can't help but think that the mile-high software stack between the developer and the CPU continues to grow meaning we're stuck in a perpetual game of filling up spare CPU cycles with nothing in particular. I'm sure I'll see a demo showing off something that barely runs on modern hardware that we were more than capable of running with good performance in 1990. sigh I feel like I'm being suc…
Re: Java Virtual Machine in pure Node.js
#110Really cool hack, and yet I can't help but think that the mile-high software stack between the developer and the CPU continues to grow meaning we're stuck in a perpetual game of filling up spare CPU cycles with nothing in particular. I'm sure I'll see a demo showing off something that barely runs on modern hardware that we were more than capable of running with good performance in 1990. sigh I feel like I'm being suc…
The paradigm is that it's easier (cheaper) to have less performant code that takes less time to build for developers then it is to have maximum performant code... This project at least provides the potential for people like myself who have existing Java projects with longstanding functioning methods that I don't want to rewrite in Node.js... Yes it's another layer, but for some functions that layer can be less compli…
In this case, wouldn't a java-to-js translator be more efficient than rewriting the whole jvm for Node.js?