Re: [perl #131364] [RESOLVED] concurrent quicksort from Damien gives different crashes each time

2017-06-01 Thread Sverre Eldøy via RT
./quicksort_concurrent.p6 ;./quicksort_concurrent.p6 ;./quicksort_concurrent.p6 
; perl6 -v
input  = 3 1 4 1 5 9 2 6
Tried to get the result of a broken Promise
  in block  at ./quicksort_concurrent.p6 line 17

Original exception:
Cannot resolve caller infix:(Mu, Int); none of these signatures 
match:
($?)
(\a, \b)
  in sub quicksort at ./quicksort_concurrent.p6 line 4
  in block  at ./quicksort_concurrent.p6 line 12

input  = 3 1 4 1 5 9 2 6
moar(25759,0x7d20d000) malloc: *** error for object 0x7fea48663230: double 
free
*** set a breakpoint in malloc_error_break to debug
Abort trap: 6
input  = 3 1 4 1 5 9 2 6
output = 1 1 1 2 2 2 2 3 3 3 3 3 3 4 4 4 4 4 4 4 5 5 5 5 5 5 5 6 6 6 6 6 6 7 7 
7 7 7 7 7 7 8 8 8 8 8 9 9 9 9 12 33 36 45 123 143 234 234 234 234 234 234 234 
234 324 342 345 345 346 444 456 457 457 467 675 678 3123 4543 9860 34589734
This is Rakudo version 2017.04.3 built on MoarVM version 2017.04-53-g66c6dda
implementing Perl 6.c.

Third times the charm..


> On 1 Jun 2017, at 15:14, Elizabeth Mattijsen via RT 
>  wrote:
> 
> Could you please retry on 2017.05?  I cannot reproduce the problem, even 
> after 1000 runs.
> 
>> On 30 May 2017, at 17:25, Sverre Eldøy  wrote:
>> 
>> Hi! Sorry for the late reply. I just tried it on 2017.04 ... and the problem 
>> is still there.. So please reopen
>> 
>> 
>>> On 29 May 2017, at 20:53, Will Coleda via RT  
>>> wrote:
>>> 
>>> According to our records, your request regarding
>>> "concurrent quicksort from Damien gives different crashes each time"
>>> has been resolved.
>>> 
>>> If you have any further questions or concerns, please respond to this 
>>> message.
>>> 
>>> For other topics, please create a new ticket.
>>> 
>>> https://rt.perl.org/Ticket/Display.html?id=131364 >
>> 
> 




signature.asc
Description: PGP signature


Re: [perl #131364] [RESOLVED] concurrent quicksort from Damien gives different crashes each time

2017-06-01 Thread Sverre Eldøy via RT
And three more tries:
./quicksort_concurrent.p6 ;./quicksort_concurrent.p6 ;./quicksort_concurrent.p6
input  = 3 1 4 1 5 9 2 6
Segmentation fault: 11
input  = 3 1 4 1 5 9 2 6
Tried to get the result of a broken Promise
  in block  at ./quicksort_concurrent.p6 line 17

Original exception:
Cannot resolve caller infix:(Mu, Int); none of these signatures 
match:
($?)
(\a, \b)
  in sub quicksort at ./quicksort_concurrent.p6 line 4
  in block  at ./quicksort_concurrent.p6 line 12

input  = 3 1 4 1 5 9 2 6
moar(25827,0x7264b000) malloc: *** error for object 0x7f835a70d870: pointer 
being realloc'd was not allocated
*** set a breakpoint in malloc_error_break to debug
Abort trap: 6

... It's kinda amazing how it can break in different ways each time... three 
more:
./quicksort_concurrent.p6 ;./quicksort_concurrent.p6 ;./quicksort_concurrent.p6
input  = 3 1 4 1 5 9 2 6
Segmentation fault: 11
input  = 3 1 4 1 5 9 2 6
Illegal instruction: 4
input  = 3 1 4 1 5 9 2 6
Use of uninitialized value of type Any in string context.
Methods .^name, .perl, .gist, or .say can be used to stringify it to something 
meaningful.
  in whatevercode  at ./quicksort_concurrent.p6 line 10
Use of uninitialized value  of type Any in string context.
Methods .^name, .perl, .gist, or .say can be used to stringify it to something 
meaningful.
Use of uninitialized value  of type Any in string context.
Methods .^name, .perl, .gist, or .say can be used to stringify it to something 
meaningful.
  in sub quicksort at ./quicksort_concurrent.p6 line 4
  in sub quicksort at ./quicksort_concurrent.p6 line 4
Use of uninitialized value $pivot of type Any in string context.
Methods .^name, .perl, .gist, or .say can be used to stringify it to something 
meaningful.Use of uninitialized value $pivot of type Any in string context.
Methods .^name, .perl, .gist, or .say can be used to stringify it to something 
meaningful.

  in whatevercode  at ./quicksort_concurrent.p6 line 10
Use of uninitialized value $pivot of type Any in string context.
Methods .^name, .perl, .gist, or .say can be used to stringify it to something 
meaningful.
  in sub quicksort at ./quicksort_concurrent.p6 line 4
Use of uninitialized value $pivot of type Any in string context.
Methods .^name, .perl, .gist, or .say can be used to stringify it to something 
meaningful.
  in whatevercode  at ./quicksort_concurrent.p6 line 10
Use of uninitialized value $pivot of type Any in string context.
Methods .^name, .perl, .gist, or .say can be used to stringify it to something 
meaningful.
  in whatevercode  at ./quicksort_concurrent.p6 line 10
  in sub quicksort at ./quicksort_concurrent.p6 line 4
Use of uninitialized value $pivot of type Any in string context.
Methods .^name, .perl, .gist, or .say can be used to stringify it to something 
meaningful.
  in sub quicksort at ./quicksort_concurrent.p6 line 4
Tried to get the result of a broken Promise
  in block  at ./quicksort_concurrent.p6 line 17

Original exception:
This type (Mu) does not support elems
  in sub quicksort at ./quicksort_concurrent.p6 line 4
  in block  at ./quicksort_concurrent.p6 line 10




> On 1 Jun 2017, at 18:50, Sverre Eldøy  wrote:
> 
> ./quicksort_concurrent.p6 ;./quicksort_concurrent.p6 
> ;./quicksort_concurrent.p6 ; perl6 -v
> input  = 3 1 4 1 5 9 2 6
> Tried to get the result of a broken Promise
>  in block  at ./quicksort_concurrent.p6 line 17
> 
> Original exception:
>Cannot resolve caller infix:(Mu, Int); none of these signatures 
> match:
>($?)
>(\a, \b)
>  in sub quicksort at ./quicksort_concurrent.p6 line 4
>  in block  at ./quicksort_concurrent.p6 line 12
> 
> input  = 3 1 4 1 5 9 2 6
> moar(25759,0x7d20d000) malloc: *** error for object 0x7fea48663230: 
> double free
> *** set a breakpoint in malloc_error_break to debug
> Abort trap: 6
> input  = 3 1 4 1 5 9 2 6
> output = 1 1 1 2 2 2 2 3 3 3 3 3 3 4 4 4 4 4 4 4 5 5 5 5 5 5 5 6 6 6 6 6 6 7 
> 7 7 7 7 7 7 7 8 8 8 8 8 9 9 9 9 12 33 36 45 123 143 234 234 234 234 234 234 
> 234 234 324 342 345 345 346 444 456 457 457 467 675 678 3123 4543 9860 
> 34589734
> This is Rakudo version 2017.04.3 built on MoarVM version 2017.04-53-g66c6dda
> implementing Perl 6.c.
> 
> Third times the charm..
> 
> 
>> On 1 Jun 2017, at 15:14, Elizabeth Mattijsen via RT 
>>  wrote:
>> 
>> Could you please retry on 2017.05?  I cannot reproduce the problem, even 
>> after 1000 runs.
>> 
>>> On 30 May 2017, at 17:25, Sverre Eldøy  wrote:
>>> 
>>> Hi! Sorry for the late reply. I just tried it on 2017.04 ... and the 
>>> problem is still there.. So please reopen
>>> 
>>> 
 On 29 May 2017, at 20:53, Will Coleda via RT 
  wrote:
 
 According to our records, your request regarding
 "concurrent quicksort from Damien gives different crashes each time"
 has been resolved.
 
 If you have any further 

Re: [perl #131364] [RESOLVED] concurrent quicksort from Damien gives different crashes each time

2017-06-01 Thread Sverre Eldøy
./quicksort_concurrent.p6 ;./quicksort_concurrent.p6 ;./quicksort_concurrent.p6 
; perl6 -v
input  = 3 1 4 1 5 9 2 6
Tried to get the result of a broken Promise
  in block  at ./quicksort_concurrent.p6 line 17

Original exception:
Cannot resolve caller infix:(Mu, Int); none of these signatures 
match:
($?)
(\a, \b)
  in sub quicksort at ./quicksort_concurrent.p6 line 4
  in block  at ./quicksort_concurrent.p6 line 12

input  = 3 1 4 1 5 9 2 6
moar(25759,0x7d20d000) malloc: *** error for object 0x7fea48663230: double 
free
*** set a breakpoint in malloc_error_break to debug
Abort trap: 6
input  = 3 1 4 1 5 9 2 6
output = 1 1 1 2 2 2 2 3 3 3 3 3 3 4 4 4 4 4 4 4 5 5 5 5 5 5 5 6 6 6 6 6 6 7 7 
7 7 7 7 7 7 8 8 8 8 8 9 9 9 9 12 33 36 45 123 143 234 234 234 234 234 234 234 
234 324 342 345 345 346 444 456 457 457 467 675 678 3123 4543 9860 34589734
This is Rakudo version 2017.04.3 built on MoarVM version 2017.04-53-g66c6dda
implementing Perl 6.c.

Third times the charm..


> On 1 Jun 2017, at 15:14, Elizabeth Mattijsen via RT 
>  wrote:
> 
> Could you please retry on 2017.05?  I cannot reproduce the problem, even 
> after 1000 runs.
> 
>> On 30 May 2017, at 17:25, Sverre Eldøy  wrote:
>> 
>> Hi! Sorry for the late reply. I just tried it on 2017.04 ... and the problem 
>> is still there.. So please reopen
>> 
>> 
>>> On 29 May 2017, at 20:53, Will Coleda via RT  
>>> wrote:
>>> 
>>> According to our records, your request regarding
>>> "concurrent quicksort from Damien gives different crashes each time"
>>> has been resolved.
>>> 
>>> If you have any further questions or concerns, please respond to this 
>>> message.
>>> 
>>> For other topics, please create a new ticket.
>>> 
>>> https://rt.perl.org/Ticket/Display.html?id=131364 >
>> 
> 



signature.asc
Description: Message signed with OpenPGP


Re: [perl #131364] [RESOLVED] concurrent quicksort from Damien gives different crashes each time

2017-06-01 Thread Sverre Eldøy
And three more tries:
./quicksort_concurrent.p6 ;./quicksort_concurrent.p6 ;./quicksort_concurrent.p6
input  = 3 1 4 1 5 9 2 6
Segmentation fault: 11
input  = 3 1 4 1 5 9 2 6
Tried to get the result of a broken Promise
  in block  at ./quicksort_concurrent.p6 line 17

Original exception:
Cannot resolve caller infix:(Mu, Int); none of these signatures 
match:
($?)
(\a, \b)
  in sub quicksort at ./quicksort_concurrent.p6 line 4
  in block  at ./quicksort_concurrent.p6 line 12

input  = 3 1 4 1 5 9 2 6
moar(25827,0x7264b000) malloc: *** error for object 0x7f835a70d870: pointer 
being realloc'd was not allocated
*** set a breakpoint in malloc_error_break to debug
Abort trap: 6

... It's kinda amazing how it can break in different ways each time... three 
more:
./quicksort_concurrent.p6 ;./quicksort_concurrent.p6 ;./quicksort_concurrent.p6
input  = 3 1 4 1 5 9 2 6
Segmentation fault: 11
input  = 3 1 4 1 5 9 2 6
Illegal instruction: 4
input  = 3 1 4 1 5 9 2 6
Use of uninitialized value of type Any in string context.
Methods .^name, .perl, .gist, or .say can be used to stringify it to something 
meaningful.
  in whatevercode  at ./quicksort_concurrent.p6 line 10
Use of uninitialized value  of type Any in string context.
Methods .^name, .perl, .gist, or .say can be used to stringify it to something 
meaningful.
Use of uninitialized value  of type Any in string context.
Methods .^name, .perl, .gist, or .say can be used to stringify it to something 
meaningful.
  in sub quicksort at ./quicksort_concurrent.p6 line 4
  in sub quicksort at ./quicksort_concurrent.p6 line 4
Use of uninitialized value $pivot of type Any in string context.
Methods .^name, .perl, .gist, or .say can be used to stringify it to something 
meaningful.Use of uninitialized value $pivot of type Any in string context.
Methods .^name, .perl, .gist, or .say can be used to stringify it to something 
meaningful.

  in whatevercode  at ./quicksort_concurrent.p6 line 10
Use of uninitialized value $pivot of type Any in string context.
Methods .^name, .perl, .gist, or .say can be used to stringify it to something 
meaningful.
  in sub quicksort at ./quicksort_concurrent.p6 line 4
Use of uninitialized value $pivot of type Any in string context.
Methods .^name, .perl, .gist, or .say can be used to stringify it to something 
meaningful.
  in whatevercode  at ./quicksort_concurrent.p6 line 10
Use of uninitialized value $pivot of type Any in string context.
Methods .^name, .perl, .gist, or .say can be used to stringify it to something 
meaningful.
  in whatevercode  at ./quicksort_concurrent.p6 line 10
  in sub quicksort at ./quicksort_concurrent.p6 line 4
Use of uninitialized value $pivot of type Any in string context.
Methods .^name, .perl, .gist, or .say can be used to stringify it to something 
meaningful.
  in sub quicksort at ./quicksort_concurrent.p6 line 4
Tried to get the result of a broken Promise
  in block  at ./quicksort_concurrent.p6 line 17

Original exception:
This type (Mu) does not support elems
  in sub quicksort at ./quicksort_concurrent.p6 line 4
  in block  at ./quicksort_concurrent.p6 line 10




> On 1 Jun 2017, at 18:50, Sverre Eldøy  wrote:
> 
> ./quicksort_concurrent.p6 ;./quicksort_concurrent.p6 
> ;./quicksort_concurrent.p6 ; perl6 -v
> input  = 3 1 4 1 5 9 2 6
> Tried to get the result of a broken Promise
>  in block  at ./quicksort_concurrent.p6 line 17
> 
> Original exception:
>Cannot resolve caller infix:(Mu, Int); none of these signatures 
> match:
>($?)
>(\a, \b)
>  in sub quicksort at ./quicksort_concurrent.p6 line 4
>  in block  at ./quicksort_concurrent.p6 line 12
> 
> input  = 3 1 4 1 5 9 2 6
> moar(25759,0x7d20d000) malloc: *** error for object 0x7fea48663230: 
> double free
> *** set a breakpoint in malloc_error_break to debug
> Abort trap: 6
> input  = 3 1 4 1 5 9 2 6
> output = 1 1 1 2 2 2 2 3 3 3 3 3 3 4 4 4 4 4 4 4 5 5 5 5 5 5 5 6 6 6 6 6 6 7 
> 7 7 7 7 7 7 7 8 8 8 8 8 9 9 9 9 12 33 36 45 123 143 234 234 234 234 234 234 
> 234 234 324 342 345 345 346 444 456 457 457 467 675 678 3123 4543 9860 
> 34589734
> This is Rakudo version 2017.04.3 built on MoarVM version 2017.04-53-g66c6dda
> implementing Perl 6.c.
> 
> Third times the charm..
> 
> 
>> On 1 Jun 2017, at 15:14, Elizabeth Mattijsen via RT 
>>  wrote:
>> 
>> Could you please retry on 2017.05?  I cannot reproduce the problem, even 
>> after 1000 runs.
>> 
>>> On 30 May 2017, at 17:25, Sverre Eldøy  wrote:
>>> 
>>> Hi! Sorry for the late reply. I just tried it on 2017.04 ... and the 
>>> problem is still there.. So please reopen
>>> 
>>> 
 On 29 May 2017, at 20:53, Will Coleda via RT 
  wrote:
 
 According to our records, your request regarding
 "concurrent quicksort from Damien gives different crashes each time"
 has been resolved.
 
 If you have any further 

[perl #131479] [ASYNC] Proc::Async.kill doesn't seem to work when more than 1 proc is involved

2017-06-01 Thread via RT
# New Ticket Created by  Zoffix Znet 
# Please include the string:  [perl #131479]
# in the subject line of all future correspondence about this issue. 
# https://rt.perl.org/Ticket/Display.html?id=131479 >


This appears to hang more often than not, despite printing "Killing" messages.

perl6 -e 'await ^2 .map: {start { with Proc::Async.new: $*EXECUTABLE, "-e", 
"sleep" -> $p { Promise.in(2).then: {say "Killing"; $p.kill: SIGTERM}; await 
$p.start } }}'

However, if we reduce it to just 1 Proc, then it appears to work without 
issues, killing the spawned Proc every time:

perl6 -e 'await ^1 .map: {start { with Proc::Async.new: $*EXECUTABLE, "-e", 
"sleep" -> $p { Promise.in(2).then: {say "Killing"; $p.kill: SIGTERM}; await 
$p.start } }}'


This looks to be the code handling the kill op, but I don't know if it looks 
wrong or not:

https://github.com/MoarVM/MoarVM/blob/dff6a4198f44d0b2793863cc56cc41679c36677f/src/io/procops.c#L1072-L1085

void MVM_proc_kill_async(MVMThreadContext *tc, MVMObject *handle_obj, MVMint64 
signal) {
/* Ensure it's a handle for a process. */
if (REPR(handle_obj)->ID == MVM_REPR_ID_MVMOSHandle) {
MVMOSHandle *handle = (MVMOSHandle *)handle_obj;
if (handle->body.ops == _op_table) {
/* It's fine; send the kill by cancelling the task. */
MVMIOAsyncProcessData *data = (MVMIOAsyncProcessData 
*)handle->body.data;
data->signal = signal;
MVM_io_eventloop_cancel_work(tc, data->async_task, NULL, NULL);
return;
}
}
MVM_exception_throw_adhoc(tc, "killprocasync requires a process handle");
}


[perl #131478] Warning about $. when using metamethod

2017-06-01 Thread via RT
# New Ticket Created by  Juerd Waalboer 
# Please include the string:  [perl #131478]
# in the subject line of all future correspondence about this issue. 
# https://rt.perl.org/Ticket/Display.html?id=131478 >


code:

class Command { method Str { "<$.^name>" } }
# or even just:
class Command { method Str { $.^name } }

gives:

Unsupported use of $. variable; in Perl 6 please use the .kv method on e.g. 
.lines

workaround:

self.^names


00:41 < Juerd> "Unsupported use of $. variable; in Perl 6 please use the .kv 
method on e.g. .lines" when trying $.^name instead of 
self.^name; bug or my mistake?  
00:50 < AlexDaniel> Juerd: bug.
00:53 < AlexDaniel> Juerd: I think this is where you would fix it: 
https://github.com/rakudo/rakudo/blob/8e0d000fbbe1a1430695ac5dbed5bce505d89a05/src/Perl6/Grammar.nqp#L2080-L2083

00:54 < AlexDaniel> like, maybe this: !before ‘^’? \w   
  00:55 < Juerd> Mind if I 
copy/paste that into a ticket?  
 00:55 < AlexDaniel> sure

-- 
Met vriendelijke groet, // Kind regards, // Korajn salutojn,

Juerd Waalboer  
TNX


[perl #131367] [LTA] .splice and .split methods candidate error

2017-06-01 Thread Zoffix Znet via RT
On Thu, 25 May 2017 09:51:53 -0700, c...@zoffix.com wrote:
> Something's fishy going on with .splice. It feels like a multi without
> any candidates.
> 
> I vaguely recall a commit going in adding splice proto to Mu, so
> perhaps that's the cause.
> 
> The error gives uninitialized string warning and the "none of these
> signatures match" message prints no candidates.
> 
> 
> zoffix@leliana~$ perl6 -v
> This is Rakudo version 2017.05-78-gdd2de36 built on MoarVM version
> 2017.05-24-gd86a35b
> implementing Perl 6.c.
> zoffix@leliana~$ perl6 -e 'Blob.new.splice: 42'
> Use of uninitialized value of type Any in string context.
> Methods .^name, .perl, .gist, or .say can be used to stringify it to
> something meaningful.
>   in block  at -e line 1
> Cannot resolve caller splice(Blob, Int); none of these signatures
> match:
>   in block  at -e line 1
> 
> zoffix@leliana~$


Thank you for the report. jsimonet++ fixed the issue.

Fix: https://github.com/rakudo/rakudo/commit/02614f6477
Test: https://github.com/rakudo/rakudo/commit/b667e818c5


[perl #131367] [LTA] .splice and .split methods candidate error

2017-06-01 Thread Zoffix Znet via RT
On Thu, 25 May 2017 09:51:53 -0700, c...@zoffix.com wrote:
> Something's fishy going on with .splice. It feels like a multi without
> any candidates.
> 
> I vaguely recall a commit going in adding splice proto to Mu, so
> perhaps that's the cause.
> 
> The error gives uninitialized string warning and the "none of these
> signatures match" message prints no candidates.
> 
> 
> zoffix@leliana~$ perl6 -v
> This is Rakudo version 2017.05-78-gdd2de36 built on MoarVM version
> 2017.05-24-gd86a35b
> implementing Perl 6.c.
> zoffix@leliana~$ perl6 -e 'Blob.new.splice: 42'
> Use of uninitialized value of type Any in string context.
> Methods .^name, .perl, .gist, or .say can be used to stringify it to
> something meaningful.
>   in block  at -e line 1
> Cannot resolve caller splice(Blob, Int); none of these signatures
> match:
>   in block  at -e line 1
> 
> zoffix@leliana~$


Thank you for the report. jsimonet++ fixed the issue.

Fix: https://github.com/rakudo/rakudo/commit/02614f6477
Test: https://github.com/rakudo/rakudo/commit/b667e818c5


[perl #131201] [LTA] error message when proto has no implementation (class A { proto method x { * }; })

2017-06-01 Thread Zoffix Znet via RT
On Mon, 24 Apr 2017 04:32:33 -0700, alex.jakime...@gmail.com wrote:
> Code:
> class A {
>   proto method x { * };
> };
> A.x
> 
> 
> Result:
> Use of uninitialized value of type Any in string context.
> Methods .^name, .perl, .gist, or .say can be used to stringify it to
> something meaningful.
>   in block  at -e line 4
> Cannot resolve caller x(A); none of these signatures match:
>   in block  at -e line 4
> 
> 
> 
> First of all, it says “none of these signatures match:” and then it
> prints the line number. There are no signatures, I get it, but the
> error message is ugly.
> 
> Also, “Use of uninitialized value of type Any in string context.” does
> not seem to be coming from the user code, I guess it happens during
> the error message generation, but I could be wrong.


Thank you for the report. jsimonet++ fixed the issue.

Fix: https://github.com/rakudo/rakudo/commit/02614f6477
Test: https://github.com/rakudo/rakudo/commit/8e0d000fbb


[perl #131201] [LTA] error message when proto has no implementation (class A { proto method x { * }; })

2017-06-01 Thread Zoffix Znet via RT
On Mon, 24 Apr 2017 04:32:33 -0700, alex.jakime...@gmail.com wrote:
> Code:
> class A {
>   proto method x { * };
> };
> A.x
> 
> 
> Result:
> Use of uninitialized value of type Any in string context.
> Methods .^name, .perl, .gist, or .say can be used to stringify it to
> something meaningful.
>   in block  at -e line 4
> Cannot resolve caller x(A); none of these signatures match:
>   in block  at -e line 4
> 
> 
> 
> First of all, it says “none of these signatures match:” and then it
> prints the line number. There are no signatures, I get it, but the
> error message is ugly.
> 
> Also, “Use of uninitialized value of type Any in string context.” does
> not seem to be coming from the user code, I guess it happens during
> the error message generation, but I could be wrong.


Thank you for the report. jsimonet++ fixed the issue.

Fix: https://github.com/rakudo/rakudo/commit/02614f6477
Test: https://github.com/rakudo/rakudo/commit/8e0d000fbb


[perl #131477] [BUG] hyperoperator on an undefined typed array hangs

2017-06-01 Thread Zoffix Znet via RT
On Thu, 01 Jun 2017 12:18:31 -0700, c...@tilmes.org wrote:
>  m: my Array[Int] $x; say $x>>.Str;
>  rakudo-moar 92c187: OUTPUT: «(timeout)»
>  bisectable6: my Array[Int] $x; say $x>>.Str;
>  timotimo, On both starting points (old=2015.12 new=92c187d)
> the exit code is 0, exit signal is 1 (SIGHUP) and the output is identical
> as well
>  timotimo, Output on both points: ««timed out after 10
> seconds»»
>  huh, it has been like this forever


Thank you for the report. This is now fixed.

Fix:  https://github.com/rakudo/rakudo/commit/252dbf3a91
Test: https://github.com/perl6/roast/commit/6b95eaacc2


[perl #131477] [BUG] hyperoperator on an undefined typed array hangs

2017-06-01 Thread Zoffix Znet via RT
On Thu, 01 Jun 2017 12:18:31 -0700, c...@tilmes.org wrote:
>  m: my Array[Int] $x; say $x>>.Str;
>  rakudo-moar 92c187: OUTPUT: «(timeout)»
>  bisectable6: my Array[Int] $x; say $x>>.Str;
>  timotimo, On both starting points (old=2015.12 new=92c187d)
> the exit code is 0, exit signal is 1 (SIGHUP) and the output is identical
> as well
>  timotimo, Output on both points: ««timed out after 10
> seconds»»
>  huh, it has been like this forever


Thank you for the report. This is now fixed.

Fix:  https://github.com/rakudo/rakudo/commit/252dbf3a91
Test: https://github.com/perl6/roast/commit/6b95eaacc2


[perl #131477] [BUG] hyperoperator on an undefined typed array hangs

2017-06-01 Thread via RT
# New Ticket Created by  Curt Tilmes 
# Please include the string:  [perl #131477]
# in the subject line of all future correspondence about this issue. 
# https://rt.perl.org/Ticket/Display.html?id=131477 >


 m: my Array[Int] $x; say $x>>.Str;
 rakudo-moar 92c187: OUTPUT: «(timeout)»
 bisectable6: my Array[Int] $x; say $x>>.Str;
 timotimo, On both starting points (old=2015.12 new=92c187d)
the exit code is 0, exit signal is 1 (SIGHUP) and the output is identical
as well
 timotimo, Output on both points: ««timed out after 10
seconds»»
 huh, it has been like this forever


[perl #131476] list named argument in MAIN

2017-06-01 Thread via RT
# New Ticket Created by  mt1957 
# Please include the string:  [perl #131476]
# in the subject line of all future correspondence about this issue. 
# https://rt.perl.org/Ticket/Display.html?id=131476 >


Hi

I had some discussion on the perl6 users list involving the use of a 
List named argument. The example below works correct

perl6 -e 'sub MAIN (List :$dirs=[]) { .say for flat @$dirs.List».split: 
/","/ }' --dirs=d1 --dirs=d2 --dirs=d3,d4,d5
> d1
> d2
> d3
> d4
> d5

Giving the --dirs option on command line once however, it shows the 
usage message which it shouldn't.

This is Rakudo version 2017.05-338-gaca1929 built on MoarVM version 
2017.05-25-g62bc54e implementing Perl 6.c.

Regards
Marcel


Re: Creating an array of a single hash

2017-06-01 Thread Gabor Szabo
On Thu, Jun 1, 2017 at 5:44 PM, Timo Paulssen  wrote:
> Yeah, you can use the prefix $ to itemize things, like so:
>
> timo@schmand ~> perl6 -e 'my @y = ${ name => "Foo" }; say @y.gist;
> say @y.^name; say @y[0].^name'
> [{name => Foo}]
> Array
> Hash
>
> HTH
>   - Timo

Thanks.
Gabor


Re: Creating an array of a single hash

2017-06-01 Thread Timo Paulssen
Yeah, you can use the prefix $ to itemize things, like so:

timo@schmand ~> perl6 -e 'my @y = ${ name => "Foo" }; say @y.gist;
say @y.^name; say @y[0].^name'
[{name => Foo}]
Array
Hash

HTH
  - Timo


Creating an array of a single hash

2017-06-01 Thread Gabor Szabo
use v6;

my @x = { name => "Foo" }, { name => "Bar"}
say @x.gist; # [{name => Foo} {name => Bar}]
say @x.^name;# Array
say @x[0].^name; # Hash

my @y = { name => "Foo" }
say @y;   # [name => Foo]
say @y.^name; # Array
say @y[0].^name;  # Pair

my @z = { name => "Foo" },;
say @z;   # [{name => Foo}]
say @z.^name; # Array
say @z[0].^name;  #  Hash


In the first example, creating an array of 2 hashes work.
In the second example the listy assignment removes the hashy-ness of
the right hand side.
In the 3rd example adding a comma at the end solves the problem.

Is this how it is recommended to initiate an array with a single hash?
Is there an operator that forces the assignment to item-assignment?

Gabor


Re: list named argument in MAIN

2017-06-01 Thread Marcel Timmerman

On 06/01/2017 03:03 PM, H.Merijn Brand wrote:

On Thu, 1 Jun 2017 14:11:47 +0200, Timo Paulssen 
wrote:


It seems like this only works if you supply --dirs= multiple times

 perl6 -e 'sub MAIN (List :$dirs=[]) { .say for @$dirs }' --dirs=d1 
--dirs=d2 --dirs=d3

 d1
 d2
 d3

took me a bit as it needs both .List *and* flat. Got help on IRC

$ perl6 -e 'sub MAIN (List :$dirs=[]) { .say for flat @$dirs.List».split: /","/ 
}' --dirs=d1 --dirs=d2 --dirs=d3,d4,d5
d1
d2
d3
d4
d5



Re: [perl #131364] [RESOLVED] concurrent quicksort from Damien gives different crashes each time

2017-06-01 Thread Elizabeth Mattijsen via RT
Could you please retry on 2017.05?  I cannot reproduce the problem, even after 
1000 runs.

> On 30 May 2017, at 17:25, Sverre Eldøy  wrote:
> 
> Hi! Sorry for the late reply. I just tried it on 2017.04 ... and the problem 
> is still there.. So please reopen
> 
> 
>> On 29 May 2017, at 20:53, Will Coleda via RT  
>> wrote:
>> 
>> According to our records, your request regarding
>> "concurrent quicksort from Damien gives different crashes each time"
>> has been resolved.
>> 
>> If you have any further questions or concerns, please respond to this 
>> message.
>> 
>> For other topics, please create a new ticket.
>> 
>> https://rt.perl.org/Ticket/Display.html?id=131364 >
> 


Re: [perl #131364] [RESOLVED] concurrent quicksort from Damien gives different crashes each time

2017-06-01 Thread Elizabeth Mattijsen
Could you please retry on 2017.05?  I cannot reproduce the problem, even after 
1000 runs.

> On 30 May 2017, at 17:25, Sverre Eldøy  wrote:
> 
> Hi! Sorry for the late reply. I just tried it on 2017.04 ... and the problem 
> is still there.. So please reopen
> 
> 
>> On 29 May 2017, at 20:53, Will Coleda via RT  
>> wrote:
>> 
>> According to our records, your request regarding
>> "concurrent quicksort from Damien gives different crashes each time"
>> has been resolved.
>> 
>> If you have any further questions or concerns, please respond to this 
>> message.
>> 
>> For other topics, please create a new ticket.
>> 
>> https://rt.perl.org/Ticket/Display.html?id=131364 >
> 


Re: list named argument in MAIN

2017-06-01 Thread H.Merijn Brand
On Thu, 1 Jun 2017 14:11:47 +0200, Timo Paulssen 
wrote:

> It seems like this only works if you supply --dirs= multiple times
> 
> perl6 -e 'sub MAIN (List :$dirs=[]) { .say for @$dirs }' --dirs=d1 
> --dirs=d2 --dirs=d3
> 
> d1
> d2
> d3

took me a bit as it needs both .List *and* flat. Got help on IRC

$ perl6 -e 'sub MAIN (List :$dirs=[]) { .say for flat @$dirs.List».split: /","/ 
}' --dirs=d1 --dirs=d2 --dirs=d3,d4,d5
d1
d2
d3
d4
d5

-- 
H.Merijn Brand  http://tux.nl   Perl Monger  http://amsterdam.pm.org/
using perl5.00307 .. 5.25   porting perl5 on HP-UX, AIX, and openSUSE
http://mirrors.develooper.com/hpux/http://www.test-smoke.org/
http://qa.perl.org   http://www.goldmark.org/jeff/stupid-disclaimers/


pgpKNPVEGGeH8.pgp
Description: OpenPGP digital signature


Re: list named argument in MAIN

2017-06-01 Thread Marcel Timmerman

On 06/01/2017 02:11 PM, Timo Paulssen wrote:

It seems like this only works if you supply --dirs= multiple times

 perl6 -e 'sub MAIN (List :$dirs=[]) { .say for @$dirs }' --dirs=d1
--dirs=d2 --dirs=d3

 d1
 d2
 d3

HTH
   - Timo


Thanks Timo,

Just tested this and it works. But there is still a problem and maybe a 
bug. It should accept a single option to have a list with one item. In 
that case it shows the usage message.


FWIW, I've cooked up a short piece to have it my way


my @a;
for @*ARGS -> $a {
  if $a ~~ m/^ '--dirs'/ {
for $a.split('=')[1].split(',') -> $d {
  @a.push("--dirs=$d");
}
  }

  else {
@a.push($a);
  }
}
@*ARGS = @a;


sub MAIN (List :$dirs=[]) { }

Regards


Re: list named argument in MAIN

2017-06-01 Thread Timo Paulssen
It seems like this only works if you supply --dirs= multiple times

perl6 -e 'sub MAIN (List :$dirs=[]) { .say for @$dirs }' --dirs=d1
--dirs=d2 --dirs=d3

d1
d2
d3

HTH
  - Timo


list named argument in MAIN

2017-06-01 Thread Marcel Timmerman

Hi,

How can I read a list of items from the command line. Something like;

mkdir.pl6 --dirs=d1,d2,d3


I thought I could do something like;

sub MAIN (List :$dirs=[]) {
  mkdir($_) for @$dirs;
}

But it keeps displaying the usage message


Greetings,
Marcel


Re: Is there a linter for Perl 6? (like Perl::Critic or pylint)

2017-06-01 Thread Ahmad Zawawi
Hi Gabor,

Like https://atom.io/packages/atom-perl6-editor-tools for instance or
project-level linting?

Regards,
Ahmad


On Thu, Jun 1, 2017 at 9:02 AM, Gabor Szabo  wrote:

> e.g. I'd like to check that every pl pm and t file in our project has a
> "use v6;" at the beginning.
>
> regards
>Gabor
>


Re: [perl #131412] [BUG] Label.goto() not yet implemented

2017-06-01 Thread Elizabeth Mattijsen via RT
> On 31 May 2017, at 19:53, Kais Ben Salah (via RT) 
>  wrote:
> 
> # New Ticket Created by  Kais Ben Salah 
> # Please include the string:  [perl #131412]
> # in the subject line of all future correspondence about this issue. 
> # https://rt.perl.org/Ticket/Display.html?id=131412 >
> 
> 
> Hello,
> 
> perl6 is showing "Label.goto() not yet implemented. Sorry.".
> 
> Further informations:
> perl6 -v
> This is Rakudo version 2016.12 built on MoarVM version 2016.12
> implementing Perl 6.c.

Please elaborate on how you got this message?  What you have reported now is 
akin to:

“My car doesn’t have a direction indicator”.


FWIW, if you were trying to execute the “goto” message on a Label object, the 
message is correct:  that still isn’t implemented, even on a more recent 
version like 2017.05.


Re: [perl #131412] [BUG] Label.goto() not yet implemented

2017-06-01 Thread Elizabeth Mattijsen
> On 31 May 2017, at 19:53, Kais Ben Salah (via RT) 
>  wrote:
> 
> # New Ticket Created by  Kais Ben Salah 
> # Please include the string:  [perl #131412]
> # in the subject line of all future correspondence about this issue. 
> # https://rt.perl.org/Ticket/Display.html?id=131412 >
> 
> 
> Hello,
> 
> perl6 is showing "Label.goto() not yet implemented. Sorry.".
> 
> Further informations:
> perl6 -v
> This is Rakudo version 2016.12 built on MoarVM version 2016.12
> implementing Perl 6.c.

Please elaborate on how you got this message?  What you have reported now is 
akin to:

“My car doesn’t have a direction indicator”.


FWIW, if you were trying to execute the “goto” message on a Label object, the 
message is correct:  that still isn’t implemented, even on a more recent 
version like 2017.05.

Re: [perl #131364] [RESOLVED] concurrent quicksort from Damien gives different crashes each time

2017-06-01 Thread Sverre Eldøy
Hi! Sorry for the late reply. I just tried it on 2017.04 ... and the problem is 
still there.. So please reopen


> On 29 May 2017, at 20:53, Will Coleda via RT  
> wrote:
> 
> According to our records, your request regarding
>  "concurrent quicksort from Damien gives different crashes each time"
> has been resolved.
> 
> If you have any further questions or concerns, please respond to this message.
> 
> For other topics, please create a new ticket.
> 
> https://rt.perl.org/Ticket/Display.html?id=131364 >



signature.asc
Description: Message signed with OpenPGP


[perl #131412] [BUG] Label.goto() not yet implemented

2017-06-01 Thread via RT
# New Ticket Created by  Kais Ben Salah 
# Please include the string:  [perl #131412]
# in the subject line of all future correspondence about this issue. 
# https://rt.perl.org/Ticket/Display.html?id=131412 >


Hello,

perl6 is showing "Label.goto() not yet implemented. Sorry.".

Further informations:
perl6 -v
This is Rakudo version 2016.12 built on MoarVM version 2016.12
implementing Perl 6.c.

Sent from [ProtonMail](https://protonmail.com), Swiss-based encrypted email.


Re: [perl #131398] Feature Request: trait for unimplemented subs/methods

2017-06-01 Thread Parrot Raiser via RT
That is so easy for a programmer to implement; I have an "nyi"
subroutine/function in the my skeleton scripts for both Perl 5 and
Bash. Is it worth cluttering the language?


Re: [perl #131364] [RESOLVED] concurrent quicksort from Damien gives different crashes each time

2017-06-01 Thread Sverre Eldøy via RT
Hi! Sorry for the late reply. I just tried it on 2017.04 ... and the problem is 
still there.. So please reopen


> On 29 May 2017, at 20:53, Will Coleda via RT  
> wrote:
> 
> According to our records, your request regarding
>  "concurrent quicksort from Damien gives different crashes each time"
> has been resolved.
> 
> If you have any further questions or concerns, please respond to this message.
> 
> For other topics, please create a new ticket.
> 
> https://rt.perl.org/Ticket/Display.html?id=131364 >




signature.asc
Description: PGP signature


Re: ding!

2017-06-01 Thread Brent Laabs
The lack of sound is probably from your terminal.  For instance, iTerm2.app
has the "Silence Bell" option in Preferences > Profiles.

On macOS, this makes a ding noise:
perl6 -e 'run '
or
perl6 -e 'run '

On Wed, May 31, 2017 at 9:18 PM, ToddAndMargo  wrote:

> On 05/31/2017 09:11 PM, Peter Scott wrote:
>
>> On 5/31/17 8:44 PM, ToddAndMargo wrote:
>>
>>> On 05/31/2017 08:39 PM, Lloyd Fournier wrote:
>>>
 perl6 -e 'say "\a"'

>>>
>>> No joy under linux.
>>>
>>> 0x07 does not work either.  Just prints a 7
>>>
>>
>> ITYM chr(7).
>>
>
> perl6 -e 'print chr(7)'
>
> No joy.  :'(
>
>
>
>
> --
> ~~
> Computers are like air conditioners.
> They malfunction when you open windows
> ~~
>


Is there a linter for Perl 6? (like Perl::Critic or pylint)

2017-06-01 Thread Gabor Szabo
e.g. I'd like to check that every pl pm and t file in our project has a
"use v6;" at the beginning.

regards
   Gabor