Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #98121 > unrolled thread

Regular expressions

Started bySeymore4Head <Seymore4Head@Hotmail.invalid>
First post2015-11-02 20:09 -0500
Last post2015-11-03 22:15 +0000
Articles 20 on this page of 106 — 30 participants

Back to article view | Back to comp.lang.python


Contents

  Regular expressions Seymore4Head <Seymore4Head@Hotmail.invalid> - 2015-11-02 20:09 -0500
    Re: Regular expressions MRAB <python@mrabarnett.plus.com> - 2015-11-03 01:19 +0000
      Re: Regular expressions Seymore4Head <Seymore4Head@Hotmail.invalid> - 2015-11-02 22:17 -0500
    Re: Regular expressions Tim Chase <python.list@tim.thechases.com> - 2015-11-02 20:42 -0600
      Re: Regular expressions Seymore4Head <Seymore4Head@Hotmail.invalid> - 2015-11-02 22:17 -0500
        Re: Regular expressions Joel Goldstick <joel.goldstick@gmail.com> - 2015-11-02 22:58 -0500
          Re: Regular expressions rurpy@yahoo.com - 2015-11-02 20:23 -0800
            Re: Regular expressions Michael Torrie <torriem@gmail.com> - 2015-11-02 21:38 -0700
              Re: Regular expressions rurpy@yahoo.com - 2015-11-03 16:33 -0800
                Re: Regular expressions Michael Torrie <torriem@gmail.com> - 2015-11-03 19:04 -0700
                  Re: Regular expressions Dan Sommers <dan@tombstonezero.net> - 2015-11-04 02:55 +0000
                    Re: Regular expressions Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2015-11-04 14:23 +1100
                      Re: Regular expressions Michael Torrie <torriem@gmail.com> - 2015-11-03 20:47 -0700
                        Re: Regular expressions Grant Edwards <invalid@invalid.invalid> - 2015-11-04 13:27 +0000
                      Re: Regular expressions Nobody <nobody@nowhere.invalid> - 2015-11-04 05:05 +0000
                      Re: Regular expressions Peter Otten <__peter__@web.de> - 2015-11-04 09:57 +0100
                        Re: Regular expressions Steven D'Aprano <steve@pearwood.info> - 2015-11-05 13:28 +1100
                          Re: Regular expressions Tim Chase <python.list@tim.thechases.com> - 2015-11-04 20:48 -0600
                          Re: Regular expressions Ben Finney <ben+python@benfinney.id.au> - 2015-11-05 14:03 +1100
                          Re: Regular expressions Peter Otten <__peter__@web.de> - 2015-11-05 09:33 +0100
                            Re: Regular expressions Steven D'Aprano <steve@pearwood.info> - 2015-11-05 23:05 +1100
                              Re: Regular expressions Tim Chase <python.list@tim.thechases.com> - 2015-11-05 08:00 -0600
                          Re: Regular expressions Albert van der Horst <albert@spenarnc.xs4all.nl> - 2015-11-05 13:39 +0000
                      Re: Regular expressions Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2015-11-04 08:00 -0500
                      Re: Regular expressions Michael Torrie <torriem@gmail.com> - 2015-11-04 08:13 -0700
                        Re: Regular expressions Seymore4Head <Seymore4Head@Hotmail.invalid> - 2015-11-04 18:00 -0500
                          Re: Regular expressions rurpy@yahoo.com - 2015-11-04 16:24 -0800
                            Re: Regular expressions Steven D'Aprano <steve@pearwood.info> - 2015-11-05 13:24 +1100
                              Re: Regular expressions rurpy@yahoo.com - 2015-11-04 21:59 -0800
                                Re: Regular expressions Christian Gollwitzer <auriocus@gmx.de> - 2015-11-05 09:18 +0100
                                  Re: Regular expressions rurpy@yahoo.com - 2015-11-06 11:52 -0800
                                    Re: Regular expressions Christian Gollwitzer <auriocus@gmx.de> - 2015-11-06 21:36 +0100
                                      Re: Regular expressions Larry Martell <larry.martell@gmail.com> - 2015-11-06 15:42 -0500
                            Re: Regular expressions Chris Angelico <rosuav@gmail.com> - 2015-11-05 11:34 +1100
                              Re: Regular expressions rurpy@yahoo.com - 2015-11-04 22:27 -0800
                      Re: Regular expressions Tim Chase <python.list@tim.thechases.com> - 2015-11-04 09:42 -0600
                        Re: Regular expressions Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2015-11-05 20:55 +1300
                          Re: Regular expressions Chris Angelico <rosuav@gmail.com> - 2015-11-05 19:06 +1100
                      What does “grep” stand for? (was: Regular expressions) Ben Finney <ben+python@benfinney.id.au> - 2015-11-05 05:24 +1100
                        Re: What does “grep” stand for? Christian Gollwitzer <auriocus@gmx.de> - 2015-11-04 20:38 +0100
                          Re: What does “grep” stand for? Chris Angelico <rosuav@gmail.com> - 2015-11-05 11:42 +1100
                            Re: What does “grep” stand for? Christian Gollwitzer <auriocus@gmx.de> - 2015-11-05 08:32 +0100
                              Re: What does “grep” stand for? Chris Angelico <rosuav@gmail.com> - 2015-11-05 19:00 +1100
                          Re: What does “grep” stand for? Random832 <random832@fastmail.com> - 2015-11-05 10:19 -0500
                            Re: What does “grep” stand for? Grant Edwards <invalid@invalid.invalid> - 2015-11-05 18:29 +0000
                              Re: What does “grep” stand for? Random832 <random832@fastmail.com> - 2015-11-05 14:56 -0500
                                Re: What does “grep” stand for? Grant Edwards <invalid@invalid.invalid> - 2015-11-05 20:19 +0000
                                  Re: What does “grep” stand for? Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2015-11-05 20:18 -0500
                                    Re: What does “grep” stand for? Larry Hudson <orgnut@yahoo.com> - 2015-11-05 19:36 -0800
                                      Re: What does “grep” stand for? Dan Sommers <dan@tombstonezero.net> - 2015-11-06 05:31 +0000
                                      Re: What does “grep” stand for? William Ray Wing <wrw@mac.com> - 2015-11-06 08:25 -0500
                                        Re: What does “grep” stand for? Larry Hudson <orgnut@yahoo.com> - 2015-11-06 19:21 -0800
                                    Re: What does ???grep??? stand for? Grant Edwards <invalid@invalid.invalid> - 2015-11-06 14:15 +0000
                                      Re: What does ???grep??? stand for? Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2015-11-06 20:03 -0500
                      Re: What does “grep” stand for? (was: Regular expressions) Tim Chase <python.list@tim.thechases.com> - 2015-11-04 13:05 -0600
                      Re: Regular expressions Terry Reedy <tjreedy@udel.edu> - 2015-11-04 18:08 -0500
                        Re: Regular expressions Seymore4Head <Seymore4Head@Hotmail.invalid> - 2015-11-04 18:29 -0500
                Re: Regular expressions Tim Chase <python.list@tim.thechases.com> - 2015-11-03 21:12 -0600
                Re: Regular expressions Chris Angelico <rosuav@gmail.com> - 2015-11-04 14:26 +1100
                Re: Regular expressions Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2015-11-04 14:48 +1100
                  Re: Regular expressions Christian Gollwitzer <auriocus@gmx.de> - 2015-11-04 08:21 +0100
                    Re: Regular expressions Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2015-11-04 19:47 +1100
                      Re: Regular expressions rurpy@yahoo.com - 2015-11-04 06:43 -0800
                  Re: Regular expressions rurpy@yahoo.com - 2015-11-04 06:38 -0800
                    Re: Regular expressions Chris Angelico <rosuav@gmail.com> - 2015-11-05 01:52 +1100
                      Re: Regular expressions rurpy@yahoo.com - 2015-11-04 16:13 -0800
                        Re: Regular expressions Chris Angelico <rosuav@gmail.com> - 2015-11-05 11:33 +1100
                          Re: Regular expressions rurpy@yahoo.com - 2015-11-04 21:42 -0800
                        Re: Regular expressions Steven D'Aprano <steve@pearwood.info> - 2015-11-05 13:26 +1100
                          Re: Regular expressions Ben Finney <ben+python@benfinney.id.au> - 2015-11-05 14:07 +1100
                          Re: Regular expressions rurpy@yahoo.com - 2015-11-04 21:54 -0800
                        Re: Regular expressions Antoon Pardon <antoon.pardon@rece.vub.ac.be> - 2015-11-05 10:14 +0100
                  Re: Regular expressions Seymore4Head <Seymore4Head@Hotmail.invalid> - 2015-11-04 18:02 -0500
                    Re: Regular expressions Steven D'Aprano <steve@pearwood.info> - 2015-11-05 11:54 +1100
                      Re: Regular expressions Seymore4Head <Seymore4Head@Hotmail.invalid> - 2015-11-05 10:07 -0500
                        Re: Regular expressions rurpy@yahoo.com - 2015-11-06 12:46 -0800
            Re: Regular expressions Steven D'Aprano <steve@pearwood.info> - 2015-11-03 18:15 +1100
              Re: Regular expressions Nick Sarbicki <nick.a.sarbicki@gmail.com> - 2015-11-03 08:43 +0000
              Re: Regular expressions rurpy@yahoo.com - 2015-11-03 16:22 -0800
        Re: Regular expressions Denis McMahon <denismfmcmahon@gmail.com> - 2015-11-03 12:38 +0000
        Re: Regular expressions Tim Chase <python.list@tim.thechases.com> - 2015-11-03 05:53 -0600
        Re: Regular expressions Joel Goldstick <joel.goldstick@gmail.com> - 2015-11-03 10:34 -0500
          Re: Regular expressions Seymore4Head <Seymore4Head@Hotmail.invalid> - 2015-11-03 11:10 -0500
            Re: Regular expressions Chris Angelico <rosuav@gmail.com> - 2015-11-04 03:20 +1100
              Re: Regular expressions Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2015-11-04 14:35 +1100
                Re: Regular expressions Antoon Pardon <antoon.pardon@rece.vub.ac.be> - 2015-11-04 12:41 +0100
      Re: Regular expressions Grant Edwards <invalid@invalid.invalid> - 2015-11-03 14:56 +0000
    Re: Regular expressions Michael Torrie <torriem@gmail.com> - 2015-11-02 20:51 -0700
      Re: Regular expressions rurpy@yahoo.com - 2015-11-02 20:23 -0800
        Re: Regular expressions Michael Torrie <torriem@gmail.com> - 2015-11-02 21:33 -0700
        Re: Regular expressions Robin Koch <robin.koch@t-online.de> - 2015-11-03 23:58 +0100
    Re: Regular expressions Peter Otten <__peter__@web.de> - 2015-11-03 10:25 +0100
    Re: Regular expressions Tim Chase <python.list@tim.thechases.com> - 2015-11-03 05:50 -0600
    Re: Regular expressions Peter Otten <__peter__@web.de> - 2015-11-03 15:00 +0100
      Re: Regular expressions Jussi Piitulainen <harvesting@makes.email.invalid> - 2015-11-03 17:12 +0200
        Irregular last line in a text file, was Re: Regular expressions Peter Otten <__peter__@web.de> - 2015-11-03 16:35 +0100
          Re: Irregular last line in a text file, was Re: Regular expressions Jussi Piitulainen <harvesting@makes.email.invalid> - 2015-11-03 18:42 +0200
        Re: Irregular last line in a text file, was Re: Regular expressions Tim Chase <python.list@tim.thechases.com> - 2015-11-03 10:56 -0600
          Re: Irregular last line in a text file, was Re: Regular expressions Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2015-11-04 14:39 +1100
            Re: Irregular last line in a text file, was Re: Regular expressions Oscar Benjamin <oscar.j.benjamin@gmail.com> - 2015-11-04 10:07 +0000
            Re: Irregular last line in a text file, was Re: Regular expressions Tim Chase <python.list@tim.thechases.com> - 2015-11-04 09:33 -0600
        Re: Irregular last line in a text file, was Re: Regular expressions Peter Otten <__peter__@web.de> - 2015-11-03 18:44 +0100
        Re: Irregular last line in a text file, was Re: Regular expressions Ian Kelly <ian.g.kelly@gmail.com> - 2015-11-03 11:33 -0700
        Re: Irregular last line in a text file, was Re: Regular expressions Ian Kelly <ian.g.kelly@gmail.com> - 2015-11-03 11:39 -0700
        Re: Irregular last line in a text file, was Re: Regular expressions Tim Chase <python.list@tim.thechases.com> - 2015-11-03 13:45 -0600
          Re: Irregular last line in a text file, was Re: Regular expressions Grant Edwards <invalid@invalid.invalid> - 2015-11-03 22:15 +0000

