Re: need lib notify sub

2017-08-07 Thread Fernando Santagata
Hello Todd,

You can access libnotify directly from Rakudo using this:

https://modules.perl6.org/search?q=desktop%3A%3Anotify

HTH

On Mon, Aug 7, 2017 at 8:01 AM, ToddAndMargo  wrote:

> Hi All,
>
> If you upgraded from Fedora 25 to 26, you will notice that
> notify send (libnotify) stopped working.  (It works
> in fresh installs of Fedora 26.)
>
> https://bugzilla.gnome.org/show_bug.cgi?id=785583
>
> Since I need to learn the stuff anyway, would someone
> point me to an GTK::Simple example that would replace
>
> run ( '/usr/bin/notify-send', '-u', 'normal', '-t',
>   '8000', '-i', "$InfoPng", "$IAm: $NotifyStr" );
>
> This pops up for 8 seconds and then dies on its own.
> If you click anywhere is dies as well.
>
> And I do need to learn GTK::simple.
>
> Many thanks,
> -T
>
>
> --
> ~~
> Computers are like air conditioners.
> They malfunction when you open windows
> ~~
>



-- 
Fernando Santagata


Re: need lib notify sub

2017-08-07 Thread ToddAndMargo
On Mon, Aug 7, 2017 at 8:01 AM, ToddAndMargo > wrote:


Hi All,

If you upgraded from Fedora 25 to 26, you will notice that
notify send (libnotify) stopped working.  (It works
in fresh installs of Fedora 26.)

https://bugzilla.gnome.org/show_bug.cgi?id=785583


Since I need to learn the stuff anyway, would someone
point me to an GTK::Simple example that would replace

run ( '/usr/bin/notify-send', '-u', 'normal', '-t',
   '8000', '-i', "$InfoPng", "$IAm: $NotifyStr" );

This pops up for 8 seconds and then dies on its own.
If you click anywhere is dies as well.

And I do need to learn GTK::simple.

Many thanks,
-T



On 08/07/2017 12:30 AM, Fernando Santagata wrote:

Hello Todd,

You can access libnotify directly from Rakudo using this:

https://modules.perl6.org/search?q=desktop%3A%3Anotify

HTH
--
Fernando Santagata



Very sweet.

Problem:

1) Lib-notify is broken on two of my Fedora mahicnes
   I upgraded from Fedora 25 to 26.  See
   https://bugzilla.gnome.org/show_bug.cgi?id=785583

2) I don't learn GTK::simple.

Rats!

I am writing down your module if I need it in the future.

Thank you anyway.
-T

--
~~
Computers are like air conditioners.
They malfunction when you open windows
~~


[perl #131831] Possible precomp issue: crash with `is a directory, cannot do '.open' on a directory` pointing to a sha1 hash of a dir

2017-08-07 Thread Jonathon via RT
The missing 'version' file looks to be the issue, and explains why zef worked 
when installing under under 'site' but not 'vendor': during my testing I think 
I managed to delete the version file from vendor...

Oops. That means I've created a load of noise (but hopefully someone might 
benefit from it down the line...).

This isn't related to the PKGBUILD file itself (where version was being 
deleted); that's a chroot/shadow dir so the removal would be to prevent a file 
conflict, not directly affect files on the filesystem. However, 
'install-dist.pl' takes care of that so the section isn't  needed anyway.

Thank you for looking into this. :)


