April 2009

NFSing a Leopard user

Saved for future reference, since I don’t do it very often…

  1. From another admin account, open System Preferences, click Accounts.
  2. Control-click the username, select Advanced Options.
  3. Change the UID and optionally the GID.
  4. From a root shell, chown -R the user's files.
  5. If you changed the GID, run:
    dseditgroup -o edit -a $USER -t user $OLDGROUP
  6. If you want to add more local groups to match your NFS server, run:
    dseditgroup -o create -r $DESC -i $GID $GROUP

Self-inflicted Kybard

During my brief vacation, which involved flying to the midwest to see family and catch a really bad cold, I ordered a new laptop. It’s a Mac, of course, because Windows is simply less functional for people like me. I ordered it online from Apple, so that I could get the precise hardware configuration I wanted: 2.93GHz Core 2 Duo, 4GB RAM, 320GB 7200RPM hard drive, and the Japanese keyboard.

Oh, my, the Japanese keyboard. This is going to take some getting used to:

MacBook Pro Japanese keyboard

The worst thing about it is that it doesn’t work under Windows. Even a fully-updated Vista Ultimate install insists on treating it as a standard US keyboard layout, and none of the registry hacks or driver overrides you’ll find through Google will help. You know how MacOS X will ask you to press a few keys to help it figure out what kind of special keyboard you’ve attached? Windows doesn’t do that. This is true even for external USB keyboards made for the Japanese market. Apparently the only way to get it to work is to make sure you overrode the keyboard layout during the initial install of Vista/XP. Maybe.

The second-worst thing would be the absence of a “\” key. For historical reasons, the “¥” key replaced it on Japanese keyboards, and you have to type Option-¥ to get “\”.

Third-worst would be the massive slowdown in my typing speed for non-alphanumeric characters, which are in places my fingers don’t know how to find.

Nice things include the 英数 and かな keys adjacent to the spacebar. These handle the input-mode switching, replacing the usual Command-Space toggle. 英数 switches to English/numeric input, かな to kana input. I’m still using the romaji-style kana input, of course, even though this keyboard has a true kana layout printed on it; that’s a project for, well, “never”.

Also, the Control key is where god intended it to be.

Apart from the keyboard, there are no real downsides to the machine. I’m doing a clean migration to get rid of years of cruft, which helps. I think I’ve got all the finicky licensed apps moved over (Aperture and Photoshop adore their new home), and the bulk of the data. I need to reinstall a crapload of Perl libraries and random bits of code, data, and configs, but I’ve got basic functionality. The old MacBook is still under AppleCare for a few more months, so in a week or two I’ll revert it to the factory RAM and hard drive and send it in for some minor repairs I’ve been putting off.

Just for H!P fans…

Someone had a top-ten poll online for Hello!Project members. Since all the cool kids are doing it, I quickly clicked my way through and picked a set. The auto-generated pictures are ordered 1-10, but I didn’t obsess over the order, I just tried to pick a group. Most of the ones who fell just outside the top ten were in the “too darn young no matter how pretty they are” category.

It’s no coincidence that 9 of my 10 were “graduated” during the recent agency house-cleaning; star-pimp Tsunku is focusing his efforts on catching them (very) young and refreshing the brand. I, on the other hand, find women more interesting than girls, and appreciate fully-developed personalities and talents as well as bodies. His most spectacular meltdown to date (still quite mellow by US child-star standards) was a girl who started at 12; the new kids are a lot younger.

So, the list:


Hello!Project Telepathy Project

Koharu says, “I’m only fifteen, so maybe I’m missing something here. Why does the photographer keep leaving the room ‘for some me time’?”


Dear Aya Matsuura,

This is how you enter your new post-H!P career?


You’re gonna need stitches…

Found in a photo-tour of an abandoned love hotel in Japan:

"Young people looking to sew their wild oats..."

[as a side note, I’m always amazed at the sheer volume of material left behind in abandoned buildings and towns in Japan, even after their locations have become common knowledge]

Dear Apple,

[update: don’t ask me how the kanji open-quote got turned into an accented a; it’s an ecto/MovableType thing that happens occasionally]

Unlike Windows (any version), Mac OS X correctly keeps track of keyboard layouts, even going so far as to ask the user about possibly non-standard layouts. Except in the Kotoeri input method, where it insists that all keyboards share the same layout, so that my English external keyboard is assumed to have the same layout as my laptop’s built-in Japanese keyboard, forcing me to guess where you hid the ‘「’ key (blackslash, by the way).

