Planet LDTP

August 20, 2008

Prashanth Mohan

MIT's Technology Review releases TR35

Cover of Technology Review January 2007
Image courtesy of Wikipedia

MIT's Technology Review is an amazing newsletter to keep track of the latest in science. Every year TR releases a set of 35 young innovators who are busy changing the world. TR just released this year's offering which includes - Adam Smith (of Xobni fame), Dries Buytaert (of Drupal fame) and Jack Dorsey (of Twitter fame). The list also includes people from other interesting projects including an electronic nose to sniff cancer, a compiler to convert sequential C++ into a parallel program and even a project that can efficiently convert vehicle exhaust into usable power!

Technorati Tags: ,,

by Prashanth (noreply@blogger.com) at August 20, 2008 09:00 AM

Dobey

GNOME Summit, Calendar Widget

The Boston Summit is getting closer every day. The list of attendees is still fairly short though. But if you know you're going, add yourself to the list, and help another hacker make it to town, by booking your tickets and hotel stay on this site. You might even be able to find good weekend deals for the entire weekend, for what a single plane ticket could cost. Or if you're going to any other events, or just taking a trip, please book through this site as well. Much thanks to anyone who does.

In other news, I've gotten the basic drawing bits done for the month view of a nice MVC calendar application widget, done. I started working on it a couple days ago, and so far only have about 600 LOC, including the demo app code, to get what's in the screenshot below. Just a little bit more work, and it should be usable as the month view in an actual calendar app. This is just the beginning to some other stuff that I would like to work on, but don't really have the time, and can't afford to do, right now.


August 20, 2008 03:08 AM

August 19, 2008

sp2hari

Warning!!!

Check this warning I found in the book Programming Pearls. Really nice one too.
Warning

Related Posts

  • No Related Post

by sp2hari at August 19, 2008 10:59 AM

Prashanth Mohan

Madras... namadhu madras

Madras Central Railway Station, 1925 Current day Madras Central Railway Station

Images via Wikipedia

Chennai or more fondly known as the erstwhile Madras holds a special place in the hearts of millions. I grew up all my life in Madras. All throuch school and college; probably the most joyful of the years I am going to experience. Madras with it's own unique variant of tamizh (the only variant I am comfortable with for that matter), with its sweltering heat, with its unwavering affection for onscreen idols, with its many beaches and a legacy that spans multiple centuries.

I came across this interesting concept called a "State Day" in Bangalore. This was a way of celebrating the state's formation or in simpler words - the state's Birthday! And even more recently I happened to chance upon a similar concept for Madras!

The founding day of Madras

is considered to be August 22, 1639. It was on that day, in that year, that a sliver of land, where Fort. St. George stands today, was transacted by the East India Company. The deal was struck by Francis Day, his 'dubash' Beri Thimmappa, and their superior, Andrew Cogan, with the local Nayak rulers. It is believed that this deal was made on August 22, 1639.

Out of the fort, grew settlements. Then the villages around it were brought together.
And then, the old and new towns linked up. And then we had the city.

Today, Chennai stands tall for a variety of reasons. Education, healthcare, IT, history, tourism, auto industries, movies, etc. And yes, it also has its warts. Madras Day celebrates the city.

[Source: 2007 Madras Day website]

