Sudden Genocide

If genocide is sudden, painless, unexpected, complete and absolute, if a people simply vanish without screams, without fear, without anticipation, if one nanosecond they are and the next nanosecond they are not, and if somehow you are responsible, are you a war criminal or a savior? Ultimately we all vanish, usually with screams, usually with fear, usually with anticipation. For years I’ve longed for a sudden painless death: a dismembering that tears me apart faster than my nerves can relay pain. Imagine such an end for all of us – at once – now. Why linger? We will go extinct. There will be a last human. And if the last human dies with screams, with fear, with anticipation how is that better than sudden genocide?

Who Thought Blinking Windfarms was a Good Idea?

One night, a few weeks ago, I was driving west on I86 near American Falls when I spotted a long string of blinking red lights. The lights stretched over a large arc of the horizon. My first thought was “Jesus H. Christ now what?” As an amateur astronomer, I have climbed mountains to get away from light pollution. Now some jackwagon was ruining an entire rural horizon with a goddamn string of synchronized windfarm lights.

May I ask why?

Windfarms blink at night to warn planes they’re flying to low. Please! The towers are well under 100 meters. If you are flying a plane below 100 meters in mountainous locales like Idaho you have far more serious problems than running into wind turbines. This is another example of stupid regulation. There is absolutely no good reason for lighting up entire landscapes. It wrecks the view, distracts drivers, (cars on I86 were slowing down to get a better view), wastes energy, rapes the night sky, and reminds everyone what an environmental tax-subsidized eyesore windfarms are. Don’t even think of disagreeing. When was the last time you looked at a landscape littered with wind turbines and thought, “This is so much better than it was before.”

Yes, I know windfarms are saving us from global warming. If you believe that you are probably exactly the type of person that signed off on ruining an entire county’s nighttime view with goddamn blinking windfarms.

Trey and Kate: Review

This will be a completely biased review. I have a close relationship with the author so everything I say must be verified. Please buy Trey and Kate, read it, and make up your mind. With that caveat out of the way let’s get started.

Trey and Kate is a tale about an on and off again Millennial romance that plays out in Kingston Ontario. The two leads are not exactly star crossed lovers. They’re both partly broken and struggling with mental illness, past life hallucinations, deficient friends, and uncomprehending divorced families. Kate is bipolar and goes on and off her meds throughout. Trey is stuck in a dead-end barista job: remember Millennials. He’s mourning a deceased unloving father and has only two reliable relationships: his cat and his mother. Trey and Kate’s dreams hint at a shared past and promise a joint future but offer little practical guidance.

With destiny seemingly on their side, you would expect their romance to go smoothly; it does not. When Kate goes off her meds she’s impulsive and prone to risky behavior. The book’s best passages detail her sordid bouts of random sex with total strangers. It’s almost prostitution but Kate doesn’t have the business sense of a prostitute. Of course, this doesn’t help her relationship with Trey. To his credit or shame, he forgives her but we’re not sure if his forgiveness is self-pity. Trey’s self-esteem is so low he finds it almost comical than any woman could love him. Welcome to the club Trey. Trey and Kate’s interaction is both frustrating, satisfying, embarrassing, irritating and fulfilling.

Trey and Kate is the author’s first book. I know the author struggled to put the book together. Its best parts are purely descriptive and when the author shows us what the characters are seeing and feeling the prose tells. When the text ventures into rhetorical semi-poetic asides it hollows out. Trey and Kate feels like a screenplay disguised as a novel. This is partly due to the almost cinematic presence of the setting Kingston Ontario, a dull stone-filled town that would be unlivable without Lake Ontario, and Kingston’s wretched weather which is every bit as bad as it’s portrayed in Trey and Kate. I’d encourage the author to keep writing, rewriting and experimenting. There are good stories to tell here.

The Return of the Prodigal Blogger

It’s been ages since my last blog post. Yes, I’ve been a very, very bad blogger. Lesser men would throw themselves on the metaphorical feet of their readers and beg for forgiveness but if you’re expecting apologies you don’t know me! I write for myself; if you choose to read my ramblings, well that’s on you.

