%% Copyright (c) 2002, 2010 Sam Williams
%% Copyright (c) 2010 Richard M. Stallman
%% Permission is granted to copy, distribute and/or modify this
%% document under the terms of the GNU Free Documentation License,
%% Version 1.3 or any later version published by the Free Software
%% Foundation; with no Invariant Sections, no Front-Cover Texts, and
%% no Back-Cover Texts. A copy of the license is included in the
%% file called ``gfdl.tex''.


\chapter{The Emacs Commune}

The AI Lab of the 1970s was by all accounts a special place. Cutting-edge projects and top-flight researchers gave it an esteemed position in the world of computer science. The internal hacker culture and its anarchic policies lent a rebellious mystique as well. Only later, when many of the lab's scientists and software superstars had departed, would hackers fully realize the unique and ephemeral world they had once inhabited.

``It was a bit like the Garden of Eden,'' says Stallman, summing up the lab and its software-sharing ethos in a 1998 \textit{Forbes} article. ``It hadn't occurred to us not to cooperate.''\endnote{See Josh McHugh, ``For the Love of Hacking,'' \textit{Forbes} (August 10, 1998), \url{http://www.forbes.com/forbes/1998/0810/6203094a.html}.}

Such mythological descriptions, while extreme, underline an important fact. The ninth floor of 545 Tech Square was more than a workplace for many. For hackers such as Stallman, it was home.

The word ``home'' is a weighted term in the Stallman lexicon. In a pointed swipe at his parents, Stallman, to this day, refuses to acknowledge any home before Currier House, the dorm he lived in during his days at Harvard. He has also been known to describe leaving that home in tragicomic terms. Once, while describing his years at Harvard, Stallman said his only regret was getting kicked out. It wasn't until I asked Stallman what precipitated his ouster, that I realized I had walked into a classic Stallman setup line.

``At Harvard they have this policy where if you pass too many classes they ask you to leave,'' Stallman says.

With no dorm and no desire to return to New York, Stallman followed a path blazed by Greenblatt, Gosper, Sussman, and the many other hackers before him. Enrolling at MIT as a grad student, Stallman rented a room in an apartment in nearby Cambridge but soon viewed the AI Lab itself as his de facto home. In a 1986 speech, Stallman recalled his memories of the AI Lab during this period:

\begin{quote}
I may have done a little bit more living at the lab than most people, because every year or two for some reason or other I'd have no apartment and I would spend a few months living at the lab. And I've always found it very comfortable, as well as nice and cool in the summer. But it was not at all uncommon to find people falling asleep at the lab, again because of their enthusiasm; you stay up as long as you possibly can hacking, because you just don't want to stop. And then when you're completely exhausted, you climb over to the nearest soft horizontal surface. A very informal atmosphere.\endnote{See Stallman (1986).}
\end{quote}

The lab's home-like atmosphere could be a problem at times. What some saw as a dorm, others viewed as an electronic opium den. In the 1976 book \textit{Computer Power and Human Reason}, MIT researcher Joseph Weizenbaum offered a withering critique of the ``computer bum,'' Weizenbaum's term for the hackers who populated computer rooms such as the AI Lab. ``Their rumpled clothes, their unwashed hair and unshaved faces, and their uncombed hair all testify that they are oblivious to their bodies and to the world in which they move,'' Weizenbaum wrote. ``[Computer bums] exist, at least when so engaged, only through and for the computers.''\endnote{See Joseph Weizenbaum, \textit{Computer Power and Human Reason: From Judgment to Calculation} (W. H. Freeman, 1976): 116.}

Almost a quarter century after its publication, Stallman still bristles when hearing Weizenbaum's ``computer bum'' description, discussing it in the present tense as if Weizenbaum himself was still in the room. ``He wants people to be just professionals, doing it for the money and wanting to get away from it and forget about it as soon as possible,'' Stallman says. ``What he sees as a normal state of affairs, I see as a tragedy.''

