Wednesday, February 06, 2008

The Crank Becomes the Cranked, Part 2: The Gloating

The media did all they could for the last month to make this a winner-take-all race, but now everybody wants to talk about delegates. Go Obama! W00t!

Kids These Days: Prepare Yourself for the Final Quest

Why are the Bad Brains on MTV? (Seriously.) Am I so far out I'm back in again?

Sunday, January 27, 2008

The Crank Becomes the Cranked

Thank you, New York Times!


Given Democratic rules, it is entirely possible for one candidate to win a majority of Feb. 5 states, and enjoy the election night ratification that comes with a TV network map displaying the geographic sweep of that person’s accomplishment, while his (or her) opponent ends the night with the most delegates.

On the Republican side, it is possible for one of the candidates to win the overall popular vote in California, but end up with fewer delegates than a rival, since most of the delegates are awarded in winner-take-all Congressional district races.


Read the whole thing (as they say).

Thursday, January 24, 2008

The Triumphant Return of C-c C-t

The upgrade to Ubuntu gutsy and/or Emacs 22 broke my favorite feature of tuareg/ocaml-mode: C-c C-t for "show type" in OCaml buffers (this requires compiling with -dtypes, which generates type annotation files). I suffered without this for a length of time which is either embarrassing or impressive, depending on whether you consider poking around inside Emacs Lisp files a productive or unproductive use of time...

I finally broke down and fixed it today. The problem is simply that Emacs and OCaml packages aren't cooperating properly. My solution, which may or may not be optimal, is as follows:


  1. Copy the directory /usr/share/emacs/site-lisp/ocaml-mode to a path of your choosing, say ~/.emacs.d/emacs22/ocaml-mode. Let's call this directory DIR
  2. (Optional) In Emacs 22, execute C-u 0 M-x byte-recompile-directory and choose DIR.
  3. Add the following line to your .emacs file:
    (or (< emacs-major-version 22) (push "DIR" load-path))



The test for whether it worked is: load a .ml file and type C-c C-t. In the mini-buffer, you'll either see "type: ..."; "Point is not within a typechecked expression or pattern"; or "No annotation file..." If it says "C-c C-t is undefined", then you have failed.

Sunday, January 20, 2008

The Delegate Strategy

So, yeah, I'm a crank, but I'm not alone:


At the end of the day, you need delegates to win. A strategy to win delegates seems like a smart strategy.


The current fake tally is:

Democrats
Clinton: 3
Obama: 1
Edwards: 0

Republicans
Romney: 3
McCain: 2
Huckabee: 1

The current real tally is:

Democrats
Obama: 38
Clinton: 36
Edwards: 18

Republicans
Romney: 59
McCain: 41
Huckabee: 26

So who's the front-runner again?

