Re: most commonly used regex lib for awk/frep/mutt/sed?

2002-08-02 Thread Erik Christiansen

On Thu, Aug 01, 2002 at 01:47:37PM +0200, Sven Guckes wrote:
  Is this too ambitious a wish?
 
 unfortunately, yes.

   Ricardo SIGNES is a man of vision, I think. If it is practical to link
in a preferred regex suite, as described in his post on this thread, to
allow the ERE-proficient amongst us to escape the frustrations and
limitations of BREs, then my only questions are:

 o Do I have to dust off my rusty but revivable 'C' skills to help get
   this moving?

 o Should vim be fixed first? 'cos I think Roman is definitely right.
   (There's still no magic that allows + in lieu of \+)

 let's assume you could make this change within a day.
 how many setup files, scripts, shell aliases etc
 would have to be adjusted?  can you give this service?

   As Ricardo implies, let's not change any. It would require that
people change, and I recognise that it is only in accepting the existing
tower of babel, that we have any hope of providing a simpler consistent
interface for those who prefer it.

 besides, would everyone gain from this?

   Oh-oh, is this devil's advocacy?

   Whether it is:

 o The time lost by countless users individually clawing their way up the
   learning curve of a panoply of regex dialects, just to do a simple
   job.

 o The countless hours spent by worthy individuals reinventing the wheel
   for their otherwise great tool. (When the time could be spent on
   features which help users.)

 o The resulting bugs, fixes, and re-releases of these tools, impacting
   both developer and user.

 o The newsgroup and mailing list traffic due to regex knowledge already
   acquired not being portable. (Much energy has also been expended on
   the procmail mailling list, examining how their dialect can be made
   stranger still, as various deficiencies of the older syntax are
   addressed.)

 o The confusion sown by inconsistency. Beginner pain is exacerbated by
   behavioural variability. Lessons learned on one dialect must be
   unlearned on others. (After approximately a decade, I still send
   stuff to grep, rather than use vim's irregular expressions.)

   there is benefit enough for all.

   For what it is worth, dissatisfaction with dialects has found its way
   into the debian regex(7) manpage. It describes POSIX 1003.2 EREs as
   modern, and is not very flattering of BREs:


Obsolete (``basic'') regular expressions differ in several
respects.   `|',  `+', and `?' are ordinary characters and
there is  no  equivalent  for  their  functionality.
 
  and

   Obsolete REs  mostly  exist  for backward compatibility in some old
   programs;


   (No, they can't mean vim. It has the backslash work-around, even
   though it doesn't have modern EREs. ;-)
   
   Hmmm. Whither mutt?

Regards,
Erik



-- 
 _,-_|\Erik Christiansen
/  \   Research  Development Division
\_,-.__/   Voice Products Department
  vNEC Business Solutions Pty. Ltd.



Re: most commonly used regex lib for awk/frep/mutt/sed?

2002-08-02 Thread Roman Neuhauser

 Date: Fri, 2 Aug 2002 18:55:42 +1000
 From: Erik Christiansen [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: Re: most commonly used regex lib for awk/frep/mutt/sed?
 
 On Thu, Aug 01, 2002 at 01:47:37PM +0200, Sven Guckes wrote:
   Is this too ambitious a wish?
  
  unfortunately, yes.
 
Ricardo SIGNES is a man of vision, I think. If it is practical to
 link in a preferred regex suite, as described in his post on this
 thread, to allow the ERE-proficient amongst us to escape the
 frustrations and limitations of BREs, then my only questions are:
 
  o Do I have to dust off my rusty but revivable 'C' skills to help get
this moving?
 
someone *will* need to do it. i'd definitely love to see this
inlined as a ./configure knob, but a (probably quite hard to
maintain) patch looks more likely.
(oh gosh, how i regret i don't know enough c)

  o Should vim be fixed first? 'cos I think Roman is definitely right.
(There's still no magic that allows + in lieu of \+)
 
vim needs a fix really badly imo, but i don't think any such thing
will happen (soon), and even if Bram jumpstarted replacing the
strange cousin of re that's used in vim, it would delay the work
in mutt too much.

  let's assume you could make this change within a day.
  how many setup files, scripts, shell aliases etc
  would have to be adjusted?  can you give this service?
 
As Ricardo implies, let's not change any. It would require that
 people change, and I recognise that it is only in accepting the existing
 tower of babel, that we have any hope of providing a simpler consistent
 interface for those who prefer it.
 
if mutt could be ./configure'd --with-pcre (nondefault, of course),
there'd be virtually no problems with confusion between regexps
found in various published .muttrc's and the syntax mutt linked with
pcre actually expected. 

  besides, would everyone gain from this?
 
Oh-oh, is this devil's advocacy?
 
Whether it is:
 
  o The time lost by countless users individually clawing their way up the
learning curve of a panoply of regex dialects, just to do a simple
job.
 
  o The countless hours spent by worthy individuals reinventing the wheel
for their otherwise great tool. (When the time could be spent on
features which help users.)
 
  o The resulting bugs, fixes, and re-releases of these tools, impacting
both developer and user.
 
  o The newsgroup and mailing list traffic due to regex knowledge already
acquired not being portable. (Much energy has also been expended on
the procmail mailling list, examining how their dialect can be made
stranger still, as various deficiencies of the older syntax are
addressed.)
 
  o The confusion sown by inconsistency. Beginner pain is exacerbated by
behavioural variability. Lessons learned on one dialect must be
unlearned on others. (After approximately a decade, I still send
stuff to grep, rather than use vim's irregular expressions.)
 
there is benefit enough for all.

i'll sign this.


-- 
FreeBSD 4.6-STABLE
1:21PM up 2 days, 20:58, 8 users, load averages: 0.00, 0.00, 0.00



Re: most commonly used regex lib for awk/frep/mutt/sed?

2002-08-01 Thread Sven Guckes

* Erik Christiansen [EMAIL PROTECTED] [2002-08-01 07:48]:
 is there any enthusiasm for employing a most commonly
 used regex library, such that any improvements can feed
 back into all the tools using it?

 While procmail seems to be out on a long plank in the
 middle of a swamp, it would be cosmically empowering to be
 able to move between mutt, vim, awk, and grep without
 tripping over too many differences in regex dialects.

 Is this too ambitious a wish?

unfortunately, yes.

let's assume you could make this change within a day.
how many setup files, scripts, shell aliases etc
would have to be adjusted?  can you give this service?

besides, would everyone gain from this?

Sven  [thinking about how many people use .*
who do not know about the greedy convention]



Re: most commonly used regex lib for awk/frep/mutt/sed?

2002-08-01 Thread Ricardo SIGNES

On Thu, Aug 01, 2002 at 01:47:37PM +0200, Sven Guckes wrote:
 * Erik Christiansen [EMAIL PROTECTED] [2002-08-01 07:48]:
  While procmail seems to be out on a long plank in the
  middle of a swamp, it would be cosmically empowering to be
  able to move between mutt, vim, awk, and grep without
  tripping over too many differences in regex dialects.
 
  Is this too ambitious a wish?
 
 unfortunately, yes.
 
 let's assume you could make this change within a day.
 how many setup files, scripts, shell aliases etc
 would have to be adjusted?  can you give this service?

./configure --enable-pcre

echo  ~/.muttrc set pcre_acknowledge=on # to avoid PCRE warnings on startup

-- 
rjbs



msg30052/pgp0.pgp
Description: PGP signature


Re: most commonly used regex lib for awk/frep/mutt/sed?

2002-08-01 Thread Ricardo SIGNES

On Thu, Aug 01, 2002 at 08:22:36AM -0400, Ricardo SIGNES wrote:
 
 echo  ~/.muttrc set pcre_acknowledge=on # to avoid PCRE warnings on startup

Ok, so I don't know how to call echo, and s/=on/yes/

Still, you get the picture.

-- 
rjbs



msg30054/pgp0.pgp
Description: PGP signature