On Sat, 05 Aug 2017 07:12:17 -0700, n...@detonation.org wrote:
> The .e there is absolutely correct as depending on the repository
> format version $lookup may be a file or directory. We switched to a
> directory with version 1. So the .f will fail on a current repo
> version which explains the failure in install-core-dist.pl
> 
> The real question is not why $lookup ends up being a directory (that's
> the normal case) but why we don't detect that we are dealing with a
> version 2 repo.
> 
> The PKGBUILD script posted on https://github.com/ugexe/zef/issues/190
> gives the answer to that:
> 
> rm -f "$pkgdir/usr/share/perl6/vendor/version"
> 
> Of course, by deleting that file, you rob rakudo of a vital piece of
> information. Without that it runs on the wrong assumption that it's
> dealing with a version 0 repository and that $lookup must be a file.
> 
> There's really nothing we could or should do here. As much as I'd like
> us to throw a more useful error message here, that's simply not
> possible without slowing down all normal uses. And trying to make
> rakudo resilient against random files missing sounds like an uphill
> battle.
> 
> Please just remove the offending lines from the script. This, too
> looks highly suspicious:
> msg2 'Removing redundant precomp file dependencies...'
>   _precomp=($(pacman -Qqg perl6 | grep -v zef | pacman -Qql - | grep
> -E 'dist|precomp' || true))
>   for _pc in "${_precomp[@]}"; do
> [[ -f "$pkgdir/$_pc" ]] && rm -f "$pkgdir/$_pc"
>   done
> 
> Considering that the spec file for openSUSE does not delete anything,
> I suggest starting with an absolute minimum of a build script. The
> install-dist.pl call may be quite sufficient. openSUSE does have quite
> strict packaging guidelines, too.
> https://build.opensuse.org/package/view_file/devel:languages:perl6/perl6-
> Inline-Perl5/perl6-Inline-Perl5.spec?expand=1


Re: another one liner

2017-08-07 Thread Bruce Gray

> On Aug 4, 2017, at 9:12 PM, ToddAndMargo  wrote:
> 
> Hi All,
> 
> How would you convert this one liner over to a Perl 6 one
> liner with a pipe?
> 
> ifconfig | grep flags | awk '{print $1}' | sort | sed -n 2,2p | sed -e 's/://‘
—snip—

First attempt; straight translation:
ifconfig | perl6 -e 'say lines().grep({/flags/}).map({.words.[0].subst(/":"$/, 
"")}).sort.[1]'

P6-ish version:
ifconfig | perl6 -e 'say lines.map({ ~$0 if /^(\S+) ": flags="/ }).sort[1]'

— 
Hope this helps,
Bruce Gray (Util of PerlMonks)


