What is "sam"? (was Re: vi vs emacs in a student environment)

Doug Gwyn gwyn at brl-smoke.ARPA
Sat Jul 2 05:30:31 AEST 1988


In article <23552 at teknowledge-vaxc.ARPA> mkhaw at teknowledge-vaxc.ARPA (Mike Khaw) writes:
>OK, so what's "sam"?  How is it better than both vi and emacs?  Can
>the rest of us get it if it's so wonderful?  If it isn't freeware,
>how much is it?

"sam" is Rob Pike's text editor.  In "dumb terminal" mode, it somewhat
resembles "ed" except that "dot" is a region, not a position, and there
is a global apply operator.  In this mode, "sam"'s main advantage is a
powerful regular expression capability.  When used with a mouse-driven
interactive front end, e.g. on a 5620 or 630, it provides extremely
convenient snarf/cut/paste/send, file menus, overlapping concurrent
windows (into the same or different buffers), 3-way scroll bar, exchange
of text with other terminal layers, etc.  It's the layers mode that
really stands out as an improvement over the conventional CRT orientation
of "screen editors" such as "vi" and EMACS.  I know you can add some
degree of mouse support to screen editors (we've done this with JOVE),
but it's not the same thing.

As a possible indication of relative merit of the various UNIX text
editors, I was told by a reliable source that Ken Thompson had
resisted switching from "ed" to any of the newer editors, until "sam"
came along.  (I suppose he just didn't perceive sufficient benefit to
be worth the bother.)

"sam" is included in the AT&T UNIX System ToolChest's "dmd-pgmg"
package (along with Dave Prosser's "myx" spiffy terminal program
for 5620s).  I don't remember how much that package cost but I
think it was only a few hundred $$ (complete sources).  I think "sam"
is also shipped with 9th Edition UNIX, so if you have that, look in
the manual.

Of course, there probably are people who really do prefer dumb CRTs
and other editors.  More power to them.



More information about the Comp.unix.questions mailing list