Re: definitions of truth

2004-06-28 Thread Dan Hursh
Paul Hodges wrote: --- Jonadab the Unsightly One <[EMAIL PROTECTED]> wrote: Consider this test in Perl: if "\0" {...} Its equivalent in C is this: if ("") ... That can't be right. If anything it's got the two languages flipped, but that's still not quite right either. Apples and o

push with lazy lists

2004-07-02 Thread Dan Hursh
Hi, If I can assume: @x = 3..5; say pop @x;# prints 5 @x = 3..5; push @x, 6; say pop @x;# prints 6 say pop @x;# prints 5 What should I expect for the following? @x = 3..Inf; say pop @x;# heat death?

Re: push with lazy lists

2004-07-03 Thread Dan Hursh
Joseph Ryan wrote: The way I understand the magicness of lazy lists, I'd expect: @x = 3..Inf; say pop @x; # prints Inf @x = 3..Inf; push @x, 6; # an array with the first part being # lazy, and then the element 6 say pop @x; # prints 6 say pop @x; # prints Inf say pop @x; # prints Inf

Re: if not C<,> then what?

2004-07-09 Thread Dan Hursh
Michele Dondi wrote: A late thought, but since I am one of thow whose' keen on the print,next if /stgh/; Ouch. I hadn't thought of that. I'm a big fan of litering loops with discard(),next if dontCareBecause(); # it don't matter here type constructs. I was going to suggest pri

Re: scalar subscripting

2004-07-14 Thread Dan Hursh
Larry Wall wrote: On Wed, Jul 14, 2004 at 10:23:18AM -0700, Larry Wall wrote: : Another alternative is "$( $file ).ext". I'd tend to use that before : "${file}.ext" these days. Perhaps that's irrational--but it was hard : to get the special-case "${name}" form to work right in the Perl 5 : lexer,

Re: String interpolation

2004-07-22 Thread Dan Hursh
Larry Wall wrote: No Yes -- --- @foo@foo[1] %bar%bar{"a"} or %bar«a» $foo.bar$foo.bar() &foo&foo(1) I may have missed it, but what are the contexts in these cases? I'm thinking the first two are easily scalar. Are the second list

Re: Why do users need FileHandles?

2004-07-22 Thread Dan Hursh
Luke Palmer wrote: JOSEPH RYAN writes: - Original Message - From: David Storrs <[EMAIL PROTECTED]> Date: Monday, July 19, 2004 5:04 pm Subject: Re: Why do users need FileHandles? Second, I would suggest that it NOT go in a library...this is reasonably serious under-the-hood magic and shoul

Re: Why do users need FileHandles?

2004-07-24 Thread Dan Hursh
Aaron Sherman wrote: Do any C++ programmers consider the STL to be anything other than "in core" even though it's not part of the compiler, and with at least GCC, it's distributed as a separate component? Do any C programmers consider strlen or sprintf to be outside of the core? It's part of the AN

Re: Why do users need FileHandles?

2004-07-25 Thread Dan Hursh
Larry Wall wrote: On Sun, Jul 25, 2004 at 01:32:29AM -0500, Dan Hursh wrote: : >2. Really core. This is the sort of "standard library". Just the most : >essential bits that are required for general Perl usability. You'd : >probably include most of these, even in a &quo

Re: Why do users need FileHandles?

2004-07-26 Thread Dan Hursh
Larry Wall wrote: Sounds like you're confusing #3 with #4. Larry Could be. Does 3 mean at install time, you down load the latest of the 'supported' packages from the CPAN alike or is it more like versioned snapshots? (Possibly yet to be decided?) It's the idea of a standard library being open

Re: [Fwd: Re: Something to ponder]

2004-08-18 Thread Dan Hursh
Aaron Sherman wrote: This bit comes from the p6i list, and I just thought I'd ask those in-the-know if my suggested "returntype" role/property would make sense here, or if there's another way to do it that makes more sense? For that matter, does MMD on return type map into Perl6's gestalt at all, o

Re: Synopsis 2 draft 1 -- each and every

2004-08-19 Thread Dan Hursh
David Green wrote: ...but "print next $foo" is better than "print each $foo". ... print another $foo for another $foo {...} while another $foo {..} It's 5 characters too many, but it works. Dan

Re: Synopsis 2 draft 1 -- each and every

2004-08-20 Thread Dan Hursh
Peter Behroozi wrote: I'm not particular to any of the verbs used yet, but maybe that's because I don't think of the <> as a general iterator, but more of a gobbler-type creature (and formerly a globber, too). Could we try: for $foo.fetch { ... } #or for $foo.grab { ... } #or for $foo.eat { ... }

Re: Synopsis 2 draft 1 -- each and every

2004-08-20 Thread Dan Hursh
Chromatic wrote: On Fri, 2004-08-20 at 14:26, Austin Hastings wrote: Dan Hursh wrote: generalimpose scalarimpose list ----- D$foo.eat$foo.bite$foo.gobble N$foo.look$foo.peek$foo.peruse hmm, I don't lik

Re: Last bits of the basic math semantics

2004-09-02 Thread Dan Hursh
Leopold Toetsch wrote: Dan Sugalski <[EMAIL PROTECTED]> wrote: rotl Pdest, n, 32# rotate left in place by n 32-bitwise These have merit. The only question then is what happens with the rest of the bits. (If one rotates a 64 bit quantity with a 32-bit rotate) First, we should probably as

Re: What Requires Core Support (app packaging)

2004-09-07 Thread Dan Hursh
Simon Cozens wrote: For heaven's sake. Have you even *seen* the Perl 5 internals? If you don't trust things which are self-declared scary hackery to be stable, you probably shouldn't be using Perl until Perl 6 comes out. And probably not until then. Um, on a somewhat unrelated note, having tried to

Re: S5: range quantifier woes

2004-09-18 Thread Dan Hursh
Jonathan Scott Duff wrote: - for minimal matching the ? is too far away from the operator that it applies to. It looks like it's doing something to the closure (and maybe it is) Should that be [foo]**?{$m..$n} instead? - Bringing a closure into the picture seems to put too much power in such

Re: Current state?

2004-09-18 Thread Dan Hursh
Jonathan Scott Duff wrote: I think you meant something akin to C< /(.) { use PIR; print P0;}/ > and C< /(.) { use Forth; P0 print}/ > :-) As long as we're special-casing things and "hand parsing" we might as well use a small subset of Perl) Is perl actually going to allow arbitrary languages in t

Re: Namespaces

2004-09-30 Thread Dan Hursh
Jeff Clites wrote: That's it. No typing, no classification, no nothing. By postpending a null character, below, you _are_ doing typing/classification, of course. And, what about subs? I was kind of inspired here. Just stick with me. As Larry said, it's best to prepend it. And then we can call i