Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling

Re: Perl6ish rules in Perl5's regex engine

by audreyt (Hermit)
on Sep 11, 2006 at 01:02 UTC ( #572262=note: print w/replies, xml ) Need Help??

in reply to Perl6ish rules in Perl5's regex engine

A regex fixpoint! That'll be insanely great for my nefarious purposes, such as Template::Extract, Template::Generate and friends. I've been pondering compiling Perl 6 rules to PCRE, taking advantage of its callback mechanism to implement nested capturing, but a fixpoint will elegantly provide this capability as well. :-)
  • Comment on Re: Perl6ish rules in Perl5's regex engine

Replies are listed 'Best First'.
Re^2: Perl6ish rules in Perl5's regex engine
by ysth (Canon) on Sep 11, 2006 at 03:59 UTC
    Does that mean you volunteer to write the tests? :)
Re^2: Perl6ish rules in Perl5's regex engine
by robin (Chaplain) on Sep 12, 2006 at 20:55 UTC
    I had the same idea a few years ago, and implemented it in PCRE. The author of PCRE reworked the implementation but kept the idea, and it's been a standard feature of PCRE since then. I still think it's very cool, but I don't know whether anyone actually uses it...

    I didn't have the guts to try and do it for perl's regex engine. If you do it, it might be worth considering using the same syntax as PCRE?

      If you do it, it might be worth considering using the same syntax as PCRE?

      Well, if it meant the patch was more likely to be applied then yes. OTOH, Im not super keen on using capturing buffers as the fix point. But im not totally against it either. I really need to look into PCRE more closely. How do they do named capture buffers?


Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://572262]
[Corion]: But yes, "who started this process" is interesting information :)
[tye]: no, I really believe that "login user" was added as a fundamental bit of info about each process in order to enhance the usefulness of auditing
[Corion]: Ah - if that information is saved in a file, then you could theoretically spam that file and confuse getlogin(). So, don't use it for authentication :)
[tye]: that is what getlogin() certainly *used* to do. I don't believe that is what it certainly should do.
[davido]: /var/run/utmp is 664 i think.
[tye]: Note that my "man getlogin" says that it uses stdin when it should use /dev/tty (calling a glibc bug). But that does not appear to be the case when I test it. But maybe Perl's getlogin() is not using glibc's getlogin().
[oiskuu]: well, run a strace and see what the getlogin does for you.... As I said. SELinux probably has those security labels. But not regular linux.
[tye]: for example, read https://unix. questions/146138/ loginuid-should-be -allowed-to-change -or-not-mutable-or -not
[tye]: I'm not using SELinux and it certainly appears to disagree with you. shrug
[tye]: Since you brought up /proc, oiskuu, I didn't see you respond to my suggestion of 'loginuid'. Does your /proc not have such?

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (6)
As of 2017-06-23 19:46 GMT
Find Nodes?
    Voting Booth?
    How many monitors do you use while coding?

    Results (554 votes). Check out past polls.