Saturday, February 04, 2006

So, like everyday, I got up in the morning, opened my closet and pulled out some random t shirt to wear with my jeans. Well, the way it works I guess is, that I pull out something [based on some pattern somewhere] from some corner in the closet that I think to be LFU or something. Its winters, I am going to be wearing a coat and I am going to the computer science department, no reason to think twice about I am wearing. Err, How and when did it come to this? I don't know.

Today morning something struck me and I went back to my wardrobe and took a sweeping glance. Wait a minute, Where are all the normal t-shirts? What, I have been wearing these every day? May be I need to do some shopping, and this time not at college mall or microsoft company store. I decided to take pictures of some of them [Yes, there are more] and put it up here to see if there are others who feel the same way. I am sure there are men, but women...Anybody?

Indiana University

image001.jpg

Indiana University

image004.jpg

Indiana University

image006.jpg

Indiana University

image008.jpg

Indiana University

image012.jpg

Indiana University

image010.jpg

Indiana University

image016.jpg

Indiana University

image014.jpg

Indiana University

Microsoft

image018.jpg

Microsoft

image020.jpg

Microsoft

image022.jpg

Microsoft

image024.jpg

Microsoft

image026.jpg

Microsoft

image046.jpg

Microsoft

image047.jpg

Microsoft

image048.jpg

NO, they are not all free.
I bought many of them;
now,
don’t ask me why so
many!
I kept forgetting the
past ...

Unrelated, but since I don't want to make another blog entry for just this, I will say it here. I assembled a book shelf. I bought it last semester before classes began. I procrastinated the assembling, thinking of it to be some huge time consuming task, until the (mis)organization of books, printouts and handouts started affecting my productivity real bad. Then I conjured a tool set from somewhere and decided to get the furniture together last weekend. It was quite simple, the detailed graphical instructions made it simple even for me who had never really assembled anything  wooden (sounds funny). And as I hammered those nails and wood together and saw the wood below begin to deform I thought how weak these things were...ha, good old sturdy Indian furniture, comes pre-assembled and lasts forever.

 

No mama, I am not doing this coz I am poor and am forced to handle my own carpentry. And this is kind of fun, atleast the first time.

Nice to have a shelf, my table is all empty now with just my laptop and 2 friends. Its great seeing my room over and over again. And on that happy note I shall end this entry.

[Edited: Added the collection table here on demand - well 1 person is demand)]

Saturday, February 04, 2006 5:10:28 PM (US Eastern Standard Time, UTC-05:00)  #    Comments [14]Trackback
 Saturday, January 28, 2006

A quine is a program that writes itself.

Consider the syntax: <Function> : <Argument>

For example:

(1) Write this twice : Write this twice would output  Write this twice Write this twice 

(2) Write this twice : Write this twice : would output  Write this twice : Write this twice :

We are working with a register machine in the recursion theory class, and we wrote a quine in it. Later I wrote a quine in scheme and then tried writing one in C. That set me thinking as to whether the problem of being able to write a quine in a given language L was decidable. Is there a formal method to prove that a quine, or other quine like programs can be written in an arbitrary language? Talking to Roshan and Ramyaa about this, we concur that if the language is turing complete [i.e you can build a universal turing machine or eqvt (in lambda calculus, pi calculus)] then it should be possible to model a quine in it. You can find some quine implementations in different programming languages at http://www.nyx.net/~gthompso/quine.htm

We are working on a Register Machine (RM) with 7 possible instructions:

0*m# - add 0 at the end of Rm
1*m# - add 1 at the end of Rm
**m# - add * at the end of Rm
*0m# - add # at the end of Rm
n#    - go forward n steps
n*#   - go backward n steps
n**#  - cases on Rn in the order empty, 0, 1, *, #

I have 7 problems for the weekend, one of the interesting problems is to write twin programs s1 and s2 with the properties that s1 <> s2 and a) running s1 with all registers empty gives s2 in R1 b) running s2 with empty registers gives s1 in R1. Phew!

I wrote a scheme parser and interpreter for the langauge, so I can write code and execute it. If anybody wants a copy, drop me an email.

Saturday, January 28, 2006 7:04:25 PM (US Eastern Standard Time, UTC-05:00)  #    Comments [2]Trackback

I grew up In Trivandrum in Kerala and was introduced to some of Kerala's culture. The first house we stayed in was a rented 2 bedroom house with our landlady staying behind us. There was ammachi [hmm, I never knew her real name, guess then that wasn't important] and her son and daughter. Her son in law was in Gulf (!). Neighbours were malayalees and there were some kids, all older than us but we played games together. We [My sister and I] learnt malayalam and learnt to eat non vegetarian food thanks to the people around. Saturdays, neighbours would come home to watch the malayalam movie playing on doordarshan and we would sit with them and watch. And I think we would all cry at the end of all the movies. I also have vague memories of the movie always having Shankar, Menaka or Mohanlal/Mammooty.

