Thursday, October 11, 2007

Joan Baez, 1966, singing Dylan's "With God on Our Side".

Thursday, October 11, 2007 1:37:02 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0]  | 
 Wednesday, October 10, 2007

After being relatively upset about Parzania, I found myself at the RSS community page on Orkut. Needless to say, that was even more disturbing. It was without a certain amount of morbid horror that I looked at their polls, their organized report-as-fraud activities, their cyber-lynchings and such.

I usually don't like to deal with this sort of thing. I am complacent, cowardly and comfortable in my relative safety. It bothered me to think that if I had no fear it would be dishonest, or just plain stupid.

I happened to look at my blog and saw Star Trek and the Q next to Parzania, it struck me what the Q might say about India and the RSS. "Your species is always suffering and dying", he would say in his How-entertaining--What-do-you-expect-anyway attitude.

And indeed, what do I expect? The world has always been a barbaric place. We express surprise and shock at the slaughter of Delhi by Nadir Shah, the slaughter of the Sikhs after the assassination of Indira Ghandhi, the India-Pakistan partition riots, the Bombay bomb blasts, the Ghodhra riots, (and hardly just India) the Khmer Rouge regime of Cambodia, the Rape of Nanking, the Hutu-Tutsi conflict, the occupation of Iraq, the massacre of the Algerians... and on and on and on. Just too many to list. In fact so many, that one should ask, what's the big deal? This is, after all, human nature.

People have been always mercilessly wiping out entire populations of "others" based on some definition of identity. Why are we so surprised by this? Why do we expect that in the times of our generation the world should have magically become a "civilized place"? Hardly, if you look at the evidence.

It will be a long time before we turn into a species that is not always suffering and dying. Something truly deep and fundamental has to change about us for that.

In the short term however, in a few hundred years or maybe in our own lifetimes, the vices of our day shall blow away to be replaced by other ones. To make any of them to go away, something fundamental needs to change that invalidates their cause of existence. A little like the way Frown Power and Superman destroyed the Ku Klux Klan, might there be an Indian equivalent? Prosperity? Accountability? Can we motivate such a change?

Q: Let us pray, for understanding and for compassion.
Capt. Picard: Let us do no such damn thing! What is this need of yours for costumes, Q? Have you no identity of your own?
Q: I come in search of the truth.
Capt. Picard: You come in search of what humanity is!
Q: I *forgive* your blasphemy!

Wednesday, October 10, 2007 10:24:12 PM (Eastern Standard Time, UTC-05:00)  #    Comments [0]  | 

I watched Rahul Dolakia and David Donihue's Parzania today.

I don't feel like describing the quality of the production in any way. For a film like this, it doesn't matter. I don't want to use my own words. Gujarat : Lengthening Shadows Of Swastika :

Gujarat carnage was very different from the communal violence which took place in Independent India so far. Here one could most clearly see the well planned violence unleashed on the pretext of Godhra train accident, duly supported by the state Government under the patronizing eye of the central government. While every possible rule of the law was violated by the authorities, the hapless victims were left to rot in the refugee camps with atrocious living conditions, totally ignored by the state government. The mirror of Gujarat's dominant social thinking was to come to light soon with the winning of elections by Narendra Modi, who had played central role in the violence. What has been happening in the social milieu of Gujarat is beyond belief as far as the democratic norms and the communal amity is concerned.

This film left me angry and with a distantly familiar feeling of helplessness at the destiny of my country. A country whose several thousand year old deep rotting "culture" fills me with disgust; a deep disgust and shame at its lethargy and pretentiousness; at its devices for breeding contempt and entrapment.

What bothers me the most is that I am sure these things will happen again. Every bit of my intuition tells me so, and I am helpless to do anything about it. With no accountability, no information, I cant see how to instigate any lasting change. How do you bring accountability to a country like ours?

Wednesday, October 10, 2007 5:55:47 PM (Eastern Standard Time, UTC-05:00)  #    Comments [2]  | 

Did I ever mention that I have always been a die hard Star Trek fan? I havent watched any of the Star Trek series as much as the Next Generation, so my admiration of Star Trek is largely limited to the Next Generation. I got up today morning and with some ado I decided to look at the notes for a test I have about Computational Complexity. I hate exams where I actually have to look at the notes for any non-trivial reason. Even worse, I hate subjects that make me need to look at the notes when I really shouldn't have to, had my love for the subject been left undistrubed. Irritating.

This reminded me of the "human equation" from one of my favourite Star Trek episodes, "Hide and Q":

Data: "Sir, how is it that Q can handle time and space so well, and us so badly?"
Picard: "Perhaps one day we will discover that space and time are simpler than the human equation."