There appears to be an extensive collection of events and activities planned to be conducted on Madras Day. I would really have liked to join on the nature walk (Details on http://www.kutcheribuzz.com/themadrasday/heritagewalks.htm) if not for an exam on the same day. But I do hope you will get to enjoy Madras Day.

Technorati Tags: ,,

by Prashanth (noreply@blogger.com) at August 19, 2008 09:43 AM

August 18, 2008

Yong Sun

Using Gnu-iconv on Solaris and OpenSolaris

Gnu-iconv supports more encoding conversions and provides better performances for some conversions over the Solaris-iconv. E.g., currently, Solaris-iconv does not support the conversions between GB18030 and UCS-2BE, UCS-4LE/BE, UTF-16LE/BE; and the conversions of GB18030<->UTF-8 (UCS-2LE) in Gnu-iconv is two times faster. And Gnu-iconv has a star-shaped structure with some exceptions, which uses UCS-4 as the intermediary encoding. While Solaris-iconv has a peer-2-peer structure (with alias), it's really painful to add a new encoding.

So, you may want to use Gnu-iconv library. For Solaris 10/Nevada, you could download&install gnu-libiconv from www.sunfreeware.com,  for opensolaris, you could install SUNWgnu-libiconv from pkg.opensolaris.org,  but the OS.o package does not contain the header files.

You may notice that, the function symboles in gnu-libiconv, had been added the prefix of "lib", e.g., iconv_open -> libiconv_open. So, LD_PRELOAD and RUNPATH are not sufficient for replacing iconv(3) routines in libc. You need to make sure to include the "iconv.h" from gnu-libiconv.



和Solaris的iconv相比较,Gnu-iconv支持更多的编码转换,并且在某些编码转换上有更好的性能。例如,目前Solaris-iconv不支持从GB18030到UCS-2BE、UCS-4LE/BE和UTF-16LE/BE之间的转换;而GB18030<->UTF-8 (UCS-2LE)在Gnu-iconv中的转换速度,是Solaris-iconv的两倍。并且Gnu-iconv是一种星型结构(也有某些点到点的例外情况),它使用UCS-4作为中间转换的介质。而Solaris-iconv是一种点到点的结构(支持别名),因此添加一个新的编码实在是有些痛苦。

因此,你可能希望使用Gnu-iconv程序库。对Solaris 10/Nevada来说,你可以从www.sunfreeware.com下载并安装gnu-libiconv,对opensolaris你可以用pkg(1)从pkg.opensolaris.org上安装SUNWgnu-libiconv的程序包,不过这个包没有包括头文件。

你可能已经注意到了,gnu-libiconv中的符号名,都被加上了"lib"的前缀,例如iconv_open->libiconv_open。因此LD_PRELOAD和RUNPATH并不能替换libc中的iconv(3)调用。你必须确保include gnu-libiconv中的"iconv.h"头文件。

by yongsun at August 18, 2008 11:09 AM

August 17, 2008

Kartik Mistry

Linux adoption is growing..


* Auto-rickshaw in Ahmedabad: Powered by pollution free Compressed Natural Gas (CNG) and Free Linux.

by Kartik Mistry at August 17, 2008 08:37 AM

August 15, 2008

Kartik Mistry

Debian Lenny on Macbook


* Not much tweak needed for installation, except following lines before installing LILO:

chroot /target aptitude install refit
/target/sbin/gptsync /dev/sda

Now weekend is for other things to make them work by reading long Debian on Macbook Wiki page.

by Kartik Mistry at August 15, 2008 06:23 PM

August 14, 2008

Kartik Mistry

A Perfect Day!


* Nice atmosphere after rain of couple of days, but I am feeling so sleepy!

by Kartik Mistry at August 14, 2008 10:06 AM

Prashanth Mohan

An illustrated guide to Dan Kamnisky's DNS vulnerability

I had planned to write a dumbed down explanation of Dan Kaminsky's DNS vulnerability. However I never quite got down to it. And then I came across this -- "An Illustrated Guide to the Kaminsky DNS Vulnerability". This guide probably does a better job at explaining the vulnerability than I ever could. I would highly recommend reading this summary!

Technorati Tags: ,,

by Prashanth (noreply@blogger.com) at August 14, 2008 08:57 AM

Dobey

Recent Hacks

Today, I ended up getting a few hacks committed to SVN, and got a mostly working patch against leafpad together, to make it use GIO for file I/O. I fixed Beef to check the Last-Modified header using a HEAD request, for subscribed feeds, and got rid of the previous check to see if an update should be pulled. The previous method was just a timeout that checked against the last timestamp the update loop was run, to see if a specific feed needed to be updated. It worked okay, until I started subscribing to more feeds, and having the daemon restart, as all the feeds would just end up having very close timestamps for their last update time. Now, Beef compares the Last-Modified header, and stores that value instead. Recently, I had also ported Beef over to GIO, from gnome-vfs, for the case where embedded content might be pulled from a different protocol than HTTP(S). I also got rid of gnome-vfs in gtkhtml2's testgtkhtml program, replacing it with libsoup and GIO, at the same time. Today, though, I also committed the changes to make Encompass use GIO instead of gnome-vfs for loading data on protocols other than HTTP(S). This was a bit more work than the previous two patches, as I was using gnome_vfs_get_mime_type() to check the MIME type for URIs, so that I didn't end up streaming an exe into the HTML view. But GIO/glib doesn't have an exact replica of that functionality, so I had to end up writing a method using libsoup to check the content type. It works by requesting the first 1024 bytes of data from the server, and using that for the magic comparison with the GConentType API. It also checks the Content-Type header, and falls back to application/octet-stream on error. It's nice to click on a PDF and have it just open right up in Evince. I also haven't got the code together yet, but it will be extremely simple to pop up a dialog for RSS/ATOM feeds, so that the user can just subscribe to them.

As far as leafpad goes, I like very much how lightweight it is, and really wanted to be able to just click on patch files in the browser, and have them open right up in it. But, leafpad wasn't using GIO or gnome-vfs. And the text/plain handler that does support opening from URIs, which gets called, happened to be OpenOffice.org. Quite a bit much for just opening a small text file. I also don't seem to be able to find where the source repository for leafpad is, if there even is one. So, I took to using the tarball to create the patch. It's not a complete patch, but it does get the job done. I can open files remotely, and save to remote as well, though there does seem to be an issue with saving large files. I think there might be a bug in GIO (my sftp mount disappears off my desktop), but I'm not sure exactly, and haven't spent any time debugging it really. But here's a screenshot of www.gnome.org opened in leafpad using GIO:


August 14, 2008 02:10 AM

August 13, 2008

Shreyank Gupta

Stream of Thoughts

Just gave Scrubs Season 3 DVD to Nitin to copy it for me into my pen drive, because its getting stuck in my DVD drive. Episode 1 was running good, it stuck somewhere in episode 2. I hope he is not having problems copying or else I will have to look in the LAN again, which will be tough considering the fact that my linuxdcpp client is crashing all the time, and I am having trouble installing the valknut client Debayan and Vignesh are using as its not there in the Mandriva repositories.

Scrubs Season two was good. I finished the entire thing in one night, except that in between I had to work on some bugs that my last work on ooldtp support for ldtpeditor had. Getting rid of the bugs were harder than implementing the feature. Its now fixed in GIT.

I have also applied for developer of LDTP to freedesktop.org. Hope it gets approved soon.

Speaking of getting approved Prateek Dayal wrote a great blogabout our Muziboo App not getting approved by Orkut.

Just one another Feature to implement in ldtpeditor after which I will move on to either Mono or the Red Hat Internship. Hope those will help me in getting a better job.

As for college placements, I don't think I will be studying for any companies considering the fact that most good companies are either getting canceled or postponed due to some reason or the other.

Tomorrow we will go to S.N. Sarkar our "Professor and Head, Training, Placement and Student Welfare" as he likes to be known to "talk" about the bad placement of CSE, IT and MCA Departments, but I don't think anything good will come out of it.

In any case, I will go back home tomorrow as its been a long and disppointing (in most ways) stay out here. There is a three day weekend with Independance Day tomorrow, so I will be back this Sunday.

I was terribly homesick, sad and depressed Yesternight, mainly because it was my friend's birthday back home, and I had no idea what I was doing here in college, as everyone of my colony friend circle was enjoying. Very childish and immature but that's that. My apologies to everybody with whom I was rude or ignored.

I really hope that the Linux InstallFest we are planning come out good, as most people are having apprehensions, not that its bad as it does help in bringing out the flaws and avoiding them, thus helping into a better InstallFest.

Episode 2 is not getting copied so I guess I will have to look somewhere for it.

by noreply@blogger.com ($hRiNk) at August 13, 2008 08:23 PM

Prashanth Mohan

Moved to Blogger

Hello Folks! Apologies with the messed up feed from my blog annoyed you through last week. My blog host was going down (A friend who used to host my blog on his server for _free_). I had to look for a fresh host, and WordPress.com was the natural choice; but, it required for me to pay for enabling custom domains. Also, coming from a self hosted WordPress installation, the WordPress.com solution seemed highly limiting. Thus the move to blogger which supported Custom Domains, AdSense, ability to edit the template, etc. Those of you subscribed to my feed need not worry. You are most probably subscribed to my FeedBurner feed which will remain unchanged through the migration.

Blogger is no where quite as flexible as a self hosted WordPress installation. But it looks like I have to make do with that till I actually decide to shell out $$ to a web host.

One problem with Blogger is that it doesn't support importing posts from other blogs. Hence, I had to write a script to submit each post from my WordPress blog to my Blogger blog. This was the reason, the feed got screwed. It would have shown all my posts till date as a new post on the blog. Also, Blogger has a limit of 50 posts per day meaning that I had to do the migration over multiple days; all through which you had to endure with my messed up feed.

My apologies once again for the screw up. I will post my “WordPress to Blogger” migration script in a future post. Adios!

Technorati Tags: ,

by Prashanth (noreply@blogger.com) at August 13, 2008 12:27 PM

Shreyank Gupta

August 12, 2008

Ara Pulido

Getting information from labels


In the previous post we talked about the difficulties when trying to recognize widgets through its accessibility information. If normally is a pain, it can certainly be worse when dealing with labels.

Labels text does not only change their text when the language is changed, but they can change their text in different states of the application work flow. Let’s imagine that an application uses the same label to show error messages to the user (very common scenario). If the label does not have correctly set its ‘name’ in the accessibility information (very very common scenario), then the name of the label will be the current text of the label, and our test script won’t be able to gather errors or any other information from these labels.

If the text of the label has some kind of structure, though, some of this information can be retrieved, using regular expressions to search for common patterns, for example, if error messages always start with the text ‘Error:’ we could get the rest of the text of the label to obtain the error message.

For Ubuntu we are using some of these “pattern” labels to get some useful information from the applications. In the update-manager a label with the pattern “You can install n updates.”, is shown every time at least one update is available, where n is the number of available updates. The method number_udpates, part of the Ubuntu testing library, scans the available labels for that pattern and returns the number of available updates. Anyone wanting to write a test for update-manager can use this and any other available method in his or her test script.

by Ara Pulido at August 12, 2008 02:25 PM

Yong Sun

C++ exceptions and shared objects

In many application systems, shared objects are loaded as sub-modules via dlopen(3C). In case it's written by C++, you need to be careful about throwing exceptions. The client may try unload this module (by dlclose(3C)) in exception handling block, so that the application may crash when C++ runtime routines try to clean the exception (by calling its destructor) before leaving current catching function. In practice, exception class is usually defined in header file, so that its code body maybe included both in app and sub-module. Even in this case, linker or loader may choose the copy in sub-module. (E.g., the -Bdirect flag of ld(1)).

The conclusion is, do not unload a shared object when catching an exception thrown from it, or not to throw exceptions from a shared object. This is the root cause that SCIM x11 frontend would crash for the 2nd launching.

by yongsun at August 12, 2008 09:00 AM

SunPinyin Code Tour (6)

6. Using the generated language model

In previous step, we generated the threaded language model. The next question is how to use this model? Let's look at the header file of CThreadSlm class, slm.h, here are the public methods:

  1. load(): Load the language model to memory
  2. free(): Release the memory allocated for the language model
  3. isUseLogPr(): If the language model use log values for probabilities
  4. transfer(history, wid, result): By given a word id wid, transfer from history state (history) to new state (result), and return P(wid|history).
  5. transferNegLog(history, wid, result): Similar with above method, but returns -log(p(wid|history).
  6. history_state_of(st): Get the h' of st, and return.
  7. historify(st): Set st to its h'.
  8. lastWordId(st): Return the last word id of state st. Assuming st is (lvl, idx), if lvl>=N, then return m_Levels[N][idx]; if 0<lvl<N, return m_level[lvl][idx]; if level==0 and idx==0, return the word id on pseudo root (i.e., 0), if idx>0 just return idx (we will discuss this situation when introducing history cache.

Now, let's look at slmseg to see how to searching by leveraging CThreadSlm class.

$ make slmids3
./slmseg -d ../raw/dict.utf8 -f bin -s 10 -m ../data/lm_sc.t3g ../raw/corpus.utf8 >../swap/lm_sc.ids

The source code of slmseg/slmseg.cpp:

struct TLatticeWord {
  int m_left;
  int m_right;   //[m_left, m_right) is the index range on lattice for this word
  int m_wordId;  //word id
};

struct TLatticeStateValue{
  double             m_pr;       //the probability on this state node
  TLatticeWord*      mp_btword;  //the back-trace word, i.e., the given word causing the transformation
  CThreadSlm::TState m_btstate;  //the back-trace state, i.e., where the current state comes from
};

/* The mapping of SLM state node, and its Lattice state information */
typedef std::map<CThreadSlm::TState, TLatticeStateValue> TLatticeColumnStates;

/* represent a column of lattice */
struct TLatticeColumn {
  TLatticeWordVec m_wordstarting;  //
The words starting from this column, these are actually the input words when expending this column,
                                   //the newly transferred state node, located at lattice[word.m_right].
  TLatticeColumnStates m_states;   //the SLM state nodes and their corresponding Lattice states
};

processSingleFile():

Read the corpus sentence by sentence. For each sentence, call buildLattice() to build the searching lattice, and call searchBest() to search on the lattice, and get the best segmentation by getBestPath(), and call output() to write out the best segmentation.

buildLattice(sentence, lattice):

Set the SLM state on lattice[0] as pseudo root. Initialize i as 0, perform FMM for sntnc[i..n], get the word length -- len. And call getAmbiLen() to get the length of maximum length of crossing-ambiguities -- ambilen. If ambilen <= len, then there is no crossing-ambiguities, then call insertLatticeWord() to insert ([i, i+len), Wid) to the word list of lattice[i]; set i=i+len, continue the loop. If there is crossing-ambiguities, call fullSegbuildLattice() to perform a full segmentation for sub-sentence sntnc[i..i+ambilen), for all segmented words (including all single-character word), assuming one's location is [left, right), insert it to lattice[left]; and set i=i+ambilen, continue the loop. After the iteration is done, add an end-of-sentence id (we use "。" for this id in following examples) at the end.

Use the example in section 2,

Perform the FMM for this sample sentence, the first word we get is "发扬", and no ambiguity, so insert "发扬" to lattice[0]. Then i=2, continue the loop. The FMM result is "为人民", but the ambilen is 6, so we need perform full segmentation for sntnc[2..7]. Insert all possible segments on idx (2<=idx<7) to latttice[idx]. Then i=2+6=8, continue the loop. The FMM result is "的", and no ambiguity. Then i=9, the FMM result is "精神" and no ambiguity. After the loop is finished, add an end-of-sentence ID at the tail. We could see, there is no word on lattice[1], and the words on lattice[2] are "为", "为人", and "为人民". And so on...

searchBest(lattice):

Iterate the lattice from 0. For all lattice state nodes on lattcie[i], use the words starting from this lattice ([left, right), Wid) to expand, save the newly transferred state node h' (CThreadSlm::historify(his)) to lattice[word.m_right].m_states. Note, given a word D, two different state nodes (A, C) and (B, C) may result in the same h' (i.e., (C, D)), so we only need to keep the path who has bigger probability.


Let's start from lattice[0], we have set it as pseudo root (0, 0) in buildLatice() method. There is only one word on lattice[0], "发扬"; call CThreadSlm::trnasferNegLog((0,0), wid_of("发扬")), get the new SLM state node and the probability P("发扬"), save its h' (lvl=1, idx) and its lattice state information (probability and back-trace information) to lattice[2]. Then look at lattice[1], there is no state node to be expanded. Then going forward to lattice[2], there is one state node, and three words ("为", "为人", "为人民"), save the newly transferred three nodes to lattice[3], lattice[4] and lattice[5]. And so on...

This is a dynamic programming problem, and what we used here is Viterbi Lattice algorithm.

getBestPath(lattice, segResult):

From end to start, back-trace the lattice, save the word id on best path to segResult. By reversing segResult, we got the best segmentation. For our example, it's the blue path on above figure.

by yongsun at August 12, 2008 03:38 AM

August 11, 2008

Kartik Mistry

August 10, 2008

Shreyank Gupta

ooldtp with scrubs

tanmaya gave me all four seasons of scrubs on four dvds, and because the season 1 dvd wasn't reading, i decided to download the lot from lan.

also it had turned out once again how futile studying was, so i got back to my ldtp work, latest being adding ooldtp support to ldtpeditor.

but then i had 24 episodes! (ofcourse there would be more but i thought i'd aim for completing the season 1 first). episode 1 was interesting, the whole concept and the humour, i saw episode 2 as well. thats all for now!

then i talked to nagappan, he had just once mentioned ooldtp and i had procrastinated saying that i had novell to prepare for... and no, i am not going into crying how futile studying for novell was again. so nagappan mentioned what was to be done and he also suggested some string formatting changes to be done, which i targeted to do that night itself.

but before that episode 3, 4, 5... scrubs was awesome.

at 5 am i sat with the formatting, it was done within minutes, but i didn't sleep that night... slept after having breakfast and attending two early morning classes.

next came episodes 6, 7, 8, 9, 10, ...

nagappan pings that he had committed the string formatting changes to the CGIT. so i say to myself, thats enough... lets start with ooldtp now.I checked out the new code at GIT, the changes are not there, he must have made a mistake... so i mailed him, he replies he forgot to push the code back to origin (whatever that meant) so i had half a day until he did that.

episodes 11, 12.... 12 again... so sorry the last episode was episode 22... my mistake.... so now 13, 14, 15, 16, 17, 18.... hey its melodramatic as well!

nagappan replied that its done now so on with the work. this time i started with the gui first and then moved on to the implementation. it was showing some errors and it was early morning.. so i went on to...

19, 20, 21 ...ZZZzzzz....

sat down again with it that evening... it was working but then nagappan said it wasn't sufficient...(window contexts needed to be created only once for each window and not again and again, which was fair enough as it spoiled the whole purpose of using ooldtp) so i did what was necessary.... fixed all errors... the patch was ready and i mailed it...

episode 22... oh i had seen this before.... 23, 24. wow, what a season finale for a comedy. can't wait to start season 2...

filed for another enhancement that will allow ldtpeditor to save user preferences in a local file so that they don't have to be selected again and again(frankly i was quite tired of checking "generate ooldtp script" in the preferences dialog again and again. looking forward to implementing that as well! soon...

p.s. the caps-lock key of my keyboard is not working, and i am too lazy to use the shift keys. (ok, i'm too lazy for the caps-lock too) ;)

by noreply@blogger.com ($hRiNk) at August 10, 2008 03:19 PM

August 09, 2008

sp2hari

Clueless…

The title says it all. In fact, it is so apt for this post.

I post a letter to my friend. It is lost. So simple. The letter is gone now. Simply gone. :( :( :(

There are few times when you do everything perfect and at the end fate just smiles at you and makes you forget the meaning of the word perfect. Hmmmm, this is one of those :(. I simply hate Indian Postal Service for screwing things up and myself for posting that letter.

Anyway, now I can’t do anything else. Just have to forget this.

Murphy is god. :)

Related Posts

by sp2hari at August 09, 2008 09:06 AM

August 08, 2008

Yong Sun

完美中的小小遗憾



总体来说,北京奥运会的开幕式很完美,一开始有些拙劣的山水画作,在中途由孩子们添上了色彩和活力(特别是太阳变笑脸的细节),再最后由各国运动员的脚踩踏出绚烂的彩虹,的确是很好的创意。主题曲节奏悠缓,但是给人的印象不深,未能使人过耳不忘。中国代表团入场的时候,我一直期待姚明会将四川的那个小朋友抱起来放到肩膀上,不过未能看到。另外关于主火炬点燃,我本来猜想会是由海峡两岸三地的中国运动员共同点燃,那样也许更有意义且震撼人心。李宁空中跑动的姿态很潇洒,只是最后点燃的当口不知什么原因停顿了一小段时间。

中国,加油!北京,加油!!

by yongsun at August 08, 2008 04:36 PM

Prashanth Mohan

August 07, 2008

Ara Pulido

Accessibility (lack-of) information


One of the main issues when getting information from the AT-SPI layer is that most of the accessibility information is missing. Names are almost never set, therefore, objects take the name of the current text.

This is something generally painful, as tests will need to be localized for each language. Let’s imagine that we have a form called “Update Manager”, then the object would be frmUpdatemanager. If we change the target system language, let’s say, to Spanish, then the window will be named “Gestor de Actualizaciones”, and the accessibility information in this case would be frmGestordeactualizaciones.

As I wrote in my previous post, we are trying to separate as much as possible this kind of information from the scripts code. Apart from having classes for the common activities with applications, the text in windows, buttons, etc. is maintained in a separate file, ubuntu_constants.py that will be, eventually, the only file to be changed when porting the tests to a different language.

by Ara Pulido at August 07, 2008 03:24 PM

August 06, 2008

Kartik Mistry

I AM DD now!


* I think it will take time to have updated status on my NM status page but I can’t resist myself because,

- kartik@debian.org works

- I updated db.debian.org

- Added uid in my GPG key and synchronized it with Debian Keyserver

- Updated Developers location

So, in short, all these things means:

I AM DD NOW!

Many thanks to My family (Koki, Mom, Papa, brother Rinit and Little Kavin for supporting and encouraging me during this long journey), Jaldhar Vyas for advocating my application, my AM Mohammed Adnène Trojette (adn), all kind and helpful sponsors of my n number of packages (jaldhar, mones, adn, daniel (special thanks for number of uploads), pabs, joeyh for Festival upload, rkrishnan, acid, tolimar, twerner, bubulle, nijel, bernat, marillat, akumar, hertzog and finally gwolf).

Special mention and thanks to bubulle and sam - for coming down and having nice meet at BLR during foss.in/2007, that gave my power back to continue my work when I was frustrated with certain situations.

Another special thanks to dear friends - nirav, pradeepto, tuxmaniac and atul chitnis for always encouraging me for my Debian work.

In short, you all people rocks!

Now, what next?

I will keep continue doing my packging work as it is, I have plan to get involve more in near future, but as of now - I first need give time and focus RC bugs for Lenny :P

by Kartik Mistry at August 06, 2008 05:58 PM

Prashanth Mohan

Catch me if you can

Heh, I searched for "Microsoft" on cuil.com and this is one of the search results :-).

For those of you who don't realise it, cuil.com shows the picture of Bill Gates arrested for over speeding (back when he just started Microsoft) against the Microsoft Research website.

by Prashanth (noreply@blogger.com) at August 06, 2008 06:05 PM

Boss is watching

Just noticed the "Boss is watching" link on http://redbus.in/ (right under the search button). Hilarious!

by Prashanth (noreply@blogger.com) at August 06, 2008 06:05 PM

Talk on org-mode

Talk on the fantastic GTD software org-mode (for Emacs) by it's creator Carsten Dominik. Although org-mode is a fantastic GTD software, I use it mainly for it's tabular mode (and spreadsheet).

by Prashanth (noreply@blogger.com) at August 06, 2008 06:05 PM

ZSH for productivity

.csharpcode, .csharpcode pre
{
font-size: small;
color: black;
font-family: consolas, "Courier New", courier, monospace;
background-color: #ffffff;
/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }

ZSH is a very powerful unix shell. Its over a year now that I started using ZSH over Bash. So, you might ask what kind of innovation and additional usability can a shell really provide. Well ZSH has a number of distinct advantages associated with it. Some of them are:

  1. Extremely compatible with bash - If you are coming from a bash background this is going to be very important
  2. Spell Correct - Who would have thought how much good spell correction for commentsands could bring
  3. Advanced Tab Completion - ZSH has very very intelligent tab completion. Even more so than you get when you install bash-completion. When there is ambiguity, it shows you a list of possible options to a commentsand. Yes, you read it right, it even prompts and autocompletes options for commentsands
  4. More Regex - ZSH has more powerful globbing features. This is a feature I should learn to use more frequently
  5. Faster - All completion data is stored in hashes, and work extremely fast
  6. Multiple Prompts - Ok this might not be touted as a huge advantage, but the availability of a Prompt on both the left and right side of the screen is extremely useful for me. The Prompts in ZSH are so powerful that an entire blog post has been dedicated to customizing this
  7. And a lot more that I haven't explored yet

My .zshrc file is uploaded to http://prashblog.com/files/.zshrc. I will discuss only relevant parts of the configuration in this blog. On your crusade to perfect your shell configuration, I encourage you to check out http://www.dotfiles.com/index.php?app_id=4 which contains numerous user uploaded configuration files.

Tab Completion

The most significant feature of ZSH is it's superior tab completion. This can be enabled in zsh by adding the following lines to your ~/.zshrc file:

autoload -U compinit
compinit


You would also want to additionally format the completion prompts to your satisfaction. This can be done by using the zstyle commentsand. For instance you might want to enable the description to the expanded options, for this you could use the following zstyle statements:


zstyle ':completion:*:descriptions' format "%B---- %d%b" # Messages/warnings format
zstyle ':completion:*:messages' format '%B%U---- %d%u%b'
zstyle ':completion:*:warnings' format '%B%U---- no match for: %d%u%b' # Describe options in full
zstyle ':completion:*:options' description 'yes'
zstyle ':completion:*:options' auto-description '%d'





Pretty Prompts



I already mentioned, how much I enjoy the prompts in ZSH. ZSH has a unique RPROMPT which appears on the right most edge of the shell. To initialize a nice coloured prompt you add the following lines to your ~/.zshrc:




autoload -U promptinit
promptinit


In order to view the different types of default prompts available you can run "prompt -l". You can then run "prompt prompt-name" in order to initialize the particular prompt. However, you might want to custom tailor your prompt to your liking. I use the following for my prompt:


export PS1="${GREEN}%50<...<%~%#${white} "
export RPS1=" ${white}<%T"
export PS2="%_> "


The colour names are basically environment variable which enable the respective colours at the prompt. You can look at my ~/.zshrc for more details about using colours. I use a White text on Black background terminal. More details on how I spruce up my terminal is available on an earlier post: Cygwin tuning guide.



Key Bindings



I am a complete Emacs junkie and I can't live without the emacs bindings. Add "bindkey -e" to your ~/.zshrc to enable emacs key bindings in your zsh shell. If this isn't enough stimulant for you, ZSH also allows you build key bindings on steroids. For example, I have the following lines in my ~/.zshrc:




bindkey -s '^|l' " | less\n"                   # c-| l  pipe to less
bindkey -s '^|g' ' | grep ""^[OD' # c-| g pipe to grep
bindkey -s '^|a' " | awk '{print $}'^[OD^[OD" # c-| a pipe to awk
bindkey -s '^|s' ' | sed -e "s///g"^[OD^[OD^[OD^[OD' # c-| s pipe to sed
bindkey -s '^|w' " | wc -l\n" # c-| l pipe to less





Automatic Directory Pushing



I believe this feature is also available on bash. But that doesn't stop me from mentioning it explicitly here. Each directory you visit can automatically be added (the equivalent of pushd) to the directory stack by the shell. i.e. to go back to the previous directory you were working in, you could simply type in "popd" and voilà. To enable this feature, add the following line to your ~/.zshrc:




setopt autopushd pushdminus pushdsilent pushdtohome pushdignoredups # push directories visited automatically onto stack





Other Random Stuff



Some of the other random tweaks I use is to disable "C-s" (Ctrl + S) from disabling the shell input. In order to do this, add the following lines to ~/.zshrc:




stty stop  '^-'
stty start '^-'


You will also want to add "stty pass8 && bindkey -me" to your ~/.zshrc if you want the terminal to properly recognise your Meta (Alt) Key. If you are using Poderosa, you will also need to go to Tools —> Options –> Operation and Change the "Left Alt key" under Keyboard to "Meta Key".


Some of the good aliases and exports I picked up from the net over time are:


alias emacs-clean='find . -name "*~" -exec rm {} \; -or -name ".*~" -exec rm {} \; -or -name "\#*" -exec rm {} \; -or -name "*.pyc" -exec rm {} \;'
alias ll='ls -laFhG'
alias open="cmd /c"
export LESS="-cisFRXMWP?f%f :std in .?n?m(file %i of %m) ..?ltline %lt :byte %bB?s/%s ..?e(END) ?x- Next\: %x.:?pB%pB\%..%t"
export LESSCHARSET=utf-8





Most of the stuff in my config file has been obtained over the Internet from various other like minded souls who were willing to share their way to glory. My initial ZSH config was provided by Shastry, and I hope, this post will compel you to make changes of your own and share it with the world.


My Files:




Other good resources on ZSH config tuning are available at:

by Prashanth (noreply@blogger.com) at August 06, 2008 06:05 PM

Wordpress tag support on Windows Live Writer

I had been using Windows Live Writer for a while now and I have been quite happy with the blogging client. However, I did not see an option to set WordPress tags (tags are supported inherently in WordPress 2.3+) from WLW. After a bit of hounding the web I hit upon the answer. WLW requires a manifest file to be placed on the blog’s root directory in order to under what features the blog supports. And WordPress 2.3 did not ship with a manifest file by default. However, never fear in the Open Source industry. There is a solution to all problems!

Head over to http://trac.wordpress.org/ticket/5023 and put the manifest file (attached in the link) into your blog’s root directory and Tada! Now you can tag all your blog posts from WLW by inserting the tags into the “Keywords” field that you see by selecting View –> Properties

by Prashanth (noreply@blogger.com) at August 06, 2008 06:05 PM

Trek to Mullayangiri and Bababudhangiri

Mullayangiri (Also spelled Mullayanagiri and Mullainagiri) is reportedly the highest point in Karnataka. And off we set to conquer the peak! 5 of us from office decided to do the trek to Mullayangiri and Baba Budhangiri a couple of weekends earlier. We rented out some sleeping bags, mats and rucksacks. We found a guy (Jagadeesh, Contact No: 9901474929) who would home deliver and pickup the equipment. If you are planning to do the trek yourself, you might also consider carrying some essential first aid, a pocket knife and lots of chocolate bars. You will also need get good trekking shoes. We got some cheap Jungle boots from Russels Market in SivajiNagar, Bangalore. These shoes have amazing grip but they hurt like hell. If you want to take the cheap route, get 'em but be ready for blisters all over your feet after the trek.

So after getting all the equipment ready and reading through a barrage of blogs on trekking in Mullayangiri and refusing to heed the words of all the coworkers who warned us against going for the trek in the rainy season, we were all set up for the trek. That Friday night, all of us met at the Majestic bus stop and took the 11:30 bus from Bangalore to Chikmagalur. We got the last 5 seats on a Rajhamsa bus. So you might actually do well to book in advance. The bus took us to Chikmagalur reaching around 5:30. The hotel within the bus stand - "Nandini Palace" was the only one open at that ungodly hour and so we decided to have our breakfast there. By the time we finished our breakfast and freshening up from the last row ride on the bus, it was almost 6:30. On enquiring we found that there were no K.S.R.T.C buses to Sarpadari (the starting point of the trek) and that there were no private buses heading there until 8:30. Since we wanted to get an early start, we loaded ourselves into an Ambassador car after a bit of haggling. We paid 200 Rs for the trip from Chikmagalur bus stand to Sarpadari. And there we were finding ourselves on the way to heights!

And off we set off on the path up the slope. Make sure you carry lots of water with you. I learnt the hard way that dehydration can make you weak and hell. There is a clearly marked track that you can follow up. However, at places it is a little ambiguous as to which route to take. But, exploring a bit has it's own fun associated with it. Roughly after a one and a half hour climb we came to a Nandi Statue.


Once you have reached this point, you have almost made it to the top. The top is just a few minutes away. But don't get carried away by the craving to reach the top yet. Just before you reach the top, are a set of caves. Do  go in and explore a bit. It is pitch dark inside, so you will need torch lights. There are some really crazy designs on the walls of the cave.

Once you go further up, you will come to the temple. There are 2 cats there (who have gained quite a reputation from all the other blog posts about Mullayangiri), neither of which are scared of humans and actually pose for photographs! At the temple, we requested the temple staff for some lunch and were served hot and steaming Puliyodharai. You won't believe how tasty it was given how hungry we were. After resting there for a while and eating the sumptuous lunch, we set forth to Baba Budhangiri at around 12 noon. On enquiring with a couple of people, they said that the only way to get to Baba Budhangiri was by road. However, that held little interest to us. Upon Asking the folks at the temple, they told us to take the path behind the temple.

So off we went down the path which led from the back of the temple. This segment of the trek was a lot easier the earlier one. Filled with energy from the lunch and the determination to get to our next stop - a waterfall in an estate. We walked up and down 4 or 5 small hills. Towards the end of this segment, we saw that we were closing in on the road. And finally at the end we saw a resting place with a couple of slab seats to sit on and a picture of Swami Vivekananda. This was where we got onto the road. On enquiring with a local there, he incorrectly told us that walking along the road for about 3 kilometers we will come to Ramagiri estate, where there is a waterfall.

So off we went in search of Ramagiri Estate (although we did not know the name of the place then). We walked for almost 6 or 7 kilometers before we saw the entrance to the estate (it is about a kilometer before Attigundi). The entrance is rather inconspicuous. Look out for a gate on the left of the road as you walk down the road. The gate is bound to be locked, but there is a small gap for humans to pass by. Once you enter the estate, you can follow the winding path down at the end of which you will see the waterfall. It is a beautiful waterfall and the water is ice cold! We had a short break there feasting upon chocolate bars and dry fruits. We thought of entering the waterfall, but one step into the water was enough to dissuade us.

Now we were on the look out for shelter for the night. We had not carried tents with us, since a good number of folks had warned us about tents getting blown away in the wild winds in this season. Someone had told us that we can get places to stay in Manikyadhara, but it looks like the information was wrong. Manikyadhara was further away than Baba Budhangiri (the place we had planned on trekking to the next day). It was almost 5 in the evening now, and we were all tired as hell having trekked more than 15 kilometers that day. So we trekked one more kilometer to Attigundi from where we decided to take a jeep to Baba Budhangiri. The ride set us back by 200 Rs, but it was well worth it. Baba Budhangiri has a Dargah, and there are a series of rooms next to that that they let out on rent. It costs 110 Rs for 24 hours. We took one of those rooms and spent the night crammed up in the room. There is a tiny restaurant nearby, but some of the "export quality" members of the group dropped out of the dinner plan citing hygienic conditions of the restaurant.

The next day morning, lazy as I felt, the other forced me into getting up and ready to trek to Manikyadhara. Braving a 10 meter visibility situation, we set forth to Manikyadhara which is another waterfall about 3 kilometers from Baba Budhangiri. It is a very simple route. Just follow the road and at the end is Manikyadhara. But enroute the scenes are simply stunning. The waterfall at Manikyadhara itself turned out to be quite small, but the scenic route and the panorama from the location was well worth it! Also, on the way there are a couple of abandoned houses which make excellent locations for photography.

For all that I have written about and photographed, nothing can beat the experience of actually being there and I would highly recommentsend that you go out and actually be part of the experience. We started back to Baba Budhangiri and caught the first bus back to Chikmagalur (at 12 noon). From Chikmagalur, we caught the 2 PM rajhamsa back to Bangalore which reached around 9 PM. You wouldn't believe me if I told you how much of a luxury sleep is at this stage :-). Some more of the pictures I took while on the trek are hosted at http://picasaweb.google.com/prashmohan/MullayangiriTrek. And the route that we took for the trek is put up on Google maps.


View Larger Map

You can also find more information about trekking in Mullayangiri at these resources:
http://www.dreamroutes.org/dreams/mullainagiri_rs.html
http://hve.iisc.ernet.in/~santanu/mullayangiri.html
http://www.naanushande.com/2006/10/mullayangiri.html
http://gomia.blogspot.com/2007/02/2007-01-25-trek-to-mullayangiri-and.html

by Prashanth (noreply@blogger.com) at August 06, 2008 06:04 PM

CCR's Recommentsended Readings

Computer commentsunications Review (CCR) runs a column titled "Recommentsended Readings" which has invited articles from pre-eminent researchers in their respective fields. Most of the articles are on Networking Research and share the theme of "10 top papers". It makes for a very engaging read!

Check out CCR Online's Recommentsended Readings.

Technorati Tags: ,,,

by Prashanth (noreply@blogger.com) at August 06, 2008 06:04 PM

Vintage Chennai

If you are a Chennai-ite or even remotely familiar with Chennai, you might like to visit this page. It hosts some photos of Chennai from the yesteryears.

Onto http://sirsasana.org/VintageChennai/

Technorati Tags: ,

by Prashanth (noreply@blogger.com) at August 06, 2008 06:04 PM

Life after the Oil Crash

Sometimes you come across some cynical material on the internet like the essay titled "Life after the Oil Crash". But then you come across more idealistic versions of the story too -- Surface Oil May Be Running Out, But Deep-Sea Crude Is Barely Tapped and The Oil Nonbubble. Makes you wonder what to really believe in this world.

And oh btw, I strongly recommentsend that you read the Life after the Oil Crash essay. Has some extremely good points to ponder over.

Technorati Tags: ,

by Prashanth (noreply@blogger.com) at August 06, 2008 06:04 PM

The food price blame game

For long, we have seen the Indian government side with the big brother. Many a times for justifiable issues, which were still opposed within the country. And many a times for quite unreasonable issues.

But I support India's stand against american's who believe that Indians are the reason for the recent inflation in food prices. Mr Bush and Ms Rice, while a large portion of the world's population go hungry, you blame our improving prosperity for increasing your food prices. Perhaps its time to relook your people's eating patterns? While you go on spending money on petty wars, you ignore issues that you do affecting the poorer developing nations and again you blame us for trying to pursue a better life? High time for a reality check!

Technorati Tags: ,,,

by Prashanth (noreply@blogger.com) at August 06, 2008 06:04 PM

Environment conscious software license!

From WordWeb's license page:

You may use the program free of charge indefinitely only if
* You take at most 4 flights (2 return flights) in any 12 month period
* AND you do not own or regularly drive an SUV (sports utility vehicle).
Do read their license page :-)!

Technorati Tags:

by Prashanth (noreply@blogger.com) at August 06, 2008 06:04 PM

Natural Habitats

Found in the CS department, Univ of Washington

Technorati Tags:

by Prashanth (noreply@blogger.com) at August 06, 2008 06:04 PM

Bata isn't Indian

Yup! You read it right! Bata is NOT an Indian company! It formed in part what is now Czech Republic.

Technorati Tags: ,,

by Prashanth (noreply@blogger.com) at August 06, 2008 06:04 PM

Ara Pulido

Test scripts shouldn’t know about test objects


When scripting desktop tests is a common practice to rely too much on script recorders, that will script automatically your test, based on mouse and keyboard activity. The main problem with the resulting scripts is that they are too coupled with the desktop interface and, therefore, difficult to maintain.

One of the main objectives that we are persuading when creating a testing framework for Ubuntu desktop is to avoid scripts to know anything about the objects behind them. Definitively, these objects will still require to be maintained, but the logic of the scripts will remain the same.

One example. Let’s imagine that we had a regression test suite for Gedit that will edit, modify, open and save several files. Many. About a hundred. If any of the Gedit features changes its UI, only the Gedit class will be modified. All the scripts will still be valid.

Decoupling scripts and test objects will also keep the door opened to Model-based Testing.