On 10/5/05, Ovid [EMAIL PROTECTED] wrote:
sub _attributes {
my ($self, $attrs) = @_;
return $$attrs if UNIVERSAL::isa( $attrs, 'SCALAR' );
my @attributes = UNIVERSAL::isa( $attrs, 'HASH' )
? %$attrs : @$attrs;
return unless @attributes;
# more code here
}
On 10/5/05, Damian Conway [EMAIL PROTECTED] wrote:
So I now propose that Czip works like this:
Czip interleaves elements from each of its arguments until
any argument is (a) exhausted of elements Iand (b) doesn't have
a Cfill property.
Once Czip stops
On 10/5/05, Damian Conway [EMAIL PROTECTED] wrote:
Luke wrote:
I'm just wondering why you feel that we need to be so careful.
Because I can think of at least three reasonable and useful default behaviours
for zipping lists of differing lengths:
# Minimal (stop at first exhausted
On 10/6/05, Juerd [EMAIL PROTECTED] wrote:
for @foo Y @bar Y @baz - $quux, $xyzzy { ... }
is something you will probably not see very often, it's still legal
Perl, even though it looks asymmetric. This too makes finding the
solution in arguments a non-solution.
Don't be silly. There's
On 10/6/05, Dave Whipp [EMAIL PROTECTED] wrote:
sub foo( $a, ?$b = rand but :is_default )
{
...
bar($a,$b);
}
sub bar( $a, ?$b = rand but :is_default )
{
warn defaulting \$b = $b if $b.is_default;
...
}
It would be unfortunate if the is_default property attached in foo
On 10/6/05, Yuval Kogman [EMAIL PROTECTED] wrote:
when i can't open a file and $! tells me why i couldn't open, i
can resume with an alternative handle that is supposed to be the
same
when I can't reach a host I ask a user if they want to wait any
On 10/6/05, Juerd [EMAIL PROTECTED] wrote:
Luke Palmer skribis 2005-10-06 14:23 (-0600):
my role is_default {} # empty
sub foo($a, ?$b = 0 but is_default) {...}
Would this work too?
0 but role {}
Most certainly, but you would have no way to refer to that role later
Autrijus convinced me that we have to really nail down the semantics
of type annotation without use static. Let's first nail down what
I meant by semantics in that sentence. Basically, when do various
things get checked? Run time or compile time (not coercion; I have a
proposal for that
On 10/7/05, chromatic [EMAIL PROTECTED] wrote:\
If I added a multisub for Array assignment so that assigning an integer
value set the length of the array, would 97 be compatible with Array?
You're not allowed to overload assignment.
But you are allowed to overload coersion. Essentially, every
On 10/7/05, Juerd [EMAIL PROTECTED] wrote:
Miroslav Silovic skribis 2005-10-07 13:07 (+0200):
Can an inline role be named?
0 but role is_default {}
This is a nice idea. It would require named roles (and to really be
succesful, also classes, subs, methods, ...) declarations to be
On 10/7/05, Juerd [EMAIL PROTECTED] wrote:
Luke Palmer skribis 2005-10-07 15:31 (-0600):
sub foo($x) {
sub bar() {
return $x;
}
return bar;
}
foo(42).(); #
Does this mean that this Perl 5 snippet no longer does the same
On 10/7/05, chromatic [EMAIL PROTECTED] wrote:
On Fri, 2005-10-07 at 15:22 -0600, Luke Palmer wrote:
But you are allowed to overload coersion. Essentially, every
expression gets a coerce:as($expr, $current_context) wrapped around
it (where these are optimized away when they do nothing
On 10/7/05, Luke Palmer [EMAIL PROTECTED] wrote:
On 10/7/05, chromatic [EMAIL PROTECTED] wrote:
On Fri, 2005-10-07 at 15:22 -0600, Luke Palmer wrote:
But you are allowed to overload coersion. Essentially, every
expression gets a coerce:as($expr, $current_context) wrapped around
On 10/7/05, chromatic [EMAIL PROTECTED] wrote:
On Fri, 2005-10-07 at 17:43 -0600, Luke Palmer wrote:
No, you can't overload assignment at runtime because you can't
overload assigment at any time, so says the language spec (well, not
any formal spec; so says Larry as far as I remember
On 10/9/05, Uri Guttman [EMAIL PROTECTED] wrote:
IB == Ingo Blechschmidt [EMAIL PROTECTED] writes:
IB sub foo ($a) {...}
works for me. but what about lists and arrays?
my @z = ( 'a', 1 ) ;
foo( @z ) # $a = [ 'a', 1 ] ??
Yep.
my @z = ( a = 1 ) ;
On 10/10/05, Stevan Little [EMAIL PROTECTED] wrote:
::Class
^
: -- eFoo is a subclass of Class
:
::eFoo # eFoo is also an instance of Class
|
| -- eFoo is the class of Foo
V
::Foo
The dispatching of instance methods is still the same, and
On 10/11/05, Alfie John [EMAIL PROTECTED] wrote:
Does Perl6 support multiline comments?
Yes, in the form of pod blocks.
=begin comment
=end comment
They nest, too.
Luke
On 10/12/05, Alfie John [EMAIL PROTECTED] wrote:
On 12/10/2005, at 3:33 PM, Luke Palmer wrote:
=begin comment
=end comment
But does that then break my lovely formatted pod like it does in Perl5?
Try this:
% cat dosomething.pl
=head1 TITLE
Thingy - do something
=head1 DESCRIPTION
=over
Okay, I seriously have to see an example of a submethod in use. BUILD
etc. don't count. Why? Because:
class Foo {
method BUILD () { say foo }
}
class Bar is Foo {
submethod BUILD () { say bar }
}
class Baz is Bar { }
Foo.new; # foo
Bar.new; #
On 10/12/05, Rob Kinyon [EMAIL PROTECTED] wrote:
Plus, I can't imagine that a reverser for Parrot code is going to be that
hard to
write.
Disassembling register machine code is significantly more difficult
than disassembling stack machine code.
That said, if the level of introspective
On 10/13/05, Dave Whipp [EMAIL PROTECTED] 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 can
On 10/14/05, Markus Laire [EMAIL PROTECTED] wrote:
Perl does have CPAN, but the problem is that there are no standard
modules, and so there can be several modules doing the same thing.
And what is the problem with that?
For example, some of the modules for graphics you get to choose from
are
On 10/18/05, Rob Kinyon [EMAIL PROTECTED] wrote:
3) Macros. Nuff said.
Not quite. Lispish macros, that is, macros that let you look at what
you're expanding.
4) More declarative syntax. This is more of a handwavy, but the syntax
feels (to me) as if it's more declarative than before. For
On 10/18/05, Uri Guttman [EMAIL PROTECTED] wrote:
i have an opportunity to get an email sent to the faculty of a top CS
dept. my goal is to get internal support for a potential YAPC to be
hosted there. so i want to present perl 6 to them in a way which will
sell them on its academic and
On 10/18/05, Eric [EMAIL PROTECTED] wrote:
Currently we (can|will be able to) do
string.trans( (['h','e'] = 0) );
string.trans( == ['h','e'] = 0);
Those are fine and i can live with that, but it seems that if we made the
signature of trans
method trans(Str $self: [EMAIL PROTECTED]) {};
On 10/18/05, Rob Kinyon [EMAIL PROTECTED] wrote:
On 10/18/05, Uri Guttman [EMAIL PROTECTED] wrote:
my impression is that both styles are supported as you can return either
text or an AST (compiled code) from a macro.
That sounds really ... inefficient. For that to work, you'd have to
have
On 10/19/05, Stevan Little [EMAIL PROTECTED] wrote:
Darren,
Your problem reminds me of the Expression Problem, which is
something that IIRC Luke's Theory idea was trying to solve.
Indeed, this problem is almost exactly the contravariant half of the
expression problem. Once upon a time, a
On 10/20/05, Larry Wall [EMAIL PROTECTED] wrote:
Another thing I didn't mention is that that binds both the variable
and its class. But the $ variable is of course optional after the
type, so you could just write that
sub sametype (¢T, ¢T) {...}
if you don't actually care about $x and
On 10/20/05, Juerd [EMAIL PROTECTED] wrote:
Schneelocke skribis 2005-10-20 18:00 (+0200):
Would c! be an option?
In current Perl 6: Yes, because infix ! does not exist.
But several people want ! to be a chainy none() constructor, and this
would destroy a dream.
You seem to be forgetting
On 10/20/05, Nate Wiger [EMAIL PROTECTED] wrote:
Luke Palmer wrote:
Okay, I may still be missing your point, so let me try to summarize
just to be sure we're on the same page: You say that the thing that
is going to hinder migration to Perl 6 is the fact that it's different
from Perl 5
On 10/20/05, John Adams [EMAIL PROTECTED] wrote:
Then the target audience is specifically not people coming from a
shell scripting background, who are quite used to the idea that $0 is
different from $1 in a way in which $1 is not different from $2.
Correct?
But $1 in Perl 5 wasn't the same
On 10/20/05, Steve Peters [EMAIL PROTECTED] wrote:
As I mentioned earlier, most programmers in a corporate environment have
limited access to system settings.
And in those kinds of corporate environments, you're not going to be
working with any code but code written in-house. Which means that
On 10/21/05, Benjamin Smith [EMAIL PROTECTED] wrote:
On Thu, Oct 20, 2005 at 06:39:34PM -0600, Luke Palmer wrote:
Huh? So you want to go back to Perl 5's arrow? *Anybody* coming to
Perl 6 from some non-Perl 5 language is going to be more comfortable
with dot.
Unless it was Smalltalk, C
On 10/21/05, Luke Palmer [EMAIL PROTECTED] wrote:
On 10/21/05, Benjamin Smith [EMAIL PROTECTED] wrote:
On Thu, Oct 20, 2005 at 06:39:34PM -0600, Luke Palmer wrote:
Huh? So you want to go back to Perl 5's arrow? *Anybody* coming to
Perl 6 from some non-Perl 5 language is going
On 10/21/05, Dave Whipp [EMAIL PROTECTED] wrote:
Luke Palmer wrote:
And in those kinds of corporate environments, you're not going to be
working with any code but code written in-house. Which means that
nobody is going to be using Latin-1, and everyone will be using the
ASCII synonyms
On 10/21/05, Mark Reed [EMAIL PROTECTED] wrote:
Hm. This brings up another point, which may have been addressed . . .
The Python function and Ruby array method zip() both accept any number of
arrays to interleave:
zip([1,2,3],[4,5,6],[7,8,9])
[(1, 4, 7), (2, 5, 8), (3, 6, 9)]
On 10/23/05, Ilmari Vacklin [EMAIL PROTECTED] wrote:
Hi,
S04 says thus:
The default case:
default {...}
is exactly equivalent to
when true {...}
However, that parses to:
if $_ ~~ bool::true { ...; leave }
Which is not executed if $_ is false, unless ~~
On 10/24/05, TSa [EMAIL PROTECTED] wrote:
Does this capturing of the type into ¢T also involve runtime
code template expansion? That is, if sametype(Int,Int) didn't
exist it would be compiled on the fly for a call sametype(3,2)?
I think that's up to the implementation. From the language
On 10/24/05, H.Merijn Brand [EMAIL PROTECTED] wrote:
On Mon, 24 Oct 2005 11:49:51 -0400, Joshua Gatcomb [EMAIL PROTECTED]
wrote:
FEAR: Perl6 internals will be just as inaccessable as p5
paradox. Many people don't find perl5 inaccessible at all
Who? Do you know anybody who hacks the regex
On 10/25/05, Larry Wall [EMAIL PROTECTED] wrote:
We're probably converging on a general rule that two or more
declarations of the same variable in the same scope refer to the
same entity:
my $x = 1; # outer $x;
{
$x = 2; # bound to OUTER::$x
On 10/25/05, Eric [EMAIL PROTECTED] wrote:
I would just like to mention that 'class' is confusing because you
don't realy mean class there. The whole conversation is about types
so why not have it be 'type'?
If you read the introduction to theory.pod[1], you'll find that we are
actually
On 10/26/05, Larry Wall [EMAIL PROTECTED] wrote:
So maybe we can define our terms like this:
type: a completely generic metaterm for any of the following,
and then some.
class: a mutable interface object that manages instances in the
classical way, with covariant
On 10/26/05, Rob Kinyon [EMAIL PROTECTED] wrote:
On 10/26/05, chromatic [EMAIL PROTECTED] wrote:
On Wed, 2005-10-26 at 20:29 -0400, Rob Kinyon wrote:
I would prefer to use roles as they're closed by default, leaving
class to be my powertool, if I need the power.
I don't understand
On 10/26/05, Rob Kinyon [EMAIL PROTECTED] wrote:
What about:
class Foo is also {
method foo() { ... }
}
Where the second foo() is no longer what the first foo() did.
Just overwrite the vtable.
Furthermore, let's say you have:
class Bar isa Foo {
method
On 10/27/05, Yiyi Hu [EMAIL PROTECTED] wrote:
What I want to do, is a bit like...
class A {
has $.b;
method show { $.b.say };
};
A( b = 5 ).show;`
Yes, I definitely want this to be the way that case type instances are
created: all those .news everywhere could get annoying.
Anyway,
On 10/28/05, Darren Duncan [EMAIL PROTECTED] wrote:
One thing I would like to be able to do is this:
@baz = cross([1,2],[3,4]); # yields ([1,3],[1,4],[2,3],[2,4])
And alternately, this:
for cross([1,2],[3,4]) - $foo,$bar { ... } # loop has 4 iterations
I already proposed this in this
On 10/28/05, Ruud H.G. van Tol [EMAIL PROTECTED] wrote:
John Williams:
($x *=2) += 1;
Or ($x *= 2) ++;
Maybe the comma should be taught a new trick:
$x *= 2, ++, /= 3;
meaning
$x = (($x * 2) + 1) / 3;
Or RPN-like:
$x #= 2* 1+ 3/;
Oh, gee, why don't we just go with:
Here's how I see roles. This is just an attempt to formalize our
concepts so that the answer becomes an obvious truth rather than a
decision.
A role is an interface with some default implementations. Here's an example:
role Foo {
# anything that conforms to Foo must provide a foo()
On 10/28/05, Rob Kinyon [EMAIL PROTECTED] wrote:
Now, it's obvious why a class would have to resolve that conflict. I
would say that a role would have to resolve the conflict is that a
role should present a consistent API to the rest of the world. In
other words, I want to be able to depend on
On 10/28/05, Christopher D. Malon [EMAIL PROTECTED] wrote:
On Oct 28, 2005, at 11:13 PM, Luke Palmer wrote:
Trying to think through the VectorSpace example, and a slightly
more complicated example (a Field), I'm starting to wonder whether
roles need to be parameterized somehow. (Maybe
On 10/29/05, Damian Conway [EMAIL PROTECTED] wrote:
So we need a mechanism that is externally (i.e. from a class interface
point-of-view) a subroutine, but internally has the features of a method (i.e.
has an invocant). Since it's externally sub-like but internally method-like,
we call this
On 11/1/05, Jonathan Lang [EMAIL PROTECTED] wrote:
In the third case, I'd be inclined to say that passing the buck is
equivalent to creating an undefined version of your own - that is, not
addressing a conflict involving method x is equivalent to saying
method x ($arg) { ... }. IOW, a class
On 11/2/05, Jonathan Lang [EMAIL PROTECTED] wrote:
Let's say you have this:
role A {method foo() { code1; } }
role B {method foo() { code2; } }
role C does A does B {
method foo() { A::foo(); }
method bar() { B::foo(); }
}
Should the following be valid?
role D does C
On 11/3/05, TSa [EMAIL PROTECTED] wrote:
So if A : B, I would expect Role{B} : Role{A} and Factory{A} : Factory{B}
on the following rational.
Well, it's possible that I'm abusing the terms, since I first heard
the terms from you and inferred what they meant.
However, there is a problem in your
On 11/3/05, Luke Palmer [EMAIL PROTECTED] wrote:
If Foo2 were a role (that is, if it obeys the role relation above),
then the only thing bar2() could do would be to take some side-effect
action and then return the same object it was passed. Here's a proof:
Given ^T $x where Foo{^T
On 11/3/05, Leopold Toetsch [EMAIL PROTECTED] wrote:
On Nov 3, 2005, at 20:49, Joshua Isom wrote:
I was trying to use bit shifting for division by multiples of two, but
if the shift amount is a multiple of the int size, it seems to fail to
shift the bits. Here's some example code
On 11/8/05, Gaal Yahas [EMAIL PROTECTED] wrote:
Wouldn't it be nice to be able to supply default values for instance
variables right in the attribute declaration?
class Jabberwock {
has $.jaws = bite;
has $.claws = catch;
}
my $scary = Jabberwock.new;
On 11/8/05, Gaal Yahas [EMAIL PROTECTED] wrote:
On Tue, Nov 08, 2005 at 07:07:42PM +, Luke Palmer wrote:
class Jabberwock {
has $.jaws = bite;
has $.claws = catch;
}
That is legal Perl 6. The fact that it is not legal pugs is pugs's
problem
Just some initial thoughts and syntax issues. I'll come back to it on
the conceptual side a little later.
On 11/10/05, Jonathan Lang [EMAIL PROTECTED] wrote:
class complexRectilinear {
has $.x, $.y;
Hmm, that might need to be
has ($.x, $.y);
However, inlining hass isn't possible, so
On 11/15/05, Aaron Sherman [EMAIL PROTECTED] wrote:
This question came out of a joking comment on IRC, but it's a serious
concern. Can chained buts be optimized, or must the compiler strictly
create intermediate metaclasses, classes and objects in the following:
my $a = $b but C but D
Here is some perplexing behavior:
say Foo;
hello there;
sub hello () {
say Bar;
}
sub there () {
say Baz;
}
This prints:
Foo
*** No compatible subroutine found: hello
at lazy.p6 line 2, column 1-12
I would expect it to print:
Foo
On 11/16/05, Luke Palmer [EMAIL PROTECTED] wrote:
Here is some perplexing behavior:
say Foo;
hello there;
sub hello () {
say Bar;
}
sub there () {
say Baz;
}
This prints:
Foo
*** No compatible subroutine found: hello
On 11/17/05, Joshua Choi [EMAIL PROTECTED] wrote:
But what does that mean for ='s signature? What type would be its
first parameter? Would you call it infix:{'='}:(Bareword | Any,
Any) or something like that? And in any case, would you be able to
use this autoquoting in or as a sub, operator,
On 11/20/05, Ingo Blechschmidt [EMAIL PROTECTED] wrote:
sub foo (*@;AoA) { @;AoA }
my @array1 = a b c;
my @array2 = d e f;
my @AoA = foo @array1, @array2;
say [EMAIL PROTECTED]; # 2?
1
say [EMAIL PROTECTED]; # a b c?
a b c d e f
However,
my @AoA =
On 11/21/05, Ingo Blechschmidt [EMAIL PROTECTED] wrote:
Hm. How is (*@;AoA) different from (Array [EMAIL PROTECTED]) then? (Assuming
that
foo(@a; @b) desugars to foo([EMAIL PROTECTED], [EMAIL PROTECTED]).)
Well, it's not at all, under that assumption. But that assumption is
wrong. I think
On 11/21/05, Ingo Blechschmidt [EMAIL PROTECTED] wrote:
Of course, the compiler is free to optimize these things if it can prove
that runtime's statement_control:if is the same as the internal
optimized statement_control:if.
Which it definitely can't without some pragma.
I wonder if they
On 11/23/05, Rob Kinyon [EMAIL PROTECTED] wrote:
On 11/22/05, Larry Wall [EMAIL PROTECTED] wrote:
for ^5 { say } # 0, 1, 2, 3, 4
I read this and I'm trying to figure out why P6 needs a unary operator
for something that is an additional character written the more legible
way.
Huh?
On 11/22/05, Damian Conway [EMAIL PROTECTED] wrote:
:syntaxPOSIX
:syntaxgrep
:syntaxegrep
:syntaxvim
:syntaxSnobol
:syntaxGoogle
Aren't we providing an interface to define your own regex modifiers?
All of these can easily be mapped into Perl 6 patterns, so...
On 11/23/05, Damian Conway [EMAIL PROTECTED] wrote:
Luke wrote:
On 11/22/05, Damian Conway [EMAIL PROTECTED] wrote:
:syntaxPOSIX
:syntaxgrep
:syntaxegrep
:syntaxvim
:syntaxSnobol
:syntaxGoogle
Aren't we providing an interface to define your own regex
On 11/23/05, Larry Wall [EMAIL PROTECTED] wrote:
Basically, we're attaching the whole lazy/nonlazy mess to the
list/scalar distincion, which I think is a really good default.
We use ** and lazy() to violate those defaults.
I think you might be mixing up the scope of laziness here. Having a
Hi Jerry,
I'm just curious, I don't mean to criticize your ideas. Just, give
some whys for the shoulds.
On 11/29/05, jerry gay [EMAIL PROTECTED] wrote:
the parrot directory structure is large and a bit disorganized.
let me give you some examples:
* build_tools/, util/, and tools/*/ each
On 12/5/05, Gaal Yahas [EMAIL PROTECTED] wrote:
There's a bikeshedding question of some visibility: now that we have a
Cfail builtin, what do we do with CTest::fail?
Is it possible to do nothing with it? That is, can we coerce the Test
module to understand when the main program fails? This
On 12/5/05, Darren Duncan [EMAIL PROTECTED] wrote:
Under the current system, a subroutine argument is an alias for the
container passed to it;
The most immediate offender here is the referential passing semantics.
Here is a code case:
sub foo ($x, code) {
code();
say $x;
On 12/6/05, chromatic [EMAIL PROTECTED] wrote:
On Mon, 2005-12-05 at 07:54 +, Luke Palmer wrote:
I wonder if there is a macroey thing that we can do here. That is,
could we make:
ok(1);
is(1, 1);
like(foo, /foo/);
Into:
ok(1);
ok(1 == 1);
ok
On 12/6/05, Luke Palmer [EMAIL PROTECTED] wrote:
That still leaves the problem of what to do with fail() and is() in
the compiler suite.
Here's a handwavey crack at what I was talking about:
Ack. Accidentally sent the half written message. Let's try again:
my $comparators = set == eq
On 12/11/05, Bryan Burgers [EMAIL PROTECTED] wrote:
I was wondering... Are there plans to have parrot securely execute
remote code, similar to JVM, so a person can have a parrot plug-in in
their browser (for example), and run parrot 'applets' with the
confidence that they are safe?
Or is this
On 12/15/05, Darren Duncan [EMAIL PROTECTED] wrote:
I propose, perhaps redundantly, that Perl 6 include a complete set of
native
Okay, I'm with you here. Just please stop saying native and core.
Everyone.
rant
Remember, syntax in Perl 6 can be stuffed in a library like anything
else. You
On 12/15/05, Gaal Yahas [EMAIL PROTECTED] wrote:
What should this mean?
package Foo;
sub Bar::baz is export { ... }
The problem is in how callers request this export.
use Foo baz;
Hmm. My gut reaction is that that is the correct way to request that export.
Looks weird,
On 12/15/05, Brad Bowman [EMAIL PROTECTED] wrote:
Why does the longest input sequence win?
Is it for some consistency that that I'm not seeing? Some exceedingly
common use case? The rule seems unnecessarily restrictive.
Hmm. Good point. You see, the longest token wins because that's an
On 12/17/05, Darren Duncan [EMAIL PROTECTED] wrote:
An undefined value is NOT the same as zero or an empty string
respectively; the latter two are very specific and defined values,
just like 7 or 'foo'.
I definitely agree with you in principle. This is something that has
been bugging me, too.
Recently, I believe we decided that {} should, as a special case, be
an empty hash rather than a do-nothing code, because that's more
common.
However, what do we do about:
while $x-- some_condition($x) {}
Here, while is being passed a hash, not a do-nothing code. Should we
force people to
On 12/22/05, Michele Dondi
Please do not ask me what I have in mind, for I'm
not really sure.
Well, @Larry has been researching attribute grammars for a month or
two now, which are an efficient (programmer-wise, not necessarily
processor-wise) method for specifying computations over trees. The
On 12/23/05, Peter Schwenn [EMAIL PROTECTED] wrote:
Perl6'ers
Is the best (most complete as to Perl6 Language) current setup (for
experimenting with Perl6 source code) currently a hybrid: Pugs with
embedded Parrot, or is it Perl5 with a large set of Perl6'ish modules.
Or something else that
The following causes PGE to infinite loop:
x ~~ /[ [ x ]* ]*/
Luke
What sort of match object should this return, supposing that it didn't
infinite loop:
x ~~ / [ [ (x) ]* ]* /
Should $/[0][0] be x, or should $/[0][0][0] be x? If it's the
latter, then when do new top-level elements get added?
/
[
[
{ say +$/[0][] } # is this
Does .clone do deep or shallow copying of objects?
I'm going to argue for shallow. I know there's a obvious tendency to
say that we should go with deep, because it's useful sometimes.
However, I think that would be ignoring the amazing prevelance of the
shallow copy idioms in perl 5:
[
On 12/23/05, Juerd [EMAIL PROTECTED] wrote:
Luke Palmer skribis 2005-12-23 16:16 (+):
However, I think that would be ignoring the amazing prevelance of the
shallow copy idioms in perl 5:
[ @array ]
{ %hash }
It's a great idiom. Not much typing, easy on the eyes and easy
On 12/23/05, TSa [EMAIL PROTECTED] wrote:
HaloO Everybody,
here's a an idea from me about makeing range object a bit like
junctions. That is a range object has a $.min and $.max and the
following comparison behaviour:
str num
lt strictly inside -+
gt strictly outside
On 12/25/05, Juerd [EMAIL PROTECTED] wrote:
foo(
named_arg := $value,
other_arg := $value,
);
I'll point out that Joe's argument is completely moot, because you're
not using $s on the named arguments. As a matter of fact, we could
double up the := symbol as both
On 12/26/05, Patrick R. Michaud [EMAIL PROTECTED] wrote:
On Fri, Dec 23, 2005 at 02:09:19PM +, Luke Palmer wrote:
x ~~ / [ [ (x) ]* ]* /
As I understand things, $/[0][0] would be x.
Hmm, that seems wrong. Consider:
xxxyxxyxy ~~ / [ [ (x) ]* (y) ]* /
I argue
On 12/26/05, Patrick R. Michaud [EMAIL PROTECTED] wrote:
I argue that by the structure of that rule, you should be able to tell
which xs go with which y.
...
Is there a counterargument that I'm not seeing?
I'd say that if you want a structured rule, it should be written
that way, as in
On 12/28/05, Sastry [EMAIL PROTECTED] wrote:
I am looking for the latest Perl6 source code. Could somebody give me
a link to the same?
Do we need to install parrot before we install perl6?
You can check out the latest code at:
http://svn.openfoundry.org/pugs
You'll need ghc-6.4 or later
I propose that we change $! (formerly global) and $/ (formerly
implicitly lexical) to being env variables. Here is the IRC
conversation where Audrey convinced me:
http://colabti.de/irclogger/irclogger_log/perl6?date=2006-01-01,Sunsel=1213#l1893
Let me explain env variables, because my
Recursive descent is slow, and it produces bad error messages unless
you are very careful with your commit calls, but it is very flexible
and (locally) predictable. Predictive parsing is faster and produces
fantastic error messages, and is fairly flexible. Bottom up parsing
is very flexible, but
On 1/2/06, TSa [EMAIL PROTECTED] wrote:
But I have no idea for this nice syntax, yet. Perhaps something like
my junc = any(1,2,3);
my $val = 1;
if junc( infix:==, $val ) {...}
which is arguably clumsy.
I don't think anyone would waste his time arguing that. :-)
The part that
On 1/4/06, Jonathan Lang [EMAIL PROTECTED] wrote:
And I'm almost sure that I agree with him. It's too bad, because
except for that little detail, fmap was looking pretty darn nice for
junctions.
Not really. If I read the fmap proposal correctly,
You didn't :-)
if any($x, $y, $z)
On 1/4/06, Rob Kinyon [EMAIL PROTECTED] wrote:
Luke Palmer wrote:
The point was that you should know when you're passing a named
argument, always. Objects that behave specially when passed to a
function prevent the ability to abstract uniformly using functions.[1]
...
[1] This is one
On 1/9/06, Gaal Yahas [EMAIL PROTECTED] wrote:
sub use_ok($module) {
eval package {caller.package}; require etc.;
}
I'd like to see a nice interface to scopes in general. That is, we
would have a scope object which would provide access to all the
lexical scopes and the package
On 1/12/06, Jonathan Lang [EMAIL PROTECTED] wrote:
I think that Dave has a point about a Range[Real] being an infinite
set: According to DWIM, if I see 4.5..5.7, I don't think of 4.5,
5.5; I think of numbers greater than or equal to 4.5 but less than
or equal to 5.7. Likewise, 4.5^..^5.3
On 1/13/06, Dave Whipp [EMAIL PROTECTED] wrote:
I'm trying to work out if there's a clever perl6 way to write this using
pattern matching:
for @*ARGV - -f, $filename {
$filename .= absolute_filename;
}
There is, but it's a different kind of pattern matching:
if @*ARGV ~~ / ,
301 - 400 of 1293 matches
Mail list logo