Googling for this, I came across Q saying: "Your species is always suffering and dying".

This considerably cheered me up. Ok, back to the notes. (Later addition: if you want to read a nice spoiler about the episode go here. Please read it only for memory sakes, dont read it if you havent watched it already. Ok, now back to my notes).

Wednesday, October 10, 2007 8:46:02 AM (Eastern Standard Time, UTC-05:00)  #    Comments [1]  | 
 Wednesday, October 03, 2007

One of the things I have a hard time truly internalising is the difference between existentials and universals (written sometimes as exists and forall). They have a very strange relationship and its hard to maintain the intuitions about what each of them mean, other than in the most obvious of interpretations. I remember Prof Mike Dunn, who is a renovned logician and was the Dean of the School of Informatics, in his classes on Galois logics would say that he keeps mixing them up because they are duals of each other.

One area where these crop up and innevitably confuses me is in type theory, especially when looking at the types of continuations. Its at times like this Prof Sabry would saying something mystical sounding, in true sufi style, which will leave me with a little flashlight to use in the darkness.

So some intuitions. What is a universal? Consider the function "head" that takes a list and returns the first element of the list. The function does not concern itself with the types of the quantities in the list, it only cares about the list itself.

So "head" has the type: forall x. List x -> x

(Functions like this may show up when programming with generics (or templates) in some languages. You are free to make these connections, I wont make them here.)

What is the type of head saying? It says that it doesnt care about the underlying type of elements in the list. It only cares about the fact that these elements are in a list. So when head is invoked with a list of integers, "List Int", it returns an integer, "Int". When called with "List String", it returns "String". When called with "List (List Int)" it returns "List String". You get the idea. The "idea" should have two parts (1) "head" is concerned about the fact that it gets an abstract List. (2) There is nothing, no code, inside "head" that depends in anyway on the type of the contents of the list. If head is called with a "List Int" it cannot return an integer that it had hidden off in a variable. It can produce an "Int" only by looking into the List. Why? Beacuse head did not know that its argument would be a list of "Int".

In other words the "forall" says that "head" is truly independant of the type "x". It can manipulate the List, but it can't manipulate the "x". Its is "pure" with respect to "x". The "x" in the List is abstracted away from it. Having a function that is forall quantified is different from having several functions, one for each datatype that you have in your system, because of two reasons (1) There can be an infinite number of data types, which means you will have to have an infinite number of such functions (2) Each such function is for a specific type, "List Int -> Int", and hence knows that it need not ever look into the List but can return any Int to you to satisfy its type; in other words each such function is not "pure" wrt the type of the elements of the list.

Wednesday, October 03, 2007 5:37:27 PM (Eastern Standard Time, UTC-05:00)  #    Comments [1]  | 
 Sunday, September 30, 2007

I came across this on the blog of an old friend Sriram Krishnan. Sriram goes onto give some colorful instances of Dave Cutler, the Windows guru who is the recipient of the award. To put some of this in context, Dave Cutler is considered a brilliant engineer, among the best Microsoft has ever seen - which easily places him among the best anywhere in the world.

Being several steps removed from Microsoft and the community of grace that envelopes it, these days I tend to see things with less rosy shades. If it is indeed true that Dave Cutler is as brilliant an engineer as he is touted to be, if he could have the genius to make design decisions about the NT system in the early 90s that are still revealing their mettle, then why is he being given a "Bill Gates" award? Wouldn't it be more fitting to give Bill Gates a Dave Cutler award? After all Bill Gates, to the best of my knowledge, has never been credited with impecable design that has withstood the test of time, the way Dave Cutler is often described, though he has deisgned systems that have had a huge impact on the future of Microsoft.

In the Computer Science community, the highest award of recognition is the Turing award. The award carries the name of one of the most foundational thinkers of our times, Alan M Turing, and is, in part, a community's recognition of the towering intellect of a man who was among their very best.

The true qualities that Bill Gates deserves to be applauded for, amongst which is being a buiseness-savy geek at a time when such a notion didn't exist, is in a different domain altogether from the strengths of Cutler. Maybe the Bill Gates award is just a name for "Microsoft's Best" award, in which case maybe Gates himself should have got the first one. Otherwise it feels like handing Tagore a Nobel prize for Physics.

Sunday, September 30, 2007 10:10:29 PM (Eastern Standard Time, UTC-05:00)  #    Comments [2]  | 
 Saturday, September 29, 2007

I grew up with a great love for Dylan. Dylan's poetry and the way only he could sing it was something I didnt find an equal to anywhere. Until of late when I started indulging in Ghalib. I daresay, maybe Dylan pales in comparison to Ghalib.

