Random notes from mg

a blog by Marius Gedminas

Marius is a Python hacker. He works for Programmers of Vilnius, a small Python/Zope 3 startup. He has a personal home page at http://gedmin.as. His email is marius@gedmin.as. He does not like spam, but is not afraid of it.

Thu, 26 Jun 2008

Testing Mango Lassi on Hardy

Mango Lassi is a GNOME program that lets you painlessly share keyboard & mouse (& clipboard too!) between computers. It's not packaged for Ubuntu yet so you have to build it from sources.

Big fat warning: Mango Lassi has no authentication and does no encryption, so use it with extreme care. Don't type any passwords over your unsecured WiFi network!

Here's how to get it working on Ubuntu Hardy:

$ sudo apt-get install git-core curl build-essential intltool \
    automake-1.9 libdbus-glib-1-dev libgtk2.0-dev libxtst-dev \
    libavahi-glib-dev libavahi-client-dev libavahi-ui-dev \
    libnotify-dev libglade2-dev
$ git clone http://git.0pointer.de/repos/mango-lassi.git/
$ cd mango-lassi
$ ./bootstrap.sh

Press Enter once at the prompt.

$ make
$ sudo make install

Now you can run it with

$ mango-lassi

When you're tired of it, go back to the source tree and type $ sudo make uninstall

If it only used an SSH tunnel for encryption & authentication, it would be perfect.

Porting it to Maemo would be an interesting project. Imagine copying and pasting URLs from your laptop browser to your N8x0 tablet browser. Is Avahi available for Maemo?

posted at 01:09 | tags: | permanent link to this entry | 0 comments

Sat, 21 Jun 2008

Asus EeePC 900

I unexpectedly acquired an Asus EeePC 900 last weekend. Lovely piece of hardware.

The Xandros distro was okay at first (IceWM brought me fond memories of the year 2000, when I used it). Then I started longing for Firefox 3 and the aesthetics of GNOME applications. Finally, when apt-cache search told me there was no SSH server package available, I gave up and installed Ubuntu Eee from a SD card. The software selection is incomparable (Asus/Xandros: 870 packages available, according to apt-cache stats. Ubuntu: over 30,000 packages.) Also, yay rotating cube desktop!

Things I like about the Eee:

Things that are bad:

My workhorse, a 14" Lenovo T61W, now seems huge by comparison:

Nokia N810 on top of Asus EeePC 900 on top of Lenovo ThinkPad T61W

I'm not going to stop using my N810 (which fits in a pocket, has a much longer battery life, and is more convenient for e-books or NumptyPhysics). I'll stop lugging my T61W around instead and start leaving it at work. The EeePC is an almost-perfect travelling laptop.

The upcoming Asus EeePC 901 is going to fix the lack of internal Bluetooth and the battery life. I wonder when it will become available in Lithuania. (The 900 is displayed in almost every electronics shop here. Yay Asus. Boo Nokia for not doing this with its Internet Tablets.)

posted at 22:56 | tags: , | permanent link to this entry | 2 comments

Sat, 14 Jun 2008

Object graphs with graphviz

This is a continuation of Python object graphs.

Continue reading this post...

posted at 02:45 | tags: | permanent link to this entry | 0 comments

Fri, 13 Jun 2008

Out of touch with reality

I used Windows at work until January 2002, when I changed jobs and went to Linux full-time. I barely remember what life was back then. Driver CDs you had to install before plugging in new hardware, shareware apps that you had to pay for and couldn't see how they worked, web pages full of blinking advertisements. Magic voodoo rituals you had to do to fix your IS when it broke down, that you had to do by rote without full understanding of how it all fit together.

