Fwd: Renaming grep

2005-11-17 Thread David Storrs
Drat, thought I was sending this to the list: Begin forwarded message: On Nov 17, 2005, at 8:31 PM, Ilmari Vacklin wrote: Hi all, I think that grep should be renamed to something English and more, well, semantic. 'Filter' comes to mind as a suggestion. I realise there's a lot of cultural

Re: split /(..)*/, 1234567890

2005-05-12 Thread David Storrs
On May 12, 2005, at 11:59 AM, Autrijus Tang wrote: On Thu, May 12, 2005 at 04:53:06PM +0200, "TSa (Thomas Sandlaï)" wrote: Autrijus Tang wrote: pugs> split /(..)*/, 1234567890 ('', '12', '34', '56', '78', '90') Is this sane? Why the empty string match at the start? I don't know, I didn't in

Re: Argument Type Checking

2005-05-23 Thread David Storrs
On May 19, 2005, at 10:56 PM, Luke Palmer wrote: In general, you should probably be declaring your parameters with uppercase types, [...] Luke If so, wouldn't it make sense that 'int' is the boxed type (one less keystroke) and 'Int' is the special case? Optimize for the common case, an

Re: date and time formatting

2005-05-31 Thread David Storrs
On May 31, 2005, at 9:51 AM, Rob Kinyon wrote: On 5/31/05, Nathan Gray <[EMAIL PROTECTED]> wrote: As I am interested in human-readable dates and times, and having found no conclusive discussion on time formatting, I make my recommendation for a syntax (to start discussion, and allow for dat

Re: date and time formatting

2005-05-31 Thread David Storrs
On May 31, 2005, at 1:16 PM, Rob Kinyon wrote: What's wrong with porting DateTime? It's back to the old question of "what's in core?" Are dates and times something that are used in such a large proportion of programs that they deserve to be shipped in the basic grammar? Or perhaps in the b

Re: date and time formatting

2005-05-31 Thread David Storrs
On May 31, 2005, at 2:22 PM, Rob Kinyon wrote: my ($launch_date = now() + 6 weeks) but time(9am); Sure. $launch_date is of type DateTime. It will numify to the seconds-since-the-epoch, stringify to some date string, and provide all the neat-o-keen methods you want it to have. Works for m

Re: new mailing list: perl6-general?

2005-06-15 Thread David Storrs
On Jun 15, 2005, at 3:33 PM, Patrick R. Michaud wrote: And here they are... this is just a draft -- feel free to flame/edit/ tear it apart liberally. These are also written assuming we don't create a perl6-general list (but it shouldn't be hard to adapt them should one be created). Well, I'd

Re: ./method

2005-06-17 Thread David Storrs
On Jun 17, 2005, at 10:42 PM, John Siracusa wrote: But the truth is that / really does look file-path-y to me, and just plain old ugly. I think at least two other people had similar reactions (Martin Kuehl and Carl Franks). David Storrs, reporting to show solidarity, sir(acusa)! Maybe

Re: ./method

2005-06-19 Thread David Storrs
On Jun 18, 2005, at 9:24 PM, Damian Conway wrote: chromatic wrote: I find it ugly enough that I plan to name my invocants explicitly. ...which should be construed as a *feature* of the current syntax. ;-) Damian In that case, why do we have this feature? Seriously. Are default invoc

MMD handling (was Re: Hackathon notes)

2005-07-08 Thread David Storrs
First off, it seems like there are at least 3 topics being discussed under the "Re: Hackathon notes" subject line. Could we break them out into separate threads so that our poor summarizer doesn't go bonkers? On Jul 8, 2005, at 4:25 PM, Dave Whipp wrote: Rod Adams wrote: multi m

Re: MML dispatch

2005-07-13 Thread David Storrs
On Jul 13, 2005, at 1:12 PM, Larry Wall wrote: If class Dog does role Bark and also does role Wag, then passing a Dog to multi (Bark $x) multi (Wag $x) should result in ambiguity. My understanding is that a Role is an abstract (i.e. cannot be instantiated) blob of methods and, pos

Re: MML dispatch

2005-07-13 Thread David Storrs
On Jul 13, 2005, at 4:35 PM, chromatic wrote: On Wed, 2005-07-13 at 16:07 -0400, David Storrs wrote: My understanding is that a Role is an abstract (i.e. cannot be instantiated) blob of methods and, possibly, data. The purpose of a Role is to paste it into a class--in other words, a Role

Re: MML dispatch

2005-07-13 Thread David Storrs
On Jul 13, 2005, at 6:16 PM, chromatic wrote: On Wed, 2005-07-13 at 17:33 -0400, David Storrs wrote: What is a type besides a named blob of methods and, possibly, data? A label that says how the data is stored internally. For example, compare "Int" and "int". The

Re: MML dispatch

