Monday, January 30, 2006 

The Onion interviews Stephen Colbert on the Colbert Report, politics, and improv.

posted on Monday, January 30, 2006 10:00:08 PM (Pacific Standard Time, UTC-08:00) 
#    Comments [0]
Sunday, January 22, 2006 

This application to join the Republican National Committee arrived in the mail the other day. Hell hasn't frozen over yet, so I won't be joining the Republican party.

I don't know how the RNC came up with my name, though I got another solicitation from them a few years ago. Usually, I get solicitations from the Dems and from a variety of progressive causes, but then I have a track record of supporting them.

The previous owner of our house, Harry Korrell, is a made man in local Republican circles. He was a member of Dino Rossi's legal team when Rossi was trying to overturn the last gubernatorial election in Washington state. Feh!

posted on Monday, January 23, 2006 6:16:40 AM (Pacific Standard Time, UTC-08:00) 
#    Comments [1]

I've been trying to make Vim 7 compile with the Microsoft Visual C++ 2003 Toolkit, as a favor to Bram Moolenaar, the primary author of Vim. He wants to be able to use the free compiler as the primary build tool for the Win32 version of Vim.

Oh. My. God.

The VC2003 toolkit may include a full optimizing compiler, but it's certainly far from a complete system for building Windows binaries.

First, I discovered that it came only with the C library headers, but not the Windows headers. That was easily rectified. Download the Platform SDK. Just the Windows Core SDK subset. This also got me nmake.

At this point, I was able to compile Vim, but not to link it. The linker required cvtres.exe, to link some resources. Some googling showed me that this is included in the .NET Runtime.

The main Vim executable now linked, but the shell extension DLL didn't. I didn't have msvcrt.lib! It took me more detective work to learn that I'd have to install the .NET Framework SDK to get msvcrt.lib. There are several clever hacks out there that generate msvcrt.lib from msvcrt.dll, with the help of link -dump -exports and a sed script, but these do not include the all-important _DllMainCRTStartup@12, the real entrypoint for DLLs linked with msvcrt.

All the necessary steps for getting the downloads are summarized on the Code::Blocks wiki. Code::Blocks is an open-source IDE that can host the VC2003 toolkit, GCC, and a number of other compilers.

So why bother with the VC2003 toolkit, since Visual C++ 2005 Express Edition is freely downloadable?

The main reason is that it's free only for the first year, and Bram wants something that will still be available after November 2006, so that anyone can compile it.

I have also ported Vim 7 to compile with VC2005 Express. It was fairly straightforward, after I had added the following

 #if _MSC_VER >= 1400
# define _CRT_SECURE_NO_DEPRECATE
# define _CRT_NONSTDC_NO_DEPRECATE
#endif

to shut up the warnings about deprecated CRT functions. I also had to make it link with libcmt.lib (multithreaded) instead of libc.lib, as the single-threaded static library is gone.

I still need to make sure that everything continues to work with the retail compilers, VC6, VC7.1, and VC8, before passing my changes back to Bram. Sigh.

Update #1: I almost forgot. VC2005 Express also requires the Platform SDK to build Vim.

I'll send the diffs to Bram in about a week. I'm too busy to clean everything up this week.

Update #2 (2006/03/12): I sent updates to Bram a week ago and he's checked them into the Vim7 source tree. Be sure to read src/INSTALLpc.txt, section 1, for details on compiling Vim with VC5-VC8.

Update #3 (2006/04/22): VC2005 Express is now free forever. Vim7 is in beta and will be released soon, and Bram doesn't want to switch compilers at this point.

posted on Sunday, January 22, 2006 9:17:05 AM (Pacific Standard Time, UTC-08:00) 
#    Comments [0]
Wednesday, January 18, 2006 

A useful compendium of health risks associated with excessive computer usage: Is Your Computer Killing You? RSI, eye strain, deep-vein thrombosis, insomnia, etc.

A little app that I find useful in reminding me to take occasional breaks is Workrave. Though I've gotten all too good at ignoring it.

Time for a break.

