Older blog entries for cdfrey (starting at number 62)


    This is where the --onto switch comes in, with git-rebase.

    For example:

    git checkout -b staging master
    [make changes]
    git checkout -b base_url staging
    [make changes]
    git rebase --onto master staging

    This does: finds all the commits between the current branch (base_url) and staging, switches base_url's HEAD to master, and then reapplies the above found commits. You end up with a base_url branch that looks like it was only branched from master originally.

Did I hear that right??

    Heard on CBC's World at 6, 2009/07/27, regarding the sale of part of Nortel to Swedish based Ericsson:

      "Ericsson will be approaching the Canadian government for what will likely be a multi-billion dollar loan to complete the deal. This, despite earning a profit of nearly 800 million dollars in just the last 3 months of 2008."

    Excuse me? A foreign company wants to buy taxpayer-funded Canadian technology and they want the Canadian government to foot the bill.

    Are we Canadians stupid or what?

Ontario Linux Fest 2009: Call for Papers

    The planning stage of the Ontario Linux Fest is well under way. This year it will be held on Saturday, October 24, at the same great venue as last year: the Days Hotel and Conference Centre in Toronto.

    We are looking for speakers to present on the following general topics, but of course, it is not limited to these:

    • Welcome to (y)our World - Starting out with Linux
    • Business and Linux
    • Embedded Technologies
    • Community: Building and Defending

    If you have a presentation you would like to present at the Ontario Linux Fest, please add your proposal using the web form.

    Our sponsor page is also open for proposals. If you or your company would like to help sponsor the event and get some publicity as well, please check it out. There are sponsorship levels for every kind of organization.

    I'm currently working on finishing the registration pages. I'll blog again when it goes live.

    If you have any questions, or if you run into problems on the website, please email me. Stick "onlinux" in the subject line to make sure I see it.

A little while ago, I wrote a summary on Linux sound. Since then, the Insane Coding blog posted a new summary of its own, which I'm linking for completeness.

The Canadian Conservatives Try Again...

    There's recent news today that the Conservatives are introducing new bills to parliament that let police invade your privacy without a warrant.

    Michael Geist has some historical background on the bills, but it is still early. Looks like these bills are mostly copies of what the Liberals tried to pass in 2005.

    I'm sure there will be more news to come. Get ready to start writing letters to your member of parliament...

A Lean-Computing Curmudgeon's Thoughts On Linux Sound

    After much reading of PulseAudio on Wikipedia and the interviews linked there and the blog posts linked from there (2009/04/30) and the main PulseAudio site and threads on OSS4 on linux-kernel, I've come to the conclusion that PulseAudio has the potential to be a good thing (using less power on a laptop, for example), and also the potential to be a bloated pain if not handled properly. Its tendrils reach many places, admitted by the developer himself, and it is hard to integrate into a distro without doing your homework.

    I'm partly willing to give PulseAudio the benefit of the doubt though, if only for the power saving potential. I find it disappointing that an entire daemon and library system has to be built on top of ALSA and OSS to achieve this, but since Linux has decided that mixing belongs in userspace, and that no floating point is allowed in the kernel (understandable), then mixing has to be done somewhere, and PulseAudio looks like a good attempt by a sane developer, who is saddled with working with the pre-existing sound mess that is Linux.

    The library situation looks interesting... if you want to just program with a library and forget the low level, use libao or libao2 (libao2 comes from the mplayer guys). Libao is crossplatform.

    Another library called libsydney is also intended to be crossplatform (Linux, Windows DirectSound, Mac, etc). I haven't looked closely into that, but it is probably worth a look.

    See http://blogs.adobe.com/penguin.swf/linuxaudio.png for a graphic of other sound APIs and systems. As a programmer, I would aim for either programming directly to OSS, which is portable crossplatform, or use libao2. Maybe libsydney if it doesn't have too many dependencies. My needs as a sound programmer would not be anywhere near the heavy-duty, so these options would work for me.

    As for PulseAudio's state of readiness, I think there is a definite reason why it ain't at version 1.0 yet! :-) But that's not a bad thing. For stable-loving users like myself, it is probably worth waiting for a few distro release cycles before the bugs are worked out to a satisfactory degree. Newer PulseAudio releases will even stress ALSA drivers in new and interesting ways, so I expect there will be a strain on the sound system for a good while yet, from the applications right on down to the kernel.

    If you don't need sound mixing, don't use PulseAudio yet. If you don't need power savings, don't use PulseAudio yet. If you use a laptop on battery then PulseAudio may be very useful, but you may need a good chunk of memory to support it, and it will pay to stay as up to date as possible, with kernel, distro, and PulseAudio.

    From a power standpoint, there are reports of PulseAudio not even showing up on powertop, even while playing music, which is a good thing. I don't know how mpg123 + ALSA or OSS would compare.

    There's a lot of flameage out there regarding ALSA and OSS3 and OSS4. It is easy to get caught up in it, and yes, I was caught up in it too... but my style of getting caught up in something usually involves me wasting many hours on research and reading to get the facts, and at the end of all this, I'm feeling less harsh with everyone, even though my mpg123 + ALSA configuration sometimes uses 40% CPU on a P4. (grrr!) :-) I can see the history and the reasons why Linux sound has evolved the way it has, and while some things still look unfortunate, they are understandable, and people continue to work on improving the situation.

    I must say, though, that a piece of software going from "open" to closed, such as OSS3 did, can cause much disruption in the Free Software community. Even KDE and Gnome were arguably split due to licensing issues, even though they evolved in quite different technical directions as well. I think it would behoove the Free Software community to be more watchful of such situations, and guard against such collateral damage. The side effects can last for decades.

