“She danced like one of those things they put outside of carwashes, the tubes with faces and arms attached to a fan. She had no mystery, no allure, no skill, no art, and her lunatic visage was so off-putting you were heartened by a sudden new-found certainty: an entire culture had realized that keeping your tongue extended like a basset hound with heat stroke was unbecoming, and unlikely to be repeated except as a sarcastic reference in Instagram selfies.”

— James Lileks reviews Miley Cyrus

fun with tongues


東京特許許可局許可局長今日急遽特許許可却下

They still don't get it...


[last update: the root cause of the Linux loopback device problem described below turns out to be simple: there’s no locking in the code that selects a free loop device. So it doesn’t matter whether you use mount or losetup, and it doesn’t matter how many loop devices you configure; if you try to allocate two at once, one of them will likely fail.]

Panel discussions at LinuxWorld (emphasis mine):

"We need to make compromises to do full multimedia capabilities like running on iPod so that non-technical users don’t dismiss us out of hand."

"We need to pay a lot more attention to the emerging markets; there’s an awful lot happening there."

But to truly popularize Linux, proponents will have to help push word of the operating system to users, panelists said.

... at least one proponent felt the Linux desktop movement needed more evangelism.

Jon “Maddog” Hall, executive director of Linux International, said each LinuxWorld attendee should make it a point to get at least two Windows users to the conference next year...

I’m sorry, but this is all bullshit. These guys are popping stiffies over an alleged opportunity to unseat Windows because of the delays in Vista, and not one of them seems to be interested in sitting down and making Linux work.

Not work if you have a friend help you install it, not work until the next release, not work with three applications and six games, not work because you can fix it yourself, not work if you can find the driver you need and it’s mostly stable, not work if you download the optional packages that allow it to play MP3s and DVDs, and definitely not work if you don’t need documentation. Just work.

[disclaimer: I get paid to run a farm of servers running a mix of RedHat 7.3 and Fedora Core 2/4/5. The machine hosting this blog runs on OpenBSD, but I’m toying with the idea of installing a minimal Ubuntu and a copy of VMware Server to virtualize the different domains I host. The only reason the base OS will be Linux is because that’s what VMware runs on. But that’s servers; my desktop is a Mac.]

Despite all the ways that Windows sucks, it works. Despite all the ways that Linux has improved over the years, and despite the very real ways that it’s better than Windows, it often doesn’t. Because, at the end of the day, somebody gets paid to make Windows work. Paid to write documentation. Paid to fill a room with random crappy hardware and spend thousands of hours installing, upgrading, using, breaking, and repairing Windows installations.

Open Source is the land of low-hanging fruit. Thousands of people are eager to do the easy stuff, for free or for fun. Very few are willing to write real documentation. Very few are willing to sit in a room and follow someone else’s documentation step-by-step, again and again, making sure that it’s clear, correct, and complete. Very few are interested in, or good at, ongoing maintenance. Or debugging thorny problems.

For instance, did you know that loopback mounts aren’t reliable? We have an automated process that creates EXT2 file system images, loopback-mounts them, fills them with data, and unmounts them. This happens approximately 24 times per day on each of 20 build machines, five days a week, every week. About twice a month it fails, with the following error: “ioctl: LOOP_SET_FD: Device or resource busy”.

Want to know why? Because mount -o loop is an unsupported method of setting up loop devices. It’s the only one you’ll ever see anyone use in their documentation, books, and shell scripts, but it doesn’t actually work. You’re supposed to do this:

LOOP=`losetup -f`
losetup $LOOP myimage
mount -t ext2 $LOOP /mnt
...
umount /mnt
losetup -d $LOOP

If you’re foolish enough to follow the documentation, eventually you’ll simply run out of free loop devices, no matter how many you have. When that happens, the mount point you tried to use will never work again with a loopback mount; you have to delete the directory and recreate it. Or reboot. Or sacrifice a chicken to the kernel gods.

Why support the mount interface if it isn’t reliable? Why not get rid of it, fix it, or at least document the problems somewhere other than, well, here?

[update: the root of our problem with letting the Linux mount command auto-allocate loopback devices may be that the umount command isn’t reliably freeing them without the -d option; it usually does so, but may be failing under load. I can’t test that right now, with everything covered in bubble-wrap in another state, but it’s worth a shot.]

