Diary of a geek

August 2007
Mon Tue Wed Thu Fri Sat Sun

Andrew Pollock


Other people's blogs


RSS feed

Contact me

JavaScript required

Monday, 27 August 2007

On hydrogen powered cars

Russell Coker very effectively debunks hydrogen for fuel.

In my opinion, the only reason the oil companies and various shall we say pro-oil governments are getting behind hydrogen is because they know it's completely untenable. They can say "but look over here, we're researching clean energy" knowing full well that it's years away (if at all). It's a diversion, that's all.

Meanwhile, we've had perfectly viable electric cars in the mid-1990's, yet fast-forward ten years, and apparently it's only just become commercially viable to have hybrids. Talk about regression.

Something's really wrong with the world.

[23:30] [opinion] [permalink]

New toy

It seems you can't have a baby without getting a digital SLR camera to take photos of them, so we ordered a Nikon D80 from B&H. It arrived this evening.

In the lens department, we got a Sigma 28-70mm f/2.8-4 high speed zoom AF, a 55-200mm f/4-5.6 AF, and a 50mm f/1.8. So far we've just been fooling around with the 50mm.

Now we just have to figure out how to use it. Lucky we've got 21 days.

[22:40] [life] [permalink]

Thursday, 16 August 2007

Time to make shipping md5sums policy?

I'm pleased to learn from Romain Francoise that only 3.1% of packages aren't shipping md5sums of their contents. I was pleasantly surprised recently to discover that the level of participation seemed to be a lot higher than I'd previously thought.

So given that Debian tends to make things policy after they've got broad adoption, I wonder if we should make providing md5sums standard practice now?

The RPM proponents have always touted rpm -V as one of the things that it did that Debian didn't.

[20:51] [debian] [permalink]

Wednesday, 15 August 2007

Hidden gems in the GNU C Library

I should really read the GNU C Library documentation. Even if only 10% of it sinks in, I'll be that much the wiser for it.

Today's (re)discovery: libSegfault.so

I actually found this with a co-worker a few months ago, and promptly forgot all about it until he reminded me today whilst I was lamenting about Cfengine segfaulting on me.

Here's a lovely self-illustrating example:

apollock@icarus:~$ sudo chmod a+x /lib/libSegFault.so
apollock@icarus:~$ /lib/libSegFault.so
Segmentation fault
apollock@icarus:~$ # Aww
apollock@icarus:~$ LD_PRELOAD=/lib/libSegFault.so /lib/libSegFault.so
*** Segmentation fault
Register dump:

 EAX: 80003f00   EBX: b7ff1ff4   ECX: 00000000   EDX: 00000000
 ESI: bf88b97c   EDI: 800008b0   EBP: 00000000   ESP: bf88b974

 EIP: 00000001   EFLAGS: 00010282

 CS: 0073   DS: 007b   ES: 007b   FS: 0000   GS: 0033   SS: 007b

 Trap: 0000000e   Error: 00000004   OldMask: 00000000
 ESP/signal: bf88b974   CR2: 00000001


Memory map:

80000000-80003000 r-xp 00000000 08:02 8589       /lib/libSegFault.so
80003000-80005000 rwxp 00002000 08:02 8589       /lib/libSegFault.so
80005000-80026000 rwxp 80005000 00:00 0          [heap]
b7e61000-b7e6b000 r-xp 00000000 08:02 6254       /lib/libgcc_s.so.1
b7e6b000-b7e6c000 rwxp 00009000 08:02 6254       /lib/libgcc_s.so.1
b7e6c000-b7e6d000 rwxp b7e6c000 00:00 0
b7e6d000-b7faf000 r-xp 00000000 08:02 8572       /lib/libc-2.6.so
b7faf000-b7fb0000 r-xp 00141000 08:02 8572       /lib/libc-2.6.so
b7fb0000-b7fb2000 rwxp 00142000 08:02 8572       /lib/libc-2.6.so
b7fb2000-b7fb5000 rwxp b7fb2000 00:00 0
b7fce000-b7fd1000 r-xp 00000000 08:02 8589       /lib/libSegFault.so
b7fd1000-b7fd3000 rwxp 00002000 08:02 8589       /lib/libSegFault.so
b7fd3000-b7fd5000 rwxp b7fd3000 00:00 0
b7fd5000-b7ff1000 r-xp 00000000 08:02 8569       /lib/ld-2.6.so
b7ff1000-b7ff3000 rwxp 0001b000 08:02 8569       /lib/ld-2.6.so
bf879000-bf88f000 rw-p bf879000 00:00 0          [stack]
ffffe000-fffff000 r-xp 00000000 00:00 0          [vdso]
Segmentation fault

This is somewhat similar to Tridge's segv_handler, which used to be what I reached for in these sort of situations, but that was a bit fiddly to get set up. This is significantly easier, and already installed as standard.

Of course, interpreting the output is left as an exercise for the reader.


Or you can just use catchsegv(1)

[22:27] [tech] [permalink]

Tuesday, 14 August 2007

