Victus Spiritus

home

A Dynamic Programming Language Defined by URLs

08 Apr 2010

One of the problems with modern programming languages is heavy installation. Last year I tried convincing a friend to learn some modern programming languages with me, and we couldn't get his dev environment to work. He gave up after a couple of days, and I didn't know about the adobe meeting/screen share tool at the time to walk him through setup.

More often than not there's no one click setup. In fact, if you plan on doing any serious work, setup of all required development tools can be quite involved. A recurring question haunts me, why are such great tools hidden behind walls of detailed installation? As a sample point here's a list of some of the development tools I installed over the past few months (at home and at work):

Java Virtual Machine, Java SDK, Ruby MRI 1.8.6-1.9.1, enough gems to be rich 10X over- many which required compilation, JRuby, Rubinius, Duby, Python, Perl, Google App Engine SDK (Python+Java), MongoDB (we moved to sqlite3), Aptana Studio & Aptana Radrails, Eclipse Galaxy + Pluggins, Netbeans + Pluggins, git, Tortoise Git, DiffMerge, Wine, VirtualBox, VMware, and a few browsers with Firebug - Firefox, Chrome, Chromium (work security dissallows Chrome due to some 2008 vulnerability, but allows GPL so Chromium's kosher - long story).

I'm sure there's plenty more that I'm forgetting at the moment. Not all of these tools install smoothly, although most install much faster and with less complaints on Linux (versus Windows). Of course I don't use all these tools every day, but when a need arises I install the tool. In doing so I die the death of a thousand paper cuts. When I choose to setup a new development environment or change language interpreters it can take significant time to shake out all the conflicts. In fact the time cost is large enough that I tend to use inferior utilities in lieu of system wide upgrade time. My favorite feautures are ease of reading, highly functional core installations (rich default lib), and always available.

Solutions & Ideas

I have visited a number of sites that have input windows which allow code entry and perform interpretation and execution. But the input source and run time is limited, there's no way to control installed resources, and the output format is highly constrained. Regardless these interfaces are fantastic for learning, and are part of the inspiration for this programming idea.

A Web & Browser Based Language

In a short time I've been impressed with Javascript. Although the syntax isn't as pleasing to the eye as Ruby, it wouldn't take much to slap a prettier front end on it^. This dynamic language is readilly available in all browsers, and is currently being optimized by one of the most influential companies on the planet* in unison with the open source community. There are several highly useful libraries available for JavaScript (jQuery, jQuery-UI, Prototype) which can be referenced by including the URL of the source (usually in a compressed format .min).

What value would a derivative language of JavaScript with a rich default library, and syntactical feel/ease of use of Ruby be? I'd lose all the functionality of gems unless there were a translator. I'd still need to identify each libraries URL in a header structure. A way around this would be a distributed lookup system in the interpreter that would search for unknown unique identifers (URLs/subdomain URLs?) and pull in libraries as needed just in time, or just ahead of time inclusion with a quick first pass. It'd save me gratuitous installation time, at the cost of optimal run time. Interpreted dynamic languages can't execute as fast as compiled code unless their flexibility is reduced in bottleneck flow points, using a just in time or predictive compilation model. There's nothing in this proposed language preventing such implementations.

note:
* Google's help with JavaScript interpretation and execution is orders of magnitude faster than several other browsers. I expect to see theirs and the open source Chromium browsers work spread into other browsers
^ CoffeeScript looks somewhat Python or Ruby like

Updates:
Red 4.0 is a full implementation of Ruby in the browser. I have to check it out asap.

Here's an interesting find: Uki which looks somewhat like jQuery-UI. I spotted there mail app on HackerNews.

Here's Uki on github.

Another Update:
The creator and lead developer of jQuery, John Resig wrote a blog post about a Ruby implementation using JavaScript: HotRuby.js.but the rich default Ruby library wasn't fully developed, and porting over gems will take some collaborative effort. But it looks plausible.