Martin Pool's blog

The next-generation Bazaar

We have a web site, bazaar-ng.org, for Canonical's prototype version-control tool. There are lots of docs, though I do have to warn that everything is still subject to change. There is not much point at the moment in trying out the code (though you are welcome to), but comments on the documents would be warmly welcomed.

My current code is in Python, and is written from scratch but takes many ideas from many other systems. So far it can do these commands to some extent: add, remove, commit, status, diff, log, help, export. I don't know if there will end up being any truly novel ideas, but perhaps the combination and presentation will appeal.

ANZ's advice on software stability

I really hope they don't run their own systems that way.

(OK, I guess what they meant to say was just because it's still (apparently) working doesn't mean it's not broken. But still, what a silly thing to say.)

gcc makes my day

Ben pointed out the -ftrapv feature in gcc, something I have wanted for a while.

-ftrapv
This option generates traps for signed overflow on addition, subtraction, multiplication operations.

Example:

int main()
{
     int x = 1;
     while (1) {
          x *= 2;
          printf("%u\n", x);
     }
     return 0;
}

gcc -Wall -ftrapv overflow.c -o overflow -O3 && ./overflow >/dev/null

aborted

The current implementation seems to turn these operations into function calls, which may be a bit slow. It seems like it could potentially be done inline. But it's still something that might be very useful in test-builds or in security-sensitive software.

Tricks with GNU units

GNU units is a rather handy little dimensioned calculator. It's capable of far more than just converting feet to meters. Example:

A Koenigsegg CCR accelerates from 0-100km/h in 3.2s. What is the average acceleration?

You have: 100km/hr / 3.2s
You want:
        Definition: 8.6805556 m / s^2
You have: 100km/hr / 3.2s
You want: gravity
        * 0.88517032

So 0.88g forward acceleration.

A beginning

I have started work at Canonical. Canonical is developing a free operating system based on the Linux kernel and Debian called Ubuntu. Of it, they say

Ubuntu will always be free of charge; Canonical will never charge licence fees for Ubuntu.

Ubuntu is shipped in stable and regular release cycles; a new release will be shipped every six months.

Canonical is entirely committed to the principles of Open Source software development; no part of Ubuntu will ever be proprietary, and we encourage people to use it, improve it and pass it on.

Ubuntu is suitable for both desktop and server use. The current Ubuntu release features the GNOME desktop version 2.8, includes the Linux kernel version 2.6 and supports Intel x86, AMD64 (Hammer) and PowerPC architectures. Ubuntu includes more than 1000 pieces of software, from word processing and spreadsheet applications to internet access applications, web server software, email software and games.

I am not working directly on Ubuntu, but rather on improving the tools used by open source developers inside and outside of Canonical. The charter is to build a distributed version-control system that open-source hackers will love to use.

I have been watching and reporting on distributed version control for a few years. Much brilliant work has been done, but I don't think there is anything that is totally satisfactory, something that everyone can love. Yes, the field is crowded, but I think we may yet add something useful. To a large extent this is about finding the best features of existing projects, and trying to make them cleanly coexist.

Thank you all for your kind words.

Linux tip: remotely add an SSH key

One great feature of OpenSSH compared to telnet, aside from security, is that you can securely keep an authentication key around while logged in, and so remotely connect to one or many remote machines without repeatedly typing your password.

Sometimes when you first get an account on a remote machine, you will only have a password, and no SSH keys will be authorized to let you log in.

I previously had a script here, but then Ben pointed out that there is now a standard mechanism to do this: ssh-copy-id. I suppose that script evolved from something similar, but it's now in the standard distribution, at least on Ubuntu.

$ ssh remotehost 'mkdir -p .ssh && cat >>.ssh/authorized_keys' < ~/.ssh/id_dsa.pub

The single-quotes are critical, and that should all be one line. You may need to adjust the final filename depending on whether you have a DSA, RSA, or whatever key; make sure you send the .pub file not the key itself.

Archives 2008: Apr Feb 2007: Jul May Feb Jan 2006: Dec Nov Oct Sep Aug Jul Jun Jan 2005: Sep Aug Jul Jun May Apr Mar Feb Jan 2004: Dec Nov Oct Sep Aug Jul Jun May Apr Mar Feb Jan 2003: Dec Nov Oct Sep Aug Jul Jun May