Latest due date...

[21:18] [life] [permalink]

Thursday, 09 August 2007

Amazon Marketplace is less crap

After my venting yesterday I received an email from an Amazon employee who reads Planet Debian, and he pointed me at http://www.amazon.com/gp/help/customer/display.html?nodeId=537868, which covers how to make a claim.

I've no idea how one is supposed to directly find that page, as it didn't jump out at me when I went looking.

I've filed a claim, we'll see what happens...

[23:02] [opinion] [permalink]


Got my Linux Fund credit card today. I've been wanting one ever since I moved to the US, but they haven't been accepting applications for a long time.

I don't know how the various credit card companies decide what limit they're going to offer people (beyond credit score). Some companies have given me thousands, others only a few hundred.

I'd sworn off applying for any more cards just for the heck of it, but hey, this one's got Tux on it!

[21:56] [geek] [permalink]

Wednesday, 08 August 2007

Amazon Marketplace is crap

I ordered a book on June 26. It never arrived. It appears that Amazon doesn't want to get involved with such disputes at all, and tells you contact the seller. It doesn't tell you what to do if the seller never gets back to you...

[21:37] [opinion] [permalink]

And the winner is...

Gustavo Franco with madison-lite

Screw writing something, what I had in mind was something exactly like madison anyway. Pity I didn't think to just use it. Duh.

Now if only the repository in question didn't have such an incredibly shite layout, I could achieve what I want to achieve without having to have multiple config files and multiple runs of madison-lite with multiple configuration files.

[21:31] [debian] [permalink]

It's a small world

I just had one of my former employees connect to me on LinkedIn, and I've always wondered if one of my tenants was related to him, because they shared the same surname.

Looking at the former employee's network in LinkedIn, I'd say the answer is yes, given they're in each others networks.

[09:05] [life] [permalink]

Tuesday, 07 August 2007

Everybody hates Mark

So Mark doesn't like the SPI board election results and has decided to call the largish whack of people who didn't vote for him and tell him ahead of time or something "cowards".

Personally, I'm of the school of thought that if you haven't got anything nice to say about someone, don't say anything at all, but, well, here we are...

