arbis and kaizen



OK, so I've been playing with dynamic languages a lot. In the past year I've somehow been able to get away with programming in Ruby and Lisp almost exclusively. It's a rather refreshing feeling, especially after wasting so much time with C++ in university. The funny thing is, a good deal of the software I actually use is written in C.

My recent excursions elisp have made me realize that working in a dynamic language allows for an environment that you can mold and shape on the fly to suit your whims. Such a system allows you to grow more productive the more you use it, not only because you learn more and more about the environment, but because the environment also reciprocates and 'learns' more about you.

This is technically possible with programs written in C (or any other non-dynamic language) if you are fairly familiar with the source, but the feedback cycle is so much longer due to compilation that you simply wouldn't bother with small improvements. You're also stuck with the problem of what to do with your customizations. If they're the sort of thing everyone would like, then great, you submit a patch. If they're a matter of taste and personal opinion, you might be able to make it an optional preference if you're lucky and don't mind cluttering up the software. But otherwise when the next version comes out, it won't have your customizations.

But this is really only even relevant if you've already invested a lot in C. I can't count the number of times I've felt brave and checked something out of the GNOME CVS or the like, somehow under the impression that I'd do some serious hacking or at least grok it on some level. But the outcome was always the same—I would soon realize that getting reacquainted with C was one of the last things I'd like to be doing with my time.

I've been able to get away with doing a lot of my everyday tasks in Emacs, and Emacs rewards me for doing so in a way. However, it can't do everything. It does a great job at simple web browsing with w3m-mode, but there's simply no way it can render CSS properly, and ECMAScript is out of the question. (From what I gather the problem with CSS is that the Emacs rendering engine is showing its age.) This lead me to play around a bit with the Closure web browser, but it's not exactly what you'd call mature.

Someone recently said that reuse is vastly overrated:

Finally, the new economics of dynamic languages like Ruby simply makes reuse a lot less attractive. Since the cost of producing new, original code is so much lower, the demands on reuse are that much greater. And usually that means it'll take more time to reuse something than it'll take to create it from scratch.

So why bounce around between Epiphany, Firefox, and Closure? Ruby's got what you need to make a browser. It's just a matter of tying together the Gecko components in GTK and then customizing to your heart's content. I've started with a little project called Arbis as an experiment; we'll see how it goes. It's already faster than both Firefox and Epiphany. I suppose the biggest question is how 'deep' the ruby gecko bindings go—if it's fairly surface-level it may not be useful for anything more than a toy.

Update: while embedding a gecko frame in Ruby is possible, it's not really useful since none of the functionality inside the page is exposed to Ruby; just basic back/forward navigation.

« older | 2006-04-24T20:32:32Z | newer »