perl.perl6.users http://www.nntp.perl.org/group/perl.perl6.users/ ... Copyright 1998-2017 perl.org Thu, 27 Apr 2017 07:51:03 +0000 ask@perl.org Re: Debugging and Perl6::HookGrammar by Fernando Santagata Thank you, let&#39;s wait for version 2017.05 then :-)<br/><br/>On Wed, Apr 19, 2017 at 11:53 AM, Timo Paulssen &lt;timo@wakelift.de&gt; wrote:<br/><br/>&gt; Sadly, the debugger has bitrotted a little bit. I tried the obvious fix<br/>&gt; which was to replace setlang with define_slang, but that just gets it up<br/>&gt; to the next error, which looks like the behavior of Perl6::Grammar has<br/>&gt; changed and Perl6::HookGrammar hasn&#39;t been updated to match or something.<br/>&gt;<br/>&gt; I&#39;ll push the initial fix to git master today, though, hopefully someone<br/>&gt; will figure it out<br/>&gt;<br/>&gt; HTH<br/>&gt; - Timo<br/>&gt;<br/><br/><br/><br/>-- <br/>Fernando Santagata http://www.nntp.perl.org/group/perl.perl6.users/2017/04/msg3698.html Wed, 19 Apr 2017 10:18:22 +0000 Re: Debugging and Perl6::HookGrammar by Timo Paulssen Sadly, the debugger has bitrotted a little bit. I tried the obvious fix<br/>which was to replace setlang with define_slang, but that just gets it up<br/>to the next error, which looks like the behavior of Perl6::Grammar has<br/>changed and Perl6::HookGrammar hasn&#39;t been updated to match or something.<br/><br/>I&#39;ll push the initial fix to git master today, though, hopefully someone<br/>will figure it out<br/><br/>HTH<br/> - Timo<br/> http://www.nntp.perl.org/group/perl.perl6.users/2017/04/msg3697.html Wed, 19 Apr 2017 09:54:16 +0000 Debugging and Perl6::HookGrammar by Fernando Santagata Hello,<br/><br/>I had a problem with moar-2017.03 and still have it with moar.2017.04: when<br/>I try to run perl6-debug-m, I get this error:<br/><br/>Cannot find method &#39;setlang&#39; on object of type Perl6::HookGrammar<br/> at gen/moar/perl6-debug.nqp:407<br/><br/>I found this:<br/><br/>http://codeverge.com/perl.perl6.users/debugging-and-hookgrammar/2047968<br/><br/>So I tried to install directly from the sources, without using rakudobrew,<br/>but I get the same error.<br/><br/>Any hint?<br/><br/>-- <br/>Fernando Santagata http://www.nntp.perl.org/group/perl.perl6.users/2017/04/msg3696.html Wed, 19 Apr 2017 05:53:55 +0000 Re: dies-ok can return ok on everything dying by Timo Paulssen You will be delighted to learn of the existence of the &quot;throws-like&quot;<br/>subroutine in rakudo&#39;s Test.pm<br/><br/>There&#39;s also lots and lots of examples for its usage (and its power!) in<br/>perl6/roast.<br/><br/>HTH<br/> - Timo<br/> http://www.nntp.perl.org/group/perl.perl6.users/2017/04/msg3695.html Wed, 19 Apr 2017 00:18:22 +0000 Re: Perl6 NCurses module under Arch: libncursesw.so.6 by Mark Carter <br/><br/>On 18/04/17 15:56, Dominique Dumont wrote:<br/>&gt; You should be able to install ncurses 5 on arch:<br/>&gt; https://aur.archlinux.org/packages/ncurses5-compat-libs/<br/>NCurses has changed recently to take into account ncurses 6 so that in <br/>future everything should work out of the box. Fingers crossed.<br/> http://www.nntp.perl.org/group/perl.perl6.users/2017/04/msg3694.html Tue, 18 Apr 2017 16:38:31 +0000 Re: Perl6 NCurses module under Arch: libncursesw.so.6 by Dominique Dumont On Wednesday, 12 April 2017 19:27:25 CEST mark carter wrote:<br/>&gt; I&#39;m running:<br/>&gt; This is Rakudo version 2017.01 built on MoarVM version 2017.01<br/>&gt; implementing Perl 6.c.<br/>&gt; under Arch.<br/>&gt; <br/>&gt; When I do<br/>&gt; $perl6 starfield.pl6<br/>&gt; I get:<br/>&gt; Cannot locate native library &#39;libncursesw.so.5&#39;: libncursesw.so.5:<br/>&gt; cannot open shared object file: No such file or directory<br/>&gt; <br/>&gt; That is because version 6 of the ncurses library is installed, rather<br/>&gt; than 5.<br/><br/>You should be able to install ncurses 5 on arch:<br/><br/>https://aur.archlinux.org/packages/ncurses5-compat-libs/<br/><br/>HTH<br/>-- <br/> https://github.com/dod38fr/ -o- http://search.cpan.org/~ddumont/<br/>http://ddumont.wordpress.com/ -o- irc: dod at irc.debian.org<br/> http://www.nntp.perl.org/group/perl.perl6.users/2017/04/msg3693.html Tue, 18 Apr 2017 14:56:39 +0000 dies-ok can return ok on everything dying by mt1957 Hi,<br/><br/>I&#39;ve encountered a little problem using dies-ok() from the Test module;<br/><br/>The case was that I made an error within the block used as the first <br/>argument to dies-ok. In that particular case the perl6 compiler hurled <br/>an exception and dies-ok accepted it as an ok action which was not ok <br/>because the real test was not performed.<br/><br/>I have reverted to the try/catch methods I used before because I can <br/>then test the<br/>exception object in $_ for its type and message.<br/><br/>Perhaps dies-ok could be extended to do these test for me, testing any <br/>field in the object available. Something like;<br/>dies-ok {... test ... }, &#39;...description...&#39;, :name&lt;...exception object <br/>name...&gt;, :message&lt;...&gt;;<br/><br/>where :name tests the exception object for its name(.^name) and :message <br/>tests the payload of the object by calling the message method when <br/>available. Maybe some other less common methods of the exception object <br/>can be tested this way. The named attributes can be optional to revert <br/>to old behaviour.<br/><br/>The code below can also be found at <br/>https://gist.github.com/MARTIMM/747ccf562b18e42235efe7623673978d<br/><br/>use v6;<br/>use Test;<br/>#------------------------------------------------------------------------------<br/>d-ok( {die &#39;oh oh 0&#39;;}, &#39;oh oh 0&#39;);<br/>d-ok( {die &#39;oh oh 1&#39;;}, &#39;oh oh 1&#39;, :name&lt;X::AdHoc&gt;);<br/>d-ok( {die &#39;oh oh 2&#39;;}, &#39;oh oh 2&#39;, :message&lt;oh oh 2&gt;);<br/>d-ok( {die &#39;oh oh 3&#39;;}, &#39;oh oh 3&#39;, :name&lt;X::AdHoc&gt;, :message&lt;oh oh 3&gt; );<br/>d-ok( {die &#39;oh oh 4&#39;;}, &#39;oh oh 4&#39;, :name&lt;X::AdHoc&gt;, :message(/ &#39;4&#39; $/) );<br/><br/># Dies without knowing that the method Lisp does not exist!<br/>d-ok( {&#39;oh oh 5&#39;.split(&#39;o&#39;).Lisp;}, &#39;oh oh 5&#39;);<br/><br/># When :message or :name is used the result would fail showing a modified description<br/>d-ok( {&#39;oh oh 6&#39;.split(&#39;o&#39;).Lisp;}, &#39;oh oh 6&#39;, :name&lt;X::AdHoc&gt;);<br/><br/># Other examples with mistakes in what the name or messages should be<br/>d-ok( {die &#39;oh oh 7&#39;;}, &#39;oh oh 7&#39;, :name&lt;XX::AdHoc&gt;);<br/>d-ok( {die &#39;oh oh 8&#39;;}, &#39;oh oh 8&#39;, :message&lt;ohhh&gt;);<br/>d-ok( {die &#39;oh oh 9&#39;;}, &#39;oh oh 9&#39;, :name&lt;X::AdHoc&gt;, :message(/ &#39;4&#39; $/) );<br/><br/>#------------------------------------------------------------------------------<br/># alternative dies-ok. Returns a list which must be flattened to be used with (n)ok.<br/># :message can be a string or regex. name and message are optional.<br/>sub d-ok ( Code:D $code, Str $description is copy, Str :$name, :$message ) {<br/><br/> my Bool $dies-ok = False;<br/><br/> try {<br/> $code();<br/><br/> CATCH {<br/> default {<br/> $dies-ok = True;<br/><br/> if ? $name {<br/> $dies-ok = .^name eq $name;<br/> $description = .^name ~ &#39;: &#39; ~ .message unless $dies-ok;<br/> }<br/><br/> if $dies-ok and $message ~~ Str and ? $message {<br/> $dies-ok = .message() eq $message;<br/> $description = .^name ~ &#39;: &#39; ~ .message unless $dies-ok;<br/> }<br/><br/> if $dies-ok and $message ~~ Regex {<br/> $dies-ok = ?(.message() ~~ $message);<br/> $description = .^name ~ &#39;: &#39; ~ .message unless $dies-ok;<br/> }<br/> }<br/> }<br/> }<br/><br/> ok $dies-ok, $description;<br/>}<br/><br/>#------------------------------------------------------------------------------<br/>done-testing;<br/><br/><br/>Giving the following results;<br/><br/>&gt; prove6 -v t/dies-ok.t<br/>t/dies-ok.t ..<br/>ok 1 - oh oh 0<br/>ok 2 - oh oh 1<br/>ok 3 - oh oh 2<br/>ok 4 - oh oh 3<br/>ok 5 - oh oh 4<br/>ok 6 - oh oh 5<br/>not ok 7 - X::Method::NotFound: No such method &#39;Lisp&#39; for invocant of type &#39;Seq&#39;<br/><br/># Failed test &#39;X::Method::NotFound: No such method &#39;Lisp&#39; for invocant of type &#39;Seq&#39;&#39;<br/># at t/100-fromfile.t line 90<br/>not ok 8 - X::AdHoc: oh oh 7<br/><br/># Failed test &#39;X::AdHoc: oh oh 7&#39;<br/># at t/100-fromfile.t line 90<br/>not ok 9 - X::AdHoc: oh oh 8<br/><br/># Failed test &#39;X::AdHoc: oh oh 8&#39;<br/># at t/100-fromfile.t line 90<br/>not ok 10 - X::AdHoc: oh oh 9<br/><br/># Failed test &#39;X::AdHoc: oh oh 9&#39;<br/># at t/100-fromfile.t line 90<br/>1..10<br/># Looks like you failed 4 tests of 10<br/>Dubious, test returned 4 (wstat 1024, 0x400)<br/>Failed 4/10 subtests<br/><br/>Test Summary Report<br/>-------------------<br/>t/dies-ok.t (Wstat: 1024 Tests: 10 Failed: 4)<br/> Failed tests: 7-10<br/> Non-zero exit status: 4<br/>Files=1, Tests=10, 0 wallclock secs ( 0.02 usr 0.00 sys + 0.30 cusr 0.02 csys = 0.34 CPU)<br/>Result: FAIL<br/><br/>The last 4 descriptions are changed by the sub to make it clear that the <br/>exception name and/or message are different. Note that test 6 is <br/>successful even when something different is meant, test 7 shows that the <br/>method was non existent. This could have been a typo which would <br/>otherwise go undetected.<br/><br/>Regards,<br/>Marcel<br/><br/> http://www.nntp.perl.org/group/perl.perl6.users/2017/04/msg3692.html Tue, 18 Apr 2017 14:24:39 +0000 Re: Perl6 NCurses module under Arch: libncursesw.so.6 by Ahmad Zawawi Hi,<br/><br/>Good catch. I fixed it in master by using LibraryCheck and tested it on<br/>Manjaro Linux (which is ArchLinux-based). Please let me know if it works<br/>for you.<br/><br/>Regards,<br/>Ahmad http://www.nntp.perl.org/group/perl.perl6.users/2017/04/msg3691.html Fri, 14 Apr 2017 03:11:52 +0000 Re: Perl6 NCurses module under Arch: libncursesw.so.6 by Brandon Allbery ABI version 6 is not compatible with version 5 (in particular, color<br/>handling changed). It is not safe to just use whatever ncurses happens to<br/>be around.<br/><br/>On Wed, Apr 12, 2017 at 2:27 PM, mark carter &lt;alt.mcarter@gmail.com&gt; wrote:<br/><br/>&gt; I&#39;m running:<br/>&gt; This is Rakudo version 2017.01 built on MoarVM version 2017.01<br/>&gt; implementing Perl 6.c.<br/>&gt; under Arch.<br/>&gt;<br/>&gt; When I do<br/>&gt; $perl6 starfield.pl6<br/>&gt; I get:<br/>&gt; Cannot locate native library &#39;libncursesw.so.5&#39;: libncursesw.so.5: cannot<br/>&gt; open shared object file: No such file or directory<br/>&gt;<br/>&gt; That is because version 6 of the ncurses library is installed, rather than<br/>&gt; 5.<br/>&gt;<br/><br/><br/><br/>-- <br/>brandon s allbery kf8nh sine nomine associates<br/>allbery.b@gmail.com ballbery@sinenomine.net<br/>unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net http://www.nntp.perl.org/group/perl.perl6.users/2017/04/msg3690.html Wed, 12 Apr 2017 18:29:56 +0000 Perl6 NCurses module under Arch: libncursesw.so.6 by mark carter I&#39;m running:<br/>This is Rakudo version 2017.01 built on MoarVM version 2017.01<br/>implementing Perl 6.c.<br/>under Arch.<br/><br/>When I do<br/>$perl6 starfield.pl6<br/>I get:<br/>Cannot locate native library &#39;libncursesw.so.5&#39;: libncursesw.so.5: <br/>cannot open shared object file: No such file or directory<br/><br/>That is because version 6 of the ncurses library is installed, rather <br/>than 5.<br/> http://www.nntp.perl.org/group/perl.perl6.users/2017/04/msg3689.html Wed, 12 Apr 2017 18:27:37 +0000 Smoke testing Perl 6 Modules on Rakudo by Gabor Szabo I wonder if this site is really out of date as the dates at the top indicate?<br/>http://smoke.perl6.org/report<br/><br/>If so, is there working version of this report?<br/><br/>Gabor<br/> http://www.nntp.perl.org/group/perl.perl6.users/2017/04/msg3688.html Sat, 08 Apr 2017 16:24:10 +0000 zef not telling what it is going to test for Uzu by Gabor Szabo As I understand from installing a number of Perl 6 modules using zef,<br/>every time before zef starts testing the module it tells the user what<br/>it is going to test, including its version number.<br/><br/>eg. this:<br/><br/>Testing: Net::DNS:ver(&#39;1.0.1&#39;):auth(&#39;github:retupmoca&#39;)<br/><br/>When I try to install Uzu, howerver I don&#39;t see this line.<br/>I wonder if this is because Uzu us hosted on Gitlab and not on GitHub or<br/>is something missing from the META file of Uzu or something else?<br/><br/>Uzu lives here: https://gitlab.com/samcns/uzu/<br/><br/>The reason I notice this is because of a bug in Uzu that was<br/>(partially?) fixed, but<br/>I still cannot install with zef: https://gitlab.com/samcns/uzu/issues/1<br/>and I am not sure it is even trying to install the latest version or not.<br/><br/>regards<br/> Gabor<br/> http://www.nntp.perl.org/group/perl.perl6.users/2017/04/msg3687.html Sat, 08 Apr 2017 11:41:30 +0000 Re: How to limit the list of imported functions? by ToddAndMargo On 04/07/2017 10:31 PM, Gabor Szabo wrote:<br/>&gt; strict function redeclaration prevention<br/><br/>Cool feature!<br/><br/><br/>Many thanks,<br/>-T<br/><br/><br/>-- <br/>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br/>When we ask for advice, we are usually looking for an accomplice.<br/> -- Charles Varlet de La Grange<br/>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br/> http://www.nntp.perl.org/group/perl.perl6.users/2017/04/msg3686.html Sat, 08 Apr 2017 05:59:05 +0000 Re: How to limit the list of imported functions? by Gabor Szabo That&#39;s indeed a good idea for documentation purposes and with the strict <br/>function redeclaration <br/>prevention of Perl 6 it might be sufficient as well. <br/> <br/>regards <br/> Gabor <br/> <br/>On Sat, Apr 8, 2017 at 2:27 AM, ToddAndMargo &lt;ToddAndMargo@zoho.com&gt; wrote: <br/> <br/>&gt; On 04/07/2017 07:21 AM, Gabor Szabo wrote: <br/>&gt; <br/>&gt;&gt; In perl 5 we can limit which functions are imported by listing them <br/>&gt;&gt; after the name of the module: <br/>&gt;&gt; <br/>&gt;&gt; use Module (&#39;foo&#39;, &#39;bar&#39;); <br/>&gt;&gt; <br/>&gt;&gt; When I try the same in Rakudo I get <br/>&gt;&gt; <br/>&gt;&gt; &quot;no EXPORT sub, but you provided positional argument in the &#39;use&#39; <br/>&gt;&gt; statement&quot; <br/>&gt;&gt; <br/>&gt;&gt; <br/>&gt;&gt; At least in this case: <br/>&gt;&gt; <br/>&gt;&gt; use WWW::Google::Time &#39;google-time-in&#39;; <br/>&gt;&gt; <br/>&gt;&gt; ===SORRY!=== Error while compiling /opt/google_time.pl <br/>&gt;&gt; Error while importing from &#39;WWW::Google::Time&#39;: <br/>&gt;&gt; no EXPORT sub, but you provided positional argument in the &#39;use&#39; statement <br/>&gt;&gt; at /opt/google_time.pl:2 <br/>&gt;&gt; ------&gt; use WWW::Google::Time &#39;google-time-in&#39;&#x23CF;; <br/>&gt;&gt; <br/>&gt;&gt; Using Rakudo Star 2017.01 <br/>&gt;&gt; <br/>&gt;&gt; regards <br/>&gt;&gt; Gabor <br/>&gt;&gt; <br/>&gt;&gt; <br/>&gt; <br/>&gt; Hi Gabor, <br/>&gt; <br/>&gt; They are working on it. <br/>&gt; <br/>&gt; I like this feature too, not to minimize my code, <br/>&gt; but to figure out where things come from for <br/>&gt; maintainability. <br/>&gt; <br/>&gt; Whist we wait, this is what do, so I can figure out <br/>&gt; where things are coming from: <br/>&gt; <br/>&gt; use File::Which; # qw[ which whence ]; <br/>&gt; use X11Clipboard; #`{ qw[ WritePrimaryClipboard, <br/>&gt; WriteSecondaryClipboard, <br/>&gt; ReadPrimaryClipboard, ReadSecondaryClipboard ]; } <br/>&gt; <br/>&gt; HTH, <br/>&gt; -T <br/>&gt; <br/>&gt; <br/>&gt; <br/>&gt; -- <br/>&gt; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ <br/>&gt; Computers are like air conditioners. <br/>&gt; They malfunction when you open windows <br/>&gt; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ <br/>&gt; http://www.nntp.perl.org/group/perl.perl6.users/2017/04/msg3685.html Sat, 08 Apr 2017 05:32:08 +0000 Re: How to limit the list of imported functions? by ToddAndMargo On 04/07/2017 07:21 AM, Gabor Szabo wrote:<br/>&gt; In perl 5 we can limit which functions are imported by listing them<br/>&gt; after the name of the module:<br/>&gt;<br/>&gt; use Module (&#39;foo&#39;, &#39;bar&#39;);<br/>&gt;<br/>&gt; When I try the same in Rakudo I get<br/>&gt;<br/>&gt; &quot;no EXPORT sub, but you provided positional argument in the &#39;use&#39; statement&quot;<br/>&gt;<br/>&gt;<br/>&gt; At least in this case:<br/>&gt;<br/>&gt; use WWW::Google::Time &#39;google-time-in&#39;;<br/>&gt;<br/>&gt; ===SORRY!=== Error while compiling /opt/google_time.pl<br/>&gt; Error while importing from &#39;WWW::Google::Time&#39;:<br/>&gt; no EXPORT sub, but you provided positional argument in the &#39;use&#39; statement<br/>&gt; at /opt/google_time.pl:2<br/>&gt; ------&gt; use WWW::Google::Time &#39;google-time-in&#39;&#x23CF;;<br/>&gt;<br/>&gt; Using Rakudo Star 2017.01<br/>&gt;<br/>&gt; regards<br/>&gt; Gabor<br/>&gt;<br/><br/><br/>Hi Gabor,<br/><br/>They are working on it.<br/><br/>I like this feature too, not to minimize my code,<br/>but to figure out where things come from for<br/>maintainability.<br/><br/>Whist we wait, this is what do, so I can figure out<br/>where things are coming from:<br/><br/>use File::Which; # qw[ which whence ];<br/>use X11Clipboard; #`{ qw[ WritePrimaryClipboard,<br/> WriteSecondaryClipboard,<br/> ReadPrimaryClipboard, ReadSecondaryClipboard ]; }<br/><br/>HTH,<br/>-T<br/><br/><br/><br/>-- <br/>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br/>Computers are like air conditioners.<br/>They malfunction when you open windows<br/>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br/> http://www.nntp.perl.org/group/perl.perl6.users/2017/04/msg3684.html Fri, 07 Apr 2017 23:28:08 +0000 Re: How to limit the list of imported functions? by Gabor Szabo thanks! <br/> <br/>On Fri, Apr 7, 2017 at 6:04 PM, Elizabeth Mattijsen &lt;liz@dijkmat.nl&gt; wrote: <br/>&gt; https://docs.perl6.org/syntax/need <br/>&gt; <br/>&gt;&gt; On 7 Apr 2017, at 16:59, Gabor Szabo &lt;szabgab@gmail.com&gt; wrote: <br/>&gt;&gt; <br/>&gt;&gt; Thanks. I was only looking at https://docs.perl6.org/syntax/use <br/>&gt;&gt; <br/>&gt;&gt; Looking at that doc you linked to, I have a related quest I could not see: <br/>&gt;&gt; <br/>&gt;&gt; Is there a way to tell Rakudo to not to import any function from the module? <br/>&gt;&gt; <br/>&gt;&gt; Gabor <br/>&gt;&gt; <br/>&gt;&gt; <br/>&gt;&gt; On Fri, Apr 7, 2017 at 5:37 PM, Will Coleda &lt;will@coleda.com&gt; wrote: <br/>&gt;&gt;&gt; Please check the docs at <br/>&gt;&gt;&gt; https://docs.perl6.org/language/modules#Exporting_and_Selective_Importing <br/>&gt;&gt;&gt; <br/>&gt;&gt;&gt; On Fri, Apr 7, 2017 at 10:21 AM, Gabor Szabo &lt;szabgab@gmail.com&gt; wrote: <br/>&gt;&gt;&gt;&gt; In perl 5 we can limit which functions are imported by listing them <br/>&gt;&gt;&gt;&gt; after the name of the module: <br/>&gt;&gt;&gt;&gt; <br/>&gt;&gt;&gt;&gt; use Module (&#39;foo&#39;, &#39;bar&#39;); <br/>&gt;&gt;&gt;&gt; <br/>&gt;&gt;&gt;&gt; When I try the same in Rakudo I get <br/>&gt;&gt;&gt;&gt; <br/>&gt;&gt;&gt;&gt; &quot;no EXPORT sub, but you provided positional argument in the &#39;use&#39; statement&quot; <br/>&gt;&gt;&gt;&gt; <br/>&gt;&gt;&gt;&gt; <br/>&gt;&gt;&gt;&gt; At least in this case: <br/>&gt;&gt;&gt;&gt; <br/>&gt;&gt;&gt;&gt; use WWW::Google::Time &#39;google-time-in&#39;; <br/>&gt;&gt;&gt;&gt; <br/>&gt;&gt;&gt;&gt; ===SORRY!=== Error while compiling /opt/google_time.pl <br/>&gt;&gt;&gt;&gt; Error while importing from &#39;WWW::Google::Time&#39;: <br/>&gt;&gt;&gt;&gt; no EXPORT sub, but you provided positional argument in the &#39;use&#39; statement <br/>&gt;&gt;&gt;&gt; at /opt/google_time.pl:2 <br/>&gt;&gt;&gt;&gt; ------&gt; use WWW::Google::Time &#39;google-time-in&#39;&#x23CF;; <br/>&gt;&gt;&gt;&gt; <br/>&gt;&gt;&gt;&gt; Using Rakudo Star 2017.01 <br/>&gt;&gt;&gt;&gt; <br/>&gt;&gt;&gt;&gt; regards <br/>&gt;&gt;&gt;&gt; Gabor <br/>&gt;&gt;&gt; <br/>&gt;&gt;&gt; <br/>&gt;&gt;&gt; <br/>&gt;&gt;&gt; -- <br/>&gt;&gt;&gt; Will &quot;Coke&quot; Coleda <br/> http://www.nntp.perl.org/group/perl.perl6.users/2017/04/msg3683.html Fri, 07 Apr 2017 15:10:44 +0000 Re: How to limit the list of imported functions? by Elizabeth Mattijsen https://docs.perl6.org/syntax/need <br/> <br/>&gt; On 7 Apr 2017, at 16:59, Gabor Szabo &lt;szabgab@gmail.com&gt; wrote: <br/>&gt; <br/>&gt; Thanks. I was only looking at https://docs.perl6.org/syntax/use <br/>&gt; <br/>&gt; Looking at that doc you linked to, I have a related quest I could not see: <br/>&gt; <br/>&gt; Is there a way to tell Rakudo to not to import any function from the module? <br/>&gt; <br/>&gt; Gabor <br/>&gt; <br/>&gt; <br/>&gt; On Fri, Apr 7, 2017 at 5:37 PM, Will Coleda &lt;will@coleda.com&gt; wrote: <br/>&gt;&gt; Please check the docs at <br/>&gt;&gt; https://docs.perl6.org/language/modules#Exporting_and_Selective_Importing <br/>&gt;&gt; <br/>&gt;&gt; On Fri, Apr 7, 2017 at 10:21 AM, Gabor Szabo &lt;szabgab@gmail.com&gt; wrote: <br/>&gt;&gt;&gt; In perl 5 we can limit which functions are imported by listing them <br/>&gt;&gt;&gt; after the name of the module: <br/>&gt;&gt;&gt; <br/>&gt;&gt;&gt; use Module (&#39;foo&#39;, &#39;bar&#39;); <br/>&gt;&gt;&gt; <br/>&gt;&gt;&gt; When I try the same in Rakudo I get <br/>&gt;&gt;&gt; <br/>&gt;&gt;&gt; &quot;no EXPORT sub, but you provided positional argument in the &#39;use&#39; statement&quot; <br/>&gt;&gt;&gt; <br/>&gt;&gt;&gt; <br/>&gt;&gt;&gt; At least in this case: <br/>&gt;&gt;&gt; <br/>&gt;&gt;&gt; use WWW::Google::Time &#39;google-time-in&#39;; <br/>&gt;&gt;&gt; <br/>&gt;&gt;&gt; ===SORRY!=== Error while compiling /opt/google_time.pl <br/>&gt;&gt;&gt; Error while importing from &#39;WWW::Google::Time&#39;: <br/>&gt;&gt;&gt; no EXPORT sub, but you provided positional argument in the &#39;use&#39; statement <br/>&gt;&gt;&gt; at /opt/google_time.pl:2 <br/>&gt;&gt;&gt; ------&gt; use WWW::Google::Time &#39;google-time-in&#39;&#x23CF;; <br/>&gt;&gt;&gt; <br/>&gt;&gt;&gt; Using Rakudo Star 2017.01 <br/>&gt;&gt;&gt; <br/>&gt;&gt;&gt; regards <br/>&gt;&gt;&gt; Gabor <br/>&gt;&gt; <br/>&gt;&gt; <br/>&gt;&gt; <br/>&gt;&gt; -- <br/>&gt;&gt; Will &quot;Coke&quot; Coleda <br/> http://www.nntp.perl.org/group/perl.perl6.users/2017/04/msg3682.html Fri, 07 Apr 2017 15:04:31 +0000 Re: How to limit the list of imported functions? by Gabor Szabo Thanks. I was only looking at https://docs.perl6.org/syntax/use <br/> <br/>Looking at that doc you linked to, I have a related quest I could not see: <br/> <br/>Is there a way to tell Rakudo to not to import any function from the module? <br/> <br/>Gabor <br/> <br/> <br/>On Fri, Apr 7, 2017 at 5:37 PM, Will Coleda &lt;will@coleda.com&gt; wrote: <br/>&gt; Please check the docs at <br/>&gt; https://docs.perl6.org/language/modules#Exporting_and_Selective_Importing <br/>&gt; <br/>&gt; On Fri, Apr 7, 2017 at 10:21 AM, Gabor Szabo &lt;szabgab@gmail.com&gt; wrote: <br/>&gt;&gt; In perl 5 we can limit which functions are imported by listing them <br/>&gt;&gt; after the name of the module: <br/>&gt;&gt; <br/>&gt;&gt; use Module (&#39;foo&#39;, &#39;bar&#39;); <br/>&gt;&gt; <br/>&gt;&gt; When I try the same in Rakudo I get <br/>&gt;&gt; <br/>&gt;&gt; &quot;no EXPORT sub, but you provided positional argument in the &#39;use&#39; statement&quot; <br/>&gt;&gt; <br/>&gt;&gt; <br/>&gt;&gt; At least in this case: <br/>&gt;&gt; <br/>&gt;&gt; use WWW::Google::Time &#39;google-time-in&#39;; <br/>&gt;&gt; <br/>&gt;&gt; ===SORRY!=== Error while compiling /opt/google_time.pl <br/>&gt;&gt; Error while importing from &#39;WWW::Google::Time&#39;: <br/>&gt;&gt; no EXPORT sub, but you provided positional argument in the &#39;use&#39; statement <br/>&gt;&gt; at /opt/google_time.pl:2 <br/>&gt;&gt; ------&gt; use WWW::Google::Time &#39;google-time-in&#39;&#x23CF;; <br/>&gt;&gt; <br/>&gt;&gt; Using Rakudo Star 2017.01 <br/>&gt;&gt; <br/>&gt;&gt; regards <br/>&gt;&gt; Gabor <br/>&gt; <br/>&gt; <br/>&gt; <br/>&gt; -- <br/>&gt; Will &quot;Coke&quot; Coleda <br/> http://www.nntp.perl.org/group/perl.perl6.users/2017/04/msg3681.html Fri, 07 Apr 2017 14:59:42 +0000 Re: How to limit the list of imported functions? by Will Coleda Please check the docs at <br/>https://docs.perl6.org/language/modules#Exporting_and_Selective_Importing <br/> <br/>On Fri, Apr 7, 2017 at 10:21 AM, Gabor Szabo &lt;szabgab@gmail.com&gt; wrote: <br/>&gt; In perl 5 we can limit which functions are imported by listing them <br/>&gt; after the name of the module: <br/>&gt; <br/>&gt; use Module (&#39;foo&#39;, &#39;bar&#39;); <br/>&gt; <br/>&gt; When I try the same in Rakudo I get <br/>&gt; <br/>&gt; &quot;no EXPORT sub, but you provided positional argument in the &#39;use&#39; statement&quot; <br/>&gt; <br/>&gt; <br/>&gt; At least in this case: <br/>&gt; <br/>&gt; use WWW::Google::Time &#39;google-time-in&#39;; <br/>&gt; <br/>&gt; ===SORRY!=== Error while compiling /opt/google_time.pl <br/>&gt; Error while importing from &#39;WWW::Google::Time&#39;: <br/>&gt; no EXPORT sub, but you provided positional argument in the &#39;use&#39; statement <br/>&gt; at /opt/google_time.pl:2 <br/>&gt; ------&gt; use WWW::Google::Time &#39;google-time-in&#39;&#x23CF;; <br/>&gt; <br/>&gt; Using Rakudo Star 2017.01 <br/>&gt; <br/>&gt; regards <br/>&gt; Gabor <br/> <br/> <br/> <br/>-- <br/>Will &quot;Coke&quot; Coleda <br/> http://www.nntp.perl.org/group/perl.perl6.users/2017/04/msg3680.html Fri, 07 Apr 2017 14:37:53 +0000 How to limit the list of imported functions? by Gabor Szabo In perl 5 we can limit which functions are imported by listing them <br/>after the name of the module: <br/> <br/>use Module (&#39;foo&#39;, &#39;bar&#39;); <br/> <br/>When I try the same in Rakudo I get <br/> <br/>&quot;no EXPORT sub, but you provided positional argument in the &#39;use&#39; statement&quot; <br/> <br/> <br/>At least in this case: <br/> <br/>use WWW::Google::Time &#39;google-time-in&#39;; <br/> <br/>===SORRY!=== Error while compiling /opt/google_time.pl <br/>Error while importing from &#39;WWW::Google::Time&#39;: <br/>no EXPORT sub, but you provided positional argument in the &#39;use&#39; statement <br/>at /opt/google_time.pl:2 <br/>------&gt; use WWW::Google::Time &#39;google-time-in&#39;&#x23CF;; <br/> <br/>Using Rakudo Star 2017.01 <br/> <br/>regards <br/> Gabor <br/> http://www.nntp.perl.org/group/perl.perl6.users/2017/04/msg3679.html Fri, 07 Apr 2017 14:21:13 +0000 Re: Associative collection with automatic keys? by Luca Ferrari On Tue, Apr 4, 2017 at 11:31 AM, Trey Ethan Harris &lt;treyharris@gmail.com&gt; wrote:<br/>&gt; (I can use classify-list to do this ad-hoc, or even just do a simple map as<br/>&gt; I might in Perl 5, but I&#39;m thinking of each key&#39;s relationship to and<br/>&gt; extraction from its value as being a feature of the collection, not of the<br/>&gt; way I construct it.)<br/><br/>Uhm...not clear to me the aim, but sounds like you want to index<br/>differently objects depending on the type of the collection you are<br/>using.<br/>If this is the case, and the adoption of the suggested .WHICH is<br/>therefore not appropriate, you must have a way to map-and-sort your<br/>objects using different attributes. I don&#39;t see a very elegant way to<br/>achieve this without having to build an ad-hoc container...<br/>Otherwise, the .WHICH is what you are looking for.<br/><br/>Luca<br/> http://www.nntp.perl.org/group/perl.perl6.users/2017/04/msg3678.html Wed, 05 Apr 2017 08:40:54 +0000 Re: Associative collection with automatic keys? by The Holy Ghost On Wed, Apr 05, 2017 at 01:33:58AM +0200, Elizabeth Mattijsen wrote:<br/>&gt; &gt; On 4 Apr 2017, at 11:31, Trey Ethan Harris &lt;treyharris@gmail.com&gt; wrote:<br/>&gt; &gt; <br/>&gt; &gt; I&#39;m thinking of a Hash-like collection where I can add objects using a index-less append operation, but then have random access to the elements based on a key provided by the object. (For instance, imagine a ProcessTable, where I create the collection telling it to index by the .pid method, add each process to %table in serial without mentioning pid, and then look up the one referring to the interpreter with %table{$*PID}.)<br/>&gt; <br/>&gt; This is basically the approach that object hashes take internally. So, feels to me you just need object hashes?<br/>&gt; <br/>&gt; https://docs.perl6.org/type/Hash#index-entry-object_hash<br/>&gt; <br/>&gt; Objects are internally keyed to the result of the .WHICH method on that object. If you create a class, one will be provided for you automatically. But there&rsquo;s nothing preventing you from making your own .WHICH method, as long as the result is consistent for a given object and the same for all objects you think should be considered identical, you should be fine.<br/><br/>I didn&#39;t know this but in OO land one would use a functorfactory<br/>to produce hash functions or transformation functions on objects (some sort<br/>of apply gain.)<br/><br/>holly<br/> http://www.nntp.perl.org/group/perl.perl6.users/2017/04/msg3677.html Wed, 05 Apr 2017 03:24:17 +0000 Re: Associative collection with automatic keys? by Elizabeth Mattijsen &gt; On 4 Apr 2017, at 11:31, Trey Ethan Harris &lt;treyharris@gmail.com&gt; wrote: <br/>&gt; <br/>&gt; I&#39;m thinking of a Hash-like collection where I can add objects using a index-less append operation, but then have random access to the elements based on a key provided by the object. (For instance, imagine a ProcessTable, where I create the collection telling it to index by the .pid method, add each process to %table in serial without mentioning pid, and then look up the one referring to the interpreter with %table{$*PID}.) <br/> <br/>This is basically the approach that object hashes take internally. So, feels to me you just need object hashes? <br/> <br/> https://docs.perl6.org/type/Hash#index-entry-object_hash <br/> <br/>Objects are internally keyed to the result of the .WHICH method on that object. If you create a class, one will be provided for you automatically. But there&rsquo;s nothing preventing you from making your own .WHICH method, as long as the result is consistent for a given object and the same for all objects you think should be considered identical, you should be fine. <br/> <br/> <br/>&gt; I really thought this was in Perl 6, but I can&#39;t find it in the docs, so maybe I&#39;m thinking of another language. (I think both Ruby and Python have adverbial-like options to do things like this with dictionaries, so maybe that&#39;s what I&#39;m thinking of.) Or maybe it&#39;s a simple tweak to an existing collection, or just something I need to implement in my element objects.... <br/> <br/>If this is not what you&rsquo;re looking for, perhaps you can elaborate a bit more, with some code examples? <br/> <br/> <br/> <br/>Liz http://www.nntp.perl.org/group/perl.perl6.users/2017/04/msg3676.html Tue, 04 Apr 2017 23:34:09 +0000 Associative collection with automatic keys? by Trey Ethan Harris I&#39;m thinking of a Hash-like collection where I can add objects using a<br/>index-less append operation, but then have random access to the elements<br/>based on a key provided by the object. (For instance, imagine a<br/>ProcessTable, where I create the collection telling it to index by the .pid<br/>method, add each process to %table in serial without mentioning pid, and<br/>then look up the one referring to the interpreter with %table{$*PID}.)<br/><br/>I really thought this was in Perl 6, but I can&#39;t find it in the docs, so<br/>maybe I&#39;m thinking of another language. (I think both Ruby and Python have<br/>adverbial-like options to do things like this with dictionaries, so maybe<br/>that&#39;s what I&#39;m thinking of.) Or maybe it&#39;s a simple tweak to an existing<br/>collection, or just something I need to implement in my element objects....<br/><br/>(I can use classify-list to do this ad-hoc, or even just do a simple map as<br/>I might in Perl 5, but I&#39;m thinking of each key&#39;s relationship to and<br/>extraction from its value as being a feature of the collection, not of the<br/>way I construct it.)<br/><br/>Trey http://www.nntp.perl.org/group/perl.perl6.users/2017/04/msg3675.html Tue, 04 Apr 2017 23:17:50 +0000 Re: #!/usr/bin/perl6 by ToddAndMargo On 04/01/2017 03:05 PM, Brandon Allbery wrote:<br/>&gt; On Sat, Apr 1, 2017 at 6:01 PM, ToddAndMargo &lt;ToddAndMargo@zoho.com<br/>&gt; &lt;mailto:ToddAndMargo@zoho.com&gt;&gt; wrote:<br/>&gt;<br/>&gt; On 04/01/2017 03:52 AM, Francis (Grizzly) Smit wrote:<br/>&gt;<br/>&gt; #!/usr/bin/env perl6<br/>&gt;<br/>&gt; is probably better let /usr/bin/env find the path to perl6<br/>&gt;<br/>&gt;<br/>&gt; What do you mean?<br/>&gt;<br/>&gt;<br/>&gt; `env` does a $PATH search, and usually is in /usr/bin so it&#39;s slightly<br/>&gt; more portable than hardcoding a path to perl6 that might not be valid.<br/>&gt; (#! requires a full path to an existing binary.)<br/><br/>So, if I can do a `perl6 -v`, the `env` will find the guy. :-)<br/> http://www.nntp.perl.org/group/perl.perl6.users/2017/04/msg3674.html Sat, 01 Apr 2017 22:07:26 +0000 Re: #!/usr/bin/perl6 by Brandon Allbery On Sat, Apr 1, 2017 at 6:01 PM, ToddAndMargo &lt;ToddAndMargo@zoho.com&gt; wrote:<br/><br/>&gt; On 04/01/2017 03:52 AM, Francis (Grizzly) Smit wrote:<br/>&gt;<br/>&gt;&gt; #!/usr/bin/env perl6<br/>&gt;&gt;<br/>&gt;&gt; is probably better let /usr/bin/env find the path to perl6<br/>&gt;&gt;<br/>&gt;<br/>&gt; What do you mean?<br/>&gt;<br/><br/>`env` does a $PATH search, and usually is in /usr/bin so it&#39;s slightly more<br/>portable than hardcoding a path to perl6 that might not be valid. (#!<br/>requires a full path to an existing binary.)<br/><br/>-- <br/>brandon s allbery kf8nh sine nomine associates<br/>allbery.b@gmail.com ballbery@sinenomine.net<br/>unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net http://www.nntp.perl.org/group/perl.perl6.users/2017/04/msg3673.html Sat, 01 Apr 2017 22:05:33 +0000 Re: #!/usr/bin/perl6 by ToddAndMargo On 04/01/2017 03:01 PM, ToddAndMargo wrote:<br/>&gt; On 04/01/2017 03:52 AM, Francis (Grizzly) Smit wrote:<br/>&gt;&gt; #!/usr/bin/env perl6<br/>&gt;&gt;<br/>&gt;&gt; is probably better let /usr/bin/env find the path to perl6<br/>&gt;<br/>&gt; What do you mean?<br/><br/>Never mind. Figured it out. :-)<br/><br/>-- <br/>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br/>Computers are like air conditioners.<br/>They malfunction when you open windows<br/>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br/> http://www.nntp.perl.org/group/perl.perl6.users/2017/04/msg3672.html Sat, 01 Apr 2017 22:05:32 +0000 Re: #!/usr/bin/perl6 by ToddAndMargo On 04/01/2017 03:58 AM, Tom Browder wrote:<br/>&gt;<br/>&gt; On Sat, Apr 1, 2017 at 01:16 ToddAndMargo &lt;ToddAndMargo@zoho.com<br/>&gt; &lt;mailto:ToddAndMargo@zoho.com&gt;&gt; wrote:<br/>&gt;<br/>&gt; Hi All,<br/>&gt; and all my Linux Perl6 programs start with<br/>&gt; #!/usr/bin/perl6<br/>&gt;<br/>&gt;<br/>&gt; Modern practice for most Linux practicitioners I think is to use this<br/>&gt; shebang line:<br/>&gt;<br/>&gt; #!/usr/bin/env perl6<br/>&gt;<br/>&gt; That way the script, providing the script is marked executable, will<br/>&gt; find perl6 iif it is in your path.<br/>&gt;<br/>&gt; Best regards,<br/>&gt;<br/>&gt; -Tom<br/><br/><br/>Thank you!<br/> http://www.nntp.perl.org/group/perl.perl6.users/2017/04/msg3671.html Sat, 01 Apr 2017 22:03:27 +0000 Re: #!/usr/bin/perl6 by ToddAndMargo On 04/01/2017 03:52 AM, Francis (Grizzly) Smit wrote:<br/>&gt; #!/usr/bin/env perl6<br/>&gt;<br/>&gt; is probably better let /usr/bin/env find the path to perl6<br/><br/>What do you mean?<br/> http://www.nntp.perl.org/group/perl.perl6.users/2017/04/msg3670.html Sat, 01 Apr 2017 22:03:03 +0000 Re: #!/usr/bin/perl6 by Tom Browder On Sat, Apr 1, 2017 at 01:16 ToddAndMargo &lt;ToddAndMargo@zoho.com&gt; wrote:<br/><br/>&gt; Hi All,<br/>&gt; and all my Linux Perl6 programs start with<br/>&gt; #!/usr/bin/perl6<br/>&gt;<br/><br/>Modern practice for most Linux practicitioners I think is to use this<br/>shebang line:<br/><br/> #!/usr/bin/env perl6<br/><br/>That way the script, providing the script is marked executable, will find<br/>perl6 iif it is in your path.<br/><br/>Best regards,<br/><br/>-Tom http://www.nntp.perl.org/group/perl.perl6.users/2017/04/msg3669.html Sat, 01 Apr 2017 10:58:42 +0000 Re: #!/usr/bin/perl6 by Francis Smit #!/usr/bin/env perl6<br/><br/>is probably better let /usr/bin/env find the path to perl6<br/><br/><br/>On 01/04/17 17:16, ToddAndMargo wrote:<br/>&gt; Hi All,<br/>&gt;<br/>&gt; Scientific Linux 7.3 (RHEL clone)<br/>&gt;<br/>&gt; I just came out of a panic with EPEL and their release update<br/>&gt; of Rakudo. Hosed the hole thing. Total mess.<br/>&gt;<br/>&gt; Anyway, thanks to the guys at the IRC channel, after a lot<br/>&gt; of uninstalling and erasing, I am now on<br/>&gt;<br/>&gt; https://github.com/nxadm/rakudo-pkg/releases<br/>&gt;<br/>&gt;<br/>&gt; https://github.com/nxadm/rakudo-pkg/releases/download/2017.03_02/perl6-rakudo-moarvm-CentOS7.3.1611-20170300-02.x86_64.rpm <br/>&gt;<br/>&gt;<br/>&gt; Problem, EPEL and `nxadm` put `perl6` in different places:<br/>&gt; EPEL: /usr/bin/perl6<br/>&gt; nxadm: /opt/rakudo/bin/perl6<br/>&gt;<br/>&gt; and all my Linux Perl6 programs start with<br/>&gt; #!/usr/bin/perl6<br/>&gt;<br/>&gt; The following cured the issue<br/>&gt; # ln -s /opt/rakudo/bin/perl6 /usr/bin/perl6<br/>&gt;<br/>&gt; I reported the issue over on<br/>&gt; https://github.com/nxadm/rakudo-pkg/issues/9<br/>&gt;<br/>&gt; Therefore, I would like best practice advice:<br/>&gt;<br/>&gt; If various releases of Linux&#39;s rakudo are going to install in<br/>&gt; different places and I want Linux cross machine compatibility,<br/>&gt; is it best to leave the `#!/usr/bin/perl6`off and run everything<br/>&gt; the hard way with `perl6 xxx.pl6` and remove the bash first<br/>&gt; line path?<br/>&gt;<br/>&gt; I don&#39;t suppose there is a way to dual path the first line?<br/>&gt;<br/>&gt; Your thoughts on the issue?<br/>&gt;<br/>&gt; Many thanks,<br/>&gt; -T<br/>&gt;<br/>&gt;<br/><br/>-- <br/><br/> .~. In my life God comes first....<br/> /V\ but Linux is pretty high after that :-D<br/> /( )\ Francis (Grizzly) Smit<br/> ^^-^^ http://www.smit.id.au/<br/> http://www.nntp.perl.org/group/perl.perl6.users/2017/04/msg3668.html Sat, 01 Apr 2017 10:53:08 +0000 #!/usr/bin/perl6 by ToddAndMargo Hi All,<br/><br/>Scientific Linux 7.3 (RHEL clone)<br/><br/>I just came out of a panic with EPEL and their release update<br/>of Rakudo. Hosed the hole thing. Total mess.<br/><br/>Anyway, thanks to the guys at the IRC channel, after a lot<br/>of uninstalling and erasing, I am now on<br/><br/> https://github.com/nxadm/rakudo-pkg/releases<br/><br/> <br/>https://github.com/nxadm/rakudo-pkg/releases/download/2017.03_02/perl6-rakudo-moarvm-CentOS7.3.1611-20170300-02.x86_64.rpm<br/><br/>Problem, EPEL and `nxadm` put `perl6` in different places:<br/> EPEL: /usr/bin/perl6<br/> nxadm: /opt/rakudo/bin/perl6<br/><br/>and all my Linux Perl6 programs start with<br/> #!/usr/bin/perl6<br/><br/>The following cured the issue<br/># ln -s /opt/rakudo/bin/perl6 /usr/bin/perl6<br/><br/>I reported the issue over on<br/>https://github.com/nxadm/rakudo-pkg/issues/9<br/><br/>Therefore, I would like best practice advice:<br/><br/>If various releases of Linux&#39;s rakudo are going to install in<br/>different places and I want Linux cross machine compatibility,<br/>is it best to leave the `#!/usr/bin/perl6`off and run everything<br/>the hard way with `perl6 xxx.pl6` and remove the bash first<br/>line path?<br/><br/>I don&#39;t suppose there is a way to dual path the first line?<br/><br/>Your thoughts on the issue?<br/><br/>Many thanks,<br/>-T<br/><br/><br/>-- <br/>~~~~~~~~~~~~~~~~~~~~~~~~<br/>Yesterday it worked.<br/>Today it is not working.<br/>EPEL is like that.<br/>~~~~~~~~~~~~~~~~~~~~~~~~<br/> http://www.nntp.perl.org/group/perl.perl6.users/2017/04/msg3667.html Sat, 01 Apr 2017 06:16:43 +0000 Re: write string requires an object with REPR MVMOSHandle by Shlomi Fish On Wed, 29 Mar 2017 12:47:58 +0200<br/>Elizabeth Mattijsen &lt;liz@dijkmat.nl&gt; wrote:<br/><br/>&gt; &gt; On 29 Mar 2017, at 12:36, Shlomi Fish &lt;shlomif@shlomifish.org&gt; wrote:<br/>&gt; &gt; <br/>&gt; &gt; On Wed, 29 Mar 2017 12:10:15 +0200<br/>&gt; &gt; Timo Paulssen &lt;timo@wakelift.de&gt; wrote:<br/>&gt; &gt; <br/>&gt; &gt;&gt; As part of the IOwesome grant, zoffix is going to fix this error. It&#39;s<br/>&gt; &gt;&gt; what you get when you try to write to or read from or do anything with a<br/>&gt; &gt;&gt; closed IO::Handle.<br/>&gt; &gt;&gt; <br/>&gt; &gt;&gt; When you use &quot;LEAVE:&quot; you&#39;re just declaring a label called &quot;LEAVE&quot;.<br/>&gt; &gt;&gt; There are no labels with special function, so your code is equivalent to<br/>&gt; &gt;&gt; <br/>&gt; &gt;&gt; sub save {<br/>&gt; &gt;&gt; my $fh = open(&#39;data.txt&#39;, :w);<br/>&gt; &gt;&gt; ohai: $fh.close;<br/>&gt; &gt;&gt; $fh.print(&quot;hello\n&quot;);<br/>&gt; &gt;&gt; }<br/>&gt; &gt;&gt; <br/>&gt; &gt;&gt; so you&#39;re opening the file, closing the file, then writing to it. That<br/>&gt; &gt;&gt; can&#39;t work, of course, but the error is also clearly LTA.<br/>&gt; &gt;&gt; <br/>&gt; &gt; <br/>&gt; &gt; Hi Timo!<br/>&gt; &gt; <br/>&gt; &gt; What does &quot;LTA&quot; stand for in this context? One thing I learned is to avoid<br/>&gt; &gt; acronyms as much as possible. <br/>&gt; <br/>&gt; Less Than Awesome<br/>&gt; <br/><br/>Thanks, Liz!<br/><br/>&gt; <br/>&gt; <br/>&gt; Liz<br/> http://www.nntp.perl.org/group/perl.perl6.users/2017/03/msg3666.html Wed, 29 Mar 2017 12:15:39 +0000 Re: write string requires an object with REPR MVMOSHandle by Elizabeth Mattijsen &gt; On 29 Mar 2017, at 12:36, Shlomi Fish &lt;shlomif@shlomifish.org&gt; wrote:<br/>&gt; <br/>&gt; On Wed, 29 Mar 2017 12:10:15 +0200<br/>&gt; Timo Paulssen &lt;timo@wakelift.de&gt; wrote:<br/>&gt; <br/>&gt;&gt; As part of the IOwesome grant, zoffix is going to fix this error. It&#39;s<br/>&gt;&gt; what you get when you try to write to or read from or do anything with a<br/>&gt;&gt; closed IO::Handle.<br/>&gt;&gt; <br/>&gt;&gt; When you use &quot;LEAVE:&quot; you&#39;re just declaring a label called &quot;LEAVE&quot;.<br/>&gt;&gt; There are no labels with special function, so your code is equivalent to<br/>&gt;&gt; <br/>&gt;&gt; sub save {<br/>&gt;&gt; my $fh = open(&#39;data.txt&#39;, :w);<br/>&gt;&gt; ohai: $fh.close;<br/>&gt;&gt; $fh.print(&quot;hello\n&quot;);<br/>&gt;&gt; }<br/>&gt;&gt; <br/>&gt;&gt; so you&#39;re opening the file, closing the file, then writing to it. That<br/>&gt;&gt; can&#39;t work, of course, but the error is also clearly LTA.<br/>&gt;&gt; <br/>&gt; <br/>&gt; Hi Timo!<br/>&gt; <br/>&gt; What does &quot;LTA&quot; stand for in this context? One thing I learned is to avoid<br/>&gt; acronyms as much as possible.<br/><br/>Less Than Awesome<br/><br/><br/><br/>Liz<br/> http://www.nntp.perl.org/group/perl.perl6.users/2017/03/msg3665.html Wed, 29 Mar 2017 10:48:08 +0000 Re: write string requires an object with REPR MVMOSHandle by Shlomi Fish On Wed, 29 Mar 2017 12:10:15 +0200<br/>Timo Paulssen &lt;timo@wakelift.de&gt; wrote:<br/><br/>&gt; As part of the IOwesome grant, zoffix is going to fix this error. It&#39;s<br/>&gt; what you get when you try to write to or read from or do anything with a<br/>&gt; closed IO::Handle.<br/>&gt; <br/>&gt; When you use &quot;LEAVE:&quot; you&#39;re just declaring a label called &quot;LEAVE&quot;.<br/>&gt; There are no labels with special function, so your code is equivalent to<br/>&gt; <br/>&gt; sub save {<br/>&gt; my $fh = open(&#39;data.txt&#39;, :w);<br/>&gt; ohai: $fh.close;<br/>&gt; $fh.print(&quot;hello\n&quot;);<br/>&gt; }<br/>&gt; <br/>&gt; so you&#39;re opening the file, closing the file, then writing to it. That<br/>&gt; can&#39;t work, of course, but the error is also clearly LTA.<br/>&gt; <br/><br/>Hi Timo!<br/><br/>What does &quot;LTA&quot; stand for in this context? One thing I learned is to avoid<br/>acronyms as much as possible.<br/><br/>Regards,<br/><br/> Shlomi<br/><br/>&gt; HTH<br/>&gt; - Timo<br/> http://www.nntp.perl.org/group/perl.perl6.users/2017/03/msg3664.html Wed, 29 Mar 2017 10:36:24 +0000 Re: write string requires an object with REPR MVMOSHandle by Timo Paulssen As part of the IOwesome grant, zoffix is going to fix this error. It&#39;s<br/>what you get when you try to write to or read from or do anything with a<br/>closed IO::Handle.<br/><br/>When you use &quot;LEAVE:&quot; you&#39;re just declaring a label called &quot;LEAVE&quot;.<br/>There are no labels with special function, so your code is equivalent to<br/><br/>sub save {<br/> my $fh = open(&#39;data.txt&#39;, :w);<br/> ohai: $fh.close;<br/> $fh.print(&quot;hello\n&quot;);<br/>}<br/><br/>so you&#39;re opening the file, closing the file, then writing to it. That<br/>can&#39;t work, of course, but the error is also clearly LTA.<br/><br/>HTH<br/> - Timo<br/> http://www.nntp.perl.org/group/perl.perl6.users/2017/03/msg3663.html Wed, 29 Mar 2017 10:10:38 +0000 write string requires an object with REPR MVMOSHandle by Gabor Szabo I was running the following buggy code:<br/><br/>sub save {<br/> my $fh = open(&#39;data.txt&#39;, :w);<br/> LEAVE: $fh.close;<br/> $fh.print(&quot;hello\n&quot;);<br/>}<br/><br/>save();<br/><br/>(note the : after the LEAVE)<br/>Which if I am not mistaken is basically the same as:<br/><br/><br/>sub save {<br/> my $fh = open(&#39;data.txt&#39;, :w);<br/> $fh.close;<br/> $fh.print(&quot;hello\n&quot;);<br/>}<br/><br/>save();<br/><br/><br/>and I kept getting the error in the subject which greatly confused me.<br/><br/>Shouldn&#39;t this be something like a &quot;print of closed filehandle&quot; error?<br/><br/>Gabor<br/> http://www.nntp.perl.org/group/perl.perl6.users/2017/03/msg3662.html Wed, 29 Mar 2017 09:47:58 +0000 Re: Module take-over policy by Richard Hainsworth True in theory: the meta data for different modules, such as version and <br/>auth, exist.<br/><br/>In practice: so far as I know, (1) :auth is ignored, (2) the ecosystem <br/>has no &#39;top-level&#39; mechanism<br/><br/>Two situations:<br/><br/>a) a new environment is being created, so all modules should be the most <br/>recent.<br/><br/>Which module (of two with the same name, but different :auth) should be <br/>chosen? This default module is what I meant by &#39;top-level&#39;.<br/><br/>Will the ecosystem display all modules?<br/><br/>b) an old environment is being maintained, and dependencies require <br/>older versions.<br/><br/>It seems to me that the way the specifications have been written, <br/>situation (b) is provided for. But it is also the more likely scenario <br/>for a well-established language with a gradual evolution (perl 5).<br/><br/>But situation (a) seems to me to be the most likely for a new, rapidly <br/>evolving, language. It is already a problem.<br/><br/><br/>On Wednesday, March 29, 2017 12:05 PM, Brad Gilbert wrote:<br/>&gt; Responses inline<br/>&gt;<br/>&gt; On Tue, Mar 28, 2017 at 10:37 PM, Richard Hainsworth<br/>&gt; &lt;rnhainsworth@gmail.com&gt; wrote:<br/>&gt;&gt; I&#39;ve seen a couple of references to modules that no longer work; it&#39;s<br/>&gt;&gt; inevitable with a new language.<br/>&gt;&gt;<br/>&gt;&gt; There is a balance between having respect for / protecting the original<br/>&gt;&gt; developer, and also keeping a useful module up to date when the original<br/>&gt;&gt; developer moves on / gets bored / dies / falls in love with someone else.<br/>&gt;&gt;<br/>&gt;&gt; Developers see a protocol for adding a module to the ecosystem. I think it<br/>&gt;&gt; would be effective for the perl6 community to have a visible protocol for<br/>&gt;&gt; dealing with &#39;abandoned&#39; modules. If it&#39;s visible at the start, it is<br/>&gt;&gt; difficult to complain about arbitrary decisions later.<br/>&gt; Anyone should be able to release a module with the same name,<br/>&gt; it will just have a different :auth&lt;&gt;<br/>&gt; So anyone can fix it and upload it, if there isn&#39;t a licence problem.<br/>&gt;<br/>&gt; That leaves a few other problems. For one the old unmaintained module<br/>&gt; would still<br/>&gt; be there, and still be the newest version from that :auth&lt;&gt;.<br/>&gt; We would probably need a procedure to get it de-listed.<br/>&gt;<br/>&gt; Basically I think we are in a slightly unique situation, and we may just have<br/>&gt; to wait and see where the chips fall for some of it.<br/>&gt;<br/>&gt;&gt; I came across the following, which I thought made the balance in a<br/>&gt;&gt; reasonable way:<br/>&gt;&gt;<br/>&gt;&gt; https://learn.getgrav.org/advanced/grav-development#abandoned-resource-protocol<br/>&gt;&gt;<br/>&gt;&gt; Richard Hainsworth<br/>&gt; Some of that can be re-used, and it is very similar to the procedure<br/>&gt; for Perl 5 modules.<br/> http://www.nntp.perl.org/group/perl.perl6.users/2017/03/msg3661.html Wed, 29 Mar 2017 05:53:43 +0000 Re: Module take-over policy by Brad Gilbert Responses inline<br/><br/>On Tue, Mar 28, 2017 at 10:37 PM, Richard Hainsworth<br/>&lt;rnhainsworth@gmail.com&gt; wrote:<br/>&gt; I&#39;ve seen a couple of references to modules that no longer work; it&#39;s<br/>&gt; inevitable with a new language.<br/>&gt;<br/>&gt; There is a balance between having respect for / protecting the original<br/>&gt; developer, and also keeping a useful module up to date when the original<br/>&gt; developer moves on / gets bored / dies / falls in love with someone else.<br/>&gt;<br/>&gt; Developers see a protocol for adding a module to the ecosystem. I think it<br/>&gt; would be effective for the perl6 community to have a visible protocol for<br/>&gt; dealing with &#39;abandoned&#39; modules. If it&#39;s visible at the start, it is<br/>&gt; difficult to complain about arbitrary decisions later.<br/><br/>Anyone should be able to release a module with the same name,<br/>it will just have a different :auth&lt;&gt;<br/>So anyone can fix it and upload it, if there isn&#39;t a licence problem.<br/><br/>That leaves a few other problems. For one the old unmaintained module<br/>would still<br/>be there, and still be the newest version from that :auth&lt;&gt;.<br/>We would probably need a procedure to get it de-listed.<br/><br/>Basically I think we are in a slightly unique situation, and we may just have<br/>to wait and see where the chips fall for some of it.<br/><br/>&gt; I came across the following, which I thought made the balance in a<br/>&gt; reasonable way:<br/>&gt;<br/>&gt; https://learn.getgrav.org/advanced/grav-development#abandoned-resource-protocol<br/>&gt;<br/>&gt; Richard Hainsworth<br/><br/>Some of that can be re-used, and it is very similar to the procedure<br/>for Perl 5 modules.<br/> http://www.nntp.perl.org/group/perl.perl6.users/2017/03/msg3660.html Wed, 29 Mar 2017 04:05:57 +0000 Module take-over policy by Richard Hainsworth I&#39;ve seen a couple of references to modules that no longer work; it&#39;s <br/>inevitable with a new language.<br/><br/>There is a balance between having respect for / protecting the original <br/>developer, and also keeping a useful module up to date when the original <br/>developer moves on / gets bored / dies / falls in love with someone else.<br/><br/>Developers see a protocol for adding a module to the ecosystem. I think <br/>it would be effective for the perl6 community to have a visible protocol <br/>for dealing with &#39;abandoned&#39; modules. If it&#39;s visible at the start, it <br/>is difficult to complain about arbitrary decisions later.<br/><br/>I came across the following, which I thought made the balance in a <br/>reasonable way:<br/><br/>https://learn.getgrav.org/advanced/grav-development#abandoned-resource-protocol<br/><br/>Richard Hainsworth<br/> http://www.nntp.perl.org/group/perl.perl6.users/2017/03/msg3659.html Wed, 29 Mar 2017 03:37:27 +0000