[filed as problem# 6770720] [updated 4/15 and marked as a duplicate of bug# 5647954]

Beauty School Dropout…

From Costumes, Inc., we have this little gem:

"Go Grease Lightening with costumes from Grease."

Page 3 gets it right (NSFW!)

I give the folks at Page 3 abuse when they deliver horrible pin-ups, so it’s only fair that I praise them when they get it right. Warm skin tones? Check. Flattering pose? Check. Model alive and aware? Check. Proper lighting? Check. Lingerie that works with her curves rather than against them? Check.

Pretty girl wearing very little? Check. Not safe for work? Check.


Hello!Project Telepathy Project

Reina asks, “God, why can’t I get that Duran Duran song out of my head?”


Hello!Project Telepathy Project

Ai says, “OMGWTFBBQ! ROFLMAO! Can you believe this? They forgot to put feathers on my hat!


“This. Is. My. BROOMSTICK!”

cd deferred
find . -type f | split
for i in xa*; do
    for j in $(cat $i); do
        echo -n “$j ” #literal tab
        postcat $j | awk ‘
            /^From: / {f=$0}
            /^To: / {t=$0}
            /^Subject: / {s=$0}
            END {printf(“%s\t%s\t%s\n”,f,t,s)}’
    done >> /tmp/jfoo

Open in Excel, sort to taste, cleanup as needed, save for later use...

Editing: it’s not just for dead trees

Latest headline on Slashdot:

Mozilla Mulls Dropping Firefox For Win2K, Early XP

Took me a moment to parse that the way they intended…

Dear Blizzard Entertainment,

Your understanding of the BitTorrent protocol is seriously flawed. I’m watching the Connection Info window for the current World of Warcraft patch, and its behavior is, to be kind, pathetic.

With any halfway-rational client, this would be one of the healthiest swarms on the planet right now, but all I see is an endless stream of connections with other machines that all have data that the others want, but refuse to share. If you were doing anything right, I’d be frantically throttling my connection, because I’m sitting on a 100 megabit pipe with 99.9% of the patch. As it is, I’m occasionally uploading at 8 kbps for 30 seconds or so to a machine that then disconnects, and that’s enough to give me a 1.22 ratio.

Hello!Project Sing-along Project

Koharu: “Stop right there!”


”…you never get rid of the Dane”

From CNN, a little something for the folks who insist that paying tribute to pirates is a perfectly sensible economic transaction, and one that the recipients deserve for the hardships the West has inflicted upon them:

Piracy accelerated after the fall of the Somali government in the early 1990s and began to flourish after shipping companies started paying ransoms. Those payments started out being in the tens of thousands of dollars and have since climbed into the millions.

Oh, and yesterday they opened fire on the US-flagged food-aid ship that was transporting the American captain who had been held hostage by that other group of deprived, honest fishermen (who didn’t get the millions of dollars they politely requested at gunpoint).

[update 4/26: two recent data points worth noting]

Earlier Sunday, Kenyan maritime groups said Somali pirates had released another Yemeni freighter and its 15 crew members. The ship was seized in January with a cargo of petroleum products.


Separately Sunday, the captain of an Italian cruise ship said his security staff fought off a pirate attack in the region Saturday with pistols and a water hose. Commander Ciro Pinto told Italian media the ensuing gunfight damaged the ship, but the 1,500 passengers were unhurt.

Dear iChat,

perl -i- -ne ‘$s=1 if />ASCII</;$s=0 if $s
    && />Filename</; print unless $s’

Yes, I really hate pasting text into a chat window and having something like “(bug 4558)” turn into “(bug 455stop smiling!”.

Mt. Fuji from Misaki Port, Miura Peninsula, Kanagawa, Japan

Indirectly, this picture comes from my sister:

Mt. Fuji from Misaki Port, Miura Peninsula, Kanagawa, Japan

(from Panoramio user とも21, who has a site devoted to taking pictures of Fuji)

How I found it:

  1. Nellie called me a while back to get reacquainted.
  2. I flew out to Chicago to spend some time with her.
  3. She took me to a used book store.
  4. In the basement, I found a Japanese paperback book with an interesting title, も一つパイプのけむり (Another 'Pipe Smoke').
  5. It was written by famous composer Ikuma Dan, and contained a number of short essays.
  6. Many of them looked too challenging to take to my reading class, but since I missed class this week, I'm emailing the teacher a written translation.
  7. The fourth essay is titled 霧 (Fog). He writes about moving to a new house on the Miura Peninsula, along the Misaki Highway, and mentions that one of the things he can see is Mt. Fuji.
  8. I looked the area up in Google Earth and clicked on some pictures. This was the fourth picture I clicked.

Babe Noodles

Okay, they got me. I don’t buy a lot of instant noodles any more, but there are a few that I have a weakness for, including Donbei’s Curry Udon and Ippeichan’s Yakisoba. The last time I was in Mitsuwa, I picked up a few of each, and saw something I hadn’t noticed before:

Beppin Udon

The curry udon is now also “beppin udon”, where most dictionaries define “beppin” as an informal term for a beautiful woman. My J-J dictionary also offers “particularly fine goods” (特別によい品物). My big J-E dictionary only offers the “babe” definition and matching kanji 別嬪; Kanji Sonomama’s J-J offers both meanings, with goods getting the more appropriate kanji 別品 (one that’s not suggested by the Mac IME); JMdict applies both kanji to the “babe” meaning in its English version, but has both meanings in German.

Turns out Donbei is playing with both meanings while creating a third: “particularly straight”. They claim this year’s dried udon and soba rehydrate into a less tangled, better-looking product.

Big Toy Bridge

25 years ago, I dropped out of a class in Mandarin Chinese. I had no problem with the tones, I just lacked the dedication and discipline to spend ~20 hours a week studying.

Our textbook was a work in progress quick-print, and I threw it away a long time ago. I lost the C-E dictionary in a move some years back. Every once in a while, though, I’ve stumbled across one last piece of evidence: an index card with the Chinese name they assigned to me: 高橋模, with the Pinyin reading Gāo Qiáo-mó, and a note that 橋 means “bridge” and 模 means “the paragon” (高 of course meaning tall/high).

Obviously, I stumbled across the card again today. If you read it as a Japanese name, the first two characters form the common family name Takahashi, and the third is usually Mo, the same sound it has in Chinese. The “paragon” meaning never got to Japan, though; there, it means imitation or copy.

A lot of characters changed meaning going from China to Japan, but this one seemed odd, so I searched through some Chinese web sites, and found a video of a group of engineering students working on a 橋模; sure enough, it was a model bridge. Technically, a paragon is a model or example of something, but it doesn’t match the actual usage.

So my Chinese teacher named me “Big Toy Bridge”. Call me Mo.

(side note: Google indexes the page with 橋, but the character actually used is 桥, the Simplified Chinese replacement)

Queen of the Undead

[update: I don’t know why I read 魔装 as 魔法; I guess I just assumed it was 魔法少女, and didn’t realize that it’s a created word, masou, with a meaning like “dressed as a witch” (from 和装 “dressed Japanese-style” and similar)]

A little something recommended by Amazon: 「これはゾンビですか?」 volume 1, 「はい、魔装少女です」.

Is this a Zombie?

Amazon recommends…

I seem to have finally gotten my Amazon profile into a reasonable state, because the top 15 items it recommends for me are: 6 books on grilling, 7 fan-service anime DVDs, a Scalzi novel, and a Grimjack collection.

It won’t last, I know. A few days ago I had to delete 30 “classic horror” films from the list, because my purchase of the comedy film Dead Time Stories convinced it that I loved slasher flicks.

The limits of Kanji Sonomama

For the first time in a long time, I had to pull out my other electronic dictionary. Why? Because the short essay I was trying to read was filled with place-names. On the DS, I had to write one character at a time, hope it was used at the start of some word (Kanji Sonomama doesn’t have a true kanji dictionary), and then type each one in on my Mac and look them up in Enamdict.

My other dictionary, a Sharp Papyrus, has clumsier stylus input and a generally less useful interface, but a much wider variety of dictionaries, including names and places.

Even with both handhelds and my JMdict search tools, it’s still a tough slog, because Ikuma Dan writes in colorful, literary language, using pre-war orthography. For instance, 眼 for “me”, 筈 for “hazu”, 儘 for “mama”, 未だ for “mada”, 又 for “mata”, and my favorite, 何處 for “doko” (處 being an obsolete variant of 処).

It’s been an interesting experience, but one I won’t repeat any time soon; in the time it takes me to decipher two pages of his writing, I could read thirty pages of a children’s or young-adult book.

The Very Latest Thing

Ethernet over coax. I knew there was a reason I kept these things around. :-)

network leftovers

Tenso reshipping service, preliminary report

I’ve heard mixed reports about the various companies that act as reshipping agents in Japan, allowing you to order from companies who only ship domestically. Danny Choo recently had a prominent link to Tenso, along with a contest where the prize included shopping and shipping. There were relatively few comments about the service, but they were positive. I haven’t found many other comments about them, either, but I thought I’d give it a shot.

Several times a year, I place large orders with Amazon Japan. They only ship by air, so the order needs to be large to bring the shipping cost down to a less heartbreaking percentage of the price. They won’t ship software or consumer electronics internationally, and the marketplace vendors won’t ship anything overseas, so it’s been a limited-but-useful way to get stuff.

Tenso ships EMS, charging by weight, and in some cases this may end up being higher than Amazon’s air shipping; now that I have a few invoices to compare, I’ll have to figure out when it makes sense to use them for new goods, figuring in the cost of Amazon Prime to get free domestic shipping to their warehouse. For this test, I took advantage of Amazon’s free one-month trial of Prime. [Update: found Amazon’s rate page again; ¥1700-2700 shipping depending on the contents, plus a fixed ¥300 handling per item]

For used goods? No contest. A lot of marketplace dealers charge a nominal ¥1 + handling for used books and CDs that aren’t in high demand, and I found a single dealer who had three items that I wanted, -azb-アマゾン店. Their handling charge added ¥1020, and Tenso charged ¥2350 for shipping and handling, for a grand total of ¥3373. The original retail cost of the three items? ¥4819. Speed? I ordered on the 12th, Tenso received it on the 16th, shipped it on the 17th, and it was waiting for me at the office today, the 21st. It may actually have arrived yesterday; I was out.

Setting up my account with Tenso was easy, except for the credit card. Neither my Visa nor my Mastercard were accepted, despite having used both with Amazon, but my American Express card worked fine. The error page for this was the only place I noticed where their mostly-competent English was replaced by Japanese, and some of Danny Choo’s commenters reported the same difficulty, and ended up using Paypal. They give clear instructions on how to enter your personal address on online stores, and promptly notify you when you need to approve a shipment.

Will I use them again? Definitely for used goods through Amazon, likely for software/games that Amazon won’t ship directly, possibly for other stores if I find something I really want.

Were the three used items worth it? Hell, yeah.


Sigh, time to change hosting

The ISP I’ve hosted jgreely.com at for a long time is now bouncing all of my incoming email. It seems that they silently decided to disable the wildcard delivery feature of their mail server, so of the hundreds of (something)@jgreely.com addresses I have, exactly one of them was being accepted as a valid mailbox. And that’s not the one I use…

Verio: just say, “blow me”.

[Update: naturally their support is business-hours-only, so I’ve had to reconstruct the core list of a hundred or so useful somethings and manually add them to my account.]

[Update: so after all that, there’s no explanation of what happened, or why I still have no control over this feature on their control panel. The support guys seem like nice guys who know how to do their jobs, but I’m still dealing with the fallout from this, with no idea of how to prevent it from happening again. It looks like their updated software looks through your configured users to see if one of them has the full name “catchall”, and if not, assumes that you want to bounce everything not directly addressed to configured users. Which would be fine, if this were A) documented, and B) they’d reviewed account configs before the update to make sure it wouldn’t bite customers who’ve been with them for more than ten years]

