I’ve been tilting at windmills, recently.
Windmill, actually.
It’s a Python program that lets your computer drive a web browser, without any human interference. We use it at Akoha to run tests that make sure that our website works with Firefox.
We use it to help us test our site with Internet Explorer. So I dutifully set up a Windows machine and tried to get it to run our test suite. I quickly realized that our software was going to need something more Unix-like.
Cygwin is the answer to that problem. It provides a full POSIX environment inside Windows. I built all our software and tried to fire up Windmill.
ImportError: No module named _winreg
Uh oh! Windmill needs to access the Windows Registry. According to the winreg documentation, it’s only available for Windows. Apparently, Cygwin doesn’t count as Windows. So I spent the weekend writing a library that fills in the gap.
cygwinreg allows you to read, write, and explore the Windows Registry from inside Cygwin. Whenever you want to use winreg, use cygwinreg instead.
import sys if sys.platform == "win32": try: import winreg except ImportError: import _winreg as winreg elif sys.platform == "cygwin": import cygwinreg as winreg
After I did that, I plugged it in, stepped back and ran my tests. They worked!
Download cygwinreg
or install it with
easy_install cygwinreg
Akoha’s sister company, Standout Jobs, has been hosting Montreal on Rails for quite a while. We figured we’d get into the act.
So we’re sponsoring the first Montréal Python gathering tomorrow. Sadly, we don’t really have enough space for everyone, so we’re commandeering the Standout Jobs offices upstairs. After all, what good are siblings if you can’t ask them for favours?
I will actually be on a train to Toronto, so I’m going to miss David Goodger talking about crazy awesome stuff he does in Python. But you should go!
Intimidated? Don't think that Python is for you? Worry not! Python programmers are friendly, charming, and helpful.
Montréal Python 1
Thursday, 7 February 2008
18:30 – 21:00
Standout Jobs
3981 boul. St-Laurent #615
Free admission
( Website | Facebook | Google Maps )
I attended class this morning.![]()
Well, sort of. I showed up in #ubuntu-motu-school where I led a session on how to triage bugs.
I got some pretty good attendence, even though there wasn't a lot of fanfare about it. And we certainly got a few newcomers to the BugSquad, which is always important.
There's a transcript of our little tutorial that you can read, if you feel in the mood. And please, join us in the fight against bugs!
Daniel and Sebastian inform me that we have a plethora of desktop bugs. GNOME bugs. KDE bugs. That's because we've got new versions of GNOME and KDE in the archive for Edgy Eft.
We want your help. Yes, you!
Join the #ubuntu-bugs IRC channel on irc.freenode.net. You can help by triaging new bugs that come in. Or you might try your hand at fixing some of them.
You can read up on some more information. Or you can jump right in. We're a friendly bunch! *hugs*
Come join us for bug-squishing fun. Except for the one above: magicicadas are harmless.
People who know me know that Perl is my favourite programming language ever.![]()
Today, a co-op was complaining about how some variables in Perl consist only of punctuation. But that is not a reason to hate Perl, it is a reason to love it!
Here's a one-liner, to prove my point:
perl -le'*{$#_}=sub{world},s;"*;$,=$";e,*{$"}
It is easy to have a good time in Waterloo, if you try. Especially if you import people like
pphaneuf, whom I don't get enough time to hang out with in Montréal. The humour is not lost on me, I assure you.
holdenk hung out with
math_foo for a while, whom he hadn't seen in forever. Where forever was last Wednesday. I made friends with Timin, who seems to have forgiven me. But he has retained
mricon's training and still bites the hand that feeds him. Playfully, of course.
We played some games at
ayria's place, after I wrote a small random number generator to substitute for a lack of dice. But then I realised that I used too many characters:
perl -pe 's/.*/rand(6)%6+1/e'
I made dinner reservations, which are mostly unnecessary in Waterloo. And then eight of us showed up at Ellison's Bistro and had a wonderful time. I must admit that I had to resort to bribery to get some people to join us. But in the end it was worth it, even though both of them would have been procrastinating anyway.
There was a slideshow we watched of party photographs that
azrhey had taken. Boy, does that girl have a two-track mind. It is interesting to note that Holden and Pierre are set up to be arch-enemies. One is pantsalicious while the other isn't. One day, one of them will grow up to be Evil and the other will have the moral obligation to thwart him.
After driving some people around, I went over to
musicdieu's place where we trashtalked a bit, just like I did the last time I visited him. Then I passed out. Without the assistance of Zubrówka. When I awoke, it was 5:00 and I drove
morethanreal home.
I found myself on one of her three couches at 9:30 and made a couple of kettles of hot water, because I was quite cold. I sat in the kitchen for a couple of hours, hoping she'd wake up so we could get some breakfast. But that didn't happen. So I drove back to Math's place and the three of us went on a quest to get brunch.
Nobody is open for lunch on Sundays in Waterloo. Nobody except Bánh mì Givral Deli which serves cheap and delicious submarine sandwiches. We filled up on these and headed back. Whereupon Holden tried to give me more relationship advice.
Holden and I drove back and along the way I took a five-minute nap that stretched into an hour. No worries though, I dropped him off at Sheppard station and headed downtown. I needn't have rushed since the train was very, very late.
Now that
pphaneuf has returned from his journey to France, we have a lot more trouser dropping in the office.![]()
To convince people that we actually do work around here, I'd like to point out that I released WvDial 1.56.
It has only one change, which is quite embarassing to have had to make.
My day at the office has been pretty grand.
I got to talk with a whole bunch of people about their problems and promised to look into some of them. Then I talked to someone about sales and marketting. Then I talked to Chris and we struggled with PHP. And finally, a chat with Tim about release management.
It was like a day at the Montréal office, but with people who are less bouncy. I tried to smile at people and make them feel happier, at which I think I was mildly successful. Perhaps my motivational poster will help?
I had some tasty phở for lunch at Phở Viêt which is a Vietnamese restaurant run by Cantonese people. It is also within walking distance of the office. Their soup was rather filling for a small portion and they had delicious spring rolls. Alas, they are not UltimateSpringRolls, but one can't expect to find those everywhere. A special bonus was that I got to talk with Deidra, in between happy bites of noodles and soup.
It is now late and I guess I should be heading out. I was hoping to hang out with people after work, but they seem to have gone home. Oh well.
So to pass the time, I released WvDial 1.55.
Hurray!
I suppose it would be a good time to mention that http://open.nit.ca is up and running on a nice new server in Montréal. That's the website that hosts all of NITI's free software offerings.
About two months ago, our mailing lists were eaten by a disk failure. We've managed to get the archives back, from our subscription lists are all gone. But I've got them up and running now, on GNU Mailman no less, and have subscribed some people to them.
They have doubtlessly noticed this because spammers have been hitting two of our mailing lists like crazy. After going into denial for a while, I have decided that I ought to moderate these posts.
Oh hey. The new XPLC got into Debian. Too bad we realised that we need to kick in another change soon. Ah well. I look forward to pushing out a WvDial release over the holidays, as it really needs to get out the door now.
I've been struggling to get WvDial out the door for about two days now. This is why I'm still in the office at five in the morning. I thought I was just about done when I discovered the plethora of Debian bugs filed against it.
WvDial is a magical piece of software that figures out how to talk to your modem to get you connected to your ISP. It used to be very popular back when everyone in North America used dial-up access to get on the newfangled Internet. Nowadays, many people have broadband service, so it's popularity has waned.
However, people are starting to use bluetooth mobile phone modems now, so we're seeing a resurgence in popularity. Which is why, of course, I'm hoping to get another release out the door. I have the impression that I can't fix all of the bugs this time around, mostly because I don't have the hardware. But the easy ones should be solved so that we can concentrate on the tough problems.
I feel compelled to tell you that I've released WvStreams 4.2.
I was going to tell you how wonderful WvStreams is, what new features it has, and how excited you should all be. Except you'd only be really excited if you're a C++ programmer. And need a library that does what WvStreams does.
But if you do, it's just grand.
A couple of months ago, the server at work which hosted a lot of our Free Software things was pulled off-line. So I think I shall try to get our mailing lists working; we have a new machine in the corner that seems to be a likely candidate for this sort of thing.
With Eric Côté's help, I've discovered some bugs in finger-ldap.
And because he had the most puzzling problem, I've worked for several hours on it. How that was resolved is not particulary important. What is important is that I've just pushed out version 1.3.
Never heard of finger-ldap? That's because I wrote it.
But seriously, it's only really useful for people who use LDAP as their name-server source. But if you do, you owe it to your users to install it. Finger runs so much faster if your entire LDAP database isn't slurped down to find a user.
Over the past three days, I've been doing a bunch of work on the WvStreams 5.0 release. This means that I've trawled through the bug tracking system trying to get all the nasty bugs out of the way.
One of those things has been converting WvArgs, our argument parser from using popt to argp.
Argp is arguably a more reliable and better maintained piece of software. And when pzion wrote WvArgs, he did a very respectable job with the API, so I had few reasons to change that. And since we had never shipped WvArgs before, I didn't feel so bad about mucking about with the internal implementation.
What gave me a nasty headache is the fact that popt and argp are complete opposites. Popt is implemented as a generator, so it is procedurally driven; whilst argp is implemented as a data-driven state machine. Which meant that I had to basically invert the insides of WvArgs, without breaking its API.
This caused me a little bit of distress, and I found that I was suffering from ennui halfway through the transition. But I persevered! Now I've got something that appears to be bug-free and happily working.
Though it does make me wish for a program-at-a-time refactoring browser. It would have been very nice to be able to do global changes, or to move bits of code around easily. I did a lot of typing that I didn't want to do, over these past few days. It's put my mind on the well-worn track of writing the source-editing minor-mode of my dreams. But I'll have to shelve this until I get more time on my hands.
I just finished releasing a version 1.3.0 of apt-rdepends.
I always forget how fun it is to to write in Perl until I do it again. I hadn't touched apt-rdepends in over a year, but it all came back to me. I spent time bashing away at it until I solved most of its bugs.
Sorry Jim, I didn't get around to implementing your feature request. It's just too slow to do reverse Build-Depends without support from libapt-pkg itself.
For my NDF today, I finally got around to hacking on tvtime.
Billy and I have finished rolling up the 1.0 tarball, and I'm about to upload the Debian package. I've gotten busy at work and Billy's considered tvtime to be feature-complete, so I guess we're not going to do any more releases in the near future.
I remember when I was working for Waterloo Maple and I would come home in the evenings and hack on tvtime. Billy and Doug and I would hang out on #livid and we'd have a great time squishing bugs. It's where I picked up a lot of my knowledge on how to programme safely (anal-retentively) in C. Back then, I was doing build system work on Maple, so it wasn't particularly difficult to do similar things with tvtime. Only at Maple, their build system was a complete nightmare, whereas with tvtime it was Automake heaven. Well, comparatively speaking.
I certainly need more spare time to hack. I can't believe how creatively inspiring it's been to dig through easy Debian bugs, fix them one-by-one, all while singing along with the Decemberists. Every time I do this, I tell myself that I should totally hack on my projects more often.
There is a lesson in here, but I'm not sure what it is.
I have been hacking on UniConf, the free Univeral Configuration System that we've built at NITI.
For months,
pphaneuf and I have been saying that UniConf shouldn't be used as a message passing system. It's not very good at delivering messages, so we claimed, it was only good at delivering state. (Which it is!)
Sadly, people kept insisting on using UniConf to do RPC, which boils down to one programme ordering another to do something. Correctly. All attempts so far have always failed, due to subtle race conditions or the like.
As a testimony to the usefulness of good hygiene, the idea struck me as I was showering. And that's when I wrote up my design for how to do this. I feel so dirty, having come up with it, that I think I need another shower.
But I think it works, I think it's safe, and I think it's reliable.
Now I just have to sucker someone to implement it for me.
It is well past my bedtime and I'm still at the office. Things have been mighty busy at work, but I feel like I've been doing important tasks; so I don't mind too much. As long as the things I do channel into keeping people clothed and fed, doing these things seem like a pretty good utility to me.
Co-workers can get pretty annoying if they can no longer afford food or clothes. Being hit up for spare change while at work is totally uncool.
In fact, I've been so busy that I haven't had time to write any interesting things at all. Unless you count Subversion commit messages as interesting. Say, I've got a great idea. Maybe I could write all of my commit messages in verse! That's an awesome idea.
Or maybe it only seems that way because it's almost three in the morning.
The past two weeks or so have blurred. I've worked overtime every day: waking up to the computer, having some food, staying at the office until really late, and then going home. I worked over the weekend and even forwent a dinner party.
I did manage to meet up with Tor when he showed up in Montréal. I knew he was travelling up here, but he never actually told me which weekend. Since it is a 700 kilometre trip to Waterloo, it was the least I could do to hang out with him for a while. Good thing I checked in some code that day.
Now I'm sitting in the office, waiting for the hours to tick away. About every two hours, I go to the server room, unplug some computers, and plug them back in. Testing, you see. The good news is that everything is passing with flying colours. I don't want to think about the bad news. Instead, I will have another cup of tea.
I've been exceptionally tired lately. I keep on having to take naps throughout the day just to be able to think properly. I think this is a sign that I'm taxing my resources.
But sleeping has not been particularly useful. I have fitful dreams of programming, which is sort of bad, since my brain doesn't simulate development environments very well. And I have yet to have ephiphanies of the same class as dancing carbon atoms, so this hasn't been very productive.
I've been basically programming non-stop for a couple of weeks now, for some definition of non-stop. Something interesting that I've noticed is that thinking analytically is a pretty difficult thing. I observe this because the more I work, the less I'm able to think outside of work. And I have plenty of hacking to do in my spare time that I keep putting off; much to my users' dismay.
This morning, I spent a lot of time squishing bugs.
I'd like to tell you about Valgrind and its wonderful relative, KCachegrind. I only used those tools to squash two bugs. That's another story, though.
When I went into the kitchen this morning, I alarmed a swarm of flies. This caused them to buzz around the tiny room. They had appeared, by abiogenesis it seemed, overnight. Not only that, they were alarming in number. I went back into the dining room and rolled a newspaper; thus armed, I strode back into the kitchen. There, I wraught such carnage that
mricon poked his head in to see what was causing the furious racket.
Thirty-odd kills later, I had a quiet domicile again.
I've locked myself in my room for the past three days, like a hermit hiding in the desert. And all I have been doing is thinking and typing non-stop: no food, no fun, and very little sleep. The purpose? I'm trying to whip our DDC talk into shape.
I basically chained myself to my terminal and have been hacking on two things: (1) our D-BUS network protocol and (2) our demo. Actually, only the first thing is really working right now, and I still have to put the finishing touches on that. I built upon Avery's work from last year, except now the D-BUS implementation is actually robust! I'd point you at our public code repository, except we've recently switch to Subversion and have yet to setup yet. I do, however, think that I can release a snapshot on Tuesday.
A contingent of NITI people will be going: Hubert, Patrick and I will all be speaking there. So the game plan is to show up to Pat's place on Sunday night, and drive into Ottawa come Monday morning.
After a quick gander at the schedule, I have to note with some relief that we're presenting on Tuesday. So Pat and I will be able to hash out our presentation, probably on the car trip down, and then I'll be able to figure out whether I need to make slides or whether I can happily scribble on a whiteboard.









