Wed, 04 Jun 2014

Trying to learn dart

I've been interested in dart from google for a while, and today I started playing with it.

So far I've made a very quick and nasty mandelbrot set generator. It's very quick and dirty, but I'm impressed how easy it was to write.

[22:06] | [] | Trying to learn dart

Sun, 13 Apr 2008


Been trying gnus for email a bit.

Seems better than I remember it. IMAP support works nicely, although I didn't try SSL, which I remember being the tricky bit. Spent a while with it mysteriously showing mail in folders where I know I'd deleted it. I don't know what the actual cause was, but disabling the "agent" seems to have fixed it.

Got bbdb installed and integrated nicely, need to have a look at one of the nicer quoting packages.

[18:40] | [] | gnus

Sun, 18 Mar 2007

JCS Threading

Lately I've been liking findbugs for finding all sorts of dodgy things in java source. I applied it to JCS and it reported a bunch of inconsistent synchronization bugs.

I've filed JCS-21 in the JCS issue tracking system to document my proposed fixes for these. The problem (as I see it) is that if you're accessing data in Java shared between multiple threads, you always need to do it inside the scope of an appropriate synchronized block. This appears to be not as widely known as it should be, although it's documented in a lot of places (Synchronization is not the enemy from the IBM site is a good starting place for reading about it).

[22:13] | [] | JCS Threading

Sat, 10 Mar 2007

Twitter client

After further tarting up, my twitter posting client is now up for download. It now has an install script, a license, and can be used without editing the source.

The currently rather dull looking darcs repository is at twitterpost darcs repository.

[20:21] | [] | Twitter client

Sun, 04 Mar 2007

Twitter Client

So lately I've been playing with twitter. It seems like a fun toy, but all that visiting the website was getting tedious.

I took the obvious action, and wrote a small python script to let you post from the command line, much in the way of /usr/bin/mail. To use, download to a machine with python, and edit the username and password in the script.

It may even work for people who aren't me. One day I might tart it up enough for a formal release.

[21:20] | [] | Twitter Client

Sun, 11 Feb 2007

Zile updates

Submitted a patch to update the zile port in macports to 2.2.28.

[19:58] | [] | Zile updates

Sun, 14 Jan 2007

Zile port updated to 2.2.25

I've submitted a patch to macports to update their zile version to 2.2.25.

[22:40] | [] | Zile port updated to 2.2.25

Mon, 25 Dec 2006

Zile update to 2.2.24

zile have released version 2.2.24, so I've submitted a patch to macports to update their package.

[19:21] | [] | Zile update to 2.2.24

Sun, 03 Dec 2006

Zile on OS X

Lately I've been fiddling with the emacs clone zile on Mac OS X

The version in macports is 2.0.7. This works fine, and in particular, C-h works for help, and Backspace works for deleting text.

The current release is 2.2.22. Unpatched on OS X C-h deletes text, as does backspace - it's not picking up the difference correctly. From a peer at the source, the difference is that the earlier release uses a termcap based terminal, where the later one uses ncurses.

I had a fiddle around looking at which keycodes are returned, and found 2.2.22 does actually see a difference between C-h and backspace, but it ignores it. So I wrote the following patch:

diff -ur zile-2.2.22/src/term_ncurses.c macports-trunk/dports/editors/zile/work/zile-2.2.22/src/term_ncurses.c
--- zile-2.2.22/src/term_ncurses.c	2006-09-13 20:54:39.000000000 +0100
+++ macports-trunk/dports/editors/zile/work/zile-2.2.22/src/term_ncurses.c	2006-09-21 22:02:01.000000000 +0100
@@ -155,6 +155,7 @@
   case KEY_DC:		/* DEL */
     return KBD_DEL;
   case KEY_BACKSPACE:	/* BS */
+	return KBD_CTRL | 'h';
   case 0177:		/* BS */
     return KBD_BS;
   case KEY_IC:		/* INSERT */

This appears to work exactly right on OS X, and also worked on a quick test of a ssh into a FreeBSD system. I've submitted the patch to the zile people via the Sourceforge patch tracker, and will see what they think. It looks a bit too magical to be portable, but it works on the only machines I've got handy.

I don't actually understand ncurses.

[21:19] | [] | Zile on OS X

Sat, 30 Sep 2006


jerry's livejournal client has moved home site, so I updated my macports port and submitted the change to trac. Also mailed the FreeBSD port maintainer for jlj and let them know.

