So I think I need a new pair of pants

I've been following Couchdb's progress on and off for a bit now, and finally shaved enough corners off my pile of square tuits to actually fiddle with it. Setup an instance, got it running, made an ebuild for the current stable, etc. Very cool, and I was about to start coding a blog-type-thing (for here actually) in ruby. And then I read that not only was the XML output going to be changed to JSON (far saner), but that the entire query language was going away. Didn't make much sense to code to a dead interface, so I let the code REST (get it?).

Except now the excellent Jan has blown my tiny little mind. In a nutshell couchdb now returns JSON. Yawn. Oh and the query language has been re-coded in javascript. Yawn again. Did I mention that the querying method is a MapReduce? You pass a javascript function to CouchDB and it Reduces its dataset by that function. Yeah, if you yawn here you're clinically dead.

Couchdb is missing two things now: proper access control and the clustering niftiness that Erlang makes possible. Both of these are on the roadmap I understand, so I doubt I'll be waiting long. Once these are in place, the foundation is there for applications to be written in javascript, use couch as a integrally-versioned and collision-free (well, sort of) datastore, without involving a server side scripting language. Hell, you don't even need to involve HTML, just load up an empty HTML doc and modify the DOM to your liking. And maintain state without worrying about colliding with your own changes. Hell, you don't even need a webserver except to serve up the javascript.

I'm sick of javascript being treated as a second-class also-ran idiot language for making sparkly cursor trails. It's nearly a fully fledged functional language, and with Tamarin/Spidermonkey coming down the pipe on the client side, Couch handling datastores and querying, we can change the way javascript is used. It's not the assembly language of the internet, it's the LISP of the internet

If, and this is a big if, clustering and mapreducing come together in the obvious (but decidedly nontrivial) way, I really will wet myself.