Advent of Computing - Episode 160 - What can Lunar Lander tell us about FOCAL?
Episode Date: June 29, 2025Lunar Lander is one of the best loves video games of all time. The game was created in 1969 as an homage to the recent Apollo 11. From there it would only spread. Just about anything that can print te...xt has it's own version of Lunar Lander. The early history of this game is mixed up with something weird: two nearly identical programming languages. Today we will be using the history of Lunar Lander as a good excuse to look at an obscure tongue called FOCAL. This language is so close to BASIC that direct line-by-line translation is possible. But are the two connected?
Transcript
Discussion (0)
It's almost impossible to directly compare two programming languages.
The simple fact is that each language is created for a different reason and used for a slightly
different task.
You wouldn't really compare Lisp to JavaScript.
Those are just different tools for different jobs.
I mean, sure, you can have an interesting conversation and get some insightful points, but you can't
in good faith say that JavaScript is strictly better than Lisp or vice versa.
You can make point-by-point arguments.
You could say, oh, well, Lisp has a better developed syntax or that JavaScript has a
more vibrant and lively ecosystem for developers.
But that's kind of piecemeal stuff. You can't often make broad
sweeping generalizations here, just because these things are too different. The same holds
for most programming languages. That's why I'll often say there's no such thing as the
perfect programming language. I mean, sure, there are some languages that are objectionable
or bad, but even those languages
will have some redeeming qualities.
The bottom line is that languages are so diverse and come from such specific contexts that
you can't easily make one-to-one comparisons between any two.
Even languages that look similar are often developed for very different reasons.
At least, that's usually the case.
The key word here is often.
I've recently come face to face with a stunning counter example.
Two languages that are nearly identical and were developed for nearly identical reasons.
Further, these languages were developed in the same time period and have seemingly no connection to each other.
There are even programs that were written in one of these languages and then later rewritten in the other.
I cannot express to you how wrong this feels, but here we are, it's true.
And better still, one of these languages is basic. Perhaps
the best known programming language of all time. So what is this mysterious twin hiding
in the shadows? How did I stumble on it? And what are these programs that were written
in both basic and the secret tongue? Well, to tell that story, we need to talk about a video game.
Welcome back to Advent of Computing.
I'm your host, Sean Haas, and this is episode 160, what Lunar Lander can tell us about
Focal. Today we'll be discussing one of the best
loved early computer games. Hailing from 1969, Lunar Lander is a fairly simple game. You
pilot a craft as it lands on the moon. All you actually do in terms of piloting is simulate
thruster firing. A tad simple, but very fun. What's far more interesting here, to me at least, is the context and history around the
game.
Lunar Lander became popular once it was included in Dave All's 101 Basic Computer Games.
Many were first exposed to the game as this type-in basic incarnation.
But that's not where Lunar Lander originated. Lander wasn't originally
written in basic at all. It was written in another language called vocal. Not only is
that, well, not basic, it was also a newer tongue than basic. That should strike one
as at least a little funny, right? So what's going on here?
The story of Lunar Lander is actually tangled up with the story of how basics spread and
matured.
Today we'll be using Lunar Lander as a bit of a conduit, if you will.
By looking at this game's early history, we're going to be able to dive into bigger questions
like what makes a good language? How does adoption affect programming?
And why can one language fall out of favor while another one gains popularity?
But first, quick announcement, and it's the same one that I've been running for a few
months.
I'm going to VCF West this year.
That's happening August 1st and 2nd at the Computer History Museum in Mountain View.
I'm going to be giving a talk on my favorite computer of all time and if you listen to the show you already know what that is,
it's the LGP-30. I'm going to be talking some history and showing off my work on my LGP-30 emulator.
These VCF meetups are fantastic events and I look forward to seeing hopefully quite a few of you down at VCF West this year.
With that said, let's get down to business.
On July 20th, 1969 LM-5, better known as Lunar Module Eagle, landed in the Sea of Tranquility
on the Moon.
It was actually a bit of a near-run thing.
As LM-5 approached their planned landing
site, Armstrong got his first good look at the lunar surface and saw a bit of an issue, namely
big ol' rocks. Their landing zone was uneven, strewn with boulders. The lunar module just
couldn't touch down on that surface, so the LEM had to fly onward as
Armstrong searched for more suitable parking spots. Luckily he was able to
find one relatively nearby but that search burned up precious fuel. The craft
was then carefully brought down. It was already capturing the moon's
gravitational pull which would continue to pull down the craft until it crashed. Its descent had to be slown by a thruster. That operation on its own was
tricky. Armstrong used radar sensors to track the LEM's altitude over the surface, while
firing thrusters at just the right times and just the right rates. Slowly, the LEM touched
down. Fuel was low, but there would be just enough to make it back to orbit.
Humans walked on the moon, millions around the world watched in awe, all that jazz.
The Apollo program would inspire generations.
And in one high school in Massachusetts, it would lead directly to a new video game.
Lunar Lander is written by one student named
Jim Storer at Lexington High in late 1969, just a few months after he witnessed Apollo 11 land on
the moon. But how exactly does a high school student even have access to a computer in this
period? 1969 is well before microcomputers hit classrooms. To explain this, we gotta go back to before boots were
on the moon.
Allow me to introduce the Laboratory Program for Computer Assisted Learning, aka Project
Local, a classic forced acronym if ever there was. This is a consortium established in 1967
to bring computers into classroom.
That's been a pretty classic goal since, well, probably about 1960 or so.
Computers have always offered this wild promise for education, but also a huge challenge for
educators.
A computer can provide instant feedback, allow for all kinds of simulations and different
approaches to teaching. At the same time, computers are expensive, hard to use, and just not very
accessible, especially in this period.
Project Local was one of many attempts to crack this nut. The name is a bit of a joke
since Local had a very, well, local target audience.
Specifically, the project was focused on five towns
in the greater Boston metro area.
The plan was for local to furnish hardware
that would be shared in these school systems in those towns.
Once hardware was up and running,
local would train teachers on how to use computers
and how to incorporate these new machines into their curriculum. Really, there's two learning outcomes
here. First, computers should be, in theory, able to supercharge lesson plans. So,
you get curriculums that use computers to teach things like math, physics, or
other sciences. On the other hand, computers are gonna be the future.
1967 is well past the deciding point for that fact.
So there was other curriculum dedicated to teaching students
how to use computers and how to program.
And this wasn't just some distant goal.
This was accomplished.
Project Local would operate for years
in the greater Boston metro area.
So how did they make this happen?
Well, it all comes down to time sharing.
Local started off with five PDP8 mini computers.
Those would be shared between at least 15 different schools in the area.
Each school got a number of teletype terminals with the whole paper hard copy feeds and everything.
And those would be used to connect to these shared PDP8s.
This all worked thanks to the power of time sharing.
IBM had done a similar thing back in 1964 in a few schools in upstate New York.
And way back in 1960, the University of Illinois was doing a very similar thing with their
Play-Doh terminals.
Time-sharing let you share a single computer among many multiple users.
In the era before microcomputers, this was the only cost-effective way to bring computers
into classrooms, and even then, it was still wildly expensive.
Local was a deck shop, which in this period meant they were running a program called Focal.
This is a fully interactive and time-shared environment and programming language.
If you think about BASIC, then you're actually very, very close to the mark.
Students would sit down at the terminals and hammer out code or run pre-loaded programs.
This would spawn a pretty active community around Boston.
Local didn't just teach, it also established computer clubs in these schools and would
distribute software.
Students would supply some of the software.
So via local's PDP-8s, newsletters, and these clubs, programs would spread around the area.
We basically have this semi-formal software distribution network that forms around these
schools.
This very software would, in certain cases, even escape the greater Boston metropolitan
area.
Some software written by local students would be published and distributed by DECUS, the DEC user group. Storer was introduced to
local in 1969 and would really take to programming. When you track down local
newsletters, you can actually find quite a few programs written by Storer himself.
Now, something that I don't see brought up often
is just how young these students were.
I mean, sure, you hear,
oh, high school students programming,
and at least for me, I think, oh, big deal.
Been there, done that.
But I just wanna emphasize this.
In 1969, Storer would have been 15.
That is very young to be programming. And it's amazing that
these kids were introduced to programming in such a structured way so
early. I think that's a great testament to the power of this kind of education.
It's also a pretty darn good age to catch the programming bug. These kids are
being exposed to an entirely new world. I can't praise local enough here.
This is the kind of opportunity that I think everyone should have access to, frankly.
But anyway, in 1969, Storer is getting acquainted with the PDP-8.
He then sees humans walk on the moon.
The path forward from here is pretty obvious, to make a tribute to the eagle.
This is where we get the first layer of confusion though.
What exactly is this program called?
Thanks to Storer, we actually have a lot of preservation here.
He had lost track of the program and carried on with life, but in 2009, a new spate of articles about the game
started making the rounds.
Folk tracked him down and he got tired
of answering individual emails,
so he made a small website that compiles
a bunch of information about the program.
This includes original source code
and a few letters of note.
When Storrs' moon-themed game was completed, he submitted it to DECUS
to add to their program catalog. When he submitted this program, he called it Apollo, after the
Apollo program. Different renditions will go by the names Lunar, Rocket, LEM, and eventually
Lunar Lander. I'm going to usually call eventually Lunar Lander.
I'm gonna usually call it Lunar Lander because that's the most popular name, but I just want
to be clear that that's an anachronism here.
As far as I can tell, Lunar Lander is the most recent of all these names.
Storer would have been calling it Apollo.
And the game is, well, I almost want to say basic, but I'd be misleading.
It's simple.
It's 39 lines of code, most of which are actually text that's just printed onto the screen explaining
how to play the game, or, to be more accurate, text that's printed onto the roll of paper.
You control the LEM and manually adjust its fuel usage as you attempt to land on the lunar surface.
The rate of fuel consumption is the only thing you have control over.
You play the game in turns. Each turn you're asked to adjust that fuel rate.
The heart of the program is a tiny physics simulation.
The code calculates the speed of the LEM at each step.
This is influenced by three main things, a starting velocity, the gravitational pull
of the moon, and the rate of fuel burn.
If you burn more fuel, you get more thrust and you slow down, but the whole time the
moon is pulling you towards its surface.
From what I can read, it looks like a kinematic equation.
Storer is calculating acceleration using that and a time step to get velocity, and then
using that to calculate new altitudes above the moon.
There's even a gravitational constant and values for the LEM's mass.
So in theory, you could change the gravitational constant and make this into an earth lander
or a Jov Earth lander,
or a Jovian lander even.
And something to point out here is the fact that this is a tiny physics simulation.
I've written much more sophisticated physics software using basically the same approach
just on a more grand scale.
So this is some actual serious software just in the guise of a
game. I think that's pretty neat. But of course, this is a game, so there's a
limiting factor here that makes it interesting. You only have so much fuel
on board the LEM. If you run out of fuel, you crash. So the real meat of the game
is all about managing that fuel. It's kinda tough.
I tend to crash whenever I play, but it always makes me want to try again.
All told, it's a nice little game.
It's also very well aligned with locals' goals.
I don't know if that was intentional or if it was just the environment or what.
Lunar Lander is a way to teach about space and physics using a computer
and using a fun little game. It was distributed around campus
as source code so anyone that got obsessed could crack the file open
and see what was going on inside. That that's all very didactic
and very cool. Again, I'm a huge fan of local. This sounds like a wonderful
program.
From Storer's terminal, Lunar Lander would spread. It was picked up by Dekus and entered
their catalog. Actually, Storer had at least two games in the user group's library. The
other, called Pollution, was a market and environment pollution simulator. It looks
pretty similar in scope to Lunar Lander,
but for whatever reason, Lander is the one that takes off.
Now this is where the story turns in an interesting way.
In 1973, Lunar Lander finds its way
into Dave All's 101 basic computer games.
There it's called Rocket,
and crucially, it's been translated into Basic.
I mean, with the book's title, it kinda gives that away, right?
It's this basic form of the game that would become popular outside the local system.
To understand why, we have to look at Lander's first language, Vocal.
we have to look at Lander's first language, vocal. I will give a bit of a warning here.
I am kind of setting up a big joke that has what I think is a funny punchline.
So, you might laugh at the end of this.
If you don't, I do apologize.
I assure you, I've had a few hearty chuckles while preparing this.
So let me start by saying this.
Similar languages are very, very interesting to me.
The fact that two similar languages can exist and one can succeed while the other fails,
well, that's what gets me.
It's like looking in on a real world experiment.
You can't set this kind of stuff up purposefully, but there are quite a few times where this
happens.
See and Bliss are one example, which I covered recently.
Focal and Basic form another pair, and this pair is even closer than anything I've ever seen before.
What I want to do is get to the bottom of two simple questions.
The most obvious is, how does Lunar Lander end up being written in focal instead of basic?
And the second is, why did the basic version of Lunar Lander prove more popular than its
original focal iteration?
Those questions, it turns out, are very closely tied together.
To answer both, we need to look at the lineage of focal itself.
This will actually take us all the way back to the beginning of computing, or at least
very close.
It takes us back to Johnnyak, one of the very first
stored program computers ever constructed. Johnnyak was built in 1953 at Rand Corp. Yes,
that Rand, the Military Industrial Complex Rand. The John in Johnniac is in honor of Johnny von Neumann, and the Niac is the traditional
suffix. It usually means numeric integrator and automatic computer. There are a lot of machines
in this era that end with Niac or Eac, and I'm kind of convinced it might have been a bit of a meme in the period,
but I have no evidence to back that up.
That's just kind of my gut check.
Now Charles Baker describes a bit of an issue with Johnniac in the Proceedings of the History
of Programming Languages, Volume 1.
Essentially Johnniac had become a ship of Theseus, or a computer of Theseus.
This happened to a number of early computers.
Over the years, incremental upgrades had left these machines almost unrecognizable.
On its own, that's fine.
There may be some philosophical questions, but the machine still runs.
That's all you care about at the end of the day, right? The issue is that while these machines were slowly changing into weird mishmashes,
the usage patterns around computers were also changing.
By 1960 computers were being used in pretty different ways.
The issue at Rand was trying to find a way to get better use out of the renovated Johnny-ac.
Rand was trying to find a way to get better use out of the renovated Johnnyak.
It was decided that time sharing, this cool newfangled technology that was all the rage,
may be worth trying out. It could make it possible to get more power and more use out of Johnnyak.
But you couldn't just grab software off the shelf in this period. It didn't help that Janiac was one of these early one-of-a-kind machines, so the crew at Rand had to develop their own timesharing system.
The result of this in 1963 was called JOS, the Janiac Open Shop System.
JOS was a one-stop shop. It's a combination time-sharing system and programming language.
Or, well, let me put that another way. JOS is a time-sharing operating system,
and its interface is a programming language, also called JOS. This dual purpose, this kind
of duality, is visible throughout the system.
Joss was intended as a means to get more use out of Janiac by getting more people on Janiac at one time. At the same time, it was designed to get more people programming on Janiac.
The plan was that anyone working at RAND could hop on at JOSS terminal and have the full power of a computer
at their fingertips. To quote from the introduction to JOSS's manual, the system is meant to,
quote, provide the individual scientist or engineer with a personal computational service
immediately available whenever required in his own working environment. The manual continues.
whenever required in his own working environment. The manual continues, From the engineer's point of view, Joss is a problem-solving tool that he can use in
solving numerical problems with a minimum investment on his part in learning its use.
End quote.
And behold, the slow beat of progress. Joss's great trick was to make Janiak more useful by making it
possible for more people to, well, use the darn computer. Time sharing does part
of that by increasing the overall volume of users that can be on the machine at
any one time. An easy-to-understand programming language picks up the slack
by increasing the amount of folk that are able to use the computer. I want to be clear about how Joss's motivations
are very similar to some other early programming languages, but still retain
some peculiarities. Fortran, one of the most venerable of the venerable, was
developed at IBM so non-programmers could use a computer
Many early languages are developed for that exact reason
That motivation leads to a really neat shift
Where we start to see people using programming and computers as tools for other ends
that's opposed to earlier days where computers were more often used as research apparatuses for the study of, well, computing. Put another
way, this is how computers become more practical.
Another point of comparison here is the bogeyman this episode, BASIC, aka the
Beginner's All-Purpose Symbolic Instructional Code.
This language is developed in 1964 at Dartmouth by Kurtz and Kiminey.
It's based off a slightly earlier language called DOPE that was written as an experiment.
The goal of BASIC is to create an easy-to-learn language that can be used to teach college
students to program and use
as part of a curriculum. Specifically, Kurtz and Kimmehne are trying to use it for non-scientific
curriculums. It's a purpose-built educational language.
Basic and Joss have similar goals, right? Be an easy-to-learn language, get more people programming. That's kind of it. In the case of BASIC,
that's students. So the learning outcome is learning. For Joss, the audience is RAND's own scientists and engineers.
So the learning outcome is
something, something Department of Defense project stuff.
But the comparison to BASIC goes a lot deeper than just that.
TrueHeads will have already spotted it, at least I hope.
BASIC is initially developed as a time-sharing system that runs on a central computer at
Dartmouth.
Technically, BASIC was the interface and programming language for the Dartmouth time sharing system.
Students would log in over terminals placed all over campus and from there could hammer
out BASIC to their heart's content.
BASIC and JOSS are developed at almost the same time.
They have a very similar concept, similar design goals, and both do the whole time-sharing language thing.
But I want to be clear, these are unrelated languages.
That is what's so compelling, and just so wild.
Joss doesn't stop on Janiac, In fact, it spreads. Now, I don't usually quote directly from
Wikipedia, but the page for Joss has this wild quotation that I just got a pull
and expand. So apparently one user said that Joss was quote, better than beer.
That's high praise from a programmer. Beer is a cultural institution amongst us keyboard folk.
But what's the actual context?
That's even more funny, it turns out.
This quote comes from a Rand manual,
a manual printed by a Department of Defense contractor.
The manual's called Joss Introduction to the New System.
Let's pull back and get the full context around why Joss is better than Beer.
Quote, Joss was impressive enough on the first few days Janiak felt well to substantiate the
acquisition of a new computer and the creation of a well-supported project to build a second JOSS. As one user quipped,
quote, it's better than beer. We're hooked. Footnote, the name JOSS still stands for
Janiak Open Shop System in spite of the fact that Janiak now resides in the Los Angeles County Museum. It has been suggested that JOS should now be interpreted
as JOS Open Shop System." That's classic, isn't it? We get recursive acronyms, jokes
about cultural substance abuse, and even the acknowledgement of how silly the whole arrangement is. Plus I do kind of love the detail of like,
oh yeah, that computer's in a museum now.
We still have documentation with its name on it.
Don't worry, it's fine.
So where exactly did Joss go?
Well, it would make the jump to much more modern hardware.
In 1966, Joss is ported to the DEC PDP-6. Now, I need to give an aside.
DEC had pretty confusing names for their computers. The PDP-6 was a big machine.
It was a mainframe, not a mini-computer. We're actually dealing with, honest to goodness, big iron. You may be tempted to assume
that DEC gave big numbers to their big machines, but that's just not the case. The PDP-10, for
instance, is a mainframe. And the PDP-11 is a minicomputer. Go figure. Anyway, during this process, Deck and Rand started to get close.
Rand wanted custom teletype terminals for use with Joss.
This was partly because Joss used a few special characters, and partly because it needed to
print in multiple colors.
Joss printouts are actually pretty slick.
The computer types in black and the user types in green. And again, this
is all on physical paper. I'm kind of a big fan of the look, to be honest.
What's crucial is that this brings Joss into DEC, and sets up a funny situation. DEC's
computer names are confusing. It turns out that the PDP-6 is DEC's first mainframe. Now, technically,
the PDP-6 is a little weird for a mainframe. It has a certain DEC flavor to it, but it is considered
a mainframe. All of DEC's other machines in this period are mini computers, which, among other
things, are far less powerful. They have less memory and just not as much oomph.
People like using Joss.
It's a slick system.
It even prints in two colors, and it runs very well on the PDP-6.
But it literally cannot run on any other deck computer.
In 1968, Richard Merrill, a programmer at DEC, creates a streamlined version of Joss called
Focal. The language is simplified, the environment is shrunk down, and it's able to run on smaller
computers. Focal is only vaguely different from Joss, at least the language component here.
The main change actually has to do with keywords. Merrill simplified keywords so
that they were just single words. In normal Joss, subroutines are called using either do group or
do step. That's a little complicated and it's two different things to parse. Merrill replaced that
with do. He also chose his keywords carefully.
Each keyword starts with a different letter.
Do is the only keyword that starts with D.
Ask is the only one that starts with A.
That made it so his parser only had to check the first letter of a word.
It's a neat hack, but it's also faster and just takes much less code.
I, I like this.
This is the kind of simplification I'd do if I was limited on space.
Merrill also takes out string variables.
Focal technically only supported numeric variables.
Now it's a bit of a weird one here.
You can print literal strings, but you can't store string data. This partly informs how
Lunar Lander works. The game only takes numeric inputs, fuel rate. The reason for that is, well,
Focal can't really take a string as input, since any input has to be stored as a variable.
any input has to be stored as a variable. Okay, so that's the why of Focal.
That's why DEC has Focal kicking around
and it ends up being why schools
in the local system use Focal.
Local gets PDPA computers.
The easiest time sharing system on that platform is Focal
because it's designed to be easy to use and easy to learn.
So that's what's used.
As a result, and here's the punchline, you get a bunch of children in the greater Boston area
using a language developed at RAND Corp.
American tax dollars, through a bizarre twist of fate, or at least a few steps end up teaching a bunch of school
children around Boston how to program in a language developed at a DoD contractor.
That to me is really funny.
Then what is this language even like?
Well, dear listener, this is where the whole independent invention thing gets wild.
The focal slash JOS is almost identical to BASIC.
I don't just mean similar.
I mean close to identical.
All the differences come down to very small quirks.
In BASIC, each line is a complete statement.
There are no blocks or groups of code.
Each line is identified by a line number,
which can be used as a label for jumping and editing.
Each line starts with a keyword
like print, let, go to, or do.
In focal, each line is a complete statement.
No blocks or anything like that. The line number line is a complete statement. No blocks or anything like that.
The line number though is a little different.
Each line is identified by a group number followed by a step number.
Like 10.01 for example.
That's group 10 step 1.
You can call up a group to run a whole group or you can go directly to a step. In practice,
this means Focal has code blocks,
but you just kind of name those blocks by number.
Each line of Focal starts with a keyword or rather a key letter since you only need the first letter of each keyword.
Those are keywords like type, set, go to, or do.
And besides that line number thing, and just slight differences in how conditionals execute,
there are no differences. That can't be real, right? I mean, that just doesn't jive with
what I know about computers.
How can we have two contemporary languages developed in isolation that are pretty much
the same?
You may be tempted to say, well, obviously, one influences the other, right?
Well, that's where it gets even more weird.
BASIC was developed in 64 based off work done in 63 at Dartmouth. All
the features of Focal that I've outlined, except the keyword trick, are straight from
Joss, which is developed at Rand in 1963. There has to be a missing link here, right?
But I've been scouring and haven't found any. The best primary source for the early history of BASIC
is the book Back to BASIC,
written by Kurtz and Kiminy themselves.
That has no mention of Joss or Rand.
That said, there is a small connection here.
John Kiminy, one of the co-creators of BASIC,
did some contracting work for Rand.
Kiminy explains this in the book Man and the
Computer. In 1953, he worked as a short-term consultant for Rand. This is actually where
he first encountered a computer. That machine was the Johnnyak. But this is too early for
Joss to be in the picture. Quote, I had great fun learning to program a
computer even the language used at the time was designed for machines and not
for human beings. End quote. The more interesting point of contact comes in
1956 when Kiminy returns to Rand for another consulting gig. Quote, I noticed
that some of Rand's distinguished and highly paid employees had to hang around
for an hour or more to get a five-second shot at the computer.
It was a time when computers were scarce and very expensive, but a simple, cost-effective
calculation showed that priorities were being put in the wrong place.
Kiminy continues,
I therefore recommended a system by which the lengthy computations
could be interrupted for a few seconds at a time for someone to check out a program.
I would very much like to believe that this recommendation influenced Rand to become one
of the pioneers in the development of time-sharing systems." This is all too early for a direct connection between Joss and Basic.
However, this does speak to something similar. Recall that Joss is created because Rand wants
to make more efficient use of Janiak. I personally think this recollection of Kemeny's points towards some larger trends in the industry.
Many many people wanted time sharing.
Non-interactive computing was quickly hitting the limit of its usefulness.
Joss and Basic are both similar solutions to that same inherent problem.
In fact, they're basically the same solution.
It could be that Joss gets inspired
in part by Kimini's recommendations at Rand. It could be that Basick gets inspired in part
by Kimini's analysis of the issues with Janiak. The point is, both systems come out of a very
similar context. That explains a lot of the similarities to me, but things
are still kind of spooky. I wish there was some smoking gun connecting the two more early
on, but there kind of isn't.
Okay, so back to the matter at hand. DEC becomes a focal shop, and that means local is a focal
shop. While that sounds innocuous at first, it actually leads to a bit of a problem.
Focal as a language is super specific to DEC minicomputers in this one exact period.
That means software written inside local is only really usable, or directly usable, on
another small DEC computer.
Why didn't focal spread outside DEC? Well, that all came down to licensing.
David All worked at DEC in this period.
In an interview with the Antic podcast,
he explained the problem with Focal like this.
But Focal in many regards was more efficient than basic because they were
running it on many computers and
there was less memory to work with.
On the other hand, and this was true digital, as time went on they said, no, no, no, nobody
else can use Focal.
We're not going to let especially those people at data general, but at any place, nobody
could use Focal."
DEC wouldn't let other companies produce their own implementations of Focal.
It's unclear if this was like a patent or licensing thing,
but DEC just wouldn't play ball.
So Focal became DEC exclusive and DEC proprietary.
BASIC, on the other hand, wasn't.
Versions of BASIC quickly proliferated.
Again, the combination of time sharing and accessible programming was a winner.
Folk wanted that, pretty badly.
BASIC was running at GE since, well, the beginning.
That's not a big surprise.
The Dartmouth team originally implemented BASIC on a GE mainframe, and they were helped
in the process by engineers and programmers at GE.
I think this experience made Kurtz and Kiminy more open to making BASIC, well, open.
By the end of the 1960s, BASIC is also running on HP and even DEC computers.
In the early 70s, BASIC becomes a standard and goes even further afield.
There's a bit of a side note here that I want to point out.
Focal is based off Joss, right?
And Joss is developed at Rand.
Rand is a Department of Defense contractor.
They make money from U.S. tax dollars, indirectly because the DOD pays them, but that's still
from tax dollars, indirectly because the DoD pays them, but that's still from tax dollars.
So in a way, we all paid for what led to Focal.
I think the only reason Focal could stay proprietary was that it was developed inside DEC themselves
and not as part of a RAND contract.
Basic, in actually kind of a weird twist, is also paid for by tax dollars.
Dartmouth is a private college, but some of their research was funded by grants.
Kurtz & Kimmany's time-sharing research was funded by a grant from the National Science
Foundation, in other words, by taxpayer dollars.
So in that light, Basic had to be an open language. We all paid
for its development. The matter of spread meant that Focal would always be less
popular than Basic. But we still get this pocket of Focal software kicking around
on some DEC computers in this specific period. And this is all happening right as DEC is getting
more involved with educational initiatives like local.
So then how does this software make the jump to basic?
How does Lunar Lander become more popular?
This is where we actually get into David All.
Now we've covered all on the show before.
He managed DEC's EduSystem program, which got computers into schools and provides support
and documentation. He is, in large part, the one responsible for DEC switching to BASIC.
All goes this route for the exact reasons we've already seen. BASIC can run on many more computers.
Focal can only run on small-deck hardware.
By standardizing educational material around BASIC, you get access to a larger audience.
You can make your materials more accessible.
In the early 70s, All starts this newsletter called EDU.
It's published by DEC and it contains,
amongst other things, type-in software.
These are games and educational programs,
and he chooses to use BASIC in this newsletter.
The problem, though, is DEC has this big catalog
of educational software written in Focal.
Luckily, that's not actually much of a problem.
It's almost trivial to translate between the two languages. Basic and Focal are
almost exactly one for one. You just replace Focal's keywords with basic
keywords and you make a few formatting changes to the line number. There were a
number of programs that got this treatment. We actually talked about one of them on the show already. All the way
back in episode 57 we discussed the Sumerian game. That game has a pretty
twisting history. The important part here is that there was a focal version written
at DEC in the 1960s and while all was working on EDU, the program was converted to BASIC.
The BASIC version was known as Hammurabi and had a much wider reach.
Like I said, ALL translates a number of these focal programs.
Dog Race, Hammurabi, Guess, Train, and Lunar Lander.
This is where we have to play some more of the name game.
In 73, all publishes, of course, 101 basic computer games. Gonna say that like 10 more times.
It's a compilation of programs from EDU as well as additional games. It includes Lunar Lander,
but under a different name. Here's how All describes the game himself.
Quote, Rocket, known as Lunar, Lim, and Apollo, is by far and away the single most popular
computer game.
It exists in versions that start you anywhere from 500 feet to 200 miles above the moon
or other planets too.
Some allow the control of directional stabilization rockets
and or the retro rocket. The three versions presented here appear to be the most popular
of the many variations." Rocket is the main name used, but Al does know the game by its original name, Apollo. Al also does this fabulous thing.
He credits every game in his book.
In 101 Basic Games, he presents three versions of Lunar Lander, and all have attributions.
Crucially, he correctly credits Storer as the creator of Apollo.
I say crucially because it's so rare to have this kind of direct chain of custody around
software, especially when it's been rewritten.
Storer writes Apollo in Focal.
It circulates around local.
He submits it to DECUS so DEC has Focal code for Apollo.
Dave All takes it from the DECUS catalog, rewrites it in BASIC, and publishes it as
Rocket.
Direct, documented, and period information.
The translation presented is also really close to the original.
Rocket in BASIC is 38 lines of code.
Apollo in Focal is 39.
That dear listener is a testament to how similar these two languages are.
Part of the name confusion comes down to the fact that there were so many versions of Lunar
Lander floating around.
Apollo had four years to float around in semi-public before all compiled his first book. In that time the game was played, loved,
adapted, modified, and mimicked. As a result, there are just a lot of versions in the wild.
101 Games comes with three. Rocket is the direct translation from the original. Then we have Rocket 1 and Rocket 2. But those aren't the only names for these versions.
Rocket 1 is also known as, well, just Rocket.
It's all confusing, I know, I know.
This version was written by Eric Peters, himself a deck employee.
I can find nothing on Peters.
All I can say for certain is he contributed another game called Evens
that makes you guess even numbers. But that's it. Rocket 1 changes the starting
conditions of Apollo and it changes how long a simulation step is. In the
original, a step's 10 seconds. In Rocket, a step is one second. But the larger
change is that Rocket 1 adds simple graphics.
As you play, it draws a very simple plot of the distance from the lander to the lunar
surface. The other game, Rocket 2, is also known as LEM. This version actually expands
the simulation considerably. It accounts for thrust factoring. In other words, you can
angle your thruster. That may sound like a small change, but that does substantially
complicate the program. Apollo, as originally written, is a very simple one-dimensional
simulation. It only calculates acceleration in one dimension, up and down. By adding the side thrusters, this becomes a two-dimensional problem, which is about
an order of magnitude more annoying to calculate.
This version was contributed by William Labory II of Alexandria, Virginia.
I guess a human would say Labory II, but I digress. Who is this programmer?
Again, no idea. 101 Basic Games actually has addresses of all its contributors. Storters
address is, as expected, Lexington High School. Peters address is Dex Offices. But Labry's address is a four-bedroom home in a suburb of Alexandria, Virginia.
That uh, sadly, tells us nothing.
Labry lived in a house.
Not that informative.
But just the simple fact that these variations exist is a lot more interesting than the lack
of information around these early programmers. It speaks to a kind of
community engagement. Now, I'm going to argue that part of this was actually caused because of Focal.
I know, that may sound like a contradiction, but I have some proof. Because Lunar Lander was
originally written in Focal, and relatively few machines ran
Focal, there was a reason for programmers to engage with the game's code.
That reason was to create ports to BASIC.
That in turn would help LunarLander spread and multiply.
My evidence is actually a counter example.
In 1970, the year after writing Lunar Lander,
Storer wrote and published another game. Again, we get to play the name game here. It's originally
called Pollution Game, but it's also known as Pollute and King. I'm gonna be calling it the
Pollution Game just for my own sanity. This game is an economic simulation.
Davol calls it a more complex Hammurabi. You play as the king of a small and communistic
island nation. Each turn, you budget your nation's capital. You spend money on planting crops,
distributing wealth to citizens, and pollution abatement. You can make immediate cash by selling land to industrial concerns, but increasing industry
increases pollution on your small island.
Your other revenue sources come in the forms of tourism and farming, which are impacted
by pollution.
Like Lunar Lander, this is a simulation built around a set of equations.
However, the pollution game is much more complex.
The code is a few hundred lines long, an order of magnitude more than Lander.
That's not too far outside the expectations for type-in games, though.
As for inspiration, well, here's how the game's origins are explained by Call of Computers' catalog.
Call of Computer was a time sharing service that would end up
buying the rights to the pollution game.
Quote, Jim Storer heard about a world game pollution program,
but when he tried to get it, he couldn't.
Luckily for him, his high school had a computer, so he wrote his own program.
Pollute began as a project in Jim's chemistry class.
His flair for making the computer fun produced this frustrating exercise."
The game Storer wanted to try out wasn't available, so he made his own.
That's some neat stuff, but what about tooling?
What language did Storer use for pollution?
This game is written in
Basic. That's right. By 1970, Focal is out. That's so last year.
Storer had made the Switch himself.
He submits the pollution game to Dekus and it makes its way into their catalog.
In 73, when all publishes 101 basic computer games,
Pollution comes along for the ride. The three versions, as near as I can tell,
are identical. There isn't modification or translation since it's already in Basic.
The Pollution game isn't nearly as popular as Lunar Lander. I think there's two reasons for that. First
is complexity. There's just more code to the game. That would have made it harder to type
in and harder to transmit. You can pass around Lander on a single piece of paper, but the
pollution game needs a couple of pages. But the other factor is simply that the pollution
game is written in BASIC. Again, this may sound counterintuitive.
Engagement with this game is largely passive.
You get the code, you type it in, you run it.
There are no steps to get it up and going.
You don't have to engage with the software in a serious way that would make you want
to, I don't know, change it or make new versions. Lunar Lander, at
least at first, required active engagement. If you wanted to play the game and you weren't
running a small deck computer that ran Focal, you would have to take the source code and
translate it. Or you may have to write a version of it from scratch.
We know for a fact that basic programmers in this period were doing
both. The evidence of edits and modifications is preserved right there in 101 basic games,
as far as total recreations, while look no further than Storer himself.
In Lunar Lander, we get this combination of key factors.
It's a simple and engaging game, and it's written in a weird language that adds just a small barrier.
Luckily, the game is simple enough that rewriting or translating it isn't an issue.
It's a solid afternoon of work and an engaging challenge, but not a big project in and of itself.
Programmers of the era, first and foremost,
like to program.
All programmers like to program, that's why we do it.
So why not take a small and fun project,
especially when the result is a neat little game?
This is helped by the fact, I think,
that Lunar Lander is written for modification.
I mean, Stororter even used constants for gravity and initial conditions for the simulation.
Turning Lunar Lander into Jupiter Lander is as easy as changing a single number.
But if you're already in there, wouldn't it be neat if the program plotted a graph
while you landed?
Or maybe if it had some side thrusters?
Alright that does it for our coverage of Lunar Lander. It's a neat little game written in
a weird language, but it doesn't stay that way for long. It becomes much more accessible
when it's translated into basic. But what really made it take off
are all the revisions, versions, rewrites and remakes. Very few have played the original
Lunar Lander, but almost everyone's played some later version. That trend starts with
the first translations in the early 70s. From there, the field's wide open. That's what
has made Lunar Lander so enduring, the sheer number of different versions of
the game.
The simplicity of the game made that tradition possible, and that's what kept the game alive.
Since 1970, we've seen the LEM landing on everything from arcade cabinets to mainframes
and minicomputers.
That's a unique and enduring legacy.
Focal is this shadow that hides behind the LEM, and it's what I think is one of the reasons for the game's early spread. The language is pretty wild, or at least its existence is wild to me.
Its origin mirrors basics very closely. Both are combined time-sharing systems and languages.
Both are designed to be used by non-programmers.
Both use very similar syntax.
So much so that Focal programs can be translated line for line into Basic.
Or I guess vice versa.
Although I can't imagine why you'd ever go from basic to focal.
Ultimately, focal dies out due to its proprietary nature.
It only ran on some deck hardware,
but basic ran on everything.
Convenience and availability won out.
That's not surprising.
What I find more interesting is that somehow,
two nearly identical languages developed in isolation and then met
and fought it out on deck hardware.
Thanks for listening to Admin of Computing.
I'll be back in two weeks time
with another piece of Computing's past.
If you want to support the show,
you can find links to my Patreon at AdminofComputing.com.
And as always, have a great rest of your day.