Page 3 of 6 — ← Prev page 1 2 [3] 4 5 6  Next page →


#98261 — Re: What does “grep” stand for?

FromChris Angelico <rosuav@gmail.com>
Date2015-11-05 11:42 +1100
SubjectRe: What does “grep” stand for?
Message-ID<mailman.38.1446684164.16136.python-list@python.org>
In reply to#98240
On Thu, Nov 5, 2015 at 6:38 AM, Christian Gollwitzer <auriocus@gmx.de> 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

[toc] | [prev] | [next] | [standalone]


#98284 — Re: What does “grep” stand for?

FromChristian Gollwitzer <auriocus@gmx.de>
Date2015-11-05 08:32 +0100
SubjectRe: What does “grep” stand for?
Message-ID<n1f0hv$g3n$1@dont-email.me>
In reply to#98261
Am 05.11.15 um 01:42 schrieb Chris Angelico:
> On Thu, Nov 5, 2015 at 6:38 AM, Christian Gollwitzer <auriocus@gmx.de> 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

[toc] | [prev] | [next] | [standalone]


#98288 — Re: What does “grep” stand for?

FromChris Angelico <rosuav@gmail.com>
Date2015-11-05 19:00 +1100
SubjectRe: What does “grep” stand for?
Message-ID<mailman.46.1446710422.16136.python-list@python.org>
In reply to#98284
On Thu, Nov 5, 2015 at 6:32 PM, Christian Gollwitzer <auriocus@gmx.de> 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

