February 12, 2018

All Of The Things That You Can Do With Arrays

Here’s the thing about computers:

There are
60
things that you can do with arrays.

Here they are:
These are ALL of the things that you can do with arrays.

This is the language APL. That stands for “A Programming Language.” The complete ungoogleability of that name wasn't a problem at the time; it was proposed forty-odd years before google. These are not the letters of the language: these are its words.

(By the way, an array is, roughly, 'a list of things'; an orderly series. A mathematician would call this a 'vector', or an 'n-dimensional matrix' if the array held many arrays. An array is also, the OED tells me, the name for a group of hedgehogs. APL has its own formal definition.)

How am I so sure that these 60 are all of the things you can do? That these are it?

Because it took the authors of APL two years to decide if trigonometric functions were important enough to have their own symbols in the language.

When it was clear that trigonometry was something that people might, you know, want to ask a computer to do
(we still mostly use these things as fancy calculators, after all)
committees deliberated for more than a year before adopting any particular scheme, before settling on what they called an “arbitrary and slightly distasteful” notation of one single symbol.

(I am glad that discussion happened. I am also extremely glad I was not part of it,
nor was I alive
nor had my parents met.)

What I’m trying to say is, the things you can do with arrays are not idly considered.

For ten years before the first letter of the first C compiler was typed, a very dedicated cohort of computer scientists fought out,
in discussions and letters slow and impassioned and full of wry wit and painfully dry and absolutely, deadly serious in the way only academic discussions can go,
which symbols were actually, really necessary.

At this point it will not surprise you at all to learn that there is some disagreement about which of these symbols are necessary.

Some of them are common-sense. No one in the universe of APL doubts that a programmer would need '⌹', which computes the inverse of a matrix. But how essential is '⍨', the symbol for the grammatical reflexive voice? And I would like to write about '⍣', a sort of fixpoint-finder, in a future About Computers.

(I'm writing to you with some confidence that all of these symbols will appear on your screen; All of APL's characters were included in Unicode, all the way back to the beginning. They are also extremely good for making kaomoji: for instance, ⍣  already looks like they've eaten something very sour)

In any case, there are at most 60 things that you can do with arrays. That's very comforting to me – 60 is a doable number of things, and that's it. I think I could learn 60 things. Programming is huge and overwhelming, but maybe:
I could learn all 60 things you can do with arrays. Maybe you could too.



(Oh there are ten more symbols in Dyalog APL. Sorry. They don't have anything to do with arrays, though.



I’d also like to keep a digest here, when I have seen several neat things on the internet. Here are a few of them:

1. An article about history generation from Max Kreminski. Their research in computer narratives is the kind of work that puts magic in computers, and you can play their game Epitaph here.

2. Along the same lines, Kate Compton speaks about strategies for teaching computers to make stuff. Her language Tracery probably powers every twitter bot that you know.

3. Loraine Kanervisto writes an investigative piece on the difference between BSD and GNU `split` commands. Like all the best computer things, it starts with, essentially, “wait why is it like this?”

4. Here is a section from the MicroAPL documentation. It has some wonderful ascii art of array structures, that, in my browser’s variable-width font, I can’t help but stop reading as diagram and start reading as art
Here are some of my favorites.









Thank you so much for reading. I hope you encounter at least one of these symbols in a kaomoji this week.