[perl #131676] doing a role fails to find inherited methods in some cases

2017-08-07 Thread Zoffix Znet via RT
On Thu, 29 Jun 2017 03:46:02 -0700, c...@zoffix.com wrote:
> Mu provides iterator method, but when you mix in a role that wants it
> implemented, it doesn't find it:
> 
> m: role Meow { method iterator {…} }; class Bar does Meow {}
> camelia rakudo-moar 2a8d1e: OUTPUT: «5===SORRY!5=== Error while
> compiling ␤Method 'iterator' must be implemented by Bar because
> it is required by roles: Meow.␤at :1␤»
> 
> Yet it all works fine if you are also doing `is SomethingUnrelated`:
> 
> m: class Foo { method x {} }; role Meow { method iterator {…} }; class
> Bar is Foo does Meow {}
> camelia rakudo-moar 2a8d1e: ( no output )


Another example turned up; fails to notice the method is provided by `handles`:

class HTTP::Header does Associative does Iterable {
subset StrOrArrayOfStr where Str | ( Array & {.all ~~ Str} );

has %!fields of StrOrArrayOfStr
 handles ;

method Str { #`[not shown, for brevity] }
}

This is from https://github.com/perl6/doc/issues/1438


[perl #131676] doing a role fails to find inherited methods in some cases

2017-08-07 Thread Zoffix Znet via RT
On Thu, 29 Jun 2017 03:46:02 -0700, c...@zoffix.com wrote:
> Mu provides iterator method, but when you mix in a role that wants it
> implemented, it doesn't find it:
> 
> m: role Meow { method iterator {…} }; class Bar does Meow {}
> camelia rakudo-moar 2a8d1e: OUTPUT: «5===SORRY!5=== Error while
> compiling ␤Method 'iterator' must be implemented by Bar because
> it is required by roles: Meow.␤at :1␤»
> 
> Yet it all works fine if you are also doing `is SomethingUnrelated`:
> 
> m: class Foo { method x {} }; role Meow { method iterator {…} }; class
> Bar is Foo does Meow {}
> camelia rakudo-moar 2a8d1e: ( no output )


Another example turned up; fails to notice the method is provided by `handles`:

class HTTP::Header does Associative does Iterable {
subset StrOrArrayOfStr where Str | ( Array & {.all ~~ Str} );

has %!fields of StrOrArrayOfStr
 handles ;

method Str { #`[not shown, for brevity] }
}

This is from https://github.com/perl6/doc/issues/1438


Re: [perl #131841] AutoReply: [BUG] In a 'unit module', a 'die' along any CATCH block causes a compiler error

2017-08-07 Thread Darek Cidlinský
It should be added that this bugreport pertains to the version 2017.07:

This is Rakudo version 2017.07 built on MoarVM version 2017.07
implementing Perl 6.c.

D.


[perl #131841] [BUG] In a 'unit module', a 'die' along any CATCH block causes a compiler error

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


A minimal example:
echo 'unit module Foo; die; CATCH { }' > Foo.pm6; perl6 -I.  -MFoo -e ''
That fails with a
===SORRY!===
Cannot invoke this object (REPR: Null; VMNull)

With a --ll-exception switch, it yields
Unhandled exception: concatenate requires a concrete string, but got 
null
   at gen/moar/stage2/NQPCORE.setting:840 (...path...)
   from gen/moar/stage2/NQPHLL.nqp:1735 (...)
   from src/Perl6/Compiler.nqp:42 (...)
(...)

The same happens even if we catch the exception (and probably no matter
what the CATCH block does):
echo 'unit module Foo; die; CATCH { default { .say } }' > Foo.pm6; 
perl6 -I.  -MFoo -e ''
And it happens no matter what the type of the exception is:
echo 'unit module Foo; X::Proc::Unsuccessful.new.throw; CATCH { default 
{ .say } }' > Foo.pm6; perl6 -I.  -MFoo -e ''

On the other hand, if we use 'module Foo { }' or try it in a script,
everything works OK:
perl6 -e 'die; CATCH { }'
echo 'module Foo { die; CATCH { } }' > Foo.pm6; perl6 -I.  -MFoo -e ''

D.  


Re: [perl #131841] AutoReply: [BUG] In a 'unit module', a 'die' along any CATCH block causes a compiler error

2017-08-07 Thread Darek Cidlinsky via RT
It should be added that this bugreport pertains to the version 2017.07:

This is Rakudo version 2017.07 built on MoarVM version 2017.07
implementing Perl 6.c.

D.


Suggestions on Learning Perl 6

2017-08-07 Thread Ari King
Hi,

My background is primarily in JVM languages and python; I've recently
started learning Perl 6. To date, I've mostly used Perl 5 for one-liners or
an odd-script. Consequently, I'm particularly interested in learning about
Perl 6 package and module development (i.e. code organization), ecosystem
(i.e. best practice tooling and modules), and concurrency features.

The perl6.org site provides resources that have helped me begin to learn
Perl 6 syntax fairly easily/quickly. But unfortunately, material on the
aforementioned topics is limited. I'd appreciate suggestions in general on
learning Perl 6, and specifically on resources that address the above.
Thanks.

Best,
Ari


[perl #131853] [LTA] Error when missing `~~` in where clause: This type (QAST::WVal) does not support positional operations

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


17:55   Zoffix  m: subset Fun of Callable where .signature :(Int --> Int); say 
sub {} ~~ Fun
17:55   camelia rakudo-moar 46ef1b: OUTPUT: «===SORRY!===?This type 
(QAST::WVal) does not support positional operations?»

Missing `~~` between .signature and :(Int ...


Re: [perl #131841] AutoReply: [BUG] In a 'unit module', a 'die' along any CATCH block causes a compiler error

2017-08-07 Thread Timo Paulssen via RT
Annoyingly, 2017.07 has a bug that makes every --ll-exception print that
exact error.  Here's what a newer version of rakudo gives you:

> Cannot invoke this object (REPR: Null; VMNull)
>at SETTING::src/core/Exception.pm:57 
> (/home/timo/perl6/install/share/perl6/runtime/CORE.setting.moarvm:throw)
>  from SETTING::src/core/CompUnit/PrecompilationRepository.pm:81 
> (/home/timo/perl6/install/share/perl6/runtime/CORE.setting.moarvm:)
>  from SETTING::src/core/CompUnit/PrecompilationRepository.pm:79 
> (/home/timo/perl6/install/share/perl6/runtime/CORE.setting.moarvm:)
>  from :1 
> (/home/timo/perl6/install/share/perl6/runtime/CORE.setting.moarvm:)
>  from :1 
> (/tmp/.precomp/D9F3CABC797F4C68B8C92AB15C271BDDF8756DF0.1502129121.89224/20/201A6B3053CC1422D2C3670B62616221D2290929:)
>  from SETTING::src/core/Exception.pm:54 
> (/home/timo/perl6/install/share/perl6/runtime/CORE.setting.moarvm:throw)
>  from SETTING::src/core/control.pm:170 
> (/home/timo/perl6/install/share/perl6/runtime/CORE.setting.moarvm:die)
>  from SETTING::src/core/control.pm:166 
> (/home/timo/perl6/install/share/perl6/runtime/CORE.setting.moarvm:die)
>  from /tmp/Foo.pm6 (Foo):1 
> (/tmp/.precomp/D9F3CABC797F4C68B8C92AB15C271BDDF8756DF0.1502129121.89224/20/201A6B3053CC1422D2C3670B62616221D2290929:)
>  from /tmp/Foo.pm6 (Foo):1 
> (/tmp/.precomp/D9F3CABC797F4C68B8C92AB15C271BDDF8756DF0.1502129121.89224/20/201A6B3053CC1422D2C3670B62616221D2290929:)
>  from /tmp/Foo.pm6 (Foo):1 
> (/tmp/.precomp/D9F3CABC797F4C68B8C92AB15C271BDDF8756DF0.1502129121.89224/20/201A6B3053CC1422D2C3670B62616221D2290929:)
>  from :1 
> (/tmp/.precomp/D9F3CABC797F4C68B8C92AB15C271BDDF8756DF0.1502129121.89224/20/201A6B3053CC1422D2C3670B62616221D2290929:)
>  from SETTING::src/core/CompUnit/Loader.pm:50 
> (/home/timo/perl6/install/share/perl6/runtime/CORE.setting.moarvm:load-precompilation-file)
>  from SETTING::src/core/CompUnit/Loader.pm:33 
> (/home/timo/perl6/install/share/perl6/runtime/CORE.setting.moarvm:load-precompilation-file)
>  from SETTING::src/core/CompUnit/PrecompilationRepository.pm:71 
> (/home/timo/perl6/install/share/perl6/runtime/CORE.setting.moarvm:load-handle-for-path)
>  from SETTING::src/core/CompUnit/PrecompilationRepository.pm:195 
> (/home/timo/perl6/install/share/perl6/runtime/CORE.setting.moarvm:)
>  from SETTING::src/core/CompUnit/PrecompilationRepository.pm:191 
> (/home/timo/perl6/install/share/perl6/runtime/CORE.setting.moarvm:load)
>  from SETTING::src/core/CompUnit/PrecompilationRepository.pm:166 
> (/home/timo/perl6/install/share/perl6/runtime/CORE.setting.moarvm:load)
>  from SETTING::src/core/CompUnit/PrecompilationRepository.pm:46 
> (/home/timo/perl6/install/share/perl6/runtime/CORE.setting.moarvm:try-load)
>  from SETTING::src/core/CompUnit/Repository/FileSystem.pm:128 
> (/home/timo/perl6/install/share/perl6/runtime/CORE.setting.moarvm:)
>  from SETTING::src/core/CompUnit/Repository/FileSystem.pm:121 
> (/home/timo/perl6/install/share/perl6/runtime/CORE.setting.moarvm:need)
>  from src/Perl6/World.nqp:1218 
> (/home/timo/perl6/install/share/nqp/lib/Perl6/World.moarvm:load_module)
>  from src/Perl6/World.nqp:1148 
> (/home/timo/perl6/install/share/nqp/lib/Perl6/World.moarvm:do_pragma_or_load_module)
>  from src/Perl6/World.nqp:616 
> (/home/timo/perl6/install/share/nqp/lib/Perl6/World.moarvm:loading_and_symbol_setup)
>  from src/Perl6/Grammar.nqp:1188 
> (/home/timo/perl6/install/share/nqp/lib/Perl6/Grammar.moarvm:comp_unit)
>  from src/Perl6/Grammar.nqp:495 
> (/home/timo/perl6/install/share/nqp/lib/Perl6/Grammar.moarvm:TOP)
>  from gen/moar/stage2/QRegex.nqp:2324 
> (/home/timo/perl6/install/share/nqp/lib/QRegex.moarvm:parse)
>  from gen/moar/stage2/NQPHLL.nqp:1935 
> (/home/timo/perl6/install/share/nqp/lib/NQPHLL.moarvm:parse)
>  from gen/moar/stage2/NQPHLL.nqp:1848 
> (/home/timo/perl6/install/share/nqp/lib/NQPHLL.moarvm:execute_stage)
>  from gen/moar/stage2/NQPHLL.nqp:1884 
> (/home/timo/perl6/install/share/nqp/lib/NQPHLL.moarvm:run)
>  from gen/moar/stage2/NQPHLL.nqp:1887 
> (/home/timo/perl6/install/share/nqp/lib/NQPHLL.moarvm:)
>  from gen/moar/stage2/NQPHLL.nqp:1873 
> (/home/timo/perl6/install/share/nqp/lib/NQPHLL.moarvm:compile)
>  from gen/moar/stage2/NQPHLL.nqp:1588 
> (/home/timo/perl6/install/share/nqp/lib/NQPHLL.moarvm:eval)
>  from gen/moar/stage2/NQPHLL.nqp:1713 
> (/home/timo/perl6/install/share/nqp/lib/NQPHLL.moarvm:)
>  from gen/moar/stage2/NQPHLL.nqp:1753 
> (/home/timo/perl6/install/share/nqp/lib/NQPHLL.moarvm:command_eval)
>  from src/Perl6/Compiler.nqp:42 
> (/home/timo/perl6/install/share/nqp/lib/Perl6/Compiler.moarvm:command_eval)
>  from gen/moar/stage2/NQPHLL.nqp:1694 
> (/home/timo/perl6/install/share/nqp/lib/NQPHLL.moarvm:command_line)
>  from gen/moar/main.nqp:47 
> (/home/timo/perl6/install/share/perl6/runtime/perl6.moarvm:MAIN)
>  from gen/moar/main.nqp:38 
> (/home/timo/perl6/install/share/perl6/runtime/perl6.moarvm:)
>  from :1 
> (/home/timo/perl6/install/share/perl6/runtime/perl6.moarvm

Re: [perl #131841] AutoReply: [BUG] In a 'unit module', a 'die' along any CATCH block causes a compiler error

2017-08-07 Thread Timo Paulssen
Annoyingly, 2017.07 has a bug that makes every --ll-exception print that
exact error.  Here's what a newer version of rakudo gives you:

> Cannot invoke this object (REPR: Null; VMNull)
>at SETTING::src/core/Exception.pm:57 
> (/home/timo/perl6/install/share/perl6/runtime/CORE.setting.moarvm:throw)
>  from SETTING::src/core/CompUnit/PrecompilationRepository.pm:81 
> (/home/timo/perl6/install/share/perl6/runtime/CORE.setting.moarvm:)
>  from SETTING::src/core/CompUnit/PrecompilationRepository.pm:79 
> (/home/timo/perl6/install/share/perl6/runtime/CORE.setting.moarvm:)
>  from :1 
> (/home/timo/perl6/install/share/perl6/runtime/CORE.setting.moarvm:)
>  from :1 
> (/tmp/.precomp/D9F3CABC797F4C68B8C92AB15C271BDDF8756DF0.1502129121.89224/20/201A6B3053CC1422D2C3670B62616221D2290929:)
>  from SETTING::src/core/Exception.pm:54 
> (/home/timo/perl6/install/share/perl6/runtime/CORE.setting.moarvm:throw)
>  from SETTING::src/core/control.pm:170 
> (/home/timo/perl6/install/share/perl6/runtime/CORE.setting.moarvm:die)
>  from SETTING::src/core/control.pm:166 
> (/home/timo/perl6/install/share/perl6/runtime/CORE.setting.moarvm:die)
>  from /tmp/Foo.pm6 (Foo):1 
> (/tmp/.precomp/D9F3CABC797F4C68B8C92AB15C271BDDF8756DF0.1502129121.89224/20/201A6B3053CC1422D2C3670B62616221D2290929:)
>  from /tmp/Foo.pm6 (Foo):1 
> (/tmp/.precomp/D9F3CABC797F4C68B8C92AB15C271BDDF8756DF0.1502129121.89224/20/201A6B3053CC1422D2C3670B62616221D2290929:)
>  from /tmp/Foo.pm6 (Foo):1 
> (/tmp/.precomp/D9F3CABC797F4C68B8C92AB15C271BDDF8756DF0.1502129121.89224/20/201A6B3053CC1422D2C3670B62616221D2290929:)
>  from :1 
> (/tmp/.precomp/D9F3CABC797F4C68B8C92AB15C271BDDF8756DF0.1502129121.89224/20/201A6B3053CC1422D2C3670B62616221D2290929:)
>  from SETTING::src/core/CompUnit/Loader.pm:50 
> (/home/timo/perl6/install/share/perl6/runtime/CORE.setting.moarvm:load-precompilation-file)
>  from SETTING::src/core/CompUnit/Loader.pm:33 
> (/home/timo/perl6/install/share/perl6/runtime/CORE.setting.moarvm:load-precompilation-file)
>  from SETTING::src/core/CompUnit/PrecompilationRepository.pm:71 
> (/home/timo/perl6/install/share/perl6/runtime/CORE.setting.moarvm:load-handle-for-path)
>  from SETTING::src/core/CompUnit/PrecompilationRepository.pm:195 
> (/home/timo/perl6/install/share/perl6/runtime/CORE.setting.moarvm:)
>  from SETTING::src/core/CompUnit/PrecompilationRepository.pm:191 
> (/home/timo/perl6/install/share/perl6/runtime/CORE.setting.moarvm:load)
>  from SETTING::src/core/CompUnit/PrecompilationRepository.pm:166 
> (/home/timo/perl6/install/share/perl6/runtime/CORE.setting.moarvm:load)
>  from SETTING::src/core/CompUnit/PrecompilationRepository.pm:46 
> (/home/timo/perl6/install/share/perl6/runtime/CORE.setting.moarvm:try-load)
>  from SETTING::src/core/CompUnit/Repository/FileSystem.pm:128 
> (/home/timo/perl6/install/share/perl6/runtime/CORE.setting.moarvm:)
>  from SETTING::src/core/CompUnit/Repository/FileSystem.pm:121 
> (/home/timo/perl6/install/share/perl6/runtime/CORE.setting.moarvm:need)
>  from src/Perl6/World.nqp:1218 
> (/home/timo/perl6/install/share/nqp/lib/Perl6/World.moarvm:load_module)
>  from src/Perl6/World.nqp:1148 
> (/home/timo/perl6/install/share/nqp/lib/Perl6/World.moarvm:do_pragma_or_load_module)
>  from src/Perl6/World.nqp:616 
> (/home/timo/perl6/install/share/nqp/lib/Perl6/World.moarvm:loading_and_symbol_setup)
>  from src/Perl6/Grammar.nqp:1188 
> (/home/timo/perl6/install/share/nqp/lib/Perl6/Grammar.moarvm:comp_unit)
>  from src/Perl6/Grammar.nqp:495 
> (/home/timo/perl6/install/share/nqp/lib/Perl6/Grammar.moarvm:TOP)
>  from gen/moar/stage2/QRegex.nqp:2324 
> (/home/timo/perl6/install/share/nqp/lib/QRegex.moarvm:parse)
>  from gen/moar/stage2/NQPHLL.nqp:1935 
> (/home/timo/perl6/install/share/nqp/lib/NQPHLL.moarvm:parse)
>  from gen/moar/stage2/NQPHLL.nqp:1848 
> (/home/timo/perl6/install/share/nqp/lib/NQPHLL.moarvm:execute_stage)
>  from gen/moar/stage2/NQPHLL.nqp:1884 
> (/home/timo/perl6/install/share/nqp/lib/NQPHLL.moarvm:run)
>  from gen/moar/stage2/NQPHLL.nqp:1887 
> (/home/timo/perl6/install/share/nqp/lib/NQPHLL.moarvm:)
>  from gen/moar/stage2/NQPHLL.nqp:1873 
> (/home/timo/perl6/install/share/nqp/lib/NQPHLL.moarvm:compile)
>  from gen/moar/stage2/NQPHLL.nqp:1588 
> (/home/timo/perl6/install/share/nqp/lib/NQPHLL.moarvm:eval)
>  from gen/moar/stage2/NQPHLL.nqp:1713 
> (/home/timo/perl6/install/share/nqp/lib/NQPHLL.moarvm:)
>  from gen/moar/stage2/NQPHLL.nqp:1753 
> (/home/timo/perl6/install/share/nqp/lib/NQPHLL.moarvm:command_eval)
>  from src/Perl6/Compiler.nqp:42 
> (/home/timo/perl6/install/share/nqp/lib/Perl6/Compiler.moarvm:command_eval)
>  from gen/moar/stage2/NQPHLL.nqp:1694 
> (/home/timo/perl6/install/share/nqp/lib/NQPHLL.moarvm:command_line)
>  from gen/moar/main.nqp:47 
> (/home/timo/perl6/install/share/perl6/runtime/perl6.moarvm:MAIN)
>  from gen/moar/main.nqp:38 
> (/home/timo/perl6/install/share/perl6/runtime/perl6.moarvm:)
>  from :1 
> (/home/timo/perl6/install/share/perl6/runtime/perl6.moarvm

Re: Suggestions on Learning Perl 6

2017-08-07 Thread Tom Browder
On Mon, Aug 7, 2017 at 13:39 Ari King  wrote:

> Hi,
>
...

> The perl6.org site provides resources that have helped me begin to learn
> Perl 6 syntax fairly easily/quickly. But unfortunately, material on the
> aforementioned topics is limited. I'd appreciate suggestions in general on
> learning Perl 6, and specifically on resources that address the above.
> Thanks.
>

Have you looked at the several books now available on Perl 6? Check out the
"Resources" tab on "perl6.org" in the lower right-hand side of the page.

I like them all!

Best regards,

-Tom


Re: Suggestions on Learning Perl 6

2017-08-07 Thread Bruce Gray

> On Aug 7, 2017, at 12:39 PM, Ari King  wrote:
—snip--
> I'm particularly interested in learning about Perl 6 package and module 
> development (i.e. code organization), ecosystem (i.e. best practice tooling 
> and modules), and concurrency features. 
—snip—

Concurrency features are under active development, but *well* worth playing 
with.
See “Parallelism, Concurrency, and Asynchrony in Perl 6” by Jonathan 
Worthington:
https://www.youtube.com/watch?v=JpqnNCx7wVY

His slides contain enough detail to play with, if you prefer reading to 
watching:
http://www.jnthn.net/articles.shtml

— 
Hope this helps,
Bruce Gray (Util of PerlMonks)

[perl #131855] Mix.roll doesn't work with fractional weights

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



> Mix( 'a' => 0.3 ).roll

Type check failed in binding; expected Int but got Rat (0.3)
  in block  at  line 1

This worked prior to `Add R:Q.MIX-ROLL, make Mix.roll() about 2.5x as fast`[1]


[1] 
https://github.com/rakudo/rakudo/commit/a2602b9cee60f746b6012c87c146d68cb79b4bed


books for learning Perl 6

2017-08-07 Thread Darren Duncan
As was announced a few days ago, see https://perl6book.com which is a good site 
for outlining what books on learning Perl 6 exist and suggestions on where 
different kinds of users should start based on their needs. -- Darren Duncan


Re: [perl #131855] Mix.roll doesn't work with fractional weights

2017-08-07 Thread Elizabeth Mattijsen via RT
Oops.  Caught by a copy-pasto.  Fixed with a91ad2da854831a7a38c1d , tests 
needed.

> On 7 Aug 2017, at 20:59, Brad Gilbert (via RT)  
> wrote:
> 
> # New Ticket Created by  Brad Gilbert 
> # Please include the string:  [perl #131855]
> # in the subject line of all future correspondence about this issue. 
> # https://rt.perl.org/Ticket/Display.html?id=131855 >
> 
> 
> 
>> Mix( 'a' => 0.3 ).roll
> 
>Type check failed in binding; expected Int but got Rat (0.3)
>  in block  at  line 1
> 
> This worked prior to `Add R:Q.MIX-ROLL, make Mix.roll() about 2.5x as fast`[1]
> 
> 
> [1] 
> https://github.com/rakudo/rakudo/commit/a2602b9cee60f746b6012c87c146d68cb79b4bed


Re: [perl #131855] Mix.roll doesn't work with fractional weights

2017-08-07 Thread Elizabeth Mattijsen
Oops.  Caught by a copy-pasto.  Fixed with a91ad2da854831a7a38c1d , tests 
needed.

> On 7 Aug 2017, at 20:59, Brad Gilbert (via RT)  
> wrote:
> 
> # New Ticket Created by  Brad Gilbert 
> # Please include the string:  [perl #131855]
> # in the subject line of all future correspondence about this issue. 
> # https://rt.perl.org/Ticket/Display.html?id=131855 >
> 
> 
> 
>> Mix( 'a' => 0.3 ).roll
> 
>Type check failed in binding; expected Int but got Rat (0.3)
>  in block  at  line 1
> 
> This worked prior to `Add R:Q.MIX-ROLL, make Mix.roll() about 2.5x as fast`[1]
> 
> 
> [1] 
> https://github.com/rakudo/rakudo/commit/a2602b9cee60f746b6012c87c146d68cb79b4bed


[perl #131856] [@LARRY] Junctions don't junct when routine has a slurpy, leading to inconsistent behaviour with core routines

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


Originally taken from: 
https://stackoverflow.com/questions/45527881/why-does-and-affect-perl-6-junctions-differently

For example, there's a difference between output of using `+` and using `~` 
with a Junction. With `+` you get a junction back, while `~` slurps and just 
.Strs (which .perls) the Junction:

 put any( 1, 3, 7 ) + 1;
 m: put any( 1, 3, 7 ) + 1;
 rakudo-moar a91ad2: OUTPUT: «any(2, 4, 8)␤»
 m: put any(  ) ~ 'amadryas';
 rakudo-moar a91ad2: OUTPUT: «any("h", "H")amadryas␤»

The reason is the `~` has a slurpy candidate, while `+` doesn't:

Junction as just an arg:
 m: sub foo (+@a) { @a.join: '|' }; say foo .any, 'amadryas' 
 rakudo-moar a91ad2: OUTPUT: «any("h", "H")|amadryas␤»
 m: sub foo (*@a) { @a.join: '|' }; say foo .any, 'amadryas' 
 rakudo-moar a91ad2: OUTPUT: «any("h", "H")|amadryas␤»

Junctioned call:
 m: sub foo ($a, $b) { ($a, $b).join: '|' }; say foo .any, 
'amadryas' 
 rakudo-moar a91ad2: OUTPUT: «any(h|amadryas, H|amadryas)␤»

There are two question:
1) Is it possible to make slurpies junct, same as non-Mu scalar candidates?
2) If not, what do we do to make interface consistent; so that all the ops 
do the same thing?


[perl #131857] Aliased named parameters broke in a recent MoarVM commit

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


[22:44]  m: sub foo(:color(:$colour)) { $colour + 1 }; my $s;
for ^100 { $s += foo(:color($_)) }; say $s; say now - INIT now
[22:44] <+camelia> rakudo-moar a91ad2: OUTPUT: «Unexpected named argument
'color' passed␤  in sub foo at  line 1␤  in block  at  line
1␤␤»
[22:44]  bisectable6: sub foo(:color(:$colour)) { $colour + 1
}; my $s; for ^100 { $s += foo(:color($_)) }; say $s;
[22:44] <+bisectable6> MasterDuke, Bisecting by exit code (old=2015.12
new=a91ad2d). Old exit code: 0
[22:44] <+bisectable6> MasterDuke, bisect log:
https://gist.github.com/651d00f77245537de7326c9316f4513e
[22:44] <+bisectable6> MasterDuke, (2017-08-04)
https://github.com/rakudo/rakudo/commit/8bed4a67b44acb6c0e9f057d11a2ab2f0ea5d8cd
[22:45]  haw
[22:45]  c: 2017.07 sub foo(:color(:$colour)) { $colour + 1 };
my $s; for ^100 { $s += foo(:color($_)) }; say $s; say now - INIT now
[22:45] <+committable6> MasterDuke, ¦2017.07: «5050␤1.4953885»