December 2017

New Toys

My 7″ 1280x800 monitor got a bit flaky during the data center move, and while it survived, the screen quality will never be quite the same, so I picked up an Eyoyo 10″ 1920x1200. The blindingly bright blue power LED needed covering with gaffer tape, but the image quality is excellent, and it even has speakers. Works great with my Mac, but even though my Surface Pro 2 detects it and shows its resolution, for some reason it doesn’t send a video signal out to it via HDMI. I tried two different mini-Displayport adapters and a brand new high-end cable, so I suspect HDCP handshake issues.

[Update: there’s something a bit odd about the Eyoyo monitor; when I first plugged it into my new Raspberry Pi 3, it worked perfectly, including showing the splash screen, but ever since, it only works if I force-select a video mode. Still works fine with the Mac, but it simply cannot auto-sync with the Pi, or show anything from the Surface Pro 2, which makes it “less than versatile”]

While setting up my cube in the new building (which included swapping the desk pieces around and adding a partial roof), I decided to ditch the crufty old USB2 hub I was using in favor of an Anker 10-port USB3 with fast charging support. Mostly because the right-hand USB port on my MacBook Pro went out a while back. Maybe after the holidays I’ll send it in for service; I think the AppleCare runs until February.

Those were easily justified purchases, but in the nearly-pure toy department, I picked up a TrueRNG3 USB hardware random number generator. Automatically supported in Linux, works on a Mac if you manually send the output to /dev/random, and they have a Windows driver. Sadly, while OpenBSD 6.2 supports several USB HRNG, it looks like the TrueRNG isn’t one of them. Yet.

I don’t have dieharder test output from it at the moment, because it only delivers 50 KB/s of random bits, but ent really likes its output. The vendor claims to pass the dieharder tests, but doesn’t say how long it took to generate enough samples (some of the tests consume a lot of bytes).

Why am I trying to improve the quality of my random numbers? Because I’ve been playing with random passphrase generation again, using a rule-based generator that lets me feed in a variety of patterns and dictionaries, for Diceware-style generation with calculated entropy. For instance, one script generates an improved romanized Japanese diceware list, based on the word-frequency rankings in JMdict, and I can do side-by-side comparisons between different lists to see how easy the results are to remember. Side note: the EFF wordlists are a nice improvement on the original English 5-dice lists, and they’ve got two nice 4-dice lists as well, with interesting properties.

For real fun, I set my generator up to allow mixing multiple rulesets, which is a relatively minor increase in entropy, but definitely more entertaining (especially if you include the Lord Of The Rings ruleset…).

And it also let me prototype an updated syllable-based system using polyhedral dice. Cut out and save!

|     Random Passphrase Generator      |      Digits, Specials, Uppercase     |
|                                      |                                      |
|  1  2  3  4  5  6  7  8  9 10 11 12  |     1  2  3  4  5  6  7  8  9  0     |
| -----------------------------------  |     @  #  %  $  !  |  &  _  ,  :     |
|  s  v  p  h  f  k  r  t  j  m  w  b  |     A  B  C  K  N  Q  T  X  Y  Z     |
|                                      |     +  -  *  /                       |
|       1   2   3   4   5   6   7   8  |                                      |
|   +--------------------------------  |     d12 * d8 * d6 = 9.17 bits        |
| 1 | eth  id  ol  eg  od  az  it  el  |     var/op/digit = 8.64 bits         |
| 2 |  ug  og  an  as  on  ar  is  al  |     d10 = 3.32 bits                  |
| 3 | ath  ay  ot  iz  us  os   a   e  |     d4 = 2 bits                      |
| 4 |  et  il   u  ed  ig  uz oth   o  |                                      |
| 5 |  oy  ul  ag  en  un  oz  or  es  |     10 syl ~ 14-char random ASCII    |
| 6 |  ad  ez ith  ut   i  ud  in  at  |     12 syl > 16-char random ASCII    |

