Entries Tagged 'Daily life' ↓

iLugHyd, Sloppy pace, Confusion.

I just returned from iLugHyderabad’s meeting. It was fun. I met a lot of interesting folks who had dabbled with the new release of Fedora. It is not like I am tempted to try out fedora but it was fun meeting the Fedora enthusiast Rahul Sundaram. Let me recollect what happened during the meet.

The venue for the meet was the astronomy building at Osmania University. The building was being renovated and I managed to whiten my navy blue coloured jacket by plainly brushing against the walls of the building. There was no electricity in the building too. We were discussing about moving to a different room when a professor who was there to attend the talk (teaches at Osmania and has been using Linux for 12 years !!) used an extension cord that somehow could span the length of two floors. The basic infrastructure needed to conduct the event was now complete. We waited for a few more people to arrive but not many turned up. Seemingly many students had exams the very next day and chose to stay back at home/hostel to study. I began discussing about Django newforms with Theju (I met him at mukt.in . He was one of those who did a project on server side validation at the google summer of code. I will take part in this when I go to college for sure. They give out some excellent projects and help in improving one’s coding skills.). Seemingly in December, django’s creators will launch newforms (or is it newforms admin?). Theju promised to teach me how to hack up the admin interface that comes with django.

Someone at the meet with long hair had a lot of troubles with Fedora 8. Seemingly his laptop wouldn’t boot into fedora and grub would get stuck at the “Loading Grub, Stage1.5″ stage. I also remember that I had some troubles with the new linux kernel way back when I used feisty. I placed a bug report here.

After that the talk began. Rahul explained about his association with linux since the days of Red Hat Linux. So automatically becomes part of the elite FOSS gang in Hyderabad.

Rahul turned out to be a jovial speaker and his speech was littered with comic examples dating back to his stint as the “font guy”, “the support guy” for Fedora and Red Hat Linux. Seemingly on one occasion, he was called up by a Fedora user from Greece who claimed that Greek didn’t look good in the Bitstream fonts but looked better in DejaVu Sans. Rahul’s reaction was “Which one is what and what looks better?”. We all had a hearty laugh at this. At the end of the meet, we all had an “introduce yourself” kind of session and there was this guy who worked at google and was all smiles. I just adore google employees. They seem to be in love with what they do and genuinely are “good” at what they do. Krish (mukt.in organizer). So we began talking. I voiced my anger at google’s choice to make us write applications using android in java and to provide an eclipse plugin to top it all. Now eclipse is a PITA. My experience with it lasted 30 minutes. 10 minutes it took to start, 10 minutes to install the pydev plugin and another 10 to close. Rahul then came in with his comment, “Some time back, your computer was considered very robust if it could run quake at 50 fps. Nowadays, if you can run eclipse at 50 fps, your box is top of the line.”. He earned another round of applause. That is the true FOSS spirit.

I did attend a Ruby on Rails session as well sometime back at TWINCLING. Mr. A.P. Rajshekhar gave a talk on ROR and it was one of the best sessions on web development (I attended one at mukt.in. It was conducted by Thyagu) that I had attended. In a span of two hours, Mr. Rajshekhar covered a lot about Ruby, MVC and also showed us a working application by the name talewiki. Mr. Rajshekhar is also writing a book on ROR and he plans to use talewiki to teach ROR. I promise you Mr. Rajshekhar that I will be the first to purchase your book.

Krish and I are coming up with a web application of our own. I will talk about it later as we are yet to come up with a working model.

I have to still figure out how to generate thumbnails for my firefox extension. I have discovered that nautilus uses a thumbnailer that picks a particular frame of a video, the first page of a file and so on. I think I will freeze the development of filerfox and do something else with firefox. I have to scout for them though.

Anyway, See you later.

Diwali’s over

Hello,

I enjoyed what can be called a sound-proof diwali. A few sparklers and a few flowerpots made up most of my 15 minute long diwali celebration.

I am not too sure I did a lot yesterday and the day before. I have a FIIT-JEE phase test coming up soon and I have a lot of coding etc. to finish. Terrific example of putting your feet in too many places at once.

I found a new album on the free albums galore blog. I have to yet listen to it. I also have a podcast to spit out soon (considering people were causing an earsore the past two days, recording became impossible). I’ve got to finish filerfox too.

Lots of work but only 24 hours in a day.

