Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2016-08-25

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:00 cpage_ joined #perl6
00:00 Zoffix Don't seem to have any package related to that on ubuntu fork that I use, sorry :/ No idea what that error is about.
00:00 Zoffix When you figure out, maybe open a ticket for an LTA (Less Than Awesome) error message. There may be a way to make it more helpful.
00:00 Zoffix huggable, rakudobug
00:00 huggable Zoffix, rakudobug@perl.org or use perl6 query on http://rt.perl.org ; see https://github.com/rakudo/rakudo/#reporting-bugs
00:12 skids joined #perl6
00:26 timotimo atweiden: your error comes from trying to Something::Something[$foo] where Something::Something isn't a role
00:28 timotimo m: Foo::Bar[1]
00:28 camelia rakudo-moar a4cc1c: OUTPUT«Could not find symbol '&Bar'␤  in block <unit> at <tmp> line 1␤␤Actually thrown at:␤  in block <unit> at <tmp> line 1␤␤»
00:28 timotimo m: use NativeCall Foo::Bar[1]
00:28 camelia rakudo-moar a4cc1c: OUTPUT«===SORRY!===␤Could not find symbol '&Bar'␤»
00:29 timotimo m: use NativeCall; NativeCall[1]
00:29 camelia rakudo-moar a4cc1c: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤NativeCall cannot be parameterized␤at <tmp>:1␤------> 3use NativeCall; NativeCall[1]7⏏5<EOL>␤»
00:29 timotimo hm
00:37 pierre_ joined #perl6
00:40 bioduds joined #perl6
00:40 bioduds Im checking custom operators
00:40 bioduds very cool
00:40 bioduds so, I don't like the concatenation operator ~
00:41 bioduds I can have a custom operator that does the same as the ~ , right?
00:41 bioduds would that be simple to do? or would I need to rewrite the whole ~ operator?
00:44 timotimo no, you can just re-use the ~ operator to define your custom operator
00:44 timotimo m: my &infix:<++> = &infix:<~>; say "hello" ++ "world"
00:44 camelia rakudo-moar 547fc5: OUTPUT«helloworld␤»
00:45 timotimo here's an example
00:45 timotimo BBL
00:46 canopus joined #perl6
00:54 atweiden timotimo: the Something::Something[$foo] pattern DNE in my code
00:54 atweiden i'm unable to do this for instance `has TXN::Parser::AST::Entry::Posting @.posting is required;`
00:55 timotimo OK, how is Posting declared? and imported?
00:55 atweiden `use TXN::Parser::AST::Entry::Posting;`
00:55 atweiden which is a unit class
00:55 timotimo what's the unit class called exactly?
00:55 atweiden separate file
00:55 atweiden this is Entry.pm https://bitbucket.org/atweiden/txn-parser​-ast/src/1f444cfcc8a0572e5109ed07d3395355​f0228685/lib/TXN/Parser/AST/Entry.pm?at=d​efault&amp;fileviewer=file-view-default
00:55 atweiden Posting.pm https://bitbucket.org/atweiden/txn-parser-a​st/src/1f444cfcc8a0572e5109ed07d3395355f022​8685/lib/TXN/Parser/AST/Entry/Posting.pm?at​=default&amp;fileviewer=file-view-default
00:56 timotimo hm, interesting
00:56 leont joined #perl6
00:57 timotimo m: class Foo { }; class Foo::Bar { }; class test { has Foo $.foo }
00:57 camelia rakudo-moar 547fc5: ( no output )
00:57 timotimo m: class Foo::Bar { }; class Foo { }; class test { has Foo $.foo }
00:57 camelia rakudo-moar 547fc5: ( no output )
00:57 timotimo m: class Foo::Bar::Baz { }; class Foo::Bar { }; class Foo { }; class test { has Foo::Bar $.foo }
00:57 camelia rakudo-moar 547fc5: ( no output )
00:57 timotimo m: class Foo::Bar::Baz { }; class Foo::Bar { }; class Foo { }; class test { has Foo::Bar::Baz $.foo }
00:57 camelia rakudo-moar 547fc5: ( no output )
00:58 timotimo strange
00:58 timotimo but i'll go to bed now, can't be of further assistance :(
01:00 cognominal joined #perl6
01:05 grondilu joined #perl6
01:05 [Coke] joined #perl6
01:07 pierre_ joined #perl6
01:21 pierre_ joined #perl6
01:23 dalek whateverable: 76a72a3 | (Aleks-Daniel Jakimenko-Aleksejev)++ | Bisectable.p6:
01:23 dalek whateverable: Oops
01:23 dalek whateverable: review: https://github.com/perl6/wha​teverable/commit/76a72a352b
01:23 dalek whateverable: 0868027 | (Aleks-Daniel Jakimenko-Aleksejev)++ | Bisectable.p6:
01:23 dalek whateverable: Oops
01:23 dalek whateverable: review: https://github.com/perl6/wha​teverable/commit/0868027b28
01:23 pierre_ joined #perl6
01:34 bisectable6 joined #perl6
01:35 bisectable6 joined #perl6
01:35 committable6 joined #perl6
01:41 BenGoldberg m: enum <A B C>; say 3 * C;
01:41 camelia rakudo-moar 547fc5: OUTPUT«6␤»
01:41 BenGoldberg m: enum <A B C>; say 4 +| C;
01:41 camelia rakudo-moar 547fc5: OUTPUT«6␤»
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:48 TimToady joined #perl6
01:49 rkazak joined #perl6
02:02 erdic joined #perl6
02:04 SmokeMachine____ m: class Bind{has $.type}; my @a = Bind.new(:type(Int)), Bind.new(:type(Str)); @a.grep(*.type ~~ Str)
02:04 camelia rakudo-moar 547fc5: OUTPUT«Cannot use Bool as Matcher with '.grep'.  Did you mean to use $_ inside a block?␤  in block <unit> at <tmp> line 1␤␤Actually thrown at:␤  in block <unit> at <tmp> line 1␤␤»
02:04 SmokeMachine____ hi! whats wrong with that?
02:08 MasterDuke m: class Bind{has $.type}; my @a = Bind.new(:type(Int)), Bind.new(:type(Str)); @a.grep({ .type ~~ Str })
02:08 camelia rakudo-moar 547fc5: ( no output )
02:08 MasterDuke m: class Bind{has $.type}; my @a = Bind.new(:type(Int)), Bind.new(:type(Str)); say @a.grep({ .type ~~ Str })
02:08 camelia rakudo-moar 547fc5: OUTPUT«(Bind.new(type => Str))␤»
02:09 mst joined #perl6
02:09 SmokeMachine____ but whats wrong with the * version?
02:09 bioduds thanks timotimo, youre the best
02:10 SmokeMachine____ m: my @a = ^10; say @a.grep: * %% 2
02:10 camelia rakudo-moar 547fc5: OUTPUT«(0 2 4 6 8)␤»
02:12 SmokeMachine____ m: my @b = Int, Str; say @b.grep: * ~~ Str
02:12 camelia rakudo-moar 547fc5: OUTPUT«((Str))␤»
02:12 k-man joined #perl6
02:13 SmokeMachine____ m: my @c = :type(Int), :type(Str); say @c.grep: *<type> ~~ Str
02:13 camelia rakudo-moar 547fc5: OUTPUT«Cannot use Bool as Matcher with '.grep'.  Did you mean to use $_ inside a block?␤  in block <unit> at <tmp> line 1␤␤Actually thrown at:␤  in block <unit> at <tmp> line 1␤␤»
02:25 dalek whateverable: 687c840 | (Aleks-Daniel Jakimenko-Aleksejev)++ | / (3 files):
02:25 dalek whateverable: Have only one list of releases
02:25 dalek whateverable:
02:25 dalek whateverable: Changed 2016.07 to 2016.07.1. Also added 2016.08.1 which should be available
02:25 dalek whateverable: shortly.
02:25 dalek whateverable: review: https://github.com/perl6/wha​teverable/commit/687c840ada
02:33 rkazak joined #perl6
02:33 ggherdov joined #perl6
02:33 wamba joined #perl6
02:39 BenGoldberg m: sub foo($bar) { constant $baz = $bar; say $baz }; foo(1); foo(2);
02:39 camelia rakudo-moar 547fc5: OUTPUT«(Mu)␤(Mu)␤»
02:39 BenGoldberg m: enum abc <a b c>; constant bca = {abc.enums}.invert; bca{1}.say;
02:39 camelia rakudo-moar 547fc5: OUTPUT«Use of uninitialized value of type Any in string context.␤Methods .^name, .perl, .gist, or .say can be used to stringify it to something meaningful.  in block  at <tmp> line 1␤5===SORRY!5=== Error while compiling <tmp>␤An exception occurred while…»
02:40 BenGoldberg m: enum abc <a b c>; constant cba = {abc.enums}.invert; say cba;
02:40 camelia rakudo-moar 547fc5: OUTPUT«Use of uninitialized value of type Any in string context.␤Methods .^name, .perl, .gist, or .say can be used to stringify it to something meaningful.  in block  at <tmp> line 1␤5===SORRY!5=== Error while compiling <tmp>␤An exception occurred while…»
02:40 BenGoldberg m: enum abc <a b c>; constant cba = abc.enums; say cba;
02:40 camelia rakudo-moar 547fc5: OUTPUT«Map.new((:a(0),:b(1),:c(2)))␤»
02:41 BenGoldberg m: enum abc <a b c>; constant cba = abc.enums; say cba.invert;
02:41 camelia rakudo-moar 547fc5: OUTPUT«(0 => a 2 => c 1 => b)␤»
02:41 Actualeyes joined #perl6
02:42 BenGoldberg m: enum abc <a b c>; constant cba = abc.enums.invert; say cba{2};
02:42 camelia rakudo-moar 547fc5: OUTPUT«Type Seq does not support associative indexing.␤  in block <unit> at <tmp> line 1␤␤Actually thrown at:␤  in block <unit> at <tmp> line 1␤␤»
02:42 BenGoldberg m: enum abc <a b c>; constant cba = abc.enums.invert.Map; say cba{2};
02:42 camelia rakudo-moar 547fc5: OUTPUT«c␤»
02:44 BenGoldberg m: enum abc <a b c>; sub foo { constant cba = abc.enums.invert.Map; say cba.WHERE }; foo() for ^20;
02:44 camelia rakudo-moar 547fc5: OUTPUT«139966692521064␤139966692521064␤139966692​521064␤139966692521064␤139966692521064␤139966692​521064␤139966692521064␤139966692521064␤139966692​521064␤139966692521064␤139966692521064␤139966692​521064␤139966692521064␤139966692521064␤1399…»
02:48 noganex_ joined #perl6
02:57 dalek whateverable: 326c44a | (Aleks-Daniel Jakimenko-Aleksejev)++ | Whateverable.pm6:
02:57 dalek whateverable: Restore SLIGHTLY-RESTRICTED setting
02:57 dalek whateverable:
02:57 dalek whateverable: Guess what, we kinda lost it during the transition to Perl 6 bots.
02:57 dalek whateverable:
02:57 dalek whateverable: In fact, now I see that not all of the things were restricted. Whoops!
02:57 dalek whateverable:
02:57 dalek whateverable: Hopefully we will be able to get rid of it soon. See issue #25.
02:57 dalek whateverable: review: https://github.com/perl6/wha​teverable/commit/326c44a9bc
03:04 SmokeMachine____ joined #perl6
03:04 Actualeyes joined #perl6
03:07 canopus joined #perl6
03:10 committable6 joined #perl6
03:10 bisectable6 joined #perl6
03:13 timotimo pff. yet another sleepless night apparently
03:14 BuildTheRobots joined #perl6
03:15 avuserow_ is there a way to cast an integer to an int8 or similar? `$my-int.int8` doesn't seem to do it, any other ideas?
03:15 timotimo jnthn: i was wondering about exception handling with regards to a react/supply + whenever; if i have something like "whenever $socket.Supply -> { ... }" and the thing that creates the values throws an exception - like when it can't decode a string - how is the user supposed to signify she wants to catch/handle that exception?
03:15 timotimo m: my Int $foo = 999; say (my int8 $ = $foo)
03:15 camelia rakudo-moar 547fc5: OUTPUT«-25␤»
03:16 timotimo m: my Int $foo = 999; say (my uint8 $ = $foo)
03:16 camelia rakudo-moar 547fc5: OUTPUT«231␤»
03:16 timotimo m: await start { next };
03:16 camelia rakudo-moar 547fc5: OUTPUT«===SORRY!===␤next without loop construct␤»
03:16 timotimo m: await start { next }; CONTROL { default { .say } }
03:16 camelia rakudo-moar 547fc5: OUTPUT«===SORRY!===␤next without loop construct␤»
03:16 timotimo aaw
03:18 avuserow_ m: my Int $foo = 999; my $t = int8; say (my $t $ = $foo); # can I do the type indirectly?
03:18 camelia rakudo-moar 547fc5: OUTPUT«5===SORRY!5===␤Two terms in a row␤at <tmp>:1␤------> 3Int $foo = 999; my $t = int8; say (my $t7⏏5 $ = $foo); # can I do the type indirect␤    expecting any of:␤        constraint␤        infix␤        infix stopper␤        postfix…»
03:18 timotimo types of lexicals are compile-time constructs
03:19 timotimo m: my Int $foo = 999; constant $t = int8; say (my ::($t) $ = $foo);
03:19 camelia rakudo-moar 547fc5: OUTPUT«X::TypeCheck::Assignment exception produced no message␤  in block <unit> at <tmp> line 1␤␤»
03:19 timotimo m: my Int $foo = 999; say (my int8 $ = $foo);
03:19 camelia rakudo-moar 547fc5: OUTPUT«-25␤»
03:19 timotimo hum.
03:19 zacts joined #perl6
03:20 geekosaur well. that was "fun"
03:20 geekosaur m: my Int $foo = 999; my $t = int8; say (my ::($t) $ = $foo);
03:20 camelia rakudo-moar 547fc5: OUTPUT«X::TypeCheck::Assignment exception produced no message␤  in block <unit> at <tmp> line 1␤␤»
03:20 geekosaur m: my Int $foo = 999; constant $t = int8; say (my ::($t) $ = $foo);
03:20 camelia rakudo-moar 547fc5: OUTPUT«X::TypeCheck::Assignment exception produced no message␤  in block <unit> at <tmp> line 1␤␤»
03:21 geekosaur m: my Int $foo = 999; BEGIN my $t = int8; say (my ::($t) $ = $foo);
03:21 camelia rakudo-moar 547fc5: OUTPUT«X::TypeCheck::Assignment exception produced no message␤  in block <unit> at <tmp> line 1␤␤»
03:21 geekosaur oh, hm, that wouldn't work anyway
03:21 geekosaur m: my Int $foo = 999; BEGIN my $t = 'int8; say (my ::($t) $ = $foo);
03:21 camelia rakudo-moar 547fc5: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Unable to parse expression in single quotes; couldn't find final "'" ␤at <tmp>:1␤------> 3my $t = 'int8; say (my ::($t) $ = $foo);7⏏5<EOL>␤    expecting any of:␤        single quotes␤        …»
03:21 geekosaur er
03:21 geekosaur m: my Int $foo = 999; BEGIN my $t = 'int8'; say (my ::($t) $ = $foo);
03:21 camelia rakudo-moar 547fc5: OUTPUT«X::TypeCheck::Assignment exception produced no message␤  in block <unit> at <tmp> line 1␤␤»
03:21 geekosaur feh
03:22 geekosaur I get the idea, but that seems a bit LTA
03:25 avuserow_ okay. I'll investigate if this makes sense later. I'll work on the more interesting bit first :)
03:25 pierre_ joined #perl6
03:28 simcop2387 joined #perl6
03:30 geekosaur well, as mentioned, it's compile time. but I do wonder if the compile time variants I tried should work
03:31 geekosaur ...in any case that exception kinda sucked; taking note, will rakudobug later when it doesn't take me 4 tries to type rakudo >.>
03:35 kyclark_ joined #perl6
03:40 harmil_ joined #perl6
03:41 harmil Ah, I had another browser! :)
03:42 harmil Anyone know why this never finishes the second "say" but the first works fine? my @N = 0..*; say @N.grep({.is-prime})[^20]; say @N.grep({(2**$_-1).is-prime})[^20]
03:42 harmil Also, is there a timeout on the evalbot?
03:42 timotimo there is, yes
03:43 timotimo m: sleep 100; say "haha"
03:43 camelia rakudo-moar 547fc5: OUTPUT«(timeout)»
03:43 harmil m: my @N = 0..*; say @N.grep({.is-prime})[^20]; say @N.grep({(2**$_-1).is-prime})[^20]
03:43 camelia rakudo-moar 547fc5: OUTPUT«(2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71)␤(2 3 5 7 13 17 19 31 61 89 107 127 521 607 1279 2203 2281 3217 4253 4423)␤»
03:43 timotimo well, that seems to work
03:43 harmil Oh! So I need to update it seems
03:43 pierre_ joined #perl6
03:44 timotimo i can hardly believe 2 ** 71 - 1 is just 4423
03:44 timotimo m: say 2 ** 71 - 1
03:44 camelia rakudo-moar 547fc5: OUTPUT«2361183241434822606847␤»
03:44 timotimo it's ... not :)
03:44 harmil No, I think that's the 20th mersien (sp?) prime
03:45 timotimo oh, haha, you're not using the first list for the second %)
03:45 harmil No, just proving the first worked
03:47 geekosaur mersenne?
03:47 timotimo yeah, mersenne primes
03:48 harmil geekosaur: Probably. I'm as good at spelling as Perl is at ... okay, Perl is good at everything, but I had a point, dagnabbit!
03:48 timotimo harmil: if you want it to spit out new results until the timeout hits, you can ".say for" instead of "say (...)[^20]"
03:48 pierre_ joined #perl6
03:49 harmil In my install it was just hanging on the second one forever
03:49 harmil rebuilding now
03:53 harmil Nope, after rebuild (2016.08.1-21-g547fc51) the second expression still hangs... grrr
03:55 timotimo huh. i claimed json parsing took half of the time it takes to start gtk::simple, but now i'm only measuring about 10%?!?
04:03 timotimo OK, threw out some of the debug output and i'm back to the same measurement i had before
04:03 timotimo *phew*
04:03 timotimo oh, no, the difference is whether it's the first time after installing or a subsequent run
04:04 timotimo m: say 4 / 27
04:04 camelia rakudo-moar 547fc5: OUTPUT«0.148148␤»
04:05 timotimo 15% is still significant, though. on the first run, 50% of the start-up time can melt down bo about 1% of what it was, after that, 15% can melt down to about 1/37th of what it was
04:05 * timotimo tries to sleep
04:08 rkazak joined #perl6
04:08 zacts joined #perl6
04:10 geekosaur precomp?
04:13 Cabanossi joined #perl6
04:20 cognominal joined #perl6
04:23 khw joined #perl6
04:31 bjz joined #perl6
04:40 notbenh joined #perl6
04:42 movlex joined #perl6
04:47 itaipu joined #perl6
04:53 pierre_ joined #perl6
05:04 rkazak joined #perl6
05:04 woolfy left #perl6
05:11 pierre_ joined #perl6
05:18 nadim joined #perl6
05:20 brrt joined #perl6
05:29 pierre_ joined #perl6
05:33 Kaffe joined #perl6
05:44 zacts joined #perl6
05:47 pierre_ joined #perl6
05:50 lizmat joined #perl6
05:55 zengargoyle joined #perl6
05:59 pierre_ joined #perl6
06:05 nadim joined #perl6
06:07 labster joined #perl6
06:08 firstdayonthejob joined #perl6
06:12 brrt joined #perl6
06:18 Woodi m: say 24 / 7
06:18 camelia rakudo-moar 597052: OUTPUT«3.428571␤»
06:21 rindolf joined #perl6
06:21 lizmat joined #perl6
06:32 pyrimidi_ joined #perl6
06:32 CIAvash joined #perl6
06:44 brrt joined #perl6
06:49 leont joined #perl6
06:50 movl joined #perl6
06:50 domidumont joined #perl6
06:54 domidumont joined #perl6
07:01 Actualeyes joined #perl6
07:04 kjs_ joined #perl6
07:11 nadim Morning, I have to install a module by hand, rakudo/install/share/perl6/site  seems to be the place (one o them) is there a need for a lib sub directory below that ?
07:11 darutoko joined #perl6
07:12 bjz joined #perl6
07:14 * lizmat would be surprised if there would need to be
07:16 nadim just tried doesn't work better than putting it there without the lib directory. I assume that module A::B would be installed under one of the 'paths P6 searches '/A/B.pm
07:24 RabidGravy joined #perl6
07:25 zakharyas joined #perl6
07:27 mrsolo joined #perl6
07:31 leont joined #perl6
07:40 cognominal joined #perl6
07:41 rba_ joined #perl6
07:46 bjz joined #perl6
08:04 leont joined #perl6
08:06 g4 joined #perl6
08:06 g4 joined #perl6
08:08 kjs_ joined #perl6
08:09 bjz joined #perl6
08:13 dalek Inline-Perl5: 9828e67 | niner++ | / (2 files):
08:13 dalek Inline-Perl5: Add --test and --install options to configure.pl6
08:13 dalek Inline-Perl5:
08:13 dalek Inline-Perl5: With this one can install Inline::Perl5 without any dependencies and without
08:13 dalek Inline-Perl5: a module manager.
08:13 dalek Inline-Perl5: review: https://github.com/niner/Inl​ine-Perl5/commit/9828e675ea
08:13 nine mst: ^^^
08:14 mst ooooo
08:14 masak m: grammar G { regex TOP { <blip>* }; regex blip { "b" (\d) } }; class Act { method TOP($/) { make $<blip>>>.ast }; method blip($/) { my $name = ~$0; make $name } }; G.parse("b1b2", :actions(Act.new)); .say for $/.ast
08:14 camelia rakudo-moar 945b91: OUTPUT«1␤2␤»
08:14 masak so far so good, but...
08:14 masak m: grammar G { regex TOP { <blip>* }; regex blip { "b" (\d) } }; class Act { method TOP($/) { make $<blip>>>.ast }; method blip($/) { my $name = ~$0; make class :: { method foo { $name } } } }; G.parse("b1b2", :actions(Act.new)); say .foo for $/.ast
08:14 camelia rakudo-moar 945b91: OUTPUT«2␤2␤»
08:15 masak I know there are some gotchas with creating classes inside routines, but... "2\n2\n"?
08:17 nine mst: hope this makes your work easier :)
08:20 masak I need to make this code not "stick" in the above way: https://github.com/masak/007/blob/18c​61f17d6da7308b05404fbbb1999c43673200e​/lib/_007/Parser/Actions.pm#L253-L256
08:23 mcmillhj joined #perl6
08:23 masak who would've thought that creating an anonymous class with an overridden ^name meta-method would come back to bite me in any way? :P
08:23 nine masak: you don't say?
08:24 masak I was very happy when I tried it an it solved all my problems
08:25 masak but yes, it was probably a nuclear chainsaw, in retrospect
08:25 masak what I really need is to lift 007 onto a proper MOP
08:26 lizmat joined #perl6
08:28 mst masak: this is one of those times when my brain goes "y'know, string eval might've actually been less horrible"
08:30 masak mst: it was one of those "do I stop here and refactor, or do I just carve a peg of the exact shape that will work in this particular case?" kind of moments
08:30 masak so, yes, I have a MOP-overriding anonymous class in my code as a kind of technical debt
08:31 masak I seem to recall I started down the virtuous refactoring path first, but gave up because it was a lot of work
08:31 * masak tries string EVAL
08:33 masak hey, that worked
08:34 masak m: say EVAL "42"
08:34 camelia rakudo-moar 945b91: OUTPUT«42␤»
08:34 masak also nice that constant strings can be EVAL'd now without hysterics :D
08:35 lizmat joined #perl6
08:36 mvorg joined #perl6
08:37 mcmillhj joined #perl6
08:39 pierre_ joined #perl6
08:43 domidumont joined #perl6
08:49 mcmillhj joined #perl6
08:51 Skarsnik joined #perl6
09:00 jnthn masak: From backlog: classes ain't closures. Just add an attribute to your anon class and throw a .new after it? :)
09:02 masak jnthn: aye, but I needed it to be a type object...
09:02 masak (for silly reasons)
09:02 jnthn oh
09:02 jnthn Then do a parametric role and pass it in is a parameter
09:03 masak hm :)
09:03 masak also need it to be a class, not a role... :P
09:03 masak (and please don't ask why, or I'll be ashamed)
09:04 masak anyway, that would have been a nice idea in a less debt-laden situation
09:04 nadim joined #perl6
09:04 leont joined #perl6
09:05 jnthn masak: So call .^pun on the thing? :)
09:06 masak that... might work.
09:06 masak but I think it's time to gradually work my way out of the mess I created, instead of adding to it :P
09:06 jnthn Sounds like, yes :P :P
09:07 jnthn .oO( Can I offer you a technical mortgage? )
09:07 zakharyas joined #perl6
09:08 pierre_ joined #perl6
09:09 * masak learns that closing a mortgage, either naturally bit by bit, or with a lump sum, is called "redemption"
09:09 masak time for some technical redemption...
09:10 El_Che I think DrForr is the next talk at yapc eu
09:10 El_Che is preparing is laptop
09:10 masak ooh
09:10 El_Che h
09:10 nadim nine: Hi, could we meet for 5 mn around lunch time, I need your help
09:11 * masak watches the live stream at https://www.youtube.com/watch?v=A3ZSt5QKEAg
09:12 El_Che He jumped on the vim-as-slides bandwagon :)
09:13 El_Che he now pointing to #perl6 :)
09:14 * masak waves back
09:16 El_Che (Danmark)
09:16 El_Che "Someone would correct me" :)
09:19 mls joined #perl6
09:19 newcomer25 joined #perl6
09:21 newcomer25 left #perl6
09:24 tadzik oh wow, an actual livestream :)
09:27 mst row, row, row your bloat, gently up the streeeeeam
09:27 jast down the stream is easier, though
09:27 * masak .oO( please feel free to watch with me, but do *not* cross the streams )
09:29 jast and in my experience bloat takes the path of least resistance
09:30 perlawhirl joined #perl6
09:38 mcmillhj joined #perl6
09:47 smls joined #perl6
09:50 masak interesting that DrForr++ lumps chaining comparison operators together with comparisons with junctions in them
10:04 masak oh, later the junctions show up. probably just a mis-slide, then
10:04 El_Che I hate the inbetween laptop setups
10:04 El_Che we've been mostly lucky at fosdem
10:09 melezhik joined #perl6
10:09 melezhik HI all!
10:10 masak hi melezhik!
10:10 melezhik Does perl6 allow to have a conditional expressions which retrun  a value? Like in ruby?
10:10 melezhik $a = if $b > 1 { 10 } else { 20 }
10:11 melezhik something like that ...
10:11 jnthn sure, though $a = $b > 1 ?? 10 !! 20 is a neater way
10:11 masak m: my $b = 5; my $a = do if $b > 1 { 10 } else { 20 }; say $a
10:11 camelia rakudo-moar 9ccd84: OUTPUT«10␤»
10:11 jnthn But they way you had it will parse if you stick "do2 before the if
10:11 jnthn *"do"
10:11 masak like that ^^^
10:12 melezhik jnthn, masak thanks, will try
10:12 masak melezhik: but yes, what jnthn++ said. ?? !! is the conditional operator. so unless you're doing something very funny, that's the one you want
10:12 melezhik yeah, I need really not a conditional operator
10:13 melezhik but let me try ...
10:13 masak m: say 1 R?? 2 !! 3
10:13 camelia rakudo-moar 9ccd84: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Cannot reverse the args of  because conditional operators are too fiddly␤at <tmp>:1␤------> 3say 1 R?? 2 !!7⏏5 3␤»
10:13 masak looks like we have a regression in that error message...
10:13 * masak submits rakudobug
10:15 jnthn regression or was it ever right? :)
10:16 masak or never right, right.
10:17 melezhik_ joined #perl6
10:17 lizmat joined #perl6
10:18 melezhik_ "do" operator this is what I looked for, thanks
10:20 mcmillhj joined #perl6
10:21 masak goodie.
10:22 masak though it's more of a statement prefix than an operator :)
10:22 masak along with `gather` and `once` and a few others
10:22 melezhik masak: sure
10:23 melezhik I just sometimes need a short way to evaluate some things depending on others ... was pretty sure that Perl has a syntax for this ))))
10:24 melezhik meant Perl6 of course
10:25 masak melezhik: currently fighting the impulse to tell you "yes, but experience tells me you probably do want ?? !!"
10:25 masak melezhik: I'll let you make your own choices ;)
10:26 cpage joined #perl6
10:27 melezhik masak: if "?? !!" allow me have a sequential statements like $a = ( ... ) ?? foo; bar; baz; !! foo; bar; baz
10:28 melezhik I am not sure
10:28 telex joined #perl6
10:28 melezhik so this is why I am going to use $a = do  if ... {} else {}
10:30 melezhik joined #perl6
10:30 perlawhirl can I create a Subset type that does a Role? I know I can sub-Class an existing type, but I am being difficult :D
10:30 jnthn No.
10:31 perlawhirl ok
10:31 jnthn Subset types don't really "do" things, they're just meant as constraints.
10:31 perlawhirl yep, got it
10:31 perlawhirl trying to be too tricky for my own good
10:31 jnthn Note that an enum type can have extra roles applied :)
10:31 perlawhirl how's that go. short example, please?
10:32 jnthn enum Foo does SomeRole <Bar Baz>;
10:32 nadim joined #perl6
10:32 jnthn Something like that, iirc :)
10:32 perlawhirl ok,  thanks i'll look into tit
10:32 perlawhirl er, *it
10:32 jnthn Pretty sure you can do that
10:32 jnthn Dunno if it's relevant to your problem :)
10:33 perlawhirl no, probably not, but interesting non-the-less
10:47 zakharyas joined #perl6
10:48 TimToady m: say infix:<X>()
10:48 camelia rakudo-moar 9ccd84: OUTPUT«(((Any)))␤»
10:49 TimToady someone should rakudobug that; really should return Empty instead of Any
10:50 TimToady m: say infix:<Z>()
10:50 camelia rakudo-moar 9ccd84: OUTPUT«()␤»
10:50 TimToady or it should just return that
10:50 mcmillhj joined #perl6
10:51 DrForr masak: I know that chaining operators and junctions are differen, I just forgot to mention the proper names in the heat of the moment.
10:51 kaare_ joined #perl6
10:51 pierre_ joined #perl6
10:51 lizmat joined #perl6
10:54 ilmari[m] joined #perl6
10:55 DrForr Did anyone else spot major problems in the talk? I'm going to use that kind of for the basis for my OSCON online training session.
10:59 DrForr (I'm also going to make sure I can wedge multiprocessing in - I'm going to take some time to actually learn the multiprocessing side. I want to throw that into talks, but I don't yet feel comfortable.)
10:59 cognominal joined #perl6
11:00 perlawhirl DrForr: I didn't catch it all, my only minor crit is that I could feel the silence between your sentences... a little stilted. I'd suggest using some form of notes/flash cards ( if you don't already) which would also help out with forgetting the metion the proper names of things in the heat of the moment.
11:01 perlawhirl Content-wise, tho, I think it was good.
11:01 DrForr I was hoping to be able to split screens to have notes on my laptop, I have notes in a separate vim file.
11:02 aries_liuxueyang joined #perl6
11:02 mcmillhj joined #perl6
11:03 DrForr Thanks.
11:04 perlawhirl ahh, projector setup woes can be a real pain
11:05 DrForr But yes, I should have flashcards or something.
11:05 aries_liuxueyang joined #perl6
11:06 DrForr The big part is I'm done, so I don't have to stress.
11:09 ab6tract joined #perl6
11:09 ab6tract o/ #perl6
11:09 DrForr Afternoon.
11:10 ab6tract .ask TimToady do you by any chance have the notes for your ballistic programming talk(s) online?
11:10 yoleaux ab6tract: I'll pass your message to TimToady.
11:10 ab6tract I cannot find anything but references to the dates of the talks.
11:11 ab6tract But I remember joining #perl6 in 2008 or 2009, asking after the 'State of the Onion', and receiving a link to a video where you were already using this metaphor
11:12 ab6tract This video is also, unfortunately, not possible to find now. Perhaps it was hosted on Google Videos back in the day..
11:12 ab6tract hi DrForr :D
11:15 ab6tract for a talk on ballistics, it has left very little trace of itself
11:18 xinming_ joined #perl6
11:19 bjz joined #perl6
11:26 melezhik HI! Given a file path - "/foo/bar/baz/file.txt", how can I get directory name for this path?
11:26 melezhik I am sure there is a core module for this in perl6 ?
11:30 lizmat "foo/bar/baz".IO.dirname
11:30 melezhik lizmat: thanks!
11:32 melezhik sounds good - perl6 -e '"/foo/bar/baz".IO.dirname.say' ; I love when Perl6 has a foo-bar-baz.say to easy dump thing into console, it's very handy indeed!
11:32 melezhik )))
11:34 rudolfochrist joined #perl6
11:34 dalek Inline-Perl5: 7586745 | niner++ | / (3 files):
11:34 dalek Inline-Perl5: Separate configure.pl6 and make install
11:34 dalek Inline-Perl5:
11:34 dalek Inline-Perl5: Now it's a sort of standardish:
11:34 dalek Inline-Perl5: perl6 configure.pl6
11:34 dalek Inline-Perl5: make
11:34 dalek Inline-Perl5: make test
11:34 dalek Inline-Perl5: make install
11:34 dalek Inline-Perl5: review: https://github.com/niner/Inl​ine-Perl5/commit/7586745cde
11:37 ab6tract it's really unfortunate that all iterations of the talk are missing, because I think the metaphor is just really awesome
11:49 lizmat joined #perl6
11:53 mcmillhj joined #perl6
11:55 smls_ joined #perl6
11:57 * grondilu looked at create-moar-runner.pl and found $fh.print(sprintf(...)) kind of embarassing.
11:59 ab6tract also: I've got a sweet heisenbug but no time to golf it
12:00 ab6tract does anyone have any pointers to resolving "pointer being freed was not allocated" (moarvm explosion)
12:00 ab6tract pun intended
12:02 jnthn valgrind
12:05 leont joined #perl6
12:05 kamran joined #perl6
12:09 dalek Inline-Perl5: 80d4ed3 | niner++ | .travis.yml:
12:09 dalek Inline-Perl5: Add new build step to travis config
12:09 dalek Inline-Perl5: review: https://github.com/niner/Inl​ine-Perl5/commit/80d4ed34d0
12:09 pierre_ joined #perl6
12:12 ab6tract jnthn: hmmm.. valgrind does not provide any additional information in the crash case
12:13 lizmat joined #perl6
12:13 mcmillhj joined #perl6
12:17 [Coke]_ joined #perl6
12:18 n1lp7r joined #perl6
12:20 japhb joined #perl6
12:20 dsp_ joined #perl6
12:21 bpmedley joined #perl6
12:21 mtj_ joined #perl6
12:21 nowan joined #perl6
12:21 DrParis joined #perl6
12:22 Skarsnik joined #perl6
12:23 kshannon joined #perl6
12:23 alnewkirk joined #perl6
12:24 TheLemonMan joined #perl6
12:24 melezhik anybody knows how to split long lines of code in perl6?
12:24 * [Coke] finds coffee
12:25 melezhik 'foo' ~ 'bar' ~ .................... many many chunks ... ~ 'bar'
12:25 cyphase joined #perl6
12:25 melezhik need to split it somehow and still keep it as single line
12:25 mcmillhj joined #perl6
12:26 Fleurety joined #perl6
12:27 arnsholt Somehow, $work had a task where my work on NativeCall is super-relevant
12:27 * arnsholt is more than a little surprised at this development
12:27 zakharyas joined #perl6
12:27 smls_ melezhik: Not sure what you mean. Can't just add newlines in between operators / method calls?
12:28 xiaomiao joined #perl6
12:29 arnsholt Yeah, just add breaks where you want them
12:29 melezhik so, "/" is break symbol ?
12:29 smls_ no
12:29 arnsholt If you're coming from Python this may be odd, but since Perl has explicit statement terminators (the semicolons), you don't need to mark line continuations
12:30 smls_ statements don't end at newlines, they end at semicolon or closing bracket
12:30 arnsholt Or rather, explicit statement terminators that aren't newlines
12:31 melezhik arnsholt: got you, just add a new line where I need ... ok
12:32 arnsholt Yup!
12:32 melezhik thanks!
12:32 ab6tract melezhik: only caveat is -- you can't add a newline between an object and a method call, unless you use '\'
12:34 cygx joined #perl6
12:34 cygx o/
12:35 smls_ say "foo"␤   .chars
12:35 smls_ m: say "foo"␤   .chars
12:35 camelia rakudo-moar 9ccd84: OUTPUT«3␤»
12:35 smls_ ab6tract: ^^ You can, since shortly before the 6.c release I think.
12:35 ab6tract well, i guess Tux was happy about that :)
12:35 smls_ You just can't mix that with method calls that *don't* have whitespace before them, in the same method chain
12:36 smls_ for precedence reasons that I don't quite understand
12:37 smls_ So that's the one case where you still need to escape the newline (and other whitespace) with \
12:37 cygx m: (-10). abs .log . exp.say
12:37 camelia rakudo-moar 9ccd84: OUTPUT«10␤»
12:38 smls_ huh
12:38 smls_ did that change too?
12:38 bjz joined #perl6
12:39 smls_ nice :)
12:39 mcmillhj joined #perl6
12:40 jnthn m: say [~] 'omg', 'wtf', 'bbq' # you can also reduce on ~ rather than putting it between all the things, which may be neater.
12:40 camelia rakudo-moar 9ccd84: OUTPUT«omgwtfbbq␤»
12:40 wamba joined #perl6
12:41 melezhik ab6tract: got you
12:42 ab6tract melezhik: well, it turns out I'm wrong according to the released version :)
12:42 melezhik ab6tract: not going to use with methods calls, so it's ok ;)))
12:44 melezhik one simple question
12:45 melezhik I use sub MAIN to handle command line args, it's ok
12:45 melezhik but I want to pass args like --foo bar
12:45 rudolfoc` joined #perl6
12:45 melezhik now I only have a choice to --foo=bar
12:46 melezhik and my tab completion becomes useless )));
12:46 adrusi .
12:47 Xliff melezhik: You aren't forced to use signatures in MAIN. You can use @*ARGV
12:47 Xliff http://perl6maven.com/parsing​-command-line-arguments-perl6
12:48 melezhik Xliff: not sure If I get you ...
12:48 Xliff Actually it's ARGS, not ARGV.
12:48 Xliff melezhik: vv
12:48 Xliff perl6 -e 'say @*ARGS.perl' --one two 3
12:48 Xliff ["--one", "two", "3"]
12:49 melezhik ok, let me show my code then ...
12:49 melezhik sub MAIN (
12:49 melezhik Str  :$host!,
12:49 melezhik Str  :$http_proxy,
12:49 melezhik Str  :$https_proxy,
12:49 melezhik Str  :$ssh_user,
12:49 melezhik Str  :$ssh_private_key,
12:49 melezhik Int  :$ssh_port = 22,
12:49 melezhik Bool :$verbose = False,
12:49 Xliff Ack! NOOO
12:49 melezhik Bool :$bootstrap = False,
12:49 melezhik Str  :$module_run
12:49 melezhik )
12:49 melezhik what?
12:49 Xliff melezhik, please use fpaste or a gist
12:49 Xliff Do NOT spam channel with code.
12:49 melezhik ah, ok, sorry
12:49 melezhik why it is a spam? only a small code snippet
12:50 melezhik ok I will give you a link then
12:50 Xliff Anything more than 4 lines is a spam.
12:50 mcmillhj joined #perl6
12:50 melezhik ah, ok
12:50 tadzik it makes reading the backlog less nice
12:50 melezhik no problem, sure
12:50 Xliff Use fpaste.scsys.co.uk
12:50 melezhik https://github.com/melezhik/sparrow​do/blob/master/bin/sparrowdo#L5-L18
12:51 melezhik this is my MAIN sub
12:51 melezhik and it works fine
12:51 melezhik but as I told I can't use --foo bar notation
12:51 tadzik anyway, I think you'll need a custom MAIN helper to allow the form that you're used to
12:51 Xliff Yeah, but if you want the "--foo bar" form of argument, you will need to handle @*ARGS on your own.
12:51 tadzik there are a few modules that do wacky stuff with MAIN and getopt-like things, maybe one of them does that already
12:51 melezhik so it can't be adjusted out of the box by MAIN means?
12:52 tadzik I don't think my one does
12:52 Xliff I do understand about tab completion, though. Using "=" kills it.
12:52 melezhik ah, ok
12:52 melezhik sure
12:52 melezhik = is the problem
12:52 ab6tract joined #perl6
12:52 leont joined #perl6
12:53 dylanwh joined #perl6
12:56 Xliff melezhik, there is this -> https://github.com/Leont/getopt-long6
12:56 Xliff But it is not documented very well. Use with care.
12:56 melezhik Xliff: thanks for sharing info
12:57 melezhik generally code perl6 MAIN is fine foe me, but it don't respect spaces for parameters
12:59 tadzik MAIN feels to me like one of those things that should've evolved in module space first, and after a while a particular implementation ought to be spec...ulated
13:00 Xliff tadzik: Yeah. It would be nice to be able to add to the auto-generated usage output. Or have a mechanism to bypass it altogether.
13:00 tadzik it seems like MAIN was designed to to replace dozens of different getopt handlers that people used in perl 5, but in practice ends up being mostly good for prototyping cli apps, and eventually being replaced with something that puts more focus on the shell calling conventions than perl6's
13:00 tadzik Xliff: I think you may be able to do that with some callsame magic
13:01 tadzik have your own USAGE call back to the original USAGE
13:01 Xliff Hmmm...
13:01 Xliff Is it a hidden sub USAGE {} ?
13:01 Xliff Don't mind me and my fancy parens.
13:01 tadzik not really hidden
13:02 Xliff Well... auto generated? Part of CORE:: ?
13:02 Xliff I'll have to look into the possibilities. Thanks, tadzik++
13:02 tadzik https://github.com/rakudo/rakudo​/blob/nom/src/core/Main.pm#L163
13:03 tadzik I'm not sure if it's part of the official API
13:03 tadzik so to say
13:03 tadzik but you can totally call it yourself, override etc
13:03 Xliff LOL
13:04 Xliff "TODO: ... Make $?USAGE available globally"
13:04 Xliff So it might Not Be There, Yet.
13:04 cdg joined #perl6
13:04 tadzik hm
13:05 Xliff At any rate, stomach is complaining. Time to lie back down.
13:05 bjz joined #perl6
13:06 tadzik I'm afraid you may be right
13:12 mcmillhj joined #perl6
13:24 harmil joined #perl6
13:24 kyclark_ joined #perl6
13:25 dalek ecosystem: 17987ad | (Alexey Melezhik)++ | META.list:
13:25 dalek ecosystem: Fetch remote file using http.
13:25 dalek ecosystem: review: https://github.com/perl6/e​cosystem/commit/17987adfda
13:25 dalek ecosystem: 1b8fa92 | (Zoffix Znet)++ | META.list:
13:25 dalek ecosystem: Merge pull request #242 from melezhik/master
13:25 dalek ecosystem:
13:25 dalek ecosystem: Add Sparrowdo::RemoteFile to ecosystem.
13:25 dalek ecosystem:
13:25 dalek ecosystem: Fetch remote file using http: https://github.com/melezhik/remote-file/
13:25 dalek ecosystem: review: https://github.com/perl6/e​cosystem/commit/1b8fa92a99
13:30 skids joined #perl6
13:41 rudolfochrist joined #perl6
13:42 arw joined #perl6
13:43 arw hi all. beginners question, why does this just output (Any) instead of a parse tree? https://pbot.rmdir.de/lY8MazWC7NZHfyROEtSuig
13:44 timotimo because it didn't parse correctly :)
13:45 timotimo have you tried either perl6-debug-m (after installing the necessary user interface module) or Grammar::Tracer or Grammar::Debugger?
13:45 arw not yet, but I was going to ask for something like that. thanks alot!
13:45 timotimo ah, your key and value tokens would blow things up
13:46 timotimo you see, token won't backtrack, as the default for "token" is to have :ratchet set to "on"
13:46 timotimo m: say "schlonz='fooooo'" ~~ / \w* /
13:46 camelia rakudo-moar 9ccd84: OUTPUT«「schlonz」␤»
13:46 timotimo oh, sorry, \w won't match a =
13:46 timotimo so that's not a problem
13:47 kyclark_ joined #perl6
13:47 timotimo .o( es gibt ja so viel wissenswertes über erlangen )
13:48 zakharyas joined #perl6
13:49 smls arw: The Grammar::Debugger module is useful for finding out why a grammar doesn't match
13:50 TheLemonMan hmm, can you use that to debug rakudo's grammar too ?
13:50 smls just install it with zef or panda, and the call your script with «perl6 -MGrammar::Debugger script.p6»»
13:50 smls TheLemonMan: dunno
13:50 leont Xliff, melezhik: haven't touched it in a while, but it should work and if it doesn't I will fix it
13:51 smls arw: It's super simple to use... just keep pressing enter when you run it, and it'll take you through the parse step by step.
13:51 timotimo TheLemonMan: unfortunately, rakudo's grammar is NQP code, which the Grammar::Debugger doesn't support
13:51 timotimo and we don't have something like perl6-debug-m for nqp
13:54 TheLemonMan eh, that's unfortunate
13:54 timotimo it's possible to build, but probably quite finnicky
13:55 timotimo what with nqp being "not quite" perl6
13:55 bdmatatu joined #perl6
13:55 lizmat joined #perl6
13:57 lizmat joined #perl6
13:57 bdmatatu Hi all.  I'm having trouble adding actions to a slang.  Here's a simple case trying to make a synonym for 'do' -- https://git.io/v6Fic
14:04 lucasb_ joined #perl6
14:06 lizmat joined #perl6
14:07 smls arw: (Sorry for the delay, was afk) In this case, the problem is the \n at the end of rule empty_line and rule key_value rannot match, because the newline was already eaten by the <ws> (implicit whitespace matching in rules)
14:07 khw joined #perl6
14:08 nine nadim: have a look at https://github.com/rakudo/rakudo/commit/​6ae6ecbfca26dea357737ff4fef9aa89ea7d6968
14:08 smls And yes, writing Perl 6 grammars for line-base (or partially line-based) formats is more cumbersome than it IMO should be.
14:09 nine nadim: raccoon is really a baby raccoon now  :)
14:10 smls I think it shows that the grammars feature was for years mainly tested (and refined in a feedback loop with) Rakudo itself, and thus is best at matching free-form languages.
14:11 jnthn It's easy enough to redefine ws :)
14:11 jnthn We even provide ww if you want that part of the semantics and then different whitespace
14:12 smls jnthn: Not *that* easy actually, to recreate what <ws> does for boundaries between word vs non-word characters
14:12 smls oh? tell me more about ww
14:13 smls p6doc search doesn't find it
14:13 jnthn ww means "between two words"
14:14 jnthn m: say 'ab' ~~ /. <ww> ./
14:14 camelia rakudo-moar 6ae6ec: OUTPUT«「ab」␤ ww => 「」␤»
14:14 jnthn m: say 'a+b' ~~ /. <ww> ./
14:14 camelia rakudo-moar 6ae6ec: OUTPUT«Nil␤»
14:14 jnthn So you could do something like token ws { <!ww> | \h+ }
14:14 smls ah, that does make it easier to write a horizontal-only <ws>
14:15 jnthn Could do with being doc'd too, apparently :)
14:15 smls yeah
14:17 arw smls: ah, thx.
14:17 smls Hm, is it possible that p6doc does not document built-in tokens other than <ws> at all?
14:17 arw smls: i'm currently still waiting for rakudobrew to build.
14:17 smls alnum gets no hits either
14:19 cognominal joined #perl6
14:20 arw smls: but shouldn't my redefinition of <ws> take care of that?
14:20 awwaiid joined #perl6
14:20 ugexe strange, i could have swore they were because I remembering seeing <dot> documented but not implemented but I dont see anything but <ws> either
14:20 smls arw: Oh, I missed that. Hm.
14:24 lizmat joined #perl6
14:25 smls arw: Oh, it's the <comment> rule that eats the whitespace on the following empty line
14:26 smls Because <ws> matches after the \n in rule comment
14:26 leont joined #perl6
14:28 smls That means that having each rule that represents a line start with ^^ and end with \n is no good
14:28 [Coke] DrForr: can you verify if #125290 is still an issue for you?
14:28 synopsebot6 Link:  https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=125290
14:28 timotimo nine: do we have some semblance of a solution for deciding resources during Build.pm run time?
14:29 smls arw:  because the implicit <ws> after the \n of one rule will eat indentation of the next line and prevent the ^^ from matching in the next rule
14:32 smls arw: Removing all the ^^ makes it match
14:33 smls Of course it's kinda weird to have each "line" match also contain the indentation of the line that follows it
14:33 MilkmanDan joined #perl6
14:33 arw smls: would that also happen if everything were token {} instead of rule?
14:34 smls no, <ws> does not implicitly match in tokens, only rules
14:34 smls but then you'd have to manually match whitespaces inside of lines
14:37 arw hm, yes. but i've got it to work at least: https://pbot.rmdir.de/CTHRqJBM_1foixfNP1WaOA
14:39 arw thanks to everybody :)
14:39 nebuchadnezzar joined #perl6
14:39 arnsholt joined #perl6
14:39 sjn joined #perl6
14:40 rmmm joined #perl6
14:40 smls I think I once managed to parse a line-based format using a   token TOP { [ <line_a> | <line_b> ]+ %% [\n|$] }
14:40 smls or similar
14:41 smls but it required some tinkering too, 'til it worked
14:41 timotimo i, too, would prefer moving the end-of-line stuff out of the individual line pieces
14:41 smls and it's no good if the format is only partailly line-based
14:41 timotimo arw: you can have parenthesis around your stuff and just put :s at the beginning
14:42 timotimo that way you don't have to put <.ws> everywhere, but by snuggling the closing parethesis against the last bit of the regex, you can prevent an additional unwanted <.ws> from being auto-generated there
14:42 timotimo alternatively
14:42 lizmat tadzik: it's not too late:
14:42 lizmat $ perl6 -e 'sub MAIN($a) { say "$a" }' foo
14:42 lizmat foo
14:42 timotimo use rule and put (:!s '}')} or something at the end
14:43 timotimo tbh, i tend to use a loop over .lines for line-based formats more often than i maybe should ...
14:44 arw yes, but for that I could have used perl5 :)
14:45 timotimo with perl6, the code inside the for loop is much nicer, still :P
14:45 smls timotimo: putting the closing paren right after the \n is really ugly though
14:45 timotimo smls: yes
14:45 smls if unspace worked in regexes, one could write \n\
14:45 timotimo you can still match individual lines against perl6 regexes, of course
14:45 smls but it doesn't
14:45 timotimo oh, that'd be nice if it did, though
14:45 tomboy65 joined #perl6
14:47 smls jnthn: ^^ see preceding descussion... it's not just the default <ws> alone that makes it difficult to get a working grammar for (partially) line-based formats
14:47 arw and I guess special rules for trailing whitespace or indentation would make things even more ugly
14:48 arw (regarding the magically inferred <ws> in rules)
14:48 TheLemonMan talking of <ws>...
14:48 TheLemonMan m: say (sub (\ ) { }).signature
14:48 camelia rakudo-moar 6ae6ec: OUTPUT«()␤»
14:48 timotimo on a somewhat related note, i wonder if we'll find a developer who's interested in making :P5 work a bit better
14:49 TheLemonMan here the \<space> is eliminated even before reaching the grammar
14:50 smls TheLemonMan:  that's how unspace is supposed to work, isn't it?
14:50 timotimo well, sub (\ ) is fine
14:51 timotimo what isn't fine is when you have something unspace-looking and it thinks it's an un-named sigil-less variable
14:51 TheLemonMan I was wondering if this behaviour is the intended one
14:51 timotimo unless ... maybe that's a feature?
14:52 TheLemonMan it becomes a problem if you add a return type annotation as it becomes sub(\ --> Mu)
14:54 [Coke] anyone who knows how wordpress works who can address RT #128664
14:54 synopsebot6 Link:  https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=128664
14:54 [Coke] I can't find where the template for the page that has the linked image is; I only see posts (which are just the body of each page, not including the header), and the media images, which are just pngs.
14:54 TheLemonMan m: say +(sub (\) { }).signature.params == +(sub (\ --> Int) { }).signature.params
14:54 camelia rakudo-moar 6ae6ec: OUTPUT«False␤»
14:55 timotimo m: say (sub (\ --> Int) { }).signature
14:55 camelia rakudo-moar 6ae6ec: OUTPUT«( --> Int)␤»
14:55 timotimo m: say (sub (\ --> Int) { }).signature.params.perl
14:55 camelia rakudo-moar 6ae6ec: OUTPUT«()␤»
14:55 timotimo m: say (sub (\) { }).signature.params.perl
14:55 camelia rakudo-moar 6ae6ec: OUTPUT«($ is raw,)␤»
14:55 timotimo m: say (sub (\ ) { }).signature.params.perl
14:55 camelia rakudo-moar 6ae6ec: OUTPUT«()␤»
14:55 timotimo well, with (\) you get the nameless sigil-less variable
14:55 timotimo m: say (sub (\--> Int) { }).signature.params.perl
14:55 camelia rakudo-moar 6ae6ec: OUTPUT«($ is raw,)␤»
14:56 timotimo and for some reason that also happens with \-->
14:56 ab6tract joined #perl6
14:59 ab6tract when trying to run perl6-valgrind-m, I get an error saying: Unhandled exception: failed to load library 'dynext/libperl6_ops_moar.dylib'
14:59 tony-o timotimo: making :P5 work better in what way?
14:59 ab6tract latest rakudo installed just a few hours ago via rakudobrew
14:59 timotimo tony-o: make it more compatible with pcre
15:00 kurahaupo joined #perl6
15:01 tony-o i haven't looked at this in a while but HTTP::Server::Async is working 100% as expected and awesome
15:01 timotimo great!
15:01 tony-o timotimo: ah - that's probably not me :-)
15:01 timotimo jnthn has recently been putting in work in the reliability department
15:01 tony-o jnthn++
15:01 ab6tract tony-o: I looked into using Green recently, but it seems that it hasn't been upgraded to use the new Supplier/Supply style
15:01 tony-o ab6tract: i think i fixed it last week, someone entered a bug.  i'll take a look right now though
15:02 tony-o well, in 4 minutes when siege is complete
15:02 * timotimo doesn't even know what Green is
15:02 timotimo all i know is it's not easy being green
15:02 Actualeyes joined #perl6
15:02 TheLemonMan timotimo, I suspect the '\ ' is being treated as it is in "\ "
15:02 ab6tract timotimo: tony-o's snazzy parallel testing framework
15:03 tony-o timotimo: http://ugexe.com/parallel-test​ing-and-a-perilous-pilgrimage/
15:03 tony-o repo is here: https://github.com/tony-o/perl6-green
15:03 TheLemonMan I suspected <ws> to be too greedy but it seems it's not the culprit
15:03 ab6tract tony-o: looks like it is passing the test suite and installing now. rad!
15:03 timotimo oh, that thing!
15:04 timotimo TheLemonMan: quoted strings are an entirely different language, though
15:06 tony-o any idea what this means?: Internal error: zeroed target thread ID in work pass
15:06 TheLemonMan timotimo, I tried tracking the grammar states during the parse and it seems to get from the opening ( to the closing ) without reaching the <parameter> state
15:07 TheLemonMan it goes <signature> -> <ws> -> <before> -> <param_sep> -> <ws>
15:08 arw hm, strange. shouldn't rule foo {<ws><something>} be the same as rule foo { <something>}?
15:09 tony-o hiker is another project that i want to work on but i need some feedback other than 'i dont like mojolicious so i won't like that either'
15:09 timotimo tony-o: i never even used mojolicious :\
15:10 arw because somehow this leading whitespace in rule seems to be different: https://pbot.rmdir.de/2AEU1VcRz0WImbmd3yDNrQ
15:10 nadim nine: racoon++
15:11 leont joined #perl6
15:11 ptolemarch joined #perl6
15:11 smls arw: No,I think the space before the first thing in a rule does not call <ws>
15:11 nadim raccoon++ I mean, it's not so small we can remove letters out of it.
15:11 smls only spaces in between tokens, and after the last
15:11 timotimo what is raccoon?
15:11 tony-o timotimo: you probably wouldn't like it :-p
15:11 smls arw: See http://design.perl6.org/S05.html#line_1147
15:12 smls specifically, the "it ignores whitespace #1"
15:13 tony-o also interested in what raccoon is
15:13 canopus joined #perl6
15:14 arw smls: feels buggy somehow. or at least non-symmetric with the not-ignored trailing whitespace.
15:16 smls Yeah, I'm not a fan of the trailing <ws> either
15:21 nine timotimo: raccoon is nadim++'s alias for install-dist.pl. Because it's a bit like panda but much smaller ;)
15:22 timotimo oh, ok!
15:22 nine timotimo: you mean some declarative way to build native libraries?
15:22 timotimo not quite
15:22 timotimo have you seen what GTK::Simple does?
15:22 smls Besides making life hard for line-based grammars, the trailing <ws> also causes lots of repeated calls to <ws> which can't be good for performance
15:23 * nine is having a look
15:24 perlawhirl joined #perl6
15:24 aries_liuxueyang joined #perl6
15:24 timotimo smls: ah, because you tend to have calls to other things at the end of your regex, which may also have a <ws> at their end
15:24 perlawhirl hi perlers... oh good, we're talking regexen.
15:24 smls timotimo: That, and "<foo> <bar>" when foo has trailing <ws>
15:24 perlawhirl trying to match a symbol at left word boundary and it ain't working
15:25 perlawhirl m: say 'what about !this thing' ~~ m:g/ « '!' /;
15:25 camelia rakudo-moar 6ae6ec: OUTPUT«()␤»
15:25 timotimo ah, right
15:25 perlawhirl m: say 'what about !this thing' ~~ m:g/ « 't' /; # this works
15:25 camelia rakudo-moar 6ae6ec: OUTPUT«(「t」 「t」)␤»
15:25 perlawhirl m: say 'what about !this thing' ~~ m:g/ \s <( '!' /; # so does this
15:25 camelia rakudo-moar 6ae6ec: OUTPUT«(「!」)␤»
15:25 perlawhirl why not the first thing?
15:26 smls perlawhirl: Because there' no word boundary between the space and the !
15:26 nine timotimo: WTF?
15:26 timotimo nine: exactly
15:27 jdoege joined #perl6
15:27 timotimo nine: if the non-windows path wouldn't touch those .dll paths, installation would fail because file not found
15:27 timotimo if the dll paths were not in resources, windows wouldn't work because file not in resources
15:28 perlawhirl smld: so whats the best globally match '!here and !here' ?
15:28 perlawhirl m: '!here and !here' ~~ m:g/ [ ^ | \s <( ] '!' / # like this, i suppose ?
15:28 camelia rakudo-moar 6ae6ec: ( no output )
15:28 perlawhirl m: say '!here and !here' ~~ m:g/ [ ^ | \s <( ] '!' / # like this, i suppose ?
15:28 camelia rakudo-moar 6ae6ec: OUTPUT«(「!」 「!」)␤»
15:28 nine timotimo: so we'd need some optional resources?
15:28 timotimo that'd be one way to make it work
15:29 timotimo another would be to allow Build.pm to change the info in Meta.json
15:29 timotimo which ... could be problematic, or maybe not
15:29 smls perlawhirl:   <after [^|' ']> '!'   should also work
15:29 perlawhirl smls: good-o. thanks
15:30 dalek specs: 151d791 | (Zoffix Znet)++ | v6d.pod:
15:30 dalek specs: Revert "Forbid Bare C<\b> in Regexes"
15:30 dalek specs:
15:30 dalek specs: This reverts commit b14828bb01abb7e659b9f1a4d43ba572d3a4f173.
15:30 dalek specs: Per discussion with pmichaud++, this can be added right now, without
15:30 dalek specs: waiting for 6.d:
15:30 dalek specs: https://github.com/perl6/specs/com​mit/b14828bb01abb7e659b9f1a4d43ba5​72d3a4f173#commitcomment-18777938
15:30 dalek specs: review: https://github.com/perl6/specs/commit/151d791563
15:30 smls perlawhirl: Or maybe  <!after \S>  i.e. "not after a non-whitespace character"
15:30 nine timotimo: no, no, if anything we're moving towards declarative solutions. Anything that depends on the reader of meta data being able to run Perl 6 code is going to hurt us in the long run
15:31 lostinfog joined #perl6
15:31 timotimo that's true
15:31 perlawhirl smls: Ah! yes, that looks to be a better fit
15:31 perlawhirl smls++
15:33 canopus joined #perl6
15:40 hoelzro o/ #perl6
15:41 nine timotimo: there's certainly a simpler hack for Gtk::Simple: just ship it with empty .dll files and only on Windows fill them with the downloaded content. That way installing them everywhere does no harm.
15:41 hoelzro that's what I do for my modules!
15:50 leont mauke++ # funny lightning talks are important too
15:53 kyclark Where does a regex modifier go to make the whole thing case-insensitive?
15:54 kyclark Wait, got it.
15:54 leont (wrong channel)
15:56 kyclark FWIW, for use in my MAIN signature this works:
15:56 kyclark subset SortBy of Str where * ~~ /:i ^keys?|values?$/;
15:56 kyclark but this does not:
15:56 kyclark subset SortBy of Str where * ~~ m:i/^keys?|values?$/;
15:57 Skarsnik timotimo, why it's not up to the module manager to download extra ressources?
15:58 nine Skarsnik: yes, that's what I'm getting at. With a declarative way of specifying those resources, it would be the module manager's job.
15:58 skids kyclark: use /:i to embed the case sensitivity in the rx.  m: is more a procedural style, and for carrying options that cannot go inside.
16:00 Skarsnik and for stuff like extern lib (in binding module) it should be an information in the meta file, as an extern dep or something, like to inform the user installing the module that will need something else x)
16:01 Skarsnik and Hello btw
16:01 zacts joined #perl6
16:05 nine Skarsnik: definitely. That's something even Perl 5 is still missing. I'd love to see a native-depends: ['freetype', 'gdk-3-0', ...] and smart module managers that know how to find them or download them for your system.
16:09 kjs_ joined #perl6
16:16 lizmat joined #perl6
16:17 tbrowder joined #perl6
16:17 timotimo kyclark: m/foo/ is a command "execute this match right now", and then you smart match against the result of the match against $_
16:17 timotimo kyclark: you could have used rx:i/.../ because that's just "a regex literal"
16:17 kyclark Ah, thanks for the clarification.
16:17 timotimo kyclark: but you don't need the * ~~, because the where clause is already applied by smart matching
16:18 kyclark ORLY?
16:18 timotimo so it'd end up doing $value ~~ (* ~~ /regex/) for you
16:18 timotimo yup
16:18 mcmillhj joined #perl6
16:18 timotimo similar to the way "when" works. it also smart-matches for you
16:18 kyclark Heckin' sweet.
16:19 dalek doc: 14e4a10 | (Tom Browder)++ | doc/Type/Signature.pod6:
16:19 dalek doc: correct grammat
16:19 dalek doc: review: https://github.com/perl6/doc/commit/14e4a10d95
16:19 tbrowder s/grammat/grammar/
16:21 kyclark So I'm trying to show lots of different ways to accomplish the same idea (TIMTOWTDI and all), so can this be made better/shorter?
16:21 kyclark subset SortBy of Str where * (elem) <key value keys values>.Bag;
16:21 kyclark I also show the Unicode operator cuz that's cool
16:21 kyclark subset SortBy of Str where * ∈ <key value keys values>.Bag;
16:22 kyclark My favorite so far is:
16:22 kyclark subset SortBy of Str where * ∈ <key value keys values>.Bag;
16:22 kyclark oops
16:22 kyclark subset SortBy of Str where * ~~ /:i ^keys?|values?$/;
16:22 kyclark Because it's case-insensitive and handles singular/plural
16:22 kyclark Wait:
16:22 timotimo yes, smart matching against a Bag should give the same as * (elem) $the-bag
16:22 kyclark subset SortBy of Str where /:i ^keys?|values?$/;
16:24 kyclark m: 'key' ~~ <key value keys values>.Bag;
16:24 camelia rakudo-moar 7fa2ba: ( no output )
16:24 kyclark m: say 'key' ~~ <key value keys values>.Bag;
16:24 camelia rakudo-moar 7fa2ba: OUTPUT«False␤»
16:24 kyclark m: say 'key' (elem) <key value keys values>.Bag;
16:24 camelia rakudo-moar 7fa2ba: OUTPUT«True␤»
16:25 timotimo huh
16:25 timotimo so i'm rong
16:26 nadim timotimo: it all boils down to pthreads which is called by libuv, so it's down to libc, except if we want to stop using libuv ;)
16:26 jnthn We don't.
16:26 nadim jnthn: that was understood :)
16:26 kyclark BTW, what's the name of ∈?
16:26 jnthn And even if we did we'd *still* need working threads :S
16:27 jnthn Do we have a workable workaround yet, fwiw?
16:27 nadim jnthn: build glibc with elision off
16:27 timotimo flip all tables.
16:27 jnthn nadim: I guess that's what other similarly affected projects are saying?
16:27 hoelzro timotimo: I tried your slang trick - works like a charm =)
16:29 nadim jnthn: there's  an ubuntu request to be able to do that at run time, will probably not happen though
16:30 nadim jnthn: other projects are saying nothing most of the time, so users are just rebuilding glibc. I would if the debian package system had broken dependencies
16:30 timotimo hoelzro: oh god what have i done! ;)
16:30 hoelzro sometimes I think that "use nqp;" should become "use magic;" =P
16:30 timotimo well, it's MONKEY-GUTS
16:31 mcmillhj joined #perl6
16:32 kentnl joined #perl6
16:32 kentnl joined #perl6
16:33 timotimo i wonder if i can get some new performance opts into JSON::Fast
16:33 timotimo inspired by seeing how liz does it in the core code
16:34 timotimo nine: how do you feel about giving CU::R::Installation a little cache of json text to objects? it never modifies the objects that come out of the parse, right?
16:35 dalek doc: a0fcd69 | (Tom Browder)++ | doc/Type/Signature.pod6:
16:35 dalek doc: correct grammar
16:35 dalek doc: review: https://github.com/perl6/doc/commit/a0fcd69efa
16:38 hoelzro timotimo: ah, true
16:39 setty1 joined #perl6
16:41 dalek doc: 0022a87 | (Tom Browder)++ | doc/Type/Signature.pod6:
16:41 dalek doc: not sure what was intended, but rendered char looks wrong
16:41 dalek doc: review: https://github.com/perl6/doc/commit/0022a87a8b
16:42 timotimo nine: because it reads basically the same file over and over and over again when "use GTK::Simple"; the first time after installation it's responsible for 50% of the start-up time, after that it's a noticable bit less, but still a bunch
16:47 tbrowder kyclark: from wikipedia: 'The relation "is an element of", also called set membership'
16:47 perlawhirl is there an elegant way to delete an item from an array completely, ie, leave no empty container behind
16:47 perlawhirl m: my @a = <one two three>; @a[1] = |@; say @a;
16:47 camelia rakudo-moar 7fa2ba: OUTPUT«[one () three]␤»
16:48 perlawhirl i know i can do @a[*;*] or @a.map(|*)... but can i do while deleting?
16:48 mcmillhj joined #perl6
16:48 timotimo you need to use the splice method
16:48 perlawhirl timotimo++
16:49 timotimo for most cases, that is
16:49 perlawhirl i did know that... but had conveniently forgot it
16:49 timotimo happens :)
16:51 perlawhirl timotimo: btw, re: smartmatching on Bag/Set... it's works on Hashes, so... maybe it should work on Bags/Sets too?... but i'm not a language designer
16:51 perlawhirl m: my $b = Bag.new(<larry curly moe>); say 'moe' ~~ $b; say 'moe' ~~ $b.Hash
16:51 camelia rakudo-moar 7fa2ba: OUTPUT«False␤True␤»
16:51 perlawhirl I guess it encourages use of the set op's
16:52 iH2O joined #perl6
16:53 domidumont joined #perl6
16:53 timotimo m: say 'key'.Bag ~~ <key keys value values>.Bag
16:53 camelia rakudo-moar 7fa2ba: OUTPUT«False␤»
16:53 timotimo mhh
16:56 webstrand joined #perl6
16:56 arw ok, now i've got something parsed from my grammar. how do I get a nice usable data structure from that?
16:57 arw is .make the right thing to do? is there any documentation for that?
16:57 timotimo yup, make and .make are the right thing
16:57 timotimo it just sets the value of .made (aka .ast) on the result you've matched
16:58 harmil_wk arw: there are some sample grammars in the examples sections of the docs... sec...
16:59 harmil_wk http://examples.perl6.org/categories/parsers.html and especially http://examples.perl6.org/catego​ries/parsers/SimpleStrings.html which demonstrates actions in a trivial case
16:59 mcmillhj joined #perl6
17:00 smls arw: Here's a grammar I wrote that should hopefully be self-explanatory: https://www.reddit.com/r/dailyprogr​ammer/comments/3wshp7/20151214_chal​lenge_245_easy_date_dilemma/cxyvo1r
17:00 timotimo JSON::Tiny also has a grammar + actions
17:00 arw thx, i'll read through it
17:01 smls arw: https://docs.perl6.org/language/grammars also has explanations
17:01 harmil_wk arw: However, in these cases, the parsed thing is a "value" In most real grammars you're going to want to build a real AST that represents expressions of operators of values and the like.
17:01 iH2O left #perl6
17:03 arw harmil_wk: yes. and sometimes I want to name a node of the ast after a value two levels down and stuff like that.
17:03 timotimo you can recursively access match objects
17:03 timotimo no need for every single object to have a .made
17:05 arw timotimo: yes, but i have difficulties getting further than the first level $stuff<foo>, and neither $stuff.perl nor $stuff.say are very helpful.
17:05 timotimo you can get their .keys and such if you want
17:05 arw ah
17:05 timotimo oh
17:05 timotimo best advice:
17:06 timotimo get Data::Dump::Tiny
17:06 timotimo no, wait
17:06 timotimo Data::Dump::Tree
17:06 brrt joined #perl6
17:06 harmil_wk timotimo: I think we're burying arw in examples...
17:07 mempko joined #perl6
17:07 arw maybe. and in general I think I don't know perl6 sufficiently to understand some of them.
17:08 timotimo D:D:T isn't meant as an example
17:08 timotimo it's perfect for outputting match objects
17:08 arw hm, yes, the test cases scrolling by look great :)
17:08 arw far better than perl5 Data::Dumper even
17:09 nemo joined #perl6
17:09 timotimo probably not far better than perl5 Data::Dumper::Tree, though :)
17:11 smls arw: Just use the hash subscript operator { } or < > on a Match object, to get the Match of one of its names subrules.
17:11 smls arw: If you have something like  [<a> | <b>]+ and you need matches of a and b in the order they occured, use $/.caps (https://docs.perl6.org/type/Match#method_caps).
17:11 smls That's the gist of it :)
17:16 firstdayonthejob joined #perl6
17:16 * timotimo BBL
17:21 MilkmanDan joined #perl6
17:32 infina joined #perl6
17:32 infina joined #perl6
17:35 arw is there any equivalent to cpan.perl.org regarding the POD display for perl6 modules?
17:36 arw somehow modules.perl6.org only links to sources for stuff.
17:37 El_Che arw: not yet (work in progressI though). The best best is the README.md or the pods in the source
17:39 cognominal joined #perl6
17:45 PaleZebra joined #perl6
17:45 PaleZebra arw: http://modules.zef.pm/modules
17:47 arw PaleZebra: thx
17:47 arw seems like Data::Dump::Tree simply has no documentation.
17:48 PaleZebra arw: it's right there: https://github.com/nkh/P6-Data-Dump-Tree#usage
17:48 El_Che nice!
17:48 PaleZebra And it does show up here: http://modules.zef.pm/modules/N​adim%20Khemir/Data::Dump::Tree
17:48 arw PaleZebra: no, I mean "See lib/Data/Dump/Tree.pod for a complete documentation.". that just points to a useless pod
17:49 PaleZebra arw: well, it's this: https://gist.github.com/zoffixznet​/552ca464a473fbbf4c6aa5710ea1c327
17:50 PaleZebra arw: it's just GitHub doesn't know how to handle P6 pod. You might get docs with p6doc utility
17:50 PaleZebra http://modules.perl6.org/repo/p6doc
17:50 arw hm, okay, then its just github being weird.
17:51 smls m: dd;
17:51 camelia rakudo-moar 7fa2ba: OUTPUT«block <unit>␤»
17:51 smls ^^ I think that's new
17:51 smls (i.e. used to throw an error)
17:52 PaleZebra It dumps $?BLOCK now
17:52 PaleZebra m: sub foo { say "meow"; dd }()
17:52 camelia rakudo-moar 7fa2ba: OUTPUT«meow␤sub foo␤»
17:52 PaleZebra m: sub foo { say $?BLOCK }()
17:52 smls ah
17:52 camelia rakudo-moar 7fa2ba: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Variable '$?BLOCK' is not declared. Did you mean 'Block'?␤at <tmp>:1␤------> 3sub foo { say 7⏏5$?BLOCK }()␤»
17:52 PaleZebra or $?ROUTINE or whatever it is
17:52 smls m: sub foo { say &?BLOCK }()
17:52 camelia rakudo-moar 7fa2ba: OUTPUT«sub foo () { #`(Sub|60607664) ... }␤»
17:53 PaleZebra s: &dd
17:53 SourceBaby PaleZebra, Sauce is at https://github.com/rakudo/rakudo/​blob/7fa2ba7/src/core/Any.pm#L532
17:53 riatre joined #perl6
17:53 PaleZebra It's note .name ?? "{lc .^name} {.name}" !! "({lc .^name})" with callframe(1).code;
17:55 PaleZebra s: BagHash.new, "append", \(:42bar)
17:55 SourceBaby PaleZebra, Something's wrong: ␤ERR: Could not find candidate that can do \(:bar(42))␤  in sub sourcery at /home/zoffix/services/lib/CoreHackers-​Sourcery/lib/CoreHackers/Sourcery.pm6 (CoreHackers::Sourcery) line 29␤  in block <unit> at -e line 6␤␤
17:55 PaleZebra timotimo: ^ there's no candidate for it. But the issue you were having is giving a type object as the first argument so if the method is expecting an instance, it wouldn't be found
17:55 PaleZebra SourceBaby: help
17:55 SourceBaby PaleZebra, Use s: trigger with args to give to sourcery sub. e.g. s: Int, 'base'. See http://modules.perl6.org/d​ist/CoreHackers::Sourcery
17:57 mohae_ joined #perl6
18:04 mohae joined #perl6
18:06 arw somehow Data::Dump::Tree hates me: https://pbot.rmdir.de/QGFqF4zmBFL2BQgKIFWXbw
18:07 arw and without the role its useles because it shows only the first matching string...
18:22 riatre joined #perl6
18:25 [Coke] arw: that error makes sense to me; what is DDTR::MatchDetails ?
18:27 idiosyncrat_ joined #perl6
18:29 idiosyncrat_ Audrey Tang, who was so influential in both the Perl6 and Marpa communities is now a Minister of Digital in the Taiwanese government: http://focustaiwan.tw/news/aipl/201608250036.aspx
18:30 idiosyncrat_ Officially it looks like she's a "minister without portfolio"
18:30 mspo mm perl packer
18:30 mspo speaking of static linking and perl6 :)
18:32 idiosyncrat_ Surprising, but based on the link, no hoax, no joke.
18:33 arw [Coke]: according to the documentation a role for Data::Dump::Tree one should apply to change the output
18:34 Xliff m: say '\''
18:34 camelia rakudo-moar 7fa2ba: OUTPUT«'␤»
18:35 arw [Coke]: see e.g. here: https://gist.github.com/zoffixznet/552ca46​4a473fbbf4c6aa5710ea1c327#file-p6-p6-L594
18:38 gfldex joined #perl6
18:40 TEttinger joined #perl6
18:45 AndyBotwin joined #perl6
18:45 AndyBotwin joined #perl6
18:50 Xliff RabidGravy, you there?
18:50 RabidGravy I might be
18:51 Xliff I have X11, PanteraC and Crayola colors converted. :)
18:51 RabidGravy coolio
18:51 Xliff If you have other color options, let me know. Otherwise I will start getting this ready for the ecosystem.
18:52 Xliff There are some p6-isms I might need to take care of, too.
18:52 Xliff Just a heads up. I got your "DO EET" message in scrollback. I was already in the process of "doing it" when I got it. =)
18:54 smls m: say [Z] (<a b>, <x y>, <1 2>)
18:54 camelia rakudo-moar 7fa2ba: OUTPUT«((a x 1) (b y 2))␤»
18:54 smls m: say [Z] (<a b>, <x y>)
18:54 camelia rakudo-moar 7fa2ba: OUTPUT«((a x) (b y))␤»
18:54 smls m: say [Z] (<a b>,)
18:54 camelia rakudo-moar 7fa2ba: OUTPUT«((a b))␤»
18:55 smls ^^ TimToady, is that correct?
18:55 smls that edge-case means I can't use [Z] to transpose an array
18:56 rba_ joined #perl6
18:56 rba_ joined #perl6
18:58 smls because it doesn't return ((a) (b)) in the last, single-row case
18:59 rba_ joined #perl6
19:00 gfldex smls: that's by design. Any reduction operator returns the single element given a single element list
19:00 smls gfldex: Even if the operator has a single-element overload?
19:01 gfldex m: say <a b> Z ();
19:01 camelia rakudo-moar 7fa2ba: OUTPUT«()␤»
19:02 kyclark_ joined #perl6
19:02 [Coke] arw - that's a random gist by zoffix.
19:02 [Coke] shouldn't you be looking at the Data::Dump::Tree docs?
19:02 gfldex m: say <a b> Z Empty;
19:02 camelia rakudo-moar 7fa2ba: OUTPUT«((a) (b))␤»
19:03 ugexe m: say reduce { $^a Z $^b }, (<a b>,)
19:03 camelia rakudo-moar 7fa2ba: OUTPUT«(a b)␤»
19:03 smls m: say &infix:<Z>( <a b> )
19:03 camelia rakudo-moar 7fa2ba: OUTPUT«((a b))␤»
19:03 [Coke] I don't see any reference to it here: https://github.com/nkh/P6-Data-Dump-Tree
19:03 [Coke] and I suspect it was an abbreviation for Data Dump Tree that was not meant to compile.
19:04 smls m: say &infix:<Z>( (<a b>,) )
19:04 camelia rakudo-moar 7fa2ba: OUTPUT«((a) (b))␤»
19:04 smls ^^ gfldex
19:04 gfldex smls: the zip operator on uneven lists is questionable to start with
19:04 smls If reduce called that, it would work out
19:05 arw committable6: the docs are https://raw.githubusercontent.com/nkh/P6-Da​ta-Dump-Tree/master/lib/Data/Dump/Tree.pod
19:05 committable6 arw, ¦«the»: Cannot find this revision
19:05 arw [Coke]: https://raw.githubusercontent.com/nkh/P6-Da​ta-Dump-Tree/master/lib/Data/Dump/Tree.pod
19:05 arw same docs from github
19:05 smls gfldex: Yeah, but the n=1 case is special - see the matrix transposition use-case I showed above
19:07 [Coke] arw: ok, that helps. that is defined in P6-Data-Dump-Tree/lib/Data/Dump/Tree/ExtraRoles.pm
19:07 arw [Coke]: the unabbreviated form gives the same error. and the examples use 'does DDTR::...': https://github.com/nkh/P6-Data-Dump-​Tree/blob/master/examples/filter1.pl
19:07 [Coke] then try adding this to your script:
19:07 [Coke] use Data::Dump::Tree::ExtraRoles;
19:08 zakharyas joined #perl6
19:09 domidumont joined #perl6
19:10 arw [Coke]: works, thanks
19:13 [Coke] I think having 2 top level namespaces there where one is an obv. abbr. of the other.
19:13 [Coke] ... is not a good idea. but I don't care enough to open a ticket there.
19:14 MilkmanDan joined #perl6
19:15 kjs_ joined #perl6
19:16 smls gfldex, TimToady: I've used [Z] or `zip` to transpose n list of m lists before, and seen other people do so (e.g. on rosettacode).
19:16 smls I guess that means quite a few bugs out in the wild.
19:16 labster joined #perl6
19:17 smls One wouldn't expect the n=1 case to fail while all other cases (including m=1 and n=m=0) work fine.
19:18 smls Would anything break if reduce were taught to call  &infix:<op>( $a, )  if it supports being called with one arg?
19:20 hoelzro is there a way to ask a CallFrame if it's a "low-level" (as in from rakudo code) one?
19:20 smls m: say &infix:<+>(4)
19:20 camelia rakudo-moar 7fa2ba: OUTPUT«4␤»
19:20 heatsink joined #perl6
19:20 smls looks like basic math operator handle it fine
19:21 idiosyncrat_ left #perl6
19:22 smls If it couldn't be done for `reduce &foo, ...` in general, maybe just for those cases where &foo is an operator?
19:23 smls Those are already special-cased anyway, for the associativity and identity stuff
19:24 kyclark_ joined #perl6
19:25 smls "couldn't be done" because of backwards compatibility concerns, I mean.
19:34 kyclark_ joined #perl6
19:45 mcsnolte joined #perl6
19:45 [Coke] arw: thank you for being patient with me, by the way, as I caught up to where you were.
19:46 timotimo i've been AFK for a long time, how's things with arw going?
19:46 [Coke] timotimo: he needed a 'use' that was missing in the docs.
19:46 timotimo oh
19:46 [Coke] otherwise that extra role wasn't ins cope
19:47 [Coke] so, unstuck for a bit, I thikn.
19:58 mcmillhj joined #perl6
20:11 ajr_ joined #perl6
20:13 ajr_ This code is wrong: say "or edited, " ~ sprintf("D6.2", $circ); but it produces an interesting result
20:13 ajr_ The circumference of a 12.5mm tuit is 78.5398163397448 Your printf-style directives specify 0 arguments, but 1 argument was supplied   in any  at /home/guru/rakudo/rakudo-star-2016.07/insta​ll/share/perl6/runtime/CORE.setting.moarvm line 1   in any panic at /home/guru/rakudo/rakudo-star-2016.07​/install/share/nqp/lib/NQPHLL.moarvm line 1
20:14 ajr_ The more nearly correct I get the mask, the more elaborate the message.
20:14 mcmillhj joined #perl6
20:14 cdg joined #perl6
20:14 ajr_ The "panic" makes me wonder if I've found a bug?
20:16 ajr_ The "circumference" line is from a previous, valid, statement.
20:17 harmil_wk m: say "foo {sprintf "D6.2", pi}"
20:17 camelia rakudo-moar 7fa2ba: OUTPUT«Your printf-style directives specify 0 arguments, but 1 argument was supplied␤  in any  at /home/camelia/rakudo-m-inst-2/share​/perl6/runtime/CORE.setting.moarvm line 1␤  in any panic at /home/camelia/rakudo-m-inst-2​/share/nqp/lib/NQPHLL.moarvm line 1…»
20:18 harmil_wk Yep, that looks like something to rakudobug
20:18 harmil_wk But it's really just an error message generation issue. The initial error is correct.
20:30 pecastro joined #perl6
20:31 mcmillhj joined #perl6
20:31 ajr_ bug report sent.
20:34 domidumont joined #perl6
20:34 lizmat joined #perl6
20:40 pecastro joined #perl6
20:42 mcmillhj joined #perl6
20:48 kyclark_ joined #perl6
20:48 khw joined #perl6
20:54 timotimo i don't get it, what's wrong about the error?
20:55 nine timotimo: actually I do have ideas that would allow us to skip parsing the JSON altogether unless someone really accessed the meta data through $comp-unit.distribution.
20:55 geekosaur for one, I see only mentions of internal locations...
20:57 jnthn nine: What operations need parsing JSON these days?
20:57 harmil_wk Just FYI: getting Internal error: Unwound entire stack and missed handler in some code that's mixing Promises and catching errors from tests. Not sure if it's trivial to reproduce, though...
20:57 mvorg joined #perl6
20:58 jnthn harmil_wk: Hm, it should usually manage better than that. The one case I know of that fails that way is in nativecall callbacks.
20:58 Celelibi joined #perl6
20:59 cognominal joined #perl6
20:59 harmil_wk It's not reliable right now, but I can try to isolate a repeater later
20:59 nine jnthn: we already have :ver, :auth: and :api in the short name lookup files. Ironically the one piece missing is the name of the source file which would be ridiculously simple to add :)
20:59 nine jnthn: we also parse the JSON when someone accesses %?RESOURCES
21:00 mcmillhj joined #perl6
21:03 * geekosaur remembers to file LTA for last night's fun
21:04 n1lp7r joined #perl6
21:06 jnthn nine: ah, OK :)
21:06 kyclark_ joined #perl6
21:06 jnthn nine: Was gonna say, I hope the common case didn't need it :)
21:09 nine jnthn: still does. Doesn't actually need to. Maybe if tomorrow my brane is still not up to debugging the remaining lexical_module_load failures, I'll give it some love.
21:09 nine I've already done a bunch of LHF for that reason today and it's not exactly a disadvantage :)
21:12 jnthn :)
21:13 jnthn But of the whole reason for the short files was to not need to parse JSON in the common cases :)
21:13 jnthn s/But of//
21:13 kyclark_ joined #perl6
21:16 nine To not have to parse the JSON of all the dists to find the right one. At least I didn't read it as going one step further and not having to read the JSON for the winning dist :)
21:18 jnthn Ah, that's what I'd originally intended :)
21:21 kyclark_ joined #perl6
21:23 nine Better late than never ;) And I'm glad there's still sooo low hanging fruit around for speeding up module loading :)
21:26 sjoshi joined #perl6
21:29 kyclark_ joined #perl6
21:29 dalek doc: c81cb65 | (Tom Browder)++ | doc/Language/quoting.pod6:
21:29 dalek doc: add example of an interpolating heredoc
21:29 dalek doc: review: https://github.com/perl6/doc/commit/c81cb6535f
21:31 cognominal joined #perl6
21:33 Hotkeys tfw discord doesn't have perl6 highlighting
21:41 dalek doc: 0762134 | (Tom Browder)++ | doc/Language/quoting.pod6:
21:41 dalek doc: add missing 's'
21:41 dalek doc: review: https://github.com/perl6/doc/commit/0762134540
21:44 harmil_wk Looks like CompUnit::Util has rotted I'm getting "Method 'sink' not found for invocant of class 'NQPMu'" trying to install it.
21:45 harmil_wk Is there a different way to re-export an imported module's exportables?
21:46 harmil_wk Strangely it shows as currently passing on the modules list
21:50 nicq20 joined #perl6
21:56 kurahaupo_ joined #perl6
21:58 firstdayonthejob joined #perl6
22:00 n1lp7r joined #perl6
22:15 hoelzro awwaiid++ # REPL fixes
22:15 awwaiid hoelzro: https://github.com/rakudo/rakudo/pull/847 uses the special return value to handle 'last' in REPL. Had to do some weird things
22:15 awwaiid heh
22:15 profan is there any lib to use for p6 today that just lets you set up a really simple webserver which .. works? basic routing, etc
22:16 profan just went through one which the examples in it don't run on the latest perl6
22:17 awwaiid profan: I used bailador previously, but haven't recently, and it came with something. Might have been single-threaded though
22:17 profan it's ok if it's single threaded as long as there's something that works :p
22:18 profan bailador looks promising, thanks :)
22:22 rkazak joined #perl6
22:23 kyclark_ joined #perl6
22:30 cibs joined #perl6
22:31 kyclark_ joined #perl6
22:37 dalek doc: c328b06 | (Tom Browder)++ | doc/Language/quoting.pod6:
22:37 dalek doc: correct chars which are known to need escaping
22:37 dalek doc: review: https://github.com/perl6/doc/commit/c328b0615a
22:38 bioduds joined #perl6
22:39 Sgeo joined #perl6
22:57 MasterDuke .tell kyclark /:i ^ keys?|values? $ / may not do what you want. the '^' and '$' don't distribute to the different values in an alternation. i suspect you want /:i ^ [key|value]s? $ /
22:57 yoleaux MasterDuke: I'll pass your message to kyclark.
23:11 leont joined #perl6
23:17 khw joined #perl6
23:38 mcmillhj joined #perl6
23:40 canopus joined #perl6

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

Perl 6 | Reference Documentation | Rakudo