Re: The .bytes/.codepoints/.graphemes methods

2004-07-01 Thread Matt Diephouse
Larry Wall wrote: On Sat, Jun 26, 2004 at 12:27:38PM -0700, Brent 'Dax' Royal-Gordon wrote: : Issues: : * Limits lvalue substr (doesn't allow it to be a different size) : unless splice is used (or a substr method is also provided). That all has to be looked at anyway. What does "5" mean when

Re: The .bytes/.codepoints/.graphemes methods

2004-07-01 Thread Matt Diephouse
Juerd wrote: Matt Diephouse skribis 2004-06-30 20:51 (-0400): my $string = "Hello, World!"; say $string[0..4]; # prints "Hello\n" $string[7...] = "Larry!"; say $string; # prints "Hello, Larry!\n" And that "array" is one of bytes? graphemes? I&#x

Re: "=>" brother

2004-07-12 Thread Matt Diephouse
Alexey Trofimenko wrote: I wonder about mixed synax: %hash = ( :keyÂvalue :key2Âvalue :key3 key4 => 'value', 'key5','value', Âkey6 value key7 value ) Did I make mistakes here? That depends. I asked Damian about this a few weeks ago. He said

Re: String interpolation

2004-07-22 Thread Matt Diephouse
Larry Wall wrote: Actually, I've been rethinking this whole mess since last week, and am seriously considering cranking up the Ruby-o-meter here just a tad. At the moment I'm inclined to say that the *only* interpolators in double quotes are: \n, \t etc. $foo @foo[$i] %foo{$k} {

Re: Handling block parameters in Ruby

2004-08-13 Thread Matt Diephouse
@array.each:{$^odd.bar() }:{ $^even.baz() }; Admittedly it's a much smaller case, but it should be useful, even if I can't think of a non trivial case offhand. -- matt diephouse -- http://matt.diephouse.com > > Larry >

Re: Handling block parameters in Ruby

2004-08-13 Thread Matt Diephouse
On Fri, 13 Aug 2004 11:36:05 -0700, Larry Wall <[EMAIL PROTECTED]> wrote: > Yes, that's precisely why I'm trying to generalize Ruby's single > "magic" block into one or more ordinary parameters. Excellent. :) > Two anonymous adverbs? Hmm. While I can think of ways to force it to > work, I'm inc

Return with no expression

2004-08-19 Thread Matt Diephouse
I recently got bit by C in Perl 5, which leads me to wonder about Perl 6. C, when called without an expression, tries to DWIM, returning an empty list in list context and undef in scalar context, which is generally a good thing. But I came across this code at work this week: use CGI qw(:standa

Re: Synopsis 2 draft 1 -- each and every

2004-08-19 Thread Matt Diephouse
On Thu, 19 Aug 2004 10:38:48 -0500, Dan Hursh <[EMAIL PROTECTED]> wrote: > while another $foo {..} > > It's 5 characters too many, but it works. > > Dan At this point, you may as well use C<.records> (think C<$/> -- record separator): for $foo.records { ... } Then it'd be a small step to allo

Re: Return with no expression

2004-08-19 Thread Matt Diephouse
On Thu, 19 Aug 2004 17:52:18 +0200, Juerd <[EMAIL PROTECTED]> wrote: > Ouch. You have foo-bar-baz code *at work*? :) Unfortunately, some of the code here is much worse than that. > In fact, this was anticipated and the doesn't-exist case is explicitly > documented as: > > If the parameter do

Re: "<->" as "->" with automatic "is rw"

2004-08-20 Thread Matt Diephouse
On Fri, 20 Aug 2004 13:31:12 -0700, Larry Wall <[EMAIL PROTECTED]> wrote: > It's vaguely possible I could be persuaded on the basis that > > for zip @a ¥ @b <-> { ($^a,$^b) = ($^b,$^a) } Shouldn't that be: for zip @a, @b <-> { ... } --or-- for @a ¥ @b <-> { ... } ? --

Re: "<->" as "->" with automatic "is rw"

2004-08-20 Thread Matt Diephouse
On Fri, 20 Aug 2004 13:49:46 -0700, Larry Wall <[EMAIL PROTECTED]> wrote: > Yes, a typo. Though it's not actually clear yet whether you have to > write zips args with semicolons, which is why I partially switched > to ¥ in midthink. Just checking. I wondered if you'd introduced a new feature midt

Re: The last shall be last

2004-09-05 Thread Matt Diephouse
On Sat, 4 Sep 2004 22:17:22 -0700 (PDT), Jonathan Lang > Agreed; that's why I'd include "last" for newbies to use. "0th" as "last" > works only as an extension of "-1st" as "first from last", "-2nd" as > "second from last", and so on; you have positive numbers counting from the > first, and negat

Re: S4: Can PRE and POST be removed from program flow?

2004-09-05 Thread Matt Diephouse
I may be completely off base here, but I think this whole discussion would be better suited for perl6-internals. A packaging system would not be a feature of the language itself, but of its implementation. Don't confuse Perl and perl. -- matt

Re: S4: Can PRE and POST be removed from program flow?

2004-09-06 Thread Matt Diephouse
On Mon, 6 Sep 2004 11:48:59 +, Herbert Snorrason <[EMAIL PROTECTED]> wrote: > As it stands, though, perl6-internals isn't about perl, but Parrot ... > so of the two lists, language is arguably more appropriate... perl6-internals is about perl the implementation (which is parrot). perl6-languag

Re: How would I do this in Perl6? #1

2004-09-14 Thread Matt Diephouse
On Tue, 14 Sep 2004 12:45:17 +0200 (CEST), Michele Dondi <[EMAIL PROTECTED]> wrote: > Now I want to take a list of templates, say $t1, ... $tn and get the > result of > > $result = pack $tn, ... pack $t2, pack $t1, @input; > > without actually writing the whole thing. To my knowledge and great

Re: Angle quotes and pointy brackets

2004-11-30 Thread Matt Diephouse
= ; my @other = %hash; (Those are written out for my own benefit; consider it a goodbye.) -- matt diephouse http://matt.diephouse.com

Re: Angle quotes and pointy brackets

2004-11-30 Thread Matt Diephouse
. *shrug* > And won't we just be doing: > > use CGI :standard; > > anyway? Yeah, we will; I forgot. :-) I don't use Perl 6 very often (yet). -- matt diephouse http://matt.diephouse.com

Re: qq:i

2004-12-01 Thread Matt Diephouse
interpolate? my $name = 'add'; my $code = q:c<«>[ sub «$name» ($left, $right) { return $left + $right; } ]; # prints " # sub add ($left, $right) { # return $left + $right; # } # " Where you could whatever you wanted instead of «». -- matt diephouse http://matt.diephouse.com

Re: qq:i

2004-12-01 Thread Matt Diephouse
} > ]; > > After all, that's why we put \q interpolation into '' in the first place. I missed that. Thanks. -- matt diephouse http://matt.diephouse.com

