Re: [perl #21668] APL doesn't use sigils

2003-03-25 Thread Benjamin Goldberg
Adam Turoff wrote: > Benjamin Goldberg wrote: >> Adam Turoff wrote: >>> On Mon, Mar 24, 2003 at 08:21:51PM -0500, Benjamin Goldberg wrote: And what happens if a programmer wants to have two different variables, of two different types, with the same name, such as @data and %data?

Re: A6: argument initializations via //=, ||=, ::=

2003-03-25 Thread Damian Conway
Matthijs van Duin wrote: my $x = 1;# initialization $x = 1;# assignment Woo, C++ :-) Low blow, Matthijs! ;-) Not *exactly* the same, but the same line of thought, yes. Considering 'our' merely declares a lexical alias to a package var, how do we initialize package vars?

Re: A6: argument initializations via //=, ||=, ::=

2003-03-25 Thread Paul
--- Damian Conway <[EMAIL PROTECTED]> wrote: > However I still think we're probably multiplying entities > unnecessarily. A beautiful if somewhat understated reference to Occam's Razor. While the synoptic synthesis of the writing of William of Occam is often translated into English as "One should

Bonsai

2003-03-25 Thread Zach Lipton
After many months of poking, prodding, and slacking off, I am pleased to announce Bonsai for the parrot cvs repository. The executive summary: see http://tinderbox.perl.org/bonsai, play Also see mozilla.org's summary of Bonsai at http://www.mozilla.org/hacking/bonsai.html. While much of this docu

Re: A6: argument initializations via //=, ||=, ::=

2003-03-25 Thread Paul
> > sub myprint(+$file is IO:File is rw ::= IO:STDOUT, [EMAIL PROTECTED]) {...} > As a side note... that sig will not do the behavior you've described. > You instead want this: > > sub myprint([EMAIL PROTECTED], +$file is IO:File is rw ::= IO:STDOUT) {...} > The named parameter +$file has to go beh

Re: [perl #21668] APL doesn't use sigils

2003-03-25 Thread Adam Turoff
On Tue, Mar 25, 2003 at 09:25:30PM -0500, Benjamin Goldberg wrote: > Adam Turoff wrote: > > On Mon, Mar 24, 2003 at 08:21:51PM -0500, Benjamin Goldberg wrote: > > > And what happens if a programmer wants to have two different > > > variables, of two different types, with the same name, such as @dat

Re: A6: argument initializations via //=, ||=, ::=

2003-03-25 Thread Damian Conway
Michael Lazzaro wrote: Seriously, tho, I'm not sure I understand the constantness part. sub foo($x = 1) {...} # A6 syntax sub foo(?$x = 1) {...} I read the above as saying $x is indeed constant, but if it's not explicitly placed by the caller, we're going to pretend the caller pas

Re: [perl #21668] APL doesn't use sigils

2003-03-25 Thread Benjamin Goldberg
Adam Turoff wrote: > > On Mon, Mar 24, 2003 at 08:21:51PM -0500, Benjamin Goldberg wrote: > > And what happens if a programmer wants to have two different > > variables, of two different types, with the same name, such as @data > > and %data? > > > > Without sigils, it cannot be done. > > Vast nu

Re: A6: argument initializations via //=, ||=, ::=

2003-03-25 Thread Michael Lazzaro
On Tuesday, March 25, 2003, at 02:19 PM, Damian Conway wrote: And I don't think that allowing 20 different types of assignment in the parameter list of a subroutine actually helps at all. Especially since the vast majority of parameters in Perl 6 will be constant. Twenty types of _initialization

Re: A6: argument initializations via //=, ||=, ::=

2003-03-25 Thread Damian Conway
Mark Biggar wrote: sub myprint(+$file is IO:File is rw ::= IO:STDOUT, [EMAIL PROTECTED]) {...} Should be: sub myprint([EMAIL PROTECTED], +$file is IO:File is rw ::= $*OUT) {...} although maybe what I really want is := instead. I suspect so. The binding of a parameter is most definitely run-ti

Re: A6: argument initializations via //=, ||=, ::=

2003-03-25 Thread Michael Lazzaro
On Tuesday, March 25, 2003, at 03:35 PM, Mark Biggar wrote: sub myprint(+$file is IO:File is rw ::= IO:STDOUT, [EMAIL PROTECTED]) {...} open f ">/a/d/v/f/r"; myprint file => f, "Hello World!\n"; # goes to f myprint "Differnet World!\n";# goes to IO:STDOUT As a side note... that sig will n

Re: A6: argument initializations via //=, ||=, ::=

2003-03-25 Thread Mark Biggar
Damian Conway wrote: I don't see how ::= (compile-time-bind) can be used as the initialize-if-non-existent operator. I mean, it happens in the wrong phase (compile-time, not run-time) and it does the wrong thing (binding, not assignment). The only case I can think of where is might be useful is

Re: P6ML?

2003-03-25 Thread Christian Renz
of crap known as XSL. An XML-based derivative that performs XML transformations, allowing/using embedded P6 regexs, closures, etc., and able to more easily translate XML <==> P6 data. I'm still quite XML-phobic, but I see the need for strong XML support in Perl 6. However, I'd like to work with

Re: A6: argument initializations via //=, ||=, ::=

2003-03-25 Thread Jonathan Scott Duff
On Tue, Mar 25, 2003 at 11:27:55PM +0100, Matthijs van Duin wrote: > On Wed, Mar 26, 2003 at 09:19:42AM +1100, Damian Conway wrote: > > my $x = 1;# initialization > >$x = 1;# assignment > > Woo, C++ :-) > > Considering 'our' merely declares a lexical alias to a package var,

Re: A6: argument initializations via //=, ||=, ::=

2003-03-25 Thread Jonathan Scott Duff
On Wed, Mar 26, 2003 at 09:19:42AM +1100, Damian Conway wrote: > We then simply define the "=" in: > > sub foo ( ?$bar = $baz ) {...} > > to be an initialization (since it's on the declaration of the > parameter). If the parameter has already be bound to some other > container, then that ot

Re: A6: argument initializations via //=, ||=, ::=

2003-03-25 Thread Matthijs van Duin
On Wed, Mar 26, 2003 at 09:19:42AM +1100, Damian Conway wrote: my $x = 1;# initialization $x = 1;# assignment Woo, C++ :-) Considering 'our' merely declares a lexical alias to a package var, how do we initialize package vars? -- Matthijs van Duin -- May the Forth b

Re: A6: argument initializations via //=, ||=, ::=

2003-03-25 Thread Damian Conway
I don't see how ::= (compile-time-bind) can be used as the initialize-if-non-existent operator. I mean, it happens in the wrong phase (compile-time, not run-time) and it does the wrong thing (binding, not assignment). For example: sub foo { state $count ::= 0;# $count b

Re: A6: argument initializations via //=, ||=, ::=

2003-03-25 Thread Jonathan Scott Duff
On Tue, Mar 25, 2003 at 01:47:32PM -0800, Michael Lazzaro wrote: > > On Tuesday, March 25, 2003, at 11:08 AM, Jonathan Scott Duff wrote: > > > On Tue, Mar 25, 2003 at 10:42:39AM -0800, Michael Lazzaro wrote: > >> But it is certainly possible to extend the initialization capabilities > >> to be m

Re: A6: argument initializations via //=, ||=, ::=

2003-03-25 Thread Michael Lazzaro
On Tuesday, March 25, 2003, at 11:08 AM, Jonathan Scott Duff wrote: On Tue, Mar 25, 2003 at 10:42:39AM -0800, Michael Lazzaro wrote: But it is certainly possible to extend the initialization capabilities to be more robust: sub foo($x = 'blah') {...} # wrong: use one of the below sub

Re: P6ML? [OT]

2003-03-25 Thread Dan Sugalski
At 12:47 PM -0800 3/25/03, Paul wrote: > >> |==[*]| >> Sarcasmeter? > >lol -- I think my BS-o-meter just redlined, too Heh. Sorry 'bout that. Bring it to OSCON and I'll get it fixed. :) lol -- when/where is that? (Seems all I do here is

Re: P6ML?

2003-03-25 Thread Michael Lazzaro
On Tuesday, March 25, 2003, at 11:02 AM, Robin Berjon wrote: Michael Lazzaro wrote: So, is anyone working on a P6ML, and/or is there any discussion/agreement of what it would entail? Imho P6ML is a bad idea, if it means what I think it means (creating a parser for quasi-MLs). People will laugh a

Re: A6: argument initializations via //=, ||=, ::= [OT]

2003-03-25 Thread Paul
--- Jonathan Scott Duff <[EMAIL PROTECTED]> wrote: > On Tue, Mar 25, 2003 at 12:19:30PM -0800, Paul wrote: > > Is there a page up anywhere that summarizes the latest > > prognostications? > > Mike Lazzaro had compiled the state-of-the-ops for perl6, but I don't > know if it's anywhere other than

Re: P6ML? [OT]

2003-03-25 Thread Paul
> >> |==[*]| > >> Sarcasmeter? > > > >lol -- I think my BS-o-meter just redlined, too > > Heh. Sorry 'bout that. Bring it to OSCON and I'll get it fixed. :) lol -- when/where is that? (Seems all I do here is ask dumb questions). *sigh* >

Re: A6: argument initializations via //=, ||=, ::= [OT]

2003-03-25 Thread Jonathan Scott Duff
On Tue, Mar 25, 2003 at 12:19:30PM -0800, Paul wrote: > Is there a page up anywhere that summarizes the latest > prognostications? Mike Lazzaro had compiled the state-of-the-ops for perl6, but I don't know if it's anywhere other than in the archives for this list. Just go to google groups and sea

Re: P6ML? [OT]

2003-03-25 Thread Dan Sugalski
At 11:52 AM -0800 3/25/03, Paul wrote: --- Austin Hastings <[EMAIL PROTECTED]> wrote: --- Dan Sugalski <[EMAIL PROTECTED]> wrote: > At 10:44 AM -0800 3/25/03, Michael Lazzaro wrote: > >So, is anyone working on a P6ML, and/or is there any > >discussion/agreement of what it would entail? > > I,

Re: A6: argument initializations via //=, ||=, ::= [OT]

2003-03-25 Thread Paul
(Note forwarded to the list as penance for my silliness. :) > > > sub foo($x .= "foo") {...} # Append "foo" to whatever $x given > > > sub foo($x ~= "foo") {...} # smart-test $x against "foo" > > Well, last time I looked (granted, it could've changed numerous times > since then) ~ was the stri

Re: P6ML? [OT]

2003-03-25 Thread Austin Hastings
--- Paul <[EMAIL PROTECTED]> wrote: > > --- Austin Hastings <[EMAIL PROTECTED]> wrote: > > --- Dan Sugalski <[EMAIL PROTECTED]> wrote: > > > At 10:44 AM -0800 3/25/03, Michael Lazzaro wrote: > > > >So, is anyone working on a P6ML, and/or is there any > > > >discussion/agreement of what it would

Re: P6ML? [OT]

2003-03-25 Thread Paul
--- Austin Hastings <[EMAIL PROTECTED]> wrote: > --- Dan Sugalski <[EMAIL PROTECTED]> wrote: > > At 10:44 AM -0800 3/25/03, Michael Lazzaro wrote: > > >So, is anyone working on a P6ML, and/or is there any > > >discussion/agreement of what it would entail? > > > > I, for one, think it's a great i

Re: P6ML?

2003-03-25 Thread Austin Hastings
--- Robin Berjon <[EMAIL PROTECTED]> wrote: > If it is creating a /toolset/ to make recuperating data from a > quasi-XML (aka > tag soup) then it is an interesting area of research. I can think of > two approaches: > >- have a parametrisable XML grammar. By default it would really > parse XM

Re: P6ML?

2003-03-25 Thread Austin Hastings
--- Dan Sugalski <[EMAIL PROTECTED]> wrote: > At 10:44 AM -0800 3/25/03, Michael Lazzaro wrote: > >So, is anyone working on a P6ML, and/or is there any > >discussion/agreement of what it would entail? > > I, for one, think it's a great idea, and the thought of altering perl > > 6's grammar to m

Re: P6ML?

2003-03-25 Thread Dan Sugalski
At 10:44 AM -0800 3/25/03, Michael Lazzaro wrote: So, is anyone working on a P6ML, and/or is there any discussion/agreement of what it would entail? I, for one, think it's a great idea, and the thought of altering perl 6's grammar to make it a functional language is sheer genius, making the conc

Re: A6: argument initializations via //=, ||=, ::=

2003-03-25 Thread Paul
> sub foo($x ~= "foo") {...} # Append "foo" to whatever $x given Oops. :) That should be > sub foo($x .= "foo") {...} # Append "foo" to whatever $x given > sub foo($x ~= "foo") {...} # smart-test $x against "foo" I assume the second would provide a boolean response.

Re: A6: argument initializations via //=, ||=, ::=

2003-03-25 Thread Jonathan Scott Duff
On Tue, Mar 25, 2003 at 10:42:39AM -0800, Michael Lazzaro wrote: > But it is certainly possible to extend the initialization capabilities > to be more robust: > > sub foo($x = 'blah') {...} # wrong: use one of the below > sub foo($x ::= 'blah') {...} # same as C<$x is default('blah

Re: P6ML?

2003-03-25 Thread Robin Berjon
Michael Lazzaro wrote: So, is anyone working on a P6ML, and/or is there any discussion/agreement of what it would entail? Imho P6ML is a bad idea, if it means what I think it means (creating a parser for quasi-MLs). People will laugh at our folly, and rightly so for trying to be able to parse al

P6ML?

2003-03-25 Thread Michael Lazzaro
So, is anyone working on a P6ML, and/or is there any discussion/agreement of what it would entail? MikeL

A6: argument initializations via //=, ||=, ::=

2003-03-25 Thread Michael Lazzaro
Getting back to A6, a few thoughts. From the 'Re: is static?' thread: On Wednesday, March 19, 2003, at 08:30 AM, Larry Wall wrote: Well, people *will* write state $foo = 0; The question is what that should mean, and which major set of people we want to give the minor surprise to, and how m

Re: [perl #21668] APL doesn't use sigils

2003-03-25 Thread Sean O'Rourke
On Mon, 24 Mar 2003, Benjamin Goldberg wrote: > And what happens if a programmer wants to have two different variables, > of two different types, with the same name, such as @data and %data? > > Without sigils, it cannot be done. Actually, if you squint, other languages are far ahead of Perl in th

Re: [perl #21668] APL doesn't use sigils

2003-03-25 Thread Adam Turoff
On Mon, Mar 24, 2003 at 08:21:51PM -0500, Benjamin Goldberg wrote: > And what happens if a programmer wants to have two different variables, > of two different types, with the same name, such as @data and %data? > > Without sigils, it cannot be done. Vast numbers of C, C++, C#, Java, Python, Lisp

Re: is static? -- Question

2003-03-25 Thread arcadi shehter
suppose I want this behaviour : sub new_counter($start=0) { my $cnt = $start; my sub incr { ++$cnt; }; my sub decr { --$cnt; }; return sub (str $how="incr") { give

This week's Summary

2003-03-25 Thread Piers Cawley
The Perl 6 Summary for the week ending 20030323 Assuming I can tear myself away from stroking the cat who has just magically appeared on my chest and is even now trying to wipe his dags on my nose, welcome one and all to another Perl 6 summary, which should go a lot quicker now that

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

2003-03-25 Thread chromatic
On Tue, 18 Mar 2003 20:43:00 +, Luke Palmer wrote: > Damian wrote: >> caller :{.label eq 'MAINLOOP"}; > Errr what is that odd and disturbing notation? I don't recall ever seeing > that. It's vaguely sinister. Must be the moustache operator. -- c