Older blog entries for richdawe (starting at number 125)

20 Jul 2007 (updated 1 Sep 2007 at 21:06 UTC) »

Perl and DTrace

I finally got DTrace working on Perl, as described in Alan Burlison's blog post on how to DTrace Perl. I have a patch to add DTrace support to Perl, which includes some instructions and example scripts.

I'm giving a talk on DTrace and Perl next Wednesday evening at Birmingham Perl Mongers.

Syndicated 2007-07-20 11:44:29 (Updated 2007-09-01 20:38:36) from richdawe

Got me some OpenID

I finally signed up for an OpenID identity with MyOpenID. I'd been meaning to try out a single sign-on scheme for a while. OpenID hits all the right buttons for me: open, lots of implementations, low barrier to entry (compare that with Microsoft Passport).

I found the following blog post and sites helpful:



The process was pretty straightforward, with one twist. I wanted my OpenID name to be rich.phekda.org, i.e.: to delegate from my personal domain/host to the actual OpenID server. OpenID is designed to support this.

Here are the steps in getting it working:


  1. Read lots of web pages about OpenID. ;)

  2. Sign up for OpenID at MyOpenID.

  3. Test out my new OpenID richdawe.myopenid.com by using OpenIDEnabled's test page, and also by logging into LiveJournal with OpenID.

  4. Set up a virtual host on my web server for rich.phekda.org.

  5. Create a basic web page for rich.phekda.org.

  6. Set up the OpenID delegation. Add the link and meta tags to rich.phekda.org's web page, as described in "Use your own URL as an OpenID".

  7. Test out my new OpenID rich.phekda.org by using OpenIDEnabled's test page, and by posting on Wez's blog.



One thing I was hoping for is that I could log into LiveJournal with my OpenID, rather than my actual username. Currently there is no link between LJ account and an OpenID, so that isn't possible. The OpenID does allow people to authenticate themselves, so that comments can be tied to a particular OpenID.

Syndicated 2007-07-11 09:59:11 from richdawe

Some thoughts on the podcast of the "4-hour Workweek" at SXSW

A former colleague of mine sent me a link and some comments on the podcast of the  "4-hour Workweek" session by Tim Ferriss at SXSW. Here are my thoughts:

I have to admit that I was pleasantly surprised. I was expecting some  trivial fluff. It turned out that the book title over-trivialises his message (in my opinion), and that there's something for everybody.

I certainly noticed that checking e-mail two or three times a day does increase productivity a lot. But I hadn't thought about using an auto-responder to, er, "educate" people who expect instantaneous/quick responses (especially to counter the infamous "have you read my e-mail"  phone calls).

I think he hit the nail on the head with busyness vs. productivity. I found that in trying to engineer software that it's very easy to try to cover everything, which results in a long to-do list of loose ends (and hence crap tasks).

Deciding the importance of tasks is hard. His suggestion of using metrics is good, but I'm not sure how you apply that to small tasks. Maybe none of the small tasks are worth doing. He did also say that his answer was the quick one, so I'd be interested to know if he goes into more detail in the book.

I was hoping he'd say more about his comment about retirement: "What do you do when retirement not an option?". I'd come to the conclusion that I would work right up until the end in some capacity, probably not full time.

I'm not sure his strategy of employing lots of Indians would work in Software Engineering. I mean, if you outsourced 90% of your work to  Sierra Atlantic, say, how would you convince your employer to continue employing you rather than SA directly? I wonder if the technique could be more usefully applied to personal life, e.g.: "please manage my stock  portfolio", or "find me the best private medical health insurer".

Syndicated 2007-07-09 17:10:23 from richdawe

Test::YAML::Meta and Fedora 7

Following the last Birmingham Perl Mongers, I decided to add checking of the META.yml file to File::ExtAttr. There is a module to do this called Test::YAML::Meta.

Test::YAML::Meta is not packaged by Fedora (yet), so the first step was to package that. That required a newer version of Test::More. One nice thing about Fedora 7 is that the perl rpms have been split up, so now you can actually update core Perl modules smoothly -- no force installs, no conflicts, no verification failures. The resulting rpms are here: http://yum.phekda.org/fedora/F7/

Once that was done, it was pretty simple to create a test:

[rich@katrina File-ExtAttr]$ cat
t/04yaml-meta.t 
#!perl -w


use strict; use Test::More; eval "use Test::YAML::Meta"; plan skip_all => "Test::YAML::Meta required for testing META.yml" if $@; meta_yaml_ok();

VMware-server and Fedora 7

It turns out that VMware-server on Fedora 7 x86_64 is completely broken, due to an interrupt handling fix in kernel 2.6.21. My x86_64 hangs hard whenever I try to boot an OS in VMware.