That said, less than 3% of the total delegates have been allocated on the Democratic side (it's about 6% on the Republican side—presumably because red states like South Carolina and Wyoming get proportionately more delegates). What I expect will happen is that Clinton (and probably Romney) will win a slim majority or plurality February 5 ("Super Tuesday") and more-or-less clinch the nomination. (I am willing to make a wager on that proposition. Anybody?)

In the end, I don't think the "emotional moment" in New Hampshire or "momentum" have much to do with Clinton's success. I think she has solid, proven support amongst the Democratic electorate, which just happens to be slightly larger in magnitude than Obama's.

In retrospect, the real question will be: why did Obama do so well in Iowa? With Huckabee, you can point to the evangelical factor. What's the deal with Obama?

Tuesday, January 15, 2008

Eye of the Tiger

Does anybody know which new API in Mac OS X 10.4 is the reason I can't use iLike the Amazon MP3 Downloader on my Power Mac G4? Any can anybody tell me why it sucks?

Believe it or not, I actually can't upgrade to 10.4, because it only comes on DVD-ROM and my, ahem, 6 year old G4 doesn't have a DVD-ROM drive. (You can get CDs if you buy a copy of 10.4 and send Apple a check for ten or fifteen bucks, but... eh, no.) I will not be buying a new computer this year.

Wednesday, January 09, 2008

New Hampshire Was a Tie?

Via Andrew Sullivan comes this strange and interesting fact: Barack Obama was awarded more delegates (12) in New Hampshire than Hillary Clinton was (11). Despite the fact that the media covers the primaries as win or take all contests—and, thus, Clinton was victorious and Obama came in second—by the delegate apportionment metric the contest was a tie: they each got 9 pledged delegates. For some reason, Obama has one extra superdelegate, so he came out slightly ahead.

In fake terms, the tally is 1 for Obama, 1 for Clinton. In real terms, the tally is 25 for Obama, 24 for Clinton, and 18 for Edwards. (In really real terms—because the superdelegates are seemingly predetermined—the tally is 183 for Clinton, 78 for Obama, 52 for Edwards.)

On the Republican side, note that Mitt Romney—who "lost" two contests in a row—has the delegate lead with 24 to McCain's 17 and Huckabee's 14. If he keeps losing like that, he'll win.

The takeaway from all of this is that the way we choose presidential candidates in this country is deeply and truly weird. Not only is the media narrative disconnected from the simple human and intellectual reality of the campaign (so that getting choked up becomes an emotional breakdown, or saying something sensible becomes a "gaffe"), it is disconnected from the political reality of the process: the one and only thing that matters here is who has more delegates. But instead we get to hear about who came in first and who cam in second and by how much and how that makes everybody feel...

Saturday, December 22, 2007

I'm Very Disappointed In You People

Annie G. was voted only the second cutest dog in Baltimore, coming in behind a frankly not-that-cute mutt that had the good sense to yawn for the camera. People, you're making me look like an asshole. How am I supposed to bring home the bacon if I can't deliver votes?

Tuesday, December 04, 2007

The Key to Reserva

This is awesome. As H says, there's nobody better than Martin Scorsese:


I'm obviously not going to shoot them as I would, but... can I shoot them as Hitchcock? I don't think so! So, who will I shoot them as? This is the question. This is the question and this is the process.

Fair warning: it's a commercial.

Sunday, December 02, 2007

The Cutest Dog in Baltimore

Annie on the Rug
This is my friend Mike's dog Annie. Annie is the kind of dog that will jump up onto the couch and lay her head in your lap and look up at you with just exactly this look in her eyes. In short: she's cute. But is she the Cutest Dog in Baltimore? I'd say so, but it's not up to me. It's up to you: the people of, um, Baltimore. Vote early and vote often.

Monday, November 26, 2007

Morrissey Rocks

Morrissey Rocks
We found this strange tombstone in Calvary Cemetery in Queens. No date of birth, no date of death. Just "Morrissey Rocks." Is this the grave of some devoted, anonymous Morrissey fan? An man with an unusual name? Or did some hipster buy a plot and put up a stone, just for kicks? Would the cemetery allow that? I suppose I could call the management company and ask, but I'd prefer to let the Internet spontaneously reveal all.

Mm, Pot Pie

The NY Times recipe for Turkey pot pie with chipotle and cheese is awesome, although I did make a few modifications. Instead of the "cheesy stick" lattice top, I made a biscuit topping from this Gourmet magazine recipe (I forgot to add the cheese and they didn't really rise, but whatever). I used homemade Thanksgiving-turkey-carcass stock. I used 1 cup of heavy cream and 1 cup of whole milk (because I didn't have enough cream). I added about a 1.5 cups of sliced shitake mushrooms and 1.5 cups of mixed grated Cheddar/Monterey Jack/Colby along with the turkey and veggies. I sprinkled about 1/2 cup of the cheese on top of the biscuits.

I don't think any of these modifications made a huge amount of difference, although I can testify that it turned out plenty creamy without 2 cups of cream. I would not recommend attempting the cheesy stick lattice.

xkcd: Success

This is pretty much exactly how it went down when I upgraded to Gutsy.

Success

Consider this a standing endorsement of xkcd.

Sunday, November 25, 2007

Gnome Sessions

I tentatively clicked "Remember current running applications" in Gnome Session Preferences (aka gnome-session-properties) and lived to regret it. What this does is it restarts any currently running application when you login. This is useful for, e.g., your online backup daemon, but kind of annoying for, e.g., five Emacs windows, Last.fm, some random Nautilus directory window, etc.

Now, first I tried checking and unchecking "Automatically remember running applications when logging out", as the window layout makes it seem as if these two settings are related. They are not. Then, I was tempted to fix this by futzing with the "Startup Programs" or "Current Session" lists. This is Not Right.

The Right Thing is to close all your programs (or just the offending ones) and then click again on "Remember current running applications". That is to say: the only way to change the "remembered" snapshot is to take another snapshot*.

Note: Session Preferences has a Help button, but the Gnome manual page on it doesn't mention "Remember currently running programs" or "Automatically remember running applications when logging out". This is annoying.

* Presumably there is a text file tucked away somewhere that controls this (maybe ~/.gnome2/session?), but I haven't the patience to find out.

Style Guidelines for People

In the midst of some unrelated Googling, I came across Luca de Alfaro's style guidelines for student co-authors. This is good stuff. I particularly like "one sentence per line" b/w "fill-sentence macro". It's an elegant solution to a frequently annoying deficiency of diff, which is unfortunately the baseline for anyone collaborating via CVS or SVN. I tweaked his macro to get nice indentation in AucTeX:


(defun fill-sentence ()
(interactive)
(save-excursion
(forward-char)
(forward-sentence -1)
(indent-relative)
(let ((beg (point)))
(forward-sentence)
(if (equal "LaTeX" (substring mode-name (string-match "LaTeX" mode-name)))
(LaTeX-fill-region-as-paragraph beg (point))
(fill-region-as-paragraph beg (point))))))
(global-set-key "\ej" 'fill-sentence)


[UPDATE 1/20/07] Fixed an off-by-one error when the cursor is on the first character of the sentence by adding (forward-char).

BSG Is Back (Then Gone Again)!

BSG: Razor is basically a very solid, two-part flashback episode in TV movie form. Admiral Cane is resurrected* for some Hot Lesbian Action and to dictate a torture memo** ("Pain, degradation, fear, shame... Be as creative as you feel the need to be"). Eighties vintage Cylons are resurrected for no apparent reason. New characters are introduced and then killed off with ruthless efficiency. There was a bit of the old, vague mytho-babble ("All of this has already happened... and will happen again") pointing towards the next season, which makes me terribly worried the show will end badly, in grand X-Files and/or Twin Peaks style.

It doesn't look like Razor is scheduled to re-air, if you missed it, but it will be out on DVD next week (in an annoyingly expanded version). Season 4 is scheduled to begin in March (or April?). Till then, work...

* Not in the "she's a Cylon" sense.

** Isn't it fun how "torture memo" is now a cultural reference?

LaTeX Letters

I was trying to write a letter in LaTeX the other day:


\documentclass{letter}

\address{Nowheresville}

\signature{Me}

\begin{document}
\begin{letter}

\opening{To Whom It May Concern:}

Hello, there.

\closing{Sincerely,}

\end{letter}
\end{document}

This led to the following two errors, which shed little light on the situation:

! LaTeX Error: There's no line here to end.

See the LaTeX manual or LaTeX Companion for explanation.
Type H for immediate help.
...

l.10 \opening{To Whom It May Concern:}

and (on a different example)

! Incomplete \iffalse; all text was ignored after line 66.

\fi
l.16 \end{letter}

Runaway text?
\@mlabel{}{\unhbox \voidb@x \ignorespaces \global \let

The problem, as it was gently explained to me, is I had omitted the second mandatory argument of \begin{letter}, which is the address of the recipient. The following is correct:

\documentclass{letter}

\address{Nowheresville}

\signature{Me}

\begin{document}
\begin{letter}{Foo Corp.}

\opening{To Whom It May Concern:}

Hello, there.

\closing{Sincerely,}

\end{letter}
\end{document}


[UPDATE] I just realized that the reason I got so confused about this is that I was working off a previous business letter that was formatted like:

\begin{document}
\begin{letter}
{
Foo Corp. \\
... \\
ATTN: Warranty Dept.}
...

I'm not sure if I intended it to be the case (probably not), but LaTeX picked up the braces around the address as the argument to letter. When I used this as the template for a personal letter and deleted the address, all hell broke loose.

Wednesday, November 21, 2007

All Merchandise Missing, Empty Carton Discarded

Huh. I've never seen a "shipping status" like this before:


Package Progress
Date Time Activity Location Notes
11/15/07 9:11 AM DAMAGE REPORTED / DAMAGE CLAIM UNDER INVESTIGATION SECAUCUS, NJ
11/15/07 9:04 AM MERCHANDISE IS MISSING. UPS WILL NOTIFY THE SENDER SECAUCUS, NJ
WITH ADDITIONAL DETAILS. / ALL MERCHANDISE
MISSING, EMPTY CARTON WAS DISCARDED. UPS WILL
NOTIFY THE SENDER WITH DETAILS OF THE DAMAGE
11/14/07 12:54 PM UNLOAD SCAN SECAUCUS, NJ
11/14/07 9:58 AM ARRIVAL SCAN SECAUCUS, NJ
11/13/07 11:00 PM DEPARTURE SCAN GROVEPORT, OH
11/13/07 9:30 PM ORIGIN SCAN GROVEPORT, OH
11/14/07 11:33 PM BILLING INFORMATION RECEIVED

BTW, the damage has not, to my knowledge, "been reported." To me, at least.

Sunday, November 18, 2007

Starving Like Cats and Dogs

Substitute "cat" for "dog" in this little drama and you have a good idea of what pretty much every day is like around here:


Dog: I am starving.
Me: Actually, no. You aren't starving. You get two very good meals a day. And treats. And Best Beloved fed you extra food while I was gone.
Dog: STARVING.
Me: I saw you get fed not four hours ago! You are not starving.
Dog: Pity me, a sad and tragic creature, for I can barely walk, I am so starving. WOE.
Me: I am now ignoring you.
Dog: STARVING.
Dog: Did you hear me? I am starving.


From there, it takes a turn towards the slightly-less-universal (and incredibly funny). Read the whole thing.

Thursday, November 15, 2007

Fake project directories in tarballs

To make a tarball where all the files are in a subdirectory FOO (as per best practices), where FOO doesn't really exist on your disk (e.g., FOO may be PROJECT-vX.Y.Z and the files are in directory PROJECT), just do


tar cvf NAME.tar --transform=s,^,FOO/,g FILES

Note that the argument to transform in this case is just a sed command with commas instead of slashes.