Since my last entry I have:

  1. Retired. I finally pulled the plug on being a so-called productive member of society. Now I’m an old Social Security draining parasite. Since I no longer pay net taxes I am effectively dead to the state and they would love it if I was actually dead. Dead people are easier to finance. Unfortunately, I’ve always been on to the deep state and my new mission in life is to claw back every single tax dollar I ever paid with butt loads of interest. When I snuff off this mortal coil I am going stick you with a giant uncollectable I OWE FUCKING YOU! If you create financially unsustainable systems that encourage abuse, well guess what, you’re going to get abused. God, I’m loving being a bitter old man; it’s what I was born to be.
  2. Continued to pursue my hobbies, especially photography. This year (2019) I set the mini-goals of shooting, on average, one picture per day and scanning at least three hundred prints and slides. This may not sound like a lot but it takes me time to select the best images, process RAW files, restore film scans, edit or hack pictures, write captions and compute keywords.  I treat every uploaded image as a milliblogging opportunity.  Some of my image captions are longer than some of my blog posts.
  3. Taken on some new family responsibilities and obligations.
  4. Taken some trips.
  5. Worked on various personal software projects.

Arthur C. Clarke once remarked that only unimaginative people get bored. I’ve always had something on my mind and I’ve always lived in my head. This has always been my problem and my strength. With retirement, I am casting off my shriveled shackles of pretense. I’m not even going to pretend to care about other people’s problems. I will think about what I find fascinating and do what I find worthwhile.

Call it retirement privilege snowflakes!

Now get back to work and pay your taxes you have old parasites to support.

iNap #1: Enough People are Scum

Intelligible systems are built on a few basic principles.1 While reducing my dour skepticism to the memorable maxims that codify Informed Naked Ape Protocol I repeatedly asked myself what animates unflagging skepticism? What turns naturally cheerful and optimistic people like myself into raging cynics? What motivates noble trolls to put down the pizza and grab the keyboard? Only one answer sprang to mind: other people.

Regardless of your politics, gender, education, race, age, nationality, or ethnicity, you have probably noticed there are a lot of scummy people out there.

Why is this?

The answer derives from our evolution. Evolutionary advantages often accrue to individuals that cheat. Cheating is a fundamental behavioral adaptation that has been observed in many animal, bird and plant species. Cheating is so common that cheating the system is the system! How cheaters might benefit was best illustrated in the hilarious Ricky Gervais movie The Invention of Lying. In Ricky’s world, everybody told the truth until one day he discovered that you could lie. The best scene in the film has Ricky running into a beautiful woman on the street. He tells her that the world is doomed unless she immediately agrees to have sex with him. Given the dire circumstances, she instantly agrees to save the world. Clearly, liars are going to enjoy immense reproductive success in a world of truth tellers. Similarly, scumbags will profit in a world of purely honorable people.

We don’t live in a world of purely honorable people or purely scummy people. Human scum density is complicated; it depends on more variables than the weather. Nevertheless, we can infer that human scum density is seldom zero and is often appreciable.

How big is appreciable?

My bitter sampling of humanity yields an estimate of approximately 0.05 for contemporary American society.2 It’s definitely bad news that 5% of the people around you cannot be trusted or depended on. It’s even worse news that human scum, like pond scum, often floats to the upper echelons of society. This is a nasty reality and I wish it wasn’t so but reality is often unpleasant and leaves few options: either adapt or be crushed.

The first step in adapting to scummy naked apes is acknowledging the most fundamental fact about them — enough people are scum!

  1. The human preference for systems with a few axioms is an artifact of our primitive intellects. There are few if any human beings that would be comfortable with axiomatic theories that depend on trillions of independent axioms yet we know that such systems exist and remain incomplete. Our drive to reduce things to a manageable set of rules, even when we know it is naïve and futile, amounts to little more than thumb-sucking. It makes our baby brains happy even if it will not solve our problems.
  2. Yes, human scum density varies with culture. Some societies are briefly more virtuous than others.

Informed Naked Ape Protocol

