The Free Geek

Ramblings of a Free Software Geek

A reward from Sir Donald Thu, 17 May 2007 18:53:08 +0000

Filed under: General — Baishampayan @ 18:53:08
Dear Mr Ghose,

Many thanks for your extremely helpful note. [...]

I owe you the customary "reward check", because these corrections
affect pages of The Art of Computer Programming. To what snail-mail
address should the check be sent?

Cordially,
Don Knuth

w00t!

Update: I received the cheque today! Check my flickr page for a scan of the cheque.

 

GNU Emacs with XFT goodness Mon, 06 Nov 2006 17:56:48 +0000

Filed under: GNU/Linux, Programming, Ubuntu — Baishampayan @ 17:56:48

Personally I have been using the emacs-unicode-2 CVS branch of GNU Emacs for a long time now. This branch will become Emacs 23 in the future and it contains better Unicode handling code in addition to some cool features like antialiased fonts (courtesy XFT and FreeType), copy to clipboard, etc.

GNU Emacs with XFT

I usually build a custom version of the emacs-snapshot package with source from the emacs-unicode-2 branch and some simple customisation to enable the antialiased fonts. Some of my friends are using those packages and I thought it’d be good if share those packages with a larger audience.

So I have set up an APT repository with those packages which you can install on your Ubuntu Dapper machine. To do that, first add the following line to your /etc/apt/sources.list

deb http://people.ubuntu-in.org/~ghoseb/apt/ dapper main
deb-src http://people.ubuntu-in.org/~ghoseb/apt/ dapper main # for source

Then do sudo apt-get update to fetch the package list and then sudo apt-get install emacs-snapshot-gtk to install the customised GNU Emacs package.

If you already have the vanilla emacs-snapshot installed then only sudo apt-get upgrade will upgrade your current installation to the new one. And yes, this package can co-exist peacefully with your emacs21 package.

Now to enable antialiased fonts, add the following line to your ~/.emacs

(set-default-font "Bitstream Vera Sans Mono-8")

Now launch GNU Emacs as emacs-snapshot-gtk --enable-font-backend and enjoy the awesomeness :)

Leave a comment if any of you need Ubuntu Edgy packages, I will build them and add to the repository.

Update: I have added Edgy packages too ! Just add the following lines to your /etc/apt/sources.list and the rest is identical to the instructions for Dapper.

deb http://people.ubuntu-in.org/~ghoseb/apt-edgy/ edgy main
deb-src http://people.ubuntu-in.org/~ghoseb/apt-edgy/ edgy main # for source

 

Move over Compiz, welcome Beryl Tue, 10 Oct 2006 14:19:48 +0000

Filed under: AIGLX, Free Software, Open Source Software, Ubuntu — Baishampayan @ 14:19:48

One of the coolest things about Free Software is that no one person can really control the direction of a project by dictatorship. While I agree that having a benevolent dictator has helped many projects like the Linux kernel and Python, sometimes the ability to fork a project proves to be a boon.

This is what has happened with Compiz and its friendly fork Beryl. The compiz community led by ace programmer Quinn Storm was doing an awesome job enhancing compiz and writing new plugins. They also wrote cgwd (later Emerald), a custom window decorator for GNOME based on the proof of concept gwd by David Raveman. But apparently David Raveman (author of Compiz & XGL) had some issues with accepting patches from Quinn and was not cooperating with the community. As a result, Beryl was born which is mainly Compiz + patches by Quinn Storm and the community.

I moved from Compiz to Beryl today and I was awestruck. Beryl seems to be way ahead of Compiz in terms of features (like Emerald) and sheer eye-candy. The beryl-manager application is an extremely useful and awesome little thingy. It simply rocks! Here is how you can switch from AIGLX + Compiz to AIGLX + Beryl on Dapper –

  1. Remove all compiz packages from your system but keep the aiglx packages.
  2. Remove all old compiz repositories from your /etc/apt/sources.list and add the following
    deb http://ubuntu.beryl-project.org/ dapper main aiglx
  3. Do a apt-get update and then apt-get dist-upgrade.
  4. Install the meta-package beryl and you are done!
  5. Restart the X server and run beryl-manager. Enjoy the awesomeness.

With Beryl the previous issues with missing window borders are also gone. So you can do away with apt-pinning which I was doing to keep my AIGLX from breaking. More documentation is available at the Beryl project wiki.
You can watch the following movie on Youtube.com to get an idea about Beryl and its advantages over Compiz. Enjoy :)

 

Goodbye, Rob Levin Sun, 17 Sep 2006 08:56:53 +0000

Filed under: General, Life — Baishampayan @ 08:56:53

