Ruby and Java Running in JavaScript
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.
Also worth mentioning that PyPy allows you to run Python as Javascript, inside a browser. Like all of these things, it isn't 100% mature, but pretty cool nonetheless.
The article suggests that the speed was not bad. (The sample Tetris 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.
$nice = $webHosting + $domainNames + $sslCerts
Client side perl would kick ass. Then I could match my front end with the back.
I think that everybody just has memories from the Netscape 4 days, where every line had to be coded differently depending on which browser you were using. Things have matured a lot lately, and you can almost get by without writing any browser specific hacks. However, the history of Javascript has lead many people to dispise it.
Anthropic principle: We see the universe the way it is because if it were different we would not be here to see it.
The game loaded faster than most Java apps do for me, but once it loaded the controls were laggy and the video was pretty choppy. Most of the time for me, the JVM takes a while to load but at least the app runs fairly smoothly once it does. I'd rather have that then a shorter load time on a laggy application.
The primary reason its okay for python to be slow, but not for java, is that python isn't a crippled version of C++ that runs at 1/10 the speed, whereas java is.
That, and the fact that you can rewrite the performance-critical portions of python code in C if you need to.
No, it doesn't.
It does. Only (I believe) in Argentinian Spanish though, not in the rest of the Spanish speaking countries. http://www.elcastellano.org/miyara/dic_arg_esp.html (Site in Spanish)
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.
brandelf -t FreeBSD
: What IS the diff between Java and JavaScript-really?
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.
ZuluPad, the wiki notepad on crack
JDK6u10 solves this. It lets the applet run in a separate process from the browser, and bootstraps the download such that it starts up very quickly. See here for more information.
E pluribus unum
What language can you stand, then?
REM MS QuickBASIC 4.5
;)
DEFINT A
DEFDBL B
b1=8.12
a=b1*100
b2=a/100
PRINT b2
REM answer is 8.1199999999999