badger, those pull and push settings are configurable. Usually when I do a git-fetch, it grabs everything. Check how your remotes are setup in .git/config, and edit to taste.

Note that pull and push are not two halves of the same coin. For that, use fetch and push. Pull is a mix of fetch and merge, and it doesn't make sense to merge using multiple branch targets all at once. In fact, that is impossible as far as I know. Whenever you do a merge, you are always merging some other branch into your current branch.

chalst and ncm: I confess that I still read the recentlog, nearly every day, without logging in. So a feature that tracked my reading habits would be slightly incorrect.
On Postel's Law

    This might brand me as a heretic, but I'll say it anyway.

    I like brittle software.

    Now, what I mean by that deserves some explanation, but whenever I think of ideal software that does a job for me, I think of it as a harmonious blend of the robust and the brittle.

    First, the robust. Software needs to check its buffer sizes, check OS error codes, behave defensively and not crash even if given complete garbage as input. This side of the equation is very strongly linked to security. The software should be impossible to use for malicious purposes due to a bug in the code.

    Another aspect of robustness is flexibility. It should put the user in control, while defending the user from possible mistakes he might make while learning to use the program, or in just everyday use. It should be hard to use wrong.

    The brittle side of software also shows up in its error detection, and is a critical part of putting the user in control. If there is an error, I want to know about it. If the program is not absolutely certain that my data is safe, I want to know. If an attacker is trying to use the program to harm me, I want it to complain loudly and often.

    I would rather have the program stop running than harm my data.

    Not every program can achieve these lofty goals, but this is the nebulous image my mind creates when I think of ideal software. Some of this comes from my background in writing industrial network firmware, where it was better for firmware to halt completely and go to a known safe state, than to assume it knew what you meant and just let that piston stay on your coworker's arm.

    So bringing Postel's Law into the equation, there are places where I definitely do not want my software to be liberal in what it accepts. Take a git repository, for example. If there is any remote possibility of data corruption, I want to know, and I want git to refuse to proceed. Luckily, git does a fantastic job of data integrity, which is one of the reasons I like it so much.

    Postel's Law was originally about TCP, and so pertains to communication. Taking TCP as a specific example, and trying to apply Postel's law, let's say that a packet arrives with the entire TCP header shifted by 1 bit. I am no TCP stack expert, but I would be surprised if any TCP stack would be able to parse such a packet correctly. The only logical way of dealing with such a packet would be to look at the existing bits with the header format in mind, try to make sense of the non-sensical data, and send back an error if possible, or drop it on the floor.

    How does Postel's Law fix a situation where the very format of the data is not respected?

    I can understand if there is a TCP flag that is out of order, or if some unambiguous packet abnormality exists in an incoming packet. But there are only a limited number of such possible error combinations. Things have actually progressed in the opposite direction: TCP stacks have gotten more strict to deal with various attacks, and firewalls are used to strictly guard inbound and outbound traffic.

    Being too liberal has a cost. And some costs are so high, they are seen as a detriment to society. Just look at the once-popular open SMTP relay.

    Even in places where it would seem obvious that being liberal in what you accept is a good thing, upon further reflection, it turns out to be not so clean cut.

    Take for example, a corrupt OpenOffice document. The user definitely wants to open it. Maybe some invalid XML is getting in the way, or maybe the file is only half there. What should OpenOffice do? It should make a best effort at retrieving what data it can, and it should open the file read only. It should also warn the user loudly that the file was corrupt, invalid, and inaccurate. The user needs to know this. This may be a file from an outside source, and so the error is not important. But it may also be the first error the user receives about a dying hard disk, or a bad network, or a corrupted filesystem, and restoring from backup is the next item on the agenda.

    So in my frame of reference, Postel's Law, which is also called the Robustness Principle, fits right in, but only to half of my ideal software equation. Yes, be robust in what you accept. Be able to process complete garbage input without crashing. I've heard of people who fed a program's own EXE into itself as test input. It should be safe to use input data as a baseball bat and bludgeon the program without it falling over.

    Yet the Brittle half of ideal software doesn't change. It is still as loud as before, warning the user of potential pitfalls and trouble on the horizon, and will refuse to proceed if it can't guarantee his data's safety or determine his intent without ambiguity.

    In the end, Postel's Law is too ambiguous to be a useful guide, let alone a law. Those that accept it are too liberal, and those that don't are too strict. :-)

53 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!