[toc] | [prev] | [next] | [standalone]


#98309 — Re: What does “grep” stand for?

FromRandom832 <random832@fastmail.com>
Date2015-11-05 10:19 -0500
SubjectRe: What does “grep” stand for?
Message-ID<mailman.56.1446736776.16136.python-list@python.org>
In reply to#98240
Chris Angelico <rosuav@gmail.com> 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.

[toc] | [prev] | [next] | [standalone]


#98317 — Re: What does “grep” stand for?

FromGrant Edwards <invalid@invalid.invalid>
Date2015-11-05 18:29 +0000
SubjectRe: What does “grep” stand for?
Message-ID<n1g76u$85u$1@reader1.panix.com>
In reply to#98309
On 2015-11-05, Random832 <random832@fastmail.com> wrote:
> Chris Angelico <rosuav@gmail.com> 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.edwards        Yow! I always have fun
                                  at               because I'm out of my
                              gmail.com            mind!!!

[toc] | [prev] | [next] | [standalone]


#98319 — Re: What does “grep” stand for?

FromRandom832 <random832@fastmail.com>
Date2015-11-05 14:56 -0500
SubjectRe: What does “grep” stand for?
Message-ID<mailman.63.1446753408.16136.python-list@python.org>
In reply to#98317
Grant Edwards <invalid@invalid.invalid> writes:
> On 2015-11-05, Random832 <random832@fastmail.com> 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.

