Skip to main content

Posts

Showing posts from 2004

Tweaking Gentoo

Here are a couple of ways to tweak the performance of a Gentoo Linux install: Prelinking : This improves load times of shared libraries. It is especially useful for application suites that use a large number of shared libraries like KDE. Using NPTL : The Native Posix Thread Library (NPTL) improves the performance of multi-threaded applications. The performance of Java based applications like Tomcat , Orion and Azureus have visibly improved with NPTL.

Switching from XFree to X.org

I have finally made the switch from XFree86 to X.org . On Gentoo I pretty much followed the instructions posted on the Gentoo forums . After setting up the font directories correctly i.e., switch from /usr/X11R6/lib/X11/fonts to /usr/share/fonts , KDE was working as usual. There were two problems however: Direct Rendering was disabled on my ATI Radeon 7200 . For some reason all the Mozilla apps (Mozilla, Firefox, Thunderbird, etc.) would crash as soon as they started rendering a page The first problem was unrelated to the X.org upgrade and was just something that I noticed now. It was easily solved by following this email thread . Essentially I had to make sure that the agpgart module was loaded before the radeon module. I have a VIA KLE133 AGP chipset and so in /etc/modules.autoload.d/kernel-2.6 , I have the modules specified in this order: agpgart via-agp radeon With this setup, dmesg should report detection of the AGP chipset first (e.g.: agpgart: Detected VIA KLE13

Carl Weiman, Nobel Prize in Physics, 2001

At the annual Robert Hofstadter Memorial Lecture at the Stanford Physics department, this year's speaker was Professor Carl Weiman from the University of Colorado. Prof. Weiman was the recipient of the Nobel Prize in Physics in 2001 for his work on achieving and studying the Bose Einstein condensate - a condensate of atoms formed at temperatures of around 10 -7 Kelvin, predicted by Albert Einstein in 1924. Prof. Weiman's method for achieving the condensate at such low temperatures involves first slowing down Rubidium-85 atoms by bombarding them with lasers and then further cooling down the atoms using magnetic fields to form an envelope around the lowest energy atoms. Prof. Weiman was able to describe all this in simple physics and keep the hour long lecture very interesting. The Q&A session was also pretty enlightening, especially because of the insightful questions that some members of the audience came up with. There were other Nobel laureates among the audience inc

Builtins in C

Here's an interesting article on Kuro5hin : Why C Is Not My Favorite Programming Language . The article is a response to a rant from Brian Kernighan (over 20 years ago) called Why Pascal Is Not My Favorite Programming Language . It's an interesting article and makes good points about the ability to introduce buffer overflows very easily. For the most part though, the article is simply complaining about the amount of rope that C gives you to hang yourself with. Or should I say shoot yourself in the foot . One of the comments in the article was trying to make an example of the C builtins. The one I found most interesting was the branch prediction builtin __builtin_expect which lets you assist the compiler is branch prediction. Documentation for some of the other interesting builtins is here .