Rod Adams wrote:
TSa (Thomas Sandlaß) wrote:
You mean @a = [[1,2,3]]? Which is quite what you need for multi
dimensional arrays anyway @m = [[1,2],[3,4]] and here you use
of course @m[0][1] to pull out the 2. I'm not sure if this automatically
makes the array multi-dimensional to the type
Rod Adams wrote:
Austin Hastings wrote:
--- Rod Adams [EMAIL PROTECTED] wrote:
TSa (Thomas Sandlaß) wrote:
@m = [[1,2],[3,4]]
@m[0;1] is a multidim deref, referencing the 4.
Referencing the 2, I hope?
Doh!
Yes, the 2.
Really?
@m here has _single_ array-ref so
@m[0] returns that
Markus Laire wrote:
Rod Adams wrote:
TSa (Thomas Sandlaß) wrote:
You mean @a = [[1,2,3]]? Which is quite what you need for multi
dimensional arrays anyway @m = [[1,2],[3,4]] and here you use
of course @m[0][1] to pull out the 2. I'm not sure if this
automatically
makes the array
Rod Adams skribis 2005-05-26 4:15 (-0500):
From S02: Array and hash variable names in scalar context
automatically produce references.
Since [...] produces a scalar arrayref, we end up with an arrayref one
both sides of the =.
No.
There is no scalar context on the LHS of the assignment
Is giving = a higher precedence than , still considered A Good Thing?
I'm not familiar with the reasoning behind the current situation, but
I'm struggling to come up with any good reasons for keeping it.
Consider the alternative:
my $a, $b = 1, 2; # $b should contain 2, not 1
I read
On the migration front, when someone ports Digest.pm to Perl6, I get a
free upgrade, assuming the module author was kind enough to up the
version number.
You are making a pretty huge assumption here that whoever has a
namespace in p5 CPAN has first dibs at the P6 namespace of the same
name,
On Wed, 2005-05-25 at 09:11, Piers Cawley wrote:
Aaron Sherman [EMAIL PROTECTED] writes:
There are many gotchas that fall out of that. For example, you might
have a special role that overrides .print to handle structured data, so
your code says:
my Foo $obj;
given $obj {
On Tue, May 24, 2005 at 08:25:03PM -0400, Jeff 'japhy' Pinyan wrote:
I have looked through the latest
revisions of Apo05 and Syn05 (from Dec 2004) and come up with the
following list:
http://japhy.perlmonk.org/perl6/rules.txt
I'll review the list below, but it's also worthwhile to read
Rather than answer each message in this thread individually, I'll
try to aggregate them here. Disclaimer: These are just my
interpretations of how rules are defined; I'm not the one who
decides how they *should* be defined.
On Wed, May 25, 2005 at 10:55:59AM -0400, Jeff 'japhy' Pinyan wrote:
Hi All!
If you want access, please let me know. I will send you a temporary
password by e-mail, that I expect you to change the first time you get
the chance.
May i have an account name nemux ? Thanks!
Marco.
On Wed, 25 May 2005, Rob Kinyon wrote:
(This post references the discussion at
http://www.perlmonks.org/?node_id=458728, particularly dragonchild's
response at the bottom.)
For those who don't know, cribbage is a game where each player has
access to 4 cards, plus a community card. Various
Stevan Little [EMAIL PROTECTED] writes:
On May 25, 2005, at 5:39 AM, Piers Cawley wrote:
One of the 'mental apps' that's been pushing some of the things I've been
asking for in Perl 6's introspection system is a combined
refactoring/debugging/editing environment for the language.
Maybe I
On Wed, May 25, 2005 at 08:28:11AM -0700, Mark A. Biggar wrote:
Jeff 'japhy' Pinyan wrote:
Yeah, that was going to be my next step, except that the unknowing
person might make a sub-rule of their own called, say, Zs, and then
which would take precedence? Perhaps prop:X is a good way of
Assuming you write the subset coroutine above, how about
$score +=
( subsets(0..4) == map { 2 * (15 == [+] @[EMAIL PROTECTED]) } == [+] )
Working on it last night and this morning, I ended up with the
following, very similar rewrite.
sub gen_idx_powerset (Int $size is copy) returns
On Thu, May 26, 2005 at 11:03:15AM -0600, John Williams wrote:
I proposed the following:
# Fifteens
$score += 2 * all( 15 == [EMAIL PROTECTED] any( 0 .. 4 ) } );
* Is this syntax legal?
I think so.
* Does it do what I want it to do?
Definitely not.
First, apologies in
Adam Kennedy wrote:
On the migration front, when someone ports Digest.pm to Perl6, I get
a free upgrade, assuming the module author was kind enough to up
the version number.
You are making a pretty huge assumption here that whoever has a
namespace in p5 CPAN has first dibs at the P6
Juerd wrote:
Rod Adams skribis 2005-05-26 4:15 (-0500):
From S02: Array and hash variable names in scalar context
automatically produce references.
Since [...] produces a scalar arrayref, we end up with an arrayref one
both sides of the =.
No.
There is no scalar context on the LHS
I was thinking on the drive home how to write some of the File::Spec
functions in P6. I realized that it would be really neat if $*OS did
one of a bunch of mixins (maybe OS::unix, OS::win32, OS::vms, etc).
That way, you could multimethod the various functions, using junctions
and Any to provide a
On May 26, Patrick R. Michaud said:
On Tue, May 24, 2005 at 08:25:03PM -0400, Jeff 'japhy' Pinyan wrote:
I have looked through the latest
revisions of Apo05 and Syn05 (from Dec 2004) and come up with the
following list:
http://japhy.perlmonk.org/perl6/rules.txt
I'll review the list below,
On Thu, May 26, 2005 at 07:05:41PM -0400, Jeff 'japhy' Pinyan wrote:
Here the leading tokens are actually $, ::$, @, %, {, ,
and (, and I suspect we have ?$, ?::$, ?@, and !$, !::$,
!@, etc. counterparts.
Per your second message, [EMAIL PROTECTED] would mean !before @rules,
right?
I think
Patrick R. Michaud wrote:
The continuing exchanges regarding junctions, and the ongoing tendency
by newcomers to think of them and try to use them as sets, makes
me feel that it might be worthwhile to define and publish a standard
CSet class and operations sooner rather than later in Perl 6
21 matches
Mail list logo