Re: is static?

2003-03-18 Thread Matthijs van Duin
On Tue, Mar 18, 2003 at 01:53:59PM +1100, Damian Conway wrote: Function Assign unless... true||= defined //= exists h One is almost tempted by something like C??=. Well, almost. Nonono.. ??= is already for conditionals

Re: is static?

2003-03-18 Thread Aaron Crane
Smylers writes: I don't find the Perl 5 approach ugly: I actually like it, because it does exactly what it looks like it's doing, and doesn't require learning any special syntax or keyword. To have a variable exist beyond outside a sub, you declare it outside that sub. To prevent that

survey page? [OT, was Re: is static?]

2003-03-18 Thread Paul
Merely for the one small thing I might possibly contribute Would it be useful to have a convenient place to do polls? I suspect there already is one somewhere, but I'm unaware of it. I don't want to undermine the authority of the core planning team, but thought they might like to have a

Re: is static?

2003-03-18 Thread Paul
$a ??= $b :: $c; Are you serious? That's completely unnecessary, but so is $a ||= 1; I *LIKE* it!!! =o) __ Do you Yahoo!? Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop! http://platinum.yahoo.com

Re: is static?

2003-03-18 Thread arcadi shehter
Larry Wall writes: Another question is whether a class containing methods containing has would be confusing. The $s vs $.s distinction seems to help a bit there. That would seem to imply that class foo { has $s; has $.t; } declares a class attribute vs an

Re: is static?

2003-03-18 Thread Paul
sub foo() { env $s ??= 0; $s ++ ; } Although I still prefer calling it a trait on the data, I must admit that I like env...perhaps even better than is retained. Well, maybe not. But it's a cool thought that it's the environment.

Re: is static?

2003-03-18 Thread David Landgren
Damian Conway wrote: [...] Hence, I would argue, one ought to simply mark it with a trait: sub foo() { my $s is retained = 0; $s++; } Other possible trait names: is kept is preserved is permanent is reused is saved is stored is restored is

XML is Too Hard for Programmers = Tim Bray

2003-03-18 Thread Rich Morin
I have commented before on the face that Perl doesn't have Power Tools (read, idioms) that are well suited for handling XML. Turns out that Tim Bray agrees. http://www.tbray.org/ongoing/When/200x/2003/03/16/XML-Prog -r -- email: [EMAIL PROTECTED]; phone: +1 650-873-7841 http://www.cfcl.com/rdm

Re: survey page? [OT, was Re: is static?]

2003-03-18 Thread Michael Lazzaro
On Tuesday, March 18, 2003, at 06:49 AM, Paul wrote: Merely for the one small thing I might possibly contribute Would it be useful to have a convenient place to do polls? I suspect there already is one somewhere, but I'm unaware of it. I don't want to undermine the authority of the core

Re: is static?

2003-03-18 Thread Michael Lazzaro
Damian wrote: Hence, I would argue, one ought to simply mark it with a trait: FWIW, I personally think this is _absolutely_ the right approach. Using a trait is a very visible, very obvious way to say what's going on that is probably easier to remember than adding another keyword to the

Re: XML is Too Hard for Programmers = Tim Bray

2003-03-18 Thread Robin Berjon
Rich Morin wrote: I have commented before on the face that Perl doesn't have Power Tools (read, idioms) that are well suited for handling XML. Turns out that Tim Bray agrees. http://www.tbray.org/ongoing/When/200x/2003/03/16/XML-Prog You may want to look at the perl-xml thread called Tim Bray

Re: XML is Too Hard for Programmers = Tim Bray

2003-03-18 Thread Simon Cozens
[EMAIL PROTECTED] (Rich Morin) writes: I have commented before on the face that Perl doesn't have Power Tools (read, idioms) that are well suited for handling XML. Turns out that Tim Bray agrees. Tim Bray also says he gives up and uses regexes as a quick and dirty work around. So maybe these

Re: is static?

