Re: Gather/take & return, PHP7-style

2015-12-09 Thread yary
My example perl6 code is wrong (and gives the correct answer by accident); and gather/take aren't exactly coroutines although I see that someone's created a "coro/yield" module at https://github.com/marcoonroad/Coro-Simple/ I have some more reading and thinking to do...

[perl #126860] .sort on Str does not sort

2015-12-09 Thread Will Coleda via RT
This is behaving as intended. .sort works on something list-like (FYI, this method is coming in via the Any class). A Str is a single item, so the result of calling sort on it is a list containing the original string as the only element. If you want to sort the individual characters, you can u

[perl #126823] Failing test in S32-array/adverbs.t and S32-hash/adverbs.t: Code does not die as expected with 'use Test'

2015-12-09 Thread Christian Bartolomaeus via RT
Looks like this has nothing to do with lib/Test.pm: $ echo '#' > Bar.pm6 $ ./perl6-m -I. -e 'use Bar; my %h = b => 2; say %h:zorp' Unexpected named parameter 'zorp' passed in block at -e:1 $ ./perl6-m -I. -e 'use Bar; my %h = b => 2; say %h:zorp' 2 Setting RAKUDO_MODULE_DEBUG=1 does still give

[perl #126860] .sort on Str does not sort

2015-12-09 Thread via RT
# New Ticket Created by Wenzel Peppmeyer # Please include the string: [perl #126860] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=126860 > "bca".sort.say # OUTPUT«(bca)␤»

[perl #126861] assignment of a Slip to array subscript does not slip

2015-12-09 Thread via RT
# New Ticket Created by Wenzel Peppmeyer # Please include the string: [perl #126861] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=126861 > my @a; @a[0] = |(1,2,3); dd @a; # OUTPUT«Array $var = $[(1, 2, 3),]␤» # should be th

Gather/take & return, PHP7-style

2015-12-09 Thread yary
I was perusing PHP7's features, and tried some examples of their enhanced "yield" in Perl6. The first was pretty easy, the second I haven't figured out. Curious what yinz can do. Here's the first: ==php== The above example will output: 1 2 3 4 ===p6=== (Condensed) sub gen {gather {take 1; take

[perl #126859] *.sort apparently leaks a BOOTArray

2015-12-09 Thread via RT
# New Ticket Created by Larry Wall # Please include the string: [perl #126859] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=126859 > > p6 'my $f = (*.sort)([1,3,1]); say $f.^name' BOOTArray > p6 'say ((*.sort)([1,3,1])).WHAT

[perl #126858] infinite recursion with put and kinda recursive arrays

2015-12-09 Thread via RT
# New Ticket Created by Wenzel Peppmeyer # Please include the string: [perl #126858] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=126858 > my @b; @b = @b, 1; put @b; OUTPUT«Memory allocation failed; could not allocate 8192

[perl #126857] Segmentation fault (my ([$a]); $a.WHAT)

2015-12-09 Thread via RT
# New Ticket Created by Alex Jakimenko # Please include the string: [perl #126857] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=126857 > Code: my ([$a]); $a.WHAT Result: Segmentation fault This was found by _nadim ( http:

[perl #126856] No spaces allowed around .^ and .? (^42 .^methods.say)

2015-12-09 Thread via RT
# New Ticket Created by Alex Jakimenko # Please include the string: [perl #126856] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=126856 > Code: ^42 .^methods.say Result: ===SORRY!=== Error while compiling -e Unsupported use

[perl #126855] .WHAT does not allow spaces around the dot (42 . WHAT)

2015-12-09 Thread via RT
# New Ticket Created by Alex Jakimenko # Please include the string: [perl #126855] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=126855 > Code: say 42 .WHAT Result: ===SORRY!=== Method call must either supply a name or have

[perl #126850] Test::diag error

2015-12-09 Thread via RT
# New Ticket Created by nadim khemir # Please include the string: [perl #126850] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=126850 > diag "before" ; is( 100, 200, 'test') or diag "an error" ; diag "after" ; error: diag 'b

[perl #126846] [BUG] UDP sockets is not implemented

2015-12-09 Thread via RT
# New Ticket Created by vividsnow # Please include the string: [perl #126846] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=126846 >

Re: [perl #126842] [BUG] New react + chain syntax locks sometimes

2015-12-09 Thread Elizabeth Mattijsen
> On 08 Dec 2015, at 14:40, Claudio Ramirez (via RT) > wrote: > > # New Ticket Created by Claudio Ramirez > # Please include the string: [perl #126842] > # in the subject line of all future correspondence about this issue. > # https://rt.perl.org/Ticket/Display.html?id=126842 > > Tested on r

[perl #126842] [BUG] New react + chain syntax locks sometimes

2015-12-09 Thread via RT
# New Ticket Created by Claudio Ramirez # Please include the string: [perl #126842] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=126842 > Hi, The replacement of the 'whatever' syntax as sugar for consuming Channels through