Rob Levin, better known as `lilo’ on Freenode was hit by a car when he was riding his motorcycle on September 12. He suffered head injury and was in coma. He passed away today early morning when his family decided to take out the life support. Though many people considered him obnoxious and irritating, Freenode proved to be critical to many Free Software projects. Adieu, my friend, and thanks for all the fish.

 

The Bliss of Free Wireless Sat, 26 Aug 2006 16:12:44 +0000

Filed under: General — Baishampayan @ 16:12:44

I am at the Barista in Koramangla, Bangalore at this moment. Though they don’t have WiFi at their premises, I am getting 5 cells from a nearby Kalinga Institute of Industrial Technology. w00t! I will write about the 4th International Conference on GPLv3 and my experience with rms later, when I reach my den …

 

Do you know this guy? Wed, 16 Aug 2006 18:08:19 +0000

Filed under: General — Baishampayan @ 18:08:19

I was watching The Codebreakers and I saw a person (in a split second frame) who looked very familiar to me. So is the person below Mahendra M? If he is indeed Mahendra, then I’d like to know how he got into the movie, and if he isn’t then it’d be all the more interesting ;)

Is this Mahendra?

 

Honey, I screwed up your laptop! Thu, 10 Aug 2006 09:01:48 +0000

Filed under: GNU/Linux, Hardware, Life, Ubuntu — Baishampayan @ 09:01:48

Something very odd happened just now. I noticed that Dapper was unable to keep correct time on the BIOS and was basically hit by bug #43661 which is OK compared to what happened next. I just went to the BIOS settings and fixed the time, and now it doesn’t boot at all! So what now? Oh well, it’s bug #43745 at work here :)

My options, either send the laptop back to Dell, or take out the BIOS cell to reset it. I will try the latter now, as sending the laptop back to Dell might be quite a PITA and I need this laptop now.

/me off to taking the laptop apart, wish me luck!

N.B - Somebody else had the exact same problem as me …

P.S - The actual owner of the laptop sounded very calm over the phone, either she didn’t understand the issue or she has too much confidence on my mad hardware skillz ;)

Update: I fixed the damn issue, w00t! I took apart the whole laptop only to realise that the BIOS battery is just under the keyboard, hehe. The XPS is a true engineering marvel, extremely tiny parts everywhere, so better send it back to Dell if you are not experienced enough in taking things apart and putting them back in. One tip to Dell users, stay away from the rtc kernel driver, in fact, better blacklist that bugger.

 

Check GMail the Python way Mon, 31 Jul 2006 21:05:21 +0000

Filed under: Google, Programming, Python — Baishampayan @ 21:05:21

Swaroop posted a nifty Perl script to check GMail. The script basically parses an Atom feed of the latest 20 mails provided by Google. Since a Python hacker like Swaroop is dabbling in Perl, I thought it was my duty as a Python evangelist (or is it Pythangelist?) to show the people that the same thing can be achieved using Python with equal ease :) The main code is around 50% of the total code. A large portion of the code is used for the pretty printing. Here it is —

## check-gmail.py -- A command line util to check GMail -*- Python -*-

# ======================================================================
# Copyright (C) 2006 Baishampayan Ghose <b.ghose@ubuntu.com>
# Time-stamp: Mon Jul 31, 2006 20:45+0530
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
# ======================================================================

import urllib             # For BasicHTTPAuthentication
import feedparser         # For parsing the feed
from textwrap import wrap # For pretty printing assistance

_URL = "https://mail.google.com/gmail/feed/atom"

def auth():
    '''The method to do HTTPBasicAuthentication'''
    opener = urllib.FancyURLopener()
    f = opener.open(_URL)
    feed = f.read()
    return feed

def fill(text, width):
    '''A custom method to assist in pretty printing'''
    if len(text) < width:
        return text + ' '*(width-len(text))
    else:
        return text

def readmail(feed):
    '''Parse the Atom feed and print a summary'''
    atom = feedparser.parse(feed)
    print ""
    print atom.feed.title
    print "You have %s new mails" % len(atom.entries)
    # Mostly pretty printing magic
    print "+"+("-"*84)+"+"
    print "| Sl.|"+" Subject"+' '*48+"|"+" Author"+' '*15+"|"
    print "+"+("-"*84)+"+"
    for i in xrange(len(atom.entries)):
        print "| %s| %s| %s|" % (
            fill(str(i), 3),
            fill(wrap(atom.entries[i].title, 50)[0]+"[...]", 55),
            fill(wrap(atom.entries[i].author, 15)[0]+"[...]", 21))
    print "+"+("-"*84)+"+"

if __name__ == "__main__":
    f = auth()  # Do auth and then get the feed
    readmail(f) # Let the feed be chewed by feedparser

And here is a sample output —

ghoseb@trinka:~$ python check-gmail.py
Enter username for New mail feed at mail.google.com: foo.bar
Enter password for foo.bar in New mail feed at mail.google.com:

Gmail - Inbox for foo.bar@gmail.com
You have 20 new mails
+------------------------------------------------------------------------------------+
| Sl.| Subject                                                | Author               |
+------------------------------------------------------------------------------------+
| 0  | Strip Whitespace Middleware[...]                       | Will McCutchen ([...]|
| 1  | [FOSS Nepal] list of free alternatives to windows[...] | Manish Regmi (r[...] |
| 2  | json serialization[...]                                | Gábor Farkas (g[...] |
| 3  | editable=False and "Could not find Formfield or[...]   | Corey (coordt@e[...] |
| 4  | IronPython 1.0 release candidate[...]                  | Jeremy Dunck (j[...] |
| 5  | django server tree organization[...]                   | Kenneth[...]         |
| 6  | Project when using multiple sites[...]                 | Jay Parlar (par[...] |
| 7  | [FOSS Nepal] Neprog (nepali version pogrammer for[...] | ujwal (ujwal2@g[...] |
| 8  | Bug#379789: wrong keymap on Intel MacBook Pro[...]     | Frans Pop (elen[...] |
| 9  | debconf is Level 1?[...]                               | Clytie Siddall ([...]|
| 10 | Weird slowdown with dev server behind nat[...]         | Akatemik (tpiev[...] |
| 11 | Database API question: I am not able to return a[...]  | DavidA (david.a[...] |
| 12 | Bug#379120: lspci present on i386, verify on[...]      | Eddy Petrişor ([...] |
| 13 | New levels of D-I[...]                                 | Eddy Petrişor ([...] |
| 14 | Installed Apps in settings.py[...]                     | limodou (limodo[...] |
| 15 | where u at man ... where can i call you ??????[...]    | Sanjeev[...]         |
| 16 | unable to runser ?[...]                                | Geert[...]           |
| 17 | Bug#380585: debian 3.1 install FD[...]                 | as_hojoe (as_ho[...] |
| 18 | Re: Translated packages descriptions progress[...]     | Michael Bramer ([...]|
| 19 | Loading an url takes 60 sec.[...]                      | and_ltsk (andre[...] |
+------------------------------------------------------------------------------------+
ghoseb@trinka:~$

Well, the code is obviously pretty rough. It’s just for showing newbies how to use feedparser and urllib, two very powerful Python libraries. Improvements, patches are welcome :)

The text source can also be downloaded.

 

The Dell XPS m1210 — a mini review Thu, 20 Jul 2006 17:36:25 +0000

Filed under: General — Baishampayan @ 17:36:25

After a lot of research, I recently got a Dell XPS m1210 for my girl friend. It’s a cool 12.1″ WXGA laptop with pretty much cutting edge features. It has an Intel T2300 Core Duo processor and came with 1 GiB 667 MHz DDR2 SDRAM and a 80 GB SATA HDD. It also has the usual embellishments like DVD RW, Intel Pro Wireless, 9 cell battery etc. All this weighs just around 2 Kg and costs around 1500 USD. So it’ll neither break your back nor will it burn a hole in your kitty :)

It came with something called Dell Media Direct which is some kind of embedded DVD player and would run without an Operating System. I clean formatted the hard drive and tried to install Ubuntu 6.06 LTS “Dapper Drake” on it. But I was struck by a known bug in the Ubuntu installer which frustrated me a lot. I installed Ubuntu on it finally by avoiding the bug somehow and everything went just fine afterwards. I thought that I’d need to compile and install the Wireless drivers myself but I was pleased to see that Ubuntu included the binary firmware in its restricted modules package. So everything worked just “out of the box” :) It was pretty amazing to see great support for relatively new hardware in GNU/Linux. The only thing that I had to fix by hand was the display resolution. X.org could detect only 1024×768 resolution which not only looked bad, but due to the different aspect ratio things looked a bit stretched horizontally. I fixed the problem by using 915resolution to over-write the display BIOS. I added an entry for 1280×800 in an unused slot and that fixed the problem just fine.

As far as the performance of the laptop is concerned, it’s just amazing. It’s very fast considering its size and I am sure it will beat any laptop in its class. It takes only around 25 secs for Ubuntu to boot, and < 30 mins to rip a DVD. What else can I say, I can’t really complain. At last, a really portable as well as usable laptop. I am really feeling like keeping it for myself and handing over my 3 year old Toshiba to her.

Though almost everything works fine by default I guess it’d be good to have a comaptibility matrix. So here it is –

1. Processor (Intel T2300 Core Duo) Works Needs SMP kernel
2. DVD RW Drive (Sony) Works -
3 SATA Hard Disk (Hitachi) Works -
4. Ethernet (Broadcom BCM4401-B0) Works Needs b44 module
5. Wireless (Intel 3945abg) Works Needs ipw3945 module, firmware, etc.
6. Display (Intel 950) Works Needs 915resolution to get high resolution
7. Sound (Intel 82801G) Works Needs snd-hda-intel module
8. Firewire (Ricoh) Works Needs ieee1394 module
9. Modem (Intel) Haven’t tested, but should work Most probably will work with the snd-intel8×0m module
10. Card Reader (Ricoh) Somewhat works Works with SD, doesn’t work with MMC
11. ACPI Somewhat works Suspend to RAM doesn’t work yet

The things that don’t work at the moment will start working soon as and when newer kernels are released. The hardware is very new, so small issues can be expected. Over all, it’s a very nice laptop to buy. I haven’t faced any quirks with it and seems to be very stable. Final verdict — great buy, very good hardware and very good value for money.

Toufeeq has also written a nice review of his XPS m1210, though his configuration differs slightly with mine it’s very useful.

Dell XPS m1210

 

Of women and Free Software Mon, 17 Jul 2006 16:40:05 +0000

Filed under: Free Software, GNU/Linux, Open Source Software, Rants — Baishampayan @ 16:40:05

I came back from Bangalore just today and saw an apparently interesting blog post by Vidya (aka Svaksha). She talks about the problems that women in FOSS face and goes on to explain the reasons why there aren’t many females in the FOSS world. While a post like this is very much welcome, what concerns me are her pre-concieved notions about the whole picture. I would like to adress them one by one –

  • How is being rude important or necessary? How actually do you define rudeness? Nobody supports a rude person, notwithstanding the gender or the project. I agree that sometimes newbies are flamed, but that’s mostly because of not reading the manuals or asking stupid questions. Nobody gets flamed on the basis of his/her gender.
  • How is “survival” an issue here? All Free Software projects are open to all and everybody can contribute to them. Either you contribute or you don’t. It all depends on how motivated you are. You need to remember that you are _not_ doing us any favour by contributing in a Free Software project. You do it to scratch your own itch. If your itch is bad enough, you will scratch it no matter how inaccessible / tough / hostile that itch is. Ditto with Free Software. It’s wrong to expect people to welcome you a red carpet just because you are female or come from a poor country. This is a level playing field after all.
  • About women being made moderators of the Ubuntu-IN list, what makes you think that just being a female gives anybody the right to moderate a list or admin a server? Do you think this kind of favourism or reservation really helps? What about a situation where patches by female kernel hackers are given preference over male kernel hackers? It will just result in a bad and buggy kernel. Not because I think females can’t code (of course they can), but because the very idea of having reservtaions in a Free Software project goes against the basic philosophy of Free Software. Admin access to a server or mailing list is not a right, it’s a privilege and it is given to only the senior or experienced members of the project as and when required. Nothing more or less. If I make an absolute newcomer an admin of a server just because she is a female, it will be rather a discrimination against more experienced people and I don’t think it will help the project in any way.
  • All the decisions taken in Ubuntu-IN were taken as a result of a consensus among all the members of the team. You didn’t care to participate in any way and just bombarded with impractical recommendations. We repeatedly asked you to provide feedback or participate but you preferred to lurk in those times and tried to blast us with false allegations instead. No we don’t discriminate against females, but we won’t give them any special treatement either. You have to earn all the respect and privileges by virtue of your work here and not your gender.
  • Mentoring women is important, but it’s in no way more important than mentoring equally new but interested men. I personally don’t believe that *-women groups serve any practical purpose as there are many men in those lists and the same people can’t behave differently in two separate lists. The problem they say, lies between the keyboard and the chair, and nothing else. It’s just a mental block among many females which is basically an hypothesis propounded by a handful feminist women. For example, not many women applied for the Google Summer of Code, but when GNOME Foundation announced the Women’s Summer Outreach Program, hundreds of women applied for that. Considering the fact that the WSOP had < 1% scholarships available, this little piece of statistic does suggest that the problem is actually somewhere else.

So Vidya, your assumptions are mostly wrong in this matter and I don’t know what you want to achieve by condemning all the men for their so-called rude behaviour and their discrimination against women. Instead of whining about the status quo and founding more foo-women groups why don’t you join the generic foo projects and try to change the situation? I am sure everybody here is ready to accept constructive criticisms. This is the best possible thing one can do to improve the situation, splitting projects merely to separate the women from the community is, if at all, a very bad solution. That is, in my very humble opinion.