Note how close to Finnish it is.
Portuguese: cebola
Finnish: sipoli
Might be a coincidence, but might also be a borrowed word.
// Carl
On 5/24/05, Alberto Manuel Brandão Simões [EMAIL PROTECTED] wrote:
Onian in Portuguese: cebola (in case any of you wonder)
wolverian wrote:
On Tue, May
Esperanto: cepo (though that's probably not a data point)
// Carl
On 5/24/05, Michele Dondi [EMAIL PROTECTED] wrote:
On Tue, 24 May 2005, wolverian wrote:
Portuguese: cebola
Finnish: sipoli
Italian: cipolla (since nobody has mentioned it yet)
Michele
--
It was part of the
On 7/14/05, Juerd [EMAIL PROTECTED] wrote:
It's just a Solomon judgement situation. That can work out well, but I
really hate when it's forced and used to test patience.
If Juerd is right about this being a solomonian situation, let me just
give up my baby to the other woman by saying:
* It's
hcchien raised the following question on #perl6[1]:
If I want to loop through a nine-element array three elements at a time, I do
my @a = 1..9;
for @a - $x, $y, $z { say $x }
But what if I don't care about the elements 1,4,7? Would the following
be a sane syntax?
my @a = 1..9;
for @a - undef,
I'm not sure we've reached consensus here, so I will try to summarize
what everyone said so far in order to clear my own head a bit. :)
Sorry in advance if i horribly misrepresent anyone's opinions.
Luke: Thinks the _ syntax is no joke, since every language with
pattern matching abilities has it.
On 6/11/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
[...]
@@ -147,8 +147,9 @@
precedence levels autoincrement, exponentiation, symbolic unary,
multiplicative, and additive; but these are limited to standard
operators that are known to return numbers, strings, or booleans.
-(Operators that
Yobert Hey do you know what would be cool in perl 6
Yobert A special variable for when you do a for (@array) style loop
Yobert it would always have the index of the array
Discussed on #perl6: it's already quite easy in Perl 6 to loop with an
explicit index:
my @array = moose elk caribou;
for
Ruud (), Carl ():
But maybe a variable that implicitly carries along the loop index
would be even snazzier?
for @array - $val {
say $.\t$val;
}
Or give the block a name (label), and have an index (or several indexes, like
some that are reset by redo an some that are not) available,
Mark (), Carl ():
Yobert Hey do you know what would be cool in perl 6
Yobert A special variable for when you do a for (@array) style loop
Yobert it would always have the index of the array
Discussed on #perl6: it's already quite easy in Perl 6 to loop with an
explicit index:
my @array =
Damian (), Ruud (), Damian (), Carl ():
But it can hardly be blamed for clarity.
That's a little unfair.
can hardly be blamed - can easily be praised g
Apologies to Carl if I misinterpreted. I read it as:
can hardly be blamed for (having) clarity
;-)
No, yours is the correct
Steve ():
If you declare a lexical twice in the same scope, it is the same lexical
I would argue for: If you declare a lexical twice in the same scope, it is an
error!
I agree.
Enforcing one and only one declaration feels like a Good Thing, for
Juerd's reasons. With me, multiple 'my' for
svn log, speaking on larry's behalf ():
+The string concatenating form is:
+
+a b X~X 1 2 # 'a1', 'a2', 'b1', 'b2'
+
+The CX~X operator desugars to something like:
+
+[~]«( a b X 1 2 ) # 'a1', 'a2', 'b1', 'b2'
...and later...
+The CX variant crosses the arrays but
Daniel (), Carl (), svn log, speaking on larry's behalf ():
+The string concatenating form is:
+
+a b X~X 1 2 # 'a1', 'a2', 'b1', 'b2'
+
+The CX~X operator desugars to something like:
+
+[~]�( a b X 1 2 ) # 'a1', 'a2', 'b1', 'b2'
^
If the
Aaron ():
OK then. Just so that I can type of the final result in S29, let's see
if everyone agrees to several points that have been made in this thread:
1. classify is the real grep
2. convenience function, keep is probably a macro
3. use List :compat will get you a grep just as it will likely
Audrey ():
Indeed... Though what I'm wondering is, is there a hidden implementation
cost or design cost of making /foo+/ always behave such that
$foo.from
returns something, compared to the current treatment with the workaround
you suggested?
Has this been settled or addressed off-list?
Audrey (), Carl ():
Has this been settled or addressed off-list?
'fraid not yet...
Ah. So Warnock applies.
(Side note: when I first read Warnock applies on things in p6
summaries a year or so ago, I thought it was some really energetic
programmer who went around and applied patches as soon
Larry ():
[...]
The non-chaining precedence level is a bunch non-associative operators
like .. and cmp. Historically, all operators of a particular precedence
level have had the same associativity, so that when you analyze
$a op1 $b op2 $c
you only have to compare op1 with op2 if they're
Jonathan (), Carl ():
The only alternative I can think
of right now would be to disallow even _declaring_ two operators of
different associativity on the same precedence level... but that kind
of strictitude doesn't sound very perlish.
That depends on how you phrase the restriction. If you
Steve Lukas ():
Hi @larry,
I want to remember to my proposal from september 2006.
It targets on changing S04. The discussion is summarized on:
http://www.oreillynet.com/onlamp/blog/2006/09/weekly_perl_6_mailing_list_sum_3.html
So, please change S04 as discussed.
I, too, would like to point to
Dave (), Carl ():
my $foo;
# ...later in the same scope...
my $foo; # illegal Perl5, legal Perl6
No, that's perfectly legal in perl5; it just generates a warning:
use warnings;
my $x = 1;
my $f1 = sub { $x };
my $x = 2;
my $f2 = sub { $x };
printf f1=%d f2=%d
herbert (), Richard ():
(eg. How out of date are the Exegesis files?)
very *g* just use the synopsis *g*
Hm, it might actually be a good idea to port the code examples from
the Exegeses to current Perl6, preferably also runnable in Pugs. The
ported programs could be put under examples/ in
John ():
I'm still in the dark... I find an positions for manhattan distance but no
definition of what that is. I did find the alternative pod page earlier.
I don't have a whole answer for you, but a part that may help. What is
generally meant by Manhattan distance is so-called L1 distance,
TSa ():
sub bar ($x)
{
$x = 3; # error, $x is readonly
foo($x); # error, could hit rw Str
}
By the way, I hope it's possible to make the assignment `$x = 3` to
the read-only variable $x a compile-time error.
In fact, I hope this to such a degree that I would like it to be part
of a
Pm ():
In Rakudo's case, we just haven't implemented read-only traits
on variables yet.
Goodie. I guessed as much.
But yes, I expect that it will be caught as
a compile-time error.
And do you agree it's reasonable to expect this of every compiler?
// Carl
Patrick (), Carl (), Patrick ():
But yes, I expect that it will be caught as
a compile-time error.
And do you agree it's reasonable to expect this of every compiler?
Reasonable to expect it, yes -- but whether or not this rises to the
level of being a requirement in the spec may be a
Me Here (), John (), Carl (), Patrick ():
But yes, I expect that it will be caught as
a compile-time error.
And do you agree it's reasonable to expect this of every compiler?
I think that is the point of declared types. But, something like
no strong_type_check :rw
in scope can
Me Here (), Carl (), Me Here ():
What is the point of marking things readonly if you can turn it off?
There are many possible reasons, I think.
* The code that declares the variable readonly might not be available
to you (compiled to bytecode, fetched by RCP etc),
* or it might be
an automatic parameter for a sub, like it would
be in just a block (in the implementation, and if I understand correctly in
the spec too).
Out of curiosity, would this work?
%ret = map - { $_ = uc $_; }, split , $text;
Or this?
%ret = map { $^foo = uc $^foo; }, split , $text;
--
Carl Mäsak
Yesterday I got bitten by the fact that currently in Rakudo, $/
doesn't copy content from the matched string, but instead trusts that
it stays in the matched string and doesn't change.
Is this the intended behaviour, or should $/ keep a copy the string
contents? As the following examples show, Im
Recently, in November, we've had reason to clone the Rakudo Test.pm
and add an implementation (viklund++) of is_deeply, for testing
whether two arrays, pairs or hashes are deeply -- recursively --
equivalent. The method does what you'd think it does, checks the types
of its parameters and recurses
Conrad ():
Is there something more up-to-date concerning Perl 6 best practices that
are presently-recommended (by p6l or @Larry) than the following item on the
Perl 6 wiki?
If you ask me, best practices evolve as a countering force to enough
people using less-than-ideal practices to create
Jonathan ():
Why not just assign to $!foo, which is always read/write (since the rw
affects whether you get an accessor that is read/write or not - $!foo refers
to the underlying storage location; at least, that's how I understand it and
what I think Rakudo is implementing today).
I have come
I really like all the replies I got to this; thank you Moritz,
Jonathan, TSa, Larry, John and Damian.
From the feedback I received, I will now do the following:
1. Remove is rw from all attributes that aren't supposed to be
writable from outside the class.
2. Start using $!foo consistently in
Jason ():
It makes sense to me to go with option 1; you get what you ask for. It also
makes sense to make to not use magical implied numbers, such as negatives,
to accomplish things that either ranges or whatever star can accomplish.
Aye, agreement. There's a whole lot of consensus already...
I expected this to DWIM today:
$ perl6 -e 'my $cl = { $^name upcased becomes {$^name.uc} }; say $cl(larry)'
...but it doesn't in Rakudo r32938:
too few arguments passed (0) - 1 params expected
...and for understandable (if not good) reasons: the closure inside
the string expects a parameter
TSa ():
I just want to make sure that I got the problem right. Would
my $cl = { $^name upcased becomes {$^OUTER::name.uc} };
say $cl(larry)
work? The idea is that the embedded closure refers to the strings
$^name. And now the dwimmyness shall make that implicit, right?
I guess that
Ryan (), Moritz (), Andy ():
(The thing that's still wrong with your code is that you need a
whitespace after the 'my', otherwise my(...) should be parsed as a
function call).
Also this, I think:
return($a, $b);
...except that that _is_ a function call.
// Carl
Darren ():
Bit
Blob
Set
Bag
Mapping
How does one write anonymous value literals of those types? And I mean
directly, not by writing a literal of some other type and using a conversion
function to derive the above?
Why is the latter method insufficient for your needs?
// Carl
Darren Duncan ():
Regarding Blob, that's not a collection type and its a fundamental type and
it still needs special syntax; I did suggest one in my previous message.
Frankly, I don't see why it should need special syntax. Blobs are,
most of the time, not typed in through the keyboard (too
Paul ():
I can't find anything in the existing synopses about Blobs.
Probably looking in the wrong place, sorry.
http://perlcabal.org/syn/S02.html#line_912
// Carl
Daniel, in rakudobug ticket [perl #61126] ():
The following two snippets of code are supposed to behave the same:
sub bar($code) { $code() };
sub foo { bar { return 1 }; return 2; }; say foo;
and
sub foo { map { return 1 }, 1; return 2 }; say foo;
both are supposed to return 1.
For
Daniel (), Carl ():
The above reasoning raises the following question for me: how do I
return from a sub or a method from within a map block?
I suppose what you want can be achieved with last, it probably should
work in map as well, since map and for are synonims...
That is all good and well
Daniel (), Carl ():
That is all good and well for exiting the map itself; but what I want
to achieve is to exit the surrounding sub or method block. Example:
Er... I mean actually the opposite... it should always return from the
surrounding sub or method, never only from map, if you want to
Pugs and Elf currently numify a Pair object to 2, and Rakudo currently
dies of despair.
My guess is that the semantics of Pugs and Elf falls out naturally
form a pair being treated as a list of two elements, or something. The
question still deserves to be raised whether always-2 is a good
Uri ():
[...]
well, it is sort (sic) of just like what damian posted almost 5 years
ago. i found this post covers something very similar to the rakudo
implementation. i can't seem to find this proposal in any of the
synopses (at least a quick google search found nothing) so maybe it
needs
Carl ():
I have a couple of patches waiting to be written and integrated into
S29. The addition of the new signature to sort is one of them. I
expect a sudden inflow of round tuits early next week.
Oh, and I now see that moritz++ went and simply added it. JFDI++.
S29 needs a lot of care and
Maybe this counts as a best practice, or maybe it's more of a
pattern. In a recent piece of code, I found a way to exploit code
blocks to act like return statements with side effects. The
resulting code became very clean, so I decided to blog about the way
it works.
Carl ():
S29 needs a lot of care and feeding of this type. I've made a long
list of things that need attention -- might return to this thread
early next week and paste that list, so that more hands can help.
Here is that list:
http://use.perl.org/~masak/journal/38170
People can help by
diff bot ():
===
--- docs/Perl6/Spec/S01-overview.pod2008-12-29 17:16:02 UTC (rev 24680)
+++ docs/Perl6/Spec/S01-overview.pod2008-12-29 21:41:59 UTC (rev 24681)
@@ -80,8 +80,8 @@
=item *
RFCs are rated on PSA: whether
Apologies if the point I'm about to make repeats what either Jeff or
Daniel already said. I have two modules, A and B:
$ cat A.pm
use v6;
use B;
$ cat B.pm
use v6;
die Remember, remember, the fifth of November;
Now, I can precompile the B module to PIR without a problem, but when
I compile the
I'm about to add Cwarn to S29. Found this in S16:
] =item warn LIST
]
] =item Str.warn
]
] Prints a warning just like Perl 5, except that it is always sent to
] the object in $*DEFERR, which is just standard error ($*ERR).
First off, shouldn't that be CObject.warn or something similar? I
suppose
Ovid ():
$ perl6 -e 'my $foo = foo;say { ~ $foo ~ }'
~ foo ~
Easy solution: only use double quotes when you want to interpolate. :)
This is not really an option when running 'perl6 -e' under bash, though.
// Carl
Writing something like this in Rakudo yesterday, I was slightly
surprised to find it not working:
class SomeClass {
my $.warn_limit = 1000;
my $.stern_warn_limit = $.warn_limit * 1.05;
my $.expel_limit = $.warn_limit * 1.10;
# ...
}
The specific error from Rakudo is Lexical
Ovid ():
=item trim
our Str multi Str::trim ( Str $string )
Removes leading and trailing whitespace from a string.
=cut
I could optionally make the following work:
$string.trim(:leading0);
$string.trim(:trailing0);
Setting leading or trailing to false (they default to true)
Jonathan (), Ovid (), Larry ():
Can't say I really like the negated options though. They smell funny.
Agreed, but ltrim and rtrim will disappoint Israelis and dyslexics alike.
Suggestions welcome as I can't think of anything better.
The .Net framework calls 'em TrimStart and TrimEnd (and
Moritz ():
So Larry and Patrick developed the idea of creating an
adverb on the test operator instead:
$x == 1e5 :ok('the :ok makes this is a test');
I'm trying to explain to myself why I don't like this idea at all. I'm
only partially successful. Other people seem to have no problem
fREW (), Moritz (), fREW ():
And should I
just mail patches to rakudo...@perl.org?
In general if you find a bug: yes.
In this case not, because it's a known limitation.
Where do I mail the patches for the tests?
The Pugs repository (containing the Perl 6 test suite) has a policy of
Mark (), Moritz (), Larry via commit bot ():
+PERL# Lexical symbols in the standard perlude
Did you mean prelude instead?
I took the quotation marks to indicate an intentional
misspelling/coinage: perl + prelude = perlude.
At which point one might ask oneself whether it is more
Jon (), Jonasthan ():
If we declared, for example:
role A::B {};
Then what should a reference to A be here? At the moment, Rakudo treats it
as a post-declared listop, however I suspect we should be doing something a
bit smarter? If so, what should the answer to ~A.WHAT be?
I'd go with one
Timothy (), Moritz ():
Speaking of Tree, let me quote from IRC:
09:23 masak it's a bit unfortunate that the identifier 'Tree' is now
squatted by an internal class in Perl 6, which is not
general
enough to reprenest an arbitrary tree data structure.
I fully agree
David (), Jonathan on Rakudo.org ():
Applied a patch from bacek++ to get min= and max= working ($foo min=
100 will assign 100 to $foo if it's smaller than what is in $foo).
Nice -- except I first read that backwards, i.e. even though it follows
straight from the definition of [op]=, it made
I read this line in S02, and was distraught:
$!foo object attribute private storage (mapped to $foo though)
I read this as meaning when you declare $!foo, you will then also be
able to refer to it as $foo.
Jonathan Worthington pointed out on #perl6 that S12 says the exact opposite:
Jonathan ():
O AKSHUALY...that's quite easy to do, since we just calls .WHAT on the value
to get its proto-object and stick it in the sig. So perhaps best is just to
re-define:
multi sub fib (LITERAL) { ... }
As meaning
multi sub fib (LITERAL.WHAT $ where LITERAL) { ... }
I like this.
Richard ():
There seem to be a lot of animals attached to software things, such as a
camel, but also a penguin and a parrot.
So how about choosing another animal for perl6?
For some reason, when I think of Rakudo Perl 6, I imagine something
quite close to Futurama's Nibbler.
It started by yours truly asking impertinent questions on #perl6...
http://irclog.perlgeek.de/perl6/2009-03-26#i_1018345
...and ended with a general feeling that the way metacharacters and
backwhacking work in [ ] character classes, is at worst inconsistent
and at best underspecified by S05.
Richard ():
Consider
$x = any (1,2,5,6)
How do we compose a conditional that asks if any of this set of eigenstates
are simultaneously both 2 and 5?
Clearly the desired answer for $x is False, but
my $x = any(1,2,5,6); say ?( 2 $x 5); # true
Is there some combination of any/all that
Peter ():
Am I right that multi-dimensional arrays do not yet work fully in Rakudo?
Yes, you are.
That is to say, you can't do this yet:
my @a[4;2]; # Valid indices are 0..3 ; 0..1
There's nothing stopping you from creating an array of arrays, though.
// Carl
-- Forwarded message --
From: Carl Mäsak cma...@gmail.com
Date: Sun, Apr 5, 2009 at 9:30 AM
Subject: Re: Multi-Dimensional arrays
To: Peter Schwenn pe...@schwenn.com
Peter ():
I've had inconsistent/incorrect results, once having created an array
of array of arrays, both while
Timothy (), John ():
If you would be so kind, please take a look at
http://www.dlugosz.com/Perl6/web/med-loop.html. I spent a couple days on
this, and besides needing it checked for correctness, found a few issues as
well as more food for thought.
John, I very much enjoyed your
Leon (), John ():
Can someone post a link?
http://svn.pugscode.org/pugs/docs/u4x/README
It might also be informative to refer to the blog post that
precipitated the project:
Pretending that Envy is one of the Perl virtues
http://use.perl.org/~masak/journal/38279
The second section of the
John ():
What is Userdocs for Christmas? Someone have a link?
So, Userdocs for Christmas, also known as U4X, is an effort to
create both comprehensive, consistent user documentation, and the
means to access this documentation efficiently and easily.
You asked about U4X the other day, which
Daniel ():
[...]
In this way, a relatively simple change makes Perl 6 Pod able to do literate
programing for anyone who is interested.
What do you think?
That it sounds like a good idea for a sublanguage-extending module.
// Carl
Cosimo ():
the Amazing Perl 6 thread was amazing.
It reminded me how Perl 6 looks interesting and fun.
So...
how can I write properly, for some meaning of properly,
the Perl 6 equivalent of this:
http://search.cpan.org/dist/Games-BonDigi/
?
Not sure if I grokked the whole set of rules,
Mark ():
but I think an idiomatic Perl 6 solution would have a proper lazy
Iterator. How do we write one of those?
Like this, I think:
$ perl6 -e '.say for gather { my $n = 1; loop { take bon digi bon
digi; take bon for ^$n; take digi for ^$n; ++$n } }'
That currently parses in Rakudo, but
Darren ():
Firstly, regarding the string replication ops as documented in Synopsis 3,
'x' and 'xx', I'm wondering whether it might be better to have something
that incorporates a '~', since that operation is about catenation.
Would perhaps '~*' work better than 'x' to signify better what the
In my post Three things in Perl 6 that aren't so great [0], I
outline three things about Perl 6 that bug me at present. Commenter
daxim made what seems to me a sensible proposal [1] for solving the
third problem, Comments in the beginning of lines:
daxim (]):
] Let single # be used for commenting
raiph (), Larry ():
Rakudo Zengi would be the most (in)appropriate, I think.
Why do I get the sense that some in the community are suffering siege
mentality? ;)
I had thought of things like Zen, Zero, Catalyst, etc.
But I love * | Star | Whatever. I love:
o The word Star, regardless of
Leon ():
Reading this discussion, I'm getting the feeling that filename
literals are increasingly getting magical, something that I don't
think is a good development. The only sane way to deal with filenames
is treating them as opaque binary strings, making any more assumptions
is bound to
Darren (), commit-bot ():
-=head2 Time
+=head1 Current Time
+The epoch used in Perl 6 to represent time instants is the
+International Atomic Time - TAI - which is independent of calendars,
+timezones as well as leap seconds. Of course Perl can't go beyond the
+machine to get a real TAI
Tim ():
I'd be grateful for feedback on any of the slides, but I'm especially
interested in updates for:
page 73 - Perl 6 implementations
I've added Mildew, with links, to the SMOP line
anything I should add / change / remove?
What's the
Tim (), Carl (), Tim ():
I'd be grateful for feedback on any of the slides, but I'm especially
interested in updates for:
page 73 - Perl 6 implementations
I've added Mildew, with links, to the SMOP line
anything I should add / change / remove?
Tim (), Raphael ():
Some XML related stuff:
XML parser:
http://github.com/fperrad/xml/
Tree manipulation:
http://github.com/wayland/Tree/tree/master
Thanks. Any reason they're not known to proto?
The latter I wasn't really aware of. It's now added to the list, and
wayland has been given
Timothy ():
I'd actually be in favour of Masak's post being copied to the site
(with attribution) and expanded, rather than just linked, if Carl is happy
with the idea. [...]
I'd be honoured. In general, consider anything I write on use.perl to
be cc-attr-licenced.
Juan ():
I'll take a look at web.pm and see I can get involved.
You're very welcome to help. We definitely need more contributors, and
I'm currently thinking about ways to delegate work.
Grab me on #perl6, or by email. There's also sporadic discussion of
Web.pm going on at #november-wiki.
David (), Moritz (), Aaron ():
2,3 constructs a list. 2..3 also constructs a list, unless it's in a
given/when condition in which case it's just a range.
No. 2..3 is always a range. It's just list context that turns it into a
list.
That seems confusing.
It sounds like the split
commitbot, channeling Carlin ():
=item die
+ multi die (@LIST)
+
+Prints each element to $*ERR (STDERR) and throws an exception.
Well, no. If that were true, die calls within (the dynamic scope of)
a try block would also print things, which they don't. It's the thing
that catches the
Solomon (), Moritz ():
the current spec doesn't allow immutable containers to call .map with a
block that implicitly uses $_ as an implicit parameter.
Here's why:
S06 says
The C$_ variable functions as a placeholder in a block without any
other placeholders or signature. Any bare block
Moritz (), Solomon (), Moritz ():
the current spec doesn't allow immutable containers to call .map with a
block that implicitly uses $_ as an implicit parameter.
Here's why:
S06 says
The C$_ variable functions as a placeholder in a block without any
other placeholders or
Matthew (), Richard ():
On Thu, Nov 12, 2009 at 2:30 PM, Richard Hainsworth
rich...@rusrating.ru wrote:
Can't exec svn: No such file or directory at build/gen_parrot.pl line 47.
You need to install Subversion in order to allow the build script to
obtain Parrot.
That said, perhaps one could
Announce: Rakudo Perl 6 development release #23 (Lisbon)
On behalf of the Rakudo development team, I'm pleased to announce the
November 2009 development release of Rakudo Perl #23 Lisbon.
Rakudo is an implementation of Perl 6 on the Parrot Virtual Machine
(see http://www.parrot.org). The tarball
Larry , through S-ro commitbot:
+Since a CKeyHash, unlike a CBag, is mutable, C.pick works
+directly on the CKeyHash, modifying it in place. You must copy
+the CKeyHash first if you don't want it modified in place.
This violates Least Surprise for me. An Array is also mutable, but it
doesn't
Darren ():
I was studying the synopsis today for how Perl 6 uses infinities, and among
the 48 occurrences of [|-|+]Inf in the synopsis, I noticed that in some
places you seemed to use +Inf to mean positive infinity and other places
you just say Inf.
So are there just 2 canonical infinity
Jason (), Juan ():
Does Perl6/Rakudo have an interactive perl shell like ruby does with irb?
http://en.wikipedia.org/wiki/Interactive_Ruby_Shell
Would be great for trying out the new syntax quickly.
My phone accidentally sent an empty reply to this. What I was supposed to
reply with was
Ovid ():
As a follow-up to this, I have my code posted at
http://blogs.perl.org/users/ovid/2009/12/configini-in-perl-6.html
While my admittedly clumsy grammar matches, transforming it into an AST has
failed miserably.
Aside from the advent calendar or the online docs at
Carl (), Ovid ():
As a follow-up to this, I have my code posted at
http://blogs.perl.org/users/ovid/2009/12/configini-in-perl-6.html
While my admittedly clumsy grammar matches, transforming it into an AST has
failed miserably.
Aside from the advent calendar or the online docs at
pugscommitbot, channeling Larry ():
[...]
+ $x = Today but Tue; # $x.Day is read-only
+ $x = Today but Day; # $x.Day is read-write
+
+Mixing in a specific enum object implies only the readonly accessor.
+
$x = Today but Tue;
-really means something more like:
Moritz (), commitbot channeling ash ():
+=item new
+
+ our List multi method new(*...@args)
+
+Constructs a CList containing the arguments passed to the Cnew method.
Since the argument list is already a List (or very nearly), I don't see
much sense in this constructor.
I respectfully beg
I was going to submit this as a Rakudo bug report, but I'm not sure
it's (a natural consequence of) spec, so I'll ask here on p6l instead.
I already know I can do all of the following:
$a[42];
$a.postcircumfix:[ ](42);
$a = $a.postcircumfix:[ ](42);
$a.=postcircumfix:[ ](42);
But can I do
How is character counting done in Perl 6?
In Perl 5, it is `scalar tr/CG//` if I want to count the number of Cs
plus the number of Gs in a string.
S05 describes tr/// in terms of the .trans function, a handsome but
very different beast. Specifically, it doesn't seem to have a scalar
context,
Mark (), Carl ():
S05 describes tr/// in terms of the .trans function, a handsome but
very different beast. Specifically, it doesn't seem to have a scalar
context, with which one could count things.
What does trans return in numeric (+) context?
As spec'd, it returns the numification of the
1 - 100 of 180 matches
Mail list logo