(this table shouldn’t wrap on most screens, but for some reason it does in Chromium on my shiny new Raspberry Pi at 1920x1200, unless I zoom the font size to 80%, 110%, or 200%; some odd scaling in the version of Bootstrap I’m using, I guess)

Most people never find the old Diceware tables for generating syllables, special characters, etc. They’re buried in the original mailing-list post for Diceware, and aren’t referenced in the current HTML pages. Most of them aren’t particularly useful, but if your password policies require some combination of upper-case, special characters, and digits, they’re better than just appending “A1!” to every password. My var/op/digit rules above exist for the same reason; I find it pretty easy to remember “Z/4” or “X+2”.

Dear Cory Doctorow,

Yeah, this headline just screams “read me”:

A free sf anthology about space travel, inequality, equity and public policy

Oh, wait, it’s actually screaming “blow me!”, because message SF is like being strapped into a chair and forced to watch endless After-School Specials.

Dear Amazon,

The Amazon Basics Computer Speakers are not well-shielded, and by that I mean they pick up local radio stations when the volume knob is at roughly 50%, and my hand acts as a convenient antenna when I adjust the knob. This defect is well-known, but buried by the mostly-positive reviews.

Apparently some people have had luck playing RMA roulette, but it’s pretty faint, so I think I’ll just ask Todd for some ferrite beads. Useful having a fully-stocked hardware department in your company. (and ohboy is it going to be fun to move that to the new building next month; some of his stuff isn’t going to fit into the elevator…)


Found some ferrite beads around the house, and adding them didn’t help. The radio signal was stronger this morning, enough that I could understand the ads, so back they go. Fortunately there’s an Amazon locker at the mall, so all I have to do is drop them off on the way to work.


Friday morning I dropped off the RMA and ordered these instead for $3 more. They’re the best-seller in the category, and it looks like I bought them just in time, since they’re out of stock now. With standard two-day Prime shipping, they were on my porch Saturday morning when I went out to feed the cats. They’re about twice the size of the Amazon Basics speakers, with much better sound, and no radio interference.

Baby's First Ruby Script

  1. is like someone tried to reimplement CPAN with crayons and a dumpster.

  2. most of the Ruby community thinks an API dump is documentation. Some of them don’t even supply that.

  3. 90% of FAQs assume you’re using Rails. Maybe 95%.

  4. I got bad flashbacks to Pascal from having to put function definitions at the top. Yeah, whatever.

  5. “our {} is different” will trip me up for years.

  6. not being able to freely break lines mid-expression is annoying.

  7. googling for help always returns obsolete 10-year-old results (“thanks, pagerank!”).

  8. manual type conversion == stone knives and bearskins.

  9. ri is like someone tried to reimplement perldoc with chalk. In the rain.


I had a tiny project that had minimal dependencies. The Perl version flowed from my fingers like water, naturally, but the logic was trivial, and all it needed was a TOML parser and some random numbers, so it seemed like it would be easy to try out in Ruby. And I can even say something nice about the language: shuffle() and uniq() are core array methods.

A related script generates an improved Japanese Diceware ruleset using JMdict, but I haven’t found a full-featured romanization gem, and the advice about XML parsing is all over the map. Perl’s XML::Twig and its simplify() method have really spoiled me; I ended up having to mix Nokogiri::XML::Reader with Nori.parse, and then write my own force_arrays() function to emulate one of the most useful features of simplify(). The result is still only a crude approximation of what I can do with XML::Twig, but it suffices for this project.

While I’m complaining, the following gang-bang expression is not equivalent to the assignment version, which produces a sorted random unique subset of the array. Instead, you get the unsorted complement of the desired slice, unless the array was already unique, in which case Ruby blows chunks. This is, um, non-obvious.

words = words.uniq.shuffle.slice(0,7776).sort

On an unrelated note, I was amused to discover that the only useful PDF-generating gem still doesn’t support clipping paths, and while the authors claim it can easily be extended to support additional low-level PDF operators, that feature is not mentioned anywhere in the documentation or code…

