Dear Amazon,

Unlike last time, you at least did the math to make sure I know the 6-pack’s a ripoff…

Thing-A-Ma Jig drafting paper

Quick custom grid paper PDF for the popular wire-bending tool. I don’t know who let the trademark lapse, but there seem to be at least six different companies slapping their brand name on the same made-in-China product, of which the best seems to be Artistic Wire’s Deluxe Jig. I think mine was labeled “Bead Landing Thing-A-Ma Jig”, but it’s all the same thing, modulo how much they’re willing to pay the contract manufacturer to inspect for defects and ensure the accessories are included. (pro tip: if you don’t have enough little plastic pin retainers, or they don’t work as well as you’d like, cover the plate with masking tape and poke through)

(I could, of course, just buy an assortment of pegs at the hardware store and drill out any size or shape of grid with my CNC router…)

There’s a range of products from WigJig that have a wider variety of wrapping pegs, but despite the significantly higher price, they don’t say anything about the relative sturdiness of their plastic bases.

It wasn’t easy, but…

…I made it out of the Benchmade factory store for under $200. It would have been much more difficult if I hadn’t just spent nearly twice that on precut kumihimo silk.

From Thanko, but if it actually works…

Bug Zapper with fan and light, for when the tennis-racket style zapper just isn’t doing the job.

‘Fun’ with Miller

The Miller data-manipulation tool has a lot of potential, but the organic development process has left it with a lot of rough edges.

My first hint that all was not well internally was when I was hacking on PDQ output and realized that I had to type nest --implode --values --across-records --nested-fs space to get what I wanted. The manpage includes a shortcut for the nest verb’s other mode, so that --explode --values --across-records --nested-fs can be replaced with --evar, but there’s no matching --ivar. So I forked the project, added it, and sent a pull request.

The functionality was trivial, but the single-line usage description had to be added five times. That sent up a little red flag.

Still, it was easy to do, so I thought I’d see if it was feasible to fix one of the other things that bugs me, which is the lack of quoting and/or escape characters in its native DKVP file format (delimited key-value pairs, aka foo=1,bar=2,baz=3).

The answer turns out to be “not easily”, and I quickly learned some unpleasant things about how it handles other data-format conversions.

Given the perfectly-ordinary CSV input file foo.csv containing:


I get the following results:

# DKVP: useless as expected
% mlr --icsv cat foo.csv

# (note: internally, fields have correct values)
% mlr --icsv --ojson cut -f a,b foo.csv
{ "a": "1,1", "b": "2\n2" }

# CSV: reasonable, but strings converted to ints
% mlr --csv cat foo.csv

# Quoted CSV: better, but should be default
% mlr --csv --quote-original cat foo.csv

# JSON: reasonable, but strings converted to ints
% mlr --icsv --ojson  cat foo.csv 
{ "a": "1,1", "b": "2\n2", "c": 3, "d": "4\\r4", "e": "5\\n5" }

# Quoted JSON: oh, hell no
% mlr --icsv --ojson --jvquoteall cat foo.csv 
{ "a": "1,1", "b": "2
2", "c": "3", "d": "4\r4", "e": "5\n5" }

Note that the automated num-ification has real consequences for data processing, since you can’t do things like regex matches or string-substitutions on a number type, and have to explicitly coerce fields back to strings; the error message for this is less than clear. Also, leading zeroes trigger octal conversion…

So that’s an enhancement request for escaping comma, cr, and lf in DKVP, plus a bug on the busted output when you add the --jvquoteall option to avoid the num-ification of string literals. (and it bothers me that I had to explain the bug in a completely different way because one of the devs didn’t understand my sample CSV file…)

I see a massive refactoring in its future (“cover a wall with color-coded sticky notes, then break out the chainsaws and forklifts”). Oh, well, useful tool when used with care.

Dockerizing DeKindle

DeDRM and KindleUnpack are packages designed to extract the contents from ebooks purchased through Amazon, with multi-platform point-and-click GUI wrappers. (DeDRM includes decrypters for many other platforms as well, but I don’t need any of them)

My Japanese-book-hacking workflow doesn’t play nicely with point-and-click, and now that I’ve gone to the effort of resurrecting and updating it to work with modern versions of Perl and TeXLive, I thought it was time to dig out the core of the extraction tools and repackage them in a format more useful to me.


Amazon lightning deal to watch for…

Every once in a while, this Sanag 10000mAh battery pack goes on sale on Amazon. I bought one before I went to Japan in April, and it worked great; smaller and lighter than my big Anker charger, faster and more powerful than my old Mophie (which, by the way, loses its charge annoyingly quickly, where the other two can sit on a shelf for at least a month and still be at 100%).

Wednesday evening, I was checking out a recent order, and found a lightning deal had just started, discounting the standard $26.99 price by $4.39, and then adding a 5% off coupon to bring the total, with free tax and shipping, down to $21.25.

So now I have two of them. Did I mention we’re planning to go back to Japan in November? 😄

(and, yes, it’s breaking my rule against buying things from randomly-named Chinese vendors, but this one has actually been around for a while now, and their reviews are actually about this item, not like the scammers who build up positive reviews on something innocuous and then swap it out so that the same listing now refers to a completely different product; “900 four-star reviews say this underwear fits perfectly, which is kind of odd for a bookcase”)

Practical Thanko product: floormat alarm clock

An alarm clock that won’t stop until you put your weight on it for a few seconds:

This wouldn’t have worked for me in college. I had an incredibly loud, obnoxious alarm clock that had no snooze button, which I kept on the first floor, with the switch wrapped in duct tape. When it went off, hitting “snooze” meant I had to get up, walk downstairs, unwrap it, manually adjust the alarm time, rewrap it, walk back upstairs, and go back to bed.

I generally managed to do this four or five times before actually starting the day.