Re: What does “grep” stand for?

2015-11-06 Thread Larry Hudson via Python-list

On 11/06/2015 05:25 AM, William Ray Wing wrote:



On Nov 5, 2015, at 10:36 PM, Larry Hudson via Python-list 
 wrote:


[snip]

You’re not REALLY an old timer unless you’ve used TECO.

-Bill


Agreed.  I'm not really and old-timer, just old (I'm 78).

My first exposure to computers was the MITS Altair, (around late '75) and my computer use has 
always been hobby-oriented, never professional.  I only know of TECO by reputation, not 
experience.   :-)


 -=- Larry -=-

--
https://mail.python.org/mailman/listinfo/python-list


Re: What does “grep” stand for?

2015-11-06 Thread William Ray Wing

> On Nov 5, 2015, at 10:36 PM, Larry Hudson via Python-list 
>  wrote:
> 
> On 11/05/2015 05:18 PM, Dennis Lee Bieber wrote:
>> On Thu, 5 Nov 2015 20:19:39 + (UTC), Grant Edwards
>>  declaimed the following:
>> 
>>> Though I used a line-editor for a while on VMS, I was never very good
>>> at it, and abanded it for a full-screen editor at he first
>>> opportunity.  But, if you ever get a chance to watching somebody who
>>> _is_ good at 'ed', it's something you'll remember...
>> 
>>  I didn't convert to EDT until DEC dropped SOS... And then shortly later
>> I keymapped the Blaise ([Alcor] Pascal) editor on the TRS-80 Mod-III to
>> replicate EDT (as much as possible, given only three function keys on the
>> numeric pad)
>> 
>>  The Amiga used to have two standard editors -- a screen editor and a
>> line editor; as I recall the line editor supported a file window, so one
>> could edit large files by making a single direction pass using a smaller
>> window and a script. Later the screen editor gained ARexx support, so one
>> could script it using ARexx. (And by then they also included a form of
>> microEMACS, my C compiler had a look-alike vi editor... and a later C
>> compiler had another editor integrated to the compiler so that error
>> message reports could trigger the editor to open the file and move to the
>> error position)
>> 
> Anyone besides me remember the CP/M editor Mince (Mince Is Not Complete 
> EMACS)?
> It was an emacs-like editor, without any e-Lisp or other way of extending it. 
>  I believe it was my first exposure to a screen-oriented editor.  I quite 
> liked it at that time (but that was a looonnng time ago!)
> 
> -=- Larry -=-
> 
> -- 
> https://mail.python.org/mailman/listinfo/python-list

You’re not REALLY an old timer unless you’ve used TECO.

-Bill

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: What does ???grep??? stand for?

2015-11-06 Thread Grant Edwards
On 2015-11-06, Dennis Lee Bieber  wrote:
> On Thu, 5 Nov 2015 20:19:39 + (UTC), Grant Edwards
> declaimed the following:
>
>>Though I used a line-editor for a while on VMS, I was never very good
>>at it, and abanded it for a full-screen editor at he first
>>opportunity.  But, if you ever get a chance to watching somebody who
>>_is_ good at 'ed', it's something you'll remember...
>
>   I didn't convert to EDT until DEC dropped SOS...

Yes! Son of Stopgap!  I had completely forgotten the name...  And then
I think Eve came after EDT.  That was about where I switched to Unix.

--
Grant

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: What does “grep” stand for?

2015-11-05 Thread Dan Sommers
On Thu, 05 Nov 2015 19:36:11 -0800, Larry Hudson wrote:

> Anyone besides me remember the CP/M editor Mince (Mince Is Not
> Complete EMACS)?  It was an emacs-like editor, without any e-Lisp or
> other way of extending it.  I believe it was my first exposure to a
> screen-oriented editor.  I quite liked it at that time (but that was a
> looonnng time ago!)