2005-07-13 Thread David Storrs
(Taking things slightly out of order.) On Jul 13, 2005, at 7:32 PM, Larry Wall wrote: A class is restricted to having to provide a working interface to real objects. Can't there be pure-abstract, non-instantiable classes? Or are you still considering those to be interfaces to "real objec

Re: execution platform object? gestalt?

2005-07-27 Thread David Storrs
On Jul 27, 2005, at 6:18 PM, Uri Guttman wrote: this thingy should encompass all about this perl and the world it is in and the shell env is part of that. How about *?PERL ? if ( *?PERL.COMPILED_OS eq 'Unix') {...} if ( *?PERL.CURRENT_OS eq 'Unix') {...} *?PERL.Grammars{Regex} = $my_b

Re: Perl 6 code - a possible compile, link, run cycle

2005-08-25 Thread David Storrs
On Aug 25, 2005, at 7:16 AM, David Formosa (aka ? the Platypus) wrote: On Wed, 24 Aug 2005 16:13:03 +0300, Yuval Kogman <[EMAIL PROTECTED]> wrote: [...] perl6 creates a new instance of the perl compiler (presumably an object). The compiler will only compile the actual file 'foo.pl', and d

Re: How do you say another_sub(@_) in perl 6?

2005-08-28 Thread David Storrs
On Aug 28, 2005, at 5:52 AM, Yuval Kogman wrote: On Sun, Aug 28, 2005 at 05:18:42 -0400, David Storrs wrote: On Aug 28, 2005, at 5:12 AM, Yuval Kogman wrote: On Sun, Aug 28, 2005 at 05:02:25 -0400, David Storrs wrote: nested_call.wrap(), maybe? It's not 100% the same thing... Wrappi

Re: How do you say another_sub(@_) in perl 6?

2005-08-28 Thread David Storrs
On Aug 28, 2005, at 5:52 AM, Yuval Kogman wrote: oops... Can I forward our correspondence to the mailing list? Sure. I was wondering why you took it private. :> --Dks

Re: skippable arguments in for loops

2005-09-22 Thread David Storrs
On Sep 22, 2005, at 3:08 AM, Luke Palmer wrote: On 9/22/05, Carl Mäsak <[EMAIL PROTECTED]> wrote: FWIW, to me it looks fairly intuitive. undef here means "don't alias the element, just throw it away"... gaal joked about using _ instead of undef. :) Joked? Every other language that has pat

perl6-all@perl.org

2005-09-26 Thread David Storrs
On Sep 26, 2005, at 4:19 PM, Juerd wrote: Perl 5's $& is inefficient because of this. If the variable is used anywhere, Perl will for every regex used capture everything. My understanding is that this died with 5.10. Is that right? --Dks

seeing the end of the tunnel

2005-10-01 Thread David Storrs
So, I was thinking about how $Larry's original plan for doing the Perl6 design was something along the lines of "write a series of Apocalypses, one for each chapter of the Camel book". I know that the latest version of the Apocalypses are in SVN, but I checked dev.perl.org just to see what

Fwd: zip: stop when and where?

2005-10-04 Thread David Storrs
Both Luke and I missed the fact that my mail and his response went only to each other so, with his permission, here it is as a forward. --Dks Begin forwarded message: From: Luke Palmer <[EMAIL PROTECTED]> Date: October 5, 2005 1:48:54 AM EDT To: David Storrs <[EMAIL PROTECTED]>

Re: zip: stop when and where?

