Artifacts Associated With Ticket d351de9d7b
Ticket change [5ad6e07a3f] (rid 142105) by anonymous on 2015-06-20 18:08:22:
- assignee initialized to: "nobody"
- closer initialized to: "nobody"
- cmimetype initialized to: "text/plain"
- comment initialized to:
There is no notion of lookbehind in Tcl regex expressions. Only lookahead.
- foundin initialized to: "8.6"
- is_private initialized to: "0"
- login: "anonymous"
- priority initialized to: "5 Medium"
- private_contact initialized to: "1c4b6cdb98c9dfc4d1e74018f3f4efa00ad217e2"
- resolution initialized to: "None"
- severity initialized to: "Minor"
- status initialized to: "Open"
- submitter initialized to: "anonymous"
- subsystem initialized to: "- New Builtin Commands"
- title initialized to: "Tcl lacks lookbehind in regex expressions"
- type initialized to: "Bug"
Ticket change [8b5107ed36] (rid 142110) by apnadkarni on 2015-06-21 03:08:15:
- login: "apnadkarni"
- mimetype: "text/plain"
- subsystem changed to: "43. Regexp"
- type changed to: "RFE"
Ticket change [8109b896e4] (rid 142943) by dkf on 2015-08-30 20:29:33:
- icomment:
Known issue. Henry Spencer never added them to his library. (Don't know why.) <p> Easiest fix would be to switch to using the PCRE library, which has some advantages (e.g., it's properly maintained!) but would have quite an impact on existing users of advanced RE features. And even some not-so-advanced ones. The impact's pretty severe, in some ways.
- login: "dkf"
- mimetype: "text/html"
- priority changed to: "3 Low"
- severity changed to: "Severe"
- username: "dkf"
- icomment:
Ticket change [40243a2719] (rid 142946) by sebres on 2015-08-31 08:48:42:
- icomment:
What's about something like additionally option to use PCRE instead of "tcl" regular expressions? Something like: regexp -pc <PCRE> ... regsub -pc <PCRE> ...
- login: "sebres"
- mimetype: "text/plain"
- icomment:
Ticket change [4662bd1e2c] (rid 142964) by ferrieux on 2015-08-31 21:15:15:
- icomment: "Twice the maintenance effort maybe ?"
- login: "ferrieux"
- mimetype: "text/plain"
Ticket change [b63d15d683] (rid 142965) by anonymous on 2015-08-31 21:57:47:
- icomment:
I researched and I found that PCRE is used in the PHP programming language, the Apache server and R. Source: https://en.wikipedia.org/wiki/Perl_Compatible_Regular_Expressions I don't know whether it is a good idea to make a change . Anyway it's interesting to know what would be the increase in size, because I have understood that Tcl is normally used in embedded systems. For me the size is not so important but I imagine that for some users it is. I suppose also that with this change then the Tcl developer's team can concentrate in other important parts of the language and be more focused. What would be exact the impacts to this change? I suppose that one of them is performance, for example in alternation expressions. Source: http://lh3lh3.users.sourceforge.net/reb.shtml
- login: "anonymous"
- mimetype: "text/plain"
- username: "FireTcl"
- icomment:
Ticket change [03fc91e48f] (rid 142996) by dgp on 2015-09-02 11:16:31:
- icomment:
See also: http://core.tcl.tk/tcl/tktview/1860727
- login: "dgp"
- mimetype: "text/plain"
- icomment:
Ticket change [e95b5e54ed] (rid 142997) by sebres on 2015-09-02 11:53:12:
- icomment:
Thx Don, is a good tip How can I download the diff.gz? It says: (file is 21230 bytes of binary data)
- login: "sebres"
- mimetype: "text/plain"
- icomment:
Ticket change [97684873a8] (rid 143005) by dkf on 2015-09-02 13:20:17:
- icomment:
<blockquote><i>What would be exact the impacts to this change?</i></blockquote> The main impact is that it's a different RE language. Some scripts that currently work would cease to function as expected, despite not being <i>necessarily</i> broken by things (with the main portion of that impact being in the different set of backslash-escapes supported). <p> <small>A necessary breakage would be something like the syntax for lookbehind becoming used for that purpose. We would not get upset over that.</small>
- login: "dkf"
- mimetype: "text/html"
- username: "dkf"
- icomment:
Ticket change [a5d4647dd5] (rid 143007) by sebres on 2015-09-02 14:08:09:
- icomment:
> Some scripts that currently work would cease to function as expected... Not if PCRE will be not used by default, but rather optionally, like option "-pc", see my comment below.
- login: "sebres"
- mimetype: "text/plain"
- icomment:
Ticket change [7ad201ee26] (rid 143010) by dkf on 2015-09-03 12:42:26:
- icomment:
But then you get all the complexity of a required dependency while keeping the costs associated with maintaining the old engine, and you also have to maintain the new code (which doesn't just interact with <tt>regexp</tt> and <tt>regsub</tt>, but also <tt>switch</tt> and possibly other places too).
- login: "dkf"
- mimetype: "text/html"
- username: "dkf"
- icomment:
Ticket change [fcfec63d54] (rid 143530) by tgl on 2015-10-17 04:06:48:
- icomment:
I've put up a WIP patch for lookbehind constraints in Spencer's engine at http://www.postgresql.org/message-id/[email protected] It works, but has some performance issues. If anyone's interested in helping fix those, step right up ...
- login: "tgl"
- mimetype: "text/plain"
- icomment:
Add attachment "lookbehind.patch" [dfb502d79b] (rid 143833) by tgl on 2015-11-06 19:41:41.
Ticket change [b8f33e14d7] (rid 143834) by tgl on 2015-11-06 19:44:09:
- icomment:
I found a solution to the performance issues I was worried about before, so attached is a proposed patch implementing lookbehind. This is equivalent to code already committed to Postgres at http://git.postgresql.org/gitweb/?p=postgresql.git&a=commitdiff&h=12c9a04008870c283931d6b3b648ee21bbc2cfda
- login: "tgl"
- mimetype: "text/plain"
- icomment:
Ticket change [0af83f5365] (rid 143852) by dgp on 2015-11-09 19:42:50:
- icomment:
If we can do it with reasonable effort, this might go on a Tcl development branch for interested people to try out. Additions to RE syntax, though, would be an incompatibility in need of some TIP review before adding to Tcl at some well-defined release point.
- login: "dgp"
- mimetype: "text/plain"
- icomment:
Ticket change [dc3fc2e67f] (rid 143853) by tgl on 2015-11-09 20:12:05:
- icomment:
FWIW, it's not an incompatibility any more than lookaheads were, because the syntax is something that will fail with an "invalid quantifier" error in a regex engine that doesn't know the feature. All of the "(?...)" features have that property, since ordinarily "?" can't follow a left paren. I don't know anything about the TIP process, so will leave that to you.
- login: "tgl"
- mimetype: "text/plain"
- icomment:
Ticket change [bc23ca418d] (rid 143854) by dgp on 2015-11-09 20:40:11:
- icomment:
It would be a new feature, and a pretty substantial one. Tcl does such things only in .0 releases after an alpha/beta period. Would not be welcome in 8.6.5.
- login: "dgp"
- mimetype: "text/plain"
- icomment:
Ticket change [2c239b3e60] (rid 143877) by dkf on 2015-11-11 10:13:46:
- assignee changed to: "dkf"
- icomment:
I'm less opposed than dgp, especially given that you're doing some burn-in testing.
- login: "dkf"
- mimetype: "text/plain"
- priority changed to: "6"
Ticket change [463bb32e4a] (rid 143879) by tgl on 2015-11-11 14:51:52:
- icomment:
Well, as far as that goes, this code won't see much public use before Postgres 9.6 is released, which is probably a year away. We don't put new features into minor releases either. So I follow dgp's concern completely: you need to absorb such things according to stated project policy. But, as a Tcl outsider, I don't want to spend much of my own time satisfying the minutiae of such policy. My feeling is "here's some code, merge when and as you see fit". (And on the third hand, if we allow the Postgres and Tcl versions of Spencer's code to diverge too far, it'll become impractical to trade even minor bug fixes. So I do have some investment in seeing you merge it eventually.)
- login: "tgl"
- mimetype: "text/plain"
- icomment:
Ticket change [019c94ee32] (rid 143891) by dgp on 2015-11-12 14:41:33:
- icomment:
I'm not so much opposed as just wanting it understood that a new feature will go in under different terms than bug fixes. If current visions play out, the next opportunity for new regexp features would be Tcl 9.0, and there's at least some interest in a complete overhaul to PCRE, or to a pluggable system, at that point, so remains to be seen what will happen with this work. Nevertheless, very grateful to have it, and will attempt to get it into a branch of our dev code sometime soon-ish.
- login: "dgp"
- mimetype: "text/plain"
- icomment: