Monday, December 3

platform detection with linux on single-board computers

I’m extracting some Python code for detecting the current hardware from Adafruit_Blinka and Adafruit_Python_GPIO. This is a quick and dirty linkdump on ways to figure out what board you’re running on.

Python’s sys.platform:

This string contains a platform identifier that can be used to append platform-specific components to sys.path, for instance.

Python’s platform - yields some architecture / OS / processor / Python interpreter data.

If it exists, /proc/device-tree/model may give you a human-readable string (no trailing newline):

pi@raspberrypi:~ $ cat /proc/device-tree/model
Raspberry Pi 3 Model B Plus Rev 1.3

/proc/cpuinfo will have various useful things. On the Pi, it’ll include lines like so, which are useful:

Hardware        : BCM2835
Revision        : a020d3
Serial          : 000000007cd89b23

The Pi foundation has a list of the revision codes.

An issue on Ev3dev, “an operating system that runs on the LEGO MINDSTORMS EV3 and other platforms with compatible motor/sensor hardware.”: Relying on /proc/cpuinfo and /proc/device-tree/model is not good enough.

Sunday, November 18

don't blow up the spot

A couple days ago I read this essay about reviewing a local burger joint on the internet and killing it as a result, by Kevin Alexander:

Five months later, in a story in The Oregonian, restaurant critic Michael Russell detailed how Stanich’s had been forced to shut down. In the article, Steve Stanich called my burger award a curse, “the worst thing that’s ever happened to us.” He told a story about the country music singer Tim McGraw showing up one day, and not being able to serve him because there was a five hour wait for a burger. On January 2, 2018, Stanich shut down the restaurant for what he called a “two week deep cleaning.” Ten months later, Stanich’s is still closed. Now when I look at the Stanich’s mug in my office, I no longer feel light and happy. I feel like I’ve done a bad thing.

For the past year, the story of Stanich’s has haunted me. For most of that time, I’d been away from Thrillist, as I worked on a book that frequently took me to Portland. Each time I was there, my story would somehow find a way into conversation, like the one with my Lyft driver who asked if I liked burgers. Yes, I said tentatively. “Well, we had a great one here,” he said, as we drove over the Burnside Bridge. “But then some asshole from California ruined it.” Or the time, while sitting at the bar at Clyde Common, the bartender came up to me and in a soft, friendly voice inquired if I’d planned on closing any more burger restaurants while I was in town.

I found it by way of a MetaFilter thread, and then I read this comment over there by Frowner:

Lo these many years ago, a wise person told me, when I was enthusing about something, “the first rule is ‘don’t blow up the spot’”.

And shit, that sure did resonate.

Then there’s this from

In a weird way, you can put “became the #1 rated restaurant, had to close because of vast hordes of foodies” on the same list as:

  • becoming a meme and getting random marriage proposals from strangers
  • getting doxxed/SWATed/brigaded/etc
  • your kickstarter campaign goes viral and now you have 10x the funds you expected, so you have to build something even grander

The internet is like a gravity distortion beam that momentarily focuses everyoneʼs attention on one thing.

Uh huh. It’s 2018 and I’m working on this ever-expanding and frankly sort of absurd, hopeless list of restrictions about information sharing.

  • Don’t put people’s faces on the internet.
  • Don’t put location data on the internet.
  • Don’t exist on social media.
  • Don’t have enough of an observable public personality to attract any form of judgment or attention.
  • Don’t make your town or neighborhood look cool on the internet.
  • Absolutely do not put hiking trails, campsites, parks, etc., on the internet. In fact, don’t tell anyone outside of friends who know better than to spread the word about those things either.
  • Don’t make visible art or have visible opinions or affiliations.
  • Don’t have an audience, don’t perpetuate an audience, don’t boost signals in any way likely to distort or refocus the lens of network attention.
  • Don’t do anything to improve the network’s model of you.

I break these rules - some of them pretty frequently (for example by still having this blog), but it’s sure the direction I’m trending. Don’t blow up the spot, sure, but more generally don’t risk the attention of the hive mind at all, for yourself or anyone else or any place or thing you care about.