[toc] | [prev] | [next] | [standalone]


#98321 — Re: What does “grep” stand for?

FromGrant Edwards <invalid@invalid.invalid>
Date2015-11-05 20:19 +0000
SubjectRe: What does “grep” stand for?
Message-ID<n1gdkr$mce$1@reader1.panix.com>
In reply to#98319
On 2015-11-05, Random832 <random832@fastmail.com> wrote:
> Grant Edwards <invalid@invalid.invalid> writes:
>> On 2015-11-05, Random832 <random832@fastmail.com> 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.edwards        Yow! I want a VEGETARIAN
                                  at               BURRITO to go ... with
                              gmail.com            EXTRA MSG!!

[toc] | [prev] | [next] | [standalone]


#98325 — Re: What does “grep” stand for?

FromDennis Lee Bieber <wlfraed@ix.netcom.com>
Date2015-11-05 20:18 -0500
SubjectRe: What does “grep” stand for?
Message-ID<mailman.67.1446772690.16136.python-list@python.org>
In reply to#98321
On Thu, 5 Nov 2015 20:19:39 +0000 (UTC), Grant Edwards
<invalid@invalid.invalid> 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)
-- 
	Wulfraed                 Dennis Lee Bieber         AF6VN
    wlfraed@ix.netcom.com    HTTP://wlfraed.home.netcom.com/