Why play with Ruby in the first place? An old friend and on-again co-worker is a real zealot. Of course, our uses of scripting languages are very nearly orthogonal, to the point that many of the reasons I keep bouncing off of Ruby are things he never sees.

And, yes, I continue to be offended by Python’s use of indentation, although I’ll tolerate it at small scale to play with Ren’Py and CircuitPython. It’s heavily pushed on the Raspberry Pi as well, but at least there I can run Emacs and Perl, as Ghod intended.

Why Japanese newsstands thrive...

Left, Mikoto Hibi (日比実思), age 19; right, Yūno Ōhara (大原優乃), age 18. In younger days, both were in the group Dream5, but have now gone on to bigger things. Yūno’s gravure career is exploding like one of her bikini tops, while Mikoto is just getting her feet wet.

Well, that's appropriate...

Trying to watch the new trailer for Ready Player One just crashed my Mac’s login sessions. Didn’t reboot, didn’t crash any backgrounded services, just blew away both my work and personal logins.

Never seen that one before.

Holiday Music...

I hate Christmas songs, which means I haven’t gone into a store without earplugs since October. Usually I counter with A Very Scary Solstice, carols by the H.P. Lovecraft Historical Society.

But sometimes I accidentally hear “the real thing”, and am forced to invent replacement lyrics to guard my soul.

Ruby the red-haired schoolgirl
liked to put on live cam shows.
Men all over the planet
paid to watch her strip and pose.

All of the other schoolgirls,
jealous of her pricy clothes,
bought webcams and lace undies,
to put on their own smut shows.

Then their web sites got shut down,
by the new DA.
Ruby’s stayed online because
she let him go all the way.

Now she’s working for Hustler,
making thirty vids a year.
She’ll be retired by 20,
married to a financier!

Visualizing Pi...

So, I bought a Raspberry Pi 3 recently, and since I had no immediate plans to dabble in hardware-hacking, went with the official starter kit, so that I’d get a known tested international power supply, a decent case, and a cute little compact keyboard. (also a three-button mouse and an HDMI cable)

Everything worked perfectly out of the box, including auto-detecting the 1920x1200 resolution of my little Eyoyo 10″ monitor. Then I ran the software updates, rebooted, and poof, no more display. After confirming that the Pi still booted, grabbing the latest image, and booting in safe mode, I discovered that the only way to get a fully-updated Raspbian Jessie or Stretch install to show video on the Eyoyo was to add something like this to /boot/config.txt:

hdmi_force_hotplug=1 #insist there's a monitor there
hdmi_ignore_edid=0xa5000080 # don't query the monitor
hdmi_group=2 # use monitor-style resolutions
hdmi_mode=69 # use 1920x1200, 60Hz
hdmi_drive=2 # turn on HDMI audio

But then I can’t plug it into anything else without either blindly booting to safe mode or ssh-ing in, changing the config, and rebooting. After a fruitless (heh) search of forums and FAQs, I went through the download archives and found the first Jessie release after the Pi 3 came out (2016-02-26). It worked perfectly. A quick binary search between that and the last Jessie release revealed that the last release that correctly auto-detected my monitor was 2017-01-11. None of the Stretch releases work, and the release notes for Jessie 2017-02-16 don’t have anything that screams “hey we broke the EDID parsing”.

But that appears to be what they did. Adding one line to my config re-enabled auto-detection on the Eyoyo:


It came up as 720p, but that’s better than “blank”. Adding this commonly-FAQd line brought it to a more reasonable 1680x1050, while still allowing it to work with other monitors:


So, a quite pleasant out-of-the-box experience, a disaster of an update, and the recovery process boils down to “mount the SD card on your PC/Mac, Google for help, then blindly tinker with /boot/config.txt until you get it working again.”

I suppose this is one way to find all the future sysadmins in your fifth-grade classroom…