[update: no, the -d option has nothing to do with it; I knocked together a quick test script, ran it in parallel N-1 times (where N was the total number of available loop devices), and about one run in three, I got the dreaded “ioctl: LOOP_SET_FD: Device or resource busy” error on the mount, even if losetup -a showed plenty of free loop devices.]

"...where were you going in such a hurry?"


17 Egyptian exchange students, all headed to Bozeman, Montana. Six show up as scheduled, the rest are eventually located in: Richmond, Virginia; Minneapolis, Minnesota; Manville, New Jersey; Dundalk, Maryland; O’Hare International Airport; and Des Moines, Iowa.

Money quote:

"None of the students is considered a terrorism risk."

I’d feel a little more confident about this statement if they’d been found in, say, a Las Vegas casino hotel in a room filled with booze and strippers.

So where’s Dundalk, anyway? Why, it’s the home of the Dundalk Marine Terminal, whose major clients include the National Shipping Company of Saudi Arabia. Lots of bulk cargo coming in through there, from all over the world.

Manville just seems to be a wide spot in the road that’s half an hour away from the Newark Liberty International Airport and McGuire Air Force Base, the sort of neighborhood where one death every two-three years changes the murder rate from 0.0 to 9.7.

I’d like to think that there’s an innocent explanation for all this. I just can’t think of one.

は vs. が


The most coherent explanation I’ve found for understanding the difference between the “wa” and “ga” particles in Japanese comes from Jay Rubin’s book Making Sense of Japanese (originally titled “Gone Fishin’”). Namely, use “ga” when you want to emphasize the previous word, and “wa” when you want to emphasize the following words. Which to use depends on what kind of question you’re asking or answering.

For example, he gives the following answers:

  1. Ikimashita. "I went."
  2. Watashi wa ikimashita. "Me? I went."
  3. Watashi ga ikimashita. "I went."

And these matching questions:

  1. Dou shimashita ka. "What did you do?" Or: Ikimashita ka. "Did you go?"
  2. Soshite, Yamamura-san wa? Dou shimashita ka. "And now you, Mr. Yamamura. What did you do?"
  3. Dare ga ikimashita ka. "Who went?"

And that’s why 「私はケーキです。」 does not mean “I am the cake”, no matter what BabelFish says. Except when it does, of course, but for that, you’ll have to read the rest of the book.

First they hit, then they run


Driving home from class tonight, someone hit my car. His lane was closed ahead due to construction, and I guess he decided that he’d rather merge in front of me than behind me. Sadly, he ended up trying to merge through me at about 75-80 MPH, and then decided to run for it. I caught up to him long enough to get his license plate number, and then he was gone (making a fast exit from 101 South to 85 South, then running a red light to turn onto Central Expressway South).

Worse news for him: a witness pulled over and stayed to make a statement to the police, and his memory of the incident was a good match for mine.

The damage? Several deep, long scratches along the driver’s side, from about the side mirror forward to the front of the wheel well, with the finish scraped off of the tire rim in several places. The witness said my car was pushed to the right about a foot and a half by the impact, and he was surprised that I wasn’t hurt. No apparent mechanical damage, and it drove home fine.

I’m fine, and I have excellent insurance, so even if the sorry bastard is uninsured, all will be well. It could have been a lot worse. In the cop’s experience, an impact like that at that speed could have easily caused my front tires to lose traction with the road, sending my car rolling sideways down the highway. He figured that the relative size and mass (my “small” SUV versus his smallish hatchback/whatever) are what saved me.

The (surprisingly small) damage. Aside from the scratches, the door rubs a bit when you open and close it:

car damage

[update 10/11/2006: My insurance company ran the license plate number and came up with a 2000 four-door Volkswagen in Sunnyvale, color unknown. Given the location of the accident, that suggests that I got the number right.]

The Time Machine paradox


[disclaimer: developers who didn’t attend WWDC don’t have copies of the Leopard beta yet, and when they do send me one, I won’t be able to discuss how things actually work, so this is based solely on what Apple has stated on their web site]