I remember CP/M, but not Mince.  Some of the CP/M boxes I used came with
editors tied to their specific video boards; otherwise, it was ed (which
I'm sure was based on the Unix command of the same name) or MicroPro
WordMaster.

Around that same time frame was Programma Improved Editor on an
Apple II.  (Apple PIE.  Get it?)

old'ly yours,
Dan
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: What does “grep” stand for?

2015-11-05 Thread Larry Hudson via Python-list

On 11/05/2015 05:18 PM, Dennis Lee Bieber wrote:

On Thu, 5 Nov 2015 20:19:39 + (UTC), Grant Edwards
 declaimed the following:


Though I used a line-editor for a while on VMS, I was never very good
at it, and abanded it for a full-screen editor at he first
opportunity.  But, if you ever get a chance to watching somebody who
_is_ good at 'ed', it's something you'll remember...


I didn't convert to EDT until DEC dropped SOS... And then shortly later
I keymapped the Blaise ([Alcor] Pascal) editor on the TRS-80 Mod-III to
replicate EDT (as much as possible, given only three function keys on the
numeric pad)

The Amiga used to have two standard editors -- a screen editor and a
line editor; as I recall the line editor supported a file window, so one
could edit large files by making a single direction pass using a smaller
window and a script. Later the screen editor gained ARexx support, so one
could script it using ARexx. (And by then they also included a form of
microEMACS, my C compiler had a look-alike vi editor... and a later C
compiler had another editor integrated to the compiler so that error
message reports could trigger the editor to open the file and move to the
error position)


Anyone besides me remember the CP/M editor Mince (Mince Is Not Complete EMACS)?
It was an emacs-like editor, without any e-Lisp or other way of extending it.  I believe it was 
my first exposure to a screen-oriented editor.  I quite liked it at that time (but that was a 
looonnng time ago!)


 -=- Larry -=-

--
https://mail.python.org/mailman/listinfo/python-list


Re: What does “grep” stand for?

2015-11-05 Thread Grant Edwards
On 2015-11-05, Random832  wrote:
> Grant Edwards  writes:
>> On 2015-11-05, Random832  wrote:
>>> Of course, both of those things are also true of ed.
>>
>> Well, maybe not for you.  I knew people who (yonks ago) used 'ed' for
>> regular file editing.  And I remember using the VMS line-editor for
>> regular file editing for a couple years before before a full-screen
>> editor was available.
>
> Er, I think my quoting was unclear.

I think it was more a case of my reading being unclear.  It's pretty
clear upon re-reading what you wrote that you didn't mean that nobody
used 'ed' for regular file editing.

Though I used a line-editor for a while on VMS, I was never very good
at it, and abanded it for a full-screen editor at he first
opportunity.  But, if you ever get a chance to watching somebody who
_is_ good at 'ed', it's something you'll remember...

-- 
Grant Edwards   grant.b.edwardsYow! I want a VEGETARIAN
  at   BURRITO to go ... with
  gmail.comEXTRA MSG!!
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: What does “grep” stand for?

2015-11-05 Thread Random832
Grant Edwards  writes:
> On 2015-11-05, Random832  wrote:
>> Of course, both of those things are also true of ed.
>
> Well, maybe not for you.  I knew people who (yonks ago) used 'ed' for
> regular file editing.  And I remember using the VMS line-editor for
> regular file editing for a couple years before before a full-screen
> editor was available.

Er, I think my quoting was unclear. I meant the two features he
mentioned (not loading the whole file in memory, and accepting commands
from a redirected input file) applied.

Of course, AIUI ed had always _also_ been used for scripts. But I never
meant to imply that it wasn't used as an interactive editor, at least
before vi came around.

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: What does “grep” stand for?

2015-11-05 Thread Grant Edwards
On 2015-11-05, Random832  wrote:
> Chris Angelico  writes:

>> As someone who grew up on MS-DOS, I'd like to mention that EDLIN's
>> value wasn't in the obvious places. There were two features it had
>> that most other editors didn't: firstly, it would read only as much
>> of the file as it needed, so you could edit a file larger than
>> available memory; and secondly, all commands came from stdin, which
>> could be redirected - making it a poor man's 'sed'. Using EDLIN for
>> regular file editing was never the normal thing.
>
> Of course, both of those things are also true of ed.

Well, maybe not for you.  I knew people who (yonks ago) used 'ed' for
regular file editing.  And I remember using the VMS line-editor for
regular file editing for a couple years before before a full-screen
editor was available.

-- 
Grant Edwards   grant.b.edwardsYow! I always have fun
  at   because I'm out of my
  gmail.commind!!!
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: What does “grep” stand for?

2015-11-05 Thread Random832
Chris Angelico  writes:
> As someone who grew up on MS-DOS, I'd like to mention that EDLIN's
> value wasn't in the obvious places. There were two features it had
> that most other editors didn't: firstly, it would read only as much of
> the file as it needed, so you could edit a file larger than available
> memory; and secondly, all commands came from stdin, which could be
> redirected - making it a poor man's 'sed'. Using EDLIN for regular
> file editing was never the normal thing.

Of course, both of those things are also true of ed.

And I found it a bit interesting that use in scripts was mentioned as a
contrast between sed and ed, when the original way patches were
distributed (and diff still has an option to generate these) was as ed
scripts.

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: What does “grep” stand for?

2015-11-05 Thread Chris Angelico
On Thu, Nov 5, 2015 at 6:32 PM, Christian Gollwitzer  wrote:
> The point I'm so amused is, that MS has not felt the need to ship a real
> editor, and also cut back on most of the other tools that make computing,
> even on commandlines, a pleasant experience. Readline? Tab-Completion? I
> read a magazine called "DOS", where they scripted the hell out of
> .BAT-files. When they first showed an article about bash programming, I was
> really jealous that the people on these strange, exotic OSes had such a
> complete programming language at their disposal. Now I can't imagine giving
> it back ever.

I don't remember whether DOS 3.x had it, but we upgraded to MS-DOS 5.0
fairly early in my life, and that's most of what I remember. In that
version, we had a thing called DOSKey, which gave you command history
and some editing keys (not nearly as rich as readline, of course, but
good enough for a lot of work); tab completion was an astonishing new
feature when I first met a bash-derived shell. And yes, astonishing.
I'd thought that GUIs had this advantage over command lines in that
long file names (especially with spaces and such) didn't cost you
anything, since you simply click to select; I somewhat resented them
for it. And then, wow, tab completion! You type the beginning of the
name and it fills in the rest!

>> Fast forward a decade or two, and I'm working on a MUD server for a
>> friend. It incorporates an editor that can be used on a dumb telnet
>> connection - and it's line based again. So there's clearly some value
>> here :) Visual editors get the lion's share of actual editing work,
>> but in special circumstances, it is nice to have a quick little
>> ed-like program around.
>
> In this case I'd copy the file to the local machine and sync it using rsync
> or git. It's almost as terse in terms of bandwidth as the manual editing
> commands, but a lot more comfortable.

