Sunday, March 26, 2006

Installing another Linux distro (Fedora Core 5)

Fedora Core 5 is out and I could not wait to get my hands on it. For a relatively experienced user, I faced some problems. First of all, my upgrade from Fedora Core 4 failed. I think, it was due to the fact that I had vfat mounted partitions, but I am not 100% sure. So, I did the dumb thing and tried to reinstall it from scratch.

As fate would have it, some of CD's had bad sectors. This caused my installation to be terminated twice. I was surprised not to see the ignore option, for RPMS that failed to install. In any case, I did a minimal install to get Fedora Core 5 up and running. The development tools were completely missing.

I tried to use the new pirut tool, hoping that I would be able to install the remaining packages. To my surprise pirut uses yum as the backend and would not pickup any packages from my CDROM media. To fix this, I copied all the RPMS to a directory in /rpms. Used createrepo to create a yum repository of the RPMS. I then edited /etc/yum.conf to pick up RPMS only from /rpms. The next step was to find all RPMS not installed and install them with yum.

While, this was running in the background, I also installed the following

  • Adobe Reader 7.0
  • Java JDK 5.0
  • Flash Plugin
  • Kchmviewer (a chm viewer for Linux)
  • mplayer
I am still in the process of setting up Fedora Core 5 completely. All in all, the package selection is exciting, especially

  • Xen
  • Systemtap
  • KDE 3.5
  • GNOME 2.14
  • Eclipse (based on gij)
  • Mono
I hope to keep talking about Fedora Core 5 for a while on this blog and of-course other interesting stuff. So keep watching this space. How can I leave this entry without a screenshot? Here is one for completion. I hope it shows all the pain that has gone in :-)

Gopal's static block example

Gopal's example at C++ Static Blocks with better syntax highlighting.


using namespace std;
class Static
{
private:
static vector values;
public:
Static ()
{
vector::iterator b = values.begin ();
for (; b != values.end (); b++)
{
cout << *b << endl;
}
}

class VectorInitializer
{
public:
VectorInitializer ()
{
Static::values.push_back (20);
Static::values.push_back (40);
Static::values.push_back (60);
}
};

friend class Static::VectorInitializer;
};

vector
Static::values;
static
Static::VectorInitializer
initalizer; //initializes the vector.

int
main (void)
{
Static
x;
}

Thursday, March 23, 2006

Trivia

What cryptographically significant information has been published in every Sunday's New York Times since 1992?

Saturday, February 25, 2006

Bitten by the busy virus

I have been extremely busy to keep this blog upto date. Well, I have been bitten by the "busy" virus. Yes, I have been extremely busy and I have had no time for blah, blah, etc.

I will try and find more time to blog. Lets see if the busy virus is strong enough to prevent me from my temptation to blog.

Tuesday, January 10, 2006

RFC : Understanding components of the kernel

I plan to start a series of articles explaining the Linux Kernel code as I understand it. I plan to cover some core ideas and subsystems. I do not intend to compete with LWN or other professional writers.

My biggest challenge would be to find a good drawing tool and keeping the documentation up to date.

Analysis of the double wakeup problem in Linux

Some time back there was a discussion on lkml about mutex vs semaphores. Check out Goodbye Semaphores?. You might have to wait until 12 Jan 2006 to read it, if you do not have a LWN subscription.

The main reason Linus accepted Ingo's new patch is because semaphores did not perform as well as the new mutex code and of-course various other reasons. Linus and others quickly found the main cause of the performance hit to be the double wakeup problem.

If you are interested in this kind of stuff, I posted my analysis of the double wakeup issue on lkml. Here is the complete analysis

Wednesday, January 04, 2006

When the past comes back with a surprise

Long long ago, I had posted a patch to lkml for O(1) estimation of slab size estimation.

Here is the original email and the thread. This morning, I saw the following threads

  1. slab.c:cache_estimate cleanup
  2. [PATCH] micro optimization of cache_estimate in slab.c

In the latest thread, both myself and Steven Rostedt have posted our analysis to prove that the O(1) algorithm works. Interested? Check all the three emails and their threads.

As usual comments are welcome, this time clarifications too!

Tuesday, January 03, 2006

Confession of a software programmer

Software programmers are known to be lazy and famous for writing buggy code. Well, not all programmers, some do write wonderful stuff. So good that its a pleasure to read the code and execute their program.

I feel that I belong to the lazy and buggy code writers category. So, this year (this month) I have decided to write some code, that I should have written a long time back. I plan to write the code with the following goals in mind

  1. Develop several test cases to prove that the code works
  2. Track Quality of code
  3. Keep track of every single mistake I make while writing it and time required to fix errors
  4. Track the number of compilations, crashes, the number of times the source code is edited and time required for each action

You must wonder how I will do all this and still develop code. Well, I have a plan of action

