Definition of Order in S29

2008-01-23 Thread Joe Gottman
In the definition of cmp, S29 says the function returns |Order::Increase|, |Order::Decrease|, or |Order::Same| (which numify to -1, 0, +1). Shouldn't the enumerations and their numerical values be listed in the same order? Joe Gottman

Re: Micro-articles on Perl 6 Operators

2007-09-18 Thread Joe Gottman
This one's very nice. One question: what's the ~+ operator you talk about in your discussion of prefix ~ ? I can't find any mention of it in Synopsis 3. Joe Gottman

Re: Micro-articles on Perl 6 Operators

2007-09-17 Thread Joe Gottman
: you might want to mention the roundrobin function in the article on the zip function since the two are very closely related. Joe Gottman

Re: [svn:perl6-synopsis] r14447 - doc/trunk/design/syn

2007-09-06 Thread Joe Gottman
bind to ANY arguments of the second block? If the second block has two parameters it makes more sense to me for the results to bind to the first parameter and nothing to bind to the second parameter. Joe Gottman

Re: [svn:perl6-synopsis] r14376 - doc/trunk/design/syn

2007-04-17 Thread Joe Gottman
in all subsequent elsif or else statements in the same if .. elsif .. else clause, so you could do something like if testa() - $a {say $a is true} elsif testb() - $b say {$a is false and $b is true} else say {Neither $a nor $b is true} Joe Gottman

Re: Y not

2007-02-20 Thread Joe Gottman
instead (for dot product). Joe Gottman

Question about interpolating version of qw

2007-02-10 Thread Joe Gottman
Does the interpolating version of qw split a string into words before or after it interpolates? So if I have my $foo = 'Hello World'; my @bar = «$foo»; does @bar equal ('Hello World') or ('Hello', 'World')? Joe Gottman

Error in S04

2007-01-28 Thread Joe Gottman
In the Multiplicative Precedence section of S04, div is specified twice. Joe Gottman

Map on a multislice

2007-01-25 Thread Joe Gottman
, 11]) Obviously both should be possible, and if we have a multislice with more than 2 dimensions we should be able to iterate at any level. So what is the default iteration level and how do we override? Joe Gottman Joe Gottman

Suggestion: minmax operator

2007-01-09 Thread Joe Gottman
Since Perl6 is going to have infix min and max operators, it might be a good idea to have an infix minmax operator, defined by $a minmax $b === ($a min $b), ($a max B); #2-element list This would be especially useful as a reduction operator: my ($min, $max) = [EMAIL PROTECTED]; Joe

Gather/Take and threads

2006-12-06 Thread Joe Gottman
Suppose I have a gather block that spawns several threads, each of which calls take several times. Obviously, the relative order of items returned from take in different threads is indeterminate, but is it at least guaranteed that no object returned from take is lost? Joe Gottman

A suggestion for a new closure trait.

2006-08-29 Thread Joe Gottman
{$_ += value;} ... } Joe Gottman

RE: NEXT and the general loop statement

2006-08-18 Thread Joe Gottman
, it makes sense to have a block that means not FIRST. I'm not sure about the name; besides REENTER, other possible names would be SUBSEQUENT or NOTFIRST. Joe Gottman

RE: NEXT and the general loop statement

