internal fragmentation

a personal journal of hacking, science, and technology

More smem

Wed, 29 Apr 2009 22:44 by mpm in Uncategorized (link)

There’s a good summary of my smem tool and presentation at LWN today.

ELC panel write-up

Fri, 24 Apr 2009 16:10 by mpm in Uncategorized (link)

LWN has a good write-up of my ELC kernel development panel comments.

Mercurial for OpenOffice.org and Google Code

14:09 by mpm in Uncategorized (link)

Yesterday, I heard the OpenOffice.org project is running a pilot program for migrating to Mercurial.

And today I hear Google is adding Mercurial support to Google Code. They’ve apparently implemented a Mercurial storage backend based on BigTable to take advantage of their cluster infrastructure.

How to go about actually solving a Rubik’s Cube

Mon, 20 Apr 2009 16:23 by mpm in Uncategorized (link)

I got my first Rubik’s Cube some time around 1980, shortly after they were released in the US, and spent countless hours trying to solve it. Eventually, I stumbled on a solution that was satisfactory for a kid my age: take it apart and put it back together.

Many years passed without me thinking much about the Cube until I read a paper about computerized searches to find the minimum number of moves to solve the cube. Not long after, I discovered the Mirror Cube and the Void Cube and that reawakened some toy lust a mild obsession with actually properly solving the Cube from scratch.

And late last night, I happened upon a classic Cube at the local pharmacy.

Here’s roughly how I went about solving the cube:

  • Solve the top layer (~1 minute)
  • Solve the middle layer (~5 minutes)
  • Solve the bottom layer (~3 hours)

The bottom layer is obviously the hard part. My strategy was to find various patterns of moves that scrambled the bottom while keeping the top layers intact and figure out how to do useful things with them. These aren’t too tricky to find, but making sense of them is.

This part pretty much requires paper. First, write down a series of moves in a useful notation (eg F’ for turn front face counter-clockwise). Then record the pattern of cubes on the bottom before and after applying the sequence. Now it’s possible to work out what the combination of moves is doing in the abstract. For instance, this sequence flips the north and west edges, rotates the northwest and southeast corners clockwise, and the southwest corner counter-clockwise.

The things that can be wrong with the last face include: edges rotated, edges out of position, corners rotated, and corners out of position. Most of the simple patterns will change all of these at once. But combining sequences (and their mirror images) will let you cancel out some the unwanted changes in each sequence to narrow in on the solution.


That’s one childhood dream down, now to become a writer and an astronaut.

Google voice search

Thu, 16 Apr 2009 14:09 by mpm in Uncategorized (link)

A voice search button just appeared on the main page after the software update on my G1. Handles things like ‘mercurial’ and ‘salem witch trial’ and ‘error 10053’ pretty well but interprets ‘Matt Mackall’ as ‘mathematical’.

smem 0.1

Tue, 7 Apr 2009 19:44 by mpm in linux (link)

Just finished a talk a bit ago at ELC 2009 on my new smem tool, which gives more meaningful measurements of memory usage of Linux’s shared virtual memory system than the numbers reported by traditional tools like top, ps, free, etc. My slides are here.