In the 3 years or so time that we stayed there I learnt and spoke the best malayalam I ever did in my life so far. It was flattering to see people exclaim in wonder when they figured out that I was a north indian and yet could speak malayalam as fluently as any kid around. I remember beaming with joy everytime that would happen. We would listen to malayalam songs in our neighbours houses and would sometimes sing them without ever understanding any of the lyrics. When I was in my 2nd or 3rd grade we shifted to a bigger house [Our family was expanding] and that put an end to a lot of malayalam conversations we indulged in and a complete end to malayalam cinema. However, one of us would end up singing one of the old songs randomly [We are all big singers in my house, Mornings there would be three distinct voices from the three bathrooms in our house...] that we would have heard on chitrageetham on Thursday evenings on DD. I think the only songs that I remember today are "chembarathi poovey cholley" and "aayiram kannoomaayi" - If not every week then we saw them every other week on DD in the first house.

I end up humming those old songs sometimes even today when I am alone. So a few days back while cooking for some friends, I was singing "Aayuram kannomaan …" and a friend of mine said it is "Aayiram" and asked me if knew what it meant. And sure, I know it means thousands. He then pointed out that it is kannumaayi which means "with eyes" and suddenly the first line made complete sense. In fact its only then that it struck me that the song is so beautiful "With thousand eyes, I longed for you …" It sounds a lot nicer in malayalam and I found it kinda sad. I always thought it was a happy song, but now it comes across as a very deep and sad song. I hope I will find out what the rest of the song means.

Anil pointed me to this video where Mohanlal is bragging to Jagathy and his wife that he has been to America. I laughed endlessly watching that video; boy, these guys are so natural. I could map these characters to real people that you would come across in the country side in Kerala. Mohanlal, Srinivasan and Jagathy - All 3 with their dialogues and expressions make that clip utterly hilarious. I don’t understand some of the things they say, but its the sort of thing you so commonly hear being used, so you kind of give it this abstract meaning wrt context. May be I should have watched some of these in Kerala. But watching malayalam movies here is more fun for me, beacause I get access to subtitles and the jokes seem like jokes. We probably have malayalam dvds in video libraries in Kerala now, earlier that was not an option.

Apologies to all friends I laughed mercilessly at, when you (mis) sang hindi songs especially to the guy who sang "Chaudhari ka chaand ho".

Saturday, January 28, 2006 5:10:29 PM (US Eastern Standard Time, UTC-05:00)  #    Comments [2]Trackback
 Saturday, January 21, 2006

I just finished reading State of fear by Michael Chrichton. It wasn't as fast paced as Da Vinci Code but I kept thinking of it while reading state of fear. Well, it has occured to me in the past but I have let it pass. It is the feeling that you get when you read 1984, about how we possibly live in a make-belief world unaware. And how all the history is what some of us decided should be and the rest of us believe as *real*. It bothers me to think that what we know and are told about things around us are not true, more precisely the fact that somebody [or some bodies] is [are] intentionally making up stuff on a global scale or covering up stuff. I dont know about global warming being an issue or not, but the idea that the whole thing could be a farce is something to think about. And then you start questioning everything around you.

There was a story that I had read in school in my 7th grade or so in hindi called, if I remember correctly, "Akbar ka kila" which was about this woman who let Akbar in to her house on a stormy night when he was escaping wounded after a war or something. The story goes on about how she had saved his life by providing shelter,medication and food.... several years later his son or grandson sent men to find her/her place. They built a fort there inscribing words about Akbar having spent a night there after fighting a war bravely. The moral [Oh yeah, back then we drew morals from everything] was about how history had no record of the lady and about real heros never getting named. My memory is rusty and I may have gotten the story wrong.

Somehow, it feels a lot more spooky in my current circumstances. It appears to me that life here is a little too dependent on the media for information. People know and believe about the world only as much as CNN shows them. One could argue that each place sees other places through media, credibility of CNN etc - these are just my perceptions.

When I read 1984, I knew that things were dramatized to build a world of fiction, but now I wonder if they were that *dramatic*. A lot of it is already there, been there. And well ... will in all likelihood always be the case. I could draw parallels between it and some events captured in the movies 'LA Confidential' and 'Enemy of the state'. That is when I shut myself off so I didn't find comparisons that didn't exist (like Dan Brown does after a point in da vinci code!)

