The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
* [TUHS] Unix taste
@ 2014-08-02 16:07 Ed
  0 siblings, 0 replies; 7+ messages in thread
From: Ed @ 2014-08-02 16:07 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1381 bytes --]

Arrow keys? Vi does arrow keys? But then I'd have to move my hand from home.
That's not vi.




--
Ed Skinner, ed at flat5.net, http://www.flat5.net/

-------- Original message --------
From: Doug McIlroy <doug@cs.dartmouth.edu> 
Date: 08/02/2014  8:38 AM  (GMT-07:00) 
To: tuhs at minnie.tuhs.org,lm at mcvoy.com 
Subject: Re: [TUHS] Unix taste 
 
> So Doug, ed?  Or what?

Yes, ed for small things. It loads instantly and works in the
current window without disturbing it. And it has been ingrained
in my fingers since Multics days.

But for heavy duty work, I use sam, in Windows as well as Linux.
Sam marries ed to screen editing much more cleanly than vi.
It has recursive global commands and infinite undo. Like qed
(whence came ed's syntax) and Larry's xvi it can work on
several files (or even several areas in one file) at once.


I would guess that a vi adept would miss having arrow keys
as well as the mouse, but probably not much else. Sam offers
one answer for my question about examples of taste reigning
in featurism during the course of Unix evolution.

Doug
_______________________________________________
TUHS mailing list
TUHS at minnie.tuhs.org
https://minnie.tuhs.org/mailman/listinfo/tuhs

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://minnie.tuhs.org/pipermail/tuhs/attachments/20140802/9c3b641e/attachment.html>


^ permalink raw reply	[flat|nested] 7+ messages in thread
* [TUHS] Unix taste
@ 2014-08-14  4:34 Norman Wilson
  2014-08-14  4:49 ` A. P. Garcia
  0 siblings, 1 reply; 7+ messages in thread
From: Norman Wilson @ 2014-08-14  4:34 UTC (permalink / raw)


Doug McIlroy:

  The single-token rule meant that, if you wanted to supply an
  option to wc in the pipeline
          ls > wc >
  you couldn't write
          ls > wc -l >
  as one would expect, but instead had to write
          ls > "wc -l" >
  Yet a quoted "wc -l" as a bare command or (I suspect) as the
  first command in a pipeline would lead to "command not found".
  What a mess!

======

Then as now, a quoted "wc -l" would be taken by the shell
to be a single world, so

	"wc -l" file

would be a request to find a file named "wc -l" (without
the quotes but with the embedded blank) somewhere in the
search path, and execute it with argv[0] = "wc -l" and
argv[1] = "file".  But the shell's parser bound only the
word following > or < to the operator, so the command had
to be quoted (if it had arguments) to make it a single word.

So in the old syntax, if you needed to quote an argument
of a command that was part of a pipeline but not at the
head, you'd have to embed quotes within quotes; e.g.

	ls > "grep '[0-9]'" >

Decidedly a quick hack, just like the original implementation
of fork(2) (which was, approximately, swap the current process
out, but keep the in-core copy, and give one of the two a new
process ID and process-table entry).  Though unlike the original
fork, the original pipeline syntax was rough enough to be
worth fixing early on.

As a side note, when I was writing my earlier message, I was
going to construct an example using wc -l, until I checked the
manual and discovered that when pipelines were invented wc
didn't yet take options.  I also thought about an example
using grep, except grep hadn't appeared yet either.  Pipelines
(especially once they were attractive and convenient to use)
made a bigger difference than we remember in how commands
worked and which commands were useful.

And of course Doug gets at least as much credit as Ken for
changing our lives with all that.

Norman Wilson
Toronto ON



^ permalink raw reply	[flat|nested] 7+ messages in thread
* [TUHS] Unix taste
@ 2014-08-08  3:27 Noel Chiappa
  0 siblings, 0 replies; 7+ messages in thread
From: Noel Chiappa @ 2014-08-08  3:27 UTC (permalink / raw)


    > From: Doug McIlroy <doug at cs.dartmouth.edu>

    > Yet a quoted "wc -l" as a bare command or (I suspect) as the first
    > command in a pipeline would lead to "command not found".

I don't know about earlier versions of Unix, but FWLIW on V6 it does indeed
barf in both of these cases (just tried it).

	Noel



^ permalink raw reply	[flat|nested] 7+ messages in thread
* [TUHS] Unix taste
@ 2014-08-08  2:12 Doug McIlroy
  0 siblings, 0 replies; 7+ messages in thread
From: Doug McIlroy @ 2014-08-08  2:12 UTC (permalink / raw)


Thanks, Norman, for reminding me of the actual pipe syntax in v3.
This reinforces the title of one history item on Dennis's
website: "Why Ken had to invent |".

I'd suppressed all memory of the fact that in the pipeline
        ... > cmd > ...
cmd had to be a single token. That was certainly not the intent
of my original proposal. It is understandable, though, as a
minimal hack to the existing shell syntax and its parser, which
accepted occurrences of <token and >token anywhere in a command.

The single-token rule meant that, if you wanted to supply an
option to wc in the pipeline
        ls > wc >
you couldn't write
        ls > wc -l >
as one would expect, but instead had to write
        ls > "wc -l" >
Yet a quoted "wc -l" as a bare command or (I suspect) as the
first command in a pipeline would lead to "command not found".
What a mess!

Soon after, Ken was inspired to invent the | operator, lest
he should have to describe an ugly duckling in public at an
upcoming symposium in London.

Is it possible that the ugliness of the token hack was the
precipitating factor that gave us the sublime | ?  But for
the hack, perhaps we'd still be writing
        ls > wc >

Doug



^ permalink raw reply	[flat|nested] 7+ messages in thread
* [TUHS] Unix taste
@ 2014-08-02 15:38 Doug McIlroy
  2014-08-02 16:07 ` John Cowan
  0 siblings, 1 reply; 7+ messages in thread
From: Doug McIlroy @ 2014-08-02 15:38 UTC (permalink / raw)


> So Doug, ed?  Or what?

Yes, ed for small things. It loads instantly and works in the
current window without disturbing it. And it has been ingrained
in my fingers since Multics days.

But for heavy duty work, I use sam, in Windows as well as Linux.
Sam marries ed to screen editing much more cleanly than vi.
It has recursive global commands and infinite undo. Like qed
(whence came ed's syntax) and Larry's xvi it can work on
several files (or even several areas in one file) at once.


I would guess that a vi adept would miss having arrow keys
as well as the mouse, but probably not much else. Sam offers
one answer for my question about examples of taste reigning
in featurism during the course of Unix evolution.

Doug



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2014-08-14  4:49 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-02 16:07 [TUHS] Unix taste Ed
  -- strict thread matches above, loose matches on Subject: below --
2014-08-14  4:34 Norman Wilson
2014-08-14  4:49 ` A. P. Garcia
2014-08-08  3:27 Noel Chiappa
2014-08-08  2:12 Doug McIlroy
2014-08-02 15:38 Doug McIlroy
2014-08-02 16:07 ` John Cowan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).