Announcing GlowScript 1.1
GlowScript programs can now be written in RapydScript, a Python look-alike, as well as in JavaScript or CoffeeScript. You can see examples of RapydScript programs among the Example programs available at
glowscript.org.
There are various projects aimed at making it possible to use Python in a browser by compiling Python to JavaScript, the language that is built into browsers. However, attempts to represent Python exactly generate very inefficient JavaScript that runs too slowly for many purposes. For typical GlowScript programs there is no difference between Python and RapydScript; the differences are often rather arcane. For example, in Python division by zero gives an error, whereas in RapydScript division by zero generates NaN ("not a number"). Full details are found at
There are however differences between VPython and GlowScript even when using RapydScript. For example, objects do not have length, height, or width attributes; these must be specified by the size attribute. At the bottom of the first page of the GlowScript Help is a link to a comparison of VPython and GlowScript. It is intended to provide a Python program to convert to the extent possible a VPython program to GlowScript.
Much help in integrating RapydScript into GlowScript was provided by Alexander Tsepkov, Charles Law, and Salvatore di Dio.
GlowScript 1.1 also benefits from work by Adam Thompson to be able to put jquery and jquery-ui under version control, and to make it possible to place the print area to the right of the canvas.
At the moment the Share option to export the final generated JavaScript code to your own web site is not working; to be fixed.