posted on Thursday, January 19, 2006 5:36:22 AM (Pacific Standard Time, UTC-08:00) 
#    Comments [0]

Bill Shatner doing Elton John's Rocket Man: video. Be sure to watch the last 30 seconds or so.

posted on Wednesday, January 18, 2006 9:32:29 PM (Pacific Standard Time, UTC-08:00) 
#    Comments [1]
Sunday, January 15, 2006 

This morning, I sent the following letter to the Democratic members of the Senate Judiciary Committee:

Senator,

Your job last week was to show up Samuel Alito as the extremist that he is.

You failed. You were outmaneuvred by the Republicans and you did not make a compelling case when you had the spotlight on you. Instead many of you were, rightfully, pilloried as bloviating blowhards.

Do you really want your legacy to be that you swung the Supreme Court to the right for three decades? Do you want to remembered as one who lost Roe v. Wade? That you placed someone with a track record of privileging the executive branch on the Court under such an administration? To have confirmed, by default, another Justice in the mold of Scalia and Thomas?

Stand up and fight! If -- no, when! -- Alito gets out of committee, filibuster! What are you saving the filibuster for, if not to prevent the balance of power changing in the Supreme Court?

We, the freedom lovers of America, are counting on you to do your job, and lead!

George V. Reilly, Seattle, WA

Here's the contact information for the Judiciary Committee

Here's a very pissed off reaction to the ineptitude of the Democrats

posted on Monday, January 16, 2006 4:44:51 AM (Pacific Standard Time, UTC-08:00) 
#    Comments [0]
Saturday, January 14, 2006 

I re-read Scott Hanselman's blog post on using Consolas as the Windows Console Font, and I decided to put together a registry file to make it a little simpler. (You'll have to rename the file to console-font.reg after downloading.)

The registry file includes entries for:

As Scott says:

(I'm afraid I can't distribute Consolas online or provide a download out of abject fear. That said, you can find it in any version of the Longhorn bits.)

Or Office 12, I believe.

Update, 2008/01/15. The Consolas Font Pack is the easiest way to get Consolas, if you don't have Office 2007 or Vista. Technically, you are supposed to have Visual Studio 2005. (I'm guessing that VS 2008 comes with Consolas.)

posted on Sunday, January 15, 2006 12:57:59 AM (Pacific Standard Time, UTC-08:00) 
#    Comments [0]
Thursday, January 12, 2006 

On Tuesday night, I felt like Imelda Marcos. I conducted a long-overdue purge of my closet, leaving me with two large boxes of clothes, mostly shirts and t-shirts. I probably got rid of 80% of my collection of Microsoft shirts. All in all, I had 63 empty hangars in the closet when I was done. Yikes!

Lately, I've been dressing a little better. More button-down shirts, fewer t-shirts. Not that there's been any pressure to do so at work -- the geeks at Atlas are just as badly informally dressed as at any other software company that I've worked at.

posted on Thursday, January 12, 2006 5:10:30 PM (Pacific Standard Time, UTC-08:00) 
#    Comments [0]
Tuesday, January 10, 2006 

Via DailyKos: some of the nation's leading libraries have books bound in human skin.

posted on Wednesday, January 11, 2006 5:22:06 AM (Pacific Standard Time, UTC-08:00) 
#    Comments [1]
Thursday, January 05, 2006 

I made this recipe for Thanksgiving. It was a big hit.

Mustard-Mushroom Soup recipe from CDKitchen.com:

Ingredients

  • 1/2 cup butter

  • 2 pounds mushrooms, thinly sliced

  • 4 cups chicken stock (preferably homemade)

  • 1/2 cup dry Sherry

  • 1 tablespoon Dijon mustard

  • Salt and freshly ground pepper

  • 1 cup whipping cream

Directions

Melt butter in heavy large saucepan over medium-high heat and cook until lightly browned. Add mushrooms and cook until liquid evaporates, stirring frequently, about 10 minutes. Add stock, Sherry and mustard and simmer briskly 10 minutes. Season with salt and pepper. Add cream and warm through. Serve immediately.