Proof my email works again

In the past seven hours, I have received 490 pieces of spam. One made it to my inbox. One almost made it to my inbox. The rest were caught by SpamSieve, with no false positives.

So, yes, I’m pretty sure that the catchall mailbox at jgreely.com is working again. :-)

I moved one of my parked domains to a new account at Pair, the hosting side of domain registrar PairNIC. They offer clean multiple-domain support with catchall mailboxes and sophisticated filtering, secure IMAP and SMTP, and a full range of scripting languages and libraries under FreeBSD. Once I’ve tested everything out with that domain, I’ll move jgreely.com over, as well as the J-E dictionary I’m currently hosting on jgreely.net.

It will be a while before I can resume the blog upgrade work I started a while back, so dotclue.org won’t move to the Pair account any time soon, and neither will my old high-volume picture site (which survives because of bandwidth-throttling firewall rules). All of the non-blog CGI will probably end up on jgreely.net once that domain is migrated off of the flaky old Shuttle sitting in my closet.

Hello!Project Sing-along Project

Kusumi: “…and I’m too sexy for my hat, Too sexy for my hat, what do you think about that?”


We’re FERCed

Jon Wellinghoff, Chairman, Federal Energy Regulatory Commission, “Earth Day” 2009:

I think baseload capacity is going to become an anachronism. Baseload capacity really used to only mean in an economic dispatch, which you dispatch first, what would be the cheapest thing to do. Well, ultimately wind's going to be the cheapest thing to do, so you'll dispatch that first. People talk about, 'Oh, we need baseload.' It's like people saying we need more computing power, we need mainframes. We don't need mainframes, we have distributed computing.