2003-03-18 Thread Austin Hastings
--- Uri Guttman [EMAIL PROTECTED] wrote: DC == Damian Conway [EMAIL PROTECTED] writes: DC Larry wrote: : sub foo() { : has $s //= 0; : $s ++ ; : } : : print foo, foo, foo; DC Futhermore, this approach opens another vermiferous can. I DC would argue that C//= is the

Re: XML is Too Hard for Programmers = Tim Bray

2003-03-18 Thread Robin Berjon
Simon Cozens wrote: [EMAIL PROTECTED] (Rich Morin) writes: I have commented before on the face that Perl doesn't have Power Tools (read, idioms) that are well suited for handling XML. Turns out that Tim Bray agrees. Tim Bray also says he gives up and uses regexes as a quick and dirty work

Re: is static?

2003-03-18 Thread Austin Hastings
--- Michael Lazzaro [EMAIL PROTECTED] wrote: Damian wrote: Hence, I would argue, one ought to simply mark it with a trait: FWIW, I personally think this is _absolutely_ the right approach. Hear him! I don't think anyone disagrees that staticness is a trait. (After all, even the folks that

Re: XML is Too Hard for Programmers = Tim Bray

2003-03-18 Thread Austin Hastings
--- Simon Cozens [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] (Rich Morin) writes: I have commented before on the face that Perl doesn't have Power Tools (read, idioms) that are well suited for handling XML. Turns out that Tim Bray agrees. Tim Bray also says he gives up and uses

Re: survey page? [OT, was Re: is static?]

2003-03-18 Thread Piers Cawley
Michael Lazzaro [EMAIL PROTECTED] writes: As much as people hated it, I think the P6 Operators thread was *quite* beneficial. It lead to the saving of ^ xor, and the hyper syntax, and quite a few other improvements, and got things pinned down squarely. I wouldn't mind seeing more of that

Re: XML is Too Hard for Programmers = Tim Bray

2003-03-18 Thread Robin Berjon
Austin Hastings wrote: FWIW, I've had to try to rewrite Microsoft's VCPROJ and SLN format files(*), which look a whole lot like XML. Sadly, if you change the order of independent entities in the file, Microsoft's internal parser rejects the file. This despite the fact that MS already has an XML

Re: XML is Too Hard for Programmers = Tim Bray

2003-03-18 Thread Michael Lazzaro
On Tuesday, March 18, 2003, at 09:55 AM, Austin Hastings wrote: To me, this says that there's no real commitment to doing XML. What there is seems to be a recognition that XML format is regular and comprehensible to others, so writing XML-like files becomes popular. Yep. Which makes things even

Re: XML is Too Hard for Programmers = Tim Bray

2003-03-18 Thread Bennett Todd
2003-03-18T13:54:12 Michael Lazzaro: A perl5-native parser can be rigged up fairly easily, but it's *numbingly* slow compared to the C version. I mean, 20-50 times slower, by my guess. That's the nature of the beast; XML requires a lexer which knows about more than just two or so character

Re: XML is Too Hard for Programmers = Tim Bray

2003-03-18 Thread Austin Hastings
--- Michael Lazzaro [EMAIL PROTECTED] wrote: On Tuesday, March 18, 2003, at 09:55 AM, Austin Hastings wrote: To me, this says that there's no real commitment to doing XML. What there is seems to be a recognition that XML format is regular and comprehensible to others, so writing

Re: XML is Too Hard for Programmers = Tim Bray

2003-03-18 Thread Dan Sugalski
At 10:54 AM -0800 3/18/03, Michael Lazzaro wrote: A perl5-native parser can be rigged up fairly easily, but it's *numbingly* slow compared to the C version. I mean, 20-50 times slower, by my guess. The speed issue when importing XML-like data (which we do *very frequently*) is a constant

Rules and hypotheticals: continuations versus callbacks

2003-03-18 Thread Matthijs van Duin
A quick note before I begin: the stuff in this email isn't just an implementation detail - it impacts the language too, that's why I'm posting it here. Should I cross-post to perl6-internals ? (I'm not really familiar with that list yet) I've recently spent thought on backtracking into

Re: is static?

