Re: Teaching Rakudo the tricks of Perl 5's regex optimiser

2019-08-13 Thread Patrick R. Michaud
FWIW, at one time there was discussion that "" and "" are actually keywords and not typical method calls that can be overridden, precisely so optimizations can be made. They're that important to efficient running of the regexes. I'm not sure that a formal decision was ever made on this,

Re: [perl #133541] Grammer bug vs

2018-09-28 Thread Patrick R. Michaud via RT
The issue doesn't seem to be the underscore, because I get the same result even when converting the underscore into a letter ('b'): $ cat gentb.p6 grammar G0 { token TOP {|.*} regex rport { } rule ruport { } #token type {+} token type {+} } grammar G1 {

Re: [perl #133541] Grammer bug vs

2018-09-28 Thread Patrick R. Michaud
The issue doesn't seem to be the underscore, because I get the same result even when converting the underscore into a letter ('b'): $ cat gentb.p6 grammar G0 { token TOP {|.*} regex rport { } rule ruport { } #token type {+} token type {+} } grammar G1 {

Re: [perl #132066] [BUG] Code blocks cause backtracking fail in `|` alternation with ratcheting

2017-09-12 Thread Patrick R. Michaud via RT
On Mon, Sep 11, 2017 at 09:48:01AM -0700, Dan Zwell wrote: > > `|` matches the longest input: > > 'ab' ~~ / ^:ratchet [ . | .. ] $ / > 「ab」 > > If the regex contains empty code blocks, backtracking fails: > > 'ab' ~~ / ^:ratchet [ {}. | {}.. ] $ / > Nil Isn't the whole point of :ratchet to turn

Re: [perl #132066] [BUG] Code blocks cause backtracking fail in `|` alternation with ratcheting

2017-09-12 Thread Patrick R. Michaud
On Mon, Sep 11, 2017 at 09:48:01AM -0700, Dan Zwell wrote: > > `|` matches the longest input: > > 'ab' ~~ / ^:ratchet [ . | .. ] $ / > 「ab」 > > If the regex contains empty code blocks, backtracking fails: > > 'ab' ~~ / ^:ratchet [ {}. | {}.. ] $ / > Nil Isn't the whole point of :ratchet to turn

Re: Verifiable Releases/The Build System is Ridiculous

2017-07-27 Thread Patrick R. Michaud
The details of how to use the star GitHub repository are in tools/star/release_guide.pod . You're entirely welcome to create a bundling that has a better build system than what Rakudo Star uses -- indeed, Rakudo Star has always been intended to be just one of many possible bundlings of Rakudo

Re: [perl #131708] [BUILD]. Rakudo Star build instructions incomplete

2017-07-05 Thread Patrick R. Michaud via RT
On Wed, Jul 05, 2017 at 06:10:42PM -0700, Will Coleda via RT wrote: > On Wed, 05 Jul 2017 09:16:44 -0700, tbrowder wrote: > > Given this invocation for a new installation of rakudo: > > > > perl Configure.pl --backend=moar --gen-moar --prefix=/some/dir > > > > /some/dir needs to exist and

Re: [perl #131708] [BUILD]. Rakudo Star build instructions incomplete

2017-07-05 Thread Patrick R. Michaud
On Wed, Jul 05, 2017 at 06:10:42PM -0700, Will Coleda via RT wrote: > On Wed, 05 Jul 2017 09:16:44 -0700, tbrowder wrote: > > Given this invocation for a new installation of rakudo: > > > > perl Configure.pl --backend=moar --gen-moar --prefix=/some/dir > > > > /some/dir needs to exist and

Re: [perl #129829] .pick on large ranges returns binary-sparse result

2016-10-07 Thread Patrick R. Michaud
On Fri, Oct 07, 2016 at 12:18:43PM -0700, Aaron Sherman wrote: > [15:12] m: say ((2**80) ..^ (2**81)).pick.base(2) > [15:12] <+camelia> rakudo-moar 605f27: > OUTPUT«100011101100100110010001010110101101010011001␤» > > The middle part is always a large number of

Re: Best way to get a PCRE6 on the JVM?

2016-09-29 Thread Patrick R. Michaud
On Thu, Sep 29, 2016 at 01:30:29PM +0200, Joachim Durchholz wrote: > Can you tell me where the sources for the regex engine live? At the > detailed-technical-spec level, I found S05, and I can find the NQP spec, but > I don't know my way around the interpreter sources yet. The regex engine lives

Re: Best way to get a PCRE6 on the JVM?

2016-09-28 Thread Patrick R. Michaud
A simpler approach might be to build an NQP that runs on the JVM, and find a way to call into it. (The Perl 6 regular expression engine is written in NQP.) Pm On Wed, Sep 28, 2016 at 09:21:50AM -0400, Will Coleda wrote: > To start with, there isn't a PCRE6. > > If you want, more generically,

Re: [perl #129346] [BUG] Whatever being called on where-blocked subroutine cannot handle the sigilless values correctly

2016-09-24 Thread Patrick R. Michaud via RT
On Sat, Sep 24, 2016 at 07:37:52AM +, Lloyd Fournier wrote: > I think this is because .WHAT is a special case. It's not really a method > which is what you need to make *.method work. *.WHAT will always return > (Whatever) immediately. You're correct that .WHAT is a special case. From S12,

Re: [perl #129346] [BUG] Whatever being called on where-blocked subroutine cannot handle the sigilless values correctly

2016-09-24 Thread Patrick R. Michaud
On Sat, Sep 24, 2016 at 07:37:52AM +, Lloyd Fournier wrote: > I think this is because .WHAT is a special case. It's not really a method > which is what you need to make *.method work. *.WHAT will always return > (Whatever) immediately. You're correct that .WHAT is a special case. From S12,

Re: [perl #129271] [REGEX] Captures from interpolated variables do not capture

2016-09-14 Thread Patrick R. Michaud
On Wed, Sep 14, 2016 at 05:10:55PM -0700, Zoffix Znet wrote: > m: my $input = '(\d\d\d)'; my $m = 'a 123' ~~ /<$input>/; dd > [$m.list]; > rakudo-moar 2c95f7: OUTPUT«[]␤» > > > Expected results: output is the same, as the $input contains a capture that > should capture stuff when

Re: [perl #129131] [RFC] Make .. a numeric operator, please (.say for ‘42’..‘51’)

2016-08-30 Thread Patrick R. Michaud
On Tue, Aug 30, 2016 at 07:00:43PM -0700, Zoffix Znet via RT wrote: > So far I think the original RFC to make .. a numeric operator is out. > There's still an issue with .. not using .succ on strings. Does anyone > know why that is the case? The templating example I presented is still > valid

Re: [perl #122346] [@LARRY] "nom regression" behavior of lexicals/invoking sub before they are defined changed

2016-08-23 Thread Patrick R. Michaud
On Tue, Aug 23, 2016 at 10:28:26AM -0700, Will Coleda via RT wrote: > > Where the expectation is that the first call to the foo will return an > > undefined value; in nom, it returns 0. > > This behavior has been in place for years now, since before Christmas. > > Tagging [@LARRY] to get a

Re: [perl #128984] Feature request (wontfix?): perl -c executes BEGIN and CHECK blocks

2016-08-18 Thread Patrick R. Michaud
On Thu, Aug 18, 2016 at 10:38:57AM -0400, Brandon Allbery wrote: > On Thu, Aug 18, 2016 at 9:13 AM, Claudio > wrote: > > > Tools like vim-syntastic and atom use 'perl6-c' (the only valid linter for > > now) to report syntax errors. Because "perl6 -c" executes code

Re: [perl #128842] [BUG] := inconsistent semantics

2016-08-04 Thread Patrick R. Michaud
On Thu, Aug 04, 2016 at 09:54:54PM +0100, Zefram wrote: > Patrick R. Michaud wrote: > >So are you looking for...? > > No. I want a writable reference that I can pass around as a value, > store in a data structure, and so on. The Scalar object obtained by > "$a.VAR&quo

Re: [perl #128842] [BUG] := inconsistent semantics

2016-08-04 Thread Patrick R. Michaud
On Thu, Aug 04, 2016 at 09:36:18PM +0100, Zefram wrote: > Yeah. Let me try to make it clearer. In the above situation, with > a reference to $a's Scalar container in $b, I'd like to achieve what > the assignment "$a = 5" would, but by an operation using $b and not > directly mentioning $a. The

Re: [perl #128818] [BUG] sprintf %f bogus rounding

2016-08-02 Thread Patrick R. Michaud
On Tue, Aug 02, 2016 at 07:46:20PM +0100, Zefram wrote: > > sprintf("%f", 2e0**70) > 118059162071741000.00 > > >In particular, the true value is *not* always available, > > By "true value" I meant the value represented in floating point. My apologies, I did not catch this meaning of

Re: [perl #128817] [BUG] Num.perl doesn't round-trip numeric value

2016-08-02 Thread Patrick R. Michaud
On Tue, Aug 02, 2016 at 07:32:56PM +0100, Zefram wrote: > Patrick R. Michaud via RT wrote: > >I don't know that we should expect .perl or any other operation on Num > >values to be preserving more precision than that. > > I'd expect .perl to preserve whatever precision

Re: [perl #128820] [BUG] == on Num literals produces bogus answer

2016-08-02 Thread Patrick R. Michaud
On Tue, Aug 02, 2016 at 10:55:34AM -0700, Zefram wrote: > These literals work fine in other contexts: > > > my $a = 1180591620717411303424e0 > 1.18059162071741e+21 > > my $b = 1180591620717409992704e0 > 1.18059162071741e+21 > > $a.Int > 1180591620717411303424 > > $b.Int > 1180591620717409992704 >

Re: [perl #128818] [BUG] sprintf %f bogus rounding

2016-08-02 Thread Patrick R. Michaud
On Tue, Aug 02, 2016 at 09:56:38AM -0700, Zefram wrote: > > (1180591620717411303424.0e0).Int > 1180591620717411303424 > > sprintf("%f", 1180591620717411303424.0e0) > 118059162071741000.00 > > sprintf %f is not showing the true value of this Num, which it should. > The .Int coercion is

Re: Questions on using other "modules" in nqp

2016-08-01 Thread Patrick R. Michaud
My short answer would be that there's not a shortcut way in NQP to avoid the fully-qualified sub names. I'm doubtful that we want to duplicate Perl 6's import mechanism into NQP. Pm On Fri, Jul 22, 2016 at 07:48:55AM -0500, Tom Browder wrote: > ping > > On Thu, Jul 7, 2016 at 7:49 AM, Tom

Re: [perl #128587] [POD] need pod-to-man translator

2016-07-12 Thread Patrick R. Michaud
On Tue, Jul 12, 2016 at 08:48:59AM -0500, Tom Browder wrote: > > If --help mentions a man page, it's probably sufficient to ship Rakudo > > with an already-translated man page, rather than shipping the translator. > >Very true--the voice of reason! > >But shouldn't all the pod6-to-X

Re: [perl #128587] [POD] need pod-to-man translator

2016-07-12 Thread Patrick R. Michaud
I think any pod2man translator program should be separate from Rakudo itself. If --help mentions a man page, it's probably sufficient to ship Rakudo with an already-translated man page, rather than shipping the translator. Pm On Tue, Jul 12, 2016 at 04:34:00AM -0500, Tom Browder wrote: >On

Re: [perl #128584] [BUG] reduce subroutine returns NaN when calculating decimals with negative exponents

2016-07-09 Thread Patrick R. Michaud via RT
On Sat, Jul 09, 2016 at 05:19:49AM -0700, Itsuki Toyota wrote: > See the following results > > $ perl6 -e 'say -1 ** -0.1' > -1 > $ perl6 -e 'say reduce * ** *, -1, (-0.1)' > NaN This is not a bug in "reduce" itself. Exponentiation has higher precedence than unary minus, so the first

Re: [perl #128584] [BUG] reduce subroutine returns NaN when calculating decimals with negative exponents

2016-07-09 Thread Patrick R. Michaud
On Sat, Jul 09, 2016 at 05:19:49AM -0700, Itsuki Toyota wrote: > See the following results > > $ perl6 -e 'say -1 ** -0.1' > -1 > $ perl6 -e 'say reduce * ** *, -1, (-0.1)' > NaN This is not a bug in "reduce" itself. Exponentiation has higher precedence than unary minus, so the first

Re: [perl #125427] [BUG][Feature][GLR] Can't define custom flat prefix op with pipe

2015-06-16 Thread Patrick R. Michaud
On Wed, Jun 17, 2015 at 12:24:04AM -0500, Patrick R. Michaud wrote: In Rakudo unary | is a syntactic construct that can't be overloaded. So, notabug. :) More directly to the comment about unary | possibly working outside of argument lists, I'm not sure we want to enable the case where unary

Re: [perl #125427] [BUG][Feature][GLR] Can't define custom flat prefix op with pipe

2015-06-16 Thread Patrick R. Michaud
On Tue, Jun 16, 2015 at 09:28:28PM -0700, Brent Laabs wrote: 07:02 labster m: multi sub prefix:| (\a) { a.flat }; say (|[1,2,3]).perl 07:02 camelia rakudo-moar d6430c: OUTPUT«5===SORRY!5=== Error while compiling /tmp/jvrQI4RBsS␤Arg-flattening | is only valid in an argument

Re: New Logo Design for perl6 modules

2015-06-11 Thread Patrick R. Michaud
Let's not forget the raptors. (Both Veloci and Utah are candidates. :) Pm On Thu, Jun 11, 2015 at 07:45:06PM -0700, Darren Duncan wrote: Or a pumpkin for that matter, since Perl 5 is Pumpkin Perl. -- Darren Duncan On 2015-06-11 7:42 PM, Darren Duncan wrote: I was going to say that too,

Re: [perl #125391] Wrong order with %% $delim=.*

2015-06-11 Thread Patrick R. Michaud
On Thu, Jun 11, 2015 at 02:53:15PM -0700, Alex Jakimenko wrote: say grammar Gram { regex TOP { ('XX')+ %% $delim=[a..z]* }; }.parse('XX'); Output: 「XX」 0 = 「XX」 0 = 「XX」 delim = 「」 0 = 「XX」 delim = 「」 delim = 「」 The order is wrong. I'm not entirely certain this is a

Re: [perl #125334] min(+'a', +'a').say prints Inf but should produce an error

2015-06-08 Thread Patrick R. Michaud
On Mon, Jun 08, 2015 at 06:08:33AM -0700, Will Coleda via RT wrote: I agree that this should be throwing the same conversion error. I disagree to the extent that making min() throw the conversion error seems to go against the purpose of designing soft/lazy Failure types into Perl 6 in the first

Re: [perl #123800] [BUG] copy doesn't copy the umask in Rakudo

2015-02-11 Thread Patrick R. Michaud
On Wed, Feb 11, 2015 at 04:21:32PM -0500, Parrot Raiser wrote: Not replicating the original file permissions on a copy would be a huge security hole. Anybody could copy a root-read-only file, examine the contents, modify them, and, if they had write access to the directory, replace it with the

Re: [perl #122892] [BUG] Scoping issue with regex using attribute in method in Rakudo

2014-10-03 Thread Patrick R. Michaud
On Fri, Oct 03, 2014 at 06:48:50AM -0700, Carl Mäsak wrote: masak m: class C { has $.sep = |; method foo { .say for foo|bar.split(/$!sep/).map(~*) } }; C.new.foo camelia rakudo-moar da3aae: OUTPUT«foo|bar␤» masak TuxCM: interesting. * masak submits rakudobug 14:09 pmichaud m: class C { has

[perl #122882] [BUG] Symmetric set difference (^) doesn't right-associate or chain in Rakudo

2014-10-02 Thread Patrick R. Michaud via RT
Added tests in roast/S03-operators/set.t, marking ticket resolved. Pm

Re: [perl #122882] [BUG] Symmetric set difference (^) doesn't right-associate or chain in Rakudo

2014-10-01 Thread Patrick R. Michaud
On Wed, Oct 01, 2014 at 09:00:08PM -0700, Carl Mäsak wrote: masak m: say jet plane (^) network lag (^) plane network It's an interesting question in itself where the error message Too many positionals passed; expected 2 arguments but got 3 comes from. Does the (^) operator somehow declare

Re: [perl #120638] Empty array reference in a loop leaks memory on rakudo-parrot

2013-11-27 Thread Patrick R. Michaud
I have a strong suspicion that this bug is related to https://github.com/parrot/parrot/issues/795 . As demonstrated in that issue, Parrot tends to gobble up all available memory even in a simple case of allocating and releasing an array, and once the process is at the edge of its memory

Re: [perl #120480] recursion_limit bad assumption

2013-11-14 Thread Patrick R. Michaud
On Thu, Nov 14, 2013 at 06:13:39AM -0800, Will Coleda via RT wrote: This is only used for parrot - it's a noop on the other 2 nqp backends. I recommend wrapping this line in a #? preprocessor block for parrot only, and changing the comment to reflect that we're just doing this for a single

[perl #119875] [BUG] term:^^ doesn't consider a last empty line as a line in regexes in Rakudo

2013-09-18 Thread Patrick R. Michaud via RT
S05:792 mentions this case explicitly: ^^ always matches the beginning of the string and after any \n that is not the final character in the string. So, rakudo is performing exactly as specced. I suspect the reason behind the spec is so that slurped \n-terminated files (i.e., the vast

Re: [perl #98954] [BUG] Nested indexing semantics changed from Beijing to nom in Rakudo

2013-09-12 Thread Patrick R. Michaud
On Thu, Sep 12, 2013 at 11:48:02AM -0700, Carl Mäsak via RT wrote: These days, it fails. masak rn: my @a = [1], [2], [3]; say (map { @a[1 - $_][0] }, 0 .. 3).perl camelia niecza v24-95-ga6d4c5f: OUTPUT«(2, 1, Any, Any).list␤» camelia ..rakudo 69c3cc: OUTPUT«(2, 1, Failure.new(exception =

[perl #118541] $ context specifier

2013-06-19 Thread Patrick R. Michaud via RT
The wikibooks example is wrong, Rakudo is correct here. (To return the number of elements, use prefix:+, not the $- contextualizer.) Actually, that whole section in wikibooks seems to be a little off... @() doesn't mean convert to array, for example. Closing ticket. Pm

Re: [perl #118519] ▁ ▂ ▃ ▄ ▅ ▆ ▇ █␤, alas no

2013-06-17 Thread Patrick R. Michaud
23:45:53] TimToady nr: say '▁' ... '█' [23:46:07] +camelia rakudo b2072f: OUTPUT«(timeout)» Now fixed in af50a6e: say '▁' ... '█' ▁ ▂ ▃ ▄ ▅ ▆ ▇ █ Closable with tests. Pm

[perl #118479] Untyped hashes are considered to be {Str}, but act differently from hashes typed with {Str}

2013-06-14 Thread Patrick R. Michaud via RT
So either STORE_AT_KEY for typed hashes should stringify objects silently if the keytype is Str, like untyped hashes do. Or untyped hashes should *not* automatically stringify objects. Untyped hashes are {Str(Any)} -- see S09:1187: The standard Hash: my %hash; is really

Re: Fwd: [Passed] letolabs/parrot-libgit2#21 (nciupdate - 4d61364)

2013-06-01 Thread Patrick R. Michaud
The parrot-nqp.c file is generated by the pbc_to_exe program, which contains the source lines referenced here. The source for pbc_to_exe is in tools/dev/ . HTH, Pm On Sat, Jun 01, 2013 at 12:46:46PM -0500, Jonathan Duke Leto wrote: Howdy, I think my GSoC student has possibly found a bug

Re: [perl #114760] [BUG] Minus thirteen billion years ago becomes minus 115 million years ago in DateTime.new in Rakudo

2013-05-30 Thread Patrick R. Michaud
On Thu, May 30, 2013 at 03:12:02AM -0700, Carl Mäsak via RT wrote: masak (), coke (): masak r: say Date.new(-13_000_000_000, 1, 1) p6eval rakudo cc1858: OUTPUT«-115098112-01-01␤» masak o.O masak I suppose -115098112 above is a bug? This seems consistent with trying to use a value

Re: [perl #114760] [BUG] Minus thirteen billion years ago becomes minus 115 million years ago in DateTime.new in Rakudo

2013-05-30 Thread Patrick R. Michaud
On Thu, May 30, 2013 at 11:54:30AM -0400, Will Coleda wrote: I was trying to imply that it was an overflow error. Okay. I suspect the overflow is not because of the Int, but because of the use of sprintf() in the date/time formatting routines, which doesn't handle large integers properly. See

Rakudo Star 2013.05 released

2013-05-30 Thread Patrick R. Michaud
## A useful, usable, early adopter distribution of Perl 6 On behalf of the Rakudo and Perl 6 development teams, I'm happy to announce the May 2013 release of Rakudo Star, a useful and usable distribution of Perl 6. The tarball and Windows .MSI for the May 2013 release are available from

Re: Rakudo Star 2013.05 released

2013-05-30 Thread Patrick R. Michaud
On Thu, May 30, 2013 at 11:08:13PM -0500, Patrick R. Michaud wrote: This Star release includes [release 2013.05] of the [Rakudo Perl 6 compiler], version 5.2.0 of the [Parrot Virtual Machine] ... Oops. The 2013.05 release actually contains Parrot 5.3.0. Sorry about the typo. Pm

Re: [perl #117985] [BUG] :p adverb on hash lookup doesn't weed out a nonexistent hash key if it's the only key in Rakudo

2013-05-13 Thread Patrick R. Michaud
On Mon, May 13, 2013 at 11:54:38AM -0700, Carl Mäsak wrote: lizmat r: my %a= (a = 1, b = 2); say %ac:p # shouldn't this be Nil ? camelia rakudo 2a04f2: OUTPUT«c = Any␤» masak lizmat: yeah, think so. * masak submits rakudobug I'm pretty sure rakudo is correct in this case. We know that %ac

Re: [perl #77624] [BUG] Base conversion of Str containing base conversion doesn't work in Rakudo

2013-05-11 Thread Patrick R. Michaud
On Fri, May 10, 2013 at 10:51:14PM -0700, Will Coleda via RT wrote: On Wed Sep 01 10:17:15 2010, masak wrote: TimToady rakudo: say :10(':16bad.decaf') p6eval rakudo dc9900: OUTPUT�DON'T PANIC! Invalid character (:)! Please try again :) pmichaud ...DON'T PANIC? masak that's lue's

[perl #117923] [BUG] can not augment List class

2013-05-11 Thread Patrick R. Michaud via RT
On Wed May 08 18:16:40 2013, grond...@yahoo.fr wrote: This is perl6 version 2013.04-55-gfe70494 built on parrot 5.2.0 revision RELEASE_5_2_0 use MONKEY_TYPING; augment class List { proto method combinations(|) {*} } Cannot look up attributes in a type object It works for me if I put

[perl #117923] [BUG] can not augment List class

2013-05-11 Thread Patrick R. Michaud via RT
Now fixed in b1695cf: pmichaud@kiwi:~/p6/rakudo$ cat x.p6 use MONKEY_TYPING; augment class List { proto method combinations(|) { * } } pmichaud@kiwi:~/p6/rakudo$ ./perl6 x.p6 pmichaud@kiwi:~/p6/rakudo$ Ticket closable with tests (hint: test that List.sink doesn't fail). Pm

Re: No more Rakudo *?

2013-05-07 Thread Patrick R. Michaud
On Tue, May 07, 2013 at 09:01:34AM +0300, Gabor Szabo wrote: Do I first need to manually clone Rakudo and the modules from Gihub and then use the --force or is there something else I need to do? Do I understand correctly that in a real Rakudo * release you'd check out the labeled release of

[perl #117875] Smartmatching ints against Enumeration Types fails (probably NYI)

2013-05-06 Thread Patrick R. Michaud via RT
Resolved via a change to S12, see https://github.com/perl6/specs/commit/bff62668057bf3f87a6f80f33d088d47a1d 4eda2 . Pm

[perl #117831] [BUG] Grammar capture of '%' separator

2013-05-03 Thread Patrick R. Michaud via RT
Now fixed in 4741028: pmichaud@kiwi:~/p6/rakudo$ cat g.pl grammar G { token TOP {letter +% sep} token letter{[a..z]} token sep{\,} } say G.parse(a,b,c,d).caps.map({$_.value}); pmichaud@kiwi:~/p6/rakudo$ ./perl6 g.pl a , b , c , d

Re: [perl #117841] [BUG] qx[] dies when multibyte UTF-8 characters split across 2048-byte chunk boundary in Rakudo

2013-05-02 Thread Patrick R. Michaud
On Thu, May 02, 2013 at 02:48:46PM -0700, Carl Mäsak wrote: FROGGS masak: shortest example evar!!: perl6 -e 'qx[perl6 -e say 1 x 2047,q|—| | cat]' masak FROGGS++ * masak submits rakudobug I'm not able to reproduce this bug on my system. Can we get more details, such as Rakudo version,

Re: [perl #117481] [BUG] duplicate keys in .gist in Match of regex which backtracked in Rakudo

2013-04-04 Thread Patrick R. Michaud
On Thu, Apr 04, 2013 at 02:09:36PM -0700, Carl Mäsak wrote: p6eval rakudo 99e27f: OUTPUT«「/foo/bar/baz/」␤ dirname = 「/foo/bar/baz/」␤ dirname = 「/foo/bar/」␤ basename = 「baz」␤␤» labster okay, why do I get two copies of dirname when the match only succeeds once? masak huuhhnn. masak wut. masak

Re: [perl #117307] [BUG] Sequances with strings go backwards in Rakudo

2013-03-23 Thread Patrick R. Michaud
On Fri, Mar 22, 2013 at 03:31:57PM -0700, Carl Mäsak wrote: masak rn: say .[*-1] given perl ... { 3 == ++state $ } p6eval rakudo 221a95: OUTPUT«perj␤» p6eval ..niecza v24-35-g5c06e28: OUTPUT«pern␤» * masak submits rakudobug I'm just assuming this isn't spec'd behavior. I like Niecza's

Re: [perl #117307] [BUG] Sequences with strings and a Code stopping condition go backwards in Rakudo

2013-03-23 Thread Patrick R. Michaud
On Sat, Mar 23, 2013 at 07:50:55AM -0700, Carl Mäsak via RT wrote: b) infix:... should assume .succ if the final value is a Code object, This alternative makes sense to me. It's similar to how infix:... assumes .succ in this case: 'perl ... *' Similar, yes, but also a little off. In

Re: [perl #117235] [BUG] Deep-cloned array loses its original content on .unshift in Rakudo

2013-03-21 Thread Patrick R. Michaud
On Thu, Mar 21, 2013 at 08:49:42AM +0100, Moritz Lenz wrote: -method sink() { -self.gimme(*, :sink); +method sink(\SELF:) { +SELF.gimme(*, :sink) unless nqp::iscont(SELF); Nil; } } But of course it's not a real fix. Should I apply it? I think I

Re: [perl #117237] error building rakudo star 2013.02

2013-03-21 Thread Patrick R. Michaud
On Wed, Mar 20, 2013 at 04:41:16PM -0700, James Buster wrote: I believe this error is occurring because something is looking for nqp_dyncall_ops.so in a place other than would be implied by the -prefix argument to Configure.pl. That is, it's probably looking in /usr/lib or /usr/local/lib and

Re: naming the test of arrays defined

2013-03-21 Thread Patrick R. Michaud
On Thu, Mar 21, 2013 at 04:52:16PM +, Nicholas Clark wrote: On Thu, Mar 21, 2013 at 04:50:40PM +, Nicholas Clark wrote: Bother. That should have been more to perl6-language than perl6-compiler. Should I resend it? Either is fine for this; since we're really into a bit of an

Re: naming the test of arrays defined

2013-03-21 Thread Patrick R. Michaud
I don't quite follow the unease from this example, but that's probably because of the way that Perl 6 thinks of undefined being different from Perl 5's undef and defined. In particular: ... sub array { my $what = shift; my $array = []; return $array if $what eq 'undef'; Perl 6

Re: [perl #117235] [BUG] Deep-cloned array loses its original content on .unshift in Rakudo

2013-03-21 Thread Patrick R. Michaud
On Thu, Mar 21, 2013 at 08:14:08PM +0100, Moritz Lenz wrote: On 03/21/2013 01:40 PM, Patrick R. Michaud wrote: On Thu, Mar 21, 2013 at 08:49:42AM +0100, Moritz Lenz wrote: -method sink() { -self.gimme(*, :sink); +method sink(\SELF:) { +SELF.gimme(*, :sink) unless

Re: [perl #117235] [BUG] Deep-cloned array loses its original content on .unshift in Rakudo

2013-03-20 Thread Patrick R. Michaud
On Wed, Mar 20, 2013 at 12:41:41PM -0700, Carl Mäsak wrote: # New Ticket Created by Carl Mäsak # Please include the string: [perl #117235] # in the subject line of all future correspondence about this issue. # URL: https://rt.perl.org:443/rt3/Ticket/Display.html?id=117235 masak just

Re: Rakudo * 2013.02

2013-03-13 Thread Patrick R. Michaud
I haven't made the 2013.02 .msi yet. I'll do that today, though. :-) Pm On Wed, Mar 13, 2013 at 12:13:47PM -0400, Will Coleda wrote: I assume you're referring to the .msi ? On Wed, Mar 13, 2013 at 12:08 PM, Gabor Szabo szab...@gmail.com wrote: 1) I think it has not told me the

Re: [perl #116897] while (...splice...) runs forever

2013-02-25 Thread Patrick R. Michaud
On Thu, Feb 21, 2013 at 09:07:44AM -0800, Ricardo SIGNES wrote: This program never terminates: use v6; my @a = ; while (my @c = splice @a, 0, 3) { say one more; } After each splice, @c ends up being @(Any, Any, Any). I'm not sure if this is correct; I can see that it

Re: deleting delete and exist need not exist

2013-02-11 Thread Patrick R. Michaud
On Mon, Feb 11, 2013 at 09:56:31AM +, Nicholas Clark wrote: Here are a better set of patches for Rakudo. They don't duplicate the check for $p 0, and they avoid calling nqp::elems(), by assuming that nqp::atpos() safely return nql::null() for indices beyond the end of the array. (Which

Re: [perl #116280] [BUG] NaN, Inf, -Inf aren't padded with spaces in sprintf in Rakudo

2013-01-08 Thread Patrick R. Michaud
On Tue, Jan 08, 2013 at 11:52:12AM -0800, Carl Mäsak via RT wrote: On Tue Jan 08 11:40:37 2013, FROGGS.de wrote: This would mean to bring over 500 lines of C code to nqp/rakudo. Is that an absolute claim? What about wrappers? Currently Rakudo uses Parrot's sprintf features. I wouldn't

Re: [perl #116280] [BUG] NaN, Inf, -Inf aren't padded with spaces in sprintf in Rakudo

2013-01-08 Thread Patrick R. Michaud
On Tue, Jan 08, 2013 at 05:02:21PM -0500, Will Coleda wrote: Is now a good time to ask if we still want to use the sprintf slang in perl 6? Yes, see also https://github.com/perl6/specs/issues/13 . Pm

Re: [perl #116196] min does not work properly on array of array

2012-12-27 Thread Patrick R. Michaud
On Mon, Dec 24, 2012 at 09:16:28PM -0800, Tin Y Pang wrote: in rakudo 2012.11, min is not functioning properly with Z ./perl6 -e 'my @a = ([0, -20, 0], [0, -19, -1], [-1, -18, 0], [0, -17, 1], [1, -16, 0], [0, -15, -1], [0, -14, 1], [1, -13, 0]); say [Zmin] @a' gives -1 -13 -1 expect -1

Rakudo Star 2012.08 released

2012-08-31 Thread Patrick R. Michaud
On behalf of the Rakudo and Perl 6 development teams, I'm happy to announce the August 2012 release of Rakudo Star, a useful and usable distribution of Perl 6. The tarball for the August 2012 release is available from http://github.com/rakudo/star/downloads. A Windows .MSI version of Rakudo Star

Re: How to get Rakudo for Windows

2012-08-14 Thread Patrick R. Michaud
On Tue, Aug 14, 2012 at 04:46:27PM +0300, Gabor Szabo wrote: hi, probably it would be nice if on http://rakudo.org/how-to-get-rakudo/ it was mentioned where can people get the msi windows installer from? Rakudo Star is currently available from github at

Re: Test.pm function not returning truth

2012-07-12 Thread Patrick R. Michaud
On Thu, Jul 12, 2012 at 08:31:38AM +0300, Gabor Szabo wrote: Hi, I looked at lib/Test.pm and noticed that most (if not all) of the functions have some time measuring code in them and they return a timestamp instead of the truth value. Would it be ok if I changed that so they will always

Re: [perl #113992] [BUG][STAR] Cygwin build of parrot for rakudo star fails because of missing phony.exe

2012-07-04 Thread Patrick R. Michaud
On Wed, Jul 04, 2012 at 06:22:32PM -0700, Ron Schmidt via RT wrote: http://ftp.parrot.org/releases/devel/4.5.0/parrot-4.5.0.tar.gz If you can explode this tarball and build Parrot under Cygwin then I agree it's a Star issue. Otherwise, I'd want to get an upstream fix from Parrot

Re: [perl #113886] Re: no ICU lib loaded - rakudo and parrot issue

2012-07-02 Thread Patrick R. Michaud
On Thu, Jun 28, 2012 at 08:24:31AM -0700, Patrick R. Michaud wrote: Am 28.06.2012 14:31, schrieb Gabor Szabo: The following script generates an exception use v6; my %count; my $s = 'שלום'; %count{$s} = 1; say $s; say %count.perl; no ICU lib loaded This is now fixed

Re: Can't build NQP on a Raspberry Pi (without bodging)

2012-07-01 Thread Patrick R. Michaud
On Sun, Jul 01, 2012 at 07:42:37PM +0100, Nicholas Clark wrote: We all agree that we'd really like to see Rakudo's memory usage drop, especially on the build steps for the larger files (like Perl6/Actions.pm and CORE.settings). I've now done some more testing and looking at build process

Re: Can't build NQP on a Raspberry Pi (without bodging)

2012-06-30 Thread Patrick R. Michaud
On Thu, Jun 28, 2012 at 09:49:32PM +0100, Nicholas Clark wrote: So, I attempted to build Rakudo on my Raspberry Pi, expecting it to go wrong. It didn't quite pan out the way I expected. [...] It would be wonderful if Rakudo's memory usage would drop. I think that that's going to be easier

Re: [perl #66152] Rakudo consumes excessive resources for a simple loop

2012-05-28 Thread Patrick R. Michaud
On Mon, May 28, 2012 at 08:39:15AM -0700, Will Coleda via RT wrote: So, the original p5 code was: #!/usr/bin/perl -w my $i = 0; my @numbers; until ( $i == 10 ) { $numbers[$i] = $i; $i++; } [...] OP gave the following one-shot benchmark numbers: Perl5: ~0.07s to complete,

[perl #113026] array iterator does not track a growing array

2012-05-21 Thread Patrick R. Michaud via RT
I suspect this bug may be related to #112716 (https://rt.perl.org/rt3/Ticket/Display.html?id=112716); the .map() operation (which 'for' uses) tends to be a bit too eager in evaluating its invocant list. I've taken both bugs and will work on a fix shortly. Pm

[perl #111286] [BUG] Name capture happens in the presence of a quantifier but not in its absence in Rakudo

2012-05-17 Thread Patrick R. Michaud via RT
Now fixed in 0ed00f0 probably needs spectests to close ticket. Thanks! Pm

Re: [perl #112716] [BUG] lines() isn't lazy in Rakudo

2012-05-03 Thread Patrick R. Michaud
On Tue, May 01, 2012 at 09:11:22AM -0700, Carl Mäsak wrote: tadzik r: for $*IN.lines - $line { say $line.lc } p6eval rakudo 4c241c: OUTPUT«land der berge, land am strome, [...] goraki tadzik: masak: when I run either I don't get any output until I hit ctrl-d to end the input. masak goraki:

[perl #112364] [TODO] Parse Foo:: correctly in Rakudo

2012-04-20 Thread Patrick R. Michaud via RT
Now fixed in 84f4fd4: class ABC { our sub xyz() { 'xyz' } }; say ABC::.WHAT Stash() This ticket can be closed with sufficient spectests. Pm

Re: [perl #112408] [BUG] Can't use END as a bareword hash key in Rakudo (but STD.pm6 allows it)

2012-04-12 Thread Patrick R. Michaud
On Thu, Apr 12, 2012 at 04:16:08AM -0700, Carl Mäsak wrote: That there's a parsing clash with block-less END phaser here goes without saying. But STD.pm6 resolves it somehow, and so should Rakudo. I suspect it's a longest-token-matching (LTM) sort of thing, where STD.pm6's parser is able to

[perl #112362] [BUG] Items which are arrays mistakenly give slices in hash or array lookup in Rakudo

2012-04-09 Thread Patrick R. Michaud via RT
Now fixed in 2c9f46f. Needs spectests to close ticket. Thanks, Pm

Re: [perl #112288] [BUG] Non-deducible sequence ending in a Whatever star fails to give an error in Rakudo

2012-04-09 Thread Patrick R. Michaud
On Fri, Apr 06, 2012 at 03:53:11AM -0700, Nicholas Clark via RT wrote: On Thu Apr 05 14:56:03 2012, pmichaud wrote: On Thu, Apr 05, 2012 at 01:46:53PM -0700, Carl Mäsak wrote: moritz r: say ~(1, 2, 6 ... *)[10] For the moment, I'm going to argue Rakudo's behavior here as correct, or

Fwd: Re: [Pkg-parrot-devel] Parrot 4.0.0

2012-04-08 Thread Patrick R. Michaud
as well. Pm - Forwarded message from Patrick R. Michaud pmich...@pobox.com - Date: Sun, 8 Apr 2012 02:54:57 -0500 From: Patrick R. Michaud pmich...@pobox.com To: Allison Randal alli...@parrot.org Cc: pkg-parrot-de...@lists.alioth.debian.org Subject: Re: [Pkg-parrot-devel] Parrot 4.0.0

Re: sound distribution practices

2012-04-08 Thread Patrick R. Michaud
On Sun, Apr 08, 2012 at 03:23:26PM +0200, Alessandro Ghedini wrote: On Sat, Apr 07, 2012 at 09:08:21PM -0400, Andrew Whitworth wrote: What if we did something like bundling? Isn't this what Rakudo Star does? AFAICT the Star distribution is nothing more than a bundle of rakudo + nqp +

Re: sound distribution practices

2012-04-08 Thread Patrick R. Michaud
On Sun, Apr 08, 2012 at 06:53:49PM +0200, Alessandro Ghedini wrote: On Sun, Apr 08, 2012 at 11:09:30AM -0500, Patrick R. Michaud wrote: Unfortunately, aiui Parrot's current implementation requires that all of its downstream users (including Rakudo and NQP) must be rebuilt every time

Re: sound distribution practices

2012-04-08 Thread Patrick R. Michaud
On Sun, Apr 08, 2012 at 07:32:55PM +0200, Alessandro Ghedini wrote: On Sun, Apr 08, 2012 at 12:15:44PM -0500, Patrick R. Michaud wrote: I'm not quite able to follow here -- could you explain further or give an example? I mean, I understand how changes to NQP can affect Rakudo, but I don't

Re: sound distribution practices

2012-04-08 Thread Patrick R. Michaud
On Sun, Apr 08, 2012 at 08:42:21PM +0200, Moritz Lenz wrote: On 04/08/2012 06:53 PM, Alessandro Ghedini wrote: On Sun, Apr 08, 2012 at 11:09:30AM -0500, Patrick R. Michaud wrote: On Sun, Apr 08, 2012 at 03:23:26PM +0200, Alessandro Ghedini wrote: On Sat, Apr 07, 2012 at 09:08:21PM -0400

Re: sound distribution practices

2012-04-07 Thread Patrick R. Michaud
On Sat, Apr 07, 2012 at 03:24:37PM -0700, Allison Randal wrote: These are things that Rakudo shouldn't care about. A bug-fix or performance enhancement in Parrot is good, but doesn't actually affect Rakudo's ability to build or run. Sometimes it does. See the flurry of difficulties we had

Re: sound distribution practices

2012-04-07 Thread Patrick R. Michaud
On Sat, Apr 07, 2012 at 07:12:19PM -0700, Allison Randal wrote: Patrick and I just chatted on the phone, here's a summary of the working scenario we reached: - Rakudo will deliver a Rakudo release for each supported (stable) Parrot release, a few days after the Parrot release. - Debian

Re: [perl #112288] [BUG] Non-deducible sequence ending in a Whatever star fails to give an error in Rakudo

2012-04-05 Thread Patrick R. Michaud
On Thu, Apr 05, 2012 at 01:46:53PM -0700, Carl Mäsak wrote: moritz r: say ~(1, 2, 6 ... *)[10] p6eval rakudo 4373f0: OUTPUT«␤» moritz eeks moritz no, that particular thing isn't in RT * masak submits rakudobug For the moment, I'm going to argue Rakudo's behavior here as correct, or at least

[perl #112216] slicing a string with inifinite ranges gives LTA error message

2012-04-03 Thread Patrick R. Michaud via RT
On Tue Apr 03 01:24:47 2012, moritz wrote: 10:23 timotimo r: say foo[1..*] 10:23 +p6eval rakudo 8ead1e: OUTPUT«Method 'gimme' not found for invocant of class 'Str'␤ in method postcircumfix:[ ] at src/gen/CORE.setting:1147␤ in block anon at

[perl #111978] [BUG] ?^1 gives True in Rakudo

2012-03-25 Thread Patrick R. Michaud via RT
Now fixed in b1acd74. Needs spectest coverage to close ticket. Thanks! Pm

[perl #111646] Arity counting mis-treats slurpy and capture parameters

2012-03-23 Thread Patrick R. Michaud via RT
Now fixed in 69920db585. say infix:~.arity 0 say infix:~.count Inf say a b c d.reduce(infix:~) abcd Ticket can be closed when we have appropriate spectests. Thanks! Pm

[perl #111848] [BUG] The storage strategy for arrays is weird in Rakudo

2012-03-19 Thread Patrick R. Michaud via RT
The speed of Array vs. Hash element access is partially addressed by commit c10792f8. Before this commit, each Array element access via .at_pos($pos) resulted in an expensive call to self.exists($pos) for each access, whereas Hash element accesses via .at_key($key) were able to use

Re: [perl #111796] Rakudo regex regression

2012-03-16 Thread Patrick R. Michaud
On Fri, Mar 16, 2012 at 03:51:49PM -0400, Will Coleda wrote: In this case, if you build rakudo with --gen-parrot, you'll whatever the recommended version for that release of rakudo. ...or any later version, if the parrot/ subdirectory is a git repository. So, you could remove the ./install

  1   2   3   4   5   6   7   >