One solution is to downgrade to 2.6.18 from FC6. I rebuilt the FC6 kernel source rpm on F7; resulting rpms here: http://yum.phekda.org/fedora/F7/x86_64/. Just install the kernel and kernel-devel rpms, and edit /etc/grub.conf to default to the 2.6.18 kernel (if you want). Everything has been peachy VMware-wise since installing those.

2.6.20 apparently also works, but I remember having hanging issues with that when I was running FC6 + updates.

Birmingham Perl Mongers

I gave a lightning talk on File::ExtAttr yesterday, which seemed to go down well. The questions were good, and identified a gap in my testing (xattrs on directories).

I enjoyed the process of writing the talk. I spent some time looking through the stock photos on iStockphoto, to choose a background for the first slide. I was impressed by the range, and the ease of finding suitable images, along with the cheap price (< 1 USD for a small copy). Given I winged the talk, I was pleased that it actually came to 10 minutes.

The other talks on AJAX with OpenThought and writing a module for CPAN were very interesting. I came away with a long list of things to look at. ;)

VMware-server 1.0.2 / 1.0.3 on Fedora Core 6 / Fedora 7

Note to self: Here is the patch that needs applying to /usr/lib/vmware/modules/source/vmmon.tar, to enable VMware-server 1.0.2 / 1.0.3 to work on Fedora Core 6 / Fedora 7.

diff -pur
vmmon-only/include/compat_kernel.h
vmmon-only.older/include/compat_kernel.h
--- vmmon-only/include/compat_kernel.h	2007-04-13
04:24:09.000000000 +0100
+++ vmmon-only.older/include/compat_kernel.h	2007-04-27
21:50:34.000000000 +0100
@@ -18,7 +18,9 @@ extern int errno;
  * provided by x86-64, arm and other (but not by i386).
  */
 #define __NR_compat_exit __NR_exit
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19)
 static inline _syscall1(int, compat_exit, int, exit_code);
+#endif
 
 
 /*

Life Is Like A River

Is it April already?

In January I discovered that ipodfs had at least two users (including me). Unfortunately it didn't quite work for the other user, so I put out an ipodfs 0.5 bugfix release. I also discovered the other day that there's a similar iPod filesystem called FUSEpod. ipodfs seems a bit minimalist in comparison, since it meets just the needs of me and my iPod Shuffle.

In February I went to FOSDEM, which was a very inspirational conference. It reminded me why I program computers (excitement, building something new, learning new technologies), and what I wasn't getting out of my job.

In March I gave a lightning talk on FOSDEM 2007 to Birmingham Perl Mongers, which seemed to go down well -- they're a friendly bunch. The talks at Birmingham.pm were excellent -- the one on Selenium blew my mind.

Today I put out a 1.02 release of File::ExtAttr File::ExtAttr, which fixes a critical bug on Linux in listfattr(), which returns the extended attribute names that a file has. Guess what was missing from the test suite? Yes, tests for listfattr().

csv wrote: "[...] we realized that at least in Linux, you don't need to own a file to overwrite to it by means of mv. However, when cp'ing to it, you won't be able to do it."

I believe this is the solution: mv will create a new inode, with its own permissions, whereas cp will overwrite the existing file. mv requires directory write permissions, to allow you to unlink the old file and create a new inode with the same name. cp requires file write permissions.

company: I don't seem to be able to contact you via IRC and the mailing list swfdec@lists.sourceforge.net doesn't seem to exist. Also, where is the main site for swfdec? I see references to freedesktop.org, sourceforge.net, and the other one.

swfdec 0.4.0 seems to work OK on x86_64 for e.g.: Beta Recordings, including music -- impressive!

I've produced some Fedora Core 6 packages of swfdec for i386 and x86_64.

Thunderbird vs. HTML/XML

On a few occasions I've found that Thunderbird has been really, really slow when forwarding mails containing HTML or XML. I finally debugged this a little, and filed Bug 365419 – Composition very slow when forwarding mail containing HTML/XML. As far as I could tell, this is unrelated to the spell checking bugs already filed and fixed in TB 2.0.

I quite enjoyed debugging this. I used strace and lsof to work out that CORBA calls were taking a long time (a second or two), and to notice that Thunderbird seemed to be doing a lot per message. I tied Thunderbird and ORBit2 together by looking at open file descriptors and filenames (Unix domain socket with linc in its name is a giveaway). I got the application's point-of-view using NSPR's debugging, e.g.:

export NSPR_LOG_MODULES=all:5
export NSPR_LOG_FILE=/var/tmp/thunderbird-20061230.log

Debugging it was actually easier than finding anything on Mozilla's website about how to debug Thunderbird. Thank goodness mozilla.org is searchable.

116 older entries...

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!