This is BrainLog, a blog by Dan Sanderson. Older entries, from October 1999 through September 2010, are preserved for posterity, but are no longer maintained. See the front page and newer entries.

August 2006 Archives

August 31, 2006

One-time passwords in FreeBSD using opiekey.

August 30, 2006

Dear Dreamhost:

Please stop changing your SSH RSA host keys. I need constant RSA host keys so I have some confidence that I am connected to the actual machine I think I'm connected to. When I make my first connection, the RSA host key is stored in a file on my computer, and I take it on faith that the connection is genuine. On subsequent connection attempts, if the RSA key does not match the one on my computer, my SSH client gets suspicious and refuses to connect, until I tell it to forget the old key and connect to whomever is waving the mismatched key at me.

When you change the RSA host key on a regular basis like you do, I can't tell the difference between you guys and someone malicious pretending to be you guys to steal my password and mess with my brain.

Unless someone can give me a good reason why RSA host keys ought to change on a regular basis (once every few months, it seems), please don't. Thanks!

— Dan

August 29, 2006

I've come close to throwing my MacBook Pro out the window trying to use the latest iTerm with Emacs. iTerm is often cited as the "best" terminal program for OS X because of its font anti-aliasing and tabbed session features, and of course its free cost and GPL license. But a little thing like "no Emacs" can really ruin a good deal.

Problems drawing Emacs sent me scrambling for other terminal emulation programs, and there are surprisingly few good ones for the Mac. The Terminal program that comes with OS X works well, but its preferences interface is all over the place, and I like an anti-aliased font in my terminal (which I realize applies only to a subset of the terminal-loving population). There are a handful of others, but they're old, or simply not much better than Terminal. Some are expensive, though I'd note that I'd pay real money for the perfect terminal.

The lack of a selection really isn't that surprising when you look into the history of terminal protocols. The compatibility requirements for a basic terminal emulator is very high, and the protocols are huge, myriad, and poorly documented. I'd beg Panic for a terminal emulator, but I suspect the Mac world would be better served putting their limited resources toward more straightforward problems. (I still want them to rev Unison with better filtering features, and they're not getting around to it.)

Anyway, I'm back to iTerm now that I've bothered to check their bug log and notice a bug describing exactly the Emacs rendering issues I was noticing. iTerm sets the TERM environment variable—which indicates to terminal apps both local and remote how to draw stuff—to "ansi" by default, but something (probably iTerm) doesn't handle something properly in that mode. If you force the TERM variable to "xterm-color" or "xterm", the problem goes away. I'd rather iTerm's TERM be selectable as a preference somewhere (as it is in Terminal), but I'm happy with a workaround for now.

August 28, 2006

Hype around Elder Scrolls IV: Oblivion got me searching for reports of how well the PC version runs on an Intel Mac with Windows and Boot Camp. This 1UP.com article published back in April inspired me to go ahead and buy a copy.

Damn, this is a good game. I've never owned computer hardware that could make a game look so nice and a game that could take advantage of it at the same time. Oblivion on a 17" MacBook Pro is gorgeous, and worth the combined cost of the game and a Windows XP license. I'm aware that the game would look even better on even better hardware, but what I see on my MacBook still looks far better than any game I've played in my own home.

I've intentionally avoided World of Warcraft in fear of what it could do to my family, and I may have accidentally fallen into that trap with Oblivion. At least I can tell myself I'm not missing anything by not playing it for a day.

Only now that I've seen a great modern PC game running with Boot Camp am I starting to take Mac lovers' concerns with Boot Camp seriously. Does Bethesda have any motivation to engineer, release and support a Mac version of their hit game, or their world building tools? Will gaming make Windows standard issue for all new Intel Macs? Even considering the extra $100+ Mac users will need to shell out for a Windows license to play Windows games, and the inconvenience of rebooting into Boot Camp to play, does it matter?

August 25, 2006

Amazon Web Services: Amazon Elastic Compute Cloud (EC2) now in limited public beta. The joys of pay-as-you-go storage (as with Amazon S3), now with computation. And bandwidth between your EC2 application and S3 storage is free!

One tricky bit is that disk images do not save state, so in the event of an instance outage (or explicit shut-off by you), anything not saved to S3 or off-site storage is lost. Traditional applications that depend on random-access disk storage will run within an instance, but will need some kind of explicit (you write it) backup and restore mechanism if you want their state to persist reliably. Beta testers are eagerly trying to determine best practices for, say, running a MySQL cluster inside EC2. It's possible, but provisions need to be made for EC2's scalable design.

Also, IP addresses are assigned to instances dynamically when they start up, so the process of instances knowing about each other, and of external apps communicating with instances, also needs to be managed somehow. Another good use of S3.

August 24, 2006

Newbie Mac tip: To cause everything on the screen to display in inverse colors, hold control, option, and Apple, then hit 8. Do it again to toggle back. Great for reading light text on a dark background, when most applications display dark text on a light background.

August 23, 2006

Geoffrey Chaucer Hath a Blog: Ich pwne noobs! Geoffrey Chaucer hath an Exboxe CCLX.

iTunes SED. MP3 metadata batch editing from the command line, with regular expressions. Yes.

I've mentioned the UC Berkeley webcasts before, but I'm mentioning them again because I just tried some of their streaming video content, and was delighted to see it's of high quality. You can read the boards and computer samples and everything. As much as I enjoyed listening to the audio-only of CS 61A on the bus, I only got through it because I had done the reading, and could kind of visualize the code he was writing on the board if I concentrated hard enough. It was helpful to go back and check the video for some parts.

I'm into it as much for the education (some of it review, some of it not) as I am for the nostalgic/tragic desire to be able to go back and do the whole school thing again.

August 21, 2006

The Wolfram Integrator, a web app powered by Mathematica.

New in JavaScript 1.7. With an efficient standalone embeddable engine and rich libraries (with system hooks for various OSes), JavaScript could be the next big general purpose langauge.

This year's 826 Seattle benefit, which typically includes Dave Eggers, Sarah Vowell and Daniel Handler, this year also includes Smoosh, and is hosted by John Hodgman and Jonathan Coulton. I've been inadvertently running Jonathan Coulton's entire repertoire through my head every time I've taken a shower for the past three months, and just the other day told myself, You know what'd be cool is if Jon played Bumbershoot. And here he is, albeit for a $30 ticket separate from your Bumbershoot weekend pass (because it's a benefit, of course). And Smoosh Smoosh Smoosh.
August 14, 2006