Mirza Asadullah Khan Ghalib, who in my opinion is one of India's greatest poets I have had teh pleasure of knowing about, lived from 1796 to 1869 in Delhi - a very troubled and telling time for that city. He primarily wrote in Urdu and Persian. In the subcontinent it is his Urdu poetry that is more popular.

Some of his poetry is not easy to translate into English. Some words have no equal in English that conveys both the mood and the meaning. Also, there are some usages of words that are striking in one language that lose the their essence when translated to another language. Such is the nature of much of the poetry of Ghalib. I sometimes compare this to the "the dude" in Big Lebowski saying "That's like your opinion man...", so simple a phrase that it looses its effect when translated into some other language.

I recently came across some work by the Persian poet and Sufi master from Shiraz in Iran, Shamsuddin Muhammed Hafiz who lived from 1320 to 1389. I have access to an English translation of Hafiz's work. I dont understand Farsi and so I wonder how the originals sound. Hafiz's poetry has a very different flavor from Ghalib's, some of it is very clearly religious mysticism, some of it falls in that grey area of junoon. In much of the older Urdu poetry, and I am told this is true of Farsi poetry as well, the subject of love is described as a gender neutral "beloved". The beloved could be a man or a woman or god. The translation that I have of Hafiz's work uses God and beloved interchangibly, sometimes losing out on the other possible interpretations of verses.

That's the whole Idea

Fire has a love for itself -
It wants to keep burning.

It is like a woman
Who is atlast making love
To the person she most desires.

Find a Master who is like the Sun.

Go to His House,
In the middle of the night.

Smash a window.
Act like a great burglar -
Jump in.

Now,
Gather all your courage -
Throw yourself into His bed!

He will probably kill you.

Fantastic -
That's the whole idea!

 

Zero

Zero, is where the real fun starts
There is too much counting,
Everywhere else!

 

Manic Screaming

We should make all spiritual talk
Simple today:

God is trying to sell you something,
But you dont want to buy.

That is what your suffering is:

Your fantastic haggling,
Your manic screaming over the price!

Saturday, September 29, 2007 10:49:50 AM (Eastern Standard Time, UTC-05:00)  #    Comments [1]  | 
 Friday, September 28, 2007

Life as a PhD student, is not without its ups and downs. The big up being that you get to do pretty much whatever you want for a few years and almost reliably come out looking cool in the end. Of course some of you may debate if the whole 40-year old virgin look is cool, but lets not go there. One of the upgrades these days, Pooja ki meherbani, is my cool new phone a Cingular 3125 -

Of course, this is just a poor grad student version of her cool phone. My other Windows Mobile based gadget that I used is my little iPaq hx2495. When getting a phone with Windows on it, I was a little apprehensive. Afterall I had to keep rebooting (soft reseting) my IPaq every now an then. So far the phone has been pleasently functional with very few, in any, annoyances. I wish the alarm was a little louder and such... Its also a strange feeling to have a phone that truly talks to your PC. Since I got this, I have been paying attention to my Contacts list in Outlook, sometimes even assigning pictures of people and such. Most of my previous phones were just that, phones. Here is somethng that begs to be hacked with. Nice.

One huge downgrade of being a poor grad student is that you are poor. Most of the time, I couldnt care much for it. I am usually having too much fun to notice being poor. Except that you cannot buy that cool new lens that you'd like and such... but well. The poverty really strikes you when something comes up - something has come up - dental problems. The university student insurnace doesnt cover dental and boy, is it expensive in this country.With the slightest thing running into several hundred dollars, I wonder how most medium salary working people afford dental bills here. And there are few things as maddening and just downright painful like a toothache. I sort of miss being of in India in regards to all things medical where one could expect to walk in and get treated without an appointment, and most of the time end up with an affordable bill (atleast for most common place ailments).

These days I seem to have a quiet a bit of free time on my hands. This semester has been nowhere as busy as my previous ones. I am yet to start on any major pieces of work. Hence there is lots of time to blog. I am looking to get deliciously busy again. I have a job teaching operating systems this semester, imagine that. The professor in concern does a fair bit of travelling, so I do a large number of his lecture sessions as well and assist people in writing parts of the OS that they have to work on for their assignments and such. They just finished implementing some synchronisation primitives last week, they are going on to implement basic user space process support, system calls, some IO calls and some process management API (fork, exec, waitpid and such) in the coming weeks. Grading these sorts of things are tricky, especially in the context of partial solutions. Not every one gets things done properly, how do you really gauge the value of a partly working fork() system call? Fun fun.