posted on Friday, January 06, 2006 3:34:40 AM (Pacific Standard Time, UTC-08:00) 
#    Comments [1]
Saturday, December 31, 2005 

At our Sixth Day of Christmas party yesterday, Delf started talking about burns from hot peppers, which reminded me of a crazy thread that I read a while back, Listening to habeneros, and of a sure-fire cure for hiccups from Diane Duane.

Me, when I get hiccups, I just take a very deep breath and hold it for as long as I can. If it doesn't work the first time, it does on the second attempt.

Cure #1, letting a large spoonful of sugar dissolve in the mouth, is the only cure that's ever worked for Emma.

Here's Diane Duane on curing hiccups:

Hiccups are the result of a blood serum electrolyte balance. The causes are various: talking too much while eating (my favorite), eating or drinking too fast, etc etc, whatever. Different causes tend to induce different kinds of imbalance. The imbalances are these:

  1. Respiratory acidosis -- too much CO2 in the blood.
  2. Respiratory alkalosis -- too little CO2 in the blood.

When you get one or the other of these, the body's tendency is to try to rectify the situation by pushing the lungs' contents in and out a lot faster, so that if there isn't enough CO2, some more can get into the bloodstream, and if there's too much, some can get out. Now, the body doesn't want to bother your conscious mind about this, so it does it in a simple, inelegant, and not wildly effective way: it makes your diaphragm spasm, compressing the lungs and shoving most of their tidal volume out with each spasm. This is the hiccup.

Now, you'd think that concentrating on breathing deeply and regularly, and ventilating yourself in a thoughtful manner, would put this problem right. Well, probably it will: but it takes forever, and you're sitting there hiccuping and feeling like a fool (and the continuing hiccups can themselves make the electrolyte situation worse). So it becomes time to take drastic measures.

It turns out that the smartest and fastest way to derail the hiccups themselves is to quickly increase the imbalance significantly. The intervention derived from this concept deals with (first) the most common one, the acidosis, and then, if that doesn't work, the less common one, the alkalosis. The fortunate thing is that all the raw materials are usually present in the average bar or restaurant, so you can cure yourself or a friend fast in one of the places where you're most likely to look like an idiot as you just sit there hiccuping and hiccuping.

(Part 1:) Juli got this one right. Take a large spoonful of sugar, dry, in the mouth, and let it dissolve. Some of the sugar gets absorbed directly through the buccal membrane of the mouth. The acidosis is kicked way further along, and your body, distracted by the sudden extreme change in the blood chemistry, "calls off" the hiccups as ineffective. It calls them off right away, too: within seconds. The "spoonful of sugar" approach, in my experience, works for about 60% of hiccuppers.

If this doesn't work, the hiccuper has a worse case of acidosis than mere sugar can deal with. So we take the intervention up a notch.

(Part 2:) Take one small spoonful of salt (the equivalent of a cooking teaspoon is plenty). Again, hold in the mouth and let it dissolve. It's gross, but in the next 20% of hiccupers, the hiccups will stop. Bang, right away.

If neither of these steps work, then your hiccuper is not in acidosis, but in alkalosis. So you switch tactics.

(Part 3:) Give the hiccuper a lemon slice and tell them to chew on it. Their hiccups will then vanish.

It is important to do these things in order and not try to cut back on the amounts of sugar and salt, or the intervention may fail and you'll wind up having to do it all over again, which is annoying, especially if you're on a low-sodium diet or just don't feel like retaining liters and liters of water the next day. But if you follow these instructions faithfully, the hiccups should vanish, pretty much without fail. You can get a real reputation as a miracle worker with this.

A side issue, henceforth possibly to be called Duane's Law of Embarrassment Anxiety: When you are running this routine on someone whose hiccups you absolutely have to stop because you'll fall very low in their estimation if you don't, they will always be alkalotic, and you will always have to run through all the stages, feeling dumber and more desperate every moment as you go along. (This law first became plain to me when I was de-hiccuping my "Science Challenge" producer at the BBC: if I hadn't proven I was good at the science part by curing him, well, you can imagine.)

