[comp.unix.questions] What is "sam"?

mkhaw@teknowledge-vaxc.ARPA (Mike Khaw) (07/01/88)

> I actually do use "vi" on my Sun, until I get "sam" running.  (The

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?

breath 'bated,
Mike Khaw
-- 
internet: mkhaw@teknowledge.arpa
uucp:	  {uunet|sun|ucbvax|decwrl|uw-beaver}!mkhaw%teknowledge.arpa
hardcopy: Teknowledge Inc, 1850 Embarcadero Rd, POB 10119, Palo Alto, CA 94303

gwyn@brl-smoke.ARPA (Doug Gwyn ) (07/02/88)

In article <23552@teknowledge-vaxc.ARPA> mkhaw@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.