“Don’t you ever give up your guns. If people lose that right, forget about it. Politicians — they will take everything away from you. And then what are you going to do, protest with a rock? Because that’s what they do in Europe.”

— Fabio, proud American

Spoiling my laptop, and myself


A while back, I upgraded my laptop by replacing the DVD with a 240GB SSD. This has been very, very nice, and gave me just shy of 750GB of disk space, a third of it silly-fast.

So naturally I couldn’t resist replacing the 500GB Seagate hybrid with a Western Digital 750 GB 7200rpm drive, giving me just shy of a Terabyte. And I carry another Terabyte around in the form of a WD hardware-encrypted USB drive.

If this future we live in had flying cars and catgirls, it would be perfect.

Amusingly, despite the fact that this laptop (and its daily backups…) is the center of my electronic universe, I will likely not be taking it to Japan with me at the end of March. My sister and I are only going to be in Kyoto for a week, and time spent in the hotel is time wasted. I’ll take my little Win7 netbook (can VPN to work in an emergency) and my Kindle (v3 has kanji support, and 3G Whispernet works all over Japan), but the bulk of the weight in my carry-on will consist of cameras and lenses.

The Kindle is the reason for several of my seemingly-unrelated recent entries and sidebar links, by the way, including an upcoming discussion of my grand kit-bashing project that mixes Aozora Bunko, MeCab, JMdict, MongoDB, pLaTeX, dviasm, and pdftk, welded together with a few hundred lines of Perl to produce ebooks with personalized levels of furigana and matching per-page vocabulary lists. More on that soon.

In addition to Aozora’s out-of-copyright literature, it’s easy to find much more contemporary work marked up in their format. One should of course only download such things if one is already in legitimate possession of the printed book, but once that hurdle is cleared, my version will be much easier to work through. The scripts can take a complete light novel from raw text to completed PDFs in about 10 seconds, and it only takes a few passes to find all of the unusual vocabulary and definitions, so my reading speed will be improving quite a bit soon.

Which is good, because, as I said, I’m finally going back to Japan!

Y'know, just in case


「グリーンと聞く度、殺人光線を抜く」

Now I just need an appropriate illustration…

Design is not engineering, lesson 692


Words fail me. Windmills. Solar panels. Greenhouses. Only people with advanced degrees could come up with such a stupid bridge design.

Eco-Bridge of Doom

(via Gizmodo, whose writer seems to be about as technically adept as the designers themselves)

Barsoomian Haiku


Evil men often
held Dejah Thoris for weeks;
did they get any?

Warlord John Carter,
always present when villains
say “As you know, Bob”.

Barsoom’s nude beauties:
inadequately described,
yet worth dying for.

One from the trenches...


"I'm going to write out a log entry every time I see this sort of packet, and put it at WARNING level. This will help me solve a serious problem!"
    -- Anonymous Developer

1,000 packets/second later on N devices…

Fun with LibreOffice...


Since a new version of the free-as-in-fork LibreOffice package was just released, I thought I’d take a look and see if it’s gotten any easier to import formatted text.

The answer: “kinda”.

Good: It imports simple HTML and CSS.

Bad: …into a special “HTML” document type that must be exported to disk in ODT format, and then reopened. Otherwise, all formatting not available for web use will either disappear from all menus and dialog boxes, silently fail, or be deleted when you save (generally the result of pasting from another document).

[note that the Mac version crashed half a dozen times as I was exploring these behaviors, but it usually managed to open the documents on the second try]

Sadly, furigana are not considered compatible with HTML, so they’re stripped on import, making it rather a moot point that you can’t edit them in HTML mode. The only way to import text marked up with furigana is to generate a real XML-formatted, Zip-archived ODT file.

Dear travel writer,


I am not as impressed with your clever prose as you are:

"Fukagawa is a neighborhood in Tokyo’s Koto ward, just 3km east of the Imperial Palace and Tokyo Station, and across the Sumida River. Like most wards in the east of the city, it is not a place where wealth is overly evident, but neither is want. While by no means a sleepy hollow, it has none of the pent-up-ness of the central business districts, or the brittle proud-of-itself chic of the city’s shopping meccas only a few stops west."

One of these sentences contains information. The rest say a lot about the writer, but nothing at all about Tokyo.

"Y'see, software has layers"


Just spent a merry, no wait, hellish few hours fighting to get a LaTeX distribution up and running for the sole purpose of running a single script that uses it to convert marked-up Japanese text to PDF in convenient ebook sizes.

I failed. Or, more precisely, I got all the way to a DVI file that could be displayed quite nicely on screen, with all the kanji and furigana intact, but then the PDF converter that was part of the same TeX package that had generated it started barfing all over my screen, and I refused to spend more time on the project. I simply have no desire to navigate the layers and layers and layers of crap that TeX has acquired in its hacked-together support for modern fonts and encodings.

Honestly, if I want to generate cleanly-formatted Japanese text as a PDF, with furigana and vertical layout and custom page sizes, it takes 10,000 times less effort to spit out bog-standard HTML+CSS and feed it to Microsoft Word.

[Note to the MS-allergic: performing the equivalent import into OpenOffice is possible, but not reasonable. Getting basic unstyled plaintext+furigana wasn’t too bad, but anything more complicated would be an exercise in tedious XML debugging.]

[Update: gave it another go, and eventually discovered that running dvipdfmx with KPATHSEA_DEBUG=-1 in the environment returned a completely different search path than the kpsewhich tool used. Copying share/texmf/web2c/texmf.cnf.ptex to etc/texmf/texmf.cnf made all the problems go away. At least until the next time I upgrade something in MacPorts that recursively depends on something that obsoletes a recursive dependency of pTeX and hoses half my tools.

And, no, I can’t use the self-contained and centrally-managed TeX Live distribution (or the matching GUI-enabled MacTeX). That was the first hour I wasted. Its version of pTeX is apparently incompatible with one of the style files I needed.]

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