2005-10-05 Thread David Storrs
From: Luke Palmer <[EMAIL PROTECTED]> Date: October 5, 2005 1:48:54 AM EDT To: David Storrs <[EMAIL PROTECTED]> Subject: Re: zip: stop when and where? Reply-To: Luke Palmer <[EMAIL PROTECTED]> On 10/4/05, David Storrs <[EMAIL PROTECTED]> wrote: How about: @foo = (&

Re: zip: stop when and where?

2005-10-05 Thread David Storrs
On Oct 5, 2005, at 7:49 PM, Damian Conway wrote: Providing a :fillin() adverb on C is a suboptimal solution, because it implies that you would always want to fill in *any* gap with the same value. While that's likely in a two-way zip, it seems much less likely in a multiway zip. I actual

Re: Thoughs on Theory.pm

2005-10-13 Thread David Storrs
On Oct 13, 2005, at 6:45 PM, Dave Whipp wrote: I started thinking about the "in general, unverifiable programmatically" bit. While obviously true, perhaps we can get closer than just leaving them as comments. It should be possible to associate a unit-test-generator with the theory, so I ca

Re: Book RFC - Migrating to Perl 6

2005-10-15 Thread David Storrs
On Oct 15, 2005, at 7:39 AM, Rutger Vos wrote: Good idea. A fat new O'reilly tome will go some way to capturing mind share for perl6. Gathering ideas wiki-style is also very Web2.0. Perhaps perl6 could be marketed as such, what with the development style - "Perl6, the first Web2.0 program

Re: Everything is an object.

2002-12-19 Thread David Storrs
On Tue, Dec 17, 2002 at 09:54:12AM +, Simon Cozens wrote: > [EMAIL PROTECTED] (Dave Storrs) writes: > > Just so I'm clear, are you saying that you think L2R is a bad idea, > > and should not be supported? Or just that it has not yet been > > demonstrated that this is a good idea? > > I think

Re: Everything is an object.

2002-12-19 Thread David Storrs
On Tue, Dec 17, 2002 at 09:49:42AM -0500, Dan Sugalski wrote: > At 5:45 PM -0800 12/16/02, Dave Storrs wrote: > >Just so I'm clear, are you saying that you think L2R is a bad idea, > >and should not be supported? Or just that it has not yet been > >demonstrated that this is a good idea? > > I th

Re: Everything is an object.

2002-12-19 Thread David Storrs
On Tue, Dec 17, 2002 at 09:54:52AM -0800, Michael Lazzaro wrote: > Umm... I think some of these recent messages have had typos between L2R > and R2L. (?) In that people seem to have been arguing against > themselves. (??) I'll try using --> and <--. Just to make sure I'm not one of those peop

Re: Everything is an object.

2002-12-19 Thread David Storrs
On Tue, Dec 17, 2002 at 02:51:04PM -0500, Dan Sugalski wrote: > At 9:54 AM -0800 12/17/02, Michael Lazzaro wrote: > >We _must_ (for some value of "must" that is real close to being a > >100% drop-dead requirement) support --> (L2R), in the form of > > > > @a.grep( {...} ) > > .map( {...} )

Re: "my int( 1..31 ) $var" ?

2003-01-03 Thread David Storrs
On Fri, Jan 03, 2003 at 10:58:49AM -0800, Mr. Nobody wrote: > --- Smylers <[EMAIL PROTECTED]> wrote: > > junction should be sufficient: > > > > print "date" if $var == any(1 .. 31); > > Superpositions in the core? You're kidding, right? > > What's wrong with "if 1 <= $var <= 31"? My understan

Re: L2R/R2L syntax (was Re: Everything is an object.)

2003-01-08 Thread David Storrs
On Wed, Jan 08, 2003 at 08:31:51AM -0800, Austin Hastings wrote: > > --- Damian Conway <[EMAIL PROTECTED]> wrote: > > @out = @a ~> grep {...} ~> map {...} ~> sort; > > ... > > @out <~ sort <~ map {...} <~ grep {...} <~ @a; For the record, I think this is great. > Bril

Re: Variable Types Vs Value Types

2003-01-09 Thread David Storrs
On Wed, Jan 08, 2003 at 05:59:14PM +0800, Damian Conway wrote: > > my Array @array := SpecialArray.new; > > > > Should the value in @array act like an Array or a SpecialArray? Most > > people would say SpecialArray, because a SpecialArray ISA Array. > > Weell...*I'd* say that @array shoul

Re: L2R/R2L syntax (was Re: Everything is an object.)

2003-01-09 Thread David Storrs
(/dks attempts to pour water.) Damian Conway <[EMAIL PROTECTED]> wrote: > > And even if we do have both functional and methodical versions, this: > > > > @out <~ sort <~ map {...} <~ grep {...} <~ @a; > > > > is still clearer in its intent than: > > > > @out = sort map {...} gre

Re: L2R/R2L syntax (was Re: Everything is an object.)

2003-01-13 Thread David Storrs
On Sun, Jan 12, 2003 at 11:50:14AM +, Richard J Cox wrote: > > U+21DC "Leftwards Squiggle Arrow" and U+21DE "Rightwards Squiggle Arrow" would > seem to fit the bill rather well maybe the ascii <~ and ~> are merely > aliases of the true symbols? If we go this route, I would suggest that w

Re: L2R/R2L syntax (was Re: Everything is an object.)

2003-01-17 Thread David Storrs
On Thu, Jan 16, 2003 at 04:14:20PM -0600, Jonathan Scott Duff wrote: > On Thu, Jan 16, 2003 at 10:07:13PM +, Nicholas Clark wrote: > > The headers I received make no mention of character set - does your mailer > > mark the message in any way? If not, then STMP will assume it's good old > > 7 bi

Re: L2R/R2L syntax (was Re: Everything is an object.)

2003-01-17 Thread David Storrs
On Fri, Jan 17, 2003 at 10:59:57AM -0500, Dan Sugalski wrote: > At 7:13 AM -0800 1/17/03, David Storrs wrote: > >Do we at least all agree that it would be a good thing if Unicode were > >the default character set for everything, everywhere? That is, > >editors, xterms, keyboa

Re: L2R/R2L syntax (was Re: Everything is an object.)

2003-01-17 Thread David Storrs
On Fri, Jan 17, 2003 at 12:19:01PM -0500, Dan Sugalski wrote: > At 8:08 AM -0800 1/17/03, David Storrs wrote: > >On Fri, Jan 17, 2003 at 10:59:57AM -0500, Dan Sugalski wrote: > >> At 7:13 AM -0800 1/17/03, David Storrs wrote: > >> > > >> >Do we at lea

Re: L2R/R2L syntax

2003-01-17 Thread David Storrs
On Fri, Jan 17, 2003 at 11:03:43AM -0800, Michael Lazzaro wrote: > > And note that as pretty as -> is, we couldn't have <- for piping > because it would conflict rather strongly things like > > if ($a<-5)# (negative five, or pipelike?) Pipelike. Longest token rule. --Dks

TPF donations (was Re: L2R/R2L syntax [x-adr][x-bayes])

2003-01-21 Thread David Storrs
On Fri, Jan 17, 2003 at 04:21:08PM -0800, Damian Conway wrote: > Paul Johnson wrote: > > > Well, I'll be pretty interested to discover what cause is deemed more > > deserving than Larry, Perl 6 or Parrot. The P still stands for Perl, > > right? > > True. But I suspect that TPF's position is that

Re: Why C needs work (was Re: L2R/R2L syntax)

2003-01-22 Thread David Storrs
On Tue, Jan 21, 2003 at 03:52:30PM -0800, Dave Whipp wrote: > $a = sub ($a, $b) { ... } > $x = -> ($y, $z) { ... } > > The pointy-arrow doesn't buy anything here. IMHO, it's actually a loss. I have yet to come up with any mnemonic for "pointy arrow means sub" that will actually stick in my br

Re: Arrays, lists, referencing

2003-02-14 Thread David Storrs
Some random musings, for what they're worth... 1) The fact that we've had this long thread about arrays and shows that they are confusing. How could we change the functionality/eliminate the differences so as to simplify things? 2) It seems that the functionality of lists is a proper subs

