Thursday, May 7, 2009

An Even More Obscure Tech Cult

I was recently developing a simulator for a board game to teach kids about the Futures Market. Since it was a board game, the simulator had to be realizable with dice, tokens, chips, etc. But it also needed to capture enough essential market behaviors to make it "realistic": trends, volatility (and changes in volatility), reversals, Fibonacci retracements, etc.

Whatever the physical mechanics and rules, I needed to be able to make long duration (thousands of turns) "runs" of the simulation and check its trajectory against the desired behaviors (and make sure it didn't always go to zero or infinity). How could I do this without actually playing the game?

What I needed was an interactive mathematical workspace. And an ability to quickly write little routines to "play" in that workspace. (and see if they could crash it)

What I needed was APL (APL Programming Language).

I first learned APL in High School. We had a 33 baud teletype connection to a CDC mainframe that ran APL (in addition to the Basic and FORTRAN that students were being subjected to). This version of APL used three-letter codes for the operators--$RO, $IO, $EP, etc. Despite that limitation, the clunky SpaceWar game I was trying to write in FORTRAN suddenly became trivial.

Later in college (1974) we had real IBM systems that ran APL/SV. I even purchased an APL typeball to use on the campus Seletric terminals. Besides its ability to rapid prototype, the "SV" in APL/SV meant "shared variables"--between users! Which of course pointed to the obvious practical application, real-time multiplayer combat simulation games.

It was only in graduate school that I finally used APL for something other than games. For my Masters thesis I used APL to develop adaptive algorithms (AKA neural nets) to do cryptanalysis (which earned my faculty advisor a visit from the Carter-era NSA when the work was published).

And where is APL now? It turns out to be still alive and well. That is, for an obscure language cult.

I downloaded a free version that uses the standard IBM keymap, dug out my copy of Pakin's APL\360 Reference Manual and quickly got my simulation up and debugged.

So after all these years I'm still using APL to play games.

1 comment:

  1. APL was my first programming language, in 1971, on terminals connected to a mainframe in the Thomas J. Watson Computer Building at Brown, on George St.