[toc] | [prev] | [next] | [standalone]


#98328 — Re: What does “grep” stand for?

FromLarry Hudson <orgnut@yahoo.com>
Date2015-11-05 19:36 -0800
SubjectRe: What does “grep” stand for?
Message-ID<NtKdnfI0w7uxvaHLnZ2dnUU7-cednZ2d@giganews.com>
In reply to#98325
On 11/05/2015 05:18 PM, Dennis Lee Bieber wrote:
> On Thu, 5 Nov 2015 20:19:39 +0000 (UTC), Grant Edwards
> <invalid@invalid.invalid> 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 -=-

[toc] | [prev] | [next] | [standalone]


#98331 — Re: What does “grep” stand for?

FromDan Sommers <dan@tombstonezero.net>
Date2015-11-06 05:31 +0000
SubjectRe: What does “grep” stand for?
Message-ID<n1hdvd$737$1@dont-email.me>
In reply to#98328
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

[toc] | [prev] | [next] | [standalone]


#98356 — Re: What does “grep” stand for?

FromWilliam Ray Wing <wrw@mac.com>
Date2015-11-06 08:25 -0500
SubjectRe: What does “grep” stand for?
Message-ID<mailman.88.1446819949.16136.python-list@python.org>
In reply to#98328
> On Nov 5, 2015, at 10:36 PM, Larry Hudson via Python-list <python-list@python.org> wrote:
> 
> On 11/05/2015 05:18 PM, Dennis Lee Bieber wrote:
>> On Thu, 5 Nov 2015 20:19:39 +0000 (UTC), Grant Edwards
>> <invalid@invalid.invalid> 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

[toc] | [prev] | [next] | [standalone]


#98384 — Re: What does “grep” stand for?

FromLarry Hudson <orgnut@yahoo.com>
Date2015-11-06 19:21 -0800
SubjectRe: What does “grep” stand for?
Message-ID<ZbudnT1XFfKg86DLnZ2dnUU7-T2dnZ2d@giganews.com>
In reply to#98356
On 11/06/2015 05:25 AM, William Ray Wing wrote:
>
>> On Nov 5, 2015, at 10:36 PM, Larry Hudson via Python-list <python-list@python.org> 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 -=-

[toc] | [prev] | [next] | [standalone]


#98355 — Re: What does ???grep??? stand for?