This tendency probably can’t really be made consistent with other views I hold, but it sure is a Mood.

Sunday, November 11

initial notes on the intel nuc (NUC6i7KYK)

Previously: initial notes on the dell xps 13 developer edition (9360).

Rationale: I’ve been using laptops as my primary working machines since I quit my last in-office job in November of 2014, and wanting to go back to a robust desktop setup for almost as long. Laptop ergonomics are a disaster, and while low-level pain from typing too much has been part of my life since I was a teenager, it’s been quite a bit worse lately. I finally decided to do something about this last weekend.

My ideal here would be to take an old case I’ve had since the first time I did a custom PC build in 2001 and jam it full of stuff. I may still do that eventually, but this time around I spent a couple of evenings looking at workstation build lists and manufacturers before throwing up my hands and ordering an Intel NUC, the one with the stupid gamer-aesthetic-looking skull graphic on top of it, at around 3 in the morning while drunk and high.

I’m still mad at Intel for a wide range of pretty mind-boggling security fuckups over the last couple of years (or decades) and I really don’t like giving them money, but here we are.

What I bought:

  • Intel NUC Skull Canyon NUC6i7KYK Kit - Newegg, $528.00
  • Crucial 32GB Kit (16GBx2) DDR4 2133 MT/s (PC4-17000) DR x8 SODIMM 260-Pin Memory, CT2K16G4SFD8213 - Amazon, $289.00
  • Samsung 860 EVO 1TB M.2 SATA Internal SSD (MZ-N6E1T0BW) - Amazon, $162.99
  • The 250 gig version of the above, from Best Buy, after I realized that the 1 TB one wasn’t going to get here in time to do setup this weekend.

(Here’s a pro forma apology for giving Amazon money. The NUC was cheaper on Newegg, and I’d intended to get storage and RAM from them as well, but they were wildly more expensive there and, having reached the point of making an actual decision about what to buy, I knew that further hesitation might derail me for months, so I just pulled the trigger.)

The NUC is a “kit” in the sense that you have to open the case and plug in memory and storage. For those not familiar with these things, they pretty much read as laptop hardware in a little box, sans keyboard and display. They’re basically single-board computers with “real” specs. This one has 4 USB ports, a USB C port, and one each of HDMI and DisplayPort, SD card slot, and headphone/speaker jack. There’s also builtin ethernet and wifi, an optical port of some kind, and what I assume is an IR sensor. It’s not the plethora of legacy ports I really want, but neither is it nearly as lame as the typical modern laptop profile. I think it might be possible to break out some additional interfaces - there’re some connectors on the board under the lid.

Setup: This thing is rumored to run Debian pretty much ok, as long as you update to the latest BIOS first.

So far I’ve:

  • Installed the latest BIOS from Intel by downloading the “Recovery BIOS update” to a USB drive and pressing F7 at start. You then get a menu that lets you select the update to install.
  • Installed Debian Stretch 9.6.0 from the netinst copied to a different USB drive. (I used pv debian-9.6.0-amd64-netinst.iso | sudo dd of=/dev/sda to image the drive.)
  • Copied firmware-iwlwifi_20161130-4_all.deb onto the drive from step one and inserted it when prompted during the Debian install. I’ve had all sorts of trouble with installing proprietary drivers this way in the past, but this time it was fairly painless. I am, as usual, irritated that proprietary drivers are a thing. The computer hardware industry sucks.

Next I’ll spend some time figuring out how to share the vast majority of my home directory between this box and the laptop I still use when I leave the house, while keeping separate configuration for stuff that touches screen resolution and so forth. I’m planning to use relatively low-resolution monitors so that I don’t have to fight with how many of my tools are still terrible at high-DPI environments and how bad my eyes are at reading tiny, tiny fonts.