So what is the probability that a century later or couple of centuries later people will know about the past as being like our present today? With all the blogs [now this is new, it hasn't been around in the past. The only remotely similar thing is a personal diary that some maintained and was possibly more subject to decay/destruction] in e-space and electronic media and tapes, there is hope that people will have access to several views. Or like paper in the past, bits in the future will be manipulated...?

I don't know, but its a nice way to spend your weekend by thinking about possibilities.

Saturday, January 21, 2006 5:02:35 PM (US Eastern Standard Time, UTC-05:00)  #    Comments [2]Trackback

Well lets see, a whole semester got over, had a winter break for 3 weeks and 2nd semester started. In short that is what happened. Ofcourse, there is a long story version which I shall type rightaway

Matlab is a cool language, the sort of language mathematicians, electrical engineers, scientists etc need. I would have felt like a hero if I knew about matlab when I was in high school. Absolutely no learning curve and comes with rich libraries [and other specific libraries that one can buy]. Most matlab programs span over a couple of small functions. In fact a lot of the code I came across in the last few months is less than 2 pages long. Dynamic arrays, plotting graphs, matrix operations etc are done effortlessly in matlab [compare this with C/C++!]. I built a type inference system for matlab in matlab as a part of my RA work at IU. The research project involves studying high level language operations, finding mechanisms of parallelizing it, increasing the robustness and performance by generating equivalent low level code. We are working together with a group at Ohio State University on this. The type inference engine is done, now we need to use the type information to call the appropriate C library routines before generating C output.

This semester I am going to be working with Stratego to do some parse tree optimizations. Currently I am working on SSA renaming, I should have a public link to this project soon. 

I got to attend the supercomputing conference SC05 at Seattle in November 2005. I saw some similar work and research in the areas of parallelizing matlab and generating C/fortran code etc by MIT [StarP, pMatlab] and Mathworks [Matlab using MPI].  I also saw Bill Gates finally, with 5000+ other people when he delivered the keynote speech.

Besides this, I have finally got accustomed to the winters here. During the winter break I went to California and Nevada, aah the heat never felt so good. I met this 17 year old kid who told me in a conversation that his dad had won 4.7 million dollars on a slot machine in the casino next block. Ever since then, there has been a very similar dream that I have been dreaming over and over again[days and nights].

I am in the 2nd week of the spring semester. I have taken Computation Complexity, Introduction to Applied Logic, Recursion Theory [Math Department] and Practical Compiling for Modern Machines this semester. I am excited about learning a lot of this stuff, Computability, decidability, P-NP hard, Godel's incompleteness theorem etc. My courses are a little heavy on the theory side, but that is what I am here for :)

Saturday, January 21, 2006 4:01:46 PM (US Eastern Standard Time, UTC-05:00)  #    Comments [0]Trackback
 Thursday, January 12, 2006

                I finally decided to build the mini kanren system in ruby for one of my class assignments. I have uploaded the code here.  My implementation does a run* always, so for

               a divergent case the run will always diverge giving no results. There is no provision for run1, run2,..., runn etc to get n values. I have kept the code similar to the

               scheme version as far as possible. Surprisingly, it wasn’t very difficult.

 

                Roshan has a comega version.

Thursday, January 12, 2006 9:11:03 PM (US Eastern Standard Time, UTC-05:00)  #    Comments [2]Trackback
 Sunday, September 11, 2005

Spent the weekend doing my scheme assignment. More precisely spent most of the weekend thinking about how to write a macro for letrec. No clean solutions yet.

However, I see that there is a class of problems that need *something* extra to be solved. Its all guesswork at this stage, so I could be totally off the mark.
Here's a simple problem.


(let ([a 5] [b a]) ..)

A let* or a nested let will make the above assignments work by making a visible to b.  The sequential approach would require a to be defined before b or b to be within a's scope.

(let ([a 5])
    (let ([b a])
       .....
))


This would probably solve the above problem.
Now, how about


(let ([a b] [b "B"]) ...)
   
In (letrec ([x1 v1][x2 v2]...[xn vn])How can you ensure that all x's can see other x's?
In scheme, my guess is that this is implemented as a function [How? Dont arguments need to be evaluated then?]

An attempt to write this as a macro,
without using any side-effecting operations will prove the need for some kind of a parent structure that embeds all the variables and passes the structure around for each assignment. This problem led me to the discovery of  (1) and (2).  While the first url is very readable, the 2nd one is more complete and much less readable.

I keep trying to shut out the imperative part of my brain, How would you do this functionally?

Sunday, September 11, 2005 5:00:48 PM (US Eastern Standard Time, UTC-05:00)  #    Comments [20]Trackback
 Wednesday, September 07, 2005

If you are looking to buy a gift for a geek, then you may want to look at thinkgeek.
I like the digital photo frame where you can connect a photo frame to the usb port of your computer and copy upto 10 pictures and then start a slide show on the frame. That frame will look good in my living room, just that the price $434 doesn't look too good to me. The idea is pretty neat though.

Talking about ideas who would ever think of an internet urinal?! A geek of course.

Wednesday, September 07, 2005 8:28:06 PM (US Eastern Standard Time, UTC-05:00)  #    Comments [3]Trackback