Feeds

Bill Joy's greatest gift to man – the vi editor

Forget BSD Unix and NFS

  • alert
  • submit to reddit

The smart choice: opportunity from uncertainty

Out of all of Bill Joy's contributions to technology, users appear most fond of one of the simplest - the vi editor.

Joy leaves a lasting legacy of work both in the general technology domain and at Sun Microsystems. The Sun co-founder announced this week that he is leaving the company. Among Joy's list of achievements are BSD Unix, NFS, UltraSPARC designs and some work on Java. But it's vi, created in 1976, that really captured Reg readers' hearts.

"Bill's greatest gift to mankind was left off his list of achievements (in your article)... the vi editor," writes reader Matthew Hawkins in Australia. "I can live without NFS, Java and related technologies. I'm not sure if I can live without vi."

Matthew is not alone in his feelings. Other readers called vi, "Joy's lasting contribution to humanity" and agreed they could not have worked without it.

To do vi justice, we turn to Linux Magazine, which has one of the best accounts of how Joy came up with this little gem.

Back in 1999, the mag asked Joy what inspired him to write vi:

What happened is that Ken Thompson came to Berkeley and brought this broken Pascal system, and we got this summer job to fix it. While we were fixing it, we got frustrated with the editor we were using which was named ed. ed is certainly frustrating.

We got this code from a guy named George Coulouris at University College in London* called em - Editor for Mortals - since only immortals could use ed to do anything. By the way, before that summer, we could only type in uppercase. That summer we got lowercase ROMs for our terminals. It was really exciting to finally use lowercase.

So we modified em and created en. I don't know if there was an eo or an ep but finally there was ex. [laughter] I remember en but I don't know how it got to ex. So I had a terminal at home and a 300 baud modem so the cursor could move around and I just stayed up all night for a few months and wrote vi.

Linux Mag then asked: "So you didn't really write vi in one weekend like everybody says?"

No. It took a long time. It was really hard to do because you've got to remember that I was trying to make it usable over a 300 baud modem. That's also the reason you have all these funny commands. It just barely worked to use a screen editor over a modem. It was just barely fast enough. A 1200 baud modem was an upgrade. 1200 baud now is pretty slow.

9600 baud is faster than you can read. 1200 baud is way slower. So the editor was optimized so that you could edit and feel productive when it was painting slower than you could think. Now that computers are so much faster than you can think, nobody understands this anymore.

The people doing Emacs were sitting in labs at MIT with what were essentially fibre-channel links to the host, in contemporary terms. They were working on a PDP-10, which was a huge machine by comparison, with infinitely fast screens.

So they could have funny commands with the screen shimmering and all that, and meanwhile, I'm sitting at home in sort of World War II surplus housing at Berkeley with a modem and a terminal that can just barely get the cursor off the bottom line.

It was a world that is now extinct. People don't know that vi was written for a world that doesn't exist anymore - unless you decide to get a satellite phone and use it to connect to the Net at 2400 baud, in which case you'll realize that the Net is not usable at 2400 baud. It used to be perfectly usable at 1200 baud. But these days you can't use the Web at 2400 baud because the ads are 24KB.

That's just a bit of background on the creation of vi. Enterprising types can take a peek here and here for more information on Joy's vi work and the history of BSD Unix. For the record, Reg readers did put Joy's work writing the TCP/IP stack for BSD right up there with vi. ®

* Shortly after our story posted, Keith Clarke - a friend of George Coulouris - contacted The Reg with some updated information. Coulouris was actually at Queen Mary College, University of London and not University College in London, as Joy recalled.

Coulouris then contacted us with some other fresh insights. Many thanks, Keith and George.

Of course Keith is correct in saying that I was a Lecturer at Queen Mary College, University of London when I wrote the 'em' editor. There's a bit more about what it was and how I came to pass it to Bill Joy on the web page that Keith has already cited. There is some stuff about the design of 'em' appended at the end of the page.

Paradoxically, I think we had more experience in screen-based interaction at the time than Bell Labs or Berkeley and it was for that reason that I saw the need for a screen editor. It was less powerful than 'vi' in that it allowed the cursor to move only within a single line. This constraint arose mainly from the desire to make it work on the variety of vdu's (and even the TTYs) that we had available at the time. But a full-screen editor is a lot more work to write and Bill deserves most of the credit he has received. Having said that, 'vi' would probably never have seen the light of day if I hadn't sat down at the terminal next to him at Berkeley in the summer of 1976 and I wouldn't be surprised if some of my code lives on in 'vi'.

Best wishes,
George Coulouris
Emeritus Professor of Computer Systems
Queen Mary, University of London
and
Senior Visiting Fellow
Laboratory for Communication Engineering
Department of Engineering, University of Cambridge

Related Story

Joy quits Sun

Securing Web Applications Made Simple and Scalable

More from The Register

next story
KDE releases ice-cream coloured Plasma 5 just in time for summer
Melty but refreshing - popular rival to Mint's Cinnamon's still a work in progress
NO MORE ALL CAPS and other pleasures of Visual Studio 14
Unpicking a packed preview that breaks down ASP.NET
Secure microkernel that uses maths to be 'bug free' goes open source
Hacker-repelling, drone-protecting code will soon be yours to tweak as you see fit
Cheer up, Nokia fans. It can start making mobes again in 18 months
The real winner of the Nokia sale is *drumroll* ... Nokia
Put down that Oracle database patch: It could cost $23,000 per CPU
On-by-default INMEMORY tech a boon for developers ... as long as they can afford it
Another day, another Firefox: Version 31 is upon us ALREADY
Web devs, Mozilla really wants you to like this one
Google shows off new Chrome OS look
Athena springs full-grown from Chromium project's head
prev story

Whitepapers

Designing a Defense for Mobile Applications
Learn about the various considerations for defending mobile applications - from the application architecture itself to the myriad testing technologies.
Implementing global e-invoicing with guaranteed legal certainty
Explaining the role local tax compliance plays in successful supply chain management and e-business and how leading global brands are addressing this.
Top 8 considerations to enable and simplify mobility
In this whitepaper learn how to successfully add mobile capabilities simply and cost effectively.
Seven Steps to Software Security
Seven practical steps you can begin to take today to secure your applications and prevent the damages a successful cyber-attack can cause.
Boost IT visibility and business value
How building a great service catalog relieves pressure points and demonstrates the value of IT service management.