If I haven’t mentioned already, I do like music and I like melodious music. One that fills me with satisfaction once I listen to it. I was an avid follower of SaReGaMaPa for a very long time and in the senior’s edition which concluded some time back (should be back next year or so) I was a big fan of Mussarat Abbas (sufi singer who sang Nusrat Fateh Ali Khan Songs) and Amanat Ali (ghazal expert. Jagjit Singh said he had a terrific future). The kids version however seems a bit senseless to me. First of all they call these kids from all over the world and make a competition out of it. Hence we get to see a five year old crying over something that he can’t even announce about proudly ten years from now. Immature voices, overtrained kids, parents who feel that the judges have wronged their children. It is not comforting too when a child makes a complete mess of a song and when I frown, I am told that he is just a 7 year old. The point is why should I be wasting my time listening to mediocre performances.

I am going to conclude with this rant and I shall write again later

What I am up to these days

I have not been able to post a lot these days as I am all tensed about applying to colleges and so on, it is indeed a very stressful process. I have shortlisted a few but I think it is better I don’t shoot only for the top few and also look at tier 2 colleges with decent research prospects.

Now I am an individual who is eager to play with things. After the LUG meet I decided to make my own file manager extension for firefox that would enable me to easily pick the pictures that I would like to upload. I have made a basic UI for it and I will soon come up with a working version of it in about a week.

Apart from that I got to play with BSD again courtesy a generous gift from Deependra Shekawat ( a great friend who is a freenode regular ). He sent me the PCBSD installation cd. Let me recollect the process.

I put the cd in and up came a very good-looking screen that enabled me to cruise through the process and I kept encountering worthless pics that claim its capability to play all my music and edit all my files and whatnot. Typical “BSD on the desktop is finally here” kind of presentation. After a few minutes the installation finished and I was staring at KDE (oh how those jumping icons irritate me). Surprisingly everything works including my wireless. Even the distracting LED (ACER’s innovative design. They place the radio kill switch under the touchpad so that I can always hit it and see the Network Manager applet tell me that no wireless networks exist). I decide to experiment. The .pbi method of installing things irritates me further.

I recollect that a very dear friend who uses freebsd had told me about the complaints bsd threw when a device was not unmpunted correctly. I plug my external drive in and yank it out immediately. I plug it in again and type `mount /dev/da0s1 /mnt/external_disk` at the shell and get some stupid error report. I investigate further.

Tune2fs seems to be a good utility to look at ext3 fs parameters (my external drive is ext3 formatted, I know it is not smart but who cares). I notice this :

Filesystem features: has_journal resize_inode dir_index filetype needs_recovery sparse_super large_file

Bingo! So all I need to do is remove the ‘needs_recovery’ “feature” (stupid I know).

Being the MIT appreciator I pick debugfs which according to its manpage is written by someone from MIT (woohoo!!). So here goes:

[root@psp-laptop /root]# debugfs
debugfs: open -w -f /dev/da0s1
debugfs: features
Filesystem features: has_journal resize_inode dir_index filetype needs_recovery sparse_super large_file
debugfs: features -needs_recovery
Filesystem features: has_journal resize_inode dir_index filetype sparse_super large_file
debugfs: quit

So there we are. I would however recommend that one runs e2fsck on the drive. That will also remove the troublesome “feature”.

Work, work and more work. I need to draft those essays now.

I will write again later

Back again

After a lull of 10 days (no internet), I am finally back, 512 KBps and unlimited download is what I picked. Now loads of things to do. I am working on making my very first firefox extension and I’ve found this: http://developer.mozilla.org/en/docs/My_Chrome_Oven:_Generating_XUL_with_Python

So we now have no troubles whatsoever making our extensions. Apart from this I am going to put up a few podcasts for twincling’s school division. I will be posting more on my adventures with firefox soon. Let me give all my readers (I am sure there are very few of them) an idea of what all I’ve been up to in recent times.

I got my SAT 2 scores, 2270. Seems decent and hopefully tests won’t be there to worry me. Debian has undergone some more of my torture and I have discovered a few good books that have interested me.

My first book was ‘Remarkable Curves’ which dealt with properties peculiar to conic sections, like the pascal’s theorem etc. I couldn’t really figure out any coding ideas from that book. I am now trying to get around the theoretical barrier (the random variables part) that is hindering my progress with the book on the Monte Carlo theorem.

I am also going to dump all I have written on my nipl hosted site, hopefully it will be of some use to someone. I am eager to kick off with firefox hacking, so I am in a hurry to leave. I will write again later.

Poparse

Poparse is a script that can fill empty .pot files with msgid strings from pre-existing .po files. It uses the gdbm database routine.

Gdbm is a database routine that allows you to use dictionary methods. I found it after I was pondering about using sqlite3 for this very script (project). I am not too sure if I will continue working on this. Anyway, have a look:

