"The program worked, but it was almost 200 lines long - almost too big for the Pascal system."
sounds like something written in a totally different universe.
Also, it seems that those were times when almost every programmer had his own editor, ed, em, en, be, hed if I managed to catch all of them.
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.
That surprised me too.
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.
[0] https://github.com/dspinellis/unix-history-repo/tree/BSD-1-Snapshot-Development
It was only around 2001 / 2003 when Caldera open sourced some UNIX utilities under an open source license as part of the Heirloom project. Parts of that were ed and mailx.
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!
https://news.ycombinator.com/item?id=22849522
DonHopkins 10 months ago | on: Enemy AI: chasing a player without Navigation2D or...
James Gosling's Emacs screen redisplay algorithm also used similar "dynamic programming techniques" to compute the minimal cost path through a cost matrix of string edit operations (the costs depended i.e. on the number of characters to draw, length of the escape codes to insert/delete lines/characters, padding for slow terminals, etc).
https://en.wikipedia.org/wiki/Gosling_Emacs
>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-crossbones.txt
Trivia: That "Skull and Crossbones" ASCII art is originally from Brian Reid's Scribe program, and is not copyrighted.
https://donhopkins.com/home/archive/emacs/mw/display.c
/* 1 2 3 4 .... Each Mij represents the minumum cost of
+---+---+---+---+----- rearranging the first i lines to map onto
1 | | | | | the first j lines (the j direction
+---+---+---+---+----- represents the desired contents of a line,
2 | | \| ^ | | i the current contents). The algorithm
+---+---\-|-+---+----- used is a dynamic programming one, where
3 | | <-+Mij| | M[i,j] = min( M[i-1,j],
+---+---+---+---+----- M[i,j-1]+redraw cost for j,2
4 | | | | | M[i-1,j-1]+the cost of
+---+---+---+---+----- converting line i to line j);
. | | | | | Line i can be converted to line j by either
. just drawing j, or if they match, by moving
. line i to line j (with insert/delete line)
*/
https://donhopkins.com/home/documents/EmacsRedisplayAlgorithm.pdfhttps://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/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.
Epsilon was initially released in 1984 for PC/DOS and is still under development.
https://en.wikipedia.org/wiki/Gosling_Emacs
I worked at UniPress on the Emacs display driver for the NeWS window system (the PostScript based window system that James Gosling also wrote), with Mike "Emacs Hacker Boss" Gallaher, who was charge of Emacs development at UniPress. One day during the 80's Mike and I were wandering around an East coast science fiction convention, and ran into RMS, who's a regular fixture at such events.
Mike said: "Hello, Richard. I heard a rumor that your house burned down. That's terrible! Is it true?"
RMS replied right back: "Yes, it did. But where you work, you probably heard about it in advance."
Everybody laughed. It was a joke! Nobody's feelings were hurt. He's a funny guy, quick on his feet!
Here's an old photo of RMS (in the center) and Mike (on the right), with RMS holding a gerbil wrapped in duct tape, pondering about how to answer the question "Why do you wrap a gerbil in duct tape?" (You can google the answer... And it's only fake stuffed gerbil for cats.)
http://www.art.net/~hopkins/Don/images/jsol-rms-gerbil-liz-mg.jpg
Here's mmccaff's story about working for UniPress, and my reply, explaining the "Evil Software Hoarder" expression, and linking to RMS's infamous natalism flame:
https://news.ycombinator.com/item?id=6646978
And a description of UniPress Emacs's vi emulation mode, which addressed the usage pattern of people who liked to quickly run vi to edit a file, then save and quit back into the shell, which you couldn't just emulate by firing up a new emacs every time, since emacs takes so much longer than vi to start up:
https://news.ycombinator.com/item?id=9398028
>DonHopkins on Apr 18, 2015 | on: Spacemacs – Emacs advanced kit focused on Evil
>UniPress "Evil Software Hoarder [TM]" Emacs had a vi emulation mode such that when you typed ":q", it flipped you over into an Emacs shell window with key bindings to behave just like you'd expect had you actually exited your text editor. Of course the shell mode was hacked so "vi foo.c" would flip you back into a vi-mode buffer on foo.c. Poor innocent vi users didn't even realize they hadn't left the editor! It was kind of like being in the Ematrix.
Here's some more stuff about the tabbed windows and pie menus I implemented for the NeWS display driver for UniPress Emacs (with some links to MockLisp and PostScript source code) -- at the time (around 1988), Gnu Emacs did not have multiple windows, pie menus, or tabbed windows (and still doesn't have pie menus or tabbed windows 33 years later, alas):
https://news.ycombinator.com/item?id=18837730
>That's how I implemented tabbed windows in 1988 for the NeWS window system and UniPress Emacs (aka Gosling Emacs aka Evil Software Hoarder Emacs), which supported multiple windows on NeWS and X11 long before Gnu Emacs did.
There's a screen snapshot of UniPress Emacs with tabbed windows and pie menus, running as the HyperTIES hypermedia authoring tool, on the wikipedia page about tabs:
https://en.wikipedia.org/wiki/Tab_(interface)
https://en.wikipedia.org/wiki/Tab_(interface)#/media/File:HyperTIESAuthoring.jpg
More stuff about tabbed windows in Emacs, the HyperTIES hypermedia browser, the Emacs based HyperTIES authoring tool, and other NeWS implementations of tabbed window frames and window managers:
https://news.ycombinator.com/item?id=18837730
Not only could UniPress Emacs support multiple frames, but it could also support multiple display drivers (like X11, NeWS, SunView, as well as text), and you could disconnect the display and Emacs would keep running, and then reconnect it to another display later, without losing all your work and context. So crashing your window server or disconnecting your modem didn't lose your emacs!
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-win.el
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:
% Annoy the user
%
/^G { % - => -
currenttime NextBeepTime cmptimeval
1 eq { beep } {
gsave
self setcanvas
random 255 mul cvi setpixel
6 setrasteropcode
clippath gsave fill grestore
FlashTime sleep
fill
grestore
} ifelse
currenttime BeepTime NextBeepTime addtimeval pop
} def
% Return the minimum size to keep emacs from core dumping
%
/minsize { % - => w h
/?validate self send
CharWidth 10 mul Border dup add add
LineHeight 5 mul Border dup add add
% XXX: Any smaller and it core dumps!
} def
https://news.ycombinator.com/item?id=20484547
and in 2015:
https://news.ycombinator.com/item?id=10145982
and in 2012:
https://news.ycombinator.com/item?id=4940918
I previously commented and linked to an article I wrote about Bill Joy's Law: "2^(Year-1984) MIPS":
Wow, an interview from Year 1 MIP!
>Bill Joy’s Law: 2^(Year-1984) Million Instructions per Second
>The peak computer speed doubles each year and thus is given by a simple function of time. Specifically, S = 2^(Year-1984), in which S is the peak computer speed attained during each year, expressed in MIPS. -Wikipedia, Joy’s law (computing)
https://en.wikipedia.org/wiki/Joy%27s_law_(computing)
>Introduction: These are some highlights from a prescient talk by Bill Joy in February of 1991.
>“It’s vintage wnj. When assessing wnj-speak, remember Eric Schmidt’s comment that Bill is almost always qualitatively right, but the time scale is sometimes wrong.” -David Hough
>C++++-=: “C++++-= is the new language that is a little more than C++ and a lot less.” -Bill Joy
>In this talk from 1991, Bill Joy predicts a new hypothetical language that he calls “C++++-=”, which adds some things to C++, and takes away some other things. [...]
On Nov 8, 2018, I sent Bill Joy a birthday greeting: "Happy 17,179,869,184 MIPS Birthday, Bill"! (2 to the (year - 1984))
From dgh@dgh Thu Feb 7 12:09:13 1991
Date: Thu, 7 Feb 91 12:07:38 PST
From: dgh@dgh (David Hough)
Subject: Highlights of Bill Joy talk, re-broadcast
This has been given around the world, most recently at the quarterly directors
meeting on 31 Jan. A tape was made that will be available from somebody somewhere
later. It’s vintage wnj. When assessing wnj-speak, remember Eric Schmidt’s comment
that Bill is almost always qualitatively right, but the time scale is sometimes wrong.
John Gage collaborated with Bill. Note that some of the specific Sun and SPARC
projections are confidential.
It was from a Cringely series called NerdTV and the tagline for this episode: Bill Joy -- the father of Berkeley UNIX -- explains why he was fired from the International House of Pancakes.
> an American computer engineer and venture capitalist. He co-founded Sun Microsystems in 1982 along with Scott McNealy, Vinod Khosla, and Andy Bechtolsheim, and served as Chief Scientist and CTO at the company until 2003. He played an integral role in the early development of BSD UNIX while being a graduate student at Berkeley, and he is the original author of the vi text editor.
[1] https://en.wikipedia.org/wiki/Bill_Joy