in reply to Re^2: Perl regexp matching is slow??
in thread Perl regexp matching is slow??
Hi Russ,
I think it's a bit unfortunate how you phrased that response ("nothing useful about NFAs and DFAs"), since it doesn't make clear that you're talking about the theoretical potential of the techniques (which, indeed, my book does not cover). As such, it sounds like an attack rather than the simple citing of a fact.
You had it right in your (excellent) article:
Friedl's book teaches programmers how best to use today's regular expression implementations, but not how best to implement them.
I think a better response to Holli would be one noting that there's more potential offered by the underlying theory than is evident in the common implementations covered in the book.
Whether the underlying theory is my cup of tea is not particularly relevant to my book, because the reality of today's common implementations is that they are what they are. Perhaps you wouldn't have so much angst about my book if it were titled Mastering (what goes for) Regular Expressions ? :-)
In your article, I'm not sure what you mean when you say that I don't "respect" theory (?), but it's true that a lot of the theory behind what led to today's implementations is beyond my desire to stay awake. Here's an example of the type of thing that trying to understand makes my eyes glaze:
"An equivalence relation R over Σ* is right invariant if and only if whenever xRy, then xzRyz for all z ∈ Σ*. An equivalence relation is of finite index if and only if there are only finitely many equivalence classes under R
(from Robert Constable's paper "The Role of Finite Automata in the Development of Modern Coputing Theory" in The Kleene Symposium, North-Holland Publishing, 1980).
You know what they say: "Those who can, do, and those who can't, teach". My book teaches how to use what's there now. It would please me to no end if I could throw out all the chapters on optimization and such, and perhaps your article is a first step toward that goal. Some won't appreciate being told that the emperor has fewer clothes than has been thought, but don't let that deter you.
I do think that along the way you'll find some unexpected problems related to the semantics of capturing parentheses, for example, but heck, if you're half as good an engineer as you are a writer, I'll hold out hope, because the writing and presentation in your article is really top notch.
Jeffrey
----------------------------
Jeffrey Friedl http://regex.info/blog/
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Theory vs. Reality
by rsc (Acolyte) on Feb 02, 2007 at 13:28 UTC | |
|
Re: Theory vs. Reality
by ysth (Canon) on Feb 07, 2007 at 21:23 UTC | |
by Limbic~Region (Chancellor) on Feb 07, 2007 at 23:16 UTC | |
by ysth (Canon) on Feb 07, 2007 at 23:28 UTC | |
by Limbic~Region (Chancellor) on Feb 07, 2007 at 23:55 UTC | |
by ikegami (Patriarch) on Feb 08, 2007 at 00:47 UTC | |
by BrowserUk (Patriarch) on Feb 08, 2007 at 01:26 UTC | |
by tye (Sage) on Feb 08, 2007 at 06:21 UTC | |
by eric256 (Parson) on Feb 07, 2007 at 23:51 UTC | |
by Anonymous Monk on Feb 08, 2007 at 00:06 UTC |