Not heard anything from the zile people about my patch for Mac OS X so I did it as a macports diff and sent the change for that to the port maintainer.

[17:11] | [] | Macports

Thu, 28 Sep 2006

Pair Programming

Is pair programming just a substitute for private offices?

[21:58] | [] | Pair Programming

Thu, 21 Sep 2006

Finally Tim Bray identifies the real problem with Perl

"One could easily have concluded, listening to Larry and Damian, that the problem with previous versions of perl was that they didn't have enough syntax, and thus there was an urgent need to add more."

[15:10] | [] | Finally Tim Bray identifies the real problem with Perl

Java evil

I am ever obedient to my fans. I wrote this in an email to someone and he suggested I blog it:

Can we have a 'michael hates java' blog please?

On 8/24/06, Michael Stevens <> wrote:
>On Thu, Aug 24, 2006 at 09:38:20AM +0100, Michael Stevens wrote:
>> On Thu, Aug 24, 2006 at 09:24:54AM +0100, XXX XXX wrote:
>> > Yes ... I always thought these things were addressing the symptoms not
>> > cause of the problem.
>> Well yes. (the solution is lisp!)
>And the problem is that it's too hard to define abstractions in
>java. This leads to repeated code. For example, if you define a field
>in an object, you might write:
>   private String wibble;
>   public void setWibble(String wibble) {
>                  this.wibble = wibble;
>   }
>   public String getWibble() {
>                  return wibble;
>   }
>This is bad because it forms a repeated pattern you can't abstract
>away - you want a way to say "I want a field called wibble, with get
>and set methods".
>This can easily be abstracted in lisp as follows. When you define the
>class, you supply a list of field definitions (the equivalent of
>'private String wibble'). You might write:
>                 (wibble :accessor wibble)
>when defining the field. This will create a field ('slot' in lisp
>lingo) with a get and a set method. And we've needed one line of code
>rather than eight.
>If you wanted to do this in perl, you could use the Class::Accessor
>module. So rather than the Java example, you'd do:
>use base qw(Class::Accessor);
>Still longer than the lisp example, but significantly shorter than the
>java version.
>But the real genius of lisp is that you can define abstractions like
>this in lisp.
>So if you wanted to create a bunch of code based on a predictable
>pattern, you can simply define a macro for it and never have to type
>it again.

[15:08] | [] | Java evil

Mail-ListDetector 0.34

I released Mail-ListDetector 0.34 to CPAN. From the Changelog:

0.34 08 Apr 2006
  - Add patch for bare debug issue reported by Chip Salzenberg <>

[15:07] | [] | Mail-ListDetector 0.34

Thu, 31 Aug 2006

jlj packaging

I've given up on packaging jlj for Debian - the licence is a bit vague and I've so far failed to get in touch with the author to clarify it. I'll probably polish up my .deb a bit more and put it up somewhere though.

[15:10] | [] | jlj packaging

Tue, 29 Aug 2006

Versioned filesystems

I'm tired of having to dig back for things I've deleted. Why doesn't everything come with a versioned filesystem by default?

[11:49] | [] | Versioned filesystems

Mon, 14 Aug 2006

Scary hack of the moment

There's a Linux filesystem implementation that lets you mount wikipedia articles as if they were real files: WikiPediaFS.

It seems to use fuse a linux tool to let you implement filesystems in userspace. fuse looks very cool, in a scary sort of way.

[16:45] | [] | Scary hack of the moment

Sat, 27 May 2006

Jed and the obvious

I was, at RJK's suggestion, going to write a script to wrap jed and determine the first line of a mail message. Then it occured to me that the first line of most messages is more or less the same, so I've gone with the far easier short term solution of always starting up on the same line. It's right 90% of the time and far easier. I may do the proper thing later.

[21:42] | [] | Jed and the obvious

Thu, 25 May 2006

Spam Reporting and Ricochet

I decided to actually start reporting some of my spam. After a bit of research, the most promising antispam reporting unix tool I found was Ricochet. It's fairly nice, although a little overzealous.

It has an interactive mode for controlling who gets emailed - this totally failed to work on FreeBSD 6.1. It appeared to be doing some very dodgy things with getc in perl to read individual characters from a tty, without setting up the tty modes correctly. I did a hacked version of the main script that uses Term::ReadLine and seems to more or less work, although it's a bit ugly. I mailed the maintainers about it, but given that it was last updated in 2003 I don't expect much action.

[21:54] | [] | Spam Reporting and Ricochet

