[perl #126787] [CONC] Promises that are not awaited or .then'd will swallow exceptions.

2016-12-13 Thread Zoffix Znet via RT
On Wed, 02 Dec 2015 13:52:24 -0800, timo wrote:
> just about an exception in a
> Promise that nobody is interested in (no await, no .then, ...) are
> silently nommed:

This version has a `.then` but doesn't explode. Is it meant to then?

use v6;
my $foo;
my $promise = Promise.new;
$promise.keep;  # no difference with break

# note i added an "await" here.
$promise.then({
note 41;
$foo.does-not-exist;  # hangs? thread dies? no error message!
note 42;  # never reached!
}).then: { say "hi" };

sleep 5;


And this one explodes, but there's no location shown for where the error occurs:

use v6;
my $foo;
my $promise = Promise.new;
$promise.keep;  # no difference with break

# note i added an "await" here.
await $promise.then({
note 41;
$foo.does-not-exist;  # hangs? thread dies? no error message!
note 42;  # never reached!
});

sleep 5;

# zoffix@VirtualBox:~/CPANPRC/rakudo$ ./perl6  test.p641
# ===SORRY!===
# No such method 'does-not-exist' for invocant of type 'Any'
# zoffix@VirtualBox:~/CPANPRC/rakudo$ 

This is Rakudo version 2016.11-220-g29b228c built on MoarVM version 
2016.11-41-gd2139b5


[perl #130342] [CONC] supply tap: No such method 'phasers' for invocant of type 'Code'

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


The error is LTA (and maybe a bug?)

17:52   b2gills m: (supply loop { emit Bool.pick }).tap: *.say # Should 
the supply "keyword" be able used like this
17:52   camelia rakudo-moar 1d4600: OUTPUT«No such method 'phasers' for 
invocant of type 'Code'␤  in block  at  line 1␤␤»

https://irclog.perlgeek.de/perl6-dev/2016-12-13


[perl #130338] perl6 changes breaking code

2016-12-13 Thread Zoffix Znet via RT
On Tue, 13 Dec 2016 02:11:12 -0800, mt1...@gmail.com wrote:
> Hi,
> 
> Recently after pulling the newest rakudo/moarvm (2016.11-238-g2f502b4
> built on MoarVM version 2016.11-41-gd2139b5 implementing Perl 6.c) I
> saw
> errors in my code which compiled ok before. This is difficult to golf
> down because it disappears when used in another context. So better
> explain my way of coding.
> 
> The error I get now is
> 
> /home/marcel/Languages/Perl6/Projects/mongo-perl6-
> driver/xt/Sxml/driver-authentication.t
> ..
> ===SORRY!===
> Type 'MongoDB::Server' is not declared
> at
> /home/marcel/Languages/Perl6/Projects/mongo-perl6-
> driver/lib/MongoDB/Client.pm6
> (MongoDB::Client):152
> --> my MongoDB::Server⏏ $server .= new(
> Malformed my
> at
> /home/marcel/Languages/Perl6/Projects/mongo-perl6-
> driver/lib/MongoDB/Client.pm6
> (MongoDB::Client):152
> --> my MongoDB::⏏Server $server .= new(
> 
> 
> The module in question has the following at the top
> 
> use v6.c;
> 
> use MongoDB::Server;
> use MongoDB::Database;
> use MongoDB::Collection;
> use MongoDB::Uri;
> use MongoDB::Wire;
> use MongoDB::Authenticate::Credential;
> use MongoDB;
> 
> use BSON::Document;
> use Semaphore::ReadersWriters;
> 
> #---
> unit package MongoDB:auth;
> 
> #---
> class Client {
> ...
>my MongoDB::Server $server .= new(
>  :client(self), :$server-name, :$loop-time
>);
> 
> }
> 
> 
> The server class is defined likewise as
> 
> use v6.c;
> 
> use MongoDB;
> use MongoDB::Server::Monitor;
> use MongoDB::Server::Socket;
> use MongoDB::Authenticate::Credential;
> use MongoDB::Authenticate::Scram;
> 
> use BSON::Document;
> use Semaphore::ReadersWriters;
> use Auth::SCRAM;
> 
> #---
> unit package MongoDB:auth;
> 
> #---
> class Server { ... }
> 
> 
> When e.g. the line 'use MongoDB::Uri' is moved above that of
> MongoDB::Server (in the Client module) another error is returned;
> 
> Type 'MongoDB::Uri' is not declared
>  at
>  /home/marcel/Languages/Perl6/Projects/mongo-perl6-
> driver/lib/MongoDB/Client.pm6
> (MongoDB::Client):99
> --> my MongoDB::Uri⏏ $uri-obj .= new(:$!uri);
> Malformed my
>  at
>  /home/marcel/Languages/Perl6/Projects/mongo-perl6-
> driver/lib/MongoDB/Client.pm6
> (MongoDB::Client):99
> --> my MongoDB::⏏Uri $uri-obj .= new(:$!uri);
> 
> 
> Now I found out that when the 'unit package' line is moved above the
> use
> statements, the error disappears. Can anyone shed some light over
> this?
> I know that use statements can be used within package, module and
> class
> to narrow the scope of definitions but I can't remember anything which
> could explain this behavior.
> 
> Thanks,
> Marcel


Hi,

How did you build your Perl 6?

That version number looks suspicious. You say you're on 2016.11-238-g2f502b4, 
but the current HEAD/nom is 2016.11-226-g1d46004, 12 commits fewer than yours.

The most obvious answer is you're in possession of a time machine and are 
reporting bugs from the future. In which case, would you mind including this 
week's lottery numbers in your reply?

Let us know,
Thank you.





[perl #130339] make install failure on rakudo star 2016.11

2016-12-13 Thread Zoffix Znet via RT
On Tue, 13 Dec 2016 04:59:08 -0800, alt.mcar...@gmail.com wrote:
> $perl6 --version
> This is Rakudo version 2016.11 built on MoarVM version 2016.11
> implementing Perl 6.c.
> 
> make install seems to have problems building panda. It is reliant on 
> File::Find, which is failing a test:
> 
> Unhandled exception: Failed to write to filehandle: NULL string given
> 
> http://pastebin.com/7PzmcaTS
> 

Hi,

Would you be able to provide more info on what OS you're using and any 
special/uncommon configuration it may have?



[perl #128887] [BUG] `eager` on a Range constructed with Range math operators spills guts

2016-12-13 Thread Zoffix Znet via RT
On Wed, 10 Aug 2016 06:54:27 -0700, c...@zoffix.com wrote:
> m: say eager (2.5..^7.5)
> rakudo-moar e829a9: OUTPUT«(2.5 3.5 4.5 5.5 6.5)␤»
> 
> m: say eager (^10+5)/2
> rakudo-moar e829a9: OUTPUT«P6opaque: get_boxed_ref could not unbox for
> the representation '20' of type Rat␤  in block  at  line
> 1␤␤»
> 
> m: say ((^10+5)/2)[$_] for ^5
> rakudo-moar e829a9: OUTPUT«2.5␤3.5␤4.5␤5.5␤6.5␤»


Fix: https://github.com/rakudo/rakudo/commit/1d46004dd3575a02f3656b456
Test: https://github.com/perl6/roast/commit/d23534b2d7



[perl #130211] [LTA] missing overloaded methods don't tell what role needs them

2016-12-13 Thread Zoffix Znet via RT
On Tue, 29 Nov 2016 03:36:09 -0800, gfldex wrote:
> EVAL 'role R { method overload-this(){...} }; class A does R {}; ';
> CATCH { default { say .^name, .Str } }
> 
> # OUTPUT«X::Comp::AdHocMethod 'overload-this' must be implemented by A
> # because it is required by a role␤»
> 
> # expected
> # OUTPUT«X::Comp::AdHocMethod 'overload-this' must be implemented by A
> # because it is required by a role R␤»
> 
> # Please update the docs at
> # https://docs.perl6.org/language/typesystem#role or file a github issue


Fixed in 
https://github.com/rakudo/rakudo/commit/bff0510412933756d2cdfe09c807f84757d486ef

Tests needed.


[perl #130338] perl6 changes breaking code

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


Hi,

Recently after pulling the newest rakudo/moarvm (2016.11-238-g2f502b4 
built on MoarVM version 2016.11-41-gd2139b5 implementing Perl 6.c) I saw 
errors in my code which compiled ok before. This is difficult to golf 
down because it disappears when used in another context. So better 
explain my way of coding.

The error I get now is

/home/marcel/Languages/Perl6/Projects/mongo-perl6-driver/xt/Sxml/driver-authentication.t
 
..
===SORRY!===
Type 'MongoDB::Server' is not declared
at 
/home/marcel/Languages/Perl6/Projects/mongo-perl6-driver/lib/MongoDB/Client.pm6 
(MongoDB::Client):152
--> my MongoDB::Server⏏ $server .= new(
Malformed my
at 
/home/marcel/Languages/Perl6/Projects/mongo-perl6-driver/lib/MongoDB/Client.pm6 
(MongoDB::Client):152
--> my MongoDB::⏏Server $server .= new(


The module in question has the following at the top

use v6.c;

use MongoDB::Server;
use MongoDB::Database;
use MongoDB::Collection;
use MongoDB::Uri;
use MongoDB::Wire;
use MongoDB::Authenticate::Credential;
use MongoDB;

use BSON::Document;
use Semaphore::ReadersWriters;

#---
unit package MongoDB:auth;

#---
class Client {
...
   my MongoDB::Server $server .= new(
 :client(self), :$server-name, :$loop-time
   );

}


The server class is defined likewise as

use v6.c;

use MongoDB;
use MongoDB::Server::Monitor;
use MongoDB::Server::Socket;
use MongoDB::Authenticate::Credential;
use MongoDB::Authenticate::Scram;

use BSON::Document;
use Semaphore::ReadersWriters;
use Auth::SCRAM;

#---
unit package MongoDB:auth;

#---
class Server { ... }


When e.g. the line 'use MongoDB::Uri' is moved above that of 
MongoDB::Server (in the Client module) another error is returned;

Type 'MongoDB::Uri' is not declared
at 
/home/marcel/Languages/Perl6/Projects/mongo-perl6-driver/lib/MongoDB/Client.pm6 
(MongoDB::Client):99
--> my MongoDB::Uri⏏ $uri-obj .= new(:$!uri);
Malformed my
at 
/home/marcel/Languages/Perl6/Projects/mongo-perl6-driver/lib/MongoDB/Client.pm6 
(MongoDB::Client):99
--> my MongoDB::⏏Uri $uri-obj .= new(:$!uri);


Now I found out that when the 'unit package' line is moved above the use 
statements, the error disappears. Can anyone shed some light over this? 
I know that use statements can be used within package, module and class 
to narrow the scope of definitions but I can't remember anything which 
could explain this behavior.

Thanks,
Marcel