Re: Arrays, lists, referencing

2003-02-15 Thread David Storrs
On Fri, Feb 14, 2003 at 10:10:09PM -0700, Luke Palmer wrote: > > Date: Fri, 14 Feb 2003 12:38:59 -0800 > > From: David Storrs <[EMAIL PROTECTED]> > > > > Some random musings, for what they're worth... > > > > 1) The fact that we've had this lon

Re: Arrays, lists, referencing

2003-02-19 Thread David Storrs
On Wed, Feb 19, 2003 at 09:51:12AM +1100, Deborah Ariel Pickett wrote: > That said, I don't know of anything that the C comma operator can do > that you couldn't equivalently do with a Perl5 C statement: > > foo() or (do { warn("blah"); next; }); # Yes, it's ugly. Or just a Boolean: foo(

Re: A6 questions

2003-03-17 Thread David Storrs
On Sun, Mar 16, 2003 at 10:08:41PM -0500, Chris Dutton wrote: > On Sunday, March 16, 2003, at 05:09 PM, David Storrs wrote: > > > ==QUESTION > > - Page 8 says "In some languages, all methods are multimethods." I > > believe that Java is one of these. Is that

A6 questions

2003-03-16 Thread David Storrs
Greetings all, Ok, it took me several days to get through A6, and I'm not caught up on all the mail yet (though I've tried to skim so I don't repeat someone else's question). I'm left with a bunch of questions; can anyone answer the following: ==QUESTION - Page 8 says "In some languages, all m

Re: A6 questions

2003-03-17 Thread David Storrs
On Mon, Mar 17, 2003 at 10:56:51AM -0700, Luke Palmer wrote: > Assuming the obvious inheritance, Vehicle.set_speed() would be called. Ok good, that's what I thought. Thanks. > No. Rules fit better in a grammar than subs, and help the psychology > of people in various ways. For instance: > >

Funding the design team

2003-03-20 Thread David Storrs
On Sat, Mar 15, 2003 at 05:32:39PM -0500, James Mastros wrote: > On 03/14/2003 3:22 PM, Dan Sugalski wrote: > > That means that TPF's "perl development grant" fund is fine to donate > > to, and if there's only enough cash for one grantee, and Larry's the > > best candidate, that's keen. Setting u

grab-bag questions (was Re: A6 questions)

2003-03-24 Thread David Storrs
In future, I'll split questions as you request. --Dks On Mon, Mar 24, 2003 at 04:00:38PM +, Piers Cawley wrote: > David Storrs <[EMAIL PROTECTED]> writes: > > Greetings all, > > > > Ok, it took me several days to get through A6, and I'm not caught up > >

Re: A6: Named vs. Variadic Parameters

2003-04-02 Thread David Storrs
On Wed, Mar 19, 2003 at 12:19:20PM -0800, Michael Lazzaro wrote: > I think newbies are going to unquestionably try and put the parameters > in the same order as they expect to see the eventual arguments, and be > durn confused it doesn't work -- I know I would. [...] > Dunno. I'm just one dat

Incorporting "WhatIf"

