The interior of the Enterprise was a warren of metallic corridors connected by hatches, lit with harsh electric overhead lights and lined with cables, air ducts, and piping. Before December 7, most of those internal spaces had been painted white or gray, but now that the Japanese attack had dramatized the flammability of paint, working parties were put to the tedious work of chipping it all away, inch by square inch, with iron scrapers. They tore up the linoleum tiles and scraped smooth the steel underneath. They worked in the sweltering, airless heat— exacerbated by the wartime requirement of keeping the watertight doors and hatches dogged down— and found that they sweated through their uniforms so quickly they might as well strip them off and work in their underwear. It was brutal, hateful, thankless work—“ a labor of the damned,” one wrote.

Iain M. Banks - Culture novels: Consider Phlebas, Use of Weapons, The Hydrogen Sonata, and The Player of Games. I had only recently heard of Iain M. Banks and the Culture novels. I started with Consider Phlebas, which is by far the weakest. Banks lets his tendency toward grotesquery for its own sake get away from him. If I hadn’t heard such universally great things about the rest, I would have stopped. I’m glad I didn’t. The Player of Games is excellent, and The Hydrogen Sonata is solid as well. I did not care for Use of Weapons - I couldn’t buy into the central conceit or the protagonist.

John Scalzi - The Ghost Brigades, The Last Colony, Zoe’s Tale. Quick, easy, and disposable science-fiction reads. Zoe’s Tale is especially forgettable - it’s a straight (and weak) retelling of The Last Colony, with only a few new scenes.

Kim Stanley Robinson, 2312. As a big fan of the Red Mars series, I was excited to read this sort-of-sequel. But the book coyly (and disappointingly) refuses to mention anything directly about them. Forgettable and poorly constructed.

Neal Stephenson, Reamde. Great but long page-turner. You can tell he had fun writing this one. Recommended.

Michael S. Malone, Infinite Loop. I picked it up after hearing John Siracusa’s recommendation. It’s a detailed history of Apple from founding to 1998. Since it ends right as Jobs introduces the iMac, it’s an interesting perspective - for example it takes for granted that Apple should have allowed clones to use MacOS. Out of print, but you can probably find it at your library.

Vernor Vinge, Children of the Sky. The long-awaited sequel to the A Fire Upon the Deep. Vinge is one of the most imaginative science-fiction writers at creating and depicting alien species. Recommended if you’re into sci-fi (as are the two previous novels - ignore the heinous covers).

Sunday, February 05, 2012

A few years ago, I decided to use Mercurial & Bitbucket instead of Git & Github for my public repositories, because Mercurial seemed simpler and worked better on Windows. But times have changed. I use OS X now, and Github has become both overwhelmingly better and more popular. So it’s time to pick up and move.

This is a guide on how to do just that. It assumes that your repos have a small number of committers, and that you’re comfortable with the command line.

1. Clean up your Mercurial repository

Chances are your Bitbucket and Github usernames are not the same. Or if you’re like me, you didn’t keep your ~/.hgrc settings the same across machines, so your commit usernames aren’t consistent even if they’re all actually yours. The migration is a chance to tidy up.

To do this, we can use Mercurial’s convert extension, which can create a new, ‘filtered’ repository from an existing repository. In our case, we’ll alter the usernames to match what we want to appear on Github.

The convert extension is enabled by adding these lines to our ~/.hgrc:

[extensions]
hgext.convert=

Next, we’ll create a text file that maps old usernames to our new usernames. This is easy with some bash magic. Go to your repository directory and on the command line type:

hg log | grep user: | sort | uniq | sed ’s/user: *//‘ > users.txt

users.txt contains a sorted and filtered list of all the usernames attached to commits, like this:

username
username@localhost
username <username@gmail.com>

Edit this file so it maps old usernames to new usernames. If you have any existing Github repositories, I recommend running git logto get the exact username / email pair Github expects.

And bam, you have a new Git repository, complete with your entire commit history. Don’t forget: you’ll need to convert your .hgignore into .gitignore.

3. Push the new repository to Github

Now it’s time take your shiny new Git repository and slap it up on Github. Go to your Github profile page, and click “New Repository.” Fill out the form, and follow the instructions to import an existing Git repo, which goes something like this: