Friday, August 25, 2017

Two-word parser, 1966 AD

It's common to note that the Apollo 11 guidance computer had just 4K of RAM, less than (a microwave | a toaster | your car keys) whatever the current IoT gizmo of the day is. The complete source code was posted to Github in 2016, to the delight of space geeks everywhere.
(I see that the repo maintainer has been accepting patches all this time, which will be handy when... when... I'm not sure how to finish that sentence. But you see a typo, you fix a typo. I get it.)
I remember the articles popping up a year ago. What I don't remember is this control panel, which I saw last weekend during our Air and Space layover:

Image from NASA via Wikipedia
I'm pointing at the labels on the left: VERB and NOUN. What?
A bit of digging turned up this explanation in a Discover article:
Every time the astronauts entered information to activate a program, they interrupted the software program that was running with any of the 100 verb-noun pairs. For example, Verb 37 (verb 3-7-enter) signaled to the computer that there was a pending change of command. Then hitting 3-1-enter would run program 31, the rendezvous targeting program. The crew could request maneuver angles (verb 50, noun 18), monitor the changes while a maneuver was in progress (verb 06, noun 18), or request the velocity change required for the next maneuver (verb 06, noun 84), among other functions, all of which would then display the information numerically on the DSKY.
There were also different kinds of verbs, extended and regular. Extended verbs (49 through 99) didn’t need a noun to execute a program; they told the computer to perform a simple operation. Regular verbs (00 – 37) were used to display, monitor, or update data, meaning they needed a noun.
Can I connect this to the use of verbs and nouns in interactive fiction? No, okay, not directly. But the notion of a verb-and-noun control system has proven durable: CLI shell commands and GUI icon-menu systems are both well-entrenched examples. It seems to be a comfortable model; easy to grasp, lots of power, not too much to memorize.
Two axes seems to be the sweet spot. A one-axis control system is just a row of buttons -- fine for an elevator, no good for anything more complex. Three-axis systems must exist, but I expect they're in highly specialized tools.
(Note that I'm not talking about physical degrees of freedom. Any two-stick shooter uses four control axes, mathematically speaking. That's not weird. I'm talking about systems where you select one of N interestingly different choices, and then apply that to one of M interestingly different choices on the other side: two logical axes.)
Anyway, I have nowhere in particular to go with this. I just thought it was a neat tangent.
You can play with a simulator of the Apollo computer system, but I haven't tried it.

2 comments:

  1. I'd think a three-axis system is just transitive verbs - PUT THIS ON THAT - or functions with two parameters - MULTIPLY THIS BY THAT. Not readily done with menus and icons, I guess, but fairly common in CLI commands and IF parsers. Adverbs count too: CLI flags are on the third axis. VERBOSELY. RECURSIVELY.

    Meanwhile, I've long been impressed with the elegance of the Apollo VERB/NOUN interface. As a trivial example, there's a verb for DISPLAY, so you can say DISPLAY TIME. DISPLAY SPEED. DISPLAY ATTITUDE. Each is just 7 keystrokes, and you'd readily learn the numeric verb and noun codes you use most. I'm actually surprised that this idea of selecting a command, then applying it to a target, has never really caught on much elsewhere in computing: You see plenty of verb-noun constructs in CLIs (which haven't changed much since the Apollo era!); but in more recent mouse-based UIs we tend to select the noun(s) first, then apply the verb. Touch gestures use various metaphors, but often involve selecting the noun first, or sliding things around.

    On the Apollo DSKY it was very much DO THIS, TO THIS. VERB 16 NOUN 35 ENTER. It's a really nice approach: powerful, clear, efficient. The astronauts found it extremely usable, in an era when it was essentially THE ONLY real-time computer-user interface in existence. (Maybe not quite? But most computer interfaces were programmer-facing, not user-facing, in those days. The astronauts were very much end users of the onboard computers, and the DSKY's live I/O panel was essentially a new thing in the world.)

    I do think a comparison to IF parsers is totally appropriate, because this "giving orders" kind of computer interaction is actually kind of rare elsewhere. "DISPLAY ORBIT. GET LAMP." Who else talks to their computers like that, besides astronauts and adventurers?

    ReplyDelete
  2. Yes, command-line options like "--verbose" are sort of a third axis, but they're not all that independent. They tend to be sub-options of the verb -- which I guess is why they're adverb-like.

    Only a few, like --verbose and --force, are universal enough to feel like a true third axis.

    There are problem domains (CAD design, IDEs) so complicated that the two-axis metaphor breaks down. I don't know if there's a clear model in play to replace it, though. I'm no CAD expert, but Xcode and Unity (IDEs) both feel like kitchen sinks. If I know a feature exists but I can't remember where, I have to search in a dozen unrelated and semi-modal places to find it.

    But I absolutely agree that the DSKY was an amazing conceptual invention of its era. I can only imagine how delighted those engineers were in the 1960s when they came up with it.

    ReplyDelete