Comment by jll29
6 years ago
I was a but surprised that he pointed to cost as an advantage of vi over emacs - I never heard anyone claim emacs costs hundreds of dollars; it's free and open source, and to the best of my knowledge always has been.
6 years ago
I was a but surprised that he pointed to cost as an advantage of vi over emacs - I never heard anyone claim emacs costs hundreds of dollars; it's free and open source, and to the best of my knowledge always has been.
Emacs has a long history with so many versions and editors with "emacs" in the name but not necessarily what we think of emacs today.
https://en.wikipedia.org/wiki/Emacs
In the 1970's there was TECO and then E. Emacs kind of grew out of these editors.
James Gosling of Java fame had his own Gosling Emacs version that I believe was sold for money
GNU Emacs only started in 1984 and had its initial release in 1985. This interview is from 1984 so we would need to know what version of Emacs is Bill Joy referring to specifically.
Also before fast internet connections the FSF used to sell GNU tools on tape and then CD
This newsletter from 1994 says the CD costs $400. I don't know what the price was in 1984 but maybe Bill Joy is referring to that but the Free Software Foundation was only founded in 1985.
https://www.gnu.org/bulletins/bull16.html#SEC38
From memory, a GNU tape cost me $200 in 1986.
In addition to what lizknope wrote, there are still some commercial Emacs-like editors, perhaps most notable being Epsilon by Lugaru Software:
https://www.lugaru.com/
Epsilon was initially released in 1984 for PC/DOS and is still under development.
Bill was probably referring to what RMS calls "Evil Software Hoarder Emacs" aka "UniPress Emacs", which was the commercially supported version of James Gosling's Unix Emacs (aka Gosling Emacs / Gosmacs / UniPress Emacs / Unimacs) sold by UniPress Software, and it actually cost a thousand or so for a source license (but I don't remember how much a binary license was). Sun had the source installed on their file servers while Gosling was working there, which was probably how Bill Joy had access to it, although it was likely just a free courtesy license, so Gosling didn't have to pay to license his own code back from UniPress to use at Sun.
https://news.ycombinator.com/item?id=19743314
DonHopkins on Apr 24, 2019 | on: Why don't we have Wayland on Raspberry Pi yet? (20...
Good point -- I haven't tried gnu emacs's X11 driver in ages, so I'll give it another try. Does gnu emacs's X11 display driver finally have a way to keep running after the X connection terminates, and reconnect to a new X server (or multiple X servers at once)? Under screen, I keep long running emacs sessions with multiple shell buffers running for months and sometimes years, with all the files I'm working on opened up. Each shell buffer might be configured for some branch of some code, with an interactive python or whatever shell running the code connected to the database, with a bunch of useful commands and context in its history. It's a lot of work to recreate all that state.
(Digression: Bash has no way to save and merge and recreate and manage parallel history threads, does it? Or does the last shell that exits just stomp on the one history?).
Back in my Evil Software Hoarder days, I worked on the NeWS display driver for UniPress Emacs 2.20, and later on the NeWS display driver for gnu emacs. Here's a brochure from February 1988 about UniPress Emacs 2.20 and "SoftWire" (NeWS without graphics).
https://www.donhopkins.com/home/ties/scans/WhatIsEmacs.pdf
It supported multiple display drivers (text, X11, NeWS, SunView), as well as multiple window frames on each of those displays (which gnu emacs didn't support at the time), and you could disconnect and reconnect to a long running emacs later. In effect it was a "multi user emacs" since different users could type into multiple displays at the same time (although weird stuff could still happen since the classic Emacs interface wasn't designed for that).
Emacs 2.20 Demo (NeWS, multiple frames, tabbed windows, pie menus, hypermedia authoring):
https://www.youtube.com/watch?v=hhmU2B79EDU
Here are two different example of Emacs NeWS display drivers (one for UniPress Emacs 2.20, the other for Gnu Emacs 18) showing where the rubber hits the road in NeWS client/server programming of an emacs NeWS display driver.
They both download a PostScript file to NeWS that handles most of the user interface, window management, menus, input handling, font measurement, text drawing, etc, and they have a corresponding C driver on the emacs side.
There's also a "cps" file that defines the protocol (which is send in tokenized binary instead of plain text), and generates C headers and code stubs.
Together they implement an optimized, high level, application specific "emacs protocol" that the client and server use to communicate:
Emacs 2.20 NeWS display driver (supporting multiple tabbed windows and pie menus in the NeWS Lite Toolkit):
https://www.donhopkins.com/home/code/emacs.ps.txt
https://www.donhopkins.com/home/code/TrmPS.c
Gnu Emacs 18 NeWS display driver (supporting a single tabbed windows and pie menus in The NeWS Toolkit 2.0):
https://www.donhopkins.com/home/code/emacs18/src/tnt.ps
https://www.donhopkins.com/home/code/emacs18/src/tnt.c
https://www.donhopkins.com/home/code/emacs18/src/tnt_cps.cps
https://www.donhopkins.com/home/code/emacs18/lisp/term/tnt-w...
TL;DR: Lots of gross hacky PostScript code and snarky comments, like throttling beeps to one per second and flashing random colors when it beeps faster, or preventing emacs from core dumping:
Gosling Emacs was actually sold by UniPress in the early eighties, causing a lot of fuss and consternation.
To be fair, RMS a right to fuss and complain, because UniPress did kind of pull the rug out from under him. The display update optimization code that Gosling wrote was pretty ugly but amazingly brilliant dynamic programming stuff, and it had a skull-and-crossbones warning in the comments.
RMS originally used the display update code from Gosling Emacs, but then rewrote it all from scratch for later versions of Gnu Emacs, after UniPress threatened him not to use it. As modems and networks became faster, and people started using window systems instead of terminals, having an "Ultra-hot screen management package" became less important. But it's a really cool algorithm, a great example of dynamic programming, and Gosling even published a paper about it!
>Gosling Emacs was especially noteworthy because of the effective redisplay code, which used a dynamic programming technique to solve the classical string-to-string correction problem. The algorithm was quite sophisticated; that section of the source was headed by a skull-and-crossbones in ASCII art, warning any would-be improver that even if they thought they understood how the display code worked, they probably did not.
https://donhopkins.com/home/archive/emacs/skull-and-crossbon...
Trivia: That "Skull and Crossbones" ASCII art is originally from Brian Reid's Scribe program, and is not copyrighted.
https://donhopkins.com/home/documents/EmacsRedisplayAlgorith...
https://dl.acm.org/doi/10.1145/1159890.806463
A redisplay algorithm, by James Gosling.
Abstract
This paper presents an algorithm for updating the image displayed on a conventional video terminal. It assumes that the terminal is capable of doing the usual insert/delete line and insert/delete character operations. It takes as input a description of the image currently on the screen and a description of the new image desired and produces a series of operations to do the desired transformation in a near-optimal manner. The algorithm is interesting because it applies results from the theoretical string-to-string correction problem (a generalization of the problem of finding a longest common subsequence), to a problem that is usually approached with crude ad-hoc techniques.
[...]
6. Conclusion
The redisplay algorithm described in this paper is used in an Emacs-like editor for Unix and a structure editor. It's performance has been quite good: to redraw everything on the screen (when everything has changed) takes about 0.12 seconds CPU time on a VAX 11/780 running Unix. Using the standard file typing program, about 0.025 seconds of CPU time are needed to type one screenful of text. Emacs averages about 0.004 CPU seconds per keystroke (with one call on the redisplay per keystroke).
Although in the interests of efficency we have stripped down algorithm 5 to algorithm 6 the result is still an algorithm which has a firm theoretical basis and which is superior to the usual ad-hoc approach.
https://en.wikipedia.org/wiki/Dynamic_programming
> EMACS is a nice editor too, but because it costs hundreds of dollars, there will always be people who won't buy it.
That surprised me too.
OSS was not a widespread thing until much later, around the time of the early web and Linux. People were sharing code of course but trying to monetize development tools was perfectly reasonable at the time.
Licensing was in general messy and not very formalized (hence the existence of several BSD forks). There were may versions of unix, several of which were proprietary and built by various hardware companies (like Sun's Solaris).
Unix on PCs was even less of a thing at the time as PCs were still pretty limited. The 80386 with 32 bit instructions was only introduced in 1985. I'm not sure there ever was a unix version capable of running on 16 bit intel CPUs before that. So people programming for and using Unix hardware were mainly doing that professionally or in an academic setting and not on some home computer (as they were referred to once upon a time). So, companies donating OSS software was not a big thing.
Bill Joy of course worked on BSD kernels and distributions and would have technically been one of the early OSS developers. So, open sourcing vi was probably a natural thing for him when he created it in 1976 and released it along with the first version of BSD while at Berkeley. So, he was an academic at the time and not selling software for profit yet.
BSD wasn't open source back then, you needed to have an AT&T source code licence as well.
2 replies →
maybe cost in system resources? EMACS used to require a lot of RAM ("Eight Megs And Constantly Swapping").
No, emacs used to be non-free software. Bare in mind open source (as we understand it today) is very different to what it was like in the 80s. Also internet connections (if you were lucky enough to have one in the first place) was several orders of magnitude slower and more expensive thus software was usually distributed via snail mail and usually came with a (hefty) price tag.
In many ways, this is the golden era for developers. Never has so many tools been free, easy to access and in abundance. Though I'll always have fond memories of the 80s development for it's simplicity.