2006-08-17 Thread Joe Gottman
-Original Message- From: Luke Palmer [mailto:[EMAIL PROTECTED] Sent: Thursday, August 17, 2006 8:44 PM To: Perl6 Language List Subject: Re: NEXT and the general loop statement Wasn't NEXT supposed to do something tricky, such as being mutually exclusive with LAST? I remember a

RE: NEXT and the general loop statement

2006-08-17 Thread Joe Gottman
this: repeat { $num = rand; print $num; NEXT {print ',';} LAST {print \n;} } while $num 0.9; If rand is a true random-number generator it would take a time machine to determine whether to call NEXT or LAST. (Sorry for the double post.) Joe Gottman

NEXT and the general loop statement

2006-08-16 Thread Joe Gottman
Is a NEXT clause called before or after the update portion of a general loop statement? For instance, consider the following code: loop $n = 0; $n 5; ++$n { NEXT {print $n;} } Is the output 01234 or 12345? Joe Gottman

RE: S29 update ready

2006-07-08 Thread Joe Gottman
its behavior when it is passed an empty list. Does it return undef or the empty string? Joe Gottman

S5 - Question about repetition qualifier

2006-04-25 Thread Joe Gottman
. Joe Gottman

RE: [svn:perl6-synopsis] r8637 - doc/trunk/design/syn

2006-04-10 Thread Joe Gottman
, you must use an explicit Creturn. + How does the sub keyword fit in here? Is there any difference between the lines return {say Hello World;}; and return sub {say Hello World;}; ? Joe Gottman

RE: [svn:perl6-synopsis] r8520 - doc/trunk/design/syn

2006-04-01 Thread Joe Gottman
; # same as '$args as Hash or Hash($args) +$args; # same as '$args as Code or Hash($args) Shouldn't this last one be +$args; # same as '$args as Code or Code($args) Joe Gottman

Named Subroutine return values

2006-02-23 Thread Joe Gottman
as our Note that the third possibility here does not include a return type. Does this imply that if we want to declare a subroutine with a return type we have to declare it as either a my sub or an our sub? Joe Gottman

RE: Is S05 correct?

2006-02-06 Thread Joe Gottman
version? Joe Gottman

Do chained comparisons short-circuit?

2006-01-18 Thread Joe Gottman
Suppose I have code that looks like this: my ($x, $y, $z) = (1, 2, 3); say sorted backward if ++$x ++$y ++$z; Will $z be incremented even though the chained comparison is known to be false after ++$x and ++$y are compared? Joe Gottman

RE: binding arguments

2005-12-24 Thread Joe Gottman
important. Joe Gottman

RE: Problem with dwimmery

2005-12-22 Thread Joe Gottman
? while $x-- some_conditions( $x ) {...} but my $hashref = {}; Thanks, These do two different things. {...} indicates that foo is just being declared and the program should die if the code is ever executed. {} is an empty subroutine that executes by doing absolutely nothing. Joe

What's the latest on Iterators?

2005-11-11 Thread Joe Gottman
several independent ones? Joe Gottman

RE: Look-ahead arguments in for loops

2005-10-01 Thread Joe Gottman
, $first_offset, @list) {...} # I'm not sure how to write it. Then your example would be for contextual(3, -1, create_list_here() )- $last, $first, $next { Joe Gottman

RE: $object.meta.isa(?) redux

2005-08-10 Thread Joe Gottman
. And now we're doing away with junctive types in favor of set types. Will there be an operator for symmetric difference? I nominate (^). Joe Gottman

RE: reduce metaoperator on an empty list

2005-05-31 Thread Joe Gottman
{ $^a ~ $sep ~ $^b } , @list } Just as Csum is probably implemented: sub sum ([EMAIL PROTECTED]) { [+] 0, @list } If this were the case, then join '~', 'a', 'b', 'c' would equal '~a~b~c' instead of 'a~b~c' Joe Gottman

RE: Declaration of my() variables using symbolic referentiation

2005-05-21 Thread Joe Gottman
runtime, but I think this just means that this just transforms compile-time errors to runtime errors. Joe Gottman

RE: should we change [^a-z] to -[a..z] instead of -[a-z]?

2005-04-17 Thread Joe Gottman
trick of having the dash be the first character in the class if you want to use a literal dash. Joe Gottman.

RE: New S29 draft up

2005-03-16 Thread Joe Gottman
, only those of the slice defined by @indices. multi sub reduce (Code $expression : [EMAIL PROTECTED]) returns List { my $res; for @values - $cur { FIRST {$res = $cur; next;} $res = $expression($res, $cur); } $res; } Joe Gottman

Closure trait for loop entry

2005-02-12 Thread Joe Gottman
} will next {$_ = false}; Joe Gottman

Making control variables local in a loop statement

2005-01-13 Thread Joe Gottman
that it can be modified inside the loop (by the update portion if nothing else), but does not alias a variable it was initialized from. Joe Gottman

RE: Perl 6 Summary for 2004-11-08 through 2004-11-15

2004-11-15 Thread Joe Gottman
-to-last occurrence. So if we were to do something like m:nth(-2)/foo/ # just a guess about the syntax. on a string containing 4 foo's, then this would match the third foo. Joe Gottman

RE: Reverse .. operator

