Python in the Browser: RapydScript
Today I’m looking at RapydScript.
What is it, exactly
From the website:
RapydScript … is a pre-compiler for JavaScript, similar to CoffeeScript, but with cleaner, more readable syntax. The syntax is very similar to Python, but allows JavaScript as well. This project was written as an alternative to Pyjamas for those wishing Python-like JavaScript without the extra overhead and complexity Pyjamas introduces.
RapydScript claims to not have the performance hit of other Python-to-javascript frameworks.
Licence
RapydScript is licenced under the BSD licence.
Installation
Being a compiled language, RapydScript must be installed on your machine. RapydScript depends on node.js, and is installed using its package manager. As it’s unavailable for my distro, I didn’t install, but it looks easy.
Online examples
The online examples are really quite impressive, except that a paint seems to be not complete. They run fast on the desktop. On the phone it was a different story. Lack of a keyboard was one issue. I couldn’t close the popup window in Paint (my touch never landed on the close button), Cybord and RapydGlow did nothing, and the animations in D3 were so slow that they never occurred.
Learning Curve
I didn’t actually try doing this because I didn’t want to install (see above).
RapydScript programs look very much like Python ones. You still have to integrate it into HTML (in order to provide user controls and outputs such as a canvas), but RapydScript has a friend called RapydML to assist here.
Coverage of the Python standard library
RapydScript doesn’t attempt to implement the standard library. In fact, RapydScript doesn’t even pretend to by Python – it’s just a Python-like language for writing javascript. The expectation is that you’ll use the many existing javascript libraries when you need functionality.
Programming graphics
The examples prove that RapydScript is capable of doing graphics. Also, because RapydScript integrates with javascript, any existing javascript graphics libraries are available to it.
Conclusion
RapydScript fills a need, but it’s really not my need. Its strenth is putting an attractive, object-oriented face on top of javascript. What I’m looking for is something that allows me to develop native and browser apps from the same source, and RapydScript is not the right tool.
Posted Thursday, February 26, 2015