Ruby and Java Running in JavaScript 220
John Resig is reporting on his blog that a recent trip to Tokyo opened up some very interesting JavaScript projects to him that haven't met with widespread popularity outside of Japan yet. "One project, in particular, really caught my eye. It's called Orto and is an implementation of the Java Virtual Machine (JVM) in JavaScript. This means that you can take an existing Java application, compile it to bytecode, run it through Orto (which produces the JavaScript, and embed it in a web page. While it doesn't provide the full capabilities of most Java code it does provide enough to make for some interesting demos." In a separate post he also detailed how the HotRuby project is allowing a Ruby VM to run in a browser using JavaScript or even indirectly using ActionScript in Flash.
Ruby and Java, and also Python (Score:4, Informative)
Re:Doing things the slow way (Score:5, Informative)
The article suggests that the speed was not bad. (The sample Tetris [accelart.jp] clone loaded very quickly for me.) And the article's commenters note that this runs on an iPhone. In other words, Orto could be a route to port Java apps to be iPhone aps.
No Perl? (Score:4, Informative)
Re:Strange (Score:4, Informative)
Re:Doing things the slow way (Score:3, Informative)
Re:Java running under Javascript... (Score:1, Informative)
That, and the fact that you can rewrite the performance-critical portions of python code in C if you need to.
Re:I just need to get this out of my system (Score:2, Informative)
Re:I just need to get this out of my system (Score:2, Informative)
Re:Java running under Javascript... (Score:2, Informative)
Java is slow when done inefficiently, like any other programming language. In Java code that is implemented correctly, speed will be one your lesser worries. In fact, under certain conditions, Java can rival, and even surpass, native code for speed. The implemented correctly is a much bigger one.
Re:Awesome! (Score:4, Informative)
Java is an object-oriented programming language originally released by Sun Microsystems in 1995. JavaScript is a functional scripting language originally derived from Ecmascript. Java requires a Java Virtual Machine to be installed on your computer or some other device like a mobile phone. Javascript runs right in your web browser. Javascript was originally named LiveScript, but through a marketing deal between Netscape and Sun, became named JavaScript, even though the two languages are unrelated, thus dooming those in the know to have to constantly correct people who refer to JavaScript as Java, assuming that "Java" is just like a nickname or something. However, they are both based on syntax that looks a good deal like C.
Re:But... (Score:3, Informative)
Re:Doing things the slow way (Score:5, Informative)
What language can you stand, then?
Re:Doing things the slow way (Score:1, Informative)
DEFINT A
DEFDBL B
b1=8.12
a=b1*100
b2=a/100
PRINT b2
REM answer is 8.1199999999999