#import the needed modules
import shlex
import gdbm

dictionary = gdbm.open(‘dictionary’,‘c’)

def voraciousEater(filename):
        """This function saves the msgstrs corresponding to the msgids in a gdbm database
        routine named `dictionary`."
""
        po_file = open(filename, ‘r’)
        po_file_text = po_file.readlines() #We obtain a list of the lines in the po file.
        for line in po_file_text:
                if line.find("msgid") != -1:
                        number = po_file_text.index(line)
                        message_id = shlex.split(line)[1]
                        value_of_msg_id = shlex.split(po_file_text[number + 1])[1]
                        dictionary[message_id] = value_of_msg_id

def efficientFiller(filename):
        """This function creates a new po file and fills it using entries saved previously              ."""
        pot_file = open(filename,‘r’)
        pot_file_text = pot_file.readlines()
        for line in pot_file_text:
                if line.find("msgid") != -1:
                        message_id = shlex.split(line)[1]
                        if dictionary.has_key(message_id):
                                number = pot_file_text.index(line)
                                corresponding_crap = dictionary[message_id]
                                final_string = ‘msgstr’ + " " + ‘"’ + corresponding_crap + ‘"’ + \n
                                pot_file_text[number+1] = final_string
                                yield pot_file_text #a very huge output of lists is generated
                pot_file.close()

def writer(filename):
        output_file = filename[:-1] #create the pot file
        outfile = open(output_file,‘w’)
        efficient_filler =  efficientFiller(filename)
        try:
                new_list = list(efficient_filler)[-1] #picking the last list that the yield statement generates.
        except IndexError:
                pass
        for line in new_list:
                outfile.writelines(line)
                outfile.close

filename = raw_input("Give me the pot file or the po file and I will do the rest: ")
if filename.endswith(".pot"):
        writer(filename)

elif filename.endswith(".po"):
        voraciousEater(filename)
else:
        print "File type not recognised. Ensure that the file ends in .po or .pot"

SAT 2: Recovering from the “Shriphani Conjecture”

The Shriphani Conjecture states that:

“If something is judged by you to be impossible, then it is sure to happen to you.”

Well here goes. Two days ago I chanced to look at my Toefl iBT profile on ets’ website and clicked on the “View Scores” button and wonders of wonders, 117 on 120. So I am safe I said and moved on to read Einstein’s special theory of relativity.

Today I sat for SAT 2. A comedy scene took place at the center.

Scene 1:

(Enter Shriphani Palakodety and Mother)

Shriphani Palakodety: Hmm… from what I gather by looking at the contents of the bag, I seem to have forgotten to get my calculator.

Mother: WHAT !!

SP: Yeah, I am without the electronic device that seems to be so needed to write this exam.

M: We paid more than a 100 dollars for that calculator!

SP: It will be useful at some later date.

M: It won’t be serving the purpose we got it for !! You made us go through a lot of trouble to get hold of this calculator

SP: Relax ! I can write the exam.

M: You wasted money ! That calc. was for your SAT

(I still think that calc. is for playing minesweeper and figuring out why the look-to-us-if-you-want-to-learn-about-open-source-and-linux company doesn’t have a linux version of their calculator-pc syncing software. I still managed to copy the binaries using pyserial to play games on my calc)

SP: Sorry.

M: hmph

So I went in and wrote my name, encircled the dots and came out. I did leave quite a few. I will probably cross 2250 easily. I should have taken the calc. DAMN !

Geometry, Desktop Environments.

So, here we are at this very important juncture in life. Probably three months from now, I shall be clicking “Send” on each of my college applications. But first an update on what I have been doing. I am trying to write clean code and create a backup script. It seems to be coming on nicely. I have to just include the command line options and it should be in working condition. Apart from that I have switched to xfce which seems to be a terrific alternative to KDE (ahem for my museum piece). I don’t know why but I happen to dislike KDE. It is such a resource intensive envrionment and comes with unnecessary bells and whistles like bouncing icons and whatnot. XFCE is ok.

I still love fluxbox. By the way I came across a wonderful book called “Geometrical constructions with compasses only” by A. Kostovskii ( I don’t know why the author put two “i”s in there).

The Mascheroni theory states that, “All construction problems solvable by a ruler and a pair of compasses can be solved by a pair of compasses alone. ”

I had a look at some sample problems in the book. Most were of the variety that I had done already such as drawing line segments n times the length of the given line segment and so on. I skimmed through and got to the part that I hadn’t come across before.

Inverse. Let us say we have a circle with centre O and radius “r”. If we fix a point P somewhere in the plane of the circle, then point P’ is the inverse of point P if |OP|.|OP’| = r ^ 2. The circle in question is called the circle of inversion.

I then had a look at some of the problems that came at the end of the section on the inverse of a point. One question involved proving a theorem that went:

“The inverse of a line with respect to a circle is a circle.” Let us see how this can be solved. I felt that this was very simple. I fixed a point P on the line, dropped a perpendicular from the centre of the circle on the line and marked the point of intersection as Q. I then plotted the inverse points of those two points. Considering that Q is the foot of the perpendicular from the centre, we can safely assume that the angle OP’Q’ is equal to angle OQP = 90 degrees as OP’Q’ and OQP are similar triangles. As P is moved along the line, P’ moves along the circle as the angle OP’Q’ will always be 90 degrees.

The next question involved plotting the inverse of a point P with respect to a circle with centre O using only a compass. I used the idea of similarity as quoted in the previous paragraph. If P’ is the inverse of P, OP/OQ (Q being a point on the circle) = OQ/OP’. Finished. OP’ x OP = OQ ^2. So if we draw a circle with centre P such that it cuts the circle at points D1 and D2, With D1 as centre and OD1 as the radius, draw an arc and cut this arc with another one obtained by carrying out the above procedure with point D2. Tada, inverse obtained.

I then had a look at some sample problems solved by Mascheroni himself !!

One feature I have observed about the constructions done by Mascheroni are very elegant. For example have a look at this question:

“Plot the centre of a given circle.”

I rattled my brains and came up with the age old solution of getting two normals to intersect. I simply could not avoid using the ruler. One would of course attribute this to the fact that my experience with the inverse of a point or a curve is limited but I feel that if ideas don’t strike when the material learned is fresh in the mind, when will they strike?  I hate looking the solutions to problems but I was forced to look at the solution to this one. Here goes:

Take a point on the circle. We’ll call this point “O”. With O as the centre and taking any arbitrary radius “r”, draw an arc cutting the given circle at A and B. With OA as radius, draw an arc and cut this arc with another one drawn with B as centre and OB as radius. We should be getting point O’. If we draw a circle with centre O’ and radius OO’ such that it cuts the first drawn circle at D and D’, the points of intersection of arcs with centres D and D’ and radii OD and OD’ respectively give us point O” which is the centre of the given circle.

The proof seemed fairly simple as soon as I read the solution. Since A and B were lying on the same circle, A was the inversion of B and vice versa. Hence the circle is the inversion of line AB. So elegant.

I don’t know when I will reach the capability of Mascheroni, V. A. Uspensky and other mathematicians whose works I have been exposed to. I just hope that that day comes soon.

Yes.. I am back in action.

I suppose whoever is wasting their time reading this blog must have gotten tired of that very line. Anyway I am working hard on my coordinate geometry script. I also got myself a HP 50g calculator. It rocks to the core. It is amazing. I got it to draw a lot of graphs for me. It comes with minesweeper too !

By the way, I had a look at useless python’s source code page and I could see my name there. Stumped! It is the same script I used to solve that feisty trouble (1st post or 2nd post). As per useless python’s website, I am truly useless :)

I am working on creating a Pi file filler and a Pot file reader and I have decided to go with sqlite3 to store the msgids. Anyway, more on this later.

Feisty fawn, first observation

I got my feisty cds this morning. I installed feisty immediately and considering that one of the ubuntu devs on #ubuntu told me that feisty’s way of handling storage devices had changed, I immediately did:

shriphani@psp-laptop:~$ cat /etc/fstab
# /etc/fstab: static file system information.
#
#
proc            /proc           proc    defaults        0       0
# /dev/sda3
UUID=1a97343a-e3ed-48e2-9db4-ea67228fb1aa /               ext3    defaults,errors=remount-ro 0       1
# /dev/sda2
UUID=68033b3d-f469-4a8b-8ade-c3a9984f5281 /boot           ext2    defaults        0       2
# /dev/sda1
UUID=01107bb3-77bb-41c3-b271-6019bfa8ebb3 /home           ext3    defaults        0       2
# /dev/sda4
UUID=da271254-066a-46f4-b1a0-75ba2c4b494f none            swap    sw              0       0
/dev/scd0       /media/cdrom0   udf,iso9660 user,noauto     0       0

What’s this !!. a UUID describing a device ? I was a bit confused. I also saw that my IDE drive (I have an acer travelmate 4500 laptop) was being recognised as SCSI. I immediately went to #ubuntu on freenode to figure out what was wrong. I was then given the link to this.
Wow! Surely a lot of thought going into that. So we will be dealing with just one subsystem from now on in Ubuntu land.