Sunday, December 30, 2007

Life at 130 KM/h

Well, I am back from Khajuraho. Expect pix soon :)

In the meantime I went to our ancestral village, prayed at a shrine to my family's ancestors.
shrine

And met my distant relatives (this certainly helped:)
cousin tree
(Yes Photo Bucket :D Although Image Shack is probably better suited to this sort of stuff...)

What was fun was, on the way back we drove home via the Greater Noida Expressway. This road is pretty amazing for an Indian road. More than 20 km long, it is a 6 lane road connecting Noida to Greater Noida. I was able to reach speeds of 130 KM/h easily on the road in my Honda City, the fastest I have gone in my car since I bought it a year ago.

What else is new? DSLinux :D

Tuesday, December 25, 2007

Creating a Feed for TSLRP uding Yahoo Pipes

It all started with iGoogle. I wanted not to have so many tabs on screen, so I added iGoogle. I managed to find a Yahoo Mail and a Hotmail gadget. They didn't refresh on their own but Firefox's auto-reload fixed that.

I have been waiting for a while now for Team-Gizka to come out with a release of their mod for KOTOR II. This is called The Sith Lords Restoration Project or TSLRP. I got tired of watching their front page, so I decided to create a mashup of their latest version and its changelog using Yahoo Pipes

Pipes is really cool and easy to use, but filled with a host of bugs/annoyances.
  1. For some reason, the thingie insists on converting any and all output to well formed HTML - even if you dont want that. So if you remove a <div> tag, they will hide the </div> tag even from the source of the HTML output
  2. However, they fail to do this properly for invoking one pipe from another, so when you try to pass data to another pipe, the result fails.
  3. They dont allow selecting one item from a feed and passing it to a string function (or maybe I need to do more research :) ). Which means this sort of stuff requires another pipe to be created and called.
You can see the results of my labors here. The pipe is a union of the current version from this page and the mantis changelog for that version from this page.

I mentioned pipes is really easy and cool to use. They have nice samples which can be viewed by clicking the ? button on a component. They also have the idea of operators (which work on every entry in a feed) and functions (which work on a single string).

A little knowledge of regular expressions will help you a long way. Also, with the operator varint of regular expressions, there are some additional options, which are explained here (Flex!!)

By the way the operator version of regular expressions has a really strange behavior. Fighting with it probably was what kept me working on this for the longest time.

As an example: The text I got from the TSLRP home page was:

<div class="announce" align="center" style="font-size:80%;">
<a rel="nofollow" target="_blank" href="http://forums.team-gizka.org/viewtopic.php?t=670"><b>Current Build</b></a>: <b>
0.9b1</b></div>

Logically, the following should match it:


^<[^>]*>\s*\n*\s*<[^>]*><b>[^<]*</b></a>[^<]*<b>\s*\n*\s*([^<]*)</b></div>


It did match it for the String function regex, but when the operator version is applied, what does match it is:


^<[^>]*>\s*\n*\s*<[^>]*><b>[^<]*</b></a>[^<]*<b>\s*\n*\s*([^<]*)</b>

So it doesn't even recognize the </div> at the end... Go figure...

Lastly, when not viewed in a feed, the pipe output is stripped of source HTML tags, so you probably want to render it as RSS not as normal, otherwise it looks really bad.

You can see all my pipes here. Updated (01/20/2008): Or here.

Running Firefox 3 and Firefox 2 simultaneously

Well I usually have a ton of tabs open on my Firefox. One of the sad things I found on trying to upgrade to Firefox 3 Beta 2 was that most of my extensions just stopped working.

So I decided to stay with Firefox 2 as my main browser, till at least Tab Mix Plus starts working.

The problems I found ere:
  1. Running Firefox 2 while 3 was running or vice versa would open another window in the currently running version.
  2. Running one after the other would clear all my cookies in the case of the downgrade (i.e. 3 --> 2) and force reload all the pages (as it does after a crash) i.e. a HUGE waste of time
So I looked for a bit of help, and did the following things:
  1. Started the profile manager and created a new profile for Firefox 3, "f3"
  2. Since the profile manager does not allow copy profile and I wanted all my settings to go to Firefox 3 with me, I copied all the data from the Firefox 2 profile ("default") to f3.
On Windows, this can be found in %USERPROFILE%\Application Data\Mozilla\Firefox\Profiles

The profile folder name is random, the extension is the actual name of the profile. BTW, the same folders exist in %USERPROFILE%\Local Settings\Application Data\Mozilla\Firefox\Profiles also, but these are used for the disk cache.

Now to the running part. The issue is, once you select a profile with the profile manager, both versions will use it. So, what you have to do is pass the profile name to Firefox as well as a flag telling it to allow multiple instances. With a little help from the Firefox KB, I altered my Firefox shortcuts to say the following:

Firefox 3:
"E:\Program Files\Mozilla Firefox 3 Beta 2\firefox.exe" -P f3 -no-remote

and

Firefox 2:
"E:\Program Files\Mozilla Firefox\firefox.exe" -P default -no-remote

Friday, December 21, 2007

IEEE Paper

Well, thanks to BC, you can now view my IEEE paper without having to pay for it :)

I got one review for it already: looks like a fake paper generated via this site... Thanks Kinshuk!

LinkedIn is a really cool tool... I spent a few hours recently updating my profile. Funny thing is, my profile is higher on Google search for my older company's name than the India office's website! (The actual position of the India office's site varies as per the number of job consultants they have currently hired) Update 07th May 2009 - With Google preparing to shut down Pages, I had to move the file to FileDropper from its old location. You can access it from there, for now at least!

Facebook and Adobe

How are Facebook and Adobe linked? Well I dont know :) But the purpose of this post is to inform the uninformed that I am now working at Adobe India (Noida). Wow... I have been keeping this a secret for the last 6 weeks since I resigned from Contata...

In other news, I am now on Facebook :) You know what I have spent the maximum time on at that site till now? Blocking various things and setting up privacy options... Yuck

Monday, December 17, 2007

OpenID and Yadis on Google Apps

Well I was reading up on how to easily set up OpenID on your blog or webpage via delegates. And I do happen to have an AOL ID lying around :) Considering that your AOL account can easily be your Open ID, I decided to set up www.vashisht.net as my own OpenID...

Problem no.1: Google Page Creator does not allow edit HTML. So... Create a basic HTML file and upload it. Then remove the HTML part of the name to make it look cleaner :)

Step 2: Upload a Yardis XRDF file so that I can actually log in

Step 3: Test via www.openidenabled.com... Success!!

Note that the way to construct the AOL Delegate URLs is a bit confusing: You have to replace the "screenname" in the delegate URL with your AOL ID but the not the one in the server URL...
<link rel="openid.server" href="https://api.screenname.aol.com/auth/openidServer">
<link rel="openid.delegate" href="http://openid.aol.com/ashishv1982">

One last step left, I have to enable comment via OpenID in my Blogger Options Pane and I am all set!