That server didn't allow rsync/git; I think they didn't use git, and
rsync probably would have meant setting up duplicate Unix accounts for
everyone that paralleled the permissions they had on the MUD itself.
On my own server, I don't have any fine-grained permissions (either
you're allowed to edit files, or you're not), so I have a much simpler
system: you type "edit some_file_name" and it sends you the contents
of the file in a way that makes the client pop up an editor. Hit Save
in the editor, and it sends the file back. Pretty easy. But still,
there _are_ good uses for a line-based editor, even if they are rare.

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: What does “grep” stand for?

2015-11-04 Thread Christian Gollwitzer

Am 05.11.15 um 01:42 schrieb Chris Angelico:

On Thu, Nov 5, 2015 at 6:38 AM, Christian Gollwitzer  wrote:
As someone who grew up on MS-DOS, I'd like to mention that EDLIN's
value wasn't in the obvious places. There were two features it had
that most other editors didn't: firstly, it would read only as much of
the file as it needed, so you could edit a file larger than available
memory; and secondly, all commands came from stdin, which could be
redirected - making it a poor man's 'sed'. Using EDLIN for regular
file editing was never the normal thing.


I also grew up with MSDOS, albeit some later version (3.0 was the first, 
I think I remember). I knew that EDLIN existed, but never ever have used 
it. On my first "own" (actually my father's) machine, the Amstrad 
PC1512, there was a preinstalled GUI working environment called GEM from 
Digital Research. The DOS commandline was used for configuring and 
booting the system, but never for editing files. I had used copy con: to 
create a file. If I'm not mistaken, DR shipped some "visual" editor for 
DOS with it as an addition.


The point I'm so amused is, that MS has not felt the need to ship a real 
editor, and also cut back on most of the other tools that make 
computing, even on commandlines, a pleasant experience. Readline? 
Tab-Completion? I read a magazine called "DOS", where they scripted the 
hell out of .BAT-files. When they first showed an article about bash 
programming, I was really jealous that the people on these strange, 
exotic OSes had such a complete programming language at their disposal. 
Now I can't imagine giving it back ever.




Fast forward a decade or two, and I'm working on a MUD server for a
friend. It incorporates an editor that can be used on a dumb telnet
connection - and it's line based again. So there's clearly some value
here :) Visual editors get the lion's share of actual editing work,
but in special circumstances, it is nice to have a quick little
ed-like program around.