Tue, 09 May 2006

First deb!

I like the JLJ livejournal client, but I was distressed to find that it didn't have a Debian package. I've now created a debian jlj package to remedy this lack.

It's my first go at making a debian package, so it's unofficial, may be horribly buggy, the man page is unfinished...

[22:19] | [] | First deb!

Sun, 07 May 2006

Ruby & Livejournal friends lists

I've been wanting to learn Ruby for ages. My first ruby program is lj-checkfriends.rb, a small script that logs into your livejournal account and reports if people have added or removed you as a friend since it was last run.

To configure it, set your username, password, and path-to-ruby at the top of the file.

Inspired by the lj-fc script by Simon Burr, which is doubtless much better, but using other people's code doesn't teach you Ruby :)

[16:00] | [] | Ruby & Livejournal friends lists

Sat, 06 May 2006

Unicode and zsh

I've always been a big fan of the zsh shell. Lately I switched back to it at home after a long time using bash. Everything was going wonderfully, until I decided to get my character sets organised and switch to a unicode locale.

The zsh version in Debian stable is 4.2.5, which has extremely poor unicode support. Typing characters such as £ at the prompt confuses things, and lets you do corrupted things like backspacing over the prompt display. After some investigation, I found the problem was zsh - in the 4.2 series, unicode support is very limited, and you need to switch to the 4.3 development series for things to start working sanely.

First I tried to download the source deb from Debian testing and rebuild it on stable - this failed, so I went for letting someone else do it for me, and am now happily using the 4.3.2 zsh build from And now I can type £ and have it be displayed properly and treated properly as a single character. In theory this is a development release, so there may be other problems, but from what I can tell zsh is very stable even in the development series.

[22:48] | [] | Unicode and zsh

Mon, 01 May 2006

First Port!

I've been using darwinports for a while, but I finally created my first port - for the jlj livejournal client - and got it accepted.

[22:45] | [] | First Port!

Wed, 21 Sep 2005

Debian launch DDoS attack on own server

Debian Security Host Bandwidth Saturation - Debian have released so many security updates in one go that the update server is saturating a 100Mbit link and can't keep up.

It'd be interesting to see some rough stats on the number of hosts updating via to get an idea of worldwide Debian usage.

[18:17] | [] | Debian launch DDoS attack on own server

Fri, 05 Aug 2005

Tube-based musing on keyloggers

Keyloggers are little devices that sit between your keyboard and computer and record every key you press. They have obvious uses for monitoring other people's computers.

For the very paranoid, someone should write a little app that displays a keyboard on the screen with all the keys remapped randomly, which changes after every keystroke. You can't just look at the keypresses, and if you change the mapping after every keypress there won't be any patterns either. This would obviously be a little awkward to use.

I wonder if someone's already done this.

[13:48] | [] | Tube-based musing on keyloggers

Fri, 01 Jul 2005

Software is made of people

Currently very interested in the work of Alistair Cockburn, and his books on non-XP agile software development. I find Characterizing People as Non-Linear, First-Order Components in Software Development the best article on his approach to things - software is made of people, so we should pay close attention to their properties and the effect they have on development.

[11:52] | [] | Software is made of people

Thu, 29 Jul 2004

If you don't write it down, it never happened, OR, Yet More Meaningless Numbers

Out of curiousity, I ran SLOCCount by David Wheeler over all of CPAN. The headline news is that it reports that CPAN took 5,012 person-years to develop and cost about $677 million. There's also a more detailed SLOCCount report on CPAN.

How I did it:

Reasons why these results are meaningless:

If you're interested in open-source code metrics, you should probably also read the article written by David Wheeler himself on GNU/Linux in general - More Than a Gigabuck: Estimating GNU/Linux's Size.

Thanks to Adam Kennedy of Phase N annoying me enough to actually do this.

[22:07] | [] | If you don't write it down, it never happened, OR, Yet More Meaningless Numbers

Wed, 21 Jul 2004


The Haskell book has now turned up. Of course, finding time to read it is another question entirely.

[17:36] | [] | Haskell

Mon, 28 Jun 2004

Interesting languages

There are many languages out there with interesting type systems.

I will probably babble further about these in the future if I get the time to read more.

[11:49] | [] | Interesting languages

< June 2014
1 2 3 4 5 6 7
8 91011121314

Contact: Michael Stevens <>

RSS: RSS feed

Atom: Atom feed

Valid XHTML 1.0!

Valid CSS!