And an afterthought: All other even slightly useful hiccup cures service this mechanism in one way or another, by quickly and emphatically changing the blood electrolyte balance. Scaring the person (causes acidosis: see The Andromeda Strain), drinking water upside down (forces the person to hold his/her breath, slowly increases the CO2 in the blood), breathing in a paper bag (rebreathing, ditto), whatever: they are all thin pale versions of the One True Cure, trying with greater or lesser effectiveness to shove the blood electrolytes around.

Now go all ye and spread the word, that there may be fewer hiccups in the world.

Googling for hiccups sugar turns up quite a few more hits.

posted on Sunday, January 01, 2006 12:26:26 AM (Pacific Standard Time, UTC-08:00) 
#    Comments [1]
Thursday, December 29, 2005 

vi. Vee-eye. My text editor of choice for 20 years. Half my life.

Why? Because I imprinted on vi, like a duckling on its mother. Vi's keystrokes are bound into my muscle memory. My fingers reflexively use vi keystrokes to move around, to delete text, to move blocks, to find patterns. I don't have to think about using dw to delete a word, or n to find the next match of a pattern, or yG to yank the rest of a file, or j to move down a line, or . to repeat the last modification. My subconcious does it for me.

I don't even have to think much about more complex commands, like ct) to replace a parameter list, or simpler regexp replacements. I've internalized so many vi idioms in the last two decades.

For nearly all editing tasks, I'm far more productive when I use vi. Like Tom Christiansen, I can become at one with the machine.

People who've used vi fall into a bimodal distribution. They love it or they hate it. Usually, it's because of vi's modal nature. I love the orthogonality of the UI.

20 years

In the autumn of 1985, I entered my third year of Computer Science at Trinity. We were promoted from three hours a day on the 1200-baud terminals in the basement to all-day usage of the 9600-baud terminals in the main terminal room. We also graduated from the wretched SOS line editor to vi running on Eunice (a Unix emulator for VAX/VMS). I don't think I took to it instantly; it took a little while for it to grow on me. Soon enough, though, I was hooked on regexps.

Hitting ESC quickly became a habit: one that causes me occasional grief, when I reflexively hit ESC after entering text in an edit field in some app or other, and destroy what I've just written.

Two years later, I got my first fulltime job, writing a full-screen text editor for a small Irish typesetting company, ICPC. It was a replacement for the in-house line-based editor used by the data entry keyboaders, which I wrote in Vax Pascal. A friend made me aware of VITPU, a Vi emulator written in VMS's TPU, which I gladly latched onto.

Two years after that, I entered the Master's program at Brown, where I first got to use Unix and X Windows. Naturally, I used vi, but it was a lot less powerful than GNU Emacs, which was very popular. In time, I learned of VIP, a vi emulator for Emacs. I began using VIP and quickly forsook standard vi. I liked having the power and customizability of Emacs, though I never learned to like the Emacs keybindings. (François Pinard, a longtime Emacs user, writes eloquently of why he moved to Vim.)

I stayed with VIP for years, as it evolved into Viper. I show up in the Viper credits for occasional contributions.

In 1992, I moved to Seattle and worked for Microsoft for the first time. I kept my Emacs+Viper habit.

By 1995, I was working for MicroCrafts and had discovered Vim. Version 3.x ran on DOS as a 16-bit command-line app. I used it occasionally on NT. Then I discovered that Roger Knobbe had ported Vim to NT, but that it was pretty buggy. I fixed the bugs and submitted my fixes to Bram Moolenaar, Vim's author.

One thing led to another, and I became the Win32 guy for Vim 4.x. Console-mode Vim became rock solid on NT 4, but I never got it to the same level on Win95, due to inherent problems in the console APIs on Win9x. I also put together a proof-of-concept implementation of gvim 5.0 for Windows. At that point, I gave up active involvement in the development of Vim: I had moved back to Microsoft, I was starting to date Emma, and I was working on the Beginning ATL COM Programming book. Something had to give.