I do have one specific project in mind for work. Now that we’re in a new building with lots and lots of windows, I should be able to get a decent view of the sky and build Pi-based stratum 1 ntp servers.

Oh, and I named it Mone. Because inside every Pi is delicious cake.


I just installed FreeBSD 12-CURRENT, which doesn’t support wireless, but gave me a completely different OS to test against. It bootstraps itself using the same sort of config.txt, and sure enough, it also requires setting avoid_edid_fuzzy_match=1 to work with my monitor.

Update 2

Just to round things out, I installed Ubuntu MATE as well, and since it’s not as up-to-date as Raspbian, it auto-detects fine. It’s subtly broken in the typical Ubuntu way (can’t run the GUI software updater, and updating from CLI broke several things, including Firefox), so I won’t use it for anything. I expect that it’ll pick up the EDID bug in the next release.

By the way, I’m booting all this stuff off of a 5-pack of 16GB MicroSD cards, stored in this cute little holder. This little Anker USB3 card reader is the fastest and most useful I’ve found for imaging MicroSD cards and mounting the /boot partition to fix the config file.

Update 3

So, OpenSUSE has a 64-bit build. It installed cleanly, so I let it run a whole bunch of updates, and then I decided to see if the performance was better for things like watching video. So I opened up Firefox and went to Youtube. Or, more precisely, I tried to go to Youtube, because Firefox absolutely refused to open the page, claiming that it used outdated encryption that was evil and fattening and probably voted for Trump. There appears to be no way to say, “just fucking open the site, okay?”.

Dodging bullets

Once upon a time, there was a grad student, pretty, bright, and lively. Let’s call her Fae, because that wasn’t her name, and I’m telling tales out of school. And I won’t swear to it that I ever got the whole story straight, or that I remember all the details today, over 25 years later.

Fae arrived in our department like a breath of fresh air, accompanied by her husband, a good-looking, likable chap, quietly competent in his field. Let’s call him Nick, because it’s kinda sorta like his real name if you play word-association games.

Everybody in our group liked them, and we were always happy to help with their computing needs. Nick was teaching, and Fae was working for us for a while, so she spent a lot of time hanging out in our area. Being both intelligent and decorative, she was always welcome.

They seemed like a great couple, so I found it a bit odd when she started sitting on my lap during her daily visits to my cube. She was warm and curvy and looked and smelled nice, so I certainly didn’t mind, but I never tested the waters, and the most I ever pursued our friendship was inviting her to go shooting with me. Admittedly, that was about the time I got the impression things were on the rocks with Nick, but while I was attracted, there was a little warning light flashing somewhere off in the distance.

The local shooting range was up near my apartment, so she was going to meet me at my place. To my surprise, she showed up with another of my co-workers. Let’s call him Carlton, because it lets me make an obscure reference to both Rhoda and “Dave’s Comic” (which I really should scan in someday; I’m probably the only one who still has a copy).

Carlton was a cool guy, and a bit of an oddball in our group of sysadmins, since he actually had a Master’s degree in computer science. He was also older, married, and had several kids. He was a gun-nut and liberty-oriented kind of guy, the sort whose guns had no paper trail, all having been acquired through family. (and, speaking of bullet-dodging, he at one point asked me to buy one for him…)

Anyway, we had a good time, they hung out at my place for a while after, and Carlton even borrowed my paperback copy of the Kama Sutra.

Not long after, the shit hit the fan. Not only was Nick heading back to his old school, alone (and a quick Google suggests he’s doing quite well there today), Carlton was leaving his wife, his kids, his church, and his job, and moving to another state. With Fae.

She was, it seems, trading up. Nick, it turned out, was husband #2, and when Carlton settled into his new life and showed no signs of further advancement, she left him, too. I recall hearing that she stayed with #4, but I only know one person in that circle any more, and I’ve never asked.

