Thursday, 5 March 2009

New blog

I finally got sick of blogspot's inability to handle basic editing tasks, and moved to a new blog on wordpress.

Wednesday, 4 March 2009

Talk: Using the Fedora Windows cross-compiler

Date:Sunday, 8th March 2009
Time: 18:15 UTC
Location: Virtual -- #fedora-classroom on

A talk and interactive session, "Using the Windows cross-compiler":
  • API basics: POSIX, libc, Win32, gtk, Qt, etc.

  • Cross-compiler basics

  • Practical demonstration:
    setting up the cross-compiler in Fedora
    compiling a small Gtk program
    testing it in Wine
    building a Windows installer

  • Future directions (Win64, Mac OS X ?)

  • How to get involved

If you have root access to a Fedora 10 or rawhide install (i386 or x86-64 only) you can follow along with the practical part.

Friday, 6 February 2009

Photos from OCaml Users Meeting, Grenoble, 2009

We had a very successful OCaml User Meeting this week, with 45 people coming from around Europe to Grenoble.

Xavier Leroy on progress made over 2008

Sylvain Le Gall and OCaml as fast as C

Maxence Guesdon Chamo and Cameleon

Florent Ouchet VHDL symbolic simulation

David Teller Batteries Included

Christophe Troestler pa_do (delimited overloading) syntax

Richard Jones (me) OCaml Windows cross-compiler

Christophe Raffalli Parsing with dypgen

Xavier Leroy on the right:

Dinner the evening before:

Saturday, 10 January 2009

ocsigen (OCaml web framework) benchmarked

This benchmark compares the OCaml web framework ocsigen against Ruby on Rails and lighttpd+C with some excellent results for the OCaml framework:
Reqs/sec Mem usage
Rails with mongrel, 1 process 260 49MB
Rails with mongrel via nginx (rev proxy), 1 proc 220 ~51MB
Rails with mongrel, 4 processes via nginx 430 ~200MB
OCaml ocsigen (1 process) 5800 4.5MB
lighttpd with FastCGI app in C, 20 procs 9300 4.5MB

OCaml is not just an order of magnitude faster and an order of magnitude more memory efficient, but it also provides complete compile-time safety, catching multiple errors at compile time which would otherwise only show up after extensive testing.

More discussion on this reddit thread.

There's a Fedora ocsigen package waiting for review here.

Friday, 2 January 2009

Home server, part 4, installing the OS

For want of a cable, my home file server wasn't coming along very well, but today I hooked up the 2.5" IDE to PATA converter cable from Maplin with the hard drive from the disassembled Viglen MPC-L:

The Viglen was really easy to disassemble by the way. Two screws on the back hold on the backplate, and then the entire motherboard/hard disk assembly slides straight out. Another three screws let you remove the hard drive.

I settled on relatively simple route to install CentOS. I used Red Hat's KVM virtualization to run a VM, attaching the physical hard drive and the (virtual) CentOS DVD ISO. It sounds complicated, but all you need is this virt-install command line to do it (the host is Fedora 10):

virt-install --connect=qemu:///system \
-n centos5 -r 512 \
-v --accelerate \
-c /root/CentOS-5.2-i386-bin-DVD.iso \
-f /dev/sde \
--vnc --vncport=5900

(Adjust the path to the CentOS DVD ISO, and the physical hard drive device as appropriate).

CentOS 5.2 installed in about 15 minutes:

Tuesday, 30 December 2008

Destroying old hard drives

This is a simple, cheap method for destroying old hard drives, making the data unrecoverable against casual attackers and identity fraudsters (although probably not some hypothetical government agency with multi-million dollar resources).

For this you will need a stack of old hard drives:

An electric drill with a twist drill bit (suitable for going through metal), and most importantly some eye protection:

Line up the hard drives against the wall and drill straight through them. I didn't show it in this picture, but in fact I drilled through from the other (PCB) side to ensure that I went through the PCB but didn't go through any components that might explode:

Sunlight where there's not supposed to be sunlight!

For a few of the drives, mainly older ones, I couldn't get all the way through, but I got through to the platters, which is the important part:

Now you can see why eye protection is not optional. This old IBM SCSI-LVD drive had glass platters which shattered into tiny, sharp shards of metal-plated glass when the drill went through:

For extra assurance, I will soak the drives in a bucket of water for a few days before disposing of them: