Re: Subset w/ Inline::Perl5 RE as constraint

2020-11-06 Thread William Michels via perl6-users
Thank you Paul!

On Fri, Nov 6, 2020 at 8:57 AM Paul Procacci  wrote:
>
> Hi Bill,
>
> Yes, that is exactly what I'm saying.
>
> https://github.com/rakudo/rakudo/issues/2624
>
> " FWIW, the :P5 supports a Perl 5 like syntax from X versions ago (probably 
> about 5.8, I would say)."
>
> The features I need are in perl 5.10 which the :P5 adverb doesn't provide.
>
> Thanks,
> Paul
>
> On Fri, Nov 6, 2020 at 11:47 AM William Michels  wrote:
>>
>> Hi Paul,
>>
>> I'm sorry, I don't understand.
>>
>> Are you saying you're using Inline::Perl5 because you can't use the
>> "Perl compatibility adverb" :Perl5 or :P5 ?
>>
>> https://docs.raku.org/language/regexes#Perl_compatibility_adverb
>>
>> Is that what you mean when you say the "perl regex engine [in Raku] is
>> too old" ?
>>
>> Thanks, Bill.
>>
>>
>>
>>
>>
>> On Fri, Nov 6, 2020 at 8:23 AM Paul Procacci  wrote:
>> >
>> > So two example patterns are:
>> >
>> > [\\u0009\\u000A\\u000D\\u0020-\\u007E\\u0085\\u00A0-\\uD7FF\\uE000-\\uFFFD\\u1-\\u10]*
>> > [\\p{L}\\p{Z}\\p{N}_.:\\/=+\\-@]*
>> >
>> > To note, the RE's themselves cannot be changed as they are fed externally.
>> > Given that I'm stuck with these RE's which I believe are PCRE, It was my 
>> > hopes to lean on perl to do the evaluation.
>> > Raku's perl regex engine is too old to interpret it properly, hence the 
>> > shenanigans with Inline::Perl5.
>> >
>> > Thanks,
>> > Paul
>> >
>> >
>> > On Fri, Nov 6, 2020 at 9:51 AM Parrot Raiser <1parr...@gmail.com> wrote:
>> >>
>> >> Can you provide some samples of what you are trying to match and
>> >> exclude? There might be alternative solutions.
>> >
>> >
>> >
>> > --
>> > __
>> >
>> > :(){ :|:& };:
>
>
>
> --
> __
>
> :(){ :|:& };:


Re: Subset w/ Inline::Perl5 RE as constraint

2020-11-06 Thread Paul Procacci
Hi Bill,

Yes, that is exactly what I'm saying.

https://github.com/rakudo/rakudo/issues/2624

" FWIW, the :P5 supports a Perl 5 like syntax from X versions ago (probably
about 5.8, I would say)."

The features I need are in perl 5.10 which the :P5 adverb doesn't provide.

Thanks,
Paul

On Fri, Nov 6, 2020 at 11:47 AM William Michels 
wrote:

> Hi Paul,
>
> I'm sorry, I don't understand.
>
> Are you saying you're using Inline::Perl5 because you can't use the
> "Perl compatibility adverb" :Perl5 or :P5 ?
>
> https://docs.raku.org/language/regexes#Perl_compatibility_adverb
>
> Is that what you mean when you say the "perl regex engine [in Raku] is
> too old" ?
>
> Thanks, Bill.
>
>
>
>
>
> On Fri, Nov 6, 2020 at 8:23 AM Paul Procacci  wrote:
> >
> > So two example patterns are:
> >
> >
> [\\u0009\\u000A\\u000D\\u0020-\\u007E\\u0085\\u00A0-\\uD7FF\\uE000-\\uFFFD\\u1-\\u10]*
> > [\\p{L}\\p{Z}\\p{N}_.:\\/=+\\-@]*
> >
> > To note, the RE's themselves cannot be changed as they are fed
> externally.
> > Given that I'm stuck with these RE's which I believe are PCRE, It was my
> hopes to lean on perl to do the evaluation.
> > Raku's perl regex engine is too old to interpret it properly, hence the
> shenanigans with Inline::Perl5.
> >
> > Thanks,
> > Paul
> >
> >
> > On Fri, Nov 6, 2020 at 9:51 AM Parrot Raiser <1parr...@gmail.com> wrote:
> >>
> >> Can you provide some samples of what you are trying to match and
> >> exclude? There might be alternative solutions.
> >
> >
> >
> > --
> > __
> >
> > :(){ :|:& };:
>