Hacker life, however, was not without tragedy. Stallman characterizes his transition from weekend hacker to full-time AI Lab denizen as a series of painful misfortunes that could only be eased through the euphoria of hacking. As Stallman himself has said, the first misfortune was his graduation from Harvard. Eager to continue his studies in physics, Stallman enrolled as a graduate student at MIT. The choice of schools was a natural one. Not only did it give Stallman the chance to follow the footsteps of great MIT alumni: William Shockley ('36), Richard P. Feynman ('39), and Murray Gell-Mann ('51), it also put him two miles closer to the AI Lab and its new PDP-10 computer. ``My attention was going toward programming, but I still thought, well, maybe I can do both,'' Stallman says.

Toiling in the fields of graduate-level science by day and programming in the monastic confines of the AI Lab by night, Stallman tried to achieve a perfect balance. The fulcrum of this geek teeter-totter was his weekly outing with the Folk-Dance Club, his one social outlet that guaranteed at least a modicum of interaction with the opposite sex. Near the end of that first year at MIT, however, disaster struck. A knee injury forced Stallman to stop dancing. At first, Stallman viewed the injury as a temporary problem; he went to dancing and chatted with friends while listening to the music he loved. By the end of the summer, when the knee still ached and classes reconvened, Stallman began to worry. ``My knee wasn't getting any better,'' Stallman recalls, ``which meant I had to expect to be unable to dance, permanently. I was heartbroken.''

With no dorm and no dancing, Stallman's social universe imploded. Dancing was the only situation in which he had found success in meeting women and occasionally even dating them. No more dancing ever was painful enough, but it also meant, it seemed, no more dates ever.

``I felt basically that I'd lost all my energy,'' Stallman recalls. ``I'd lost my energy to do anything but what was most immediately tempting. The energy to do something else was gone. I was in total despair.''

Stallman retreated from the world even further, focusing entirely on his work at the AI Lab. By October, 1975, he dropped out of MIT and out of physics, never to return to studies. Software hacking, once a hobby, had become his calling.

Looking back on that period, Stallman sees the transition from full-time student to full-time hacker as inevitable. Sooner or later, he believes, the siren's call of computer hacking would have overpowered his interest in other professional pursuits. ``With physics and math, I could never figure out a way to contribute,'' says Stallman, recalling his struggles prior to the knee injury. ``I would have been proud to advance either one of those fields, but I could never see a way to do that. I didn't know where to start. With software, I saw right away how to write things that would run and be useful. The pleasure of that knowledge led me to want to do it more.''

Stallman wasn't the first to equate hacking with pleasure. Many of the hackers who staffed the AI Lab boasted similar, incomplete academic résumés. Most had come in pursuing degrees in math or electrical engineering only to surrender their academic careers and professional ambitions to the sheer exhilaration that came with solving problems never before addressed. Like St. Thomas Aquinas, the scholastic known for working so long on his theological summae that he sometimes achieved spiritual visions, hackers reached transcendent internal states through sheer mental focus and physical exhaustion. Although Stallman shunned drugs, like most hackers, he enjoyed the ``high'' that came near the end of a 20-hour coding bender.

Perhaps the most enjoyable emotion, however, was the sense of personal fulfillment. When it came to hacking, Stallman was a natural. A childhood's worth of late-night study sessions gave him the ability to work long hours with little sleep. As a social outcast since age 10, he had little difficulty working alone. And as a mathematician with a built-in gift for logic and foresight, Stallman possessed the ability to circumvent design barriers that left most hackers spinning their wheels.

``He was special,'' recalls Gerald Sussman, an AI Lab faculty member and (since 1985) board member of the Free Software Foundation. Describing Stallman as a ``clear thinker and a clear designer,'' Sussman invited Stallman to join him in AI research projects in 1973 and 1975, both aimed at making AI programs that could analyze circuits the way human engineers do it. The project required an expert's command of Lisp, a programming language built specifically for AI applications, as well as understanding (supplied by Sussman) of how a human might approach the same task.  The 1975 project pioneered an AI technique called dependency-directed backtracking or truth maintenance, which consists of positing tentative assumptions, noticing if they lead to contradictions, and reconsidering the pertinent assumptions if that occurs.

When he wasn't working on official projects such as these, Stallman devoted his time to pet projects. It was in a hacker's best interest to improve the lab's software infrastructure, and one of Stallman's biggest pet projects during this period was the lab's editor program TECO.

The story of Stallman's work on TECO during the 1970s is inextricably linked with Stallman's later leadership of the free software movement. It is also a significant stage in the history of computer evolution, so much so that a brief recapitulation of that evolution is necessary. During the 1950s and 1960s, when computers were first appearing at universities, computer programming was an incredibly abstract pursuit. To communicate with the machine, programmers created a series of punch cards, with each card representing an individual software command. Programmers would then hand the cards over to a central system administrator who would then insert them, one by one, into the machine, waiting for the machine to spit out a new set of punch cards, which the programmer would then decipher as output. This process, known as ``batch processing,'' was cumbersome and time consuming. It was also prone to abuses of authority. One of the motivating factors behind hackers' inbred aversion to centralization was the power held by early system operators in dictating which jobs held top priority.

In 1962, computer scientists and hackers involved in MIT's Project MAC, an early forerunner of the AI Lab, took steps to alleviate this frustration. Time-sharing, originally known as ``time stealing,'' made it possible for multiple programs to take advantage of a machine's operational capabilities. Teletype interfaces also made it possible to communicate with a machine not through a series of punched holes but through actual text. A programmer typed in commands and read the line-by-line output generated by the machine.

During the late 1960s, interface design made additional leaps. In a famous 1968 lecture, Doug Engelbart, a scientist then working at the Stanford Research Institute, unveiled a prototype of the modern graphical interface. Rigging up a television set to the computer and adding a pointer device which Engelbart dubbed a ``mouse,'' the scientist created a system even more interactive than the time-sharing system developed at MIT. Treating the video display like a high-speed printer, Engelbart's system gave a user the ability to move the cursor around the screen and see the cursor position updated by the computer in real time. The user suddenly had the ability to position text anywhere on the screen.

Such innovations would take another two decades to make their way into the commercial marketplace. Still, by the 1970s, video screens had started to replace teletypes as display terminals, creating the potential for full-screen -- as opposed to line-by-line -- editing capabilities.

One of the first programs to take advantage of this full-screen capability was the MIT AI Lab's TECO. Short for Text Editor and COrrector, the program had been upgraded by hackers from an old teletype line editor for the lab's PDP-6 machine.\endnote{According to the \textit{Jargon File}, TECO's name originally stood for Tape Editor and Corrector. See \url{http://www.catb.org/jargon/html/T/TECO.html}.}

TECO was a substantial improvement over old editors, but it still had its drawbacks. To create and edit a document, a programmer had to enter a series of commands specifying each edit. It was an abstract process. Unlike modern word processors, which update text with each keystroke, TECO demanded that the user enter an extended series of editing instructions followed by an ``end of command string'' sequence just to change the text. Over time, a hacker grew proficient enough to make large changes elegantly in one command string, but as Stallman himself would later point out, the process required ``a mental skill like that of blindfold chess.''\endnote{See Richard Stallman, ``EMACS: The Extensible, Customizable, Display Editor,'' AI Lab Memo (1979). An updated HTML version of this memo, from which I am quoting, is available at \url{http://www.gnu.org/software/emacs/emacs-paper.html}.}

To facilitate the process, AI Lab hackers had built a system that displayed both the text and the command string on a split screen. Despite this innovative hack, editing with TECO still required skill and planning.

TECO wasn't the only full-screen editor floating around the computer world at this time. During a visit to the Stanford Artificial Intelligence Lab in 1976, Stallman encountered an edit program named E. The program contained an internal feature, which allowed a user to update display text after each command keystroke. In the language of 1970s programming, E was one of the first rudimentary WYSIWYG editors. Short for ``what you see is what you get,'' WYSIWYG meant that a user could manipulate the file by moving through the displayed text, as opposed to working through a back-end editor program.''\endnote{See Richard Stallman, ``Emacs the Full Screen Editor'' (1987), \url{http://www.lysator.liu.se/history/garb/txt/87-1-emacs.txt}.}

Impressed by the hack, Stallman looked for ways to expand TECO's functionality in similar fashion upon his return to MIT. He found a TECO feature called Control-R, written by Carl Mikkelson and named after the two-key combination that triggered it. Mikkelson's hack switched TECO from its usual abstract command-execution mode to a more intuitive keystroke-by-keystroke mode. The only flaws were that it used just five lines of the screen and was too inefficient for real use. Stallman reimplemented the feature to use the whole screen efficiently, then
extended it in a subtle but significant way. He made it possible to attach TECO command strings, or ``macros,'' to keystrokes. Advanced TECO users already saved macros in files; Stallman's hack made it possible to call them up fast. The result was a user-programmable WYSIWYG editor. ``That was the real breakthrough,'' says Guy Steele, a fellow AI Lab hacker at the time.\endnote{\textit{Ibid.}}

By Stallman's own recollection, the macro hack touched off an explosion of further innovation. ``Everybody and his brother was writing his own collection of redefined screen-editor commands, a command for everything he typically liked to do,'' Stallman would later recall. ``People would pass them around and improve them, making them more powerful and more general. The collections of redefinitions gradually became system programs in their own right.''\endnote{\textit{Ibid.}}

So many people found the macro innovations useful and had incorporated it into their own TECO programs that the TECO editor had become secondary to the macro mania it inspired. ``We started to categorize it mentally as a programming language rather than as an editor,'' Stallman says. Users were experiencing their own pleasure tweaking the software and trading new ideas.\endnote{\textit{Ibid.}}

Two years after the explosion, the rate of innovation began to exhibit inconvenient side effects. The explosive growth had provided an exciting validation of the collaborative hacker approach, but it had also led to incompatibility. ``We had a Tower of Babel effect,'' says Guy Steele.

The effect threatened to kill the spirit that had created it, Steele says. Hackers had designed ITS to facilitate programmers' ability to share knowledge and improve each other's work. That meant being able to sit down at another programmer's desk, open up a programmer's work and make comments and modifications directly within the software. ``Sometimes the easiest way to show somebody how to program or debug something was simply to sit down at the terminal and do it for them,'' explains Steele.

The macro feature, after its second year, began to foil this capability. In their eagerness to embrace the new full-screen capabilities, hackers had customized their versions of TECO to the point where a hacker sitting down at another hacker's terminal usually had to spend the first hour just figuring out what macro commands did what.

Frustrated, Steele took it upon himself to solve the problem. He gathered together the four different macro packages and began assembling a chart documenting the most useful macro commands. In the course of implementing the design specified by the chart, Steele says he attracted Stallman's attention.

``He started looking over my shoulder, asking me what I was doing,'' recalls Steele.

For Steele, a soft-spoken hacker who interacted with Stallman infrequently, the memory still sticks out. Looking over another hacker's shoulder while he worked was a common activity at the AI Lab. Stallman, the TECO maintainer at the lab, deemed Steele's work ``interesting'' and quickly set off to complete it.

``As I like to say, I did the first 0.001 percent of the implementation, and Stallman did the rest,'' says Steele with a laugh.

The project's new name, Emacs, came courtesy of Stallman. Short for ``editing macros,'' it signified the evolutionary transcendence that had taken place during the macros explosion two years before. It also took advantage of a gap in the software programming lexicon. Noting a lack of programs on ITS starting with the letter ``E,'' Stallman chose Emacs, making it natural to reference the program with a single letter. Once again, the hacker lust for efficiency had left its mark.\endnote{\textit{Ibid.}}

Of course, not everyone switched to Emacs, or not immediately.  Users were free to continue maintaining and running their own TECO-based editors as before.  But most found it preferable to switch to Emacs, especially since Emacs was designed to make it easy to replace or add some parts while using others unchanged.

``On the one hand, we were trying to make a uniform command set again; on the other hand, we wanted to keep it open ended, because the programmability was important,'' recalls Steele.

Stallman now faced another conundrum: if users made changes but didn't communicate those changes back to the rest of the community, the Tower of Babel effect would simply emerge in other places. Falling back on the hacker doctrine of sharing innovation, Stallman embedded a statement within the source code that set the terms of use. Users were free to modify and redistribute the code on the condition that they gave back all the extensions they made. Stallman called this ``joining the Emacs Commune.'' Just as TECO had become more than a simple editor, Emacs had become more than a simple software program. To Stallman, it was a social contract. In a 1981 memo documenting the project, Stallman spelled out the contract terms. ``EMACS,'' he wrote, ``was distributed on a basis of communal sharing, which means that all improvements must be given back to me to be incorporated and distributed.''\endnote{See Stallman (1979): \#SEC34.}

The original Emacs ran only on the PDP-10 computer, but soon users of other computers wanted an Emacs to edit with. The explosive innovation continued throughout the decade, resulting in a host of Emacs-like programs with varying degrees of cross-compatibility. The Emacs Commune's rules did not apply to them, since their code was separate. A few cited their relation to Stallman's original Emacs with humorously recursive names: Sine (Sine is not Emacs), Eine (Eine is not Emacs), and Zwei (Zwei was Eine initially). A true Emacs had to provide user-programmability like the original; editors with similar keyword commands but without the user-programmability were called ``ersatz Emacs.''  One example was Mince (Mince is Not Complete Emacs). 

While Stallman was developing Emacs in the AI Lab, there were other, unsettling developments elsewhere in the hacker community. Brian Reid's 1979 decision to embed ``time bombs'' in Scribe, making it possible for Unilogic to limit unpaid user access to the software, was a dark omen to Stallman. ``He considered it the most Nazi thing he ever saw in his life,'' recalls Reid. Despite going on to later Internet fame as the co-creator of the Usenet \textit{alt} hierarchy, Reid says he still has yet to live down that 1979 decision, at least in Stallman's eyes. ``He said that all software should be free and the prospect of charging money for software was a crime against humanity.''\endnote{In a 1996 interview with online magazine \textit{MEME}, Stallman cited Scribe's sale as irksome, but declined to mention Reid by name. ``The problem was nobody censured or punished this student for what he did,'' Stallman said. ``The result was other people got tempted to follow his example.'' See \textit{MEME} 2.04, \url{http://memex.org/meme2-04.html}.}

Although Stallman had been powerless to head off Reid's sale, he did possess the ability to curtail other forms of behavior deemed contrary to the hacker ethos. As central source-code maintainer for the original Emacs, Stallman began to wield his power for political effect. During his final stages of conflict with the administrators at the Laboratory for Computer Science over password systems, Stallman initiated a software ``strike,'' refusing to send lab members the latest version of Emacs until they rejected the security system on the lab's computers.\endnote{See Steven Levy, \textit{Hackers} (Penguin USA [paperback], 1984): 419.} This was more gesture than sanction, since nothing could stop them from installing it themselves. But it got the point across: putting passwords on an ITS system would lead to condemnation and reaction.

``A lot of people were angry with me, saying I was trying to hold them hostage or blackmail them, which in a sense I was,'' Stallman would later tell author Steven Levy. ``I was engaging in violence against them because I thought they were engaging in violence to everyone at large.''\endnote{\textit{Ibid.}}

Over time, Emacs became a sales tool for the hacker ethic. The flexibility Stallman had built into the software not only encouraged collaboration, it demanded it. Users who didn't keep abreast of the latest developments in Emacs evolution or didn't contribute their contributions back to Stallman ran the risk of missing out on the latest breakthroughs. And the breakthroughs were many. Twenty years later, users of GNU Emacs (a second implementation started in 1984) have modified it for so many different uses -- using it as a spreadsheet, calculator, database, and web browser -- that later Emacs developers adopted an overflowing sink to represent its versatile functionality. ``That's the idea that we wanted to convey,'' says Stallman. ``The amount of stuff it has contained within it is both wonderful and awful at the same time.''

Stallman's AI Lab contemporaries are more charitable. Hal Abelson, an MIT grad student who worked with Sussman during the 1970s and would later assist Stallman as a charter board member of the Free Software Foundation, describes Emacs as ``an absolutely brilliant creation.'' In giving programmers a way to add new software libraries and features without messing up the system, Abelson says, Stallman paved the way for future large-scale collaborative software projects. ``Its structure was robust enough that you'd have people all over the world who were loosely collaborating [and] contributing to it,'' Abelson says. ``I don't know if that had been done before.''\endnote{In writing this chapter, I've elected to focus more on the social significance of Emacs than the software significance. To read more about the software side, I recommend Stallman's 1979 memo. I particularly recommend the section titled ``Research Through Development of Installed Tools'' (\#SEC27). Not only is it accessible to the nontechnical reader, it also sheds light on how closely intertwined Stallman's political philosophies are with his software-design philosophies. A sample excerpt follows:

\begin{quote}
EMACS could not have been reached by a process of careful design, because such processes arrive only at goals which are visible at the outset, and whose desirability is established on the bottom line at the outset. Neither I nor anyone else visualized an extensible editor until I had made one, nor appreciated its value until he had experienced it. EMACS exists because I felt free to make individually useful small improvements on a path whose end was not in sight.
\end{quote}}

Guy Steele expresses similar admiration. Currently a research scientist for Sun Microsystems, he remembers Stallman primarily as a ``brilliant programmer with the ability to generate large quantities of relatively bug-free code.'' Although their personalities didn't exactly mesh, Steele and Stallman collaborated long enough for Steele to get a glimpse of Stallman's intense coding style. He recalls a notable episode in the late 1970s when the two programmers banded together to write the editor's ``pretty print'' feature. Originally conceived by Steele, pretty print was another keystroke-triggered feature that reformatted Emacs' source code so that it was both more readable and took up less space, further bolstering the program's WYSIWYG qualities. The feature was strategic enough to attract Stallman's active interest, and it wasn't long before Steele wrote that he and Stallman were planning an improved version.

``We sat down one morning,'' recalls Steele. ``I was at the keyboard, and he was at my elbow,'' says Steele. ``He was perfectly willing to let me type, but he was also telling me what to type.

The programming session lasted 10 hours. Throughout that entire time, Steele says, neither he nor Stallman took a break or made any small talk. By the end of the session, they had managed to hack the pretty print source code to just under 100 lines. ``My fingers were on the keyboard the whole time,'' Steele recalls, ``but it felt like both of our ideas were flowing onto the screen. He told me what to type, and I typed it.''

The length of the session revealed itself when Steele finally left the AI Lab. Standing outside the building at 545 Tech Square, he was surprised to find himself surrounded by nighttime darkness. As a programmer, Steele was used to marathon coding sessions. Still, something about this session was different. Working with Stallman had forced Steele to block out all external stimuli and focus his entire mental energies on the task at hand. Looking back, Steele says he found the Stallman mind-meld both exhilarating and scary at the same time. ``My first thought afterward was [that] it was a great experience, very intense, and that I never wanted to do it again in my life.''

\theendnotes
\setcounter{endnote}{0}