FromGrant Edwards <invalid@invalid.invalid>
Date2015-11-06 14:15 +0000
SubjectRe: What does ???grep??? stand for?
Message-ID<n1icmf$54g$1@reader1.panix.com>
In reply to#98325
On 2015-11-06, Dennis Lee Bieber <wlfraed@ix.netcom.com> wrote:
> On Thu, 5 Nov 2015 20:19:39 +0000 (UTC), Grant Edwards
><invalid@invalid.invalid> 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

[toc] | [prev] | [next] | [standalone]


#98380 — Re: What does ???grep??? stand for?

FromDennis Lee Bieber <wlfraed@ix.netcom.com>
Date2015-11-06 20:03 -0500
SubjectRe: What does ???grep??? stand for?
Message-ID<mailman.101.1446858212.16136.python-list@python.org>
In reply to#98355
On Fri, 6 Nov 2015 14:15:43 +0000 (UTC), Grant Edwards
<invalid@invalid.invalid> declaimed the following:

>On 2015-11-06, Dennis Lee Bieber <wlfraed@ix.netcom.com> wrote:
>> On Thu, 5 Nov 2015 20:19:39 +0000 (UTC), Grant Edwards
>><invalid@invalid.invalid> 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.

	I don't recall if EVE (Extensible VAX Editor) or LSE (Language
Sensitive Editor) was the successor to EDT. The two came out fairly close
together and I never had to learn them as EDT was still available.
-- 
	Wulfraed                 Dennis Lee Bieber         AF6VN
    wlfraed@ix.netcom.com    HTTP://wlfraed.home.netcom.com/

[toc] | [prev] | [next] | [standalone]


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

FromTim Chase <python.list@tim.thechases.com>
Date2015-11-04 13:05 -0600
SubjectRe: What does “grep” stand for? (was: Regular expressions)
Message-ID<mailman.25.1446664035.16136.python-list@python.org>
In reply to#98203
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 )



[toc] | [prev] | [next] | [standalone]


#98253

FromTerry Reedy <tjreedy@udel.edu>
Date2015-11-04 18:08 -0500
Message-ID<mailman.34.1446678541.16136.python-list@python.org>
In reply to#98203
On 11/3/2015 10:23 PM, Steven D'Aprano wrote:

> I don't even know what grep stands for.

Get Regular Expression & Print

-- 
Terry Jan Reedy

[toc] | [prev] | [next] | [standalone]


#98256

FromSeymore4Head <Seymore4Head@Hotmail.invalid>
Date2015-11-04 18:29 -0500
Message-ID<r65l3b11bf221ucuisd4gcbppgc9qb6mfl@4ax.com>
In reply to#98253
On Wed, 4 Nov 2015 18:08:51 -0500, Terry Reedy <tjreedy@udel.edu>
wrote:

>On 11/3/2015 10:23 PM, Steven D'Aprano wrote:
>
>> I don't even know what grep stands for.
>
>Get Regular Expression & Print

Thanks,  I may get around to that eventually.

[toc] | [prev] | [next] | [standalone]


#98200

FromTim Chase <python.list@tim.thechases.com>
Date2015-11-03 21:12 -0600
Message-ID<mailman.1.1446607194.16136.python-list@python.org>
In reply to#98195
On 2015-11-03 19:04, Michael Torrie wrote:
> Grep can use regular expressions (and I do so with it regularly),
> but it's default mode is certainly not regular expressions, and it
> is still very powerful.

I suspect you're thinking of `fgrep` (AKA "grep -F") which uses fixed
strings rather than regular expressions.  By default, `grep` certainly
does use regular expressions:

  tim@linux$ seq 5 | grep "1*"
  tim@bsd$ jot 5 | grep "1*"

will output the entire input, not just lines containing a "1"
followed by an asterisk.

> I've never used regular expressions in a database query language;
> until this moment I didn't know any supported such things in their
> queries.  Good to know.  How you would index for regular
> expressions in queries I don't know.