-- 
__

:(){ :|:& };:


Re: Subset w/ Inline::Perl5 RE as constraint

2020-11-06 Thread William Michels via perl6-users
Hi Paul,

I'm sorry, I don't understand.

Are you saying you're using Inline::Perl5 because you can't use the
"Perl compatibility adverb" :Perl5 or :P5 ?

https://docs.raku.org/language/regexes#Perl_compatibility_adverb

Is that what you mean when you say the "perl regex engine [in Raku] is
too old" ?

Thanks, Bill.





On Fri, Nov 6, 2020 at 8:23 AM Paul Procacci  wrote:
>
> So two example patterns are:
>
> [\\u0009\\u000A\\u000D\\u0020-\\u007E\\u0085\\u00A0-\\uD7FF\\uE000-\\uFFFD\\u1-\\u10]*
> [\\p{L}\\p{Z}\\p{N}_.:\\/=+\\-@]*
>
> To note, the RE's themselves cannot be changed as they are fed externally.
> Given that I'm stuck with these RE's which I believe are PCRE, It was my 
> hopes to lean on perl to do the evaluation.
> Raku's perl regex engine is too old to interpret it properly, hence the 
> shenanigans with Inline::Perl5.
>
> Thanks,
> Paul
>
>
> On Fri, Nov 6, 2020 at 9:51 AM Parrot Raiser <1parr...@gmail.com> wrote:
>>
>> Can you provide some samples of what you are trying to match and
>> exclude? There might be alternative solutions.
>
>
>
> --
> __
>
> :(){ :|:& };:


Re: Subset w/ Inline::Perl5 RE as constraint

2020-11-06 Thread Paul Procacci
So two example patterns are:

[\\u0009\\u000A\\u000D\\u0020-\\u007E\\u0085\\u00A0-\\uD7FF\\uE000-\\uFFFD\\u1-\\u10]*
[\\p{L}\\p{Z}\\p{N}_.:\\/=+\\-@]*

To note, the RE's themselves cannot be changed as they are fed externally.
Given that I'm stuck with these RE's which I believe are PCRE, It was my
hopes to lean on perl to do the evaluation.
Raku's perl regex engine is too old to interpret it properly, hence the
shenanigans with Inline::Perl5.

Thanks,
Paul


On Fri, Nov 6, 2020 at 9:51 AM Parrot Raiser <1parr...@gmail.com> wrote:

> Can you provide some samples of what you are trying to match and
> exclude? There might be alternative solutions.
>


-- 
__

:(){ :|:& };:


Re: Subset w/ Inline::Perl5 RE as constraint

2020-11-06 Thread Brad Gilbert
I'm pretty sure you need to use single quotes for your example, as Raku
will replace the @_[0] before Perl has a chance to do anything with it.

On Thu, Nov 5, 2020, 10:23 PM Paul Procacci  wrote:

> https://github.com/niner/Inline-Perl5
>
> use Inline::Perl5;
>
> subset test of Str where EVAL "sub {@_[0] ~= m/\w+/}", :lang;
>
>
> Question:  Can you pass whatever {*} into eval for use in Inline::Perl5 a
> la subset?
> The above example is incomplete, I understand, however I'm looking to find
> a method of constraining Str's w/ >perl5.8 RE's in subset's without it
> getting too crazy.
>
> The RE's that come w/ raku proper are are much older version of RE and
> cannot accomplish what I need.
>
> Thanks in Advance,
> ~Paul
>
> --
> __
>
> :(){ :|:& };:
>


Re: Subset w/ Inline::Perl5 RE as constraint

2020-11-06 Thread Parrot Raiser
Can you provide some samples of what you are trying to match and
exclude? There might be alternative solutions.