2003-04-04 Thread David Storrs
I recently discovered a CPAN module called WhatIf (http://search.cpan.org/author/SIMONW/Whatif-1.01/). This module has the ability to provide rollback functionality for arbitrary code. I don't really understand continuations yet (although I'm reading up on them), so perhaps they would allow this

Re: A6: Named vs. Variadic Parameters

2003-04-04 Thread David Storrs
x27;d like to keep the identification time as short as possible by clearly labelling everything. > > David Storrs <[EMAIL PROTECTED]> wrote: > > [re: current sig syntax] > > In order to make it worthwhile (IMO), it would need to be very easy > > to use, which would imply at leas

Re: A6: Named vs. Variadic Parameters

2003-04-04 Thread David Storrs
On Fri, Apr 04, 2003 at 10:40:49AM -0800, Larry Wall wrote: > Yes, though it's usually been mentioned with respect to things like: > > my ($a,$b,$c) is constant = abc(); > > However, I would personally go with the prefix zone macros before using > distributed traits, just to get the zone inf

Re: Compile-time binding

2003-05-28 Thread David Storrs
On Wed, May 28, 2003 at 04:41:36AM -0600, Luke Palmer wrote: > I was reading about Haskell, and realized that I don't know what ::= > is supposed to mean (don't ask what that has to do with Haskell :-). > I know it's compile-time binding, but... what's compile-time binding? > > Could someone who k

Re: Compile-time binding

2003-05-29 Thread David Storrs
On Wed, May 28, 2003 at 06:35:31AM -0700, David Storrs wrote: > On Wed, May 28, 2003 at 04:41:36AM -0600, Luke Palmer wrote: > > I know it's compile-time binding, but... what's compile-time binding? > > Luke > > Well, perhaps I'm mistaken, bu

Re: Type Conversion Matrix, Pragmas (TAKE 4)

2003-06-13 Thread David Storrs
On Tue, Jun 10, 2003 at 12:04:14PM -0700, Michael Lazzaro wrote: > J: (scalar junctive to typed scalar) > > A scalar junctive, e.g. an "untyped" scalar, can always be silently > used as and/or converted to a more specific primitive type. This will > quite frequently result in the loss of

an idle question: returning from a nested call

