Algorithm for implementing a dead man's switch.

Mar 04 2018

So, you're probably wondering why I'm posting this, because it's a bit off of my usual fare.  The reason is I think it would be useful to make available a fairly simple algorithm for implementing a general purpose dead man's switch in whatever language you want, which is to say a DMS that could conceivably do just about anything if it activated.

But what's a dead man's switch?  Ultimately, it's a mechanism that has to be manually engaged at all times if you want something to happen, and if that switch turns off for some reason, something else happens (like a failsafe).  A good example of this is the bar on the handle of a power lawnmower you have to hold down so it'll move while the engine's running.  If you let go of the bar the engine keeps running but the lawnmower doesn't keep rolling forward.  Another example can be found in locomotives; the conductor has to hold down a switch or lever so the engine will pull the train, and if that lever is ever let go (say the engineer has a heart attack or is otherwise incapacitated) the throttle closes and the train will grind to a halt.  More along the lines of what I'll be talking about are the watchdogs found in industrial controllers and realtime operating systems.  While running normally a software process inside the device flips a bit somehow - say, writing a 0 into a certain device node.  If the underlying hardware ever finds that the bit didn't get flipped within a certain period of time it reacts somehow to fix things (for example, it might reboot in an attempt to un-stick the gizmo).

Click for the rest of the article...

On the toxicity of USian gun culture.

Feb 25 2018

I've been keeping quiet about the mass school shooting in Florida some weeks ago because it's such a hot-button topic, and many people speaking out are catching harrassment and death threats - even the students who survived the massacre.  Of course, the National Rifle Association went on the record as saying, quote, "The NRA doesn't back any ban."  Meaning, of course, they'll do their damndest to hamstring any new legislation that has to do with guns.  It's also worth noting that there were multiple law enforcement officers - trained and armed - at the school, and they did nothing.  Which isn't surprising to me; if they're anything like the police in the school I went to, they went out of their way to not do their jobs (the students selling both drugs and guns I graduated with did so with relative impunity).  Oh, and let's not forget what can happen if you play the part of the hero and disarm the shooter - the cops think the hero's the shooter, and open fire.  No good deed goes unpunished.

But that's not what I want to talk about.  What I want to talk about is gun culture, as someone who's part of it, but who stays as far away from it as possible.

Click for the rest of the article...

Neologism: Platypus truther

Feb 18 2018

Platypus truther - noun - Someone who doggedly, ruthlessly, and almost to the exclusion of anything else (including good sense) espouses, defends, and picks fights over a position, idea, or hypothesis that is completely and totally around the bend.  Even taking into account the context of this person's other activities (social media history, books written, and so forth) it makes absolutely no sense why they would claim to believe such a thing, let alone fight with people over it.  There is absolutely no way of telling if they're communicating in good faith or not.  It could be trolling, it might be absurdist peformance art, it could even be software mediated madness, or some other combination of phenomena.

The term was coined as a description of a Twitter user who is adamant that platypodes do not actually exist.  The individual's claim is that all drawn depictions of the creature are fanciful, all video recordings are special effects, and all live specimens are actually mutilated creatures of other types.  Nobody knows what the hell they're on about, so all we can do is shake our collective head and close the tab.

I guess this is a milestone, isn't it?

Feb 09 2018

As I write this, it's roughly a week before my 40th birthday.  I'm sitting in a hospital waiting room tapping away on Windbringer while Lyssa undergoes surgery to remove a cataract from her left (and only working) eye.*  When this post goes live on the day of my actual 40th birthday, more things will undoubtedly have happened.  I don't know how much time I'm going to have in the next few days, so I guess I'd best take advantage of the spare time I have due to how busy I've been lately.

A lot's happened in this past year that I'm still trying to wrap my head around.  My grandfather diedSomebody I knew but wasn't terribly close to committed suicide.  I've been in the hospital and laid up at home a couple of times with strict "Sit on your ass and read comic books while you heal" orders (which, as you've probably already guessed, got boring pretty fast).  Our landlord has begun the process of selling the house we're presently renting, which has introduced no small amount of uncertainty into the short-term future.

Click for the rest of the article...

Online talk about exocortices.

Jan 28 2018

A couple of days ago I gave a talk online to some members of the Zero State about my exocortex.  It's a pretty informal talk done as a Hangout where I talk about some of the day to day stuff and where the project came from.  I didn't have any notes and it was completely unscripted.

Embedding is disabled for some reason so I can't just put the vide here here.  Here's a direct link to the recording.


Jan 25 2018

Sometime last summer, around the time we renewed our lease, our landlord mentioned that he wanted to sell the house we've been renting in California for the past couple of years.  As one might expect, this caused a bit of a stir at home, but then we didn't hear back from him for a couple of months (no news is good news, right?) and went back to life as normal.  Around Yule we all but forgot about it.

Last weekend, our landlord paid us a visit and informed us that he was starting the house-selling process.  The first round of inspectors would be around to check the house out last week (as you read this post) and could we please straighten the place up a little.  A not unreasonable request, this immediately kicked the family into high gear, cleaning stuff out (at last count, one box of clothes and four of books), throwing stuff away (so much stuff that we had to call a trash hauling company to take it away due to the limitations imposed by the local trash pickup company (only things in the bins they rent to you, nothing overflowing, nothing on the ground or street)), straightening up the backyard (the lawn clippings and raked leaves constituted a nontrivial amount of the stuff hauled away)... you get the drill.  Suffice it to say that the house hasn't looked this good since Yule.

Click for the rest of the article...

Making offline backups of a Linux machine using Backblaze.

Jan 14 2018

As frequent readers may or may not remember, I rebuilt my primary server last year, and in the process set up a fairly hefty RAID-5 array (24 terabytes) to store data.  As one might reasonably expect, backing all of that stuff up is fairly difficult.  I'd need to buy enough external hard drives to fit a copy of everything on there, plus extra space to store incremental backups for some length of time.  Another problem is that both Leandra and the backup drives would be in the same place at the same time, so if anything happened at the house I'd not only not have access to Leandra anymore, but there's an excellent chance that the backups would be wrecked, leaving me doubly screwed.

Here are the requirements I had for making offsite backups:

  • Backups of Leandra had to be offsite, i.e., not in the same state, ideally not on the same coast.
  • Reasonably low cost.  I ran the numbers on a couple of providers and paying a couple of hundred dollars a month to back up one server was just too expensive.
  • Linux friendly.
  • My data gets encrypted with a key only I know before it gets sent to the backup provider.
  • A number of different backup applications had to support the provider, in case one was no longer supported.
  • Easy to restore data from backup.

After a week or two of research and experimentation, as well as pinging various people to get their informed opinions, I decided to go with Backblaze as my offsite backup provider, and Duplicity as my backup software.  Here's how I went about it, as well as a few gotchas I ran into along the way.

Click for the rest of the article...

Quick and dirty copies of website with wget.

Jan 14 2018

Let's say there's a website that you want to make a local mirror of.  This means that you can refer to it offline, and you can make offline backups of it for archival.  Let's further state that you have access to some server someplace with enough disk space to hold the copy, and that you can start a task, disconnect, and let it run to completion some time later, with GNU Screen for example.  Let's further state that you want the local copy of the site to not be broken when you load it in a browser; all the links should work, all the images should load, and so forth.  One of the quickest and easiest ways to do this is with the wget utility.

Click for the rest of the article...