Wednesday, May 4

Back in Colorado, the lawn needs mown and the sink is full of dishes. Last Tuesday morning’s old-computer build is still half-assembled on the kitchen floor and the kitchen counters and probably several other places.

There are a bunch of things I should be doing (like the dishes), but I was just dorking around with some pointless shell script instead.

It got me thinking about how it’s too hard to write little shell utilities. Two categories of reason for this:

First, the existing shells are bad as general-purpose programming languages.

  • The simple things you want from a language are either missing or really hard to get.
  • The syntax is hideous and everything is riddled with edge cases which will bite you or your users.
  • Patterns exist to help with some of this, and conscientious authors will be aware of them, but they are inconsistently applied, made of illegible boilerplate, and often a matter of unevenly-distributed folklore.
  • I’ve evidently been harping on this one for a while.

Second, general-purpose language environments are bad at the stuff I want when I write shell utilities.

  • Argument handling is miserable and full of boilerplate.
  • Doing things to files and directories is way harder than it should be.
  • The “correct” abstraction around a given task is often much harder to use than the corresponding shell utility would be.
  • The best available library often introduces a new (and sometimes unstable) dependency.
  • Reusing other parts of the shell environment is often fraught with hazard, or at least silliness.

I don’t want to claim these plaints are universals, exactly.

There are glue-language features in Perl which keep me coming back for little one-offs that wind up in my ~/bin/. I wrote a thing in Python the other day using docopt to handle arguments, and hey, really, not too shabby. Despite its problems, there are encouraging things about some of the patterns I see used in Node.js.

I would, however, still like to see an improved toolset for the conceptual space of “little things you use at the command line”.

I learned the other day that you can do this:

brennen@exuberance 21:45:01 /home/brennen ★ cal -3
                            2016
       April                  May                   June
Su Mo Tu We Th Fr Sa  Su Mo Tu We Th Fr Sa  Su Mo Tu We Th Fr Sa
                1  2   1  2  3  4  5  6  7            1  2  3  4
 3  4  5  6  7  8  9   8  9 10 11 12 13 14   5  6  7  8  9 10 11
10 11 12 13 14 15 16  15 16 17 18 19 20 21  12 13 14 15 16 17 18
17 18 19 20 21 22 23  22 23 24 25 26 27 28  19 20 21 22 23 24 25
24 25 26 27 28 29 30  29 30 31              26 27 28 29 30

…which will show the months before and after the current one.

I don’t know how I made it this long without knowing about that option. There’s a generalized approach, too, with -B n and/or -A n for n months before and after the current month.

monday, may 2

there's a picture on the wall of kurt cobain
playing in this bar in like 1990
a good deal has happened since then
this bar doesn't even look like it did in 2004
or whenever it was i last lived in this town

hell in fact it seems like half this town looks
like a different place, on the level
of storefronts and tall buildings
they keep on building the same shit-tier
architecture, the built-environment equivalent
of flat-pack furniture, that accretes now on
every city in america with any surface
half-exposed to the money

(corrugated steel, beige and rust red, ugly glass,
carpet like the aisles of airplanes, nonfunctional
elements and facades at strange angles, rectangular cutouts
in things, the general heft and quality of a plastic vacuum cleaner
bought for $29.99 at target in 2012)

but then the streets are still wide
and the wind is still the nebraska wind
the music in here is still fuzzy and
thick with a certain kind of noise
in the grain of it, the beer is still cheap enough

and the college kids and the thin layer of
the hip, the downtown bar trade and
disaffected labor, the state government
functionaries—they're the same people,
the small town kids and the townies and
the oddball imports,
even if they aren't the same people exactly
i don't know these faces but i know these
faces pretty well

and do i miss it here?
like hell sometimes, if i'm honest
the row crops out there and the vast stupid
sky overhead, the desolation and the irrigation and
the nearness of all the mistakes that own the
configuration of the plains, the grass, the
fencelines and the cottonwoods and the
way the hills south of here roll through kansas,
ancient and riddled with fossils of forests and
seas unimaginable, the little rivers thick
with silt and the fucked-up reservoir projects
drowning the old farmhouses built themselves
on a legacy of thievery and slaughter,
and then too on broken sod and
endless work in the sun and dreaming freedom
like clean water, like some kind of transfiguration—

linkdump

Morse Code Translator

Church–Turing thesis - Wikipedia, the free encyclopedia

monochrom: TRACEROUTE

Excerpts from How Not to Network a Nation: The Uneasy History of the Soviet Internet | Peters | First Monday — "This peculiar pairing of natural scenery and outsized industrial infrastructure struck me on the riverbank that evening. What force of imagination and statecraft, I puzzled, could have decided to graft such hulking industry onto such a remote city — and why would it do so? Thus began my interest in the outsized infrastructural imagination of Soviet planners."

Linux Man Page Howto

troff/nroff

The Twelve-Factor App

Being A Developer After 40 — Free Code Camp

Shannon number - Wikipedia, the free encyclopedia

An Introduction to the Z Shell - Command/Process Substitution

Man Up | The Players' Tribune

Detecting the use of "curl | bash" server side | Application Security

Writing SQL that works on PostgreSQL, MySQL and SQLite

a prog by any other name

Why you should never, ever, ever use MongoDB - joepie91's Ramblings

Debunking the imagery of the “Irish slaves” meme — Medium

Snowpack is melting fast, despite April storms — High Country News

Nirvana - Duffy's Tavern, Lincoln, NE 05/13/90 (Remastered) - YouTube

Lincoln Nebraska Live Police Scanner Live Stream - YouTube

Quoting and citing with <blockquote>, <q>, <cite>, and the cite attribute | HTML5 Doctor

The Use of URLs as Meta-Syntax for Core Mail List Commands and their Transport through Message Header Fields

Chris.com - ASCII ART

Vivian Gornick on Feminism, Friendship, and Her New Memoir 'The Odd Woman and the City' | VICE | United States

Writing — Anna Wiener — Author of that Uncanny Valley piece.

stilldrinking.org — There's good writing here. Also, I like the side notes and should steal them, although the implementation might be kind of questionable.