Friday, March 08, 2013

Analog Display in HTML5

HTML5 has some amazing rendering capabilities.
I tried to mimic the rendering of those analog displays I did a while back in Java (see here), and here is what I came up with:
Of course, you need a browser that supports HTML5.
JavaScript relies on different paradigms than Java, but that works fine. Google's Chrome has some very cool features for web developers.
Here are the sources of the frame above: Right-click on the links, and use the "Save As" capability of your browser...
See here a version of Hello World, re-visited...
Enjoy!

Monday, March 04, 2013

Virtual Machines

The Java Virtual Machine (JVM) was certainly not the first virtual machine (ADA, at least, was there before...), but it is a pretty popular one.
Several - if not many - languages can now be compiled into JVM byte code, and as such, they run for free wherever a JVM exists. Among them, Scala, Groovy, Clojure,... the list is long. In short, all they need to provide is a compiler, the runtime is provided by the JVM implementation.

On another thread, there is a language that becomes more and more popular, it's JavaScript, along with JavaScript Object Notation (json), and avro, that looks a bit for json like what XML Schema looks like for XML.

The interesting parallel between the JVM and JavaScript is that JavaScript runs inside a Web browser. From this point of view, the browser could be considered like a Virtual Machine as well... The implementation of the JavaScript engine is done by the browser vendor. And as a result, JavaScript does not care about what system it's running on; just (maybe) in which browser it's running in.

More to come about that..., stay tuned!