In this case I'd copy the file to the local machine and sync it using 
rsync or git. It's almost as terse in terms of bandwidth as the manual 
editing commands, but a lot more comfortable.


Christian
--
https://mail.python.org/mailman/listinfo/python-list


Re: What does “grep” stand for?

2015-11-04 Thread Chris Angelico
On Thu, Nov 5, 2015 at 6:38 AM, Christian Gollwitzer  wrote:
> Am 04.11.15 um 19:24 schrieb Ben Finney:
>>
>> The name is a mnemonic for a compound command in ‘ed’ [0], a text editor
>> that pre-dates extravagant luxuries like “presenting a full screen of
>> text at one time”.
>>
>>  [... lots of fun facts ...]
>
>
> Here is another fun fact: The convincing UI of ed was actually so widely
> applied, that even Microsoft included a similar editor into MSDOS, called
> EDLIN. EDLIN, of course, was a bastardized version of ed that could do much
> less and also lacked regular expressions. Needless to say that the mighty
> "VIsual" editor was out 5 years before MSDOS shipped EDLIN as the only
> editor...
>
> In contrast to ed, the stream editor "sed" is used multiple times avery day
> in a typical Unix session inside shell scripts to perform automated text
> processing tasks, including regex replacement.

As someone who grew up on MS-DOS, I'd like to mention that EDLIN's
value wasn't in the obvious places. There were two features it had
that most other editors didn't: firstly, it would read only as much of
the file as it needed, so you could edit a file larger than available
memory; and secondly, all commands came from stdin, which could be
redirected - making it a poor man's 'sed'. Using EDLIN for regular
file editing was never the normal thing.

Fast forward a decade or two, and I'm working on a MUD server for a
friend. It incorporates an editor that can be used on a dumb telnet
connection - and it's line based again. So there's clearly some value
here :) Visual editors get the lion's share of actual editing work,
but in special circumstances, it is nice to have a quick little
ed-like program around.

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: What does “grep” stand for?

2015-11-04 Thread Christian Gollwitzer

Am 04.11.15 um 19:24 schrieb Ben Finney:

The name is a mnemonic for a compound command in ‘ed’ [0], a text editor
that pre-dates extravagant luxuries like “presenting a full screen of
text at one time”.

 [... lots of fun facts ...]


Here is another fun fact: The convincing UI of ed was actually so widely 
applied, that even Microsoft included a similar editor into MSDOS, 
called EDLIN. EDLIN, of course, was a bastardized version of ed that 
could do much less and also lacked regular expressions. Needless to say 
that the mighty "VIsual" editor was out 5 years before MSDOS shipped 
EDLIN as the only editor...


