On Mon, Jan 4, 2010 at 5:15 AM, Ovid
publiustemp-perl6langua...@yahoo.com wrote:
Given this code:
subset Filename of Str where { $_ ~~ :f };
sub foo (Filename $name) {
say Houston, we have a filename: $name;
}
...
Obviously the error message can use some work, but how would
At 00:15 +0100 12/17/09, Moritz Lenz wrote:
Not quite, .abs returns one of the polar coordinates (the magnitude), so
only a method is missing that returns the angle.
Any ideas for a good name?
Would a method called phi with a unicode synonym φ be too obtuse?
-y
On Fri, Dec 11, 2009 at 12:31 PM, pugs-comm...@feather.perl6.nl wrote:
...
-It is a compiler error to use a bare Cprint without arguments.
+The compiler will warn you if use a bare Cprint without arguments.
(However, it's fine if you have an explicit argument list that evaluates to
the
I'm looking forward to Perl 6, and I'm looking into the spec right
now, since that to me is the important bit of a language (I know,
I'm bizarre).
Not at all bizarre, P6 language spec development is the most important
bit going on in the language right now. Well, that plus all the
interesting
...
Also, the domain should define how to compare objects and could provide
details about whether the set is finite, countable or uncountable.
...
Sounds like a role Domain that provides methods (off the top of my head)-
ordering - returns Nil if the domain is unordered, or a method
I'm confused between using ranges to generate a lazy list and using
them as criteria to match against.
These exclude continuous (non-countable) types-
...
2. There must be a successor function, so that given an object from
the given domain, say a, successor(a) returns one and only one
Sounds like a spectest is in order to prevent that case from
happening, didn't see one in http://perlcabal.org/syn/S03.html (not
that that's the definitive place to look for tests, but that's why I'm
posting instead of DIY)
However, I can well
imagine an implementation botching the cloning of
This is an interesting subpage under Cobra-
http://cobra-language.com/docs/quality/
it actually bears a little on recent discussions about
self-documenting code. I'm a Perl6 beginner so I'm making comments
with expectation that others will correct where I'm wrong
* Doc Strings
Perl6's vision of
This spec subtly alters the meaning of Whereas yada used to
mean this is not yet implemented, complain if executed it now adds
but don't complain if it is a class fully implemented elsewhere.
Allowing two implementations of a class iff one of them has a yada
opens up maintenance issues.
I just saw the intent for this in the split up compilation of the
setting thread- that it is useful to:
Enable a class stub syntax that allows us to declare a given symbol
as being a valid class without having to declare the body of the
class at that time. For example:
class Rat { ... };
I'm running one of the buildslave smoke testing machines for parrot,
and noticed that mine the other buildslaves are failing. Seems to be
due to the clients' vigilant checking of SSL certificates-
http://buildbot.eigenstate.net:8040/OpenBSD-trunk-builder/builds/14/step-svn/0
says:
svn: PROPFIND
I ran a spectest on rakudo as it is in git today on this machine-
pinky ~/rakudo $ *uname -a; cat build/PARROT_REVISION*
OpenBSD pinky.yary.ack.org 3.9 GENERIC#617 i386
40294
And got some failures. (The basic test suite had no failures.) If you want
me to run anything else for more specific info
On Sat, Jul 25, 2009 at 2:04 PM, Patrick R. Michaudpmich...@pobox.com wrote:
On Thu, Jul 23, 2009 at 05:56:31PM +0200, TSa wrote:
Hmm, it seems to be the case that the binding is defined to be a
readonly binding to the variable. I consider this a bad thing.
We should have my $x = 1;
A minor point, a capture-of-captures is different from an
array-of-arrays (at least it was a few months ago), and the array
assignment flattens a capture-of-captures into a flat array. If you
want to preserve the capture structure, use
my @@stuff = gather ...
... but rakudo doesn't seem to support
I'd be tickled pink to see parrot in a browser, and that would
certainly attract more developers writing grammars. And parrot's
grammar engine makes it a great choice.
There's an active project moving perl to Google's app engine. I
mention it because they have strict sandbox requirements, and it
On Sun, Jul 12, 2009 at 9:29 AM, Minimiscienceminimiscie...@gmail.com wrote:
On Jul 12, 2009, at 12:07 AM, Chas. Owens wrote:
Since grep is defined as returning a list of matching elements and first
is
defined as being the same as grep, I would say that it returns an empty
list
if nothing
I understand now. Given a large list, you'd like to assign chunks of
the list to an array, easily, while looping. In other words, you're
looking for a way to abbreviate this:
my $chunk_size=10_000;
my @big=''..'mnop';
for ^...@big :by $chunk_size {
my
+1 on using ln() instead of log()
Also, systems I know of that implement both log() and ln() default
ln() with base e, as perl6 does, log() uses base 10.
On Wed, Jul 8, 2009 at 8:45 PM, Xiao Yafeng xyf.x...@gmail.com wrote:
Any thoughts?
First let's fix the whitespace in your post so it's easier to read-
My question is: could I write below code in perl6:
# 2 loops like for @a - $b[0],$b[1] {;}
my @a = 1 2 3 4; my @b[2]; for @a -@b {;}
my @a
On Wed, Jul 8, 2009 at 3:28 PM, Carl Mäsakcma...@gmail.com wrote:
It's Parrot behavior. It's trivial to change to Too many params passed or
Too many results passed. Would that be clearer?
Maybe, but the problem as described in the original ticket was the
inconsistency of '1' and 'params'
On Thu, Jul 2, 2009 at 8:58 AM, TSathomas.sandl...@vts-systems.de wrote:
... unless list associative operators somehow flatten the
parens away and therefore see a single list of three values instead of
two consecutive lists of two items.
that's exactly what list associative does, it feeds an
On Thu, Jul 2, 2009 at 9:01 AM, yarynot@gmail.com wrote:
On Thu, Jul 2, 2009 at 8:58 AM, TSathomas.sandl...@vts-systems.de wrote:
... unless list associative operators somehow flatten the
parens away and therefore see a single list of three values instead of
two consecutive lists of two
S02 says-
Anywhere you can use a single type you can use a set of types, for
convenience specifiable as if it were an or junction:
my Int|Str $error = $val; # can assign if $val~~Int
or $val~~Str
so would
sub infix:...(Array|Scalar $values, Code $generator)
be kosher?
I'm with
On Wed, Jun 24, 2009 at 7:21 AM, Kyle Hasselbacherkyl...@gmail.com wrote:
This seems to be covered by a test in
t/spec/S02-whitespace_and_comments/comments.t:
Not exactly, the new case is two angle brackets which is a synonym for
french quotes, the existing test has single and tripled brackets
I had a bit of a problem when first encountering xor with more than
two operands as well. It made sense after I thought about it
linguistically instead of mathematically. When speaking people often
use a string of ors to mean pick one and only one of these choices,
the the exclusion of all others.
I think this proposal goes to far in the dwimmery direction-
On Sat, Jun 13, 2009 at 12:58 PM, John M. Dlugosz2nb81l...@sneakemail.com
wrote:
Daniel Ruoso daniel-at-ruoso.com |Perl 6| wrote:
So, how do I deal with a multidim array? Well, TIMTOWTDI...
my @a = 1,[2,[3,4]];
say @a[1][1][1];
Apologies for the long post with mistakes in it. I'm going to try
again, biting off less.
my @g[2;2];
@g[0;0]='r0c0';
@g[0;1]='r0c1';
@g[1;0]='r1c0';
@g[1;1]='r1c1';
@g[1] is r1c0 r1c1 due to S09:
Multi-dimensional arrays, on the other hand, know how to handle a
multidimensional slice, with one
I am tickled pink to see an Array rotate method in the settings spec
S032, as I was thinking of writing up a little discussion on the very
topic.
Has there been discussion on using array rotate on multi-dimensional
arrays? Being able to pass in a vector as the amount to rotate would
be useful.
Putting this in a new thread, as I'd like to discuss it separately
from refinements to Array.rotate
On Fri, Jun 12, 2009 at 10:11 AM, Jon Langdatawea...@gmail.com wrote:
With a multi-dimensional array, a number of transforms can be considered:
* you can rearrange the elements along a given
I think any 1D op could be transformed to do the right thing on a
multidimensional array, with some sort or hyperop or reduction
transform. Rotate, reverse, even add/subtract can be told do your
thing along this vector and return a usefully dimensioned result.
Need to work on other things at the
I'm about halfway through reading Synopsis 3 and have a couple
comments/questions.
Is there, should there be unicode synonyms for the feed operators? eg
== is also ⇐ lArr;LEFTWARDS DOUBLE ARROW
== is also ⇒ rArr;RIGHTWARDS DOUBLE ARROW
I don't see as obvious candidates for == and ==,
On Mon, Jun 1, 2009 at 10:43 PM, John M. Dlugosz And it should be an
error if dimensions other than the highest are
unspecified. How can it know how to shape it? Use an explicit command to
shape up the argument in that case.
I don't see why shape(2;*) is not a problem and shape(*;2) is a
I haven't gotten deep into the shape/array specs and I need to... nonetheless
On Tue, Jun 2, 2009 at 9:55 AM, Larry Wall la...@wall.org wrote:
I don't see why we shouldn't use the capture shape of the value
by default all the time, and do linear reshaping only if the value
comes in as a flat
How does one create an anonymous multidimensional array in p6? Not an
array of arrays or a capture of captures... I'm guessing it involves
Array.new(:shape) or something like words go in here:shape(2;2), and
that it's not yet implemented in Rakudo.
Is anonymous multidimensional array creation
On Thu, May 28, 2009 at 5:58 PM, John M. Dlugosz
2nb81l...@sneakemail.com wrote:
I came upon a copy of A Programming Language in a similar way. My Dad
passed it on from a co-worker. I don't recall how young I was, but it was a
very interesting read. Perhaps this attracts youngsters because
Back to the question of cool things about perl6- after showing some
of the extended syntax and its expressiveness, put up a slide saying
it's still Perl.
Show that much of the basics still work:
my @x=('a' .. 'z'); @x[3,4]=qw(DeeDee Ramone);
say @x.splice(2,4).join(',')
c,DeeDee,Ramone,f
the
If anyone wants to try tackling this, a longer APL one-liner is
referenced on the APL wikipedia page and discussed in length here:
http://catpad.net/michael/apl/
As an aside, APL was the first computer language I was exposed to.
When I was around 7 years old my aunt (who lived in Boston near
And a link explaining the shorter one-liner:
http://aplwiki.com/GameOfLife
Is it still a global in Perl 6?
It's not even global in perl5.10. perldoc says:
As of release 5 of Perl, assignment to $[ is
treated as a compiler directive, and cannot
influence the behavior of any other file. (That's
why you can only
On Tue, May 26, 2009 at 1:57 PM, Patrick R. Michaud pmich...@pobox.com wrote:
On Mon, May 25, 2009 at 12:37:34PM -0700, yary wrote:
How about...?
sub odd { ^$a % 2 }
typo. sub odd {$^a % 2} works (caret goes between $ and a)
say grep odd, 0..6;
nice. I need to learn the differences
I'm a relative beginner at perl6, but pretty good with perl5 (and C
and a few others), so I read
for 0...@foo.elems
as saying Give me a list with one item longer then @foo, not give
me the indexes of @foo. I can see users being tripped up by the old
problem of we start counting at 0 and not at 1,
That's an enjoyable and educational read, thanks!
There's one form under TMTOWTDI that I'd like to see, but can't figure
out myself. It's the version analogous to this perl5 snippet-
sub odd {$_ % 2}
say grep odd,0..6;
-where the line that filters the list mentions no variables at all,
and
I don't recall if defined autovivifies, but assuming it does that would make
sense.
Agreed that if defined autovivifies, it explains observed behavior in
current rakudo. But should defined autovivify? That goes against my
intuition.
On Mon, May 4, 2009 at 1:45 PM, Patrick R. Michaud via RT
perl6-bugs-follo...@perl.org wrote:
moritz_ rakudo: say (hash(a = '3' )).perl
should that be say (hash('a' = '3' )).perl - is the bareword a intentional?
say a = 3
(no output)
say 'a' = 3
a 3
say (hash('a' = '3' )).perl
{a =
Hello all,
looks like Parrot's been failing some automated smoke tests for the
last couple days. Here are links to the last passing reports:
http://buildbot.eigenstate.net:8040/fc6-x86_64-trunk/builds/1451
http://buildbot.eigenstate.net:8040/OpenBSD-trunk-builder/builds/150
and the first failing
Looks like the failed tests are due to a problem uploading the
reports, not with anything inside Parrot itself. I'll see if I can
figure out who can fix that.
I am still getting a Null PMC access in get_pmc_keyed_str() error
when building parrot as part of rakudo on my OpenBSD system, same
error Alex had when starting this thread. I've tracked it down to line
170 in runtime/parrot/library/parrotlib.pir
.sub find_file_path
.param string name
So, what's the way to tell smolder make failed?
After looking into it a bit more, there is a buildbot for parrot, so
I'm seeing about adding my system to that.
In the bigger picture, I was thinking that the right way to start a
smoke test would be-
0.remove all dependencies on the
I just pulled the fresh rakudo sources, Configured them with
--gen-parrot and the parrot build fails:
...
./miniparrot config_lib.pasm runtime/parrot/include/config.fpmc
...
Null PMC access in get_pmc_keyed_str()
gmake: *** [runtime/parrot/include/parrotlib.pbc ...
It looks like I'm having
On Mon, Mar 16, 2009 at 4:40 AM, Ujwal Reddy Malipeddi
ujwa...@gmail.com wrote:
yary,
I got similar error on windows
due to incomplete parrot checkout from svn
moritz_++ suggested to checkout without errors .. it's working on my system
now :)
Sorry that I wasn't clear in my first email
/parrot_config.c
g++ -o parrot \
src/main.o src/parrot_config.o \
-Wl,-R/home/yary/rakudo/parrot/blib/lib
-L/home/yary/rakudo/parrot/blib/lib -lparrot -lm -lutil -lpthread
-lreadline -lncurses -Wl,-E
-Wl,-R/usr/libdata/perl5/i386-openbsd/5.8.6/CORE
/home/yary/rakudo/parrot/blib/lib/libparrot.so: warning
I've browsed the discussions on re-implementing reduce in perl6, and
saw the comment how arity returns the # of required arguments. I
wanted to refer back to a discussion of arity in the synopsis, looking
to see if there was a way to get the # of optional args, but grepping
through the directory
Synopsis 6 has arity
arity vs count for manditory vs optional parameters
sorry for the noise
/languages/rakudo $ gmake
/home/yary/parrot/parrot
/home/yary/parrot/runtime/parrot/library/PGE/Perl6Grammar.pbc \
--output=src/gen_grammar.pir \
src/parser/grammar.pg src/parser/grammar-oper.pg
/home/yary/parrot/parrot /home/yary/parrot/compilers/nqp/nqp.pbc
--output=src/gen_actions.pir
OK, I'll try some/all of the suggestions. I have a few comments-
On Thu, Feb 26, 2009 at 12:06 PM, Patrick R. Michaud pmich...@pobox.com wrote:
...
A longer announcement should be hitting the list later today,
but for now the recommended build sequence for rakudo is:
$ git clone
I've got pugs installed now. I had to tell cabal where I installed my
aftermarket libraries:
pinky ~/pugs $ cabal install pugs --extra-lib-dirs=/usr/local/lib
--extra-include-dirs=/usr/local/include
.
pinky ~/pugs $ pugs
__
/\ __ \
\ \ \/\ \ __ __ __ __ (P)erl 6
\
Hi, I'm having some trouble building pugs.
GHC 6.10.1 installed OK, as did cabal-install and all its
dependencies, but cabal install pugs dies, at trying to build
haskeline-0.6.1.2.
apparently IConv.hsc is including h_iconv.h which has an error.
AFter the build I try find / -name IConv.hsc but
a = arcadi shehter [EMAIL PROTECTED]
aI think this was already discussed once and then it was proposed to
aattach a property to characters of the string
a
a sub peek_at_sky {
a
a my Color @numbers = peek_with_some_hardware;
a
a my $say_it = join map { 1 but color($_) } @numbers ;
a
making *productions* of strings/sounds/whatever that could possibly
match the regular expression?
Correct me if I am wrong, but isn't this the :any switch of apoc 5?
http://www.perl.com/pub/a/2002/06/26/synopsis5.html
Not really, unless the input string is infinite! :any returns all
substrings
AH know how to write the color rule -- because I don't know what this is
AH being applied to. Is this reading pixels, interpreting the results of
AH radio telescopy, or consuming Lucky Charms breakfast cereal bits? I
AH don't know, so I'm just going to assume that Yary can write that for me
AH
W= Andrew Wilson, AH=Austin Hastings
AH This is really probably bad code. Maybe a better rule would be:
AH
AH rule same_color($color is Colorific)
AH {
AH color ::: { fail unless $color.looks_like($1); }
AH }
AH
AH I KNOW that $color is an object-of-type-Colorific, while I'm not sure,
AH
This isn't quite meaningful. What does a non-letter atom mean?
If you're processing a file or a string, that's the basic P6 model.
But consider \u for unicode -- that's a multi-byte object in the
stream. So for streams of bytes, the right way is just to code Crule
color such that it recognizes
A couple nights ago I read RFC93 as discussed in Apoc. 5 and got
fired up- it reminded me of some ideas from when I was hacking
Henry Spencer's regexp package. How to futher generalize regular
expression input. It's a bit orthoginal- a properly implemented
RFC93 make some difficult things easier-
401 - 463 of 463 matches
Mail list logo