Many think we are living in a golden age of bullshit. That public discourse has never been gaudier or more demeaning. That respect for truth and decency has reached all-time lows. The mental pygmies that hold these opinions don’t read or think for themselves. Deceiving ourselves and others is the one thing our species excels at. Lies are the bedrock of art, economics, politics, and religion. Only two tiny slivers of human thought have ever breached the bullshit barrier and approached something that might be credibly labeled truth: hard science, and harder mathematics.

If you think I am going to praise brave men, (and bitches), of science for lighting a candle in the perpetual darkness, (Carl Sagan already wrote an entire fawning book on this self-aggrandizing theme), think again. Scientists are just as flawed and full of crap as the rest of us. Science occasionally succeeds because it has evolved protocols that correct for human bullshit. A good protocol protects us against our worst enemy – ourselves.

My Informed Naked Ape Protocol, or iNap for short, consists of eleven1 pithy maxims that force a hard ass skeptical view of things. I will manifest my maxims here and elaborate on each one in following posts.

Informed Naked Ape Protocol

  1. Enough people are scum.
  2. Trust is for imbeciles.
  3. “Belief” is a bullshit word.
  4. Assume corruption.
  5. Analyze the data, not the drivel.
  6. Demand full analytic disclosure.
  7. Practice relentless verification.
  8. Centralized systems are always corrupted.
  9. If you don’t control it you cannot trust it.
  10. Only scientific and mathematical arguments are admissible.
  11. Correct errors.

  1. Why eleven? The last time somebody tried to get the inhabitants of planet moron to follow ten simple rules it didn’t work out.

NumPy another Iverson Ghost

During my recent SmugMug API and Python adventures I was haunted by an Iverson ghost: NumPy

An Iverson ghost is an embedding of APL like array programming features in nonAPL languages and tools.

You would be surprised at how often Iverson ghosts appear. Whenever programmers are challenged with processing large numeric arrays they rediscover bits of APL. Often they’re unaware of the rich heritage of array processing languages but in NumPy's case, they indirectly acknowledged the debt. In Numerical Python the authors wrote:

“The languages which were used to guide the development of NumPy include the infamous APL family of languages, Basis, MATLAB, FORTRAN, S and S+, and others.”

I consider “infamous” an upgrade from “a mistake carried through to perfection.”

Not only do developers frequently conjure up Iverson ghosts. They also invariably turn into little apostles of array programming that won’t shut up about how cutting down on all those goddamn loops clarifies and simplifies algorithms. How learning to think about operating on entire arrays, versus one dinky number at a time, frees the mind. Why it’s almost as if array programming is a tool of thought.

Where have I heard this before?

Ahh, I’ve got it, when I first encountered APL almost fifty years ago.

Yes, I am an old programmer, a fossil, a living relic. My brain is a putrid pool of punky programming languages. Python is just the latest in a longish line of languages. Some people collect stamps. I collect programming languages. And, just like stamp collectors have favorite stamps, I find some programming languages more attractive than others. For example, I recognize the undeniable utility of C/C++, for many tasks they are the only serious options, yet as useful and pervasive as C/C++ are they have never tickled my fancy. The notation is ugly! Yeah, I said it; suck on it C people. Similarly, the world’s most commonly used programming language JavaScript is equally ugly. Again, JavaScript is so damn useful that programmers put up with its many warts. Some have even made a few bucks writing books about its meager good parts.

I have similar inflammatory opinions about other widely used languages. The one that is making me miserable now is SQL, particularly Microsoft’s variant T-SQL. On purely aesthetic grounds I find well-formed SQL queries less appalling than your average C pointer fest. Core SQL is fairly elegant but the macro programming features that have grown up around it are depraved. I feel dirty when forced to use them which is just about every other day.

At the end of my programming day, I want to look on something that is beautiful. I don’t particularly care about how useful a chunk of code is or how much money it might make, or what silly little business problem it solves. If the damn code is ugly I don’t want to see it.

People keep rediscovering array programming, best described in Ken Iverson’s 1962 book A Programming Language, for two basic reasons:

  1. It’s an efficient way to handle an important class of problems.
  2. It’s a step away from the ugly and back towards the beautiful.

Both of these reasons manifest in NumPy‘s resounding success in the Python world.