There’s not really a moral to this story, but it came to mind now because of all the people vigorously pretending to be shocked, shocked that everyone kept their mouths shut for decades about the boors and villains in entertainment, media, and politics. There are some clear victims (and not just the kids), but also a whole lot of gray areas suddenly being repainted black and white now that it’s to their advantage.

Y’know, when a Major Celebrity invites two young starlets that he just met out for dinner, a little red flag goes up. When the first thing he does at the restaurant is offer pills and wine to wash them down with, there’s another little red flag. When you get in a cab with him and he takes you, not to your home, not to his home, but to a friend’s apartment, two or three more little red flags go up. By the time he starts stripping your unconscious friend on the bed, I’m pretty sure you’ve had the chance to figure out that he was just hunting for pussy all along.

Yes, he’s a creepy predator sexually assaulting a woman who can’t consent. No, she’s not asking for it, it’s not her fault, and she doesn’t deserve it. But she wouldn’t be his victim that night if she hadn’t chosen to ignore the warning signs. There’s a lot of talk about “denying women agency”, but that’s precisely what the black-and-white paint job does; it’s as dishonest as “I was just cleaning my gun when it suddenly went off” or “honest, officer, I was just standing on the corner minding my own business”.

Converts to the Church of J's Lasagna

Dinner with the family tonight. My variation of James A. Thorson’s lasagna was a big, big hit; somehow I’d never shared it with them in any of their visits to my place in the nearly 30 years I’ve been making it. It didn’t hurt that my sister had a stash of amazingly good parmesan cheese.

Surprisingly, the giant box that arrived labeled Cassano’s Pizza was in fact filled with dry ice and Dayton-style pizza. Not tomorrow’s dinner, but soon we shall feast.

Christmas Cheer

(via 大盛りあがりグラビア館)


Good: family, good food, prezzies, white Christmas.

Bad: high temperatures in Chicago less than half the low temperatures at home. Update: how could I forget my sister playing Christmas music all day long. And, yes, it included this. All of it. I hadn’t heard any of it in forty years, and wish it had stayed that way. Sorry, Nellie.

Also, there’s a perfectly good reason that one of my presents was a 5-pound bag of rice. And it’s completely unrelated to the four cookbooks I got.

Local food deserts

With all the talk about “food deserts” (no large groceries within a mile) and the newly-invented “food swamps” (too much nearby fast-food), I thought I’d take a look at my town, which has its share of poverty (driven in large part by waves of low-skill immigration).

The official USDA definition of a “food desert” is a census tract where either 500 people or 33% of the residents are more than 1 mile from a supermarket or large grocery store (10 miles for rural). Basically the entire US circa 1940.

The Atlas shows two in Salinas. The first is a well-populated residential area bounded by Market, Capitol, Central, and Clark. The second one consists almost entirely of a golf course, a college campus, a bit of farmland, and an airport, and has two large groceries within half a mile.

Looking at the area around the first, the North edge is mixed commercial/industrial, with more residential past that. South is residential with scattered commercial, ending in farmland. West is more farmland, East is our tiny downtown, including the Steinbeck Center, a massive cinema complex, and lots of good restaurants.

A quick look on Google Earth confirms that the area contains mostly well-maintained single-family homes, with at least one car each, which means they can easily reach the Star Market, the Nob Hill, the Smart and Final, and the giant Costco that are all about 1.5 miles away (at least two of these have delivery options…). So, no, this ~~mostly-~~middle-class neighborhood is not deprived of healthy food options. By the way, I drive by it on my way to the Nob Hill; it’s pretty nice. Zillow lists homes in this area selling from around $350,000 to over $650,000, and the appraised values are all in that range as well.

West of Salinas is a much larger food desert. It consists of an airport and a former military residential area, the latter of which is gradually being absorbed by Cal State Monterey Bay.

There are some giant “deserts” when you zoom out, but they’re mostly mountains, scrubland, and farms. Yes, Big Sur and Shasta are “food deserts”, gigglesnort.

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