(via The National Review)

Dictionary update

[Update update: I’ve made a small change to add the full JMnedict name dictionary; a lot of things that used to be in Edict/JMdict have been moved over to this much-larger secondary dictionary, and I finally got around to integrating it. The English translations aren’t searchable yet, mostly because I need to rework the form and add the kanji dictionary to Xapian as well, so that I have J↔E, N↔E, and K↔E.]

One downside of moving a lot of stuff onto my new shared-hosting account is that I have to give up a lot of control over what’s running. Not only do I have to work through an Apache .htaccess file instead of reconfiguring the server directly, but I can’t run my own servers on their machine.

So, goodbye Sphinx search engine, hello Xapian (thanks, Pixy). While it suffers from a lack of documentation between “baby’s first search” and “211-page C++ API document”, it has a lot to offer, and doesn’t require a server. One thing it has is a full-featured query parser, so you can create searches like “pos:noun usage:common lunch -keyword:vulgar” to get common lunch-related nouns that don’t include sexual slang (such as the poorly-attributed usage of ekiben as a sexual position). That allows me to use the same tagging for the E-J searches that I use in Sqlite for the J-E searches. [note: everything’s just filed under “keyword:” in this first pass, and the valid values are the same as the advanced-search checkboxes]

I need a full-text search to do English-Japanese, because the JMdict data isn’t really designed for it. There are hooks in the XML schema, but they’re not used yet. As a result, my search results are a bit half-assed, which makes the new query support useful for refining the results. I can also split out the French, German, and Russian glosses into their own correctly-stemmed searches; with Sphinx, there was one primary body field to search, so all the glosses were lumped together. With a small code change, I can tag each gloss with the correct ISO language code and index them correctly.

