Re: String representation

2000-12-16 Thread Jarkko Hietaniemi
On Fri, Dec 15, 2000 at 03:10:16PM -0500, Dan Sugalski wrote: > At 11:18 AM 12/15/00 -0600, Jarkko Hietaniemi wrote: > >On Fri, Dec 15, 2000 at 12:13:01PM +, Simon Cozens wrote: > > > IMHO, the first thing we need to design and code is the API and runtime > > > library, since everything else b

Re: RFC from a newbie: Method References

2000-12-16 Thread Randal L. Schwartz
> "Ian" == Ian Hickson <[EMAIL PROTECTED]> writes: Ian> So: What I would love to see in Perl 6 is a way of having a single scalar Ian> that holds a reference to a particular instance's method. Ian> Is there any chance that this would be considered? Or is this already Ian> possible in Perl 5

Re: Perl 5's "non-greedy" matching can be TOO greedy!

2000-12-16 Thread brian d foy
On Fri, 15 Dec 2000, Deven T. Corzine wrote: > On 15 Dec 2000, Randal L. Schwartz wrote: > > > > "Deven" == Deven T Corzine <[EMAIL PROTECTED]> writes: > > > > Deven> As for special-case rules, I believe that my proposed modification would > > Deven> REMOVE a special-case semantic rule, at

Re: Perl 5's "non-greedy" matching can be TOO greedy!

2000-12-16 Thread brian d foy
On Fri, 15 Dec 2000, Deven T. Corzine wrote: > If we want the first interesting match, and we're preferring early matches > and short matches, I believe that "bd" is more interesting. then write a regex that describes that pattern. the pattern is one b followed by

Re: Perl 5's "non-greedy" matching can be TOO greedy!

2000-12-16 Thread brian d foy
On Fri, 15 Dec 2000, Simon Cozens wrote: > On Fri, Dec 15, 2000 at 11:39:08AM -0800, Randal L. Schwartz wrote: > > Tell me how you can do that without breaking much existing code. > > Pssst, Randal, this is Perl 6, not p5p. well, we do have to translate 95% of that code to Perl 6 without a hitc

Perl 6 API, was Re: [PATCH] strtoq, strtou(q|ll|l) testing (was [PATCH] faster and 64 bit preserving arithmetic)

2000-12-16 Thread Simon Cozens
On Sat, Dec 16, 2000 at 01:17:16PM -0600, Jarkko Hietaniemi wrote: > > 1. Would probably be easier/safer to roll our own strtoq > Which approach I heartily recommend for Perl 6, incidentally... One for the API. Hopefully next week I'll have a chance to sit down and think about what functions we n

Re: RFC from a newbie: Method References

2000-12-16 Thread Ian Hickson
On 16 Dec 2000, Randal L. Schwartz wrote: > > >>> So: What I would love to see in Perl 6 is a way of having a single >>> scalar that holds a reference to a particular instance's method. >>> Is there any chance that this would be considered? Or is this already >>> possible in Perl 5 but I have mis

Re: Now, to try again...

2000-12-16 Thread David Grove
Dan Sugalski <[EMAIL PROTECTED]> wrote: > (Keeping in mind the input is source, and > the output is a syntax tree) Will you be my hero? Or Your clarity is sincerely appreciated. Ok, _from_ the books on the reading list, I'm seeing no precedent for a parser/lexer/tokenizer that uses multipl

Re: Now, to try again...

2000-12-16 Thread Simon Cozens
On Sat, Dec 16, 2000 at 02:08:37PM +, David Grove wrote: > Ok, _from_ the books on the reading list, I'm seeing no precedent for a > parser/lexer/tokenizer that uses multiple input "languages". Yes I know > that GCC does F77/ASM/C/C++ but I'm not sure those completely relate. That does relate

Re: RFC from a newbie: Method References

2000-12-16 Thread Michael G Schwern
On Fri, Dec 15, 2000 at 11:23:23PM -0800, Ian Hickson wrote: > Having said that: The only feature that I really miss from Perl 5 is the > lack of method pointers -- that is, references to functions in a package > with an associated object. Oh, that's easy. Use a closure... my $foo = Foo->new; m

Re: Now, to try again...

2000-12-16 Thread Nicholas Clark
On Sat, Dec 16, 2000 at 02:27:24AM -0500, Dan Sugalski wrote: > Okay, it's time to try again, and this time I think it's best to skip the > specifics of parameters and suchlike things. > > How do we want the parser/lexer/tokenizer piece to work, and what sorts of > hooks do we want to provide t

Re: RFC from a newbie: Method References

2000-12-16 Thread Jeremy Howard
Michael G Schwern wrote: > package Class::MethRef; > use strict; > > sub meth_ref { > my($proto, $method, @args) = @_; > return sub { $proto->$method(@args) }; > } > > > So this... > > my $meth_ref = $obj->meth_ref('foo', @some_stuff); > $meth_ref->(); > > is equivalent to this.. > > $

Re: Perl 5's "non-greedy" matching can be TOO greedy!

2000-12-16 Thread Bart Lateur
On Fri, 15 Dec 2000 13:42:44 -0700, Kevin Walker wrote: >Deven seems to be advocating thinking about regular expressions >without worrying too much about the implementation, even at a fairly >abstract level. Here's a counter example: /dc/ Shouldn't a non-greed

Re: RFC from a newbie: Method References

2000-12-16 Thread Michael G Schwern
On Sun, Dec 17, 2000 at 12:11:01PM +1100, Jeremy Howard wrote: > Something to be careful of--it's easy to create a circular reference when > using method pointers. As a result, neither the referrer nor referee objects > are ever destroyed. > > When using method references it's important that your

Re: Now, to try again...

2000-12-16 Thread David Grove
Simon Cozens <[EMAIL PROTECTED]> wrote: > > Simon (?) brought up the problem that we might end up with a monolithic > > beastie > > I don't recall saying anything about it being a problem. :) Ok, it scared somebody. That much I remember. > > Reading what you say, "parser/lexer/tokenizer"

Re: RFC from a newbie: Method References

2000-12-16 Thread Michael Fowler
On Fri, Dec 15, 2000 at 11:23:23PM -0800, Ian Hickson wrote: > So: What I would love to see in Perl 6 is a way of having a single scalar > that holds a reference to a particular instance's method. > > Is there any chance that this would be considered? Or is this already > possible in Perl 5 but I

Re: RFC from a newbie: Method References

2000-12-16 Thread Ian Hickson
On Fri, 15 Dec 2000, Michael Fowler wrote: > On Fri, Dec 15, 2000 at 11:23:23PM -0800, Ian Hickson wrote: > > So: What I would love to see in Perl 6 is a way of having a single scalar > > that holds a reference to a particular instance's method. > > > > Is there any chance that this would be con