Six steps to secure sensitive data in MySQL.

A list of works of fiction that involve mathematics. Each item in the list has a write-up, category data and quotes of relevant material.

The entry on Flatland mentions a 1965 animated film based on the book, starring Dudley Moore, that's available on DVD for $29.95 + $10 s/h.

August 8, 2006

$50 breakout box turns the GP2X game system into completely open Linux system. I had to talk myself out of getting the $180 GP2X programmable Linux-based portable gaming system and media player. Just the ability to add a keyboard is compelling.

The Jeopardy! Archive. Like the Simpsons Archive, but for Jeopardy.

August 7, 2006

AntiRSI, a Mac program that reminds you to take microbreaks during long periods of typing. I like that it detects "natural breaks," so it doesn't remind you unnecessarily.

WorkRave is a popular, free, open source program for Linux and Windows that does something similar.

Die-hard Emacs users, see also type-break-mode.

Maudlin but fun teaser trailer for Get Lamp, a documentary about text adventure games. [Link to Quicktime movie.] The Get Lamp web site.

Lego Mindstorms NXT now available in the US. Amazon is selling for $250.

August 3, 2006

Newbie Mac tip: If you're printing a large document on a printer that can only print on one side of the page at a time, and you want the document to be printed on both sides of each page, you probably will want to print the odd pages first, then arrange the printed pages in your printer's paper tray, then print the even pages such that the even pages print on the backs of the odds. If you're good at topology or have figured it out by messing it up a few times, you'll know how to arrange the odd pages in the paper tray for your printer.

When you go to print, the print dialog will ask you for the range of page numbers to print, in the "Copies and Pages" category of printer settings. By default, "all" is selected, meaning to print all pages of the document starting with the first page. To print only the odd pages or only the even pages, change the category to "Paper Handling," then select "Print: Odd numbered pages" or "Print: Even numbered pages."

Here's the tip: "Odd numbered pages" does not refer to the pages with odd numbers when counting from the first page of the document. It refers to the pages with odd numbers when counting from the first page of the page range you are printing. So if you set it up to print pages 302-496, then tell it to print the "even numbered pages," it will actually print document pages 303, 305, 307, and so forth up to page 495.

Getting two-sided printing right with my one-sided laser printer is difficult enough for my feeble visualization skills, I don't need a broken print dialog confusing me further. (I burn a ream of paper on mistakes every time I try to print a book. Guh.)

filmcritic.com: The Top 50 Movie Endings of All Time.

August 1, 2006

[Cleo, a lioness librarian that runs a library with her lion husband Leo, son Lionel and daughter Leona, finishes explaining to a patron how great it is that use of the library is "free." The patron leaves. Lionel, having overheard, approaches.]

Leo: You're absolutely right, Mom. Reading is free. Playing outside is free.

Cleo: True.

[Having overheard, Leona approaches.]

Leona: Oh, and listening to poetry is free, or music, or, or... smelling a lamb chop.

Cleo: Smelling a lamb chop...

[All three breath in an imaginary smell with a satisfied sigh.]

Cleo: You know, that reminds me of a story, actually, about someone who kind of disagrees with you on that. It's right—... [looking for a book] Ah, it's right here in front of me. Here we go: "Stolen Smells," written and illustrated by Chimoyoy Royroy. Here we go.