One of my favourite places in Bloomington is this little coffee shop called Soma. The only really bad thing about Soma is that they ask you to leave at 11.00 pm. They need to close apparently, what a lame excuse! Some days I drag myself unwillingly to a nearby Starbucks that is open overnight. A t-shirt that is for sale at Soma says "No Corporate Aftertaste". Right. Sometimes at Starbucks, on some nights, I run into Abdulaziz Ghuloum. Aziz gives me his usual smile which says, "Look here is Mr. I-Dont-Go-To-Starbucks".

Aziz is usually upto hacking his Scheme compiler, Ikarus (maybe the only one that may compare with Kent's Chez), or is engaged in some intellectual activity broadly (very broadly) related to his compiler. I remember one of these occasions when I found Aziz peering intently at this paper and I made the mistake of going over to ask what he was upto. He was trying to solve this Sudoku puzzle. "I am trying to solve it without writing anything", he says. "Its fun, join me". Big mistake, the next we know its 5 in the morning.

The other night, he was standing around smoking and I was standing around pretending to be smoking (I dont smoke, yet) and he says, "There is something strange about R6's exception semantics". "What?". R6 is short for R6RS, which is short for Revision 6 of the Report on the Algorithmic Language Scheme. In turns out there is something truly strange about Scheme's new exception handling mechanism. The textual description in the report makes almost no sense. Fortunately, very unlike Schemers, they included a formal operational semantics. A short while later we had an implementation of R6's exception handling implemented in about a page of code. I should write about this sometime, it is truly strange - if I knew what they were smoking when they did this, I might consider smoking too. There are one or two things about the way it interacts with stacks that would make a C#-Java programmer weep. (The C++ programmers are weeping all the time anyway.)

Work-wise one of the things I am being drawn into is thinking about macro-systems. More specifically, combining macro with types. Some of it looks truly interesting and maybe of some lasting value. This is also a rather strange space. Thinking about the issues underlying staged evaluation makes thinking about the semantics of control effects a walk in the park. Things like call/cc, shift-reset seem man-sized in comparison to the juggernaut of staged evaluation.

What do I mean by staging? A good approximate is to think about those times when you generated SQL queries from a host program, say a C# program. How did you generate that query? You pieced it together using substrings to make up a string that represents your query. Getting the syntax of the final query right is your sole responsibility. C# does nothing to check this for you. Even if the syntax is correct, making sure that your query is typed correctly (that it used the right fields for the right tables and such) is completely upto you. Can we do a better job? In other words, given a host language and a target language, can there be better gaurantees provided in the host language for generating code of the target language? Things like LINQ and its associated quotation mechanism is an approximation of a solution in this direction.

The situation however is a common one. Almost of every web application has to deal with the nightmare of generating client side javascript, html, sql code and god knows what else. Every language with eval encounters this. Most non-trivial macro systems face this and so on. 

 I spent a major part of last week trying to study some of the related work that has already been done. One significant piece of work, that is obviously relevant, is Walid Taha's MetaML, MetaOCaml and Environment Classifiers. Another one that I personally suspect is related is Barry Jay's Pattern Calculus. I dont have a concrete enough argument to make about this connection, so I am generally silent about this for now - atleast until I can better articulate things.

Trying to understand the type theory behind Walid Taha's Environment Classifiers has been rather mind-bending. I was shocked that someone could do so much thinking for just one paper. After spending a few nights poring over the details of the type system, and not getting too far, Aziz tells me, "I think he is Egyptian". It then made a lot of sense to me. I have been having a hard enough time trying to keep up with the one other Egyptian I know - my advisor. I was begining to see a pattern here.

So at approximately 3 at night (or morning), knocked high on caffeine and toothache and type theory, I have the vision from several thousand years ago. With a slightly smug expression and a questioning eyebrow the Egyptian architect looks at the newly constructed pyramid at Giza, his eyes slightly disappointed. "Is this all we can do?". At approximately the same time, my own avatar at Mohen-jo-daro looks rather pleased. He addresses his confused looking brethren and says in ancient avestha-sanskrit with a slight tam accent, "Yand frends, We will call this a Drain." :)

A couple of days later my advisor, with a rather sympathetic expression, explains to me that this was Walid's PhD work and it took many years of refinements even after his PhD which culminated in the Environment Classifiers paper. Whew! This definitely helped my Mohen-jo-daro alter-avatar feel better. So after he invents the drain, he goes home, has a nice supper, samples some soma and then proves P = NP.

 

Humko maloom hai jannat ki haqeeqat lekin,
Dil ke khush rakhne ko, Ghalib, yeh khayaal acha hai

Friday, September 28, 2007 12:09:16 AM (Eastern Standard Time, UTC-05:00)  #    Comments [5]  |