A couple nights ago I read RFC93 as discussed in Apoc. 5 and got
fired up- it reminded me of some ideas from when I was hacking
Henry Spencer's regexp package. How to futher generalize regular
expression input. It's a bit orthoginal- a properly implemented
RFC93 make some difficult things easier-
--- Yary Hluchan <[EMAIL PROTECTED]> wrote:
> A couple nights ago I read RFC93 as discussed in Apoc. 5 and got
> fired up- it reminded me of some ideas from when I was hacking
> Henry Spencer's regexp package. How to futher generalize regular
> expression input. It's a bit orthoginal- a properly
> "AH" == Austin Hastings <[EMAIL PROTECTED]> writes:
AH> grammar Rainbow;
AH> rule color {...}; # this one's on you.
AH> rule same_color($color is Colorific)
AH> {
AH>::: { fail unless $1.looks_like($color); }
AH> }
AH> rule band($color is Colorific)
AH> {
AH> +
I'm reordering this post rather than retype stuff. Forgive me.
--- Uri Guttman <[EMAIL PROTECTED]> wrote:
> for the p6 regex impaired among us, please explain that. it might
> make a nice tute for the docs. i get the general picture but i don't
> follow how it works regarding the color checking.
Thanks for the thoughtful consideration. Austin's given some high-
level examples of the kind I was hoping for,
"AH>" = Austin Hastings
AH> grammar Rainbow;
AH> use Colorific; # Import C and C, among others.
AH>
AH> What I don't know is how to recognize a color, which is to say I don't
AH> kno
On Wed, Apr 02, 2003 at 10:16:37AM -0800, Austin Hastings wrote:
> And the Colorific class supposedly has a way to determine if two colors
> look about like each other. Again, I don't know how that works, but I
> don't need to.
>
>> AH> rule same_color($color is Colorific)
>> AH> {
>> AH>
W= Andrew Wilson, AH=Austin Hastings
AH> This is really probably bad code. Maybe a better rule would be:
AH>
AH> rule same_color($color is Colorific)
AH> {
AH>::: { fail unless $color.looks_like($1); }
AH> }
AH>
AH> I KNOW that $color is an object-of-type-Colorific, while I'm not sure,
AH> fra
--- Andrew Wilson <[EMAIL PROTECTED]> wrote:
> On Wed, Apr 02, 2003 at 10:16:37AM -0800, Austin Hastings wrote:
> > And the Colorific class supposedly has a way to determine if two
> colors
> > look about like each other. Again, I don't know how that works, but
> I
> > don't need to.
> >
> >> A
Austin Hastings wrote:
Another example. Let's say there's a class that deals with colors.
It has an operator that returns true if two colors look about the
same. Given a list of color objects, is there a regexp to find a
rainbow? Even if the color class doesn't support stringification?
Yes
--- Yary Hluchan <[EMAIL PROTECTED]> wrote:
> Thanks for the thoughtful consideration. Austin's given some high-
> level examples of the kind I was hoping for,
>
> "AH>" = Austin Hastings
>
> AH> grammar Rainbow;
> AH> use Colorific; # Import C and C, among others.
> AH>
> AH> What I don't kn
>This isn't quite meaningful. What does a "non-letter atom" mean?
>
>If you're processing a file or a string, that's the basic P6 model.
>
>But consider \u for unicode -- that's a multi-byte object in the
>stream. So for streams of bytes, the right way is just to code Ccolor> such that it recogniz
> What I think you're looking for is the fact that they're not regexes any more. They
> are > "rexen", but in horrifying-secret-reality, what has happened is that Larry's
> decided
> to move Fortran out of core, and replace it with yacc.
just an aside, and a bit off-topic, but has anybody consid
> just an aside, and a bit off-topic, but has anybody considered
> hijacking the regular expression engine in perl6 and turning it into
> its opposite, namely making *productions* of strings/sounds/whatever
> that could possibly match the regular expression? ie:
>
> a*
>
> producing
>
> ''
> a
>
--- Edward Peschko <[EMAIL PROTECTED]> wrote:
> > What I think you're looking for is the fact that they're not
> regexes any more. They are > "rexen", but in
> horrifying-secret-reality, what has happened is that Larry's decided
> > to move Fortran out of core, and replace it with yacc.
>
> just a
On Thu, Apr 03, 2003 at 07:29:37AM -0800, Austin Hastings wrote:
This has been alluded to before.
What would /A*B*/ produce?
Because if you were just processing the rex, I think you'd have to
finish generating all possibilities of A* before you began iterating
over B*...
The "proper" way would be
> On Thu, Apr 03, 2003 at 07:29:37AM -0800, Austin Hastings wrote:
> >This has been alluded to before.
> >
> >What would /A*B*/ produce?
> >
> >Because if you were just processing the rex, I think you'd have to
> >finish generating all possibilities of A* before you began iterating
> >over B*...
>
Austin Hastings writes:
>
> On the other hand, let's suppose that you've got a vast array of
> floating point data:
>
> my float @seti = {...evidence of intelligence, somewhere...};
>
> It's a fair question to ask how to retarget the rexengine to use @seti
> as the input stream. (I hereb
a = arcadi shehter <[EMAIL PROTECTED]>
a>I think this was already discussed once and then it was proposed to
a>attach a property to characters of the string
a>
a> sub peek_at_sky {
a>
a> my Color @numbers = peek_with_some_hardware;
a>
a> my $say_it = join map { "1" but color($_) } @number
This is a big long post containing essentially me scratching my head at
Luke's code. Since Uri asked yesterday for a tutorial-type explanation
of some of the syntax, and since I wanted to scream and ask the same
thing of Luke today when I first read his "5 unobfuscated friggin
lines", I'm putting i
Edward Peschko wrote:
What I think you're looking for is the fact that they're not regexes any more. They are > "rexen", but in horrifying-secret-reality, what has happened is that Larry's decided
to move Fortran out of core, and replace it with yacc.
just an aside, and a bit off-topic, but h
>making *productions* of strings/sounds/whatever that could possibly
>match the regular expression?
>
>>Correct me if I am wrong, but isn't this the :any switch of apoc 5?
>>http://www.perl.com/pub/a/2002/06/26/synopsis5.html
Not really, unless the input string is infinite! :any returns all
subst
Luke Palmer <[EMAIL PROTECTED]> writes:
>> On Thu, Apr 03, 2003 at 07:29:37AM -0800, Austin Hastings wrote:
>> >This has been alluded to before.
>> >
>> >What would /A*B*/ produce?
>> >
>> >Because if you were just processing the rex, I think you'd have to
>> >finish generating all possibilities o
> > use Permutations <>;
> >
> > # Generate all strings of length $n
> > method Rule::Group::generate(Int $n) { # Type sprinkles :)
> > compositions($n, [EMAIL PROTECTED]) ==> map {
> > my @rets = map {
> > $^atom.generate($^n)
> > } zi
On Thu, Apr 03, 2003 at 07:30:10AM -0700, Luke Palmer wrote:
> > just an aside, and a bit off-topic, but has anybody considered
> > hijacking the regular expression engine in perl6 and turning it into
> > its opposite, namely making *productions* of strings/sounds/whatever
> > that could possibly m
> Luke Palmer <[EMAIL PROTECTED]> writes:
>
> >> On Thu, Apr 03, 2003 at 07:29:37AM -0800, Austin Hastings wrote:
> >> >This has been alluded to before.
> >> >
> >> >What would /A*B*/ produce?
> >> >
> >> >Because if you were just processing the rex, I think you'd have to
> >> >finish generating a
Yary Hluchan writes:
> a = arcadi shehter <[EMAIL PROTECTED]>
> a>I think this was already discussed once and then it was proposed to
> a>attach a property to characters of the string
> a>
> a> sub peek_at_sky {
> a>
> a> my Color @numbers = peek_with_some_hardware;
> a>
> a> my $
Luke Palmer wrote:
On Thu, Apr 03, 2003 at 07:29:37AM -0800, Austin Hastings wrote:
This has been alluded to before.
What would /A*B*/ produce?
Because if you were just processing the rex, I think you'd have to
finish generating all possibilities of A* before you began iterating
over B*...
Joseph F. Ryan wrote:
Luke Palmer wrote:
On Thu, Apr 03, 2003 at 07:29:37AM -0800, Austin Hastings wrote:
This has been alluded to before.
What would /A*B*/ produce?
Because if you were just processing the rex, I think you'd have to
finish generating all possibilities of A* before you began
Yary Hluchan wrote:
making *productions* of strings/sounds/whatever that could possibly
match the regular expression?
Correct me if I am wrong, but isn't this the :any switch of apoc 5?
http://www.perl.com/pub/a/2002/06/26/synopsis5.html
Not really, unless the input string is infinite!
Well, t
Um. Maybe it was just bad writing on my part, but it does not seem
to me that what I already said about RFC 93 in A5 has sunk in at all.
Larry
30 matches
Mail list logo