2003-06-12 Thread David Storrs
So, as I sweat here in the salt mines of C++, longing for the cleansing joy that Perl(5 or 6, I'd even take 4) is, I find myself with the following problem: Frequently, I find myself writing stuff like this: void Ficp400::SaveRow(long p_row) { // if p_row is marked as deleted, return

Re: an idle question: returning from a nested call

2003-06-12 Thread David Storrs
On Thu, Jun 12, 2003 at 03:12:32PM -0700, Austin Hastings wrote: > > sub Ficp400::SaveRow(Int $p_row) > { > return if IsDeleted($p_row); > } *laugh* Well, yes, there is always the obvious way. I had wanted something that would be reusable between multiple function, though (sorry, should have

Re: printf-like formatting in interpolated strings

2003-06-16 Thread David Storrs
On Mon, Jun 16, 2003 at 02:09:43PM +0200, Edwin Steiner wrote: > Edwin Steiner <[EMAIL PROTECTED]> writes: > > We know: Everything between the \F and the next funny character is the > format specifier. This allows extensions to the printf-specifiers: Cool, Perlish, scary. > Examples: > [snip] >

Re: Type Conversion Matrix, Pragmas (TAKE 4)

2003-06-16 Thread David Storrs
On Mon, Jun 16, 2003 at 10:15:57AM -0700, Michael Lazzaro wrote: > > On Friday, June 13, 2003, at 10:26 PM, David Storrs wrote: > > >my $a = 'foo'; > >my Int $b = $a; # legal; $b is now 0; is there a warning? > >my $c = $b; # is

Re: printf-like formatting in interpolated strings

2003-06-16 Thread David Storrs
On Mon, Jun 16, 2003 at 11:37:06AM -0700, Michael Lazzaro wrote: > [...] > But there is broad support for the idea that the somewhat elderly > printf syntax is a PITA, and that printf, in general, should be > completely unnecessary since we already *have* interpolated strings, > fer pete's sake.

Re: Type Conversion Matrix, Pragmas (TAKE 4)

2003-06-16 Thread David Storrs
On Mon, Jun 16, 2003 at 11:47:35AM -0700, Austin Hastings wrote: > > Although it occurs to me that there might be such a thing as "Int > properties" and "Str properties", and maybe the conversion propagates > the appropriate ones. > > That is: > > my $a = "foo" but $purple ; > $a but= false; > $

Re: As I am a New one.

2003-06-23 Thread David Storrs
On Mon, Jun 23, 2003 at 03:13:23PM +0100, sitaram wrote: > Hi, > I am a new one Perl. > I want a book which gives the Knowledge about perl. > I learned up to some extent using the online books. > I want a book which is tells me about functions(system,Built in) in brief. > Can U send the URL for suc

Re: This week's summary

2003-06-24 Thread David Storrs
On Tue, Jun 24, 2003 at 06:14:52AM -0700, Sean O'Rourke wrote: > On Tue, 24 Jun 2003, Leopold Toetsch wrote: > > > > [...] Nobody answered, if we need another > > Sub class implementing the old invoke/ret scheme ... > > I'd say "no". P6C is now compiling to an obsolete architecture. > While we sh

Re: This week's summary

2003-06-24 Thread David Storrs
On Tue, Jun 24, 2003 at 04:04:29PM +0100, Andrew Wilson wrote: > On Tue, Jun 24, 2003 at 07:58:32AM -0700, David Storrs wrote: > > /me shows ignorance yet again. > > > > For those of us who are not hardware types...what is "the new > > machine"? The Itanium?

Re: Aliasing an array slice

2003-07-07 Thread David Storrs
Thinking about it, I'd rather see lvalue slices become a nicer version of C. my @start = (0..5); my @a = @start; @a[1..3] = qw/ a b c d e /; print @a; # 0 a b c d e 4 5 # Similarly: @a = @start; my $r_slice = [EMAIL PROTECTED]; @$r_slice = qw/ a b c

Re: Aliasing an array slice

2003-07-09 Thread David Storrs
On Tue, Jul 08, 2003 at 05:52:04PM -0700, Austin Hastings wrote: > > --- Jonadab the Unsightly One <[EMAIL PROTECTED]> wrote: > > Am I now thinking clearly? > > > I don't think so. > > If you've created two separate arrays that happen to start with related > values, then the changes to the first

Re: Aliasing an array slice

2003-07-20 Thread David Storrs
On Fri, Jul 18, 2003 at 06:05:52PM -0400, Benjamin Goldberg wrote: > What would happen if I used 1,2,3 instead of 1..3? Would it do the same > thing? I would think so. > I wanna know what happens if I do: > >@a[0,2,4] = qw/ a b c d e /; Yup, you're right, I didn't consider non-cont

Re: The Perl 6 Summary -- preprocessors

2003-07-21 Thread David Storrs
On Mon, Jul 21, 2003 at 12:19:11PM -0700, Austin Hastings wrote: > Likewise: > > my $fh = open " > $fh =~ / = Grammars::Languages::Runoff::tbl(input_method >= Grammars::Language::Runoff::eqn(input_method > = IO::Gunzip)))>/; Very cool. Assuming this ran succe

Re: Perldoc Project

2003-07-24 Thread David Storrs
On Wed, Jul 23, 2003 at 10:49:40PM -0600, Nick Pinckernell wrote: > Hello All, > My name is Nick Pinckernell. Hi Nick, Other people have already commented on most of your points, so I won't repeat, except to say that I agree that the name "perldoc" is already taken, and that POD really is pretty

Re: Classes with several, mostly unused, attributes

2004-12-15 Thread David Storrs
On Dec 10, 2004, at 11:05 AM, Abhijit Mahabal wrote: Consider a class (e.g., the hypothetical Geometry::Triangle) that can have several attributes (side1, side2, side3, angle1, ang_bisector1, side_bisector, altitude1 and so forth), most of which will not be needed for most instances of Geometry

Re: Classes with several, mostly unused, attributes

2004-12-15 Thread David Storrs
On Dec 15, 2004, at 5:36 PM, Abhijit Mahabal wrote: I think that "slackness-on-demand" is a better policy than "strictness-on-demand", but that, again, is just my opinion Until now, the policy in Perl has always been that it is as slack and forgiving as possible, and you have to ask if you w

Re: Classes with several, mostly unused, attributes

2004-12-15 Thread David Storrs
On Dec 15, 2004, at 6:11 PM, Abhijit Mahabal wrote: David Storrs wrote: On Dec 15, 2004, at 5:36 PM, Abhijit Mahabal wrote: I think that "slackness-on-demand" is a better policy than "strictness-on-demand", but that, again, is just my opinion Until now, the policy in

Re: Possible syntax for code as comment

2005-01-09 Thread David Storrs
On Sat, Jan 08, 2005 at 12:48:32PM -0800, Ashley Winters wrote: > > sub canon( $subjet, $complement) > -> $s = $subjet{$*Global}, $c = $complement > { > my @foo = ...; > for @foo -> $bar; $remaining = @foo.elems { > # $bar contains an element, $remaining contains the number of

Re: Dimension of slices; scalars versus 1-element arrays?

2005-01-10 Thread David Storrs
On Sat, Jan 08, 2005 at 11:37:06AM -0700, Craig DeForest wrote: > @a[4; 0..5]; > a 1x6 array (probably correct)? Or a 6 array (probably not > correct)? For the ignorant among us (such as myself), what is a 6 array? Google and pdl.perl.org did not yield any immediate answers. --Dks --

Re: Making control variables local in a loop statement

2005-01-14 Thread David Storrs
On Thu, Jan 13, 2005 at 07:35:19PM -0500, Joe Gottman wrote: >In Perl5, given code like > > for (my $n = 0; $n < 10; ++$n) {.} > > the control variable $n will be local to the for loop. In the equivalent > Perl6 code >loop my $n = 0; $n < 10; ++$n {.} > > $n will not be local to th

Re: Making control variables local in a loop statement

2005-01-14 Thread David Storrs
On Fri, Jan 14, 2005 at 02:46:58PM -0500, Austin Hastings wrote: > >rules, I can easily have it either way. > > > > {for (my $n=0; $n<10; ++$n) {...}} # Local to loop > > for (my $n=0; $n<10; ++$n) {...}# Persistent > > > >--Dks > > > But there's no clean way to make some of them

Re: S04

2005-02-10 Thread David Storrs
Given that Perl 6 won't support an actual do-while loop a la C++ (and yes, I know that Perl5 didn't either), how would you accomplish that? That is, I'd like to have a loop that runs once, then checks its condition to see if it should repeat and continues to repeat as long as the condition is true.

Re: Pop a Hash?

2005-02-11 Thread David Storrs
On Wed, Feb 09, 2005 at 05:13:56AM -0600, Rod Adams wrote: > > Does > > ($k, $v) <== pop %hash; > or > ($k, $v) <== %hash.pop; > > make sense to anyone except me? It's clear to me. The only thing is that, right off the top of my head, I can't see where it would be used. Since the order in whi

thank you for clarification (was Re: S04)

2005-02-11 Thread David Storrs
On Thu, Feb 10, 2005 at 09:45:59AM -0800, Larry Wall wrote: > That's spelled > > loop { > $foo = readline; > ...do stuff with $foo... > } while ( $foo ); > > these days. > > Larry Cool, perfect. Thanks. --Dks -- [EMAIL PROTECTED]

Re: Pop a Hash?

2005-02-13 Thread David Storrs
On Fri, Feb 11, 2005 at 05:33:29PM -0800, Ashley Winters wrote: > On Thu, 10 Feb 2005 08:59:04 -0800, David Storrs <[EMAIL PROTECTED]> wrote: > > On Wed, Feb 09, 2005 at 05:13:56AM -0600, Rod Adams wrote: > > > > > > ($k, $v) <== pop %hash; > > > mak

Pick's randomness (was Re: Fun with junctions (was Sets vs Junctions))

2005-02-13 Thread David Storrs
On Sat, Feb 12, 2005 at 06:39:01PM +1100, Damian Conway wrote: > pick - select at random from a list, array, or hash OOC, will there be a way to control where C gets its randomness from? (e.g. perl's builtin PRNG, /dev/random, egd, etc) --Dks -- [EMAIL PROTECTED]

Re: Pick's randomness (was Re: Fun with junctions (was Sets vs Junctions))

2005-02-14 Thread David Storrs
On Mon, Feb 14, 2005 at 10:43:21AM +1100, Damian Conway wrote: > David Storrs OOC'd: > > >OOC, will there be a way to control where C gets its randomness > >from? (e.g. perl's builtin PRNG, /dev/random, egd, etc) > > Sure: > > # Use RBR (Really Bad R

Re: Fun with junctions (was Sets vs Junctions)

2005-02-15 Thread David Storrs
On Tue, Feb 15, 2005 at 11:06:51AM -0800, Larry Wall wrote: > > But what y'all are talking about above is the other end--the return > type. And maybe we need to enforce a newbie-friendly invariant on that > end as well. I suppose we could default to not accepting junctional > return values by de

Re: Fun with junctions (was Sets vs Junctions)

2005-02-21 Thread David Storrs
On Mon, Feb 21, 2005 at 11:01:45AM -0800, Larry Wall wrote: > > But rather than that, I suspect we'll see more use of constructs > where the object to be mutated ends up being the topic, as in: > > some_complicated_lvalue() but= { .sortmyway(foo($_),bar($_)) } > > which would presumably do t

Re: Config Variables (TRIVIAL FLUFF POST)

2005-03-03 Thread David Storrs
On Thu, Mar 03, 2005 at 04:09:26PM -0800, Larry Wall wrote: > On Thu, Mar 03, 2005 at 12:36:00PM -0800, Brian Ingerson wrote: > > : Thanks for the mind expanding reply. > > You're welcome. Next time don't eat blue sugar cubes from my frig. :-) "I know what you're thinking. 'Why, oh why, didn'

Re: Optional binding

2005-03-07 Thread David Storrs
On Sun, Mar 06, 2005 at 11:58:43PM -0800, Larry Wall wrote: > On Sun, Mar 06, 2005 at 02:13:09AM -0700, Luke Palmer wrote: > : What is output: > : > : sub foo($x, ?$y, [EMAIL PROTECTED]) { > : say "x = $x; y = $y; z = @z[]"; > : } > : > : my @a = (1,2,3); > : foo($x, @a);

Re: [RELEASE] Parrot 0.1.2 "Phoenix" Released!

2005-03-07 Thread David Storrs
On Sun, Mar 06, 2005 at 04:57:38PM +0100, Leopold Toetsch wrote: > On behalf of the Parrot team I'm proud to announce the release of > Parrot 0.1.2. First: Congratulations to everyone for this release! Second: What will it take before Parrot moves to a 0.2 (0.3, 0.4...) release? --Dks

Re: Comma in (sub) traits?

2005-03-07 Thread David Storrs
On Mon, Mar 07, 2005 at 03:43:19PM +0100, Aldo Calpini wrote: > don't know if it helps, but I guess that you can also write it like > this, if you prefer: > > sub greeting(Str $person) { > returns Str; > is export; > "Hello, $person"; > } > > (this guess is based

Re: Optional binding

2005-03-07 Thread David Storrs
On Mon, Mar 07, 2005 at 05:36:08PM +0100, Aldo Calpini wrote: > David Storrs wrote: > >Urk. I, for one, will definitely find this surprising. I would have > >expected: > > > > x = ; $y = 1; z = 2 3 > > to obtain what you have expected, you need to explicitl

Re: Optional binding

2005-03-07 Thread David Storrs
On Mon, Mar 07, 2005 at 04:58:29PM -0800, Larry Wall wrote: > > In fact, we really haven't specified what happens when you say > > my Int @a is shape(3) := [1,2]; > my Int @b is shape(3) := [1,2,3,4]; > [...] > But I also have this nagging feeling that the user wouldn't have > specified

Re: Optional binding

2005-03-07 Thread David Storrs
On Mon, Mar 07, 2005 at 05:15:14PM -0800, Larry Wall wrote: > On Mon, Mar 07, 2005 at 02:20:47PM -0800, David Storrs wrote: > : Yes, I know. That's what I meant by "...arrays are objects...(sort > > No, they're real objects. (Though it's .elems rather than .lengt

Re: Optional binding

2005-03-07 Thread David Storrs
On Mon, Mar 07, 2005 at 07:50:47PM -0800, Larry Wall wrote: > On Mon, Mar 07, 2005 at 05:37:53PM -0800, David Storrs wrote: > : On Mon, Mar 07, 2005 at 04:58:29PM -0800, Larry Wall wrote: > : Is > : there is then any way to explicitly leave off an element. Can I do > : this: >

finding the name of &$SUB ?

2005-03-07 Thread David Storrs
Is there a way to find the name of &?SUB ? It would be useful for error-logging and -reporting. --Dks

Re: some misc Perl 6 questions

2005-03-09 Thread David Storrs
On Tue, Mar 08, 2005 at 10:29:30PM -0800, Darren Duncan wrote: > [...] > > By using subtypes in this way, I could remove a lot of explicit input > checking code from my methods, which is great. Also, the "where > clause" is not being repeated for every argument or attribute or > variable decla

Re: MMD as an object.

2005-03-10 Thread David Storrs
On Wed, Mar 09, 2005 at 03:38:52PM -0600, Rod Adams wrote: > There lingers the case of: > >use Foo; # from above, exports &bar is MMD::Random > >multi sub bar {...} > > Does this generate an error, since one could expect this particular &bar > to be Manhattan? Or does it assume Rando

Re: Adding linear interpolation to an array

2005-03-10 Thread David Storrs
> At 17:53 +0100 3/10/05, Thomas Sandlaß wrote: [request for clarification of 'covariant' and 'contravariant' usage] > >'Co' means together like in coproduction. And 'contra' is the opposite > >as in counterproductive. With instanciating parametric types the question > >arises how a subtype relatio

Re: MMD as an object.

2005-03-10 Thread David Storrs
On Thu, Mar 10, 2005 at 02:22:20PM -0600, Rod Adams wrote: > David Storrs wrote: > >On Wed, Mar 09, 2005 at 03:38:52PM -0600, Rod Adams wrote: > >> use Foo; # from above, exports &bar is MMD::Random > >> multi sub bar {...} > >> > >>Does th

Re: lists in string context

2005-03-15 Thread David Storrs
On Sat, Mar 12, 2005 at 09:36:24PM +0100, Juerd wrote: > Larry Wall skribis 2005-03-12 12:26 (-0800): > > And arguably, the current structure of join is that the delimiter is > > the invocant, so cat should be defined as > > ''.join(@foo) > > This is what Python does. It does not make any sen

Re: s/true/better name/

2005-03-15 Thread David Storrs
On Tue, Mar 15, 2005 at 08:23:19AM -0800, Larry Wall wrote: > On Tue, Mar 15, 2005 at 10:51:57AM +0100, Juerd wrote: > : Autrijus suggested "indeed" or "id", of which I like "indeed" better, > : because I'd like to continue using "id" with databases. > > "id" is too heavily overloaded with identif

  1   2   >