[Cleo narrates the following story, portrayed with animation and character voices:]

Cleo [offscreen, narrating]: Once upon a time in India there was a woman named Koyel who cooked the best sweets in all the world.

Koyel: I cook the best sweets in all the world!

Cleo [narrating]: When Koyel cooked her sweets, the wonderful smells drifted into the streets, drawing people into her shop. And once they were there, they bought lots of sweets, like jalebi, ladoo, and gulab jamun. Koyel made lots and lots of money.

Koyel: Money money money!

Cleo [narrating]: One day, Koyel saw a boy, named Bijoy, standing outside her sweet shop, enjoying the wonderful smells of her sweets.

Bijoy: Mmmmm!

Cleo [narrating]: Koyel waited for Bijoy to come in and buy something, but he started to walk away.

Koyel: Hey! Little boy! Where are you going?

Bijoy: I'm going home. I have a soccer game to go to.

Cleo [narrating]: Koyel was very annoyed at the boy.

Koyel: But you smelled my smells, and did not buy any of my sweets.

Bijoy: I'm not hungry. But thanks for the smells! Bye!

Cleo [narrating]: Koyel was even more annoyed at the boy.

Koyel: Well if you don't buy any sweets, then you must pay me for the smells!

Bijoy: Pay for the smells? [chuckles] That's funny! [laughing] That's a good one!

Cleo [narrating]: But Koyel was not joking, and she called the local police.

Bijoy: The police?

[Back at the library, Leona interrupts the story.]

Leona: The police?

Lionel: No!

Cleo: Yes!

[Back to the story:]

Cleo [narrating]: The police arrested Bijoy and brought him before a judge. The judge asked Koyel and Bijoy to tell their sides of the story.

[Lionel interrupting:]

Lionel: Well, there's no way the judge will think Koyel is right. Right?

Cleo: Well, maybe yes... And maybe no!

Leona: Oh! Read, Mommy! Read read read! Please please please?

Cleo: OK.

[To the story:]

Cleo [narrating]: The wise judge listened carefully to both sides of the story. Then she made her decision.

Judge: Bijoy, Koyel made the sweets, so the smell of the sweets do indeed belong to her. You must pay for them.

Bijoy: What!

Koyel: Nyah nyah, you have to pay me! You have to pay me!

Cleo [narrating]: The judge asked Bijoy to give her five rupees.

Bijoy: But... I can't believe this!

[Bijoy hands five rupees to the judge.]

Cleo [narrating]: Koyel held her hands out greedily for the coins.

Koyel: Come to Mama!

Cleo [narrating]: But the judge said...

Judge: Koyel, in payment for the smells of your sweets, you will receive: the sound of money.

Koyel [outraged]: The sound of money! The sound of money?

Bijoy [tauntingly]: That's what she said. You don't get the money, just the sound!

Cleo [narrating]: The judge dropped the coins from one hand to the other. They made a clinking sound. Then the judge gave Bijoy his coins back.

Bijoy [taunting]: The sound of money, the sound of money.

Koyel: Oy!

Cleo [narrating]: And to this day, Bijoy enjoys the smells of Koyel's sweets, which he pays for with the sound of money! The end.

[Back at the library.]

Lionel: Oh, that was awesome! Koyel was being greedy, and the judge knew it.

Cleo: Yup! Smells don't cost a thing...

— "Stolen Smells," Between the Lions

I left off a bit at the end of the scene where the three lions smell then pounce on a plate of lamb chops. I don't consider that bit relevant to a discussion of theme or intent, but some might.

Between the Lions, a public television show for children about language and reading, often features complete tellings of real children's books. In the case of "Stolen Smells," the story is not from an actual book, but was written specifically for the show. (The "author's" unusual name, Chimoyoy Royroy, and the story's text use the episode's featured phoneme "oy" a conspicuous number of times. This is also the only reason I can find for the story taking place in India.)

A greedy merchant takes a young boy to court for having stolen property, when what was stolen is dubiously property and the act dubiously stealing, beyond the notion that said property was "created" by the merchant. While the boy's act was a sort of sampling of the merchant's product, the act of sampling did not impact the merchant's actual profits, because the boy would not have purchased the merchant's actual product regardless of the opportunity to sample ("I'm not hungry"), and the act did not deplete the merchant's actual saleable goods.

It's not a complete analogy: There are no elements corresponding to derivation, which I consider essential to copyright philosophy. I read the notion of the smells wafting into the public street as a sort of interaction with the public domain essential to the main product's commercial value, but that's a bit of a stretch. And someone is going to point out that the smell of a sweet is a minor aspect of the full product, while a copy of a song (for example) could reasonably be made into a replacement for the product. But enough important pieces are there that I'm terribly disappointed this isn't a real published book that I can buy for my kids.

The context of the narration is also a big thematic win. I mean, they're librarians reading the story from a library book! On public television! How awesome is that.

Watch Between the Lions, "Stolen Smells," on YouTube.