Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2017-05-29

Perl 6 | Reference Documentation | Rakudo

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:12 sammers joined #perl6
00:12 [1]Jarryd98 joined #perl6
00:33 kybr joined #perl6
00:39 aborazmeh joined #perl6
00:39 aborazmeh joined #perl6
00:41 MilkmanDan joined #perl6
00:50 BenGoldberg joined #perl6
00:54 MilkmanDan joined #perl6
00:57 Geth ¦ doc: 2a7bd17733 | (Zoffix Znet)++ | 3 files
00:57 Geth ¦ doc: [io grant] Document IO::Spec::*.rel2abs
00:57 Geth ¦ doc: review: https://github.com/perl6/doc/commit/2a7bd17733
01:02 MilkmanDan joined #perl6
01:02 Geth ¦ doc: f45241f1b0 | (Zoffix Znet)++ | 2 files
01:02 Geth ¦ doc: [io grant] Document IO::Spec::*.rootdir
01:02 Geth ¦ doc: review: https://github.com/perl6/doc/commit/f45241f1b0
01:14 BenGoldberg . o O (The rootdir is the one with the carrots and yams and tubers and allium ... ? )
01:16 [1]Jarryd98 joined #perl6
01:19 SmokeMachine jnthn: Hi! I thinking of sending a new PR to your Test::Mock to make it work with roles...
01:19 SmokeMachine Im thinking of make it with something like this: https://gist.github.com/FCO/8b6311678a74e50487128ee8698622b1
01:19 SmokeMachine jnthn: what do you think?
01:20 SmokeMachine jnthn: not using the pinnacle, but using the idea of it... this is the punnable: https://github.com/FCO/Punnable
01:23 dj_goku joined #perl6
01:23 dj_goku joined #perl6
01:27 pecastro joined #perl6
01:36 zostay how do i track down and diagnose the source of this error? Probable version skew in pre-compiled '~/.zef/store/http-useragent.git/0a0cb5bb42ec4a97057bbf53698bdc42a020399a/lib/HTTP/MediaType.pm6 (HTTP::MediaType)' (cause: no object at index 4850)
01:36 zostay i tried nuking my rakudo install and installing fresh and i am getting it after installing everything again
01:38 ovechkin joined #perl6
01:39 zostay it starts showing up as soon immediately after i install a branch of URI i've been working on and from that point forward, any attempt to work with HTTP::MediaType causes death and peril, so that i can't even run zef install --force on HTTP::UserAgent to attempt to reinstall to see if that would help
01:46 MasterDuke zostay: all i know is it's a MoarVM error. nine, timotimo, or jnthn might be good bets for help
01:46 Cabanossi joined #perl6
01:46 zostay yeah, that's about as far as i got too... the error message is not a very helpful one
01:46 zostay maybe i'll hop over to #moarvm and ask there
01:48 ilbot3 joined #perl6
01:48 Topic for #perl6 is now »ö« Welcome to Perl 6! | https://perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:,  or /msg camelia p6: ... | irclog: http://irc.perl6.org or http://colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
01:49 ksn00b joined #perl6
01:50 ksn00b Hello, how is it possible to add perl5 lib path to perl6?
01:54 [1]Jarryd98 joined #perl6
02:01 ovechkin joined #perl6
02:39 Zoffix joined #perl6
02:40 Zoffix left #perl6
02:44 Cabanossi joined #perl6
02:53 noganex joined #perl6
03:11 dj_goku joined #perl6
03:11 dj_goku joined #perl6
03:13 Cabanossi joined #perl6
03:37 Lis joined #perl6
03:40 Lis left #perl6
04:18 Geth ¦ specs: 4b83524181 | (Zoffix Znet)++ (committed using GitHub Web editor) | v6d.pod
04:18 Geth ¦ specs: Propose tossing %(), @(), and $() magic shortcuts
04:18 Geth ¦ specs:
04:18 Geth ¦ specs: Per https://rt.perl.org/Ticket/Display.html?id=131392
04:18 Geth ¦ specs: review: https://github.com/perl6/specs/commit/4b83524181
04:29 fatguy joined #perl6
04:37 committable6 joined #perl6
04:48 Lis joined #perl6
04:53 Lis left #perl6
04:55 astj_ joined #perl6
04:55 curan joined #perl6
04:57 bwisti joined #perl6
04:58 Cabanossi joined #perl6
04:59 dj_goku joined #perl6
04:59 dj_goku joined #perl6
05:02 Herby_ joined #perl6
05:02 vytautas joined #perl6
05:02 Herby_ o/
05:02 Herby_ Evening, everyone
05:04 Herby_ working my way through Think Perl 6 and am stumped on why I'm getting an incorrect answer to an exercise
05:05 Herby_ I need to write a subroutine that gets the percentage of words that do not contain the letter 'e'
05:07 Herby_ https://pastebin.com/dcVJdN0N
05:07 Herby_ if someone could take a peek
05:08 Herby_ there is a 5% difference in the final answer between those two ways of writing the subroutine
05:09 araraloren m: say "FOO" if "eaaf".index("e");
05:09 camelia rakudo-moar 7aa1c0: ( no output )
05:10 araraloren This return **0**!!
05:10 araraloren IS FALSE!
05:10 Herby_ m: say "foo" if index "eaaf", "e";
05:10 camelia rakudo-moar 7aa1c0: ( no output )
05:11 araraloren So, this code is not correct
05:11 araraloren m: say 0.so
05:11 camelia rakudo-moar ed07b2: OUTPUT: «False␤»
05:11 araraloren m: say "FOO" if "eaaf".index("e").defined;
05:11 camelia rakudo-moar ed07b2: OUTPUT: «FOO␤»
05:12 araraloren Please refer this: https://docs.perl6.org/routine/index
05:12 Herby_ ahhhh
05:12 araraloren `index` will return undefined value when `$needle` not found
05:12 Herby_ m: say "foo" if "aaef".index("e");
05:12 camelia rakudo-moar ed07b2: OUTPUT: «foo␤»
05:12 Herby_ I see.  That's a simple explanation.  Thanks!
05:15 Herby_ say "foo" if "eeaf" ~~ /e/;
05:15 evalable6 Herby_, rakudo-moar 7aa1c08ce: OUTPUT: «foo»
05:15 Herby_ nice, evalable6 saw that I missed the leading m:
05:15 araraloren Yeah, use regex is a good solution.
05:16 araraloren `m` is optional
05:16 Herby_ on a 113k word list, would index be substantially faster than regex?
05:16 Herby_ i should learn how to benchmark in p6
05:17 araraloren Yeah, index will faster than regex, maybe, it's difficult to say.
05:18 araraloren Herby_, for simple benchmark, you can refer this: https://docs.perl6.org/language/performance
05:21 Herby_ thanks araraloren. running it a few times and just eyeballing the average time, index was ~3x faster
05:21 Herby_ on a 113k word list
05:21 zengargoyle Herby_: there is a Benchmark module.  github.com/perlpilot/benchmark
05:22 Herby_ zengargoyle: thanks, I'll check that out
05:22 araraloren Yeah, I think Regex can also optimized
05:23 araraloren Also `Regex` do more thing than `index`
05:25 zengargoyle index will always be faster.  no need to create the match object even if the regex is crazy smart enough to realize /e/ could be a simple index.
05:26 araraloren yeah
05:27 zengargoyle at least in p5 it *totally* makes a big difference with large data even without all the objecty stuff. :)
05:27 Zoffix joined #perl6
05:27 Zoffix m: say "foo" if "aaef".contains: 'e';
05:27 camelia rakudo-moar ed07b2: OUTPUT: «foo␤»
05:28 Cabanossi joined #perl6
05:28 zengargoyle where *large* is just small but it makes the difference between a fast CLI tool and one that makes you grumble while waiting.
05:28 Zoffix m: say 'foo' with "eaaf".index: "e";
05:28 camelia rakudo-moar ed07b2: OUTPUT: «foo␤»
05:28 Herby_ Zoffix o/
05:29 Herby_ m: say 'foo' if "eeaf".index: "e";
05:29 camelia rakudo-moar ed07b2: ( no output )
05:29 Zoffix ksn00b: if you mean for Inline::Perl5, then `use lib:from<Perl5> <some/dir>;`
05:29 Zoffix \o
05:30 araraloren yeah, `with` is short for `if .defined`
05:30 Herby_ ahh ok
05:30 Zoffix m: <just a bunch of words with letters and other interesting stuff>.categorize(*.contains: 'e').say
05:30 camelia rakudo-moar ed07b2: OUTPUT: «{False => [just a bunch of words with and stuff], True => [letters other interesting]}␤»
05:31 zengargoyle would a 'so' work?
05:31 Zoffix `with` also aliases the value to $_
05:31 Herby_ Zoffix: that's pretty damn neat
05:31 Herby_ haven't seen categorize yet
05:33 Zoffix m: printf "%.2f%% of words have letter 'e'", 100*.{True}.elems/.values».elems.sum with <just a bunch of words with letters and other interesting stuff>.categorize: *.contains: 'e'
05:33 camelia rakudo-moar ed07b2: OUTPUT: «27.27% of words have letter 'e'»
05:34 Herby_ yeah that's awesome
05:35 vytautas joined #perl6
05:35 Herby_ would it be simple to modify to check if it contains 'a'|'e'|'u' ?
05:36 Zoffix m: printf "%.2f%%", 100*.classify(*.contains: 'e'){True}/.elems with <just a bunch of words with letters and other interesting stuff>
05:36 camelia rakudo-moar ed07b2: OUTPUT: «27.27%»
05:36 ufobat joined #perl6
05:36 Zoffix Herby_: literally pass that to .contains
05:37 eliv joined #perl6
05:37 Zoffix m: printf "%.2f%% of words have aeu", 100*.classify(*.contains: 'a'|'e'|'u'){True}/.elems with <just a bunch of words with letters and other interesting stuff>
05:37 camelia rakudo-moar ed07b2: OUTPUT: «72.73% of words have aeu»
05:37 Zoffix m: printf "%.2f%% of words have aeu", 100*.classify(*.contains: any <a e u>){True}/.elems with <just a bunch of words with letters and other interesting stuff>
05:37 Herby_ :)
05:37 camelia rakudo-moar ed07b2: OUTPUT: «72.73% of words have aeu»
05:37 * Zoffix &
05:37 Zoffix left #perl6
05:38 wamba joined #perl6
05:39 Zoffix joined #perl6
05:40 Zoffix P.S: make it *.contains(any <a u o>).so; otherwise .classify gets a junction and stuff's repeated
05:40 Zoffix m: printf "%.2f%% of words have aeu", 100*.classify({so .contains: any <a e u>}){True}/.elems with <just a bunch of words with letters and other interesting stuff>
05:40 camelia rakudo-moar ed07b2: OUTPUT: «72.73% of words have aeu»
05:40 Zoffix left #perl6
05:41 araraloren m: <just a bunch eeee>.categorize(*.contains: 'e').say
05:41 camelia rakudo-moar ed07b2: OUTPUT: «{False => [just a bunch], True => [eeee]}␤»
05:42 [1]Jarryd98 joined #perl6
05:47 araraloren Awesome!
05:48 Herby_ m: "aaaaabbbcc".comb.Bag<a..c>.say;
05:48 camelia rakudo-moar ed07b2: OUTPUT: «0␤»
05:48 Herby_ m: "aaaaabbbcc".comb.Bag<a b c>.say;
05:48 camelia rakudo-moar ed07b2: OUTPUT: «(5 3 2)␤»
05:48 [1]Jarryd98 joined #perl6
05:49 Herby_ zoffix: reading your perl 6 advent post about sets and bags
05:50 Herby_ is there an easy way to get a Bag for the entire alphabet, without having to write out .Bag<a b c d e f g...>
05:51 Herby_ hmm. maybe thats not needed for this exercise
05:51 nadim m: ('a', 'b', ..'z').say
05:51 camelia rakudo-moar ed07b2: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Preceding context expects a term, but found infix .. instead␤at <tmp>:1␤------> 3('a', 'b', ..7⏏5'z').say␤»
05:52 araraloren m: "aaaaabbbcc".comb.Bag{"a" .. "c"}.say
05:52 camelia rakudo-moar ed07b2: OUTPUT: «(5 3 2)␤»
05:52 Herby_ there we go
05:52 nadim m: ('a' ..'z').say
05:52 camelia rakudo-moar ed07b2: OUTPUT: «"a".."z"␤»
05:58 Cabanossi joined #perl6
06:04 lowbro joined #perl6
06:04 lowbro joined #perl6
06:13 xtreak joined #perl6
06:13 [1]Jarryd98 joined #perl6
06:23 domidumont joined #perl6
06:26 domidumont joined #perl6
06:40 [1]Jarryd98 joined #perl6
06:48 dj_goku joined #perl6
06:48 dj_goku joined #perl6
06:49 nebuchadnezzar joined #perl6
06:57 vytautas joined #perl6
07:09 domidumont joined #perl6
07:10 Jarryd98 joined #perl6
07:17 darutoko joined #perl6
07:20 eliv_ joined #perl6
07:35 mr-foobar joined #perl6
07:36 Jarryd98 joined #perl6
07:38 vytautas joined #perl6
07:53 Jarryd98 joined #perl6
07:59 rindolf joined #perl6
08:02 sftf joined #perl6
08:03 g4 joined #perl6
08:07 xtreak joined #perl6
08:27 vytautas joined #perl6
08:29 revere joined #perl6
08:33 lizmat m: printf "%.2f%% of words have letter 'e'", 100*$_<e>/.total with <just a bunch of words with letters and other interesting stuff>.map( { .contains("e") ?? "e" !! "" } ).Bag   # why classify if you can Bag it?  :-)
08:33 camelia rakudo-moar f9403b: OUTPUT: «27.27% of words have letter 'e'»
08:34 lizmat m: 'printf "%.2f%% of words have letter 'e'", 100*$_{True}/.total with <just a bunch of words with letters and other interesting stuff>.map( *.contains("e") ).Bag   # even shorter
08:34 camelia rakudo-moar f9403b: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Two terms in a row␤at <tmp>:1␤------> 3'printf "%.2f%% of words have letter '7⏏5e'", 100*$_{True}/.total with <just a bu␤    expecting any of:␤        infix␤        infix stopper␤        …»
08:34 lizmat m: printf "%.2f%% of words have letter 'e'", 100*$_{True}/.total with <just a bunch of words with letters and other interesting stuff>.map( *.contains("e") ).Bag   # even shorter
08:34 camelia rakudo-moar f9403b: OUTPUT: «27.27% of words have letter 'e'»
08:35 lizmat m: printf "%.2f%% of words have letter 'e'", 100*.{True}/.total with <just a bunch of words with letters and other interesting stuff>.map( *.contains("e") ).Bag   # don't need no stinking $_  :-)
08:35 camelia rakudo-moar f9403b: OUTPUT: «27.27% of words have letter 'e'»
08:36 dj_goku joined #perl6
08:36 dj_goku joined #perl6
08:36 lizmat for finding out percentage of True/False of a list of things, a Bag is probably more efficient
08:37 lizmat well, at least a lot more memory friendly  :-)
08:38 pecastro joined #perl6
08:41 araraloren great, awesome!
08:51 zengargoyle somehow i think golf is counter the the idea of the Think Pperl 6 book :P
08:52 zengargoyle but Perl6 is just to awesome to deny.
08:54 kurahaupo joined #perl6
08:55 parv joined #perl6
08:56 lizmat well, the use of a Bag I wouldn't necessarily call a golf
08:56 lizmat but a different approach (keeping count rather than keeping original objects around)
08:56 lizmat for the other shortenings: guilty has charged  :-)
08:56 lizmat *as
08:57 zengargoyle i haven't finished the book yet but don't think it was introduced yet for this particular problem.  maybe it gets revisited.
08:58 zengargoyle it being Bag
08:58 Cabanossi joined #perl6
08:58 * zengargoyle has nasty memories of teachers marking things wrong because that wasn't the stuff you were supposed to know at the time.
08:58 * lizmat tries to recall...
08:59 lizmat could be that sets/bags/mixes didn't make it to the book
08:59 El_Che morning
08:59 * lizmat vaguely remembers having a discussion about that with lolo78
08:59 El_Che hopefully less hot in your part of the world :)
08:59 * lizmat checks outside
09:00 zengargoyle they are there, i'm just at them now, but the word stuff was many chapters ago.
09:00 zengargoyle so not introduced when solving the original question about index().
09:01 lizmat El_Che: 28.9 in the shade atm
09:01 El_Che For the record. I am not trolling about ugexe's or nine's work on the blog post. Just exited about the CPAN integration and wondering  if this could result in an even better experience than Perl 5.
09:01 lizmat El_Che: that's how I've interpreted the blog post  :-)
09:02 El_Che just in case. We can all be a little protective of our babies :)
09:04 zengargoyle i'm groaning about having to go back and make MANIFEST files for my modules which i guess is a byproduct of CPAN
09:04 El_Che the info is already there in the JSON file, I guess
09:06 zengargoyle on that modules.perl6.org/todo thingy all of mine note missing MANIFEST so i guess it's not smart enough to figure out from the info
09:07 zengargoyle and there are always resources and things that i don't think go in meta anywhere.
09:07 lizmat doesn't mi6 have a MANIFEST generation feature ?
09:07 zengargoyle maybe now.  not then.  i used mi6 for at least one of those modules.  but it's been a long while.
09:09 zengargoyle and i saw somewhere a 6zilla or something but haven't investigated yet.
09:12 vytautas joined #perl6
09:14 wamba joined #perl6
09:15 zengargoyle i should probably go and find some module from someone in the know that does everything just right including CPAN and do facelift.
09:17 zengargoyle and change all my travis files to use zef. :P
09:17 zengargoyle and maybe sign up or whatever to get things tested on a windows ci system
09:17 zengargoyle which i know absolutely noting about. :/
09:18 lizmat zengargoyle: please let us know how that goes
09:18 lizmat and use the new zef / mi6? CPAN Testers functionality to hand in test reports
09:19 zengargoyle lol, i asked a few days ago if anybody had a recent blog post or HOWTO about current best practices.
09:27 sammers joined #perl6
09:28 Cabanossi joined #perl6
09:28 margeas joined #perl6
09:28 zengargoyle i think it would be neat to `git clone git:gitnub.com/perl6/ecosystem-module-template.git my-module` and read a TODO and change some META and always have a bells and whistles Acme::HelloWorld module
09:30 lizmat isn't that what "mi6 new Foo::Bar" does ?
09:30 lizmat or could do ?
09:40 zakharyas joined #perl6
09:40 zengargoyle yeah, maybe.  i haven't actually tried recently, just ponderning. :)  and wondering if mi6 has any official standing or is just the current favorite.
09:42 lizmat zengargoyle: I don't think anything has an "offical" standing, as rakudo itself is only *an* implementation of Perl 6
09:42 * zengargoyle just thinking that some sort of CUR could do a fake install and then generate actual MANIFEST like installing to a DESTDIR with make in order to make a tarball does.
09:42 lizmat you *can* write your own CUR
09:43 lizmat PR's welcome  :-)
09:44 zengargoyle yeah, just thinking about how much i always hated MANIFEST and MANIFEST.SKIP and all the times some p5 module building system yelled at me or did something wrong.
09:45 yqt joined #perl6
09:45 zengargoyle and the stuff installed is defacto the MANIFEST. :P
09:46 zengargoyle except for all the tests and readme and oh, nevermind... bad idea...
09:48 zengargoyle part of me actualy wants the CUR to keep everything that's in to repo.  i always end up downloading the src to look at tests or examples anyway.
09:51 bacek_ joined #perl6
09:51 araraloren m: my @p = []; loop (my $i = 0;$i < 8;$i+=2) { @p.push(start { say "";  say "$i, {$i + 2}"; }) }; await Promise.allof(@p);
09:51 camelia rakudo-moar f9403b: OUTPUT: «␤6, 8␤␤6, 8␤␤6, 8␤␤8, 10␤»
09:52 DrForr o/
09:52 araraloren m: my @p = []; for 0, 2 ... 8 -> $i { @p.push(start { say "";  say "$i, {$i + 2}"; }) }; await Promise.allof(@p);
09:52 camelia rakudo-moar f9403b: OUTPUT: «␤␤0, 2␤2, 4␤␤4, 6␤␤6, 8␤␤8, 10␤»
09:52 araraloren Why this output is different betwteen loop and for ?
09:58 Cabanossi joined #perl6
10:00 zengargoyle m: my @p = []; loop (my $i = 0;$i < 8;$i+=2) { say $i; }
10:00 camelia rakudo-moar f9403b: OUTPUT: «0␤2␤4␤6␤»
10:00 zengargoyle m: my @p = []; for 0, 2 ... 8 -> $i { say $i; }
10:00 camelia rakudo-moar f9403b: OUTPUT: «0␤2␤4␤6␤8␤»
10:00 zengargoyle m: my @p = []; for 0, 2 ... ^8 -> $i { say $i; }
10:00 camelia rakudo-moar f9403b: OUTPUT: «0␤1␤2␤3␤4␤5␤6␤7␤»
10:01 zengargoyle well, you're loops don't give the same numbers... :P
10:01 zengargoyle m: my @p = []; for 0, 2 ...^ 8 -> $i { say $i; }
10:01 camelia rakudo-moar f9403b: OUTPUT: «0␤2␤4␤6␤»
10:02 zengargoyle m: my @p = []; loop (my $i = 0;$i <= 8;$i+=2) { say $i; }
10:02 camelia rakudo-moar f9403b: OUTPUT: «0␤2␤4␤6␤8␤»
10:09 nine .tell Zoffix That's weird. When I fatalize INDIRECT_NAME_LOOKUP the code dies every time on the first attempt. This however works reliably: sub app (|args) { return (require ::("GTK::Simple::App")).new; };
10:09 yoleaux nine: I'll pass your message to Zoffix.
10:10 zengargoyle hrmmm... zef install App::Mi6 does nothing.
10:10 zengargoyle /install/fetch/
10:11 jnthn joined #perl6
10:12 nine zengargoyle: does it do nothing or does it just not print anything?
10:12 nine zengargoyle: if it really does nothing, then maybe it already has got it in its cache?
10:13 zengargoyle it says: '===> Searching for: App::Mi6' then exits with no errors or further information and doesn't give me a directory with app-mi6 or something.
10:14 zengargoyle does fetch not do what i thought fetch should do?
10:15 zengargoyle seems so, look drops me into ~/.zef/store/*long_hash*/
10:16 zengargoyle my expectations were in error. :)
10:18 mr-foobar joined #perl6
10:19 nine zengargoyle: I think at some point we actually wanted to install tests and everything. It just fell on the wayside in the sprint to release 6.c. This can change however :)
10:20 zengargoyle cool, i'll put it in my mind like making a native executable by squising moar + repository into a single file. :)
10:22 zengargoyle App::Mi6 only ack's MANIFEST.SKIP so i don't think it generates one but looks to just ignore things in the .SKIP when doing the CPAN upload.
10:22 zengargoyle note "If you want to ignore these files, then list them in .gitignore or MANIFEST.SKIP";
10:23 zengargoyle more of a clean repo before uploading than auto MANIFEST file generation.
10:24 wamba joined #perl6
10:24 dj_goku joined #perl6
10:31 DrForr Highly off-topic mini-rant: JESUS GOD-DANCING CHRIST ON A POGO STICK - CAN *NOONE* IN THE JS COMMUNITY GET THEIR SH*T TOGETHER? This makes the Perl 5 infrastructure look *sane*.
10:33 xtreak joined #perl6
10:34 xtreak joined #perl6
10:35 * zengargoyle grrrrs in sympathy
10:36 DrForr OTOH if I get this to actually work (and figure out the deployment issues I know I'm going to have) I'll have a Bailador/angular mini blog going within a week or so.
10:37 zengargoyle wasn't Bailador just removed from the ecosystem. :P
10:37 El_Che DrForr: don't be a hater. And welcome back :)
10:38 moritz zengargoyle: no. Zoffix transferred some Baildor modules to the new Bailador github org
10:38 yoleaux 28 May 2017 22:26Z <MasterDuke> moritz: re https://rt.perl.org/rt3/Public/Bug/Display.html?id=123572, what is the expected behavior of the :3[4, 22, 1] radix form? should digits greater than the base be allowed (e.g., the 4 in my example)? should values in the list greater than the base be allowed?
10:39 DrForr I'm not trying to hate, I'm trying to understand and fix.
10:39 DrForr And Bailador is still in the ecosystem file, please don't go there :)
10:39 zengargoyle ah, cool
10:40 moritz m: say :3[22, 1]
10:40 camelia rakudo-moar f9403b: OUTPUT: «67␤»
10:42 timotimo araraloren: you were giving the same $i to all the started pieces of code in the loop example. so they got started on the thread pool, and printed the value, but in the mean time the loop already incremented the value
10:43 timotimo araraloren: but in the for loop case you get the value bound to a parameter on the inner block, so it was a fresh scalar every time
10:43 Cabanossi joined #perl6
10:44 zengargoyle is there a reason NativeCall doesn't try to search for versioned .so files and pick the highest one (if no version is requested)?
10:45 zengargoyle timotimo: the two loops don't give the same values in the first place.
10:45 araraloren timotimo, so what should I do to get the same result.
10:45 nine zengargoyle: .so versions are pretty much API versions. Picking a random API usually doesn't lead to stable software.
10:45 zengargoyle m: say 0,2 ... 8
10:45 camelia rakudo-moar f9403b: OUTPUT: «(0 2 4 6 8)␤»
10:46 zengargoyle the for loop is <8
10:46 zengargoyle and stops at 6
10:46 zengargoyle because $i<8
10:47 araraloren timotimo, I add a Block wrap around it, and it works
10:48 araraloren m: my @p = []; loop (my $i = 0;$i < 8;$i+=2) { -> $i { @p.push(start { say "";  say "$i, {$i + 2}"; }); }($i); }; await Promise.allof(@p);
10:48 camelia rakudo-moar f9403b: OUTPUT: «␤␤2, 4␤4, 6␤␤6, 8␤␤0, 2␤»
10:48 araraloren timotimo, thanks
10:49 zengargoyle m: loop (my $i=0;$i < 8;$i+=2) { say $i }
10:49 camelia rakudo-moar f9403b: OUTPUT: «0␤2␤4␤6␤»
10:49 jnthn my $i-copy = $i; start { use $i-copy in here } would also work fwiw
10:50 zengargoyle i'm confused as to why the inside of the loop whatever it is should be the same if the $i values passed in are different.
10:50 araraloren jnthn, yeah, you are right.
10:52 pmurias joined #perl6
10:52 araraloren And another question
10:53 pmurias DrForr: isn't the Perl 5 infrastructure relatively sane compared to other languages? ;)
10:53 yoleaux 03:37Z <Zoffix> pmurias: RE: https://github.com/perl6/roast/blob/master/S24-testing/10-is-approx.t there's actually a more comprehensive test for that routine in rakudo's test suite. Should it be moved to roast, then? https://github.com/rakudo/rakudo/blob/nom/t/02-rakudo/02-new-is-approx.t
10:53 yoleaux 03:41Z <Zoffix> pmurias: nevermind. I moved it. Seems to make sense.
10:53 moritz I think few languages have the equivalent of cpan testers
10:53 araraloren m: my @f = 11, 22, 33; await start { say 3 + (@f div 3); };
10:53 camelia rakudo-moar f9403b: OUTPUT: «Tried to get the result of a broken Promise␤  in block <unit> at <tmp> line 1␤␤Original exception:␤    Cannot resolve caller infix:<div>(Array, Int); none of these signatures match:␤        (Int:D \a, Int:D \b)␤        (int $a, int $b --> int…»
10:53 araraloren m: my @f = 11, 22, 33; await Promise.allof([ start { say 3 + (@f div 3); } ]);
10:53 camelia rakudo-moar f9403b: ( no output )
10:54 moritz pro tip: make sure your seriali code runs correctly before parallelizing it :-)
10:54 * zengargoyle must have totally missed something.
10:54 moritz m: @f = 11, 22, 33; say @f div 3
10:54 camelia rakudo-moar f9403b: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Variable '@f' is not declared␤at <tmp>:1␤------> 3<BOL>7⏏5@f = 11, 22, 33; say @f div 3␤»
10:54 moritz m: my @f = 11, 22, 33; say @f div 3
10:54 camelia rakudo-moar f9403b: OUTPUT: «Cannot resolve caller infix:<div>(Array, Int); none of these signatures match:␤    (Int:D \a, Int:D \b)␤    (int $a, int $b --> int)␤  in block <unit> at <tmp> line 1␤␤»
10:54 araraloren Is there has a bug/problem with **something**
10:54 araraloren like Promise or other
10:55 moritz araraloren: the most obvious bug in the code above is your misuse of infix:<div>
10:55 araraloren I know that
10:56 araraloren It's my type mistake
10:56 araraloren m: my @f = 11, 22, 33; await Promise.allof([ start { say 3 + (@f div 3); } ]);
10:56 camelia rakudo-moar f9403b: ( no output )
10:56 araraloren but how to explain this ?
10:56 araraloren no exception now
10:57 jnthn No, that's just how Promise.allof works
10:57 moritz m: say await Promise.allof({start { die }})
10:57 camelia rakudo-moar f9403b: OUTPUT: «Can only use allof to combine defined Promise objects␤  in block <unit> at <tmp> line 1␤␤»
10:57 jnthn It doesn't care about success/failure, only that they all reached some kind of conclusion
10:57 moritz m: say await Promise.allof(start { die })
10:57 camelia rakudo-moar f9403b: OUTPUT: «True␤»
10:58 araraloren Do you mean I should handle exception myself ?
10:58 jnthn Why are you using Promise.allof?
10:58 moritz m: my $p = Promise.allof(start { die }); await $p; say $p.status
10:58 camelia rakudo-moar f9403b: OUTPUT: «Kept␤»
10:59 moritz araraloren: you can also await a list of promises
10:59 jnthn You can...what moritz said :)
10:59 araraloren Oh, this just a test, I want run some code concurrent, so the main thread should wait them done
10:59 lizmat and even handle them one by one:
11:00 lizmat for awaiterator(@promises) -> $p {  check the next promised that reached a conclusion }
11:00 araraloren I just want know is rakudo will not report when an exception raise ?
11:00 jnthn araraloren: Then await the promises; you don't need Promise.allof
11:00 araraloren when use Promise.allof
11:01 jnthn No, it won't. If Promise.allof did that, then it'd do the same as await @list-of-promises and there'd be no point to having it :)
11:01 araraloren Oh, maybe I misunderstand `Promise.allof`
11:02 pmurias joined #perl6
11:02 vytautas joined #perl6
11:03 jnthn Just checked the allof documentation, it does correctly describe this :)
11:04 araraloren Em, Ok
11:05 jnthn Typically you just want await @promises though, which does convey the error, and is shorter :)
11:05 jnthn ooh, it's lunch time :)
11:05 jnthn bbl
11:06 araraloren jnthn, yeah, you right
11:07 araraloren I just `wait @p`, and I misunderstand `Promise.allof`
11:07 lizmat El_Che: 31.1 and still rising :-(
11:07 araraloren s/just/just want/
11:08 zengargoyle 14 here, but it's 04:08 P)
11:20 El_Che lizmat: you travel a lot. Any pointers for car renting companies? (which are good, which to avoid). I need to rent a car in spain
11:21 lizmat El_Che: I'm pretty lazy that way: I usually go to rentalcars.com
11:21 El_Che lizmat: I don't know the site, but it sounds lazy ;)
11:22 lizmat it's basically booking.com for rental cars
11:22 El_Che nice to know
11:22 lizmat </plug>
11:22 El_Che lizmat: do they also squeeze the little man
11:22 * El_Che ducks
11:22 El_Che :)
11:23 lizmat not so sure: afaik they still use the agent model
11:28 domidumont joined #perl6
11:30 El_Che ok, it looks indeed nice
11:30 El_Che just looking at the location (dropping the car in an other city)
11:31 DrForr And *now* an interviewer decides to go with the line "Well, you've been out of work for 2 months, in my experience good developers aren't out of work that long." *headdesk*
11:33 pmurias_ joined #perl6
11:33 timotimo m(
11:34 DrForr (remembering after the fact that this is a publicly logged channel and oh well.)
11:37 DrForr Sorry, stress release is probably not appropriate here, my apologies.
11:37 pmurias joined #perl6
11:38 MasterDuke your penance is three new modules and a blog post
11:38 DrForr Once I get back from my immigration lawyer, which will be another ball of stress.
11:42 wamba joined #perl6
11:47 pmurias_ joined #perl6
11:48 zengargoyle does the p5 CPAN namespace collide with the p6 CPAN namespace?
11:49 lizmat no
11:50 lizmat a Perl 6 distribution uploaded to CPAN will never be seen by Perl 5 modules
11:50 lizmat and vice-versa
11:51 zengargoyle cool, how about metacpan search stuff?
11:51 lizmat although I could see offering an option in zef to also search Perl 5 modules and then provide that with Inline::Perl5 as a dependency
11:52 lizmat there is a fork of metacpan for Perl 6 somewhere, but I'm not sure of the state
11:52 lizmat perhaps better to ask this on #perl6-toolchain
11:52 pmurias joined #perl6
11:52 zengargoyle cool.
11:55 cdg joined #perl6
11:59 nine DrForr: I wouldn't want to work at a place with such interviewers anyway...
11:59 aborazmeh joined #perl6
11:59 aborazmeh joined #perl6
12:02 DrForr Nod. I politely explained that while that may certainly be the case, I'm constrained by the need to work with only companies that offer sponsorship, and those are much harder to find than those that don't.
12:05 zengargoyle looks like Mi6 MANIFEST.SKIP only matches via 'eq'.  shouldn't that be a regex or something?  and the list of files is from `git ls-files` which makes me happy and sad at the same time.
12:06 mr-foobar joined #perl6
12:06 DrForr Back in a while.
12:06 nine zengargoyle: why sad?
12:07 zengargoyle totally tied to git.
12:07 nine zengargoyle: mi6 is tied to git in general. It even does a git init on the newly created dirctory.
12:08 zengargoyle say a little less of a generic module tool and more towards Dist::Zilla
12:08 wamba joined #perl6
12:08 zengargoyle yeah, i'm all with using git.
12:09 zengargoyle h2xs it tied to make i guess. :P
12:09 BenGoldberg joined #perl6
12:10 zengargoyle maybe i wish for a bit more Module::Build (without the grrrr) where it's not tied to anything other than just Perl6.  with plugins or something. just a little bit.
12:11 zengargoyle but there's always tar and gz and who knows what...
12:12 pmurias joined #perl6
12:12 dj_goku joined #perl6
12:12 pmurias_ joined #perl6
12:13 zengargoyle i forget if p5 MANIFEST.SKIP is just 'eq' and not some sort of glob match.  and should p6 meta-info be so restrictive?
12:14 zengargoyle my @skip = "MANIFEST.SKIP".IO.lines.map: -> $skip { * eq $skip };
12:15 zengargoyle that might be awesome with an EVAL if say the line started with * EVAL it, if not do ~~ or something.
12:18 domidumont joined #perl6
12:19 zengargoyle i'd hate to have to put every single file in some development test directory in MANIFEST.SKIP insteak of just telling it to skip that whole directory.
12:21 pmurias joined #perl6
12:21 pmurias_ joined #perl6
12:30 pilne joined #perl6
12:36 zengargoyle m: my @s = <foo ^ba>.map: -> $skip { * ~~ rx/<$skip>/ }; for <foo bar> -> $f {say $f if @s.grep({$_($f)}); }
12:36 camelia rakudo-moar f9403b: OUTPUT: «bar␤»
12:37 zengargoyle i totally expected foo to be matched.
12:40 zengargoyle m: my $f = 'foo'; say 'foo' if $f ~~ /<$f>/;
12:40 camelia rakudo-moar f9403b: OUTPUT: «foo␤»
12:41 zengargoyle doh
12:43 zengargoyle m: my @src = <foo bar>; my @s = <foo ^ba>.map: -> $skip { * eq $skip }; for @src -> $f {say $f if @s.grep({$_($f)}); }
12:43 camelia rakudo-moar f9403b: OUTPUT: «foo␤»
12:43 zengargoyle m: my @src = <foo bar>; my @s = <foo ^ba>.map: -> $skip { * ~~ rx/<$skip>/ }; for @src -> $f {say $f if @s.grep({$_($f)}); }
12:43 camelia rakudo-moar f9403b: OUTPUT: «bar␤»
12:44 zengargoyle m: my @src = <foo bar>; my @s = <foo ^ba>.map: -> $skip { * ~~ rx/<$skip>/ }; for @src -> $f {say $f if @src.grep({$_($f)}); }
12:44 camelia rakudo-moar f9403b: OUTPUT: «No such method 'CALL-ME' for invocant of type 'Str'␤  in block  at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
12:45 zengargoyle m: my @src = <foo bar>; my @s = <foo ^ba>.map: -> $skip { * ~~ rx/<$skip>/ }; for @src -> $f {say $f if @s.grep({$_($f)}); }
12:45 camelia rakudo-moar f9403b: OUTPUT: «bar␤»
12:46 zengargoyle why no foo?
12:47 zengargoyle m: my $f = 'foo'; say 'foo' if $f ~~ /<$f>/;
12:47 camelia rakudo-moar f9403b: OUTPUT: «foo␤»
12:51 zengargoyle m: my @src = <foo bar>; my @s = <foo ^ba>.map: -> $skip { so * ~~ rx/<$skip>/ }; for @src -> $f {say $f if @s.grep({$_($f)}); }
12:51 camelia rakudo-moar f9403b: OUTPUT: «bar␤»
12:52 zengargoyle m: my @src = <foo bar>; my @s = <foo ^ba>.map: -> $skip { so * ~~ rx/<$skip>/ }; for @src -> $f {say $f if so @s.grep({$_($f)}); }
12:52 camelia rakudo-moar f9403b: OUTPUT: «bar␤»
12:53 pmurias_ joined #perl6
12:54 zengargoyle m: my @src = <foo bar>; my @s = <^foo ^ba>.map: -> $skip { so * ~~ rx/<$skip>/ }; for @src -> $f {say $f if so @s.grep({$_($f)}); }
12:54 camelia rakudo-moar f9403b: OUTPUT: «bar␤»
12:55 zengargoyle m: my @src = <foo bar>; my @s = <woot>.map: -> $skip { so * ~~ rx/<$skip>/ }; for @src -> $f {say $f if so @s.grep({$_($f)}); }
12:55 camelia rakudo-moar f9403b: ( no output )
12:55 zengargoyle m: my @src = <foo bar>; my @s = <foo>.map: -> $skip { so * ~~ rx/<$skip>/ }; for @src -> $f {say $f if so @s.grep({$_($f)}); }
12:55 camelia rakudo-moar f9403b: OUTPUT: «foo␤»
12:55 zengargoyle m: my @src = <foo bar>; my @s = <foo bar>.map: -> $skip { so * ~~ rx/<$skip>/ }; for @src -> $f {say $f if so @s.grep({$_($f)}); }
12:55 camelia rakudo-moar f9403b: OUTPUT: «bar␤»
12:56 zengargoyle m: my @src = <foo bar baz>; my @s = <foo bar>.map: -> $skip { so * ~~ rx/<$skip>/ }; for @src -> $f {say $f if so @s.grep({$_($f)}); }
12:56 camelia rakudo-moar f9403b: OUTPUT: «bar␤»
12:56 zengargoyle m: my @src = <foo baz bar>; my @s = <foo bar>.map: -> $skip { so * ~~ rx/<$skip>/ }; for @src -> $f {say $f if so @s.grep({$_($f)}); }
12:56 camelia rakudo-moar f9403b: OUTPUT: «bar␤»
12:57 * zengargoyle aaaarrrrrrrrrggggggggggggghhhhhhhhhhh.
12:58 zengargoyle m: my @src = <foo baz bar>; my @s = <foo bar baz>.map: -> $skip { so * ~~ rx/<$skip>/ }; for @src -> $f {say $f if so @s.grep({$_($f)}); }
12:58 camelia rakudo-moar f9403b: OUTPUT: «baz␤»
12:58 lucasb joined #perl6
12:59 Cabanossi joined #perl6
13:00 * zengargoyle gives up for now.
13:03 zengargoyle m: my @src = <foo baz bar>; my @s = <foo bar baz>.map: -> $skip { * eq $skip }; for @src -> $f {say $f if so @s.grep({$_($f)}); }
13:03 camelia rakudo-moar f9403b: OUTPUT: «foo␤baz␤bar␤»
13:04 zengargoyle so i'm going to guess that * ~~ rx/<$variable>/ doesn't work where * eq $variable does.... seems broke.
13:05 zengargoyle m: my @src = <foo baz bar>; my @s = <foo bar baz>.map: -> $skip { my $x = $skip; so * ~~ rx/<$x>/ }; for @src -> $f {say $f if so @s.grep({$_($f)}); }
13:05 camelia rakudo-moar f9403b: OUTPUT: «baz␤»
13:05 pmurias_ joined #perl6
13:06 * zengargoyle aaaaaaaaaaaaarrrrrrrrrrggggggggggggghhhhhhhhhhhhhhhhhh.
13:07 zengargoyle DWIM dammit! :P
13:08 khw joined #perl6
13:08 moritz m: say (* ~~ rx/foo/).^name
13:08 camelia rakudo-moar f9403b: OUTPUT: «{ ... }␤»
13:08 moritz what, .^name also whatever-curries?
13:08 moritz m: say (* ~~ rx/foo/).WHAT
13:08 camelia rakudo-moar f9403b: OUTPUT: «(WhateverCode)␤»
13:09 pmurias joined #perl6
13:10 raschipi joined #perl6
13:20 kurahaupo_ joined #perl6
13:23 zengargoyle m: my @src = <foo baz bar>; my @s = <foo bar baz>.map: -> $skip { sub($x){$x ~~ rx/<$skip>/} }; for @src -> $f {say $f if so @s.grep({$_($f)}); }
13:23 camelia rakudo-moar 36ea86: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Variable '$x' is not declared␤at <tmp>:1␤------> 3 @s = <foo bar baz>.map: -> $skip { sub(7⏏5$x){$x ~~ rx/<$skip>/} }; for @src -> $f␤»
13:24 ChoHag joined #perl6
13:25 zengargoyle m: my @src = <foo baz bar>; my @s = <foo bar baz>.map: -> $skip { -> $x { $x ~~ rx/<$skip>/} }; for @src -> $f {say $f if so @s.grep({$_($f)}); }
13:25 camelia rakudo-moar 36ea86: OUTPUT: «foo␤baz␤bar␤»
13:25 zengargoyle WTF????
13:26 zengargoyle m: my @src = <foo baz bar>; my @s = <foo ^ba baz>.map: -> $skip { -> $x { $x ~~ rx/<$skip>/} }; for @src -> $f {say $f if so @s.grep({$_($f)}); }
13:26 camelia rakudo-moar 36ea86: OUTPUT: «foo␤baz␤bar␤»
13:27 zengargoyle ok,   * ~~ rx/<$var>/   is broken.
13:27 zengargoyle or i'm missing something obvious.. :P
13:27 nine zengargoyle: you call it @skip, but print all matches instead of skip the matching ones?
13:28 Cabanossi joined #perl6
13:28 zengargoyle testing???  it's sorta from App::Mi6 processing MANIFEST.SKIP and would be: next if ....
13:29 zengargoyle include or skip is just a not at the front.
13:29 nine m: my @src = <foo baz bar>; my @s = <^ba baz>.map: -> $skip { -> $x { $x ~~ rx/<$skip>/} }; for @src -> $f {say $f unless so @s.grep({$_($f)}); }
13:29 camelia rakudo-moar 36ea86: OUTPUT: «foo␤»
13:29 zengargoyle :)
13:31 zengargoyle the deal is the -> works and the * auto magic doesn't
13:32 _4d47 joined #perl6
13:32 zengargoyle my @src = <foo baz bar>; my @s = <^ba baz>.map: -> $skip { * ~~ rx/<$skip>/} }; for @src -> $f {say $f unless so @s.grep({$_($f)}); }
13:32 zengargoyle m: my @src = <foo baz bar>; my @s = <^ba baz>.map: -> $skip { * ~~ rx/<$skip>/} }; for @src -> $f {say $f unless so @s.grep({$_($f)}); }
13:32 camelia rakudo-moar 51d6ff: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Unexpected closing bracket␤at <tmp>:1␤------> 3 baz>.map: -> $skip { * ~~ rx/<$skip>/} 7⏏5}; for @src -> $f {say $f unless so @s.g␤»
13:32 zengargoyle m: my @src = <foo baz bar>; my @s = <^ba baz>.map: -> $skip { * ~~ rx/<$skip>/ }; for @src -> $f {say $f unless so @s.grep({$_($f)}); }
13:32 camelia rakudo-moar 51d6ff: OUTPUT: «foo␤bar␤»
13:34 zengargoyle shouldn't * ~~ rx/<$skip>/ be the same as -> $x { $x ~~ rx/<$skip>/} ?
13:35 zengargoyle m: my @src = <foo baz bar>; my @s = <^ba baz>.map: -> $skip { sub($x) { $x ~~ rx/<$skip>/} }; for @src -> $f {say $f unless so @s.grep({$_($f)}); }
13:35 camelia rakudo-moar 51d6ff: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Variable '$x' is not declared␤at <tmp>:1␤------> 3; my @s = <^ba baz>.map: -> $skip { sub(7⏏5$x) { $x ~~ rx/<$skip>/} }; for @src -> ␤»
13:35 kurahaupo joined #perl6
13:36 kurahaupo__ joined #perl6
13:36 zengargoyle m: my @src = <foo baz bar>; my @s = <^ba baz>.map: -> $skip { sub ($x) { $x ~~ rx/<$skip>/} }; for @src -> $f {say $f unless so @s.grep({$_($f)}); }
13:36 camelia rakudo-moar 51d6ff: OUTPUT: «foo␤»
13:37 zengargoyle oops space.
13:38 zengargoyle m: my @src = <foo baz bar>; my @s = <foo bar baz>.map: -> $skip { sub ($x){$x ~~ rx/<$skip>/} }; for @src -> $f {say $f if so @s.grep({$_($f)}); }
13:38 camelia rakudo-moar 51d6ff: OUTPUT: «foo␤baz␤bar␤»
13:38 zengargoyle so sub or -> work and * doesn't.
13:39 llfourn_ m: multi foo($a where * === "foo".say) { }; foo(True) # bug? it checks the constraint twice
13:39 camelia rakudo-moar 51d6ff: OUTPUT: «foo␤foo␤»
13:39 _4d47 how would you mutate every nth chars of a Str ? i'm not finding in docs
13:40 kurahaupo joined #perl6
13:41 raschipi _4d47: I would turn it into a list of charachters and them manipulate it with a list, using .rotor and such.
13:43 araraloren m: multi foo($a where * === "foo".say) { };
13:43 camelia rakudo-moar 51d6ff: ( no output )
13:44 llfourn_ m: my $n = 4; my @a = "foobarbazburp".comb; $_ .= uc for @a[1,$n...*]; say @a.join
13:44 camelia rakudo-moar 51d6ff: OUTPUT: «fOobArbAzbUrp␤»
13:44 zengargoyle m: my $a = "abcdefghijklmnopqrstuvwxyz"; $a.substr-rw($_,1) = 'X' for 0, 3 ... $a.chars; say $a
13:44 camelia rakudo-moar 51d6ff: OUTPUT: «XbcXefXhiXklXnoXqrXtuXwxXz␤»
13:44 llfourn_ _4d47: ^^
13:44 zengargoyle tweak as needed. :)
13:46 zengargoyle m: my $a = "abcdefghijklmnopqrstuvwxyz"; $a.substr-rw($_,1) = 'X' for 0, 3 ... *; say $a
13:46 camelia rakudo-moar 51d6ff: OUTPUT: «Start argument to substr out of range. Is: 27, should be in 0..26; use *-27 if you want to index relative to the end␤  in block <unit> at <tmp> line 1␤␤Actually thrown at:␤  in block <unit> at <tmp> line 1␤␤»
13:46 zengargoyle meh. :(
13:46 _4d47 thank you all ! :)
13:47 zengargoyle is that sub vs -> vs * a buggable thing or am i doing something wrong somewhere?
13:50 lucasb m: sub f($ where -> { say 'hi' }) {}; f(1)
13:50 camelia rakudo-moar 51d6ff: OUTPUT: «hi␤»
13:50 lucasb m: multi f($ where -> { say 'hi' }) {}; f(1)
13:50 camelia rakudo-moar 51d6ff: OUTPUT: «hi␤hi␤»
13:54 zengargoyle lucasb: seems legit
13:56 zengargoyle multi has to check the args and does the where and then calls the sub and does the where.
13:57 zengargoyle sub just calls the sub and does the where
13:58 cdg joined #perl6
13:58 Cabanossi joined #perl6
14:01 dj_goku joined #perl6
14:01 dj_goku joined #perl6
14:02 MasterDuke jnthn has mentioned before that side effects in there where are not reliable/safe
14:04 wamba joined #perl6
14:04 lucasb right, thanks
14:10 zengargoyle so should the checking only be done once?
14:11 zengargoyle assuming a single multi.... i guess if there are multiple multis the checking has to be donw multiple times....
14:15 bwisti joined #perl6
14:15 zengargoyle i.e. a single target checks run to determine match, when the found target is called do the checks run again as part of the calling or are the matched arguments sent directly to the code body?
14:20 Actualeyes joined #perl6
14:32 llfourn_ I don't see why it would need to do it more than once
14:32 llfourn_ but I haven't looked through the dispatching logic that much
14:33 ksn00b joined #perl6
14:34 jnthn Yes, it does one check to see if it matches and another when actually invoking it, at present
14:34 llfourn_ why does it need to do it when it's actually invoking it?
14:34 jnthn It'd be nice to optimzie that at some point but it's not entirely easy
14:34 jnthn The real question is "how do you make it not do it when it's actually invoking it" :)
14:35 llfourn_ is the where clause embeded in the low level code object or something?
14:36 jnthn Most signatures are compiled
14:36 ksn00b Cannot import cpan installed module: "Could not find File::Basename" under perl6 program, does anyone have an idea?
14:36 jnthn So the processing of them ends up in the bytecode, yes
14:37 Sound joined #perl6
14:37 llfourn_ Hmm so the parameter binding runs during dispatching and when it's called.
14:38 llfourn_ I guess that makes sense but optimizing that away would be a big win for some of my code.
14:38 jnthn Aye. There's a number of possible solutions.
14:39 jnthn Though all with pitfalls
14:48 ksn00b Please help
14:49 jnthn ksn00b: If you want to use Perl 5 modules from Perl 6, see https://github.com/niner/Inline-Perl5 (but in a nutshell, you install that, use it, and then use File::Basename:from<Perl5>
14:51 raschipi ksn00b: Go ahead.
14:52 aborazmeh joined #perl6
14:52 aborazmeh joined #perl6
14:56 ksn00b jnthn: ok, thanks. one minute ..
14:56 Ben_Goldberg joined #perl6
15:18 yqt joined #perl6
15:28 ksn00b joined #perl6
15:28 Cabanossi joined #perl6
15:28 ksn00b Inline::Perl5 installation fails https://pastebin.com/ZhvQwsCf
15:34 Zoffix joined #perl6
15:34 llfourn_ ksn00b: perl6 -v ?
15:34 Zoffix ksn00b: which perl6 version you got? perl6 -v
15:35 ksn00b llfourn_: This is Rakudo version 2016.12 built on MoarVM version 2016.12 implementing Perl 6.c.
15:36 ksn00b Zoffix: 2016.12
15:36 Zoffix ksn00b: you could consider upgrading. Looks like latest zef doesn't work on version that old. Latest release is 2017.04: http://rakudo.org/downloads/star/
15:37 ksn00b Zoffix: ok.
15:37 * Zoffix wonders about "Failed to update p6c mirror Malformed UTF-8"
15:38 Zoffix perl6 -MWWW -e 'jget("http://ecosystem-api.p6c.org/projects.json").elems.say' don't got any errors on 2017.05-286-ga47a78f
15:38 * Zoffix builds 2016.12
15:39 alimon joined #perl6
15:40 llfourn_ ksn00b: btw I just tried zef install Inline::Perl5 and it failed but then I upgraded zef and it worked
15:40 llfourn_ so try and make sure both are on the latest version :)
15:40 timotimo i wonder if we should put something into perl6 -v to point out if the thing came from distro packages?
15:42 llfourn_ timotimo: that sounds like a good idea. It's easier to help if we know where they got ther rakudo.
15:42 ne_robot joined #perl6
15:43 ksn00b llfourn_: Debian sid
15:43 llfourn_ ksn00b: ah
15:44 Zoffix ksn00b: 2016.12 rakudo with latest and greatest zef works for me. So sounds like your zef was too old; unless you have some network restrictions that make zef fail to get stuff
15:45 raschipi ksn00b: You can get a newer rakudo from experimental in Debian
15:46 llfourn_ vanilla debian apt-get update && apt-cache show rakudo gives: Version: 2014.07-4
15:46 ksn00b Zoffix: I installed zef from https://github.com/ugexe/zef
15:46 ugexe zengargoyle: zef fetch downloads to ~/.zef/store/What-Ever... you just have to do `-v` to see it (a side effect that of that output not being desirable for fetching when you do `zef install What::Ever`)
15:46 raschipi I have 2017.05 from experimental
15:46 llfourn_ "Description: Perl 6 implementation on top of Parrot virtual machine" # This could use updating
15:47 ugexe zengargoyle: i've always been a proponent of installing all files or making the manifest generatable from the manifest
15:47 Zoffix ksn00b: BTW (based on your questions in past days), note that Perl 6 is a different language from Perl 5. Hence why you need Inline::Perl5 to load a Perl 5 module. Our modules are on https://modules.perl6.org
15:47 ugexe zengargoyle: including NYI hooks - mainly so that we can use an installed module to install to another CUR without having to use the original dist
15:47 Zoffix \o
15:47 Zoffix left #perl6
15:48 ugexe it would be trivial to install any extra files
15:49 ugexe we already do this with bin/
15:49 dj_goku joined #perl6
15:49 dj_goku joined #perl6
15:49 ksn00b Zoffix: I needed Base::Filename for importing my own module in the same directory as the main script
15:49 AlexDaniel joined #perl6
15:49 ugexe require $?FILE.IO.parent.child("my-module.pm") ?
15:50 raschipi m: "docs/README.pod".IO.basename.say;
15:50 camelia rakudo-moar d13d9c: OUTPUT: «README.pod␤»
15:50 ugexe ksn00b: the same directly as the main script changes if you install it
15:50 ugexe s/directly/directory/
15:50 ugexe even its relative location
15:51 ksn00b ugexe: I know, but I'm just willing to do some OOP as a beginner
15:52 ne_robot p6: say s/\w/0/g;
15:52 camelia rakudo-moar a18c06: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Unsupported use of /g; in Perl 6 please use :g␤at <tmp>:1␤------> 3say s/\w/0/g7⏏5;␤»
15:52 llfourn_ use lib $*PROGRAM.absolute; use MyModuleInThisDir; # should work too
15:52 CacoS joined #perl6
15:52 llfourn_ perl6 -I. script.p6
15:53 ugexe .parent
15:53 llfourn_ oh right yes.
15:53 llfourn_ use lib $*PROGRAM.parent.absolute; use MyModuleInThisDir; # should would actually work
15:53 ugexe -I. and -Ilib is not the same too
15:53 ugexe -I. usually catches a META6.json, which takes a different CURFS path than if one does not exists (same as -Ilib)
15:54 ugexe can resolve names that don't match paths
15:54 ugexe although I would recommend -I. over -Ilib (only mentioning it because it can catch you off guard)
15:55 [2300mAh] joined #perl6
15:55 llfourn_ ksn00b said "module in the same directory as the main script" which sounds like -I. to me
15:58 ugexe ah i misunderstood, although that is a good reason to put them in bin/
15:58 cdg joined #perl6
15:59 ugexe still wonder if we can do better with the CURFS representing 2 different paths (META6.json and perl5-ish s{::}{/})
16:01 ugexe to add: META.info does not get caught by the META6.json code path so will also take the perl5-ish path
16:01 ugexe but that doesn't get fixed because META.info needs to go away
16:02 sufrostico joined #perl6
16:08 lichtkind joined #perl6
16:10 ksn00b llfourn_: "use lib $*PROGRAM.parent.absolute;" does the job.
16:10 cdg joined #perl6
16:11 BenGoldberg m: dd $*PROGRAM
16:11 camelia rakudo-moar a18c06: OUTPUT: «IO::Path.new("<tmp>", :SPEC(IO::Spec::Unix), :CWD("/home/camelia"))␤»
16:12 llfourn_ ksn00b: \o/
16:12 raschipi m: round 42.9 , 0
16:12 camelia rakudo-moar a18c06: OUTPUT: «WARNINGS for <tmp>:␤Useless use of "round 42.9 , 0" in expression "round 42.9 , 0" in sink context (line 1)␤Attempt to divide 429 by zero using div␤  in block <unit> at <tmp> line 1␤␤Actually thrown at:␤  in block <unit> at <tmp> line 1␤␤»
16:12 raschipi m: round 42.9+1i , 0
16:12 camelia rakudo-moar a18c06: OUTPUT: «WARNINGS for <tmp>:␤Useless use of "round 42.9+1i , 0" in expression "round 42.9+1i , 0" in sink context (line 1)␤Attempt to divide 42.9 by zero using /␤  in block <unit> at <tmp> line 1␤␤Actually thrown at:␤  in block <unit> at <tmp> line 1…»
16:13 mscha joined #perl6
16:13 raschipi Should both die with the same division? according to the docs, they use the same alghorithm for each component. One tries 42.9/0  and the other 429/0.
16:14 mscha m: my @a = (1, 3), (4, 6); for @a -> ($p, $v) { dd $p, $v; } # This is fine
16:14 camelia rakudo-moar a18c06: OUTPUT: «Int $p = 1␤Int $v = 3␤Int $p = 4␤Int $v = 6␤»
16:14 mscha m: my @a = (1=>2, 3), (4=>5, 6); for @a -> ($p, $v) { dd $p, $v; } # So why isn't this?
16:14 camelia rakudo-moar a18c06: OUTPUT: «Too few positionals passed; expected 2 arguments but got 1 in sub-signature␤  in block <unit> at <tmp> line 1␤␤»
16:15 BenGoldberg m: my @a = (1=>2, 3), (4=>5, 6); for @a { dd $_ }
16:15 camelia rakudo-moar a18c06: OUTPUT: «List @a = $(1 => 2, 3)␤List @a = $(4 => 5, 6)␤»
16:15 BenGoldberg m: my @a = (1=>2, 3), (4=>5, 6); for @a -> @b { dd @b }
16:15 camelia rakudo-moar a18c06: OUTPUT: «(1 => 2, 3)␤(4 => 5, 6)␤»
16:16 mscha At least the error message is a bit better than in my local Rakudo Star 2017.04: This type cannot unbox to a native string: P6opaque, Int
16:16 mscha I guess it sees the pair as a named parameter?
16:16 BenGoldberg m: my @a = (1=>2, 3), (4=>5, 6); for @a -> (Any, $b) { dd $b }
16:16 camelia rakudo-moar a18c06: OUTPUT: «Too few positionals passed; expected 2 arguments but got 1 in sub-signature␤  in block <unit> at <tmp> line 1␤␤»
16:17 BenGoldberg m: my @a = (1=>2, 3), (4=>5, 6); for @a -> @b ($p, $b) { dd @b }
16:17 camelia rakudo-moar a18c06: OUTPUT: «Too few positionals passed; expected 2 arguments but got 1 in sub-signature of parameter @b␤  in block <unit> at <tmp> line 1␤␤»
16:17 BenGoldberg m: my @a = (1=>2, 3), (4=>5, 6); for @a -> @b ($wtf) { dd $wtf }
16:17 camelia rakudo-moar a18c06: OUTPUT: «Unexpected named argument '1' passed in sub-signature of parameter @b␤  in block <unit> at <tmp> line 1␤␤»
16:18 BenGoldberg m: my @a = (1=>2, 3), (4=>5, 6); for @a -> @b ($:1) { dd $1 }
16:18 camelia rakudo-moar a18c06: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Cannot declare a numeric parameter␤at <tmp>:1␤------> 3 (1=>2, 3), (4=>5, 6); for @a -> @b ($:17⏏5) { dd $1 }␤»
16:18 BenGoldberg m: my @a = (foo=>2, 3), (foo=>5, 6); for @a -> @b ($:foo) { dd $1 }
16:18 camelia rakudo-moar a18c06: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤In signature parameter, placeholder variables like $:foo are illegal␤you probably meant a named parameter: ':$foo'␤at <tmp>:1␤------> 3>2, 3), (foo=>5, 6); for @a -> @b ($:foo7⏏5) { dd $1 }␤ …»
16:18 BenGoldberg m: my @a = (foo=>2, 3), (foo=>5, 6); for @a -> @b (:$foo) { dd $foo }
16:18 camelia rakudo-moar a18c06: OUTPUT: «Too many positionals passed; expected 0 arguments but got 1 in sub-signature of parameter @b␤  in block <unit> at <tmp> line 1␤␤»
16:19 BenGoldberg m: my @a = (foo=>2, 3), (foo=>5, 6); for @a -> @b ($bar, :$foo) { dd $foo }
16:19 camelia rakudo-moar a18c06: OUTPUT: «Int $foo = 2␤Int $foo = 5␤»
16:19 ne_robot yeah, you did it :)
16:19 mscha That works if you have a fixed key in your pairs.
16:20 mscha But is this a bug or a feature?
16:20 BenGoldberg m: my @a = (foo=>2, 3), (foo=>5, 6); for @a -> @b (*%pairs) { dd %pairs }
16:20 camelia rakudo-moar a18c06: OUTPUT: «Too many positionals passed; expected 0 arguments but got 1 in sub-signature of parameter @b␤  in block <unit> at <tmp> line 1␤␤»
16:20 BenGoldberg m: my @a = (foo=>2, 3), (foo=>5, 6); for @a -> @b ($foo, *%pairs) { dd $foo, %pairs }
16:20 camelia rakudo-moar a18c06: OUTPUT: «Int $foo = 3␤{:foo(2)}␤Int $foo = 6␤{:foo(5)}␤»
16:20 BenGoldberg m: my @a = (1=>2, 3), (4=>5, 6); for @a -> @b ($foo, *%pairs) { dd $foo, %pairs }
16:20 camelia rakudo-moar a18c06: OUTPUT: «Int $foo = 3␤{"1" => 2}␤Int $foo = 6␤{"4" => 5}␤»
16:20 BenGoldberg m: my @a = (1=>2, 3), (4=>5, 6); for @a -> ($foo, *%pairs) { dd $foo, %pairs }
16:20 camelia rakudo-moar a18c06: OUTPUT: «Int $foo = 3␤{"1" => 2}␤Int $foo = 6␤{"4" => 5}␤»
16:21 BenGoldberg m: my @a = (1=>2, 3), (4=>5, 6); for @a -> @b { my ($a, $b) = @b; dd $a, $b }
16:21 camelia rakudo-moar a18c06: OUTPUT: «Pair $a = 1 => 2␤Int $b = 3␤Pair $a = 4 => 5␤Int $b = 6␤»
16:22 mscha m: my @a = (1=>2, 3), (4=>5, 6); for @a { dd $_[0], $_[1]; }
16:22 camelia rakudo-moar a18c06: OUTPUT: «1 => 2␤3␤4 => 5␤6␤»
16:22 BenGoldberg I didn't grok what was happening until I saw that "unexpected named argument '1'"
16:29 Cabanossi joined #perl6
16:38 dalek joined #perl6
16:40 Zoffix joined #perl6
16:40 Zoffix That's a feature
16:40 * Zoffix points to List.Capture docs
16:40 Zoffix Also, camelia takes /msg
16:42 Zoffix It's what drives: some-routine: |(:some-named<arg>, :42mews)
16:43 Zoffix "At least the error message is a bit better". Yeah, until recently non-Str-keyed Pairs were broken in that code.
16:44 ksn00b joined #perl6
16:45 thundergnat joined #perl6
16:49 thundergnat m: say (1,2).elems; say ().elems; say (1,2) X, ();  # Bugish? or wrong assumptions on my part?
16:49 yoleaux 24 May 2017 19:23Z <azawawi> thundergnat: You're welcome :)
16:49 camelia rakudo-moar a18c06: OUTPUT: «2␤0␤This type (Scalar) does not support elems␤  in block <unit> at <tmp> line 1␤␤»
16:50 thundergnat .oO(What part of it doesn't support .elems?)
16:50 araraloren m: say ().WHAT
16:50 camelia rakudo-moar a18c06: OUTPUT: «(List)␤»
16:50 Zoffix thundergnat: bug
16:50 Zoffix Please report it
16:50 thundergnat .k
16:50 Zoffix huggable: rakudobug
16:50 huggable Zoffix, Report bugs by emailing to rakudobug@perl.org
16:50 moritz the fact that Scalar shows up there at all makes it a bug
16:54 MasterDuke bisectable6: say (1,2).elems; say ().elems; say (1,2) X, ();
16:54 bisectable6 MasterDuke, Bisecting by exit code (old=2015.12 new=a18c064). Old exit code: 0
16:54 Zoffix m: say (1,2).elems; say ().elems; say (1,2) X, []
16:54 camelia rakudo-moar a18c06: OUTPUT: «2␤0␤()␤»
16:54 bisectable6 MasterDuke, bisect log: https://gist.github.com/7d49ce1401bee0ab3127c5d1be2a919e
16:54 bisectable6 MasterDuke, (2017-01-16) https://github.com/rakudo/rakudo/commit/8a3ff7b64b51a66e0e90437bbeb4793534a07026
16:57 Zoffix m: use nqp; nqp::elems(nqp::getattr((), List, '$!reified'))
16:57 camelia rakudo-moar a18c06: OUTPUT: «This type (Scalar) does not support elems␤  in block <unit> at <tmp> line 1␤␤»
16:57 * Zoffix sees where the bug's at
16:57 skids joined #perl6
17:00 Zoffix Or rather where it's crashing.
17:00 Zoffix m: use nqp; dd nqp::getattr((), List, '$!reified').^name; dd nqp::getattr([], List, '$!reified').^name
17:00 camelia rakudo-moar a18c06: OUTPUT: «"Mu"␤"IterationBuffer"␤»
17:00 Zoffix Both prolly should be the same? So this bug doesn't occur elsewhere?
17:04 thundergnat Rakudobugged RT#131395
17:04 ne_robot Geth:
17:04 Zoffix ne_robot: ?
17:06 ne_robot is this bot working always?
17:06 Zoffix Yes
17:06 ne_robot okay, I just thought somebody should ping it to call it
17:06 Zoffix Geth: uptime
17:06 Geth Zoffix, 2 weeks, 1 day, 2 hours, 16 minutes, and 30 seconds
17:07 Zoffix ne_robot: it announces commit made to many of Perl 6 repos
17:07 Geth ¦ doc: 2c79a41965 | (Zoffix Znet)++ | doc/Type/IO/Handle.pod6
17:07 Geth ¦ doc: List IO::Handle.print as a multi
17:07 Geth ¦ doc: review: https://github.com/perl6/doc/commit/2c79a41965
17:07 Zoffix Like that ^
17:21 Geth ¦ doc: 373c60bcf2 | (Zoffix Znet)++ | doc/Type/IO/Handle.pod6
17:21 Geth ¦ doc: List IO::Handle.say as multi
17:21 Geth ¦ doc: review: https://github.com/perl6/doc/commit/373c60bcf2
17:21 Geth ¦ doc: 70a80eccfb | (Zoffix Znet)++ | doc/Type/IO/Handle.pod6
17:21 Geth ¦ doc: [io grant] Document IO::Handle.put
17:21 Geth ¦ doc: review: https://github.com/perl6/doc/commit/70a80eccfb
17:21 setty1 joined #perl6
17:23 Geth ¦ doc: 6f58ed04b6 | (Zoffix Znet)++ | doc/Type/IO/Handle.pod6
17:23 Geth ¦ doc: [io grant] Polish IO::Handle.say
17:23 Geth ¦ doc:
17:23 Geth ¦ doc: - We have .put docs; mention them instead of .print
17:23 Geth ¦ doc: - Don't say we'll call .print-nl method; that's an implementation detail
17:23 Geth ¦ doc: review: https://github.com/perl6/doc/commit/6f58ed04b6
17:23 Zoffix left #perl6
17:25 travis-ci joined #perl6
17:25 travis-ci Doc build errored. Zoffix Znet 'List IO::Handle.print as a multi'
17:25 travis-ci https://travis-ci.org/perl6/doc/builds/237241299 https://github.com/perl6/doc/compare/f45241f1b03c...2c79a41965cd
17:25 travis-ci left #perl6
17:27 ovechkin joined #perl6
17:28 pilne joined #perl6
17:35 sufrostico joined #perl6
17:37 dj_goku joined #perl6
17:37 dj_goku joined #perl6
17:40 Herby_ joined #perl6
17:40 Geth ¦ doc: c1b7948ceb | (Zoffix Znet)++ | doc/Type/List.pod6
17:40 Geth ¦ doc: Document List.gist
17:40 Geth ¦ doc: review: https://github.com/perl6/doc/commit/c1b7948ceb
17:40 Herby_ o/
17:40 cdg joined #perl6
17:42 * lizmat has started on this weeks Perl 6 Weekly
17:43 lizmat please ping me if you think I'm about to forget something important that happened the past week
17:43 ne_robot what's the future of perl6, how do you think?
17:43 lizmat ne_robot: looks pretty bright to me  :-)
17:47 ne_robot I have some repos on GitHub, containing Python3 sources. I submitted some repos to PyPI, and therefore there is a folder with the name of the module
17:48 ne_robot what is the best way to place the ported Perl6 source to this repo?
17:49 ne_robot The basic scheme of my repo: .gitignore  fresh_proxy  README  LICENSE
17:49 ne_robot "fresh_proxy" is the name of the Python module
17:50 lizmat ne_robot: I think the current state of adding modules is documented at https://docs.perl6.org/language/modules.html
17:51 lizmat or more precisely: https://docs.perl6.org/language/modules.html#Distributing_Modules
17:51 me joined #perl6
17:51 lizmat you also want to take a look at https://github.com/skaji/mi6
17:54 espadrine joined #perl6
17:55 Geth ¦ doc: 3790a0fa0b | (Zoffix Znet)++ | doc/Type/IO.pod6
17:55 Geth ¦ doc: [io grant] Polish &put/&print/&say
17:55 Geth ¦ doc:
17:55 Geth ¦ doc: - Use the standard "Defined as:" headers
17:55 Geth ¦ doc: - .nl-out is not system-dependent
17:55 Geth ¦ doc: - Simplify all the prose
17:55 Geth ¦ doc: - Remove all the giant-series-of-numbers examples. Good grief.
17:56 Geth ¦ doc: - say() doesn't abridge anything. Redirect all complaints
17:56 Geth ¦ doc:     to .gist method of particular objects.
17:56 Geth ¦ doc: review: https://github.com/perl6/doc/commit/3790a0fa0b
17:56 mcmillhj joined #perl6
17:56 zapwai joined #perl6
17:56 Geth ¦ doc: 546e9b6c63 | (Zoffix Znet)++ | doc/Type/IO/Handle.pod6
17:56 Geth ¦ doc: Fix IO::Handle.nl-in sig
17:56 Geth ¦ doc: review: https://github.com/perl6/doc/commit/546e9b6c63
17:58 Herby_ what's the simplest way to sort a hash on values?  I have a frequency count and want to sort in descending order
17:58 Cabanossi joined #perl6
18:00 MasterDuke m: my %h = :1a, :2b; .say for %h.sort(-*.value)
18:00 camelia rakudo-moar 9494cb: OUTPUT: «b => 2␤a => 1␤»
18:01 Herby_ thanks MasterDuke
18:01 MasterDuke np
18:01 Herby_ Just found this example in the docs as well: for %vowels.sort(*.key)>>.kv -> ($vowel, $index) {
18:01 Herby_ "$vowel: $index".say;
18:01 Herby_ }
18:02 Herby_ but I think that example does it in ascending order
18:05 Herby_ m: my %h = :1a, :2b; .say for %h.sort(*.value)
18:05 camelia rakudo-moar 9494cb: OUTPUT: «a => 1␤b => 2␤»
18:06 lizmat Herby: note the "-" in the descending example  :-)
18:06 Herby_ just figured it out :)
18:06 Herby_ was wondering what that did
18:06 aguy joined #perl6
18:06 lizmat Herby_: where did you find that example?
18:07 lizmat the use of >> feels wrong there
18:07 MasterDuke heh, just noticed that too
18:07 Herby_ https://docs.perl6.org/type/Hash
18:08 Herby_ under the section "Looping over hash keys and values"
18:08 Herby_ i modified my example slightly to sort on value instead of key
18:08 ne_robot ugexe: is there a way to use custom user-agent in Net::HTTP?
18:10 ugexe set the user-agent header
18:15 aguy Is there anything like a type alias?
18:17 ugexe ne_robot: perl6 -e 'use Net::HTTP::GET; say Net::HTTP::GET("http://httpbin.org/headers", :header(:User-Agent("xxx"))).content(:force);'
18:18 ugexe m: sub foo(::T $thing) { say T.perl; say $thing; }; foo(1); foo("a") # aguy like this?
18:18 camelia rakudo-moar 9494cb: OUTPUT: «Int␤1␤Str␤a␤»
18:18 travis-ci joined #perl6
18:18 travis-ci Doc build passed. Zoffix Znet 'Document List.gist'
18:18 travis-ci https://travis-ci.org/perl6/doc/builds/237249427 https://github.com/perl6/doc/compare/6f58ed04b601...c1b7948ceba8
18:18 travis-ci left #perl6
18:19 Geth ¦ doc: 9945c75ed0 | (Zoffix Znet)++ | doc/Type/IO/Handle.pod6
18:19 Geth ¦ doc: Fix up IO::Handle.nl-in
18:19 Geth ¦ doc: review: https://github.com/perl6/doc/commit/9945c75ed0
18:19 Geth ¦ doc: ebb6f539e8 | (Zoffix Znet)++ | doc/Type/IO/Handle.pod6
18:19 Geth ¦ doc: [io grant] Document IO::Handle.nl-out attribute
18:19 Geth ¦ doc: review: https://github.com/perl6/doc/commit/ebb6f539e8
18:24 aguy similar, but i don't want to use it in a sub
18:28 ugexe where do you want to use it?
18:28 Cabanossi joined #perl6
18:29 aguy make something like Array of Numeric shorter
18:30 cdg joined #perl6
18:31 ugexe m: subset Arr of Array; my Arr $i; say $i ~~ Array
18:31 camelia rakudo-moar 9494cb: OUTPUT: «True␤»
18:32 ugexe m: subset Arr of Array[Num]; my Arr $i; say $i ~~ Array
18:32 camelia rakudo-moar 9494cb: OUTPUT: «True␤»
18:32 ugexe m: subset Arr of Array[Num]; my Arr $i; say $i ~~ Array[Num]
18:32 camelia rakudo-moar 9494cb: OUTPUT: «True␤»
18:32 ugexe m: subset Arr of Array[Num]; my Arr $i; say $i ~~ Array[Str]
18:32 camelia rakudo-moar 9494cb: OUTPUT: «False␤»
18:32 jnthn constant AoN = Array of Numeric;
18:32 aguy cool
18:33 aguy that is what i was looking for, ty
18:41 ufobat what do i need to do in order to add a 'resource file' (basically a random file) into a module, just add it in the provides section of the meta6.json?
18:43 ugexe add it to resources section of meta6.json
18:43 ufobat ah
18:44 ufobat https://design.perl6.org/S22.html#%25%3FRESOURCES
18:44 ufobat awesome, thanks
18:44 ugexe "resources" : "config.json" references "resources/config.json" OR whatever the installed version of it is
18:44 ugexe so in your module you just use %?RESOURCES<config.json>;
18:44 [Coke] m: say ().WHAT
18:44 camelia rakudo-moar 9494cb: OUTPUT: «(List)␤»
18:45 BenGoldberg m: dd %?RESOURCES
18:45 camelia rakudo-moar 9494cb: OUTPUT: «Nil␤»
18:45 greppable6 joined #perl6
18:45 BenGoldberg Would %?RESOURCES<config.json> produce a string, an IO, a filehandle, or what?
18:46 setty1 joined #perl6
18:46 * BenGoldberg expects one of those silly sha1 filenames, for an installed module...
18:47 ugexe a .IO, but you might want to explicitly .IO it yourself because it seems to fail to coerce under some circumstances
18:48 ugexe you can see the difference with `perl6 -Ilib bin/zef --help` and `zef --help` by looking at the line starting with "CONFIGURATION"
18:50 wamba joined #perl6
18:52 Geth ¦ doc: 53c9c91a03 | (Zoffix Znet)++ | doc/Type/IO/Handle.pod6
18:52 Geth ¦ doc: [io grant] Document IO::Handle.chomp attribute
18:52 Geth ¦ doc: review: https://github.com/perl6/doc/commit/53c9c91a03
18:52 Praise joined #perl6
18:52 Praise joined #perl6
18:58 Cabanossi joined #perl6
18:59 Geth ¦ doc: 77a1beb41e | (Jan-Olof Hendig)++ | doc/Language/traps.pod6
18:59 Geth ¦ doc: Fixed a few typos
18:59 Geth ¦ doc: review: https://github.com/perl6/doc/commit/77a1beb41e
19:13 domidumont joined #perl6
19:14 aguy rakudo: role Coordinate [$ordNumber, ::OrdType = Numeric] { has @.ordinates[$ordNumber] of OrdType; } ; class Point2D does Coordinate[2] { }
19:14 camelia rakudo-moar 608e88: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Cannot bind attributes in a Array[OrdType] type object␤at <tmp>:1␤»
19:14 aguy could this be a bug?
19:15 andrzejku joined #perl6
19:24 yqt joined #perl6
19:25 dj_goku joined #perl6
19:25 dj_goku joined #perl6
19:43 Cabanossi joined #perl6
19:46 Geth ¦ doc: ca2a3a0bfb | (Zoffix Znet)++ | 2 files
19:46 Geth ¦ doc: [io grant] Improve &open/IO::Handle.open docs
19:46 Geth ¦ doc:
19:46 Geth ¦ doc: - KISS &open; show a couple of basic examples and direct to
19:46 Geth ¦ doc:     IO::Handle.open for all the gory details
19:46 Geth ¦ doc: - List IO::Handle.open method
19:46 Geth ¦ doc: - Document all the possible mode options, in their overengineered glory
19:46 Geth ¦ doc: - List modes in a code chunk instead of a big =item list, which
19:46 Geth ¦ doc:     IMO is kinda hard to take in in whole
19:46 Geth ¦ doc: - Direct to docs of attributes for all the args that affect handle's
19:46 Geth ¦ doc:     attributes.
19:46 Geth ¦ doc: review: https://github.com/perl6/doc/commit/ca2a3a0bfb
19:53 Geth ¦ doc: a7f9cb77f0 | (Antonio Quinonez)++ (committed by Zoffix Znet) | doc/Language/performance.pod6
19:53 Geth ¦ doc: Edits to performance.pod6 (#1337)
19:53 Geth ¦ doc:
19:53 Geth ¦ doc: * Fix broken link, Perl 6 nbsp issue
19:53 Geth ¦ doc:
19:53 Geth ¦ doc: * Edit for clarity
19:53 Geth ¦ doc:
19:53 Geth ¦ doc: * Fix a sentence
19:53 Geth ¦ doc: review: https://github.com/perl6/doc/commit/a7f9cb77f0
19:55 nadim joined #perl6
19:56 lizmat and another Perl 6 Weekly hits the Net: https://p6weekly.wordpress.com/2017/05/29/2017-22-up-handle-encoding/
19:57 Herby_ \o/
19:59 robertle joined #perl6
20:10 bwisti joined #perl6
20:11 sufrostico joined #perl6
20:14 dj_goku joined #perl6
20:15 mr-foobar joined #perl6
20:22 Sound joined #perl6
20:26 dwarring joined #perl6
20:31 nine BenGoldberg: %?RESOURCES<config.json> gives you a Distribution::Resource object which shares a lot of methods (those for reading) with an IO::Path. There's also .IO for getting a plain IO::Path object.
20:33 mcmillhj joined #perl6
20:36 llfourn joined #perl6
20:36 thundergnat nine: not to waylay you or anything, but do you have any ideas on how to work around https://github.com/niner/Inline-Perl5/issues/92 ? It makes Inline::Perl5 more fiddly to use.
20:36 llfourn_ joined #perl6
20:37 Possum joined #perl6
20:40 thundergnat Hmmm. Don't know if this rises to the level of a bug, it it is certainly a WAT at least to me. https://gist.github.com/thundergnat/d6dd2d319afc71ee16234c58b3883f0f
20:40 thundergnat m: https://gist.github.com/thundergnat/d6dd2d319afc71ee16234c58b3883f0f
20:40 camelia rakudo-moar 608e88: OUTPUT: «(Int), 0␤(Int), 0␤(Int), 0␤(Int), 0␤(Int), 0␤(Int), 0␤(List), (1)␤»
20:40 wamba joined #perl6
20:44 geekosaur not a bug, not sure if it can be changed to do what you want
20:45 geekosaur ...I think
20:46 nine thundergnat: not a good one :/ I think, I'm just gonna exclude all lower cased modules from importing. By convention those should all be pragmas.
20:47 thundergnat geekosaur: The thing that really confuses me; if you uncomment the "say @d" line, it get the same thing in every instance, it just gives a different result for the .comb
20:47 pmurias joined #perl6
20:48 lizmat hmmm..  I guess we could have a .comb candidate for Int that would generate Int's
20:48 lizmat but that feels a bit too magic
20:49 geekosaur ^
20:49 thundergnat nine: Sigh, I suspected as much. I messed around with it for a while and couldn't come up with a good solution.
20:50 thundergnat nine: BTW, thanks for making it in the first place, the awesome greatly outweighs the WAT. :-)
20:53 thundergnat lizmat: The weird thing is that the d sub gets an array from .comb like every other instance, it just treats the array subindexing differently.
20:53 lizmat because it gets Str as indexes
20:54 thundergnat as does <1 1 0> but _that_ works as expected...
20:54 lizmat thundergnat: but those are IntStr's
20:54 lizmat so they use the Int candidate
20:54 thundergnat erm... Good point.
20:54 lizmat m: dd <1>, "1"
20:54 camelia rakudo-moar 608e88: OUTPUT: «IntStr.new(1, "1")␤"1"␤»
20:55 thundergnat Anyway, As I said not really a bug, but it confused me for about 15 minutes today.
20:55 lizmat thundergnat: I think this WAT warrants a rakudobug fwiw
20:55 lizmat it shouldn't make a difference
20:56 lizmat m: my @a = ^10; dd @a["5"]
20:56 camelia rakudo-moar 608e88: OUTPUT: «Int @a = 5␤»
20:56 lizmat there shouldn't be a difference
20:56 thundergnat Want me to rakudobug it?
20:58 thundergnat lizmat The other odd thing; if I do the subscripting as @d[$r][$c] ( rather than @d[$r;$c] ) it works as expected in all cases.
20:58 lizmat thundergnat: yes please
20:59 lizmat yeah, so the [;] candidate handles Str differently
20:59 lizmat definitely rakudobug this  :-)
21:00 thundergnat ok :) Thanks for the assistance (and all that you do. lizmat++ )
21:00 lizmat thundergnat: yw  :-)
21:13 Herby_ random question
21:14 Herby_ I noticed a small typo in the Think Perl 6 book on a code section.  Anyone know the best way to relay that to the authors Laurent Rosenfeld or Allen Downey?
21:14 Herby_ didn't know if Lauren hangs out on this channel
21:15 Herby_ Laurent
21:15 lizmat lolo78 if he's around
21:15 Herby_ thanks
21:16 Herby_ just found a way to submit the type on oreilly's site
21:16 MasterDuke there's also a github repo
21:16 lizmat https://github.com/AllenDowney/ThinkPerl6/issues
21:16 lizmat Herby_ ^^
21:17 Herby_ thanks MasterDuke
21:18 thundergnat lizmat: semicolon subscripting rukudobug RT#131397
21:18 lizmat thundergnat++
21:20 Herby_ and thanks lizmat :)
21:34 araujo joined #perl6
21:37 AlexDaniel joined #perl6
21:39 sammers joined #perl6
21:39 Geth ¦ doc: dd72a82c93 | (Zoffix Znet)++ | doc/Type/IO/Handle.pod6
21:39 Geth ¦ doc: Try to silence the syntax highlighter
21:39 Geth ¦ doc: review: https://github.com/perl6/doc/commit/dd72a82c93
21:39 Geth ¦ doc: d77c503985 | (Zoffix Znet)++ | doc/Type/IO/Handle.pod6
21:39 Geth ¦ doc: Consistently use "routine" in headings
21:39 Geth ¦ doc:
21:40 Geth ¦ doc: For sections that list both method and sub routines
21:40 Geth ¦ doc: review: https://github.com/perl6/doc/commit/d77c503985
21:40 Geth ¦ doc: 856e846509 | (Zoffix Znet)++ | doc/Language/io-guide.pod6
21:40 Geth ¦ doc: [io grant] Add Reading From Files section to TDIOG
21:40 Geth ¦ doc: review: https://github.com/perl6/doc/commit/856e846509
21:42 aborazmeh joined #perl6
21:42 aborazmeh joined #perl6
21:43 bwisti joined #perl6
21:43 Cabanossi joined #perl6
21:59 greppable6 joined #perl6
22:05 zacts joined #perl6
22:10 [1]Jarryd98 joined #perl6
22:13 Jarryd98 joined #perl6
22:18 Util joined #perl6
22:20 nowan joined #perl6
22:22 adu joined #perl6
22:32 Zoffix joined #perl6
22:33 Zoffix COMPLETION Report / Perl 6 IO TPF Grant: http://blogs.perl.org/users/zoffix_znet/2017/05/completion-report-perl-6-io-tpf-grant.html
22:38 [1]Jarryd98 joined #perl6
22:41 Zoffix And if you liked that work and wish to see more, donate to The Perl Foundation today! (specify "Perl 6 fund" in purpose field): https://donate.perlfoundation.org/
22:42 BenGoldberg joined #perl6
22:52 chubuntu joined #perl6
22:59 Jarryd98 joined #perl6
23:03 pmurias joined #perl6
23:06 adu joined #perl6
23:24 [1]Jarryd98 joined #perl6
23:37 tbrowder question: one line in Pod::To::Text is "$pod.map({pod2text($_)}).join("\n\n")" and I need to unwrap that statement if possible. can anyone show how to do that? thanks.
23:38 adu joined #perl6
23:39 Ben_Goldberg joined #perl6
23:43 kurahaupo tbrowder: $pod is a list, {pod2text($_)} is a small anonymous function, and .map is a method that applies a function to each element of a list and returns a new list of the results
23:44 TEttinger joined #perl6
23:46 kurahaupo tbrowder: then the .join method is applied to that resulting list, to return a single string. does that help?
23:47 tbrowder thanks, but is there a way to break that into a named function with separate, simpler statement? the line is returning an error that is hard to debug in its present form
23:47 Herby_ Zoffix: That's awesome.  Congrats on completing the grant work
23:49 Ben_Goldberg joined #perl6

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

Perl 6 | Reference Documentation | Rakudo