2003-03-18 Thread arcadi shehter
Damian Conway writes: on the second thought : its quite strange ( though cute ) that currently the only way to make lexical persistent variable is based on garbage collector. it is referenced -- hence it is kept. may be it have to be more explicit like that sub counter(){ daemon $s;

Re: is static?

2003-03-18 Thread arcadi shehter
Larry Wall writes: I guess the real question would be, is it an overall simplification to allow has anywhere? There *is* an object out there representing each abstract closure (pre-instantiation), but it's a bit of a stretch from Every block is a closure to Every block is a closure

Re: is static?

2003-03-18 Thread arcadi shehter
on the second thought : its quite strange ( though cute ) that currently the only way to make lexical persistent variable is based on garbage collector. it is referenced -- hence it is kept. this brings to the following : every subroutine may have a daemon object of some sort associated with

Re: is static?

2003-03-18 Thread arcadi shehter
Larry Wall writes: Larry Wall writes: I guess the real question would be, is it an overall simplification to allow has anywhere? There *is* an object out there representing each abstract closure (pre-instantiation), but it's a bit of a stretch from Every block is a closure to Every

Statement modifiers (yes, again)

2003-03-18 Thread Matthijs van Duin
I just read Piers' summary: Matthijs van Duin wondered if the issue of multiple statement modifiers has been settled. The thread is long, and the answer is essentially (and authoritatively) Yes, it's settled. No, you can't do it. So, unless Larry changes his mind the point is moot. So apparently I

A6: Quick questions as I work on Perl6::Parameters

2003-03-18 Thread Brent Dax
First of all, Larry, do you have *any* idea how difficult you're making my life? :^) This stuff is damn hard to implement--I'm at 450 lines and counting, and I haven't even started the semantic analysis stuff, let alone *tested* anything. At least I have Filter::Simple's FILTER_ONLY and P::RD

Re: A6 Request: Change .req to .arity

2003-03-18 Thread Damian Conway
Austin Hastings wrote: Request: Change .req method of Routine to .arity I rather like this idea. Damian

Re: A6: Quick questions as I work on Perl6::Parameters

2003-03-18 Thread Damian Conway
Brent Dax wrote: First of all, Larry, do you have *any* idea how difficult you're making my life? :^) This stuff is damn hard to implement--I'm at 450 lines and counting, and I haven't even started the semantic analysis stuff, let alone *tested* anything. At least I have Filter::Simple's

Re: A6: Quick questions as I work on Perl6::Parameters

2003-03-18 Thread Simon Cozens
[EMAIL PROTECTED] (Damian Conway) writes: Just wait till you see P::RD's successor: Perl6::Rules ;-) I was waiting for its successor, Parse::FastDescent. ;) Seriously, someone on IRC the other day was claiming that they already had a P6RE-in-P5 implementation, and did show me some code, but

Re: A6: Quick questions as I work on Perl6::Parameters

2003-03-18 Thread Simon Cozens
[EMAIL PROTECTED] (Simon Cozens) writes: Seriously, someone on IRC the other day was claiming that they already had a P6RE-in-P5 implementation, and did show me some code, but I've forgotten where it lives or their real name. ttp://www.liacs.nl/~mavduin/P6P5_0.00_01.tar.gz -- IBM: It

Re: A6: Quick questions as I work on Perl6::Parameters

2003-03-18 Thread Damian Conway
Simon Cozens wrote: [EMAIL PROTECTED] (Simon Cozens) writes: Seriously, someone on IRC the other day was claiming that they already had a P6RE-in-P5 implementation, and did show me some code, but I've forgotten where it lives or their real name. ttp://www.liacs.nl/~mavduin/P6P5_0.00_01.tar.gz

Re: A6: Quick questions as I work on Perl6::Parameters

2003-03-18 Thread Simon Cozens
[EMAIL PROTECTED] (Damian Conway) writes: Thanks for the pointer. I'm taking a very different approach, but it will certainly be useful to have two independent and parallel implementations to run against each other. Well, I'll try and dig out the one I wrote at STL too, if regexes haven't

Re: A6: Quick questions as I work on Perl6::Parameters

2003-03-18 Thread Larry Wall
On Wed, Mar 19, 2003 at 10:34:26AM +1100, Damian Conway wrote: : Brent Dax wrote: : : First of all, Larry, do you have *any* idea how difficult you're making : my life? :^) This stuff is damn hard to implement--I'm at 450 lines : and counting, and I haven't even started the semantic analysis

Re: A6 Request: Change .req to .arity

2003-03-18 Thread Larry Wall
On Wed, Mar 19, 2003 at 10:27:24AM +1100, Damian Conway wrote: : Austin Hastings wrote: : : Request: Change .req method of Routine to .arity : : I rather like this idea. I'm not attached to .req. But .arity will be opaque to many non-mathematicians. Plus, it's throwing out minimum part of

Re: A6: Quick questions as I work on Perl6::Parameters

2003-03-18 Thread Damian Conway
Larry wrote: : The invocant is bound to both. Hmmm. I'm not so sure. I can argue it both ways. Sure, it's nice to be able to attach an absolute rule to method, but I'm inclined to think that unsigged methods work a little more like Perl 5 in that case, and just put the invocant (or rather

Re: A6 Request: Change .req to .arity

2003-03-18 Thread Damian Conway
Larry wrote: On the other hand, I could see an argument that said anyone who doesn't know what .arity means shouldn't be writing routines that depend on it... That was more or less my line of thought. Damian

Re: A6: Quick questions as I work on Perl6::Parameters

2003-03-18 Thread Larry Wall
On Wed, Mar 19, 2003 at 01:07:32PM +1100, Damian Conway wrote: : I specifically avoided type or kind because I didn't want to imply : mere type matching when something more general might be happening, : such as smart matching, of which type matching is a small subset. : : So maybe $which would be

Re: is static?

2003-03-18 Thread Larry Wall
On Mon, Mar 17, 2003 at 10:03:29PM -0500, Uri Guttman wrote: : but that is a good name IMO. $s is static vs dynamic (on the stack). the : other overloaded meanings of static from c/c++ are baggage we can drop. Gee, if static var makes a subroutine stateful, maybe it's just: state $s = 0;

Re: A6: Quick questions as I work on Perl6::Parameters

2003-03-18 Thread Damian Conway
Larry wrote: On Wed, Mar 19, 2003 at 01:07:32PM +1100, Damian Conway wrote: : I specifically avoided type or kind because I didn't want to imply : mere type matching when something more general might be happening, : such as smart matching, of which type matching is a small subset. : : So maybe

apo6 infinitie ranges imply possibility of the identity array

2003-03-18 Thread david nicol
I think a range object needn't ever expand itself. Consider: @Floor = (0..Inf,-Inf..-1); -- Life is like a sewer: what you get out of it depends on what you put into it. -- Hen3ry

Re: is static?

2003-03-18 Thread Damian Conway
Larry wrote: Gee, if static var makes a subroutine stateful, maybe it's just: state $s = 0; That's very nice, and (unlike Chas) it's verbose enough. It would also work well for creating class-private shared state. And for things like loop counters: while @list { (state

Re: A6: Quick questions as I work on Perl6::Parameters

2003-03-18 Thread Luke Palmer
Damian wrote: Alternatively, this might be an ideal spot for adverbs: return :Block @foo; want :Method Lazy; caller :{.label eq 'MAINLOOP}; Errr what is that odd and disturbing notation? I don't recall ever seeing that. [...] return Block: @foo; want

Re: A6: Quick questions as I work on Perl6::Parameters

2003-03-18 Thread Damian Conway
Or maybe Cwhere is just the way we spell the adverb specifier? And therefore, in turn, perhaps Cwhere is how we set properties on a subroutine call: foo('bar') where error('fatal'); Then, within the subroutine call, one can access them via C_.props: sub foo($arg) { return 1 if

Re: A6: Quick questions as I work on Perl6::Parameters

2003-03-18 Thread Damian Conway
Luke Palmer wrote: return :Block @foo; want :Method Lazy; caller :{.label eq 'MAINLOOP}; Errr what is that odd and disturbing notation? I don't recall ever seeing that. Perhaps not. Larry has long been hoarding the colon. One of the possible uses for it was as an

Re: Statement modifiers (yes, again)

2003-03-18 Thread Luke Palmer
To save people from having to re-read the thread, here is the actual proposal in detail again: PROPOSAL Replace the 'if', 'unless', 'when' statement modifiers by identically named lowest-precedence left-associative operators that short-circuit from right to left. This means

Re: is static?

2003-03-18 Thread Larry Wall
On Tue, Mar 18, 2003 at 01:53:59PM +1100, Damian Conway wrote: : Larry wrote: : : : sub foo() { : : has $s //= 0; : : $s ++ ; : : } : : : : print foo, foo, foo; : : This is interesting, but I think it would be a mistake to give Chas two : unrelated meanings... I think it's also a

Re: A6: Quick questions as I work on Perl6::Parameters

2003-03-18 Thread Larry Wall
On Wed, Mar 19, 2003 at 01:07:32PM +1100, Damian Conway wrote: : Larry wrote: : A file-scoped $_ could be considered a sort of a half-way house to full : signatured $_ semantics. You couldn't clobber some other module's $_, : but you still get a dynamically scoped $_ where naive users expect

Re: is static?

2003-03-18 Thread Uri Guttman
LW == Larry Wall [EMAIL PROTECTED] writes: LW On Mon, Mar 17, 2003 at 10:03:29PM -0500, Uri Guttman wrote: LW : but that is a good name IMO. $s is static vs dynamic (on the stack). the LW : other overloaded meanings of static from c/c++ are baggage we can drop. LW Gee, if static var

Re: A6: Quick questions as I work on Perl6::Parameters

2003-03-18 Thread Damian Conway
Larry Wall wrote: On Wed, Mar 19, 2003 at 01:07:32PM +1100, Damian Conway wrote: : Larry wrote: : A file-scoped $_ could be considered a sort of a half-way house to full : signatured $_ semantics. You couldn't clobber some other module's $_, : but you still get a dynamically scoped $_ where

Re: is static?

2003-03-18 Thread Damian Conway
Larry wrote: I think it's also a mistake to give Cmy two unrelated meanings. Yes. I fully concede this point. A declarator is the way to go. They are lexically scoped aliases to properties of the current block. Err. Properties or traits? Presumably traits, since they're declared at

Parrot 0.0.10 released

2003-03-18 Thread Steve Fink
The Parrot team is proud to announce the release of Parrot version 0.0.10, code named Juice (based on the new -Oj optimization flag). It is downloadable from http://www.cpan.org/authors/id/S/SF/SFINK/parrot-0.0.10.tar.gz. If you would like to check the latest copy out from CVS, see the

This week's Perl 6 Summary

2003-03-18 Thread Piers Cawley
The Perl 6 Summary for the week ending 20030316 Spring is in the air, the Apocalypse is here (or imminent, depending on which sense of the word 'Apocalypse' you are using). We'll start with perl6-internals as usual, before bracing ourselves for the increased volume and ploughing on

Re: Rules and hypotheticals: continuations versus callbacks

2003-03-18 Thread Luke Palmer
My main questions are: Is there a simpler system I'm overlooking? Which of the two systems would you prefer if speed isn't the issue? Mechanism 1. Which system is likely to run faster on parrot? They're both likely to be very slow. and maybe also: What is the current plan?

megillah (was Re: This week's Perl 6 Summary)

2003-03-18 Thread Uri Guttman
PC == Piers Cawley [EMAIL PROTECTED] writes: PC To do that you need to declare the parameter with is PC copy. Uri noted that he really should keep his finger off the PC send button until he's read the whole 'megilla', whatever one PC of those is. it is appropriate that

Re: megillah (was Re: This week's Perl 6 Summary)

2003-03-18 Thread Austin Hastings
--- Uri Guttman [EMAIL PROTECTED] wrote: PC == Piers Cawley [EMAIL PROTECTED] writes: PC To do that you need to declare the parameter with is PC copy. Uri noted that he really should keep his finger off the PC send button until he's read the whole 'megilla', whatever