Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2017-04-18

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:04 labster and another great job, lizmat++
00:06 mcmillhj joined #perl6
00:07 cpage__ joined #perl6
00:20 BenGoldberg m: my method is-even (Int:D: --> Bool:D) { self %% 2 }; 42.^add_method("is-even", &is-even); say .is-even for 3, 12;
00:20 camelia rakudo-moar 241831: OUTPUT: «False␤True␤»
00:20 * BenGoldberg finds it funny that no .compose is needed for this.
00:24 sjn_ joined #perl6
00:25 greenspaceman joined #perl6
00:25 greenspaceman Hi!
00:25 skids o/
00:26 greenspaceman I'm trying to understand the behaviour of the .clone method, and it's been elluding me. Here's a minimal example of what looks like weird behaviour to me: https://pastebin.com/8enBKtdX
00:26 timotimo clone in perl6 is shallow
00:26 Xliff Um.
00:26 Xliff Here's an odd thing.
00:27 greenspaceman That explains a bit. But why the non-change in the first one?
00:27 Xliff m: my $idx = 0; say $idx"; $idx++
00:27 camelia rakudo-moar 241831: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Two terms in a row␤at <tmp>:1␤------> 3my $idx = 0; say $idx7⏏5"; $idx++␤    expecting any of:␤        infix␤        infix stopper␤        postfix␤        statement end␤        statem…»
00:27 Xliff m: my $idx = 0; say $idx; $idx++
00:27 camelia rakudo-moar 241831: OUTPUT: «0␤»
00:28 Xliff Why does my code say "Use of Nil in numeric context" when I do that in a loop.
00:28 timotimo what's your loop look like, exactly?
00:28 Xliff unless %market{$k}<sell>[$idx]<vol_remain> > $minVol {
00:28 Xliff say "I: $idx";
00:28 Xliff $idx++;
00:28 Xliff next;
00:28 Xliff }
00:28 timotimo hm, you gave $idx a value before that loop, yeah?
00:29 skids greenspaceman: The uninitialized attribute gets cloned unautovivified I think.
00:29 Xliff my ($minVol, $idx) = ($count / 10, 0);
00:29 Xliff So yes. That's done before the loop.
00:29 skids So you clone an autovivifier (a WHENCE)
00:29 timotimo Xliff: too tired to think, sorry. will now fall into bed
00:29 Xliff LOL
00:30 MasterDuke_ Xliff: where's the loop?
00:30 Xliff The only other thing that might be odd is:
00:30 Xliff my $count := $i[1];
00:30 Xliff MasterDuke_: Scroll up
00:30 greenspaceman Interesting. So, if I want deep-cloning I should implement it as a method for my classes, right?
00:30 mcmillhj joined #perl6
00:30 timotimo yeah, that's probably necessary
00:30 Xliff But I do work on $count.
00:31 Xliff And I like self-documenting code.
00:31 * skids tries to rmember if there is a deep clonish thing allready.
00:33 MasterDuke_ Xliff: but unless isn't a loop...?
00:35 Xliff Oh. Sorry. That's more code than I want to flood so lemme fpaste.
00:35 skids greenspaceman: yeah I'm not seeing anything built in.  Well, deepmap for lists, but no attribute traverser.
00:35 Xliff And changing the "$idx++" to "$idx = $idx + 1" doesn't fix the issue.
00:36 Cabanossi joined #perl6
00:36 timotimo might be able to >>.clone or something
00:36 timotimo since hyperops try to preserve structure
00:38 greenspaceman skids: Thanks! I'll implement it myself, then. I don't really need a full deep-clone so I should have done it anyway.
00:38 Xliff https://gist.github.com/Xliff/4bdd5ba8533488df8d9fc00802640af8
00:39 jast joined #perl6
00:40 MasterDuke_ if you say $idx right before the increment?
00:41 Xliff That is the original version, but yes, if I "say $idx" before the increment, I get a value.
00:41 Xliff So.... WTF
00:41 timotimo maybe the error's line number is wrong
00:41 Xliff Probably so.
00:46 mcmillhj joined #perl6
00:51 Xliff Problem is... why am I getting the wrong line number?
00:52 MasterDuke_ does --ll-exception say anything useful?
00:52 Xliff I'll check.
00:52 Xliff After this I will probably rakudobrew to see if it's just a commit oddness.
00:56 Xliff Renamed the variable and still getting same behavior.
00:56 Xliff This makes no sense.
01:00 Actualeyes joined #perl6
01:03 Xliff It was the line above.
01:03 Xliff Well that was LTA
01:06 Cabanossi joined #perl6
01:14 Xliff *sigh* -- also data issues. Fixed now. Thanks.
01:17 Dunearhp__ joined #perl6
01:27 Dunearhp_ joined #perl6
01:31 Dunearhp___ joined #perl6
01:32 Xliff If you sort something and assign it to a variable does that give you an array or a sequence?
01:32 Xliff I am assuming a sequence.
01:32 Xliff That has a hidden gotcha.
01:32 Xliff Because this line: %market{$k}<sell> = %m<quicklook><sell_orders><order>.sort: $sorter
01:33 Xliff I am assuming will return a sorted list, and it looks like that is not the case.
01:33 Xliff m: my %a; %a{list} = (1 2 3 4); %a{sorted_list} = %a.sort; dd %a
01:33 camelia rakudo-moar 241831: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Two terms in a row␤at <tmp>:1␤------> 3my %a; %a{list} = (17⏏5 2 3 4); %a{sorted_list} = %a.sort; dd %␤    expecting any of:␤        infix␤        infix stopper␤        statement end␤  …»
01:34 Xliff m: my %a; %a{list} = (1 2 3 4); %a{sorted_list} = %a.sort; dd %a;
01:34 camelia rakudo-moar 241831: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Two terms in a row␤at <tmp>:1␤------> 3my %a; %a{list} = (17⏏5 2 3 4); %a{sorted_list} = %a.sort; dd %␤    expecting any of:␤        infix␤        infix stopper␤        statement end␤  …»
01:34 Xliff m: my %a; %a{list} = q(1 2 3 4); %a{sorted_list} = %a.sort; dd %a;
01:34 camelia rakudo-moar 241831: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Unable to parse expression in argument list; couldn't find final ')' ␤at <tmp>:1␤------> 3my %a; %a{list} = q(17⏏5 2 3 4); %a{sorted_list} = %a.sort; dd %␤    expecting any of:␤        infix…»
01:34 Xliff m: my %a; %a{list} = (1, 2, 3, 4); %a{sorted_list} = %a.sort; dd %a;
01:34 camelia rakudo-moar 241831: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Undeclared routine:␤    sorted_list used at line 1␤␤»
01:34 Xliff m: my %a; %a<list> = (1, 2, 3, 4); %a<sorted_list> = %a.sort; dd %a;
01:34 camelia rakudo-moar 241831: OUTPUT: «Hash %a = {:list($(1, 2, 3, 4)), :sorted_list((:list($(1, 2, 3, 4)),).Seq)}␤»
01:34 Xliff m: my %a; %a<list> = (1, 2, 3, 4); %a<sorted_list> = %a.sort.list; dd %a;
01:34 camelia rakudo-moar 241831: OUTPUT: «Hash %a = {:list($(1, 2, 3, 4)), :sorted_list($(:list($(1, 2, 3, 4)),))}␤»
01:35 Xliff YEP.
01:35 Xliff So to extend that....
01:35 Xliff m: my %a; %a<list> = (1, 2, 3, 4); %a<sorted_list> = %a.sort.list; dd %a; my @a = %a<sorted_list; @a.elems.say
01:35 camelia rakudo-moar 241831: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Unable to parse quote-words subscript; couldn't find right angle quote␤at <tmp>:1␤------> 3%a; my @a = %a<sorted_list; @a.elems.say7⏏5<EOL>␤    expecting any of:␤        postfix␤»
01:35 Xliff m: my %a; %a<list> = (1, 2, 3, 4); %a<sorted_list> = %a.sort.list; dd %a; my @a = %a<sorted_list>; @a.elems.say
01:35 camelia rakudo-moar 241831: OUTPUT: «Hash %a = {:list($(1, 2, 3, 4)), :sorted_list($(:list($(1, 2, 3, 4)),))}␤1␤»
01:36 Xliff Is this the intended behavior?
01:37 TimToady yes, values in arrays and lists are itemized, so sometimes you have to .list them when you take them out
01:37 TimToady s/lists/hashes/
01:37 mr-foobar joined #perl6
01:38 TimToady m: my %a; %a<list> = (1, 2, 3, 4); %a<sorted_list> = %a.sort.list; dd %a; my @a = %a<sorted_list>[]; @a.elems.say
01:38 camelia rakudo-moar 241831: OUTPUT: «Hash %a = {:list($(1, 2, 3, 4)), :sorted_list($(:list($(1, 2, 3, 4)),))}␤1␤»
01:38 TimToady hmm, looks like an extra layer of $ there though
01:40 cyphase joined #perl6
01:46 TimToady m: my %a; %a<list> = (1, 2, 3, 4); %a<sorted_list> = %a<list>.sort.cache; dd %a; my @a = %a<sorted_list>[]; @a.elems.say
01:46 camelia rakudo-moar 241831: OUTPUT: «Hash %a = {:list($(1, 2, 3, 4)), :sorted_list($(1, 2, 3, 4))}␤4␤»
01:46 gdonald joined #perl6
01:46 TimToady m: my %a; %a<list> = (1, 2, 3, 4); %a<sorted_list> = %a<list>.sort.list; dd %a; my @a = %a<sorted_list>[]; @a.elems.say
01:46 camelia rakudo-moar 241831: OUTPUT: «Hash %a = {:list($(1, 2, 3, 4)), :sorted_list($(1, 2, 3, 4))}␤4␤»
01:46 TimToady m: my %a; %a<list> = (1, 2, 3, 4); %a<sorted_list> = %a<list>.sort.list; dd %a; my @a = %a<sorted_list>; @a.elems.say
01:46 camelia rakudo-moar 241831: OUTPUT: «Hash %a = {:list($(1, 2, 3, 4)), :sorted_list($(1, 2, 3, 4))}␤1␤»
01:46 TimToady yes, that all seems about right
01:46 u-ou does .sort on a scalarised list return another scalarised list?
01:46 wamba joined #perl6
01:47 ilbot3 joined #perl6
01:47 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:50 Xliff TimToady: But shouldn't assigning a sequence to an array give you a list off sorted values rather than a single valued list (where that value is the sequence).
01:51 Xliff m: my %a; %a<list> = (1, 2, 3, 4); %a<sorted_list> = %a.sort.list; dd %a; my @a = %a<sorted_list>; dd @a;
01:51 camelia rakudo-moar 241831: OUTPUT: «Hash %a = {:list($(1, 2, 3, 4)), :sorted_list($(:list($(1, 2, 3, 4)),))}␤Array @a = [(:list($(1, 2, 3, 4)),),]␤»
01:51 Xliff m: my %a; %a<list> = (1, 2, 3, 4); %a<sorted_list> = %a.sort; dd %a; my @a = %a<sorted_list>; dd @a;
01:51 camelia rakudo-moar 241831: OUTPUT: «Hash %a = {:list($(1, 2, 3, 4)), :sorted_list((:list($(1, 2, 3, 4)),).Seq)}␤Array @a = [Seq.new-consumed(),]␤»
01:51 Xliff Seq.new-consumed() ?!?
01:52 geekosaur because the dd %a ate it
01:52 u-ou I think assigning a sequence to a @ variable evaluates the whole sequence
01:52 Xliff m: my %a; %a<list> = (1, 2, 3, 4); %a<sorted_list> = %a.sort; my @a = %a<sorted_list>; dd @a;
01:52 camelia rakudo-moar 241831: OUTPUT: «Array @a = [(:list($(1, 2, 3, 4)),).Seq,]␤»
01:52 Xliff ^^ That's array containing a single Seq, not (1, 2, 3, 4).
01:53 Xliff m: my %a; %a<list> = (1, 2, 3, 4); %a<sorted_list> = %a<list>.sort; my @a = %a<sorted_list>; dd @a;
01:53 camelia rakudo-moar 241831: OUTPUT: «Array @a = [(1, 2, 3, 4).Seq,]␤»
01:53 Xliff Minor error
01:53 Xliff Still a seq.
01:53 Xliff m: my %a; %a<list> = (1, 2, 3, 4); %a<sorted_list> = %a<list>.sort; my @a = %a<sorted_list>; dd @a; @a.elems.say
01:53 camelia rakudo-moar 241831: OUTPUT: «Array @a = [(1, 2, 3, 4).Seq,]␤1␤»
01:54 MasterDuke_ m: my %a; %a<list> = (1, 2, 3, 4); %a<sorted_list> = %a<list>.list.sort; my @a = %a<sorted_list>; dd @a;
01:54 camelia rakudo-moar 241831: OUTPUT: «Array @a = [(1, 2, 3, 4).Seq,]␤»
01:54 MasterDuke_ m: my %a; %a<list> = (1, 2, 3, 4); %a<sorted_list> = %a<list>.sort; my @a = %a<sorted_list>.list; dd @a;
01:54 camelia rakudo-moar 241831: OUTPUT: «Array @a = [1, 2, 3, 4]␤»
01:54 MasterDuke_ m: my %a; %a<list> = (1, 2, 3, 4); %a<sorted_list> = %a<list>.sort; my @a = %a<sorted_list>[]; dd @a;
01:54 camelia rakudo-moar 241831: OUTPUT: «Array @a = [1, 2, 3, 4]␤»
01:55 Xliff "This Seq has already been iterated, and its values consumed
01:55 Xliff (you might solve this by adding .cache on usages of the Seq, or
01:55 Xliff by assigning the Seq into an array)"
01:55 Xliff ^^ So am I misunderstanding this message?
01:55 MasterDuke_ m: my %a; %a<list> = (1, 2, 3, 4); %a<sorted_list> := %a<list>.sort; my @a = %a<sorted_list>; dd @a;
01:55 camelia rakudo-moar 241831: OUTPUT: «Array @a = [1, 2, 3, 4]␤»
01:55 Xliff Ahhh...
01:56 MasterDuke_ the hash value is containerized
01:56 Xliff Still.... weird.
01:56 Xliff OK. That will probably solve it.
01:56 MasterDuke_ m: my %a; %a<list> = (5, 1, 2, 3, 4); %a<sorted_list> = %a<list>.sort; my @a = %a<sorted_list>[]; dd @a;
01:56 camelia rakudo-moar 241831: OUTPUT: «Array @a = [1, 2, 3, 4, 5]␤»
01:56 MasterDuke_ m: my %a; %a<list> = (5, 1, 2, 3, 4); %a<sorted_list> = %a<list>.sort; my @a = %a<sorted_list>; dd @a;
01:56 camelia rakudo-moar 241831: OUTPUT: «Array @a = [(1, 2, 3, 4, 5).Seq,]␤»
01:58 Xliff Using a bind in my code breaks it.
01:59 MasterDuke_ what about `%a<sorted_list>[]`?
01:59 Xliff m: my %a; %a<list> = (5, 1, 2, 3, 4); %a<sorted_list> = (%a<list>.sort)[]; dd %a
01:59 camelia rakudo-moar 241831: OUTPUT: «Hash %a = {:list($(5, 1, 2, 3, 4)), :sorted_list((1, 2, 3, 4, 5).Seq)}␤»
02:00 Xliff m: my %a; %a<list> = (5, 1, 2, 3, 4); %a<sorted_list> = %a<list>.sort.list; dd %a
02:00 camelia rakudo-moar 241831: OUTPUT: «Hash %a = {:list($(5, 1, 2, 3, 4)), :sorted_list($(1, 2, 3, 4, 5))}␤»
02:00 Xliff OK. Now here's the problem with .list.
02:02 Xliff m: my %a; %a<list> = ({ a=> 5}, { a=> 1}, { a=> 2 }); %a<sorted_list> = %a<list>.sort({ $^a<a> <=> $^b<a>}).list; dd %a
02:02 camelia rakudo-moar 241831: OUTPUT: «Hash %a = {:list($({:a(5)}, {:a(1)}, {:a(2)})), :sorted_list($({:a(1)}, {:a(2)}, {:a(5)}))}␤»
02:02 Xliff m: my %a; %a<list> = ({ a=> 5, b => 'a'}, { a=> 1, b => 'b' }, { a=> 2, b => 'c' }); %a<sorted_list> = %a<list>.sort({ $^a<a> <=> $^b<a>}).list; dd %a
02:02 camelia rakudo-moar 241831: OUTPUT: «Hash %a = {:list($({:a(5), :b("a")}, {:a(1), :b("b")}, {:a(2), :b("c")})), :sorted_list($({:a(1), :b("b")}, {:a(2), :b("c")}, {:a(5), :b("a")}))}␤»
02:03 Xliff Hmm...
02:03 Xliff camelia isn't doing it... dammit
02:03 Xliff m: my %a; %a<list> = ({ a=> 5, b => 'a'}, { a=> 1, d => 'b' }, { a=> 2, e => 'c' }); %a<sorted_list> = %a<list>.sort({ $^a<a> <=> $^b<a>}).list; dd %a
02:03 camelia rakudo-moar 241831: OUTPUT: «Hash %a = {:list($({:a(5), :b("a")}, {:a(1), :d("b")}, {:a(2), :e("c")})), :sorted_list($({:a(1), :d("b")}, {:a(2), :e("c")}, {:a(5), :b("a")}))}␤»
02:08 u-ou is it bad practice to call a Role's .new method, you're supposed to make a class that "does" that role first?
02:08 samcv heh nice. my rakudo-appimage gh-pages branch is now 465MB so far
02:08 samcv wonder how big a repo has to get for github to get mad at you?
02:09 samcv if you only keep like 50MB of files at a time in each revision
02:09 geekosaur u-ou, you can do it and an empoty class will be composed with it first
02:09 u-ou automagically like?
02:10 geekosaur as if you'd said (iirc): (class :: does TheRole {}).new
02:10 samcv rakudo is 41031KB, nqp is 110874KB
02:10 u-ou I see
02:10 samcv stats you can get in json here https://api.github.com/repos/perl6/nqp
02:10 geekosaur and yes, automagically
02:10 geekosaur roles can't be instantiated, so it has to compose a class with it
02:10 u-ou cool
02:12 MasterDuke_ it's called punning
02:12 shady0wl joined #perl6
02:12 pytuger joined #perl6
02:12 pytuger joined #perl6
02:16 noganex joined #perl6
02:18 Xliff I am getting this emitted every time I run perl6, now.
02:18 Xliff HERE:
02:18 Xliff - sym: :
02:18 Xliff - O:
02:19 Xliff m: my %a; %a<list> = ({ a=> 5, b => 'a'}, { a=> 1, d => 'b' }, { a=> 2, e => 'c' }); %a<list>.sort; dd %a;
02:19 camelia rakudo-moar 241831: OUTPUT: «Hash %a = {:list($({:a(5), :b("a")}, {:a(1), :d("b")}, {:a(2), :e("c")}))}␤»
02:22 Xliff m: my %a; %a<list> = ({ a=> 5, b => 'a'}, { a=> 1, d => 'b' }, { a=> 2, e => 'c' }); %a<list>.sort: { $^a<a> <=> $^b<a>}; dd %a;
02:22 camelia rakudo-moar 241831: OUTPUT: «Hash %a = {:list($({:a(5), :b("a")}, {:a(1), :d("b")}, {:a(2), :e("c")}))}␤»
02:23 Xliff m: my %a; %a<list> = ({ a=> 5, b => 'a'}, { a=> 1, d => 'b' }, { a=> 2, e => 'c' }); sort { $^a<a> <=> $^b<a>} %a<list>; dd %a;
02:23 camelia rakudo-moar 241831: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Missing comma after block argument to sort␤at <tmp>:1␤------> 3' }); sort { $^a<a> <=> $^b<a>} %a<list>7⏏5; dd %a;␤»
02:23 Xliff m: my %a; %a<list> = ({ a=> 5, b => 'a'}, { a=> 1, d => 'b' }, { a=> 2, e => 'c' }); sort { $^a<a> <=> $^b<a>}, %a<list>; dd %a;
02:23 camelia rakudo-moar 241831: OUTPUT: «Hash %a = {:list($({:a(5), :b("a")}, {:a(1), :d("b")}, {:a(2), :e("c")}))}␤»
02:26 dugword joined #perl6
02:26 dugword joined #perl6
02:31 ilmari joined #perl6
02:33 MasterDuke_ that's from a TimToady commit on the 10th
02:34 MasterDuke_ m: say "hi":
02:34 camelia rakudo-moar 241831: OUTPUT: «HERE:␤- sym: :␤- O: ␤␤hi␤»
02:36 Xliff m: say 1
02:36 camelia rakudo-moar 241831: OUTPUT: «1␤»
02:37 Xliff m: say 1:
02:37 camelia rakudo-moar 241831: OUTPUT: «HERE:␤- sym: :␤- O: ␤␤1␤»
02:37 Xliff What triggers it?
02:37 Xliff Or is it always there and camelia is suppressing it without the trailing ':'
02:38 AlexDaniel e: say 1
02:38 evalable6 AlexDaniel, rakudo-moar 241831e05: OUTPUT: «1»
02:38 AlexDaniel e: say 1:
02:38 evalable6 AlexDaniel, rakudo-moar 241831e05: OUTPUT: «HERE:␤- sym: :␤- O: ␤␤1»
02:38 cpage_ joined #perl6
02:39 MasterDuke_ https://github.com/rakudo/rakudo/blob/nom/src/Perl6/Grammar.nqp#L4504
02:39 MasterDuke_ https://github.com/rakudo/rakudo/commit/cdd625b68c24fd68789be2890a418ca1c4018b7b
02:40 Xliff So it's in my code somewhere?
02:40 Xliff I am having a hard time reading that.
02:40 MasterDuke_ i think it's a debugging thing that got accidentally left in
02:40 Xliff OK
02:42 MasterDuke_ .tell TimToady if you backlog here https://irclog.perlgeek.de/perl6/2017-04-18#i_14443061, was this intended?
02:42 yoleaux MasterDuke_: I'll pass your message to TimToady.
02:46 mcmillhj joined #perl6
02:55 Sgeo_ joined #perl6
02:56 Sgeo__ joined #perl6
03:01 AlexDaniel MasterDuke_: definitely not :D
03:02 mcmillhj joined #perl6
03:06 Cabanossi joined #perl6
03:13 MasterDuke_ seems unlikely for sure
03:19 AlexDaniel would be nice if somebody fixed it right away
03:19 AlexDaniel so that we don't wake up with a hundred of complaints :)
03:50 Cabanossi joined #perl6
04:09 xtreak joined #perl6
04:21 mcmillhj joined #perl6
04:33 Xliff *sigh*
04:33 Xliff If I have sub MAIN($a, $b, *%c), will the option --d be put in %c as %c<d> ?
04:34 Xliff Or will the main choke on "--d"
04:34 Xliff I have a script that will depend on a WHOLE passel of optional arguments and I don't want to clutter the signature.
04:34 Xliff Assuming I have that option.
04:35 Xliff Just tried it and MAIN throws back "--c=..." in USAGE.
04:35 Xliff And yes, it chokes on --d.
04:37 mcmillhj joined #perl6
04:47 CIAvash joined #perl6
04:53 mcmillhj joined #perl6
05:09 mcmillhj joined #perl6
05:20 wamba joined #perl6
05:20 Cabanossi joined #perl6
05:22 incredible-- joined #perl6
05:25 lowbro joined #perl6
05:25 lowbro joined #perl6
05:25 dugword joined #perl6
05:37 parv joined #perl6
05:37 Xliff m: sub a (Int $a Where (1..10)) { say $a }; a(5);
05:37 camelia rakudo-moar c9ebfc: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Malformed parameter␤at <tmp>:1␤------> 3sub a (Int $a7⏏5 Where (1..10)) { say $a }; a(5);␤    expecting any of:␤        constraint␤»
05:37 Xliff m: sub a (Int $a Where 1..10) { say $a }; a(5);
05:37 camelia rakudo-moar c9ebfc: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Malformed parameter␤at <tmp>:1␤------> 3sub a (Int $a7⏏5 Where 1..10) { say $a }; a(5);␤    expecting any of:␤        constraint␤»
05:37 Xliff m: sub a (Int $a Where * %% 2) { say $a }; a(5);
05:37 camelia rakudo-moar c9ebfc: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Malformed parameter␤at <tmp>:1␤------> 3sub a (Int $a7⏏5 Where * %% 2) { say $a }; a(5);␤    expecting any of:␤        constraint␤»
05:38 Xliff m: sub a (Int $a Where * > 0) { say $a; }; a(5).say
05:38 camelia rakudo-moar c9ebfc: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Malformed parameter␤at <tmp>:1␤------> 3sub a (Int $a7⏏5 Where * > 0) { say $a; }; a(5).say␤    expecting any of:␤        constraint␤»
05:40 Xliff m: subset Range of Int Where { .any(1..10) }; sub a (Range $a) { say $a; }; a(5).say
05:40 camelia rakudo-moar c9ebfc: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Two terms in a row␤at <tmp>:1␤------> 3subset Range of Int7⏏5 Where { .any(1..10) }; sub a (Range $a)␤    expecting any of:␤        infix␤        infix stopper␤        postfix␤        s…»
05:40 Xliff m: subset Range of Int Where { .any(1..10) }; sub a (Range $a) { say $a; }; a(5).say;
05:40 camelia rakudo-moar c9ebfc: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Two terms in a row␤at <tmp>:1␤------> 3subset Range of Int7⏏5 Where { .any(1..10) }; sub a (Range $a)␤    expecting any of:␤        infix␤        infix stopper␤        postfix␤        s…»
05:40 Xliff m: subset Range of Int Where { .any(1..10); }; sub a (Range $a) { say $a; }; a(5).say;
05:40 camelia rakudo-moar c9ebfc: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Two terms in a row␤at <tmp>:1␤------> 3subset Range of Int7⏏5 Where { .any(1..10); }; sub a (Range $a␤    expecting any of:␤        infix␤        infix stopper␤        postfix␤        s…»
05:43 CIAvash Xliff: Where → where
05:43 Xliff *groan*
05:43 Xliff CIAvash: Can you use slurpy named args in MAIN?
05:44 Xliff Right now it doesn't seem to be working for me.
05:44 Xliff (Thanks for the help, btw!)
05:50 RabidGravy joined #perl6
05:53 geekosaur joined #perl6
05:57 CIAvash Xliff: It seems *%foo works
05:57 Xliff Everytime I try that, USAGE says "--foo=..."
05:58 Xliff But I don't want "--foo", I want "--a_name_not_specified_in_the_signature"
05:58 Xliff And I will write custom USAGE
05:58 Xliff That's how slurpy's work in subs.
05:59 CIAvash It's only written in the usage, all options will be stored in %foo
05:59 Xliff When I try that, the USAGE gets called.
06:00 xtreak joined #perl6
06:00 Xliff Oh SNAP!
06:00 Xliff I was doing --noname blah, not --noname=blah
06:00 CIAvash :)
06:00 Xliff I wish there was a way of doing the former in P6 without too much work, buut.
06:01 Xliff 'kay well
06:01 Xliff I will save it for tomorrow.
06:17 gdonald joined #perl6
06:26 RabidGravy boom!
06:26 samcv hi RabidGravy
06:27 samcv i'm gonna have to open a lot of github tickets for these failing modules. having travis try installing every single eco module
06:27 samcv and i think it will time out before installing all of them. but. i could be wrong. but it seems likely
06:30 darutoko joined #perl6
06:32 RabidGravy I'm surprised it doesn't time out after about twenty to be honest
06:33 bioexpress joined #perl6
06:38 shady0wl joined #perl6
06:38 pytuger joined #perl6
06:38 pytuger joined #perl6
06:41 ChoHag joined #perl6
06:45 bioexpress Hello, I have the module "MyModule": use v6; unit class MyModule; use MyModule::Kurses; "MyModule::Kurses" looks like this: use v6; unit module MyModule::Kurses; use LibraryCheck; if library-exists('ncurses', v5) {} When I try to install "MyModule" I get this error: ===> Install [FAIL] for MyModule: ===SORRY!===
06:46 bioexpress Cannot invoke this object (REPR: Null; VMNull)  What could be the reason this fail? I get the same error when I use NCruses (instead of MyModule::Kurses)
06:52 RabidGravy dunno, do you have a reasonably recent rakudo?
06:54 bioexpress rakudo star 2017.01
06:55 RabidGravy Hmm that should be fine I guess, can you gist your actual code?
06:56 incredible joined #perl6
06:57 TimToady how are you installing?  I'm currently having a bit of trouble with zef...
06:57 bioexpress Can you tell me what "gist the code" means?
06:57 geekosaur post it at gist.github.com
06:57 geekosaur which is essentially temporary git repos
06:57 geekosaur for multi-file pastes
06:57 bioexpress How  could I do that?
06:58 bioexpress zef --force install /home/mm/lib/PERL6/MyModule-p6
06:58 bioexpress Should I create a git repo?
06:59 TimToady my zef doesn't seem to want to talk to github at the moment
06:59 RabidGravy :(
07:00 RabidGravy bioexpress, just go to https://gist.github.com/ and paste your code
07:00 RabidGravy then tell us the resulting URI
07:01 bioexpress ok
07:03 RabidGravy TimToady, well 'perl6 -MHTTP::UserAgent -e 'say HTTP::UserAgent.new.get("https://github.com/")'' seems okay from here so it may be local :)
07:03 cpage_ joined #perl6
07:05 Cabanossi joined #perl6
07:05 TimToady heh, I get: Could not find HTTP::UserAgent at line 1
07:06 gfldex TimToady: you can use zef to install that :->
07:06 bioexpress https://gist.github.com/anonymous/bfb46bc34ec39683aaba6501b233bc29
07:07 07EAAQC48 joined #perl6
07:07 32NAAEU0P joined #perl6
07:07 perlawhirl joined #perl6
07:07 perlawhirl_ joined #perl6
07:13 RabidGravy bioexpress, I can confirm what you are seeing
07:14 bioexpress Thx, I'm not alone.
07:15 TimToady reinstalling zef seems to have fixed my download problem; I probably nuked something it thought it could rely on at some point
07:19 zakharyas joined #perl6
07:20 perlawhirl joined #perl6
07:22 RabidGravy bioexpress, it looks like something funny with library-exists() being used where it is, I'm not quite sure why though
07:27 bioexpress Is this a bug?
07:35 committable6 joined #perl6
07:40 xtreak joined #perl6
07:41 labster joined #perl6
07:41 evalable6 joined #perl6
07:41 committable6 joined #perl6
07:41 bloatable6 joined #perl6
07:41 unicodable6 joined #perl6
07:41 benchable6 joined #perl6
07:41 bisectable6 joined #perl6
07:41 statisfiable6 joined #perl6
07:46 AlexDaniel joined #perl6
07:48 xtreak joined #perl6
07:50 Cabanossi joined #perl6
07:50 committable6 joined #perl6
07:54 domidumont joined #perl6
07:56 xtreak joined #perl6
07:56 domidumont joined #perl6
07:57 yqt joined #perl6
08:00 jonas1 joined #perl6
08:01 RabidGravy bioexpress, it's probably a bug, but I'm not sure who's bug it is,  inasmuch as the library-exists definitely works in all other circumstances and if you use like that in a module that is directly used it is fine
08:02 abraxxa joined #perl6
08:03 RabidGravy I think it's because it is being called while the MyModule is being compiled
08:04 mcmillhj joined #perl6
08:10 mcmillhj joined #perl6
08:26 mcmillhj joined #perl6
08:29 e1 joined #perl6
08:32 RabidGravy bioexpress, right, you can work around this by adding  "no precompilation;" at the top of the MyModule::Kurses - it's not ideal but should get you moving along
08:38 bioexpress joined #perl6
08:39 bioexpress RabidGravy, thanks for the help!
08:40 * lizmat clickbaits https://p6weekly.wordpress.com/2017/04/17/2017-16-io-hits-the-road/
08:41 cyphase joined #perl6
08:41 mcmillhj joined #perl6
08:45 RabidGravy I suspect that this is an alternative manifestation of https://rt.perl.org/Ticket/Display.html?id=127034
08:47 bjz joined #perl6
08:50 Cabanossi joined #perl6
08:55 robertle joined #perl6
09:04 xtreak joined #perl6
09:07 abraxxa joined #perl6
09:13 xtreak joined #perl6
09:24 lowbro joined #perl6
09:24 xtreak joined #perl6
09:24 lowbro joined #perl6
09:32 gdonald joined #perl6
09:32 eater is the definition of Build.pm documentated somewhere?
09:35 Cabanossi joined #perl6
09:37 samcv build.pm?
09:37 samcv there's no build.pm in rakudo or nqp repos
09:39 samcv oh is that in panda or zef maybe?
09:40 eater samcv: some zef / panda packages have them ye
09:42 samcv which?
09:42 samcv Panda::Builder?
09:42 samcv i'm getting 'Build' cannot inherit from 'Panda::Builder' because it is unknown. personally
09:44 eater samcv: f.x. Noiseline uses it
09:44 eater https://github.com/search?utf8=%E2%9C%93&amp;q=filename%3ABuild.pm+use+v6&amp;type=Code
09:48 samcv can seorch this way https://github.com/search?utf8=%E2%9C%93&amp;q=filename%3ABuild.pm+language%3Aperl6&amp;type=Code
09:48 samcv not all perl 6 files have use v6
09:48 samcv also we have https://github.com/search?utf8=%E2%9C%93&amp;q=filename%3ABuild.pm6+language%3Aperl6&amp;type=Code
09:49 samcv or all of them: https://github.com/search?utf8=%E2%9C%93&amp;q=filename%3ABuild.pm+filename%3ABuild.pm6+language%3Aperl6&amp;type=Code
09:52 samcv eater, so the exact eror you are getting is? is it the same as mine?
09:52 eater no, I just was looking if there was actually a spec/rfc
09:52 samcv oh. so you don't get any error
09:52 samcv ok
09:53 samcv well. you can install stuff without zef i mean. i think. or maybe it's special
09:53 eater samcv: this is for: https://github.com/ugexe/zef/issues/152#issuecomment-294594127
09:53 samcv idk perl6 -Ilib bin/zef install .
09:53 samcv i guess it uses itself to install itself
09:53 samcv which is weird but cool i guess
09:54 eater samcv: there needs to be a /global/ way to define build parameters
09:54 eater and currently there isn't
09:54 samcv ah
09:54 samcv it's called CFLAGS
09:54 samcv :P
09:54 eater fite me
09:55 samcv ok a non ENV variable way to set CFLAGS?
09:55 eater yea
09:55 samcv also i very much think is within the scope of zef
09:55 samcv it builds packages
09:55 samcv like saying it's out of scope for make
09:55 samcv unless it's using some other package to build?
09:55 eater so a binary package manager can inject those build parameters
09:55 dalek web-rakudo: e98193a | (Zoffix Znet)++ | download-page.php:
09:55 dalek web-rakudo: Fix sorting of point releases on rakudo.org/downloads/
09:55 dalek web-rakudo:
09:55 dalek web-rakudo: PHP's glob() gives them to us AFTER non-point releases, so when a
09:55 dalek web-rakudo: point release is the latest release, we end up with non-point release
09:55 dalek web-rakudo: in the "latest" box.
09:55 dalek web-rakudo:
09:55 dalek web-rakudo: Fix by shoving them into a separate array first and prepend to file
09:55 dalek web-rakudo: list when we get the first non-point release (or we're done looking
09:55 dalek web-rakudo: through files).
09:55 dalek web-rakudo: review: https://github.com/perl6/web-rakudo/commit/e98193ad8d
09:55 xtreak joined #perl6
09:55 samcv LibraryMake right?
09:56 eater that's currently one that's being weird
09:56 eater but I have the odd feeling the project is dead
09:57 bjz joined #perl6
09:58 samcv wait but zef has no dependencies
09:58 samcv hm
09:59 eater samcv: what do u mean?
09:59 incredible_ joined #perl6
10:00 samcv ok what is pulling in that package?
10:00 samcv the noiseline does i guess. and then that calls library make
10:00 eater yea
10:00 samcv well i'd make a PR
10:01 gregf_ joined #perl6
10:01 eater samcv: to where? LibraryMake?
10:01 samcv https://github.com/retupmoca/P6-LibraryMake/blob/master/lib/LibraryMake.pm6#L129  # %vars<CCFLAGS> = %*ENV<CCFLAGS> // $*VM.config<cflags>;
10:01 samcv yes
10:02 xtreak joined #perl6
10:02 samcv and if no response i mean can always fork it. multiple releases by the same name can exist. just make sure you put an :auth part in the module
10:02 eater cool
10:02 samcv iand get that used by the other one
10:02 samcv but yeah
10:02 samcv that's what i'd do
10:02 eater will look into it tonight
10:02 samcv thank you :)
10:03 eater after that I'll still look into actually defining Build.pm tho
10:03 eater because this is weird
10:05 El_Che hello's
10:05 Cabanossi joined #perl6
10:07 * samcv now has TEN travis builds running https://travis-ci.org/samcv/rakudo-appimage
10:07 samcv trying to install all of the modules in the ecosystem
10:07 samcv hopefully this is doable cause i only get 50 mins per build
10:07 samcv so sorted them by name, then split them into 10 pieces
10:08 samcv doesn't take dependencies into account so there's gonna be some overlap probably. but. simplest way to do it
10:32 wamba joined #perl6
10:33 bolangi joined #perl6
10:45 Geth ¦ doc: 9b184cb458 | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Language/glossary.pod6
10:45 Geth ¦ doc: Toss empty `handles` entry from glossary
10:45 Geth ¦ doc: review: https://github.com/perl6/doc/commit/9b184cb458
10:50 Cabanossi joined #perl6
11:16 AlexDaniel joined #perl6
11:20 shlomif joined #perl6
11:21 Zoffix joined #perl6
11:21 Zoffix El_Che: you may wanna hold on with your packages until 2017.04.2 is out
11:22 Zoffix (should be within next 10 hours)
11:26 Xliff_ joined #perl6
11:27 xtreak joined #perl6
11:42 pytuger joined #perl6
11:49 Stamm joined #perl6
11:50 Cabanossi joined #perl6
12:04 Khisanth joined #perl6
12:19 shlomif2 joined #perl6
12:20 Zoffix left #perl6
12:39 El_Che tell
12:40 El_Che !tell Zoffix Thx, I'll do that. I was just starting to create the pkgs, but indeed beter to wait
12:40 El_Che nope
12:42 MasterDuke_ El_Che: .tell
12:42 El_Che .tell El_Che you suck
12:42 yoleaux El_Che: Talking to yourself is the first sign of madness.
12:42 El_Che :)
12:42 El_Che .tell Zoffix Thx, I'll do that. I was just starting to create the pkgs, but indeed beter to wait
12:42 yoleaux El_Che: I'll pass your message to Zoffix.
12:46 mcmillhj joined #perl6
12:52 movl joined #perl6
12:57 domidumont joined #perl6
12:59 Geth ¦ ecosystem: 74a4b9dd5f | (Carl Mäsak)++ (committed using GitHub Web editor) | META.list
12:59 Geth ¦ ecosystem: Take tardis off the ecosystem list
12:59 Geth ¦ ecosystem:
12:59 Geth ¦ ecosystem: Project being dormant/unmaintained for a long time now without achieving escape velocity.
12:59 Geth ¦ ecosystem: review: https://github.com/perl6/ecosystem/commit/74a4b9dd5f
13:05 Cabanossi joined #perl6
13:16 raschipi joined #perl6
13:18 sufrostico joined #perl6
13:28 ChoHag joined #perl6
13:44 eater is panda btw abandoned? or does it just look like that?
13:45 moritz what's the difference?
13:47 eater my observation skills
13:50 Cabanossi joined #perl6
13:55 tadzik it's effectively abandoned
13:59 Geth ¦ Inline-Perl5: 81c8a1f4eb | (Stefan Seifert)++ | lib/Inline/Perl5.pm6
13:59 Geth ¦ Inline-Perl5: Fix accessing the helper shared lib when installed via Staging repo
13:59 Geth ¦ Inline-Perl5:
13:59 Geth ¦ Inline-Perl5: Rakudo will now return Distribution::Resource objects from %?RESOURCES
13:59 Geth ¦ Inline-Perl5: lookups. NativeCall knows how to deal with those, so we don't have to
13:59 Geth ¦ Inline-Perl5: stringify manually anymore. This allows for deferred creation of the
13:59 Geth ¦ Inline-Perl5: path and thus fixes issues when the path differs between compile time
13:59 Geth ¦ Inline-Perl5: and run time (as it does when installed via Staging repo).
13:59 Geth ¦ Inline-Perl5: review: https://github.com/niner/Inline-Perl5/commit/81c8a1f4eb
14:00 xtreak joined #perl6
14:05 sammers joined #perl6
14:05 wamba joined #perl6
14:12 xtreak joined #perl6
14:15 zoosha joined #perl6
14:22 azawawi joined #perl6
14:35 cdg joined #perl6
14:37 alphah Hi
14:37 alphah m: my %h; %h<a> = { k1 => "v1", k2 => "v2" }; %h<b> = { k2 => "v3", k4 => "v4" }; %h<a> ,= %h<b>
14:37 camelia rakudo-moar 647abf: ( no output )
14:37 alphah m: my %h; %h<a> = { k1 => "v1", k2 => "v2" }; %h<b> = { k2 => "v3", k4 => "v4" }; %h<a> ,= %h<b>; say %h
14:37 camelia rakudo-moar 647abf: OUTPUT: «{a => (\List_75262736 = (List_75262736 {k2 => v3, k4 => v4})), b => {k2 => v3, k4 => v4}}␤»
14:38 alphah why the output has \List_, and how can I make it show the key'values normally
14:38 moritz the \List_ stuff is because you have a circular reference in your data structure
14:39 moritz and you can show it normally by deleting circular references first
14:40 alphah mortiz: can you point out where is that circular refernce?
14:40 moritz or not necessarily circular, but referencing the same hash twice
14:41 moritz m: my %h; %h<a> = { k1 => "v1", k2 => "v2" }; %h<b> = { k2 = "v3", k4 => "v4" }; %h<a> ,= %h<b>; say %h<a>
14:41 camelia rakudo-moar 647abf: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Preceding context expects a term, but found infix = instead␤at <tmp>:1␤------> 3k1 => "v1", k2 => "v2" }; %h<b> = { k2 =7⏏5 "v3", k4 => "v4" }; %h<a> ,= %h<b>; say␤»
14:42 moritz m: my %h; %h<a> = { k1 => "v1", k2 => "v2" }; %h<b> = { k2 => "v3", k4 => "v4" }; %h<a> ,= %h<b>; say %h<a>
14:42 camelia rakudo-moar 647abf: OUTPUT: «(\List_77711440 = (List_77711440 {k2 => v3, k4 => v4}))␤»
14:43 moritz m: my %h; %h<a> = { k1 => "v1", k2 => "v2" }; %h<b> = { k2 => "v3", k4 => "v4" }; %h<a>.push(%h<b>.list); say %h<a>
14:43 camelia rakudo-moar 647abf: OUTPUT: «{k1 => v1, k2 => [v2 v3], k4 => v4}␤»
14:43 moritz m: my %h; %h<a> = { k1 => "v1", k2 => "v2" }; %h<b> = { k2 => "v3", k4 => "v4" }; %h<a>.push(%h<b>.list); say %h
14:43 camelia rakudo-moar 647abf: OUTPUT: «{a => {k1 => v1, k2 => [v2 v3], k4 => v4}, b => {k2 => v3, k4 => v4}}␤»
14:44 raschipi m: my %h; %h<a> = { k1 => "v1", k2 => "v2" }; %h<b> = { k2 => "v3", k4 => "v4" }; %h<a> ,= %h<b>; put %h<a>
14:44 camelia rakudo-moar 647abf: OUTPUT: «MoarVM panic: Memory allocation failed; could not allocate 64 bytes␤»
14:45 ifim joined #perl6
14:48 moritz m: my %a = a => 1; my %b = b => 2; %a ,= %b; say %a.perl
14:48 camelia rakudo-moar 647abf: OUTPUT: «{:a(1), :b(2)}␤»
14:48 moritz m: my $a = {a => 1}; my $b = {b => 2}; $a ,= $b; say $a.perl
14:48 camelia rakudo-moar 647abf: OUTPUT: «(my \List_61638160 = $(List_61638160, ${:b(2)}))␤»
14:49 moritz that's a simple way to reproduce
14:49 moritz basically the ,= doesn't flatten the hash, but creates a two-element list, the first of which is itself
14:50 alphah hmm
14:50 alphah makes sense now
14:50 moritz more or less
14:51 moritz I'm not sure it's desired behavior
14:51 moritz m: my $a = {a => 1}; my $b = {b => 2}; $a = $a,  $b; say $a.perl
14:51 camelia rakudo-moar 647abf: OUTPUT: «WARNINGS for <tmp>:␤Useless use of $b in sink context (line 1)␤${:a(1)}␤»
14:51 moritz m: my $a = {a => 1}; my $b = {b => 2}; $a = ($a, $b); say $a.perl
14:51 camelia rakudo-moar 647abf: OUTPUT: «(my \List_73800528 = $(List_73800528, ${:b(2)}))␤»
14:51 moritz but I guess it is; the evaluation order thingy is pretty well-tested
14:55 raschipi Couldn't .gist at least return something more descriptive there?
14:56 moritz easier said than done
14:56 moritz (especially if you also want it to be fast)
14:56 kybr joined #perl6
15:05 Cabanossi joined #perl6
15:12 perlpilot joined #perl6
15:18 timotimo alphah: can you tell us where you found the suggestion to use ,= to merge hashes?
15:22 alphah timotimo: it was here on the channel, I'll see if I can find it in log
15:26 alphah timotimo https://irclog.perlgeek.de/perl6/2017-04-12#i_14418748
15:27 alphah it also shows as a way to merge hashes by searching google
15:28 Geth ¦ doc: 03e435eb5b | (Brad Gilbert)++ (committed using GitHub Web editor) | doc/Language/quoting.pod6
15:28 Geth ¦ doc: Add missing Q adverbs to table
15:28 Geth ¦ doc: review: https://github.com/perl6/doc/commit/03e435eb5b
15:31 perlpilot TimToady: If you're feeling generous, #perl wonders why only arrays and scalars interpolate in Perl 5 (and 4).   There's speculation that it's because of the printf() formatters (and I guessed that also there was no "natural" way to interpolate keys and values that made sense)
15:33 perlpilot TimToady: er, to be slightly clearer ... why don't hashes interpolate in double quoted strings?
15:35 Cabanossi joined #perl6
15:35 Geth ¦ doc: ae4e48799c | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Language/unicode_texas.pod6
15:35 Geth ¦ doc: Add note that 「」 cannot be swapped to Q// in regexes
15:35 Geth ¦ doc: review: https://github.com/perl6/doc/commit/ae4e48799c
15:38 eroux joined #perl6
15:44 Resol joined #perl6
15:44 cdg joined #perl6
15:45 TimToady perlpilot: mostly just because it interfered with printf, but also because the use case is weak, and we hadn't thought of requiring some kind of subscript as we did in p6
15:46 TimToady there's never only one reason for anything in Perl :)
15:47 timotimo alphah: can't find it easily, what were your keywords?
15:51 TimToady timotimo: didn't you see the link?
15:52 TimToady oh, you were asking about the line after, nevermind
15:52 * TimToady heads back to the coffeemaker
15:53 timotimo yup :)
15:53 timotimo alphah: there's a difference between what you linked to and what you tried
15:54 timotimo your hashes are items inside another hash, i expect
15:54 timotimo and putting two items together with , makes things not flatten
15:54 alphah searching in google shows this at first page http://stackoverflow.com/questions/350018/how-can-i-combine-hashes-in-perl and I guess %hash1 = (%hash1, %hash2) is same as ,=
15:54 timotimo m: my %h; %h<a> = { k1 => "v1", k2 => "v2" }; %h<b> = { k2 => "v3", k4 => "v4" }; my %result = %h<a>, %h<b>; say %result.perl
15:54 camelia rakudo-moar 647abf: OUTPUT: «{"k1\tv1\nk2\tv2" => ${:k2("v3"), :k4("v4")}}␤»
15:54 timotimo haha
15:54 timotimo m: my %h; %h<a> = { k1 => "v1", k2 => "v2" }; %h<b> = { k2 => "v3", k4 => "v4" }; my %result = @(%h<a>), @(%h<b>); say %result.perl
15:54 camelia rakudo-moar 647abf: OUTPUT: «{"k1\tv1 k2\tv2" => (:k4("v4"), :k2("v3")).Seq}␤»
15:55 timotimo m: my %h; %h<a> = { k1 => "v1", k2 => "v2" }; %h<b> = { k2 => "v3", k4 => "v4" }; say %h.perl; my %result = @(%h<a>), @(%h<b>); say %result.perl
15:55 camelia rakudo-moar 647abf: OUTPUT: «{:a(${:k1("v1"), :k2("v2")}), :b(${:k2("v3"), :k4("v4")})}␤{"k1\tv1 k2\tv2" => (:k4("v4"), :k2("v3")).Seq}␤»
15:55 timotimo m: my %h; %h<a> = { k1 => "v1", k2 => "v2" }; %h<b> = { k2 => "v3", k4 => "v4" }; my %result = flat %h<a>.list, %h<b>.list; say %result.perl
15:55 camelia rakudo-moar 647abf: OUTPUT: «{:k1("v1"), :k2("v3"), :k4("v4")}␤»
15:55 alphah Actually what I'm trying to do is: I have two grammars, 1 grammar pasrse a config file and cretae a hash of configs, second grammar parses command line args, and I need to merge these two hashes into one hash
15:55 timotimo oh, what did you want keys existing in both hashes to do?
15:57 alphah in case duplicates keys, the second hash overwrites the first hash
15:57 timotimo m: my %h; %h<a> = { k1 => "v1", k2 => "v2" }; %h<b> = { k2 => "v3", k4 => "v4" }; %h<a> <<=<< %h<b>; say %h.perl
15:57 camelia rakudo-moar 647abf: OUTPUT: «{:a(${:k1("v1"), :k2("v3"), :k4("v4")}), :b(${:k2("v3"), :k4("v4")})}␤»
15:58 timotimo m: my %h; %h<a> = { k1 => "v1", k2 => "v2" }; %h<b> = { k2 => "v3", k4 => "v4" }; %h<a> <<=<< %h<b>; say %h<a>.perl
15:58 camelia rakudo-moar 647abf: OUTPUT: «${:k1("v1"), :k2("v3"), :k4("v4")}␤»
15:58 timotimo more like that
15:58 timotimo that looks right, doesn't it?
15:58 sufrostico joined #perl6
15:59 alphah looks right, will test on my code...
16:00 timotimo it probably descends into substructures
16:00 alphah I remeber, I tried that earlier,, it works in some cases, and in other cases it throws error regarding left side or right side values,, one is bigger than the other
16:01 timotimo so if any configured things are lists, better see how that influences things
16:01 alphah i'll try to reproduce the error
16:07 alphah it was something like this (can not reproduce it now thugh):
16:07 alphah Lists on either side of non-dwimmy hyperop of infix:<=> are not of the same length while recursing
16:07 alphah left: 2 elements, right: 1 elements
16:07 timotimo did you write >>=<<?
16:08 setty1 joined #perl6
16:08 alphah i wrote <<=<<
16:08 timotimo interesting, this might be a bug in the implementation of hyper, then
16:10 sufrostico joined #perl6
16:10 alphah just to be clear, not in the above code, I got this error earlier in my code, when change the config file contents (which get parsed by a grammar)
16:10 timotimo mhm, if you get that error again, you could output the .perl (or even .&to-json from JSON::Fast) both hashes beore attempting the merge
16:10 timotimo then clean up any strings with sensitive data and put it up somewhere for us to see
16:11 alphah will do
16:16 sufrostico joined #perl6
16:24 sufrostico joined #perl6
16:35 Cabanossi joined #perl6
16:46 mcmillhj joined #perl6
16:49 lostinfog joined #perl6
17:01 eater joined #perl6
17:05 robertle joined #perl6
17:23 pat_js joined #perl6
17:29 sufrostico joined #perl6
17:33 grondilu_ joined #perl6
17:36 domidumont joined #perl6
17:40 domidumont joined #perl6
17:41 domidumont joined #perl6
17:46 TEttinger joined #perl6
17:50 ovechkin joined #perl6
17:51 incredible joined #perl6
17:57 Geth ¦ Inline-Perl5: d03317170d | (Stefan Seifert)++ | META6.json
17:57 Geth ¦ Inline-Perl5: Version 0.25
17:57 Geth ¦ Inline-Perl5: review: https://github.com/niner/Inline-Perl5/commit/d03317170d
18:01 grondilu joined #perl6
18:02 grondilu I was trying to golf FFT on RC.  I got a neat short code that was just slightly inaccurate.  Turns out I had to tweak &cis to make it better:  http://paste.debian.net/928234/
18:03 grondilu relevant part is:
18:03 grondilu sub my-cis($a) { $a < 0 ?? -cis($a + pi) !!  cis($a) }
18:03 grondilu m: say cos(pi/4) + cos(pi + pi/4)
18:03 camelia rakudo-moar 647abf: OUTPUT: «-1.11022302462516e-16␤»
18:03 ovechkin joined #perl6
18:04 grondilu m: say cos(pi/4) - cos((pi + pi/4) % pi)
18:04 camelia rakudo-moar 647abf: OUTPUT: «0␤»
18:04 grondilu seems a bit LTA imgo
18:05 grondilu *imho
18:06 grondilu basically I'm wondering if trigonometric functions could not use symmetric properties explicitely
18:09 grondilu though it seems no programming language seems to do it.
18:09 timotimo that'd be a little crazy :)
18:10 grondilu "crazy" sounds a bit harsh
18:10 grondilu slightly overkill, maybe
18:11 geekosaur you're ore in the realm of stuff like mathematica here
18:11 geekosaur *more
18:11 cdg_ joined #perl6
18:11 grondilu I dunno
18:11 grondilu not really
18:11 geekosaur or numerical methods libraries
18:12 geekosaur which aren't the default because they tend to be slower
18:13 grondilu It bugs me that I have a shorter program for FFT but I can't use it because cis(x) is not exactly -cis(x + pi) :/
18:19 grondilu m: proto my-cos($) {*}; multi my-cos($x where * < 0) { my-cos(-$x) }; multi my-cos($x where $x > tau) { my-cos($x % tau) }; multi my-cos($x) { cos($x) }; say my-cos(pi/4) - my-cos(pi/4 + pi)
18:19 camelia rakudo-moar 4a560a: OUTPUT: «1.4142135623731␤»
18:20 grondilu failed, nvm
18:43 grondilu could be done with polymorphism though:  http://paste.debian.net/928235/
18:43 * grondilu tries it in Real.pm and recompiles rakudo
18:48 sjn \o
18:48 raschipi heya
18:49 * sjn is getting a fail during the configuration step when rebuilding moar (I'm upgrading from an older version using rakudobrew)
18:50 sjn has there been any important changes there lately?
18:50 geekosaur does it mention libtommath?
18:50 * sjn would prefer not to nuke stuff
18:50 gfldex moarvm does need a `make distclean` every now and then
18:52 azawawi joined #perl6
18:52 azawawi iH
18:54 geekosaur olleH
18:54 azawawi :)
18:54 gfldex ıɐɥo
18:55 AlexDaniel joined #perl6
18:57 committable6 joined #perl6
18:58 * azawawi is reading https://en.wikipedia.org/wiki/Abjad_numerals
18:59 agentzh joined #perl6
19:03 timotimo how long is the tommath thing going to follow me around ;_;
19:11 sjn geekosaur: yeah, there's a libtommath warning there
19:12 geekosaur foreverrrrrrrr
19:13 geekosaur anyway, "someone" oopsed with libtommath and you need to remove it from the local git reference and let it be re-downloaded
19:13 sjn ook
19:13 dwarring joined #perl6
19:13 * sjn does that
19:14 geekosaur (or possibly just nuke ~/.rakudobrew and start over, which I do every so often because it doesn't do useful things like track tags so when a new version is tagged it doesn;t notice and reports itself as an older version)
19:14 sjn hm. is there a sane way to record which modules have been installed and then reinstall those?
19:15 sjn (after nuking moar, that is)
19:15 geekosaur that I don't know
19:17 sjn possible a question for #perl6-toolchain
19:17 sjn possibly*
19:20 RabidGravy sjn, see App::ModuleSnap in the ecosystem, it is precisely for trhat
19:21 RabidGravy obviously you have to install and run it before nuking everything
19:22 sjn \o/
19:28 sjn well, that one didn't seem to work
19:35 RabidGravy in what way?
19:39 moray` joined #perl6
19:39 RabidGravy haha, just tested it, okay
19:40 RabidGravy one minute
19:40 sjn getting a "Type 'META6' is not declared" error
19:40 sjn when running p6-module-snapshot
19:40 RabidGravy yes, just fixing
19:40 sjn sweet
19:41 eater d'aww //= is a thing but =// isn't :(
19:42 jnthn eater: R
19:43 jnthn If you want to reverse the argument order, anyway :)
19:43 eater jnthn: what do you mean?
19:44 jnthn I'm assuming you wanted to test the RHS for definedness instead of the left?
19:44 jnthn If not, I don't know what you want
19:44 gfldex m: my $v; 55 R//= $v;
19:44 camelia rakudo-moar 052dfc: OUTPUT: «===SORRY!===␤Cannot find method 'ann' on object of type NQPMu␤»
19:45 jnthn m: my $v; 55 [R//]= $v;
19:45 camelia rakudo-moar 052dfc: OUTPUT: «Cannot modify an immutable Int␤  in block <unit> at <tmp> line 1␤␤»
19:45 jnthn m: my $v; 55 R[//]= $v;
19:45 camelia rakudo-moar 052dfc: OUTPUT: «===SORRY!===␤Cannot find method 'ann' on object of type NQPMu␤»
19:45 jnthn Hmm...darn
19:45 eater I wanted to do A =// B, if B is defined do assign to a
19:45 jnthn I thought that would work
19:45 eater d'aww :')
19:45 jnthn But yeah, that R thing should do it
19:46 RabidGravy sjn, should be fixed now
19:46 jnthn In theory :)
19:46 sjn :d
19:49 eater jnthn: any documentation on that, my Moar is just telling me Im doing it wrong :')
19:50 Cabanossi joined #perl6
19:51 Zoffix joined #perl6
19:52 Zoffix .tell El_Che you're good for packages. 2017.04.2 is out
19:52 yoleaux Zoffix: I'll pass your message to El_Che.
19:52 Zoffix left #perl6
19:52 eater oh
19:52 eater because I'm doing it wrong
19:53 eater jnthn: Thanks it works :D
19:54 zakharyas joined #perl6
19:55 cdg joined #perl6
19:55 b2gills m: my $v; 55 R[R[//]]= $v; say $v; # That doesn't seem right
19:55 camelia rakudo-moar 052dfc: OUTPUT: «55␤»
19:57 * sjn wishes that perl6 could offer a warning when people are using unnecessary convoluted programming constructs... "WARNING: Possible future headache and/or homicide reason detected"
20:00 raschipi It does provide enough rope to hang oneself.
20:00 * sjn is more worried about the people who come later and have to rummage through the rotting corpses
20:01 perlpilot sjn: perhaps you could write a module that implements that functionality
20:01 gdonald joined #perl6
20:03 sjn perlpilot: maybe I will (just waiting for DrForr's linter^H^H^H^H^H^Hparser to become good enough for it :D )
20:04 samcv my job limits are still exceeding the time limit
20:05 samcv and i split it into 20 sections, to install all the eco modules
20:06 moritz run 'em on hack?
20:06 samcv yeah. i should
20:06 samcv that's www.p6c.org?
20:07 moritz hack.p6c.org
20:07 samcv oh
20:07 samcv i don't have an account there then. only at www.p6c.org
20:07 moritz you do
20:07 samcv oh ok
20:07 moritz at least there's a /home/samcv :-)
20:07 moritz and a user of that name
20:08 samcv ok i'm connected :)
20:08 samcv yay cpu's
20:08 samcv though idk if zef can do parallel testing for bulids
20:11 gfldex samcv: zef itself is basically a set of modules. Shouldn't be to hard to make many things happen at the same time with it.
20:13 espadrine joined #perl6
20:14 kurahaupo joined #perl6
20:15 ChoHag joined #perl6
20:19 dominix joined #perl6
20:20 dominix hi there.
20:20 dominix I am looking for damian conway perl6 module Quantum::Computation
20:20 gfldex m: say „ohai dominix!“;
20:20 camelia rakudo-moar e1c086: OUTPUT: «ohai dominix!␤»
20:21 dominix aloha !
20:22 moritz dominix: Damian doesn't seem to have published it on https://modules.perl6.org/ :(
20:22 moritz which means I have no idea where to find it
20:22 [Coke] eco: Wuantum
20:22 [Coke] eco: Quantum
20:22 moritz http://modules.perl6.org/#q=quantum
20:22 [Coke] thank you moritz-bot!
20:23 [Coke] dominix: where did you hear about it?
20:23 timotimo but that isn't dconway's module
20:23 dominix he is talking about it in his famous talk "On The Shoulders Of Giants" YAPC-NA 2016
20:24 dominix so this "may" exists
20:24 moritz yes, he's good at giving talks, but not very good at interacting the community
20:24 [Coke] don't see it on cpan, either, or github.
20:24 moritz like, following community wide conventions for what you do with your modules, and stuff :-)
20:25 timotimo he's hardly got time to hang around here and learn about how we do things
20:25 dct joined #perl6
20:25 timotimo and to be fair, how we do things changes every now and then
20:25 [Coke] eh. it's not surprising to have a module you whipped up for a talk that you didn't quite get to publishing. I can't give him crap for that, moritz.
20:26 moritz [Coke]: did I give him crap for it?
20:26 sjn Hm... is Task::Star still someting people use? It seems zef is having trouble installing it
20:27 gfldex sjn: known issue, will be resolved soon
20:27 sjn ah, ok
20:27 timotimo yeah we haven't done a star release in a while, so the modules aren't really up to snuff
20:28 * sjn sees ufo is there (does anyone still use that?)
20:28 moritz sjn: not really
20:28 sjn thought so
20:29 timotimo i'm also not sure if the list of modules inside star and Task::Star have been kept in sync
20:32 dominix I have been an heavy user of Parse::Recdescent very usefuul to me
20:33 dominix the talk https://www.youtube.com/watch?v=Nq2HkAYbG5o
20:38 [Coke] moritz: yes, that's how I read the "not very good" comment.
20:39 TEttinger huh, I thought quantum was related to the superposition stuff that would later be called junctions
20:42 timotimo TEttinger: nah, it's a bit different still
20:43 raschipi Boolean superposition is different from Quantum Superposition.
20:46 perlpilot dominix: oh, just extract the module from the slides ;->
20:49 dominix perlpilot: he didn't show the content ...
20:49 cdg joined #perl6
20:49 sjn RabidGravy: seems p6-module-snapshot ignores --directory
20:50 moritz [Coke]: ah, the fun not being a native language speaker. For me, "not very good" is far away from "terrible", for example. Getting the nuances right can be hard for me :/
20:50 RabidGravy sjn, probably
20:51 cdg joined #perl6
20:52 TEttinger moritz: double-plus ungood
20:53 moritz TEttinger: nah, just ungood
20:53 sjn single-plus ungood
20:53 cdg joined #perl6
20:54 TEttinger half-plus ungood
20:54 sjn moritz: the term you might be looking for is "has room for improvement" :)
20:55 sjn understatements <3
20:55 perlpilot [Coke]: I think you read it the right way the first time even if moritz didn't quite mean it that way.   Damian is infamous for showing off modules that don't seem to exist in a public space.   :)
20:56 Redrield joined #perl6
20:56 Redrield Are there any hacks or workarounds that I need to do in order to get the Padre plugin to install on Windows?
20:56 perlpilot dominix: yeah, but he *described* it, right?  Surely you should be able to reverse engineer it  ;)
20:57 moritz underestimatatemens <3
21:00 cdg_ joined #perl6
21:01 dominix perlpilot: i would love to be able to ...
21:01 Redrield This is my .cpanm/build.log when I try to install the Perl6 plugin https://hastebin.com/mecuruxije.php
21:01 Redrield How could I solve this?
21:03 perlpilot Redrield: that's probably more of a question for #perl than #perl6
21:03 Redrield Alright
21:05 sufrostico joined #perl6
21:06 gdonald joined #perl6
21:07 * grondilu learns about "numeric underflow" and is amused
21:08 grondilu m: say 10**-304
21:08 camelia rakudo-moar e1c086: OUTPUT: «1e-304␤»
21:08 grondilu o.O
21:09 grondilu 10**-304 gives me a "Numeric underflow" on my machine
21:09 cdg joined #perl6
21:09 TEttinger m: say 10**-305
21:09 camelia rakudo-moar e1c086: OUTPUT: «1e-305␤»
21:10 TEttinger m: say 10**-1005
21:10 camelia rakudo-moar e1c086: OUTPUT: «Numeric underflow␤  in block <unit> at <tmp> line 1␤␤Actually thrown at:␤  in block <unit> at <tmp> line 1␤␤»
21:10 TEttinger there we go
21:11 * grondilu wonders if there is any use of such small numbers anywhere
21:12 perlpilot LHC?
21:12 dominix ok bye 6ers ...
21:12 dominix left #perl6
21:12 grondilu perlpilot: I doubt it, not even them.
21:18 perlpilot Just like the 100th or 1000th digit of pi then ... not all that useful   :)
21:28 grondilu btw in the core pi currently has 18 decimals.  Is there any particular reason to stop there?
21:29 grondilu m: say 18*log(10)/log(2)
21:29 camelia rakudo-moar e1c086: OUTPUT: «59.7947057079725␤»
21:30 * grondilu guesses it's the best accuracy with 64 bits
21:30 timotimo This heloþor.p6 is the example provided in this repo, which you should have cloned or downloaded in the usual way. Check out the use of þ. Cool, isn't it? You can use any other directory instead of /app
21:30 timotimo This heloþor.p6 is the example provided in this repo, which you should have cloned or downloaded in the usual way. Check out the use of þ. Cool, isn't it? You can use any other directory instead of /app
21:31 timotimo ... whoops
21:43 samcv moritz, hack.p6c.org doesn't have fuse
21:43 samcv also interestingly if you don't have fuse it says that you can use a --appimage-extract option and it'll extract the appimage for you or something. that sounds fancy
21:43 samcv so i guess fuse isn't strictly required. just more convenient
21:48 samcv also i don't have the `tee` command X|
21:49 Redrield I can't install the Perl6 plugin for Padre
21:49 samcv i believe you
21:49 samcv Padre. is. buggy
21:49 * Redrield sighs
21:50 samcv i would recommend https://github.com/samcv/Atom-as-a-Perl6-IDE
21:50 Redrield I don't suppose there's a good VSCode Perl6 plugin that's gone under the radar?
21:50 samcv these packages with Atom
21:50 Redrield I really don't feel like getting atom
21:50 samcv please see the link.
21:50 samcv :\
21:50 Redrield Alrigh
21:51 samcv it has the best perl 6 support
21:51 DrForr New post on theperlfisher.blogspot.ro on grammars and metadata.
21:52 Redrield Yeah, I just...
21:52 Redrield I really don't like Atom
21:52 Redrield Ah well
21:52 samcv it has gotten a lot better than it used to be
21:53 samcv and i'm pretty comfortable with those plugins listed on that page
21:53 timotimo i do all my perl6 in vim
21:54 MasterDuke_ vim here too
21:56 samcv somebody should make a PR to atom-nav-panel-plus to add native support in for getting classes/routine/method names on the sid ebar
21:56 samcv without a config file. hmm
21:56 samcv similar to how this PR is https://github.com/0tho/atom-nav-panel-plus/pull/6/files
21:57 samcv so we don't have to have a .nav-panel-plus file or whatever
22:09 mcmillhj joined #perl6
22:10 samcv oh looks like i hosed my PATH var and that's why i could'nt use any programs. good going /me
22:20 skids joined #perl6
22:21 samcv i still need fuse though
22:24 lizmat joined #perl6
22:24 samcv nice. ok. well worked around and it now trying to install every module
22:29 lizmat_ joined #perl6
22:29 perigrin joined #perl6
22:29 muzza joined #perl6
22:32 Redrield I was just looking through the examples on the site
22:32 Redrield Is there an easier way to express infinity other than ∞?
22:32 sjn easier than one character?
22:33 Redrield Wrestling with unicode to get it to output isn't a strong suit of mine
22:33 sjn Inf
22:33 Redrield So I resort to having to google for it
22:33 Redrield Alright
22:34 muzza joined #perl6
22:37 samcv Inf
22:37 samcv m: say Inf === ∞
22:37 camelia rakudo-moar e1c086: OUTPUT: «True␤»
22:37 samcv Redrield,
22:37 samcv oh sorry that was said. ignore me
22:43 samcv moritz, so i have www.p6c.org and how do i host a page on like www.p6c.org/samcv or whatever? or is that more work
22:43 BenGoldberg joined #perl6
22:47 muzza left #perl6
22:48 timotimo samcv: i don't think we have a setup for people to put stuff into a place like that
22:48 samcv k
22:48 timotimo i can make a user for something like samcv.p6c.org or appimages.p6c.org or so
22:49 muzza joined #perl6
22:49 timotimo and you can put whatever you want into your ~/public_html on hack.p6c.org and that'll be on hack.p6c.org/~samcv/
22:49 samcv i want somewhere to put module pass/failing conditions first and forement
22:49 samcv since i have a gh-pages for appimages atm
22:49 muzza left #perl6
22:52 timotimo are we going to get historic appimages, too?
22:54 samcv this isn't about appimages just modules and if they pass or fail and their build logs
22:54 samcv but. are we? sure
22:54 samcv like for every release of rakudo?
22:54 samcv or what?
22:55 samcv though still really need a command line flag to chdir before trying to access variables profided on command line to perl 6. ugh
22:55 timotimo not every
22:55 timotimo just back a few releases
22:56 samcv then everything will be good. and appimages will be exactly the same as the normal
22:56 samcv yeah sure
22:56 timotimo have we tried giving moarvm a commandline switch like that?
22:56 samcv nope. that is one way maybe
22:56 samcv that is fine by me though. and would be very nice
22:59 samcv but i mean. the path has to be correct in rakudo when it's doing precomp and other things. since they're relative. so idk
22:59 samcv if we change it in moarvm before loading the bytecode? won't that be equivilant to chdiring into the users CWD it (which breaks it)
23:01 labster joined #perl6
23:05 bjz joined #perl6
23:16 samcv timotimo, we could try it and see what happens i guess :P
23:19 samcv timotimo, nice. i just fixed nqp::chdir
23:19 samcv from chdir failed: Unknown system error 2 >> chdir failed: no such file or directory
23:19 samcv was looking at the function and noticed some weirdness
23:20 mcmillhj joined #perl6
23:20 Cabanossi joined #perl6
23:30 itaipu joined #perl6
23:35 samcv timotimo, well it works fine in my own perl6 but we will see what happens when i try using it when everything is relative and see if it doesn't vomit
23:35 samcv if it doesn't vomit i will be very very happy
23:36 mcmillhj joined #perl6
23:38 AlexDaniel joined #perl6
23:46 samcv timotimo, yeah no dice.
23:46 samcv it has to happen after perl6.moarvm is loaded
23:47 timotimo oh crap
23:47 kyan joined #perl6
23:48 samcv Unhandled exception: While looking for 'ModuleLoader.moarvm': no such file or directory
23:48 samcv and that's if i put it right before perl6.morvm and give a full path to perl6.moarvm (which i would be able to do in the shell script fine)
23:48 samcv so this is not going to solve it
23:49 samcv at least i fixed something in MoarVM tho
23:49 timotimo mhyes
23:50 samcv nice. it's exactly the same number of lines. including the header file
23:50 samcv plus i added a new function
23:50 samcv heh
23:50 samcv and it works
23:50 samcv which is most important. not unknown system error bleh
23:53 mcmillhj joined #perl6
23:55 samcv i'm gonna take a tap

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

Perl 6 | Reference Documentation | Rakudo