thursday, november 8

  1. there are experiences that bring you
    to an unusually direct and unvarnished consideration
    of your actual stature in life;
    between one thing and another
    my 37th year has been thick with them

    i was thinking: what exactly do i amount to,
    here in middle adulthood, after some years
    of whatever this has been?

    of the ideas of the self i've tried on
    and then hung up to fade on the walls of my mind
    few seem to have much bearing now
    i'm sure not a historian, poet, or teacher
    hell, i'm not even all that well-read

    on the facts, what i am
    is a declining bottom-rung technocrat, a little too
    self-taught and far too scattered to have attained much,
    past a surface fluency with the technical arrangements
    of a recently-dead past

  2. i drew pictures for a little while,
    but i didn't have the discipline to make anything of it
    i used to take photos, but now that just feels
    like pissing into the ocean
    i never did learn the guitar
    even my cooking is frankly bad most of the time

    it's strange to see all the ways you thought you knew
    how to write something on the world
    as hollow, as dull and rusted tools,
    as tricks of the light

  3. of course you can't write anything on the world
    not really, not for longer than a beat and
    on the scale of an ordinary life
    it's all so much dragging a stick through the sand
    in between the waves

    the world writes itself on you, mostly
    if some greater power comes within your grasp
    it's like as not you'll do monstrous things,
    at least judging by the powerful

    for inconsequence
    maybe i ought to be thankful.

Sunday, October 28

It’s fall. I filled out a ballot today, which is basically the furthest extent of my political participation in recent memory, a few angry letters aside. I feel paralyzed.

In the world, things seem bad and getting worse. The last few days have featured a mass murder at a synagogue, pipebombs in the mail, that fucker winning in Brazil. It’s like this all over. The internet is a stew of fear and loathing, impossible to assimilate or process, this howling gale of bad feelings about everything and everyone blowing out of pretty much every screen on the planet. I get up in the morning to work my computer job and if I’m unlucky I click the wrong thing and I don’t recover from how fucked-up it makes me feel until the next day or the next week. We made everybody halfway to telepathic and it turns out to be like in that Spider Robinson story where the guy can read minds and it’s a traumatic nightmare to know what other people are thinking. Like that but with feedback loops all over the place.

I’m doing it right now. It’s a bad look.


XZ Utils

Here’s How Facebook’s Local News Algorithm Change Led To The Worst Riots Paris Has Seen In 50 Years

John Dingell: How to Fix Government - The Atlantic — "Abolish the Senate and publicly fund elections."

Can you just search ‘Yoga’ on the computer and *white noise*

How to abandon a FLOSS project

The Superior Works - Patrick's Blood & Gore: Plane #45

Exploiting developer infrastructure is insanely easy

ev3dev/ev3dev: ev3dev meta - bug tracking, wiki and releases

Relying on /proc/cpuinfo and /proc/device-tree/model is not good enough · Issue #523 · ev3dev/ev3dev

What I Found Most Interesting from Amazon re:invent 2018

Raspberry Pi revision codes - Raspberry Pi Documentation

Is there any way to enable pull-up or pull-down resistor? · Issue #31 · brgl/libgpiod — Dammit.

Google Tried to Patent My Work After a Job Interview — Patent Pandas

Writing Science Fiction Out of Experience: SF, Social Science and Planetary Transformations – NatureCulture

Kiwi Hellenist: Reading silently and reading out loud in antiquity

Intro | What football will look like in the future

Stop treating Mastodon like a startup

The Art of Stimming — Applied behavioral analysis has left a legacy of traumatized kids. Why is it still the standard of treatment?

The Insect Apocalypse Is Here - The New York Times — "The world never feels fallen, because we grow accustomed to the fall."

Why did Apple remove the iPhone headphone jack? — «In an industry where a CEO can’t order a quinoa bowl without checking how Apple did it first, the 3.5 mm jack disappeared from mid-tier and high-end smartphones almost overnight. Google ditched it. HTC ditched it. Motorola ditched it. Huawei ditched it. Xiaomi ditched it. Sony ditched it. Nokia (they’re still kinda around, yeah!) ditched it. To this day, LG and Samsung are the only two sizable companies to stand their ground and keep the technology around–but rumor has it even Samsung will abandon the 3.5 mm jack in the upcoming Galaxy Note 10, too.»

Hometown Proud