Book: Walkway

- 16 mins read

Introduction

Finished Cory Doctorow’s 2017 Walkaway: A Novel today. I probably still need to get my review up of Mussolini’s biography, but I kinda just want some escapism, so I read this.

The author

Doctorow isn’t a new author for me–I’ve enjoyed his Makers and really enjoyed his short story “When Sysadmins Ruled the Earth”, as well as his 28c3 talk on “The coming war on general computation. He’s something like 50 now (Wikiedpia has his birth year as 1971), and has been most prolific in the last two decades. Lots of awards, editor at Boing-Boing and frequent contributor, and generally well-regarded author.

While I was fiddling around with my weird hack project (more on that someday), I had an idea for how to use maps in Elixir.

I hadn’t noticed, but you can use more than just strings and atoms as keys…and so, I give you a quick and dirty grid implementation.

defmodule SvgWorld.Simulation.Grid do
  require Record
  Record.defrecord(:grid, map: %{})

  def init(), do: grid(map: %{})

  def insert_into_grid(grid(map: map) = g, x, y, value) do
    new_map = Map.put(map, {x,y}, value)
    grid(g, map: new_map)
  end

  def get_from_grid(grid(map: map), x, y) do
    Map.get(map, {x,y}, :not_found)
  end

  def values_in_grid(grid(map: map), start_x, start_y, end_x, end_y) do
    Map.keys(map)
    |> Enum.filter( fn {x,y} -> x >= start_x and x < end_x and y >= start_y and y < end_y end)
    |> Enum.reduce( %{}, fn(key, acc) -> Map.put( acc, key, Map.get(map, key) ) end)
  end

  @spec values_near_point_in_grid({:grid, map}, any, any, any) :: any
  def values_near_point_in_grid( grid(map: map), x, y, radius) do
    Map.keys(map)
    |> Enum.filter( fn {gx,gy} ->
      dx = gx - x
      dy = gy - y
      (radius * radius) >= ((dx*dx) + (dy*dy))
    end)
    |> Enum.reduce( %{}, fn(key, acc) -> Map.put( acc, key, Map.get(map, key) ) end)
  end
end

You can’t do reverse lookups, but that’s an easy enough addition you can make to this.

1 Weird CSS Trick

- 3 mins read

Introduction

Before we get into anything else, please behold this gross hack:

<html>
  <head></head>
  <style>
    @keyframes spin {
      from { transform: rotate(0deg); }
      to { transform: rotate(360deg); }
    }

    .spinny {
      width: 100px;
      height: 100px;
      animation-name: spin;
      animation-duration: var(--theta);
      animation-iteration-count: infinite;
      animation-timing-function: linear;
    }
  </style>
  <body>
    <h1>Animation demo</h1>
    <div style="" class="spinny">:(</div>
    <div style="--theta: 4000ms" class="spinny">:)</div>
    <div style="--theta: 2000ms" class="spinny">:D</div>
    <div style="--theta: 500ms" class="spinny">XD</div>
  </body>
</html>

Please load this into a file and view it on your local machine.

Sailing the glass sea

- 13 mins read

(Disclaimer: I am not now nor have I ever been a sailor. I hope my meaning survives my nautical ignorance–if not, please email me and I’ll see what I can do. I’ve probably also made some errors in the ecology as well.)

I.

You wake up in your cabin, stretching up from your berth and groggily gathering your morning routine–the tea, the water, fresh clothes, perhaps a shave. The sun lazily crawls up through the windows and slowly slides down the wall as you rouse yourself.

On Slack and Software Teams

- 13 mins read

Introduction

I’ve worked at several companies that had some remote component for collaboration. Sometimes that meant Slack, sometimes Google Chat, sometimes something else, but the experience has given me some thoughts on what works and what doesn’t work. I’ll focus here on Slack (or similar product) practices.

Some of this stuff is aimed at anybody who uses Slack, some of it is aimed at people who are organizing teams–there is hopefully something here to help everybody.

Where I'd like to work

- 9 mins read

Introduction

A thread on Lobsters got me thinking…what would I want out of an ideal emplyoment situation?

Since I am cheerfully funemployed as of August, I figure I have the time to delve into this a bit. This is all dreaming big; I am under no illusion that any place like this actually exists. It’s naive, but after a decade in industry I think it might be nice to take a break from pragmatism. And yeah, some of these are not the way I live my life currently for one reason or another.

Comfynets and owning data

- 9 mins read

Introduction

I’ve been looking more and more at the ideas behind building comfynets–small self-hosted collections of tools and pages for communities. I’ll probably do a writeup on the sort of stuff I’d like to see in one.

Anyways, one of the bits of fallout from a backchannel I sysadmin involves the custody of data. We’ve got a chat instance setup which supports persistent messaging and so forth, but it’s backed by a database. I am currently the only one who has access to said database and I’m eventually going to be handing the whole mess off to somebody else in the community to deal with since I don’t want the responsibility anymore. Anyways, that’s a second tangent and writeup.

Book: Homage to Catalonia

- 8 mins read

Introduction

Today I finished reading George Orwell’s Homage to Catalonia, which is a first-person recounting of his experiences fighting Fascism during the Spanish civil war. Scattered thoughts follow.

POUM poster

The author

I want to point out that George Orwell was a true mensch–and that his wife was amazingly competent and patient, both for putting up with his adventurism and then saving his ass when the secret police came knocking. In the author’s own words, he set out to Spain to shoot himself a Fascist, and participated in the most direct of action until he was shot in the throat.

Coming attrations 2020

- 1 min read

Little under the weather yesterday and today, so just gonna list some things I’ll try to write about soon:

  • Multisystem deployment with KVM and Nixops
  • NAS Appliance with Nix
  • Fermi estimations and how web development is an embarassment
  • Assorted things standard libraries Should Just Do (tm)
  • Adventures in home smart lighting
  • Thoughts smart city data stores

Catch y’all later.

New Years Gumbo Recipe

- 4 mins read

Every year I do a huge gumbo cookout (8 gallons) with friends for NYE. I figured I’d record the recipe for posterity:

Gumbo ingredients

  • Pack of turkey necks (3 or so)
  • whole bunch of Andouille sausage (pack or two)
  • whole bunch of mild italian sausage (pack or two)
  • a duck (dead, cleaned, boneless if possible)
  • 5-10 lbs chicken boneless chicken breasts
  • a handful of bay leaves
  • bunch of file powder
  • bunch of green onions
  • 12 qt. (plus or minus) of low-sodium chicken broth
  • 3-4 celery bundles (transverse sliced, say 1cm wide)
  • 3-4 green bell peppers
  • whole bunch of garlic, minced and whole
  • Lea and Perrins Worcestershire sauce
  • few yellow onions, diced
  • few big cans of diced skinless tomatoes (Rotel or other)
  • couple cups of butter
  • couple cups of white flour
  • whole bunch of okra, sliced (deseed if you want to thin the gumbo a little, leave seeds in if you want to save a lot of time)
  • salt
  • parsley
  • black pepper
  • beer or beverage or your choice

No shellfish because I don’t want to deal with those allergies at my parties, but otherwise shrimp and crab make for some good eating.