JavaScript; A beauty, the mistake we made about libraries

I realized one of the old reasons why some don't consider server-side JS ready could actually already be considered a fun little mistake.

One of the old cited reasons why server side js isn't ready is "Lack of libraries". Ya, io needs some standardization (and perhaps more clean APIs), and there are various low-level things which need building. However there is one thing I think we can actually nicely tick of as mistake.

General libraries for different types of markup and so... Templating? JSON-Template is in JavaScript, Python, Java, PHP, and the list is growing. Markdown? Showdown. Textile? Theres two or three of these I think, at least one is GPL which could be troublesome, another is not marked but it looks like the authors are open enough a poke should be all needed to give it a real license.

Well it's not everything, but markdown and textile were things I never even thought would have already been written in JavaScript. I've started a list of general libraries which could potentially be turned into server side libraries already.

The big fun part I'd like to note here is how I designed the MonkeyScript system. Bananas can actually be written using a wrapper trick, most client side JavaScript libraries can be converted into bananas without even modifying the library simply by creating a wrapper js file that will exec the client library, and add things to the exports object. That means that with at most three files, and if the library was written properly absolutely no sourcecode modification, a library can be turned into a banana. The three files would be nothing but the wrapper, the metadata file, and a Jakefile to build the library into a banana.

  • programming
  • javascript
  • monkeyscript