As usual, efficiency led the way. The authors of Numerical Python note:

Why are these extensions needed? The core reason is a very prosaic one, and that is that manipulating a set of a million numbers in Python with the standard data structures such as lists, tuples or classes is much too slow and uses too much space.

Faced with a “does not compute” situation you can either try something else or fix what you have. The Python people fixed Python with NumPy. Pythonistas reluctantly embraced NumPy but quickly went apostolic! Now books like Elegant SciPy and the entire SciPy toolset that been built on NumPy take it for granted.

Is there anything in NumPy for programmers that have been drinking the array processing Kool-Aid for decades? The answer is yes! J programmers, in particular, are in for a treat with the new Python3 addon that’s been released with the latest J 8.07 beta. This addon directly supports NumPy arrays making it easy to swap data in and out of the J/Python environments. It’s one of those best of both worlds things.

The following NumPy examples are from the NumPy quick start tutorial. For each NumPy statement, I have provided a J equivalent. J is a descendant of APL. It was largely designed by the same man: Ken Iverson. A scumbag lawyer or greedy patent troll might consider suing NumPy‘s creators after looking at these examples. APL’s influence is obvious. Fortunately, Ken Iverson was more interested in promoting good ideas that profiting from them. I suspect he would be flattered that APL has mutated and colonized strange new worlds and I think even zealous Pythonistas will agree that Python is a delightfully strange world.

Some Numpy and J examples

Selected Examples from Output has been suppressed here. For a more detailed look at these examples browse the Jupyter notebook:  NumPy and J Make Sweet Array Love.

Creating simple arrays

 # numpy
 a = np.arange(15).reshape(3, 5)
 NB. J
 a =. 3 5 $ i. 15

 # numpy
 a = np.array([2,3,4])
 NB. J
 a =. 2 3 4
 # numpy
 b = np.array([(1.5,2,3), (4,5,6)])
 NB. J
 b =. 1.5 2 3 ,: 4 5 6

 # numpy
 c = np.array( [ [1,2], [3,4] ], dtype=complex )
 NB. J
 j. 1 2 ,: 3 4
 # numpy
 np.zeros( (3,4) )
 NB. J
 3 4 $ 0
 # numpy - allocates array with whatever is in memory
 np.empty( (2,3) )
 NB. J - uses fill - safer but slower than numpy's trust memory method
 2 3 $ 0.0001 

Basic operations

 # numpy
 a = np.array( [20,30,40,50] )
 b = np.arange( 4 )
 c = a - b
 NB. J
 a =. 20 30 40 50
 b =. i. 4
 c =. a - b
 # numpy - uses previously defined (b)
 b ** 2
 NB. J
 b ^ 2

 # numpy - uses previously defined (a)
 10 * np.sin(a)
 NB. J
 10 * 1 o. a
 # numpy - booleans are True and False
 a < 35
 NB. J - booleans are 1 and 0
 a < 35

Array processing

 # numpy
 a = np.array( [[1,1], [0,1]] )
 b = np.array( [[2,0], [3,4]] )
 # elementwise product
 a * b

 NB. J
 a =. 1 1 ,: 0 1
 b =. 2 0 ,: 3 4
 a * b

 # numpy - matrix product, b)

 NB. J - matrix product
 a +/ . * b  
 # numpy - uniform pseudo random
 a = np.random.random( (2,3) )
 NB. J - uniform pseudo random
 a =. ? 2 3 $ 0
 # numpy - sum all array elements - implicit ravel
 NB. J - sum all array elements - explicit ravel
 +/ , a
 # numpy
 b = np.arange(12).reshape(3,4)
 # sum of each column
 # min of each row
 # cumulative sum along each row
 # transpose

 NB. J 
 b =. 3 4 $ i. 12
 NB. sum of each column
 +/ b
 NB. min of each row
 <./"1 b
 NB. cumulative sum along each row
 +/\"0 1 b
 NB. transpose
 |: b

Indexing and slicing

 # numpy 
 a = np.arange(10) ** 3 
 a[ : :-1]   # reversal

 NB. J
 a =. (i. 10) ^ 3
 2 { a
 (2 + i. 3) { a
 |. a