At least PostgreSQL allows for creating indexes on a particular
regular expression.  E.g. (shooting from the hip so I might have
missed something):

  CREATE TABLE contacts (
   -- ...
   phonenumber VARCHAR(15),
   -- ...
   )
  CREATE INDEX contacts_just_phone_digits_idx
   ON contacts((regexp_replace(phonenumber, '[^0-9]', '')));

  INSERT INTO contacts(..., phonenumber, ...)
   VALUES (..., '800-555-1212', ...)

  SELECT *
  FROM contacts
  WHERE -- should use contacts_just_phone_digits_idx
   regexp_replace(phonenumber, '[^0-9]', '') = '8005551212';

It's not as helpful as one might hope because you're stuck using a
fixed regexp rather than an arbitrary regexp, but if you have a
particular regexp you search for frequently, you can index it.
Otherwise, you'd be doing full table-scans (or at least a full scan
of whatever subset the active non-regexp'ed index yields) which can
be pretty killer on performance.

You'd have to research on other DB engines.

-tkc



[toc] | [prev] | [next] | [standalone]


#98202

FromChris Angelico <rosuav@gmail.com>
Date2015-11-04 14:26 +1100
Message-ID<mailman.2.1446607605.16136.python-list@python.org>
In reply to#98195
On Wed, Nov 4, 2015 at 2:12 PM, Tim Chase <python.list@tim.thechases.com> wrote:
> It's not as helpful as one might hope because you're stuck using a
> fixed regexp rather than an arbitrary regexp, but if you have a
> particular regexp you search for frequently, you can index it.
> Otherwise, you'd be doing full table-scans (or at least a full scan
> of whatever subset the active non-regexp'ed index yields) which can
> be pretty killer on performance.

If the regex anchors the start of the string, you can generally use an
index to save at least some effort. Otherwise, you're relying on some
kind of alternate indexing style, such as:

http://www.postgresql.org/docs/current/static/pgtrgm.html

which specifically mentions regex searches as being indexable.

Some more info, including 'explain' results:

http://www.depesz.com/2013/04/10/waiting-for-9-3-support-indexing-of-regular-expression-searches-in-contribpg_trgm/

But this kind of thing isn't widely supported across databases.

ChrisA

[toc] | [prev] | [next] | [standalone]


#98207

FromSteven D'Aprano <steve+comp.lang.python@pearwood.info>
Date2015-11-04 14:48 +1100
Message-ID<56398006$0$11100$c3e8da3@news.astraweb.com>
In reply to#98195
On Wednesday 04 November 2015 11:33, rurpy@yahoo.com wrote:

>> Not quite.  Core language concepts like ifs, loops, functions,
>> variables, slicing, etc are the socket wrenches of the programmer's
>> toolbox.  Regexs are like an electric impact socket wrench.  You can do
>> the same work without it, but in many cases it's slower. But you have to
>> learn the other hand tools first in order to really use the electric
>> driver properly (understanding torques, direction of threads, etc), lest
>> you wonder why you're breaking off so many bolts with the torque of the
>> impact drive.
> 
> I consider regexs more fundemental

I'm sure that there are people who consider the International Space Station 
more fundamental than the lever, the wedge and the hammer, but they would be 
wrong too.

Given primitives for branching, loops and variables, you can build support 
for regexes. Given regexes, how would you build support for variables?

Of course, you could easily prove me wrong. All you would need to do to 
demonstrate that regexes are more fundamental than branching, loops and 
variables would be to demonstrate that the primitive operations available in 
commonly used CPUs are regular expressions, and that (for example) C's for 
loop and if...else are implemented in machine code as regular expressions, 
rather than the other way around.



-- 
Steve

[toc] | [prev] | [next] | [standalone]


Page 3 of 6 — ← Prev page 1 2 [3] 4 5 6  Next page →

Back to top | Article view | comp.lang.python


csiph-web