Re: Angle quotes and pointy brackets

2004-12-03 Thread Matt Diephouse
orth. I'm aware of how ridiculous many of the things we (that includes me) say are, but perhaps I've said something useful. Hoping I haven't removed all doubt of my foolishness, -- matt diephouse http://matt.diephouse.com

Re: iteration (was Re: Angle quotes and pointy brackets)

2004-12-04 Thread Matt Diephouse
On Sat, 04 Dec 2004 08:59:24 -0700, David Green <[EMAIL PROTECTED]> wrote: > In article <[EMAIL PROTECTED]>, > [EMAIL PROTECTED] (Matt Diephouse) wrote: > >Supposing > >class Filehandle does Iterate; # Iterate or Iterator? > >we have an easy way to cr

Re: specifying the key Type for a Hash

2004-12-07 Thread Matt Diephouse
quot;, > $last, $first > ); > } > > ... > } for @byid -> $patient { ... } for %byname.kv -> $key, $value { ... } ??? -- matt diephouse http://matt.diephouse.com

Re: Boolean literals

2005-02-17 Thread Matt Diephouse
and 0 > as the standard boolean values, or bool::true and bool::false? I believe bool::true and bool::false are enums (so they are 1 and 0, respectively). -- matt diephouse http://matt.diephouse.com

Re: A possible solution for s?pintf

2005-03-12 Thread Matt Diephouse
he precedence table.) > Or, if that's not quite sufficient: > > say map { .key.as(.value) } > $num => '%d', > $str => '%s', > ...; And this: say [ $num => '%d', $str => '%s' ] >>.key.as(.value

Re: New S29 draft up