2004-09-03 Thread Joe Gottman
-Original Message- From: Larry Wall [mailto:[EMAIL PROTECTED] Sent: Thursday, September 02, 2004 8:41 PM To: Perl6 Subject: Re: Reverse .. operator On Thu, Sep 02, 2004 at 08:34:22PM -0400, Joe Gottman wrote: : Is there similar shorthand to set @foo = (5, 3, 3, 2, 1) ? I know

Synopsis 4: Return type of a ~~ b

2004-08-27 Thread Joe Gottman
5, the expression $string =~ /(a+)(b+)/ returns a list of captured substrings in list context Joe Gottman

RE: This fortnight's summary

2004-08-25 Thread Joe Gottman
None of the links for the perl6-language threads work. Joe Gottman

Mailing list archives

2004-08-13 Thread Joe Gottman
There's something wrong with the mailing list archives at http://dev.perl.org/perl6/lists/. I can get to this page OK, but when I click on a link to the perl6-internals or perl6-language archives, I get a This page cannot be displayed error. Joe Gottman

Anonymous Named params (Was Revision of A12's lookahead notions)

2004-08-13 Thread Joe Gottman
); or would I need the braces in this case? Joe Gottman

RE: if not C, then what?

2004-07-09 Thread Joe Gottman
: say $_ = %hash{$_} given get_random_key(); Joe Gottman

RE: definitions of truth

2004-06-24 Thread Joe Gottman
missing? Why not just use say ?$foo Isn't the prefix ? operator designed specifically for this use? Joe Gottman

Next Apocalypse

2004-06-10 Thread Joe Gottman
Now that Apocalypse 12 is out, which one is Larry going to work on next? Joe Gottman

FW: Periodic Table of the Operators

2004-05-28 Thread Joe Gottman
here sent me, as well as reading a few more threads and references. This will be the last update for some time The zip operator is now the Yen sign (¥). Joe Gottman

A12 - Protected Attributes and Methods

2004-04-20 Thread Joe Gottman
have another secondary sigil to mark a protected method or attribute. I'd suggest the semicolon, but I'm afraid it would cause havoc with the parser. Joe Gottman

Re: backticks

2004-04-14 Thread Joe Gottman
-hlE 'qx|`|`|readpipe' {} \; | wc -l 123 `` gets used an awful lot But that's in Perl 5, which is a glue language. And Perl 6 isn't? I use backticks quite a bit in Perl, and I don't see that changing if I upgrade to Perl 6. Joe Gottman

New functions in the core (Was Re: Dereferencing Syntax)

2004-03-26 Thread Joe Gottman
think we should do so. Joe Gottman

Some questions about operators.

2004-03-19 Thread Joe Gottman
? 5) Would it be possible for me to create a user-defined operator that does chaining? Joe Gottman

Re: Mutating methods

2004-03-15 Thread Joe Gottman
}.self:sort(); Why not just do @{$_} = sort @{$_} given $coderef.(argument).{hashelem}; Joe Gottman

Re: Magic blocks (was: Compile-time undefined sub detection)

2004-03-09 Thread Joe Gottman
start the loop the next time. Joe Gottman

Exegesis 7: Literal '{' in format string

2004-02-29 Thread Joe Gottman
How do you put a literal '{' or '}' into a format string in Perl 6? Do you use a backslash? Joe Gottman

Re: The Sort Problem: a definitive ruling

2004-02-19 Thread Joe Gottman
they all are. Will the sort end up being numerical or alphabetic? Joe Gottman

Re: The Sort Problem

2004-02-15 Thread Joe Gottman
$by : [EMAIL PROTECTED]) {...} multi sub *sort( : [EMAIL PROTECTED]) { ...} # returns sort {$^a cmp $^b} @data Joe Gottman

Re: [perl] The Sort Problem

2004-02-11 Thread Joe Gottman
an unnecessary copy of the array. It would be nice calling if sort (or reverse, or other similar functions) in void context resulted in in-place modification of the array that was input. Joe Gottman

Re: Semantics of vector operations

2004-01-22 Thread Joe Gottman
syntax mean both. I'm aware that using = instead of = will eliminate the inconsistency, but not everyone has easy access to Unicode keyboards. Joe Gottman

Re: Comma Operator

2004-01-21 Thread Joe Gottman
- Original Message - From: Larry Wall [EMAIL PROTECTED] To: Perl6 [EMAIL PROTECTED] Sent: Wednesday, January 21, 2004 2:51 PM Subject: [perl] Re: Comma Operator On Tue, Jan 20, 2004 at 08:12:28PM -0800, Jonathan Lang wrote: : Joe Gottman wrote: : About a month ago, a thread here

Re: Roles and Mix-ins?

2004-01-06 Thread Joe Gottman
() This works better when Dog::bark and Tree::bark are both needed but they do different things. Joe Gottman

Re: Roles and Mix-ins?

