Latest Entries »

Recently while work­ing on a project I was try­ing to debug data cor­rup­tion on an STL vec­tor using gdb. If you have used gdb for debug­ging C++ code you prob­a­bly are aware that try­ing to print a vec­tor using the stan­dard gdb print com­mand returns a rather cryp­tic out­put that is hard to deci­pher and make sense of. But as the dead­line approached and as I con­tin­ued smash­ing my head on my desk in des­per­ate need of a fix I fig­ured out that a vec­tor was los­ing all its between two points in the flow of the pro­gram. That’s when I won­dered that there must be an eas­ier way to watch vec­tors. A few searches later I came across this won­der­ful piece of work by Dr. Eng. Dan C. Mari­nescu that adds STL con­tainer sup­port to gdb. The detailed infor­ma­tion page and related links can be found on this wiki. But to make it sim­ple, if you’re look­ing only for STL sup­port in your gdb ver­sion 7 or higher, just down­load the con­fig­u­ra­tion file from here and add the line source <full_path>/stl-views-1.0.3.gdb to your gdbinit file. On Ubuntu 10.04 this file is in the /etc/gdb/ direc­tory. Of course you can locate the file using the locate gdbinit com­mand and then mod­ify it.
A list of com­mands that may be used to manip­u­late STL com­po­nents using gdb can be found here. I hope this helps.

I often think it is harder to fig­ure out one’s own reac­tions to cer­tain events than it is to solve a com­plex math­e­mat­i­cal prob­lem. I envy those enlight­ened ones who claim to “know them­selves” as that’s one knowl­edge I would cer­tainly like to gain. This reflec­tion stems from the events of the past week. I had been highly moti­vated to work in the lab last week. So much so that I spent days and nights in the lab for all days of last week. Sun­day was another story though. I went on a hike to Avatar Grove, an ancient for­est which stares extinc­tion due to the cal­lous atti­tude of the provin­cial gov­ern­ment of British Colum­bia towards old=growth forests. They com­mu­ni­cate in usual gov­ern­ment speak which involves dis­torted and often igno­rant num­bers that are pro­truded in ways to jus­tify their course of actions. This hike was orga­nized by this fan­tas­tic vol­un­teer orga­ni­za­tion, Ancient For­est Alliance which I am very excited to be a part of. Avatar Grove is one spe­cial for­est that houses trees that have lasted hun­dreds (even up to a thou­sand) of years and form an intri­cate ecosys­tem that is teem­ing with life. There are very few of these old growth forests that still stand on this beau­ti­ful planet as gifts of nature. Rid­ding the land of these giants will add yet another crime to the end­less of lists of hor­rid crimes that we humans have com­mit­ted against mother nature.
As always, I ended up digress­ing on to an entirely dif­fer­ent issue from the issue at hand. So this visit to this ancient for­est with a group of con­cerned and active indi­vid­u­als was very refresh­ing. But the for­est as always intrigued me and left an impact that I am still reel­ing with. I feel this strong urge to quit what I am doing and go back to the jun­gle. Here I was, happy to be moti­vated about work­ing hard again, work­ing hard to make machines more impor­tant in our lives and find­ing more ways to arrest the remain­ing frag­ments of human­ity into the vir­tual worlds of zom­bie machines cre­ated by streams 0s and 1s and then there was one sin­gle encounter with mother nature that com­pletely blew me away. I feel like a sin­ner with no regret, an encroach­ing par­a­site who wants the com­fort of sleep­ing in mother nature’s lap but shies away from pro­tect­ing her. What am I to do?

Com­ing up

It has been a really long time since I have been updat­ing my blog and I believe my sched­ule now per­mits me to write a lit­tle more fre­quently. If not any­thing else, I will update this place with my daily thoughts. One excuse I have afforded myself for not updat­ing is that no one really reads my blog since I don’t pub­li­cize it. But I noticed that this web­site has been get­ting daily hits and now I feel embar­rassed about the incom­plete sec­tions and lack of updates. So in the com­ing days, I will update the incom­plete sec­tions and also post more fre­quently. If you have vis­ited this web­site before, you may also notice that I have been con­sid­er­ing and play­ing around with prospec­tive themes that I would like to change to. For now I am stick­ing to this theme from mono-​​lab and once I have made up my mind about the theme, I shall cus­tomize it. Thanks to the peo­ple (or even bots) who have been drop­ping by on this web­site and thanks for your patience!

I wouldn’t remem­ber the last time I wrote a blog post had it not been for the date field in the post below. I just had my 26th birth­day and I have reached an impor­tant con­clu­sion this year. My secret dreams of becom­ing a per­son of sig­nif­i­cance may never really come true. Although time has reminded me over and over that I am no genius by putting me in the com­pany of smarter men, I some­how saw them as shal­low and kept cling­ing on to this roman­tic dream of mak­ing sig­nif­i­cant and note­wor­thy con­tri­bu­tions to the human race  and to this world.

This year I have real­ized that I am already 26 and the world now boasts of great peo­ple who are much younger than me from dif­fer­ent walks  of life. Reset­ting my secret dreams to align with real­ity has led me to just keep the desire of being able to make some con­tri­bu­tions to the human race and to this  world. I do not know if I will be able redeem myself from the dis­ap­point­ment of this real­iza­tion or maybe I should just live with the romance!