In contrast to ed, the stream editor "sed" is used multiple times avery 
day in a typical Unix session inside shell scripts to perform automated 
text processing tasks, including regex replacement.


Christian
--
https://mail.python.org/mailman/listinfo/python-list


Re: What does “grep” stand for? (was: Regular expressions)

2015-11-04 Thread Tim Chase
On 2015-11-05 05:24, Ben Finney wrote:
> A very common command to issue, then, is “actually show me the line
> of text I just specified”; the ‘p’ (for “print”) command.
> 
> Another very common command is “find the text matching this pattern
> and perform these commands on it”, which is ‘g’ (for “global”). The
> ‘g’ command addresses text matching a regular expression pattern,
> delimited by slashes ‘/’.
> 
> So, for users with feeble human brains incapable of remembering
> perfectly the entire content of the text while it changes and
> therefore not always knowing exactly which lines they wanted to
> operate on without seeing them all the time, a very frequent
> combination command is:
> 
> g/RE/p

Though since the default action for g/ is to print the line, I've
always wondered why the utility wasn't named just "gre"

   $ ed myfile.txt
   g/re
   [matching lines follow]
   q
   $

-tkc
(the goofball behind https://twitter.com/ed1conf )




-- 
https://mail.python.org/mailman/listinfo/python-list


What does “grep” stand for? (was: Regular expressions)

2015-11-04 Thread Ben Finney
Steven D'Aprano  writes:

> On Wednesday 04 November 2015 13:55, Dan Sommers wrote:
>
> > Its very name indicates that its default mode most certainly is
> > regular expressions.
>
> I don't even know what grep stands for. 

“grep” stands for ‘g/RE/p’.

The name is a mnemonic for a compound command in ‘ed’ [0], a text editor
that pre-dates extravagant luxuries like “presenting a full screen of
text at one time”.


In an ‘ed’ session, the user is obliged to keep mental track of the
current line in the text buffer, and even what that text contains during
the session.

Single-letter commands, with various terse parameters such as the range
of lines or some text to insert, are issued at a command prompt one
after another.

For these reasons, the manual page describes ‘ed’ as a “line-oriented
text editor”. Everything is done by specifying lines, blindly, to
commands which then operate on those lines.

The name of the ‘vi’ editor means “visual interface (to a text editor)”,
to proudly declare the innovation of a full screen of text that updates
content during the editing session. That was not available for users of
‘ed’.


A very common command to issue, then, is “actually show me the line of
text I just specified”; the ‘p’ (for “print”) command.

Another very common command is “find the text matching this pattern and
perform these commands on it”, which is ‘g’ (for “global”). The ‘g’
command addresses text matching a regular expression pattern, delimited
by slashes ‘/’.

So, for users with feeble human brains incapable of remembering
perfectly the entire content of the text while it changes and therefore
not always knowing exactly which lines they wanted to operate on without
seeing them all the time, a very frequent combination command is:

g/RE/p

meaning “find lines forward from here that match the regular expression
pattern “RE”, and do nothing to those lines except print them to
standard output”.


Wikipedia has useful pages on both ‘grep’ and ‘ed’
https://en.wikipedia.org/wiki/Grep>
https://en.wikipedia.org/wiki/Ed_%28text_editor%29>.

You can see a full specification of how the ‘ed’ interface is to behave
as part of the “Open Group Base Specifications Issue 7”, which is the
specification for Unix.

http://pubs.opengroup.org/onlinepubs/9699919799/utilities/ed.html>

See the manual for GNU ed which includes an example session to
appreciate just how far things have come.


https://www.gnu.org/software/ed/manual/ed_manual.html#Introduction-to-line-editing>

Of course, if you yearn for the days of minimalist purity, nothing beats
Ed, man! !man ed


[0] The standard text editor.
https://www.gnu.org/fun/jokes/ed-msg.txt>

-- 
 \ “If you can't annoy somebody there is little point in writing.” |
  `\—Kingsley Amis |
_o__)  |
Ben Finney

-- 
https://mail.python.org/mailman/listinfo/python-list