When I heard the initial description of Apple’s upcoming Time Machine feature, it sounded like it was similar to NetApp Filer snapshots, or possibly the Windows volume shadow copy feature that’s been announced for Vista (and is already in use in Server 2003). The answers, respectively, are “not really” and “yes and no”.

Quoting:

The first time you attach an external drive to a Mac running Mac OS X Leopard, Time Machine asks if you’d like to back up to that drive.

Right from the start, Time Machine in Mac OS X Leopard makes a complete backup of all the files on your system.

As you make changes, Time Machine only backs up what changes, all the while maintaining a comprehensive layout of your system. That way, Time Machine minimizes the space required on your backup device.

Time Machine will back up every night at midnight, unless you select a different time from this menu.

With Time Machine, you can restore your whole system from any past backups and peruse the past with ease.

The key thing that they all have in common is the creation of copy-on-write snapshots of the data on a volume, at a set schedule. The key feature of NetApp’s version that isn’t available in the other two is that the backup is transparently stored on the same media as the original data. Volume Shadow Copy and Time Machine both require a separate volume to store the full copy and subsequent snapshots, and it must be at least as large as the original (preferably much larger).

NetApp snapshots and VSC have more versatile scheduling; for instance, NetApps have the concept of hourly, daily, and weekly snapshot pools that are managed separately, and both can create snapshots on demand that are managed manually. TM only supports daily snapshots, and they haven’t shown a management interface (“yet”, of course; this is all early-beta stuff).

VSC in its current incarnation is very enterprise-oriented, and it looks like the UI for gaining access to your backups is “less than user-friendly”. I’ve never seen a GUI method of accessing NetApp snapshots, and the direct method is not something I’d like to explain to a typical Windows or Mac user. TM, by contrast, is all about the UI, and may actually succeed in getting the point across about what it does. At the very least, when the family tech-support person gets a call about restoring a deleted file, there’s a chance that he can explain it over the phone.

One thing VSC is designed to do that TM might also do is allow valid backups of databases that never close their files. Apple is providing a TM API, but that may just be for presenting the data in context, not for directly hooking into the system to ensure correct backups.

What does this mean for Mac users? Buy a backup disk that’s much larger than your boot disk, and either explicitly exclude scratch areas from being backed up, or store them on Yet Another External Drive. What does it mean for laptop users? Dunno; besides the obvious need to plug it into something to make backups, they haven’t mentioned an “on-demand” snapshot mechanism, simply the ability to change the time of day when the backup runs. Will you be able to say “whenever I plug in drive X” or “whenever I connect to the corporate network”? I hope so. What does it mean for people who have more than one volume to back up? Not a clue.

Now for the fun. Brian complained that Time Machine is missing something, namely the ability to go into the future, and retrieve copies of files you haven’t made yet. Well, the UI might not make it explicit, but you will be able to do something just as cool: create alternate timelines.

Let’s say that on day X, I created a file named Grandfather, on X+20 a file named Father, and on X+40 a file named Me. On X+55, I delete Grandfather and Father. On X+65, I find myself missing Grandfather and bring him back. On X+70, I find myself longing for a simpler time before Father, and restore my entire system to the state it was in on X+19. There is no Father, there is no Me, only Grandfather. On X+80, I find myself missing Me, and reach back to X+69 to retrieve it.

We’re now living in Grandfather’s time (X+29, effectively) with no trace of Father anywhere on the system. Just Me.

Now for the terror: what happens if you set your clock back?

Forget the mech, send me the pilot...


Of course, to truly pilot this mech, she should be wearing a sailor suit…

Reasons to learn Japanese #12: 後藤真希


Remember when Britney Spears was a really cute teenage girl? And then a few weeks later she was the sex kitten, a position from which she ruled the world until she was old enough to make her own career decisions and revealed that she’s about as bright and sophisticated as Tom Cruise is sane? I actually saw this magazine cover three times at stores without recognizing her.

It makes me (mostly) appreciate the Japanese idol system, where both the industry and the fans will cheerfully ostracize a star for even slightly tarnishing her image.

This is a long-winded way of saying that I expect Maki’s sex-kitten phase to last much longer than Britney’s, with no trailer-trash serial weddings to disrupt the fun.

Here’s her latest video. J like.

Maki Goto's

“Need a clue, take a clue,
 got a clue, leave a clue”