regex+
This discussion is connected to the gimp-developer-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.
This is a read-only list on gimpusers.com so this discussion thread is read-only, too.
regex | Robin Rowe | 25 Nov 04:10 |
regex | Sven Neumann | 25 Nov 12:08 |
regex | Robin Rowe | 26 Nov 19:36 |
regex+ | Simon Budig | 26 Nov 20:08 |
regex | Guillermo S. Romero / Familia Romero | 26 Nov 20:13 |
regex+ | Robin Rowe | 26 Nov 21:06 |
regex+ | Guillermo S. Romero / Familia Romero | 26 Nov 21:16 |
regex+ | Simon Budig | 26 Nov 21:19 |
regex+ | Sven Neumann | 27 Nov 13:08 |
regex+ | David Neary | 27 Nov 16:01 |
regex+ | Robin Rowe | 26 Nov 23:36 |
regex+ | Carol Spears | 27 Nov 02:06 |
regex+ | Robin Rowe | 27 Nov 08:28 |
regex+ | Simon Budig | 27 Nov 10:18 |
regex+ | Carol Spears | 27 Nov 11:08 |
regex+ | Sven Neumann | 27 Nov 13:19 |
regex+ | Carol Spears | 27 Nov 16:26 |
regex+ | Guillermo S. Romero / Familia Romero | 27 Nov 19:48 |
regex+ | Robin Rowe | 27 Nov 21:12 |
regex+ | Robin Rowe | 27 Nov 21:19 |
regex+ | Dov Grobgeld | 28 Nov 14:12 |
regex+ | Sven Neumann | 28 Nov 16:50 |
regex+ | Shlomi Fish | 28 Nov 17:31 |
regex | David Weeks | 28 Nov 00:32 |
regex | Christian Rose | 28 Nov 01:59 |
regex | Simon Budig | 28 Nov 11:52 |
regex | Adam D. Moss | 28 Nov 00:46 |
regex | David Weeks | 28 Nov 06:46 |
regex
Hi. GIMP has its own regex.c that the procedural database uses. That seems to look up plug-ins using regexec. I'm having a little difficulty understanding the logic of the code. Can anybody explain how regex is used by GIMP? Why is it necessary?
Thanks!
Robin
---------------------------------------------------------------------------
www.FilmGimp.org
www.LinuxMovies.org
www.OpenSourceProgrammers.org
regex
Hi,
"Robin Rowe" writes:
Hi. GIMP has its own regex.c that the procedural database uses. That seems to look up plug-ins using regexec. I'm having a little difficulty understanding the logic of the code. Can anybody explain how regex is used by GIMP? Why is it necessary?
GIMP doesn't use it's own regex implementation any longer. We only provide one as a fallback for the case that libc doesn't have the regex functionality we need. This is the code in the regexrepl directory that you'll find in the toplevel source directory.
The regex code is used by gimp-plug-ins-query (and a similar function in script-fu). I don't understand how you can not understand this code since it seems pretty straight-forward. Could you elaborate on your problems?
Salut, Sven
regex
Sven,
The regex code is used by gimp-plug-ins-query (and a similar function in script-fu).
Yes, I can follow that from the code. I understand what regex does generally, just not why gimp-plug-ins-query needs it.
My confusion relates to script-fu and gimp plug-ins with respect to regex. Why query a plug-in as a regular expression? What's the point?
Thanks!
Robin
---------------------------------------------------------------------------
www.FilmGimp.org
www.LinuxMovies.org
www.OpenSourceProgrammers.org
regex+
Robin Rowe (rower@MovieEditor.com) wrote:
The regex code is used by gimp-plug-ins-query (and a similar function in script-fu).
Yes, I can follow that from the code. I understand what regex does generally, just not why gimp-plug-ins-query needs it.
My confusion relates to script-fu and gimp plug-ins with respect to regex. Why query a plug-in as a regular expression? What's the point?
To have a nice way to specify a search pattern. For thinks like a PDB-Browser for example.
Bye,
Simon
regex
rower@MovieEditor.com (2002-11-26 at 1036.29 -0800):
My confusion relates to script-fu and gimp plug-ins with respect to regex. Why query a plug-in as a regular expression? What's the point?
Gimp keeps a DB of info about all plugins. In startup all are checked, if they changed since last time, they are queried, asking them what they do, and the replies are stored. The regex is used to search in the DB that stores all the info. Read gimp-procedural-db-query and gimp-plugins-query in / Xtns / DB Browser, and guess how the browser works. :]
GSR
regex+
Simon,
My confusion relates to script-fu and gimp plug-ins with respect to
regex.
Why query a plug-in as a regular expression? What's the point?
To have a nice way to specify a search pattern. For thinks like a PDB-Browser for example.
Ok, I guess I'm just not making my question clear. I understand that regex enables doing a wildcard search in the plug-ins database.
What I have trouble imagining is the scenario where regex search in Gimp is necessary or useful. Few users even know how to phrase a regex search. Is this just feature-itis? Do I correctly surmise that regex could be removed without being missed?
Thanks,
Robin
---------------------------------------------------------------------------
www.FilmGimp.org
www.LinuxMovies.org
www.OpenSourceProgrammers.org
regex+
rower@MovieEditor.com (2002-11-26 at 1206.59 -0800):
What I have trouble imagining is the scenario where regex search in Gimp is necessary or useful. Few users even know how to phrase a regex search. Is this just feature-itis? Do I correctly surmise that regex could be removed without being missed?
It will be missed by persons that use the DB as a tool, like script or filter writers, not users. If you want to call that featuritis or not useful...
GSR
regex+
Robin Rowe (rower@MovieEditor.com) wrote:
What I have trouble imagining is the scenario where regex search in Gimp is necessary or useful. Few users even know how to phrase a regex search. Is this just feature-itis? Do I correctly surmise that regex could be removed without being missed?
Well, maybe it is a little used feature, but I do not understand why we should remove it?
It enables powerful searches over the various help texts plugins provide via their Registration. I surely do not understand why having this feature might be considered a bad thing.
Bye, Simon
regex+
Simon,
It enables powerful searches over the various help texts plugins provide via their Registration. I surely do not understand why having this feature might be considered a bad thing.
Thanks for the insights from you and Guillermo. I think I understand now.
Well, maybe it is a little used feature, but I do not understand why we should remove it?
There's no reason you should remove it from Gimp. The motive behind my question is I am considering whether to remove regex from Film Gimp. Never having used that feature, I was just trying to figure out what it really does.
Cheers,
Robin
---------------------------------------------------------------------------
www.FilmGimp.org
www.LinuxMovies.org
www.OpenSourceProgrammers.org
regex+
well, i use it. honest. Robin, ever try to write a gimp plug-in?
carol
On 2002-11-26 at 1436.28 -0800, Robin Rowe typed this:
Simon,
It enables powerful searches over the various help texts plugins provide via their Registration. I surely do not understand why having this feature might be considered a bad thing.
Thanks for the insights from you and Guillermo. I think I understand now.
Well, maybe it is a little used feature, but I do not understand why we should remove it?
There's no reason you should remove it from Gimp. The motive behind my question is I am considering whether to remove regex from Film Gimp. Never having used that feature, I was just trying to figure out what it really does.
Cheers,
Robin
--------------------------------------------------------------------------- www.FilmGimp.org
www.LinuxMovies.org
www.OpenSourceProgrammers.org
regex+
Carol,
well, i use it. honest. Robin, ever try to write a gimp plug-in?
How would regex help me write a gimp plug-in?
Cheers,
Robin
---------------------------------------------------------------------------
www.FilmGimp.org
www.LinuxMovies.org
www.OpenSourceProgrammers.org
regex+
Robin Rowe (rower@MovieEditor.com) wrote:
well, i use it. honest. Robin, ever try to write a gimp plug-in?
How would regex help me write a gimp plug-in?
Search for functions that you could use in the plug-in...
Bye, Simon
regex+
this is such a good topic for a tutorial! i needed help to see this stuff at first as well. i don't have time to write the tutorial, but i got some screenshots for it when i have the time.
i have been working with gimp-python lately, so i chose that console for my tutorial. the script fu console works the same way, so if you haven't installed the python module in your gimp, you can use that one that comes with gimp.
Xtns -->Python Fu -->Console will bring up this dialog: http://carol.gimp.org/mygimp/tutorials/dbbrowser/gimp_pdb-browser.png i needed the gradient list for my last plug-in.
after you find the call you need and hit the okay button, it is back to
that original dialog:
http://carol.gimp.org/mygimp/tutorials/dbbrowser/gimp_python-console2.png
see, it gets cooler now. it is the same dialog, yet in the little text box at the bottom is the call you queried about only in the way that python understands it. also, it shows what the return is. this thing does most of the work for you ...
so, for the best part, you need to remove the equal sign and everything to the left of it (this will leave pdb.gimp_gradients_get_list() in the text box. hit enter and see this(!!): http://carol.gimp.org/mygimp/tutorials/dbbrowser/gimp_python-console3.png
whee!
carol
O
n 2002-11-26 at 2328.53 -0800, Robin Rowe typed this:
Carol,
well, i use it. honest. Robin, ever try to write a gimp plug-in?
How would regex help me write a gimp plug-in?
Cheers,
Robin --------------------------------------------------------------------------- www.FilmGimp.org
www.LinuxMovies.org
www.OpenSourceProgrammers.org
regex+
Hi,
"Robin Rowe" writes:
Ok, I guess I'm just not making my question clear. I understand that regex enables doing a wildcard search in the plug-ins database.
What I have trouble imagining is the scenario where regex search in Gimp is necessary or useful. Few users even know how to phrase a regex search. Is this just feature-itis? Do I correctly surmise that regex could be removed without being missed?
why would you want to remove a feature that is implemented in libc anyway? All you'd gain is one nice feature less.
Actually I don't understand at all why you are dealing with this code. It seems unrelated to 16-bit or floating point support. If you ask me, stop fiddling with this stone-old code base and try to help building a gimp core that fits the needs of film-editing.
Salut, Sven
regex+
Hi,
Carol Spears writes:
this is such a good topic for a tutorial! i needed help to see this stuff at first as well. i don't have time to write the tutorial, but i got some screenshots for it when i have the time.
nice stuff, but, sorry, you are not using any regex features here...
Salut, Sven
regex+
Sven Neumann wrote:
"Robin Rowe" writes:
Do I correctly surmise that regex could be removed without being missed?
Actually I don't understand at all why you are dealing with this code. It seems unrelated to 16-bit or floating point support. If you ask me, stop fiddling with this stone-old code base and try to help building a gimp core that fits the needs of film-editing.
Ever the diplomat, Sven. I think the point is probably to do a trawl through legacy code and see how much of it can be flushed, if any. At least that's how I took it. Now that Robin knows that the regex code is useful, at least to some people, he's not planning on touching it.
Cheers, Dave.
regex+
hmm ...
On 2002-11-27 at 1319.11 +0100, Sven Neumann typed this:
Hi,
Carol Spears writes:
this is such a good topic for a tutorial! i needed help to see this stuff at first as well. i don't have time to write the tutorial, but i got some screenshots for it when i have the time.
nice stuff, but, sorry, you are not using any regex features here...
even the part where the "search by name" button gets pushed?
carol
regex+
cspears@cablespeed.com (2002-11-27 at 1026.55 -0500):
even the part where the "search by name" button gets pushed?
In the plain DB browser you can write "^plug.*blur" and hit that button. Last time I checked, "^plug.*blur" was a regex, that meant "has plug first (nothing before it), then something, then blur".
GSR
regex+
Carol,
this is such a good topic for a tutorial! i needed help to see this stuff at first as well. i don't have time to write the tutorial, but i got some screenshots for it when i have the time.
Hi. Thank you for the detailed response. I found that enlightening.
Cheers,
Robin
---------------------------------------------------------------------------
www.FilmGimp.org
www.LinuxMovies.org
www.OpenSourceProgrammers.org
regex+
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
regex
Robin,
I called you right the first time. You don't know jack about much, and nothing about the rest of it. You're to green to phathom, let alone be embarassed, by your suggestion to remove regular expressions. This is *nix, and that's how *nix works. That's why *nix works. And GIMP is an *nix thing. Don't like it? Quit working with computers and go back to the garbage you came from -- AKA Microsoft.
See, it's like this: Unix is American, Microsoft is French. That Microsoft does NOT have it is an endorsement to have it. That Microsoft would have it is a caution if you do.
All this time you thought you worked with computers. NOT! Microsoft products are necesarrily products that let people like you think you're developing. They let people who don't know anything about computers work with computers. They make it "easy". Only it isn't easy, their stuff never works, their customers never learn, and that leaves it to the *nix folks to build stuff that really works.
I bet you don't even know what globbing characters are you're that ignoRANT. And RANT you've done.
You should drop this project. I've no confidence in the work of someone so clearly clueless.
I'm surprised your mail isn't in html!
David Weeks
regex
David Weeks wrote:
I called you right the first time. You don't know jack about much, and nothing about the rest of it. You're to green to phathom
[blah blah blah]
Quit working with computers and go back to the garbage you came from -- AKA Microsoft.
[blah blah blah]
Wow. At least when /I'm/ drunk I take my mindless babbling to IRC where it fits in just fine.
regex
tor 2002-11-28 klockan 00.32 skrev David Weeks:
Robin,
I called you right the first time.
David,
please keep childish name-calling rants like this for yourself. Thanks.
Kind regards, Christian
regex
So Adam, what kept from doing so this time?
Anyone who a) doesn't know what regular expressions are, and b) thinks a project is better without them is c) not fit for work in *nix. gimp or otherwise.
Call it a basic competence. A basic competence.
Soberly yours,
David Weeks
On Wednesday 27 November 2002 06:46 pm, Adam D. Moss wrote:
David Weeks wrote:
I called you right the first time. You don't know jack about much, and nothing about the rest of it. You're to green to fathom
[blah blah blah]
Quit working with computers and go back to the garbage you came from -- AKA Microsoft.
[blah blah blah]
Wow. At least when /I'm/ drunk I take my mindless babbling to IRC where it fits in just fine.
regex
David Weeks (dweeks@tampapc.com) wrote:
I called you right the first time. You don't know jack about much, and nothing about the rest of it.
[...]
Huh?
The Gimp-Developer Mailing list is *not* about personal insulting people you apparently don't like.
While the approach taken by Robin - brushing up an ancient codebase - might be questionable, I highly appreciate that he is contributing to the Gimp project. This apparently can not be said about you - at least I am unable to find any reference to you in the Changelogs or in the AUTHORS file.
Please stop flaming around with people that try to help.
Thanks, Simon
regex+
Perhaps replace it by pcre (www.pcre.org). It is pretty widely used these days.
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.
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@lists.xcf.berkeley.edu http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer
regex+
Hi,
Dov Grobgeld writes:
Perhaps replace it by pcre (www.pcre.org). It is pretty widely used these days.
before you (or Robin) start to look for yet another regex replacement, you should probably have a look into the current GIMP development tree which has the problem solved already.
Salut, Sven
regex+
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:
"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,
DovOn 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