Subscribe / Unsubscribe Enewsletters | Login | Register

Pencil Banner

17 JavaScript tools breathing new life into old code

Peter Wayner | May 5, 2015
Computer languages have a strange shelf life. The most popular among them experience explosive growth driven by herding behavior akin to that of the fashion industry. But when they fade from the spotlight, something odd happens. Instead of disappearing like a pop song or parachute pants, they live on and on and on and on. The impetus behind this quasi-immortality? It's often cheaper to maintain old code than to rewrite it in the latest, trendiest language.

Little Smallscript also offers a subset that will compile down to JavaScript and run on Node.js. Those who have moved on to the more modern Squeak can use a JavaScript version called SqueakJS.

Logo

Before there were full IDEs to teach kids to code with languages like Scratch and Alice, there was Logo. There's still Logo today if you want to use Logo Interpreter in your browser and have all of the fun of its stripped-down syntax built when bandwidth was measured in baud and every keystroke counted. It has a simple elegance that can't be matched with all of the modern tile-dragging and button-clicking.

Basic

The '70s never died. Not only can you emulate your old Commodore 64 games on the Web, but you can keep that 1970s Basic code running too. Well, that may be a bit of an exaggeration because there have been so many dialects over the years. But you can still create something new and current with all of the simplicity that made Basic popular.

If you liked QBasic, the structured language that Microsoft made famous, then you can start with qb.js, a JavaScript implementation that will run in your browser. Once it starts running, it turns a Canvas object in your browser into a rectangle filled with old, monospaced type. It becomes a window into another era. Not all of the parts seem to work smoothly, but the code is open, so you can revise and extend it under the GPL 3.0.

NSBasic is a more commercial option that produces code for JavaScript environments that run on desktops and mobile devices. NSBasic targets developers who don't want to struggle with the complexity of Eclipse or XCode to produce something for their smartphones. You can turn your old Basic experience into an entry for the App Store.

Another commercial option is SpiderBasic, a modern version said to be built in the tradition of PureBasic. It offers access to all of the HTML5 and WebGL hooks necessary for building a modern, multiwindow Web app.

 

Previous Page  1  2  3 

Sign up for CIO Asia eNewsletters.