I’ve been thinking about playing with a new programming language or two, to see if that helps me rediscover some of the fun I used to have when the discovery of new capabilities or ways of doing things was more common than the discovery of new nasty things to work around. The vehicle I’ve chosen for this is sort of a stripped down version of the image-warehouse daemon I’ve been working on at Red Hat, supporting basic bucket/object/attribute operations sort of like S3 but skipping a lot of the more complex query/replication stuff that makes iwhd special. Here are the things I need, besides basic filesystem stuff.

  • Request routing/dispatch. I like the Sinatra model for this, but I’m not tied to it.
  • Templates sufficient to generate simple XML and JSON output (e.g. for bucket listings).
  • Some sort of database interface, but no ORM.
  • A decent parsing library, preferably of the PEG flavor.

I’m planning to implement the same functionality in three languages, just to compare and contrast lines of code, performance, etc. Since the point is to learn new languages, that rules out the ones (like Python) I already know. Since the point is also to have fun, that rules out anything too enterprise-y or CS-purist-y. I don’t mean to disparage such languages, Erlang or Haskell or Scala might be more worthwhile and others might even consider them fun, but for this purpose something more “quick and dirty” is called for. So, the candidates are:

  • Ruby, Sinatra, ??? for templates and web server (Thin?)
  • LuaJIT, Kepler
  • Javascript, node.js or ringo.js, ??? for routing and templates
  • As you can see, I’m looking for suggestions on some parts. Any ideas? I’m not even completely tied to the choices already made above. Just try to remember that I’ll need support for the same database (that’s undecided too) across whatever languages I try, and that I’m trying to have fun so I don’t want anything “heavier” than it really needs to be. Thanks to all who contribute.