All posts by John Goerzen

hpodder to be multithreaded… done right.

I’ll be hacking on my hpodder program this weekend. hpodder is a full-featured podcast aggregator that runs on the command line, and has many features over other command-line podcatchers like bashpodder, and even over GUI tools like iPodder.

I originally envisioned hpodder to be something that I’d cron up and run in the background. But I have tended to run it in the foreground more than in the background. Some others have too, and the requested hpodder feature is parallel downloads.

So I am working on that. I already have code working, in fact, that will parallelize both the hpodder update (downloading the feeds) and the hpodder download (downloading the actual episodes) commands.

Unlike ipodder, my code will make sure that no more than 1 thread will ever be downloading from a given server at a given time. ipodder had the terribly annoying habit of pointing all of its threads at a single server, thus pounding it while also providing little benefit for someone with a pipe fatter than the server’s.

Before all this multithreaded stuff could be written, I needed to write my own status bar code instead of just letting curl display its own status bar. (That wouldn’t work when there are 5 curls running at once)

I decided that I would write some generic status bar code, rather than something specific to hpodder. I took the apt-get status bar as an example, and whipped one up in Haskell and added it to my MissingH Haskell library.

But a status bar just begged for another feature: a generalized progress tracker. Something that could keep track of where a task (and its sub-tasks) are, calculate ETA, estimated time remaining, speed, etc. So I wrote that and made the status bar use it.

AND, a status bar begged for a generalized numeric formatter: something that could render 512 as 512, 2048 as 2K, 1048576 as 1M, etc. So I wrote that, and it’s general enough that it can render into both SI and “binary” units by default (and others that users may want).

Finally, I wrote a function to take a number of seconds and render it in something friendly like 23m5s like apt uses, and shoved that in MissingH as well.

So now hpodder will have a status bar, and any other Haskell program can use the same status bar code in minutes because it’s all generic. Or if someone just needs to render a number in megabytes, they can do that.

I really enjoy it when a program needs a solution that is generic enough to put in a larger library. I try to put as much of my Haskell code in MissingH as I can, so as to make it useful to others (and my other programs).

Desktop Linux: NFS or something else?

Recently, I asked for opinions on desktop Linux. Thanks very much to those that replied. I’ve set up an old laptop as an experiment. I’m using Debian, Gnome, and Systemimager. It’s been an interesting project (especially getting SystemImager and a splash screen program to do what I want).

I’d like for my desktop machines to mount /home over the network. I could use NFS, but of course that has all the well-known security risks. Is there a better network filesystem that is easy to use, fast, and more secure than NFS?

Desktop Linux Opinions?

I’m brainstorming about ways of setting up Linux desktops machines for people used to Window users on a LAN. It could be any size of LAN.

I’d like people to be able to sit down at any Linux machine on the LAN and log in — probably use a LDAP directory for that, and NFS-mounted home directories. I wouldn’t want to NFS-mount the entire thing for performance reasons.

So, some of the things I’m thinking about are:

  • Desktop environment: KDE or Gnome? Which would give Windows users all the tools they’d want? Which would they feel most at home with? I’m thinking it’s KDE, but Gnome has a more polished “feel” too it.
  • Image management. How could the desktops be updated? Just rsync everything except fstab over? Can we actually have a single system image? Is XOrg powerful enough to just recognize hardware at boot and Do The Right Thing? Can we build a unified initrd somehow?
  • Distribution. Debian, Ubuntu, Kubuntu? Do the Ubuntus bring anything to the table, if we take as a given that an experienced Debian admin is managing all this?
  • Laptops. What do we do about the home directories there? Some sort of automated rsync thingy?
  • Installation. FAI? Or some homegrown thing that just boots up, partitions, and runs rsync?

Renovation: Week 18

Well, it’s been awhile since I’ve posted a renovation update. Things have been going on, but not much that is all that impressive with photos.

We’ve had electrical work going on. The new water and propane lines have been trenched in. New ductwork is in progress. New electrical and phone service will be trenched in this week or next.