2005-03-17 Thread Matt Diephouse
believe that some of these can already be handled by C<.as()>. I would like for this to be addressed. This is one item that has always confused me about Perl 5. -- matt diephouse http://matt.diephouse.com

Re: New S29 draft up

2005-03-18 Thread Matt Diephouse
; > the replacement should be, though. Maybe it's not worth fixing. > > +"0x$_" # hex > +"0o$_" # oct > +"0b$_" # bin (does not exist in Perl 5) Too bad sub names can't start with numbers: 0x $hex; # hex $hex 0x($hex); 0b $bin; 0o $oct; That would make sense to me. -- matt diephouse http://matt.diephouse.com

Re: New S29 draft up

2005-03-20 Thread Matt Diephouse
Juerd <[EMAIL PROTECTED]> wrote: > Matt Diephouse skribis 2005-03-18 13:35 (-0500): > > Too bad sub names can't start with numbers: > > 0x $hex; # hex $hex > > But they can, if you call them prefix operators instead of subs. See > also -e and alike operators

Slices

2005-03-20 Thread Matt Diephouse
e don't need `splice` and `substr` at all, but there are times when it's more convenient to specify with a starting point and a length than with a range. -- matt diephouse http://matt.diephouse.com

Re: Question about list context for String.chars

2005-04-11 Thread Matt Diephouse
about unicode if i don't want to. And if I understand correctly, that means that I want everything to use chars by default. And C<$string[]> would be a nice shortcut for that. -- matt diephouse http://matt.diephouse.com

Re: Win32 with ICU files build problem

2005-04-12 Thread Matt Diephouse
ntly saw some of this on Linux as well. I didn't go as far as to define --icudatadir, but I noticed that passing no icu options causes Configure.pl to autodetect icu. You might give that a shot. Please consider patching the documentation if what you find there doesn't work. -- matt diephouse http://matt.diephouse.com

Re: ./method

2005-05-15 Thread Matt Diephouse
go with it. Does this mean private methods will be called like this? ./:method() FWIW, I like the original spec best. I'm not sure that the problems with it aren't being exaggerated. But I've not written much Perl 6 yet either... -- matt diephouse http://matt.diephouse.com

Re: ./method

2005-05-15 Thread Matt Diephouse
Damian Conway <[EMAIL PROTECTED]> wrote: > Larry Wall wrote: > > > On Sun, May 15, 2005 at 12:22:07PM -0400, Matt Diephouse wrote: > > : Does this mean private methods will be called like this? > > : > > : ./:method() > > > > No, I think th

Re: Do I need "has $.foo;" for accessor-only virtual attributes?

2005-07-22 Thread Matt Diephouse
to say whether or not this is confusing with adverb pairs, but I love the colon for private methods/attributes and it's the one thing separating your new thinking from my ideal Perl 6 OO. -- matt diephouse http://matt.diephouse.com

Parrot 0.4.11 released

2007-04-17 Thread Matt Diephouse
n config file + extended support for gcc, icc, and other compilers + extended support for Solaris and other platforms Thanks to all our contributors for making this possible, and our sponsors for supporting this project. Enjoy! -- Matt Diephouse

Re: Regex query

2002-09-20 Thread matt diephouse
"), ("1b", "2b"), ("1c", "2c") ); If you can, the only case where I could see [1, 2, 3] being necessary is in a sub call where the parameters are wrapped in parentheses. md |- matt diephouse

Re: Regex query

2002-09-21 Thread matt diephouse
iguous situations like: print (1, 2, 3), "\n"; I don't know how many times I've done that and wanted it to print "123\n". I know it's a feature, but it can be a bug in my writing. Now it'd be unambiguous: print [1, 2, 3], "\n"; --matt diephouse

Re: String concatentation operator

2002-11-18 Thread matt diephouse
Damian Conway wrote: BTW, in thinking about it further, I realize that Dan is going to have to tackle this issue anyway. There's fundamentally no difference in the exigencies of: $junction = $x | $y | $z; foo($junction);# Call foo($x), foo($y), and foo($z)

Re: String concatentation operator

2002-11-18 Thread matt diephouse
Damian Conway wrote: matt diephouse wrote: $junction = $x | $y | $z; foo($junction);# Call foo($x), foo($y), and foo($z) # in parallel and collect the results # in a disjunction Looking at that code, I&#