These days I run Ubuntu. Hardware just works (or doesn't). Apps are an apt-get install away. Web pages I read mostly end in .org and rarely have obnoxious ads. The system breaks rather more often than I'd like, but at least there are no artificial obstacles in the way of debugging. Download the sources, recompile with debug symbols, go.

I am a programmer, and I've been one for many years now. I found something that works for me, and I'm mostly happy. I do not want to tell you how you should live your life, or what OS you should use on your laptop.

Recently I was hit on the head with the understanding that my point of view is somewhat atypical. As a programmer and a long-time Linux power user I have the skills and knowledge to download sources of applications, apply patches, and build packages. I don't view these tasks as development, because I'm not creating anything new. I'm just using the fruits of others' labour a bit earlier than I would have if I'd just waited for the next Ubuntu version to bring me the updated package in 6 months.

I want to apologize to timeless for expressing myself badly. I did not mean to complain or demand anything. I wanted to encourage transparency by disagreeing with a previous claim (which was that marking bugs as fixed was useless unless the developers provided updated packages for the current distro or released the next distro ASAP). But then I couldn't resist adding a poorly-written postscript and got the opposite reaction: timeless quoted my words as an example of How can people discourage transparency:

Personally, I'm disappointed that when a bug is closed as "fixed in diablo", as a user I've no idea how to get the updated package on my N810. I've got scratchbox handy, just point me at the new source package and I'll backport it -- but repository.maemo.org has no 'diablo' in dists/.

This is what I'm used to, with Ubuntu, and open-source software in general. When a bug is fixed, I get a choice: wait for the updated package, or dig out the fix from the publicly available version control system.

It's what I'd like to have, but not something that I demand of Nokia (or its employees). I do not think I have the right to demand it from anyone.

I should finally learn to think more and write less.

posted at 23:01 | tags: | permanent link to this entry | 0 comments

Python object graphs

My post on hunting memory leaks in Python received a lot of feedback via email. And both^H^H^H^H most of them asked for the source code.

Aside: if someone could recommend a good spam-proof comments plugin for PyBlosxom, I'd be very grateful. I see six plugins on the main site and it's unclear which combination is the one I need.

So, here's the mysterious checks module I used in the post. There's nothing complicated in it, just a bunch of ad-hoc functions I wrote in an afternoon. I'm sure you could do better.

Continue reading this post...

posted at 16:38 | tags: | permanent link to this entry | 0 comments

Thu, 12 Jun 2008

Hunting memory leaks in Python

At work the functional test suite of our application used up quite a lot of RAM (over 500 megs). For a long time it was cheaper to buy the developers an extra gig of RAM than to spend time hunting down a possible memory leak, but finally curiosity overcame me and I started investigating.

Warning: long post ahead. With pictures.

Continue reading this post...

posted at 01:04 | tags: | permanent link to this entry | 4 comments

Fri, 06 Jun 2008

PowerTop as GNOME applet?

Dear lazyweb,

Where's the GNOME applet that can show me my laptop's power usage in Watt? I cannot believe that nobody has written one yet.

posted at 00:21 | tags: , | permanent link to this entry | 1 comments

Sun, 01 Jun 2008

LinuxTag 2008, day 4

The last day. Saw a bunch of interesting talks about freedesktop.org, Ekiga, GNOME and Ubuntu. Jono Bacon's talk was very interesting. I think if Nokia is interested in building a healthy developer community, they would do well to talk to Jono about it.

Got a USB gender-bender from Kees Jongenburger -- now I can plug in USB devices to my N810, provided that they don't require too much power (extra software required: usbcontrol from Maemo Extras). I owe you one Kees!

Discovered that the GNOME booth does in fact have T-shirts for sale, they're just not out on display like in other booths. Sadly, since I discovered that during the last hour of the last day of the conference, only extra large T-shirts were left. Spent my last 10 EUR in cash on the T-shirt anyway. ;-)

Met MaryBeth Panagos from OpenMediaNow, learned about interesting happenings with Gnash, open media codecs and Ubuntu Mobile. Raised my hopes for a brighter future. Showed off my N810 and expressed my hopes for Gnash replacing the closed Adobe Flash player on it. It won't happen any time soon -- everyone wants it now!, but there are few developers actually working on it.

Went to a very geeky cafe/computer club c-base for the Ubuntu BBQ. Almost didn't find the place, but one of the LinuxTag guys happened to be going back at just the right moment to show me the path hidden behind the bushes.

Feeling content now. Well, missing free (or at least paid, but working -- boo, Swisscom, boo!) WiFi at the hotel, but other than that I've had a wonderful time.

posted at 16:23 | tags: | permanent link to this entry | 0 comments