< February 2006 >
    1 2 3 4
5 6 7 8 91011
Mon, 27 Feb 2006:

Just for kicks, I did a small XSL hack on my blog feed. Actually it is not completely XSL, there's a bit of javascript in there to change back the xml encoded text into HTML. There is no unescape XPath function, you see. So if you're running Firefox 1.0.3+ or better, give the rss feed a hit with the browser and see what I'm talking about. The XSL style-sheet is in rss2html.xsl.

Clientside XSLT - all the cool kids are doing it.

Never offend people with style when you can offend them with substance.

posted at: 19:44 | path: /hacks | permalink | Tags: ,

While the blug meet was in full flow on saturday, my dev box at work was building a clean copy of firefox off CVS. I just started to build it out of curiousity, but soon I realized that the world of web programming is going to be taken by storm when people start writing code for deerpark. Though it revolts my sense of propriety when browser specific hacks are introduced, this one's a pretty corking feature.

For a few years now, we've been using Applets to display dynamic data from the server side. At that point they were the only real way to actually fetch data from the server without refreshing the page. With the advent of Ajax, that no longer limits writing apps in javascript rather than in java. But still the only way to show dynamic charts and graphs was still to use an applet - No More .

HTML Canvas: This is a new standard from the WHATWG to do procedural graphics. Canvas is different from SVG in that this has context operations like rotation or other transoformation and resemble OpenGL or Postscript rather than SVG. In fact, Mozilla has built its canvas so that SVG is a data model which is rendered on a canvas view.

Since I am too lazy to actually do any graphics work, I'll point you to some excellent examples. Here's the classical tiger sample which keeps popping up whenever someone wants to show off graphics - tiger.xml. For those who still don't believe in the power of this new widget, I present you the graph charts on liquidx. Or the ultimate sample - a wolfenstein model first person shooter written in javascript. Pretty decent game, if you could play one at 8 FPS.

Believe me it is certainly worth downloading one of the nightly tarball if you are averse to building it yourself. Go get it, try it and see it work. I'm surprised that not too many people are blowing hot & cold over this particular feature.

Never invest your money in anything that eats or needs repainting.

posted at: 15:44 | path: /hacks | permalink | Tags: ,

Humans didn't live in cities till a few generations ago. And it shows. We still behave in some very primitive subconscious ways which show our ancestry as hunter-gatherers in a jungle. I suggest you take a closer look at two different (for the record, wholly imaginary) people walking through a mall. One is a mid twenties guy in jeans and a t-shirt which says Look the other way. The other one is a early twenties girl with two friends. They walk down the shop floor extremely confidently but very differently.

Hunter & Gatherer: Who'd be hunting for clothes and who's be gathering ? Even a casual observer will not have any problem finding an answer for that question - which is left as an exercise to the reader. The traits are almost painfully obvious on second thought.

Rather than head off into a discussion of how/why this evolved and end up pissing off half the human race (by intention or accident), I'll just go ahead into the subject.

Threat, Opportunity and Other stuff: That is exactly how an ideal hunter would see the world. You'd want as few distractions as possible. Gather enough information to remove one more variable of the landscape from your conscious thought system. It is either a threat or an opportunity - anything else can be ignored. Of course, when there's a mammoth thundering towards you, you can hardly be bothered by how beautiful the sunrise is.

Since humans were never intended to be carnivores and lack any real professional equipment for the job, we can't completely remove the imagination and creativity from the hunter either. A complete lack of imagination would spell disaster for a creature which would be helpless without crafted tools and co-operation.

The Hunter was not just a way of life, it was a state of mind too. There's still a bit of Hunter in each one of us. It revels in the chase rather than the result, where as the gatherer prefers to accumulate rather than capture. We are both, but we are neither truly.

For, thus the book of Genes read - ' Call me not the hunter or the gatherer. Call me a survivor'.

Calvin: I wonder why we think faster than we speak.
Hobbes: Probably so we can think twice.

posted at: 12:44 | path: /observations | permalink | Tags: