[Gimp-developer] Re: regex+

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 28 Nov 2002, Dov Grobgeld wrote:

> Perhaps replace it by pcre (www.pcre.org). It is pretty widely
> used these days.
>

The problem with Perl-compatible regular expression is that they are
NP-complete:

http://perl.plover.com/NPC/

"Normal" regular expressions are polynomial time. Throughout the entire
years I used Perl, I think I avoided most of the features that make it
NP-Complete and stuck to the regular expressions feature set, even if it
made my code more complicated. Perl programmers who use the entire Perl
feature set can easily cause their program to run very slowly.

If you have Perl-compatibility in mind, you can use PCRE. But sometimes
supplying only traditional regexps is not a bug but a feature as it
ensures fast processing.

Regards,

	Shlomi Fish

> Perhaps an advanced settings button that would toggle search by
> regular expression or literal string button would be the best.
> I think taking away a power option for the sake of simplicity
> is the wrong approach. Make simple things simple. Make complex
> things possible.
>

That may be nice. For instance the Microsoft Word or DevStudio Find
feature has an option to toggle regexps on and off. So does Konqueror.
Regexps are very nice but they may confuse simpletons. ("When I search for
'?' it stops at every character")

Regards,

	Shlomi Fish


> Regards,
> Dov
>
>
> On Wed, Nov 27, 2002 at 12:19:28PM -0800, Robin Rowe wrote:
> > David,
> >
> > > I think the point is probably to do a
> > > trawl through legacy code and see how much of it can be flushed,
> > > if any.
> >
> > I wish! Sometime later.
> >
> > Although regex is available with *nix, it isn't part of Windows. My choice
> > is to remove it or fix the broken regex implemenation included in Film Gimp.
> > That regex code is full of difficult to debug macros.
> >
> > > Now that Robin knows that
> > > the regex code is useful, at least to some people, he's not
> > > planning on touching it.
> >
> > I'm not?
> >
> > Cheers,
> >
> > Robin
> > ---------------------------------------------------------------------------
> > www.FilmGimp.org
> > www.LinuxMovies.org
> > www.OpenSourceProgrammers.org
> >
> > _______________________________________________
> > Gimp-developer mailing list
> > Gimp-developer@xxxxxxxxxxxxxxxxxxxxxx
> > http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer
>
>



----------------------------------------------------------------------
Shlomi Fish        shlomif@xxxxxxxxxxxxxxxxxxx
Home Page:         http://t2.technion.ac.il/~shlomif/

He who re-invents the wheel, understands much better how a wheel works.


[Index of Archives]     [Video For Linux]     [Photo]     [Yosemite News]     [gtk]     [GIMP for Windows]     [KDE]     [GEGL]     [Gimp's Home]     [Gimp on GUI]     [Gimp on Windows]     [Steve's Art]

  Powered by Linux