I continued using Viper for much of the time that I was developing Vim, because Vim was not then rich enough for my needs. After Vim got a scripting language (VimL) and syntax highlighting in version 5, I started using Vim more and more. I think it's been five years since I last used Emacs, and I never got beyond GNU Emacs 19.34.

Recently, I've stopped using Vim as my exclusive programming editor, and I've been alternating between Vim and Visual Studio plus Resharper, as I've started doing a lot of .NET development. But more on that some other time. This post is already too long.

posted on Friday, December 30, 2005 7:17:03 AM (Pacific Standard Time, UTC-08:00) 
#    Comments [0]
Friday, December 16, 2005 

Via DailyKos, the 25 Dumbest Quotes of 2005. Includes such gems as:

  • 13) "If you'll look at my lovely FEMA attire you'll really vomit. I am a fashion god… Anything specific I need to do or tweak? Do you know of anyone who dog-sits? … Can I quit now? Can I come home? … I'm trapped now, please rescue me." --Ex-FEMA Director Michael Brown, in various emails to colleagues and friends in the immediate aftermath of Hurricane Katrina
  • 2) "Now tell me the truth boys, is this kind of fun?" --House Majority Leader Tom Delay (R-TX), to three young hurricane evacuees from New Orleans at the Astrodome in Houston, Sept. 9, 2005
posted on Friday, December 16, 2005 11:41:00 PM (Pacific Standard Time, UTC-08:00) 
#    Comments [0]
Sunday, December 11, 2005 

As the Twelve Days of Christmas approach, it's time once again to make fun of them. Strictly speaking, we shouldn't start until December 25th, the first day of Christmas, but the Xmas season starts earlier every year.

My favorite has long been Frank Kelly's Christmas Countdown, which was a big hit in Ireland and Britain in the early 1980s. It's couched as twelve increasingly alarmed letters from Gobnait O'Lughnasy to his friend Nuala. Here's Day Six:

Nuala,

What are you trying to do to us ? It isn’t that we don’t appreciate your generosity but the six geese have not alone nearly murdered the calling birds but they laid their eggs on top of the vet’s head from the pear-tree and his bill was £68 in cash ! My mother is munching 60 grains of Valium a day and talking to herself in a most alarming way. You must keep your feelings for me in check.

Gobnait

The rest of the lyrics can be found on the Highland Shepherd site. An audio version of the song can be found on the Denver Gaels Audio Clips Page. And an explanation of the traditional lyrics can be found at Carols.org.uk.

posted on Monday, December 12, 2005 12:37:40 AM (Pacific Standard Time, UTC-08:00) 
#    Comments [0]
Saturday, December 10, 2005 

Harold Pinter's speech on accepting the 2005 Nobel Prize for Literature.

I put to you that the United States is without doubt the greatest show on the road. Brutal, indifferent, scornful and ruthless it may be but it is also very clever. As a salesman it is out on its own and its most saleable commodity is self love. It's a winner. Listen to all American presidents on television say the words, 'the American people', as in the sentence, 'I say to the American people it is time to pray and to defend the rights of the American people and I ask the American people to trust their president in the action he is about to take on behalf of the American people.'

It's a scintillating stratagem. Language is actually employed to keep thought at bay. The words 'the American people' provide a truly voluptuous cushion of reassurance. You don't need to think. Just lie back on the cushion. The cushion may be suffocating your intelligence and your critical faculties but it's very comfortable. This does not apply of course to the 40 million people living below the poverty line and the 2 million men and women imprisoned in the vast gulag of prisons, which extends across the US.

posted on Saturday, December 10, 2005 11:52:20 PM (Pacific Standard Time, UTC-08:00) 
#    Comments [0]

Via del.icio.us/popular, it's dozens of Bunny Suicides! Very twisted.

Update: Apparently, these are pirated scans from The Book of Bunny Suicides.

posted on Saturday, December 10, 2005 8:30:00 AM (Pacific Standard Time, UTC-08:00) 
#    Comments [0]