YaroslavGaponov / node-jvm

java virtual machine in pure node.js
2.11k stars 176 forks source link

Can I ask you "why"? #3

Closed detro closed 10 years ago

detro commented 10 years ago

Hi,

let me say I think your project is awesome! You are top-notch!!!

But I'm very curious: what's the idea behind this? Also, have you done any timing comparison with the Standard Oracle/Sun JVM?

Keep it up Ivan

alexgorbatchev commented 10 years ago

because why not! :) this is awesome!

would love to have a bit more detail in the readme in terms of what's supported or not, is it full implementation or just an experiment?

:+1: :+1: :+1:

detro commented 10 years ago

Of course, but there is always a "background" why a developer decided to do a project. Given how challenging this can be, there must be a very interesting story behind this!!!

alexgorbatchev commented 10 years ago

Agreed! Would love to see a talk on this :)

YaroslavGaponov commented 10 years ago

I am preparing to Java SE 7 Programmer I exam. ;) Just I want to know more about java and jvm. So this project is primary my research.

Now I need to find the strength to return to the main work ;)

detro commented 10 years ago

WOW! And to study for this exam you write a JVM runtime? RESPECT!

Keep it up.

How much of the Java library you plan to support? Or are you thinking to import the Java library as compiled classes?

vendethiel commented 10 years ago

OH MY. This is so CRAZY. That's like being a mad scientist. But in a good sense. Really impressive !

YaroslavGaponov commented 10 years ago

I have not yet decided on the architecture. I think the core code is not clear enough. I do not have tests.

bpossolo commented 10 years ago

Stop being so difficult Ivan. The real question is: Why not do it in CoffeeScript?

detro commented 10 years ago

Oh, God no! On 31 Oct 2013 06:52, "Benjamin Possolo" notifications@github.com wrote:

Stop being so difficult Ivan. The real question is: Why not do it in CoffeeScript?

— Reply to this email directly or view it on GitHubhttps://github.com/YaroslavGaponov/node-jvm/issues/3#issuecomment-27465559 .

alexbeletsky commented 10 years ago

great job, Yaroslav - you rock :)

bhagyas commented 10 years ago

Great job! =)

garrettwilkin commented 10 years ago

Maybe I'm just thick, but I don't get it. You can run java classes from node. Can you get data out of those classes into javascript land? Didn't see any examples of that. I looked at fibonacci, threads, and one other i can't remember. The js files just run the class.

Can you include an example of some more detailed interaction with the class?

YaroslavGaponov commented 10 years ago

Yes, I do.

As example this some basic java classes in node https://github.com/YaroslavGaponov/node-jvm/tree/master/libs/java

So you can develop own java.lang.Object or java.lang.Thread in node.

detro commented 10 years ago

Just seen your code: JS implemented Object or Thread, exported into the VM. You just blew my mind dude!!! :)

banksean commented 10 years ago

But can it run Rhino???

detro commented 10 years ago

that would be Inception ;)

On 31 October 2013 16:04, Sean McCullough notifications@github.com wrote:

But can it run Rhino???

— Reply to this email directly or view it on GitHubhttps://github.com/YaroslavGaponov/node-jvm/issues/3#issuecomment-27499027 .

Ivan De Marino Coder, Technologist, Cook, Italian

blog.ivandemarino.me | www.linkedin.com/in/ivandemarino | twitter.com/detronizator

YaroslavGaponov commented 10 years ago

About interaction between js and java - I added example https://github.com/YaroslavGaponov/node-jvm/tree/master/examples/jsclass

I will continue working on this ;)

alexbeletsky commented 10 years ago

I've looked throught the code, for Object and Thread implementations and still wondering how that stuff works. For instance, how you actually run thread inside Node.js runtime.

Would you mind to create a wiki page with some explanations?

ps. It could be cool to try same idea for .NET VM.

parroit commented 10 years ago

Looking in frame.js, I think that multithreading is simulated using setImmediate, every opcode is pumped on event loop. Bet maybe I'm wrong...

YaroslavGaponov commented 10 years ago

Yes, right.

Before I tried to use child_process.fork...

parroit commented 10 years ago

Really slow I guess. Anyway, you're doing a really amazing thing! Do you plan to keep work on the project?

YaroslavGaponov commented 10 years ago

I changed a lot of things in the project and I believe I can go back to child_process.fork.

Now I plan to finish core JVM without support full JDK

galves commented 10 years ago

I just want to say well done as this is truly specacular work. It makes the core concepts of a JVM understandable even to mere mortals!