2004-01-06 Thread Joe Gottman
- Original Message - From: Luke Palmer [EMAIL PROTECTED] To: Joe Gottman [EMAIL PROTECTED] Cc: Perl6 [EMAIL PROTECTED] Sent: Tuesday, January 06, 2004 9:34 PM Subject: [perl] Re: Roles and Mix-ins? Joe Gottman writes: - Original Message - From: Luke Palmer [EMAIL

Re: [perl] Re: Object Order of Precedence (Was: Vocabulary)

2003-12-20 Thread Joe Gottman
default as a keyword (see the switch statement), and having a trait with the same name as a keyword might confuse users and/or the compiler. Joe Gottman

Iterating through two arrays at once

2003-12-10 Thread Joe Gottman
is differentiating between an undef returned because the arrays were of different sizes, and an undef returned because one of the arrays contained an undef. Joe Gottman

Re: [perl] RE: s/// in string context should return the string

2003-11-18 Thread Joe Gottman
know enough C++ to know the difference between an lvalue and an rvalue, but what the heck is a BValue? Joe Gottman

Re: [perl] Re: syntax: multi vs. method

2003-11-18 Thread Joe Gottman
, while call will not. Joe Gottman

Re: Some questions about currying

2003-10-30 Thread Joe Gottman
- Original Message - From: Luke Palmer [EMAIL PROTECTED] Joe Gottman writes: 3) Currying binds a function parameter to a value? Is there any way to bind a function parameter to a variable? Consider the following code: sub printNum(int $x) {print $x\n;} my $foo = 0

Some questions about currying

2003-10-29 Thread Joe Gottman
reference. This would probably have to be a different method than assuming. Maybe something like printNum(int).bind(x = \$foo) Joe Gottman

How to create a function that returns nothing

2003-10-14 Thread Joe Gottman
. This would be an absolute necessity if you wanted to emulate C++, Java, or any other strongly typed language. Also, it could be useful for causing a compile-time error if someone types something like $z = swap($x, $y); Joe Gottman

Re: Perl 6's for() signature

2003-07-31 Thread Joe Gottman
- Original Message - From: Hanson, Rob [EMAIL PROTECTED] To: 'Rod Adams' [EMAIL PROTECTED]; Perl 6 Language [EMAIL PROTECTED] Sent: Thursday, July 31, 2003 1:29 PM Subject: RE: Perl 6's for() signature Anyone but me feel the need for non-greedy slurpy arrays? similar to non-greedy

Re: Short-circuiting user-defined operators

2003-04-03 Thread Joe Gottman
more than once brings back painful memories of C-style macros. Joe Gottman

Short-circuiting user-defined operators

2003-04-01 Thread Joe Gottman
difficult it would be to implement either of these concepts. Also, if a parameter is deferred, would we need a new keyword to say when to actually evaluate it? Joe Gottman

Re: is static?

2003-03-15 Thread Joe Gottman
should be like a my variable except that it is only initialized once and is not destroyed when it goes out of scope. Joe Gottman

Re: A6: overloading multis on constness of parameters

2003-03-12 Thread Joe Gottman
- Original Message - From: Damian Conway [EMAIL PROTECTED] To: Perl6 [EMAIL PROTECTED] Sent: Tuesday, March 11, 2003 9:35 PM Subject: Re: A6: overloading multis on constness of parameters Joe Gottman wrote: Will it be possible in perl6 to overload multis on the const-ness

A6: overloading multis on constness of parameters

2003-03-11 Thread Joe Gottman
then the first getX would be called, and if it were called on a non-const Foo object the second one would be. Joe Gottman

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

2003-01-03 Thread Joe Gottman
= 31); Joe Gottman

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

2003-01-03 Thread Joe Gottman
- Original Message - From: Uri Guttman [EMAIL PROTECTED] To: Joe Gottman [EMAIL PROTECTED] Cc: Perl6 [EMAIL PROTECTED] Sent: Friday, January 03, 2003 10:06 PM Subject: Re: my int( 1..31 ) $var ? JG == Joe Gottman [EMAIL PROTECTED] writes: JG Speaking of which, is there a run

Re: This week's summary

2002-11-27 Thread Joe Gottman
There's something wrong with your links to the messages in the documentation list. Whenever I click on one, I get the message Unable to find thread. Please recheck the URL. Joe Gottman

Re: exegesis 5 question: matching negative, multi-byte strings

2002-10-02 Thread Joe Gottman
want. The capturing parentheses ensure that we return the part of the string we want, and we manually reset $pos to the correct position. This is easy to understand, and very extensible. Joe Gottman

Fw: perl6 operator precedence table

2002-09-26 Thread Joe Gottman
Apocalypse 4 mentions unary '?' . Since this is used to force boolean context, I would assume that it has the same precedence as unary '+' and '_' which force numeric and string context respectively. By the way, has anyone come up with a use for binary '?' yet? Joe Gottman

Questions about private variables

2002-04-05 Thread Joe Gottman
is performed only once. Unfortunately, I have no idea how this would be implemented in Perl 6. Joe Gottman