Use Karm (KDE's time tracking tool) to track how my time on the computer is spent. I think it should be an interesting exercise if followed honestly.


Screenshot of Karm

Sunday, January 01, 2006

New year advice (to myself)

Use a book (especially a technical one) as a guide.

Like a traveler would use a map to understand the city. The book being the map and the city being the subject. One cannot claim to have understood the city, by just having seen things on the map. It is critical to explore the city and use the map when lost or to reach some destination.

I understand that my blog has moved from being technical, but I hope to continue on the tech-mania this year.

Saturday, December 31, 2005

Happy New Year in Advance!

As the earth rotates and as time (as we understand and define it) advances, our calendars will reach/have reached the year 2006 AD. I hope this year has been quite fruitful for all of you and the new year will bring more progress, peace and happiness for all of you, compared to this year.

For me, the next year will be very challenging both personally and professionally and I look forward to it. I hope to be a little more active in my social life and otherwise.

Well, as for 2005 "That's another year archived in memory and on the blog's sidebar".

Thursday, December 29, 2005

Data Structure Patterns - II

In Data Structure Patterns, I referred to embedding data structures in other concrete data types to as a pattern. Linux Device Drivers, third edition talks about embedding kobjects, which I quote here

If you are used to thinking of things in object-oriented terms,kobjects can be seen as a top-level,abstract class from which other classes are derived. A kobject implements a set of capabilities that are not particularly useful by themselves but that are nice to have in other objects. The C language does not allow for the direct expression of inheritance,so other techniques —such as embedding one structure in another —must be used.

I realized that what I originally called a data structure pattern is really a means of achieving inheritance. I would like to refine what I said and call it a "Data Structure mechanism to implemeninheritancece in C". What is interesting to note is that this is not a design pattern, but rather a code pattern to achieve a design goal inheritance.

I would like to thank Jonathan Corbet, Alessandro Rubini, and Greg Kroah-Hartman for their book and seeing things so clearly.

Wednesday, December 28, 2005

Tragedy at IISc

As I returned home today night, I was informed that there has been a shoot-out at IISc Scientists Killed, 3 injured in IISc terror strike . I usually go to Tata Book House and had planned a visit, but could not go because I had to meet a friend.

Lets all gather together and condemn the attack. The people hurt are eminent scientists and our gurus. Such attacks always impact innocent people who want to live their live in peace. My prayers go out to the family members of the people hurt and their families.

We in Bangalore have been reading reports of terror reaching Bangalore, could this be the beginning of it? I sincerely hope not.

Saturday, December 24, 2005

A visit to doddamakali

We recently visited doddamakali. There are good number of pictures in the previous blog postings.

I am going to keep the trip report small and readable.

The day of the trip did not start well. I was supposed to be picked at 6:15 AM, I was picked up by 7:00 AM and then our vehicle ran out of fuel. After having a great breakfast at Kamat (on the highway), we set of for doddamakali. We arrived at the camp at 11:15 AM, after having driven down the hill to the mighty river Cauvery. The path requires that a 4x4 be used to drive down.

Trek1

Our first trek took us along the bank of the river. The path has a combination of sand and rock. Finding your way down and up the rocks can get difficult, especially when the rocks get hot. It is difficult to grip on to anything. To make matters worse for me, I carried a bag, a camera and a stick.

I did not rest enough and drink enough water, the result -- I felt like I was de-hydrating on the way back. It is one of the worst feelings I have had in a long time. I could not stop losing water, I could not rest at a place and I could not stop using the rest-room. I gathered enough energy to reach back the camp and had a lot of lemonade, it took a lot of lemonade and some good rest (for about an hour) before I could stand up again.

Lunch

The camp people served lunch. The lunch was well cooked, but I avoided lunch and only took curd-rice and some sweet. Of-course with a lot of lemonade.

Boat Ride

Initially we were refused the boat-ride, the folks at the jungle mentioned something about crocodiles. After lunch, we were adamant on the ride. The result, of came two boats and 10 life jackets. The forest people insist that we were life jackets (which is a good thing). One of the boats was leaking, so they use a metallic stool in it to avoid getting wet.

You will see in the pictures that one boat has people seated on the boat and the other boat seated on a platform. The boat ride lasted about 15 minutes, the fun part of the ride is when the boatmen turns the boat in circles to everybody's cheer and joy.

Fishing and Trek2

One group decided to stay back and fish, the other (including myself) decided that it was time for trek2. The fun part about trek2 was that there is no trek path. There are thorns and bushes and the trek is steep. The view from the top is amazing, some pictures of the view are available in previous posts. On the way back, the grass helped us from falling, everyone gripped on to it. But no-one reached the camp without a fall. I had a big thorn that entered my thumb and broke inside. The forest official used his pin to get it out of my hand and offered a band-aid

Coming back

We stopped at Maddur for some maddur wada (which is very delicious) and reached home by around 10:30 PM.

privacy

Some of the policy from the app automation refers to https://rclone.org/privacy/ if you are a general blog reader, follow Google's polic...