I forgot whether I put him last, but he was certainly ranked towards the back of the pack. Why? I don't like rabid people. Rabidly anything shows a lack of balance to me. Mark's rabidly anti-Google (amongst other things) (sure, I work for them, but I liked them before I went to work there, otherwise I wouldn't have gone to work there) and frankly, it irritates me. Almost as much as someone else I know being rabidly anti-Microsoft/pro-Linux irritates me sometimes.

Balance is good, and I'd rather have people on the board that I know, and I know in a positive light, over people that I don't know, or known I don't like. So I ranked my ballot in reverse order of people I knew I didn't like, then people I didn't know, then people I knew, then people I knew I liked. Simple as that. Oh, and I'm not a big fan of debian-legal, or anyone who purports to be an armchair lawyer on that list.

Sorry if that damages your precious ego, Mark. Now get back to bashing my employer, Debian UK, and pontificating about what's allowed to be in Debian.

(Oh, and I don't object to you having your own opinion, I object to you restating it over and over and over again. But it's your blog, and you're free to portray yourself to others however you please, just bear that in mind when you go standing in elections.)

[23:14] [opinion] [permalink]

Oh, baby!

Today we went to see our new obstetrician. Ironically, he was our second preference (our current, third preference, who hasn't been all that endearing anyway, is going to be out on sabbatical when the baby's due).

I think we'd already decided we liked him better before we even met him, but he did come across as a bit more calm and less alarmist.

That said, he is currently of the opinion that the baby should be delivered at 36 weeks, which is September 14, which is a few weeks earlier than the date we were throwing around, of October 8 (Sarah's Mum and Aunty arrive on October 6).

So that's going to make things interesting. We're seeing him again next week, which is after Sarah's had another echo-cardiogram to see if her aneurysm is still stable. The results of that will help firm up the delivery date.

He also said that because the 28-32 week mark is when the heart's working the hardest, we're really in the danger zone now. It looks like we won't be going camping next week after all. The doctor didn't think being 6 hours by car away from home was a terribly good idea.

[22:48] [life] [permalink]

Doing random repository things with Python APT?

Dearest Lazyweb,

I want to write a program that I can point at a standard repository, and an in-house one, so I can track version differences between common packages.

I wanted to write this in Python, so python-apt sprang to mind, however the documentation is somewhat lacking, and none of the examples include retrieving a package list from anything other than the local APT cache.

The documentation in libapt-pkg-doc is also rather lacking.

So before I go giving up on using a "proper" library for the task, I thought I'd reach out.

Love, and sloppy kisses,


[12:35] [debian] [permalink]

Monday, 06 August 2007

Squid 2.6 redirector API change pain

So it seems that Squid changed its redirector API with 2.6. This pissed me off no end once I got to the bottom of a problem related to it at work last week.

Squid's had redirector functionality since, oh, last century, and it's a really handy feature, if you want to intercept URLs that Squid's handling, and change them to something else. I've used it in a past life at an ISP to force people to use a local mirror for various things, regardless of where they think they want to go.

So for the longest time, the API has been documented that an external program, which Squid will attach to the stdin and stdout of, will receive on stdin four words on a line, pertaining to the URL being requested: the IP address/FQDN of the client requesting it, the username of the user, if they've authenticated to the cache, and the HTTP method being used.

All good. So we had an in-house redirector script, which used a regex (^(\S+) \S+ \S+ \S+)$) to determine if it should apply any logic to the URL at all, or just output a newline, meaning no redirection should occur.

So along comes Squid 2.6, which changes that API. It now passes in five things on stdin. The changelog has an innocuous "Added to the redirectors interface the support for SSL client certificate" entry, so I presume on a good day, that's what is passed in as the fifth word instead of a hyphen.

Anyway, our redirector script started not rewriting anything at all, which made some other stuff break spectacularly. It was most fun in one location, where we had four proxy servers behind a load balancer, and two were running Squid 2.5 and two were running Squid 2.6. Yay for non-deterministic behaviour.

So once I'd tracked down the problem, I swore a lot, and changed the regex to be ^(\S+) \S+ \S+ \S+( \S+)?$ and proceeded to rant at anyone and everyone within earshot on how messed up this whole situation was.

The thing that is irritating me the most is that this seems to have been a fairly poorly communicated change, as best I can determine. It happened between Squid.2.6.STABLE1 and Squid.2.6.STABLE2 (hmm, stable?). I mean, the FAQ hasn't even been updated. This clearly caught out other projects like jesred that provide generic extensible Squid redirectors, looking at #381984. I wonder if SquidGuard in Debian Etch is busted?

So, whilst Squid 2.6 (the release that changed this behaviour anyway) is just over 12 months old, if you haven't upgraded yet, and you have custom redirectors, consider this rant a head's up.

[17:11] [tech] [permalink]

Sunday, 05 August 2007

I think I've found the one...

I previously thought I'd found the perfect small, low-power system in the Fulong, but that's proving unobtainable outside of China for mere mortals.

Then I discovered the Zonbu. Love at first sight (of >= 4 USB ports and PS/2). It's perfect for what I want. The question is, can I readily hack it to run the Linux distro of my choosing? Will ATA over Ethernet suck badly on it?

There's only one way to find out...

[15:12] [tech] [permalink]

Saturday, 04 August 2007

On Kevin Andrews' suspicions of Mohammed Haneef

I've been following this whole Mohammed Haneef thing back in Australia with some interest. The Government seems to have quite the track record for trumpeting some sort of national security thing around an election. First it was Tampa, then it was the children overboard affair, now it's Haneef. I expect this one's backfired a bit.

Kevin Andrews keeps coming out and saying it's suspicious how Haneef was trying to skip the country, or it's suspicious how he left as soon as the charges were dropped, instead of sticking around to see how the appeal went.

Let's see. If I had a new baby born in another country, that I hadn't seen yet, and I'd been incarcerated for however long it was, I don't think I'd be hanging around to find out the outcome of some bureaucratic bullshit in the country I'm not even a citizen of (but wouldn't mind being able to continue working in). I'd want to go see my new baby. I wonder if Kevin Andrews has any children of his own?

We have a track record of having some very cold Immigration ministers.


It seems I'm not the only one of this opinion.

[23:26] [opinion] [permalink]

T minus ~9 weeks and counting...

So, depending on who you talk to, we've got about 9 weeks to go, or maybe 8 weeks. It all depends on whether we can have our way and have a caesarean on the 8th of October. Of course, the baby may have other thoughts on the matter as well...

We've had our last planned house guest until Sarah's Mum and Aunty arrive, so we've put the mattress in storage and donated the bed frame to Goodwill.

We've acquired a crib (I keep wanting to call it a cot) and a changing table/chest of drawers and put them in place in the baby's room. Last night we bought a car seat. I think the only major item left to get is a stroller.

Sarah's pregnancy is still going well. The baby's still extremely active, and has had the hiccups quite a few times in the last week. Apparently that's him trying to breathe. I'm somewhat surprised they don't drown in there trying to do that...

Speaking of breathing, our overly cautious obstetrician wanted Sarah to have two shots of steroids, to aid in the baby's lung development "just in case" he was born (or had to be delivered) very early. We felt it was somewhat unnecessary, but thought we'd be kicking ourselves if something happened and we didn't do it. There didn't seem to be any outrageous adverse effects from doing so, so we went along with it.

Twice in a week (the second time today) Sarah's had blurry vision followed by a headache, so she called up the hospital today when it happened, and they told her to come in and get checked out. We spent about 4 hours in labor and delivery this afternoon. It turns out the reason they wanted us to come in was because the symptoms could be a sign of preeclampsia.

The tests proved otherwise, and they couldn't really offer an explanation for what was going on other than migraines, so they eventually sent us home again. It was nice to get a preview of hospital's labor and delivery ward.

[22:47] [life] [permalink]