In the past week, the new siding has started going up, and the sheetrock is supposed to start going up on Monday.

So there is some quite visible change going on now! Click here for the pictures.

Managing Software

Recently I mentioned that I hate releasing software. It’s true, and I’ve decided that the first part of fixing it is to tackle the presentation of software to the world.

My current scheme of darcs.complete.org for repositories plus bare directories on my gopher (yes, that gopher) site leaves a lot to be desired. There is no bug tracker, there are few screenshots, there is no consistency. It is also not easy to empower others to work on them directly.

At the same time, I am the sole or primary contributor to most of them. These are not huge kernel-sized projects. These are smaller, bite-size projects. So I don’t want or need a lot of overhead. I’ve been thinking about my options.

  • I could just use sourceforge.net. I poked around there today, and all the advertising there is a real eyesore. Plus I figure that if anyone is getting paid for all my hard work, why should it be some random people that no longer write free software? On the other hand, it would be an easy way for my projects to gain visibility. Or I could use alioth, and give up both the advertisements and the larger visibility. But I don’t like giving up control over my site’s appearance, or behing beholden to others for backups, uptime, etc.
  • I could use trac. It’s nice, and is the only option that supports darcs, and has a very cool wiki integrated into everything (even parsing out keywords from changelogs). On the other hand, downloads are — at best — attachments to wiki pages. There is no download manager. And you have to set up a separate trac instance for each project. That is a non-starter for me. If I can’t see all my bug reports at one place, the bug tracker will be too annoying to use.
  • I could use gforge or savane. These are the sourceforge forks. Neither seems to be as resource-hungry as I expected, and debs are available for both. I could just install them locally and use them for my projects, though that seems like overkill. Plus, like SourceForge and Alioth, they have a crappy web-only bug tracker. I’d rather use something like RT that works by email. (Though RT is too resource-intensive to run on my server). However, web-only is better than nothing so I could hold my nose and use it.
  • I could write my own. But I’d rather not, if there’s already something workable out there.

Is anyone else thinking about this? What are your thoughts?

We need to follow the Amish example

Just a few weeks ago, the world heard the news of the tragic school shooting at an Amish school in rural Pennsylvania. A deranged man entered the schoolhouse, bound and gagged female hostages, brought along torture equipment, and shot 10 of them. 5 died, and the remaining 5 are believed to still be hospitalized.

Back in 1990, a deranged man committed a series of murders near the University of Florida campus in Gainesville. The story mentions 5 people that were killed.

Both were tragic situations. Both men killed people that had their whole lives in front of them. Both shook an entire community.

But look at how the communities responded. The Amish responded like this:

CNN reported a grandfather of one of the murdered Amish girls said of the killer on the day of the murder: “We must not think evil of this man.”

Jack Meyer, a member of the Brethren community living near the Amish in Lancaster County, explained: “I don’t think there’s anybody here that wants to do anything but forgive and not only reach out to those who have suffered a loss in that way but to reach out to the family of the man who committed these acts,” he told CNN.

The Amish have reached out to Roberts’ family. Dwight Lefever, a Roberts family spokesman said an Amish neighbor comforted the Roberts family hours after the shooting and extended forgiveness to them.

An article in a Canadian newspaper the National Post stated that the Amish have set up a charitable fund for the family of the shooter. (Wikipedia)

In addition, the Amish invited the Roberts family to attend the funerals for the Amish girls he killed.

Gainesville reacted this way:

Dianna Hoyt, Christa Hoyt’s stepmother, said Rolling’s execution has been eagerly awaited by the victims’ families. Some will be inside the prison to witness it. . .

Sadie Darnell, who was the police department’s media spokeswoman at the time and developed enduring friendships with the victims’ families, said Rolling’s execution still matters, even if it also provides him more of the notoriety he sought.

“Retribution . . . is important because it represents that our society is holding that person accountable,” said Darnell, now a candidate for Alachua County sheriff. (CNN)