The new version is now live on jgreely.net/dict, which means I should be able to move that domain over to the shared-hosting account soon.

Once I figured out how to use Xapian (through the Search::Xapian Perl module, of course), replacing Sphinx and adding the keyword support took a few minutes and maybe half a page of code, total. In theory, I could use it for the J-E searches as well, but I’d lose the ability to put wildcards anywhere in the search string, which comes in handy when I’m trying to track down obscure or obsolete words.

One thing I haven’t figured out is why I can’t use add_term with kanji arguments; both Xapian and Perl are working entirely in Unicode, but passing non-ASCII arguments to add_term throws an error. The workaround is to set the stemmer to “none” and use index_text, and that’s fast enough that I don’t need to worry about it right now.

The most annoying thing about the Xapian documentation is how well-hidden the prefix support is. The details aren’t in the API at all; you can learn how to add them to a term generator or query parser, but the really useful explanation is over in the Omega docs.

Things that suck

  1. 10% packet loss on my DSL line.
  2. Three hours diagnosing the problem so that I could convince tech support it wasn't my equipment. And, yes, I even had a spare DSL modem lying around.
  3. At least four hours spent on the phone with support at various levels, mostly spent listening to Muzak and repeating parts of item #2.
  4. Being told that it will be 11 days before someone can physically come out and check the lines, since resetting the DSLAM didn't fix it.
  5. Discovering that every other service provider in the area (cable, wireless, etc) has at least a 5-day lead time, and juicy up-front costs for the required gear.

Dear Amazon Associates Program,

Report-processing FAIL:

You are receiving this email because our reports indicate that you have sent users directly to www.amazon.com, www.amazon.ca or www.endless.com through paid search advertisements that were displayed to users who searched on keywords which you bid upon and purchased in search engine keyword auctions.

Um, no, I haven’t. It would never have occurred to me to try, and I wouldn’t have expected it to work very well. Did you maybe get your report query backwards and send this to all the associates who didn’t pull this trick? Or just to everyone, on the assumption that 94.72% will just ignore it?

Dear Younha,

I understand that your musical career has had a great deal of success in Japan as well as your native Korea (as it should; you’re quite talented), but you seem to have picked up a few things from the Japanese that are best avoided.


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