We’ve all heard of murders that have taken place lately. Usually they are accompanied by calls by politicians, victim’s family, and sometimes even clergy to kill the perpetrator. In the days after 9/11, there were reports of anybody that looked Middle Eastern being attacked in several different places around the country.

I have never understood this great desire for revenge. How does that help anyone?

What the Amish did was right religiously and morally. They truly followed the New Testament call to love your enemies and forgive. It is not easy to follow all of Jesus’ teachings, and nobody said it would be. But they are doing it, and they have already begun healing. Reports are that the Roberts family has become friends with several of the Amish in the area, and they are working to help each other out after this horrible tragedy.

Even putting religion aside for a moment, the Amish actions are quite simply the right thing to do. By spreading love instead of hate, and friendship instead of revenge, they have succeeded in making sure that no cycle of violence starts there.

In contrast, 16 years later, the families of the victims in Florida still aren’t healing. They are still angry and bitter. They are still seeking revenge. They hope that their lives will get back to normal after the murderer is killed. But after 16 years of stewing about it, will they really? And what about the family of the murderer, whose lives certainly must have been a mess for the past 16 years? They will now lose a family member. Does anyone care about them, or will they now turn angry at society and possibly spread the pain more?

Imagine what would happen if so many more people around the world took the Amish perspective — to forgive those that wronged us. How long must it be before we can forgive? How far back do we spread our hate? Do we still hate those that were involved in 9/11, or can we forgive them? Do we still hate the Germans for what their ancestors did in World War II, or can we forgive them? Do we hate politicians with whom we strongly disagree, or think are liars? Do we still hate all those that have wronged us personally — someone that stole something from us or the sadistic boss?

Knives, electric chairs, and bombs do not buy reconciliation. They can not “win over” the hearts of others. They do not make our lives easier. Hate brings more hate, and more resentment.

Forgiveness is not easy. We all hope that we will never be involved in such a tragedies as these. But let us follow the example the Amish have shown — forgive for all things, big or small, important or not, painful or not.

Only then will we be at peace with ourselves, and only then will we have the chance to be at peace with our neighbors.

I use more than one computer

I use more than one computer, and quite a bit. I use three regularly, and two or three more on occasion.

But this seems to be a surprise to many programs.

I want to carry certain things with me from machine to machine, access them from anywhere, and have changes propogate across.

Things such as:

  • Bookmarks
  • newsrc files (to mark which Usenet articles are read)
  • mail (solved with my OfflineIMAP program)
  • A small set of files
  • Contacts
  • Calendar/scheduler (appointments)

Now, MacOS X seems to do some of this with their for-pay mac.com service. But I wonder why so few other apps do this out of the box?

The newsrc question is a particularly difficult one to crack, it seems. There are various schemes for synchronizing bookmarks, but none seem to work reliably.

Sigh.

I Hate Releasing Software

I’ve written a bunch of software. I like coding, I like debugging. I like getting e-mail from people that have used my software and are happy.

I don’t like actually having to make a release.

To do a good and proper release of a program, I’d be doing approximately these tasks:

  • Upload to Debian
  • Push to my darcs repo
  • Upload a tar.gz to my server
  • Update a webpage with the latest tar.gz
  • Announce the release to freshmeat
  • Announce the release to a mailing list
  • Update/post screenshots, if things have changed

So I have two wishes. First, I want a tool that maintains a website with software listings. Each program should have its own page, with a description, links to mailing lists, download links, links to the darcs repo, screenshots, etc. It should be simple but I’m too lazy to write it.

Secondly, there should be a tool that will do all of the above tasks (except the screenshots) for me. It should infer the name of the project and the version from the data in my working directory. It should be able to automate this while process without me having to lift a finger.

Sadly, no such thing seems to exist.

And, to date, I’ve been too lazy to write one. Does anyone know of such a thing?

More Goerzen News

On Saturday, my brother Peter was over to help us pack and move. While he was here, he told us that he got engaged to be married! Peter has known his fiancee ever since they were in Kindergarten together, when she was upset that he didn’t invite her to his all-boys birthday party.

We’re very excited for them and I know they’ll have more happiness than they can imagine in the years to come.