Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2017-01-19

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:02 neewbie hello
00:05 neewbie I have a question, can somebody explain this to me?  I did not understand how this operation worked. I know that xx repeats the list. https://gist.github.com/anonymous/e4cbffe7634c9f3a75b9b7eac6693419
00:05 neewbie thanks in advance
00:08 AlexDaniel neewbie: well, it's basically <a b c> X <a b c>
00:09 AlexDaniel the docs for X are here: https://docs.perl6.org/language/operators#index-entry-cross_product_operator
00:09 neewbie [X] is the same as [+] in this case?
00:09 AlexDaniel yea
00:09 neewbie thank you =D
00:09 AlexDaniel you can put any infix op inside []
00:10 AlexDaniel m: say [gcd] 20, 48, 90
00:10 camelia rakudo-moar 1aeea1: OUTPUT«2␤»
00:11 AlexDaniel | is not needed there though
00:11 neewbie what | do?
00:11 neewbie [infix] is like a foldr, right?
00:12 AlexDaniel m: my $x = (2, 5, 8); .say for $x
00:12 camelia rakudo-moar 1aeea1: OUTPUT«(2 5 8)␤»
00:12 AlexDaniel m: my $x = (2, 5, 8); .say for |$x
00:12 camelia rakudo-moar 1aeea1: OUTPUT«2␤5␤8␤»
00:13 neewbie | extract from the list?
00:14 neewbie and why can you use .say ? i don't understand why can you call a function from nothing is like the $_ inside the for loop?
00:14 Geth doc: bbae187a35 | (Aleks-Daniel Jakimenko-Aleksejev)++ | doc/Language/operators.pod6
00:14 Geth doc: Missing comma
00:14 Geth doc: review: https://github.com/perl6/doc/commit/bbae187a35
00:14 AlexDaniel neewbie: yes, .say is basically $_.say
00:14 gfldex neewbie: see https://docs.perl6.org/type/Slip
00:15 neewbie but is not inside a loop,
00:15 neewbie ><
00:16 AlexDaniel why not?
00:16 AlexDaniel m: my $x = (2, 5, 8); for |$x { .say }
00:16 camelia rakudo-moar 1aeea1: OUTPUT«2␤5␤8␤»
00:16 AlexDaniel m: my $x = (2, 5, 8); .say for |$x
00:16 camelia rakudo-moar 1aeea1: OUTPUT«2␤5␤8␤»
00:16 AlexDaniel same thing
00:16 neewbie .-.
00:17 AlexDaniel neewbie: statement modifiers are mentioned here I think: https://docs.perl6.org/language/control#if
00:18 neewbie thanks gfldex and alexdaniel
00:18 neewbie I'll study more
00:18 stmuk_ joined #perl6
00:23 xyz_ neewbie: I think [] is more like foldl.
00:24 xyz_ rakudo: sub infix:<op>($a, $b) { "($a + $b)" }; [op] ^10
00:24 camelia rakudo-moar 1aeea1: OUTPUT«Potential difficulties:␤    Useless use of [op] in sink context␤    at <tmp>:1␤    ------> 3sub infix:<op>($a, $b) { "($a + $b)" }; 7⏏5[op] ^10␤»
00:24 xyz_ sub infix:<op>($a, $b) { "($a + $b)" }; say [op] ^10
00:24 xyz_ rakudo: sub infix:<op>($a, $b) { "($a + $b)" }; say [op] ^10
00:24 camelia rakudo-moar 1aeea1: OUTPUT«(((((((((0 + 1) + 2) + 3) + 4) + 5) + 6) + 7) + 8) + 9)␤»
00:25 labster joined #perl6
00:25 timotimo it depends on what operator you use
00:25 timotimo we have left associative and right associative operators
00:25 timotimo and [] uses that
00:25 timotimo m: sub infix:<op>($a, $b) is assoc('right') { "($a + $b)" }; say [op] ^10
00:25 camelia rakudo-moar 1aeea1: OUTPUT«(0 + (1 + (2 + (3 + (4 + (5 + (6 + (7 + (8 + 9)))))))))␤»
00:25 timotimo see?
00:27 neewbie so complex
00:29 hartenfels m: sub infix:<op>(*@xs) is assoc<list> { "(@xs[])" }; say [op] ^10
00:29 camelia rakudo-moar 1aeea1: OUTPUT«(0 1 2 3 4 5 6 7 8 9)␤»
00:29 hartenfels Oh neat that DWIMs too.
00:44 timotimo https://anvaka.github.io/common-words/#?lang=pl
00:51 bwisti joined #perl6
00:53 aborazmeh joined #perl6
00:53 aborazmeh joined #perl6
01:00 neewbie cool
01:00 agentzh joined #perl6
01:07 sammers hi #perl6
01:08 sammers m: (1..4) ==> grep({ $_ >=2 }) ==> sort;
01:08 camelia rakudo-moar 1aeea1: ( no output )
01:08 sammers m: (1..4) ==> grep({ $_ >=2 }) ==> sort ==> say();
01:08 camelia rakudo-moar 1aeea1: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Preceding context expects a term, but found infix ==> instead␤at <tmp>:1␤------> 3(1..4) ==> grep({ $_ >=2 }) ==> sort ==>7⏏5 say();␤»
01:08 sammers m: (1..4) ==> grep({ $_ >=2 }) ==> sort() ==> say();
01:08 camelia rakudo-moar 1aeea1: OUTPUT«(2 3 4)␤»
01:08 xyz_ timotimo: Why is "Xi" an often-used word?
01:08 sammers m: (1..4) ==> grep({ $_ >=2 }) ==> sort() ==> say;
01:08 camelia rakudo-moar 1aeea1: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Unsupported use of bare "say"; in Perl 6 please use .say if you meant $_, or use an explicit invocant or argument, or use &say to refer to the function as a noun␤at <tmp>:1␤------> 3 ==> grep({ $_ >=2 }…»
01:09 sammers why can't I end that feed with say without ()?
01:09 sammers m: (1..4) ==> grep({ $_ >=2 }) ==> sort;
01:09 camelia rakudo-moar 1aeea1: ( no output )
01:09 sammers m: my @a = ((1..4) ==> grep({ $_ >=2 }) ==> sort); say @a;
01:09 camelia rakudo-moar 1aeea1: OUTPUT«[2 3 4]␤»
01:09 sammers m: (1..4) ==> grep({ $_ >=2 }) ==> sort() ==> say;
01:09 camelia rakudo-moar 1aeea1: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Unsupported use of bare "say"; in Perl 6 please use .say if you meant $_, or use an explicit invocant or argument, or use &say to refer to the function as a noun␤at <tmp>:1␤------> 3 ==> grep({ $_ >=2 }…»
01:09 sammers m: (1..4) ==> grep({ $_ >=2 }) ==> sort() ==> &say;
01:09 camelia rakudo-moar 1aeea1: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Sorry, do not know how to handle this case of a feed operator yet.␤at <tmp>:1␤------> 3==> grep({ $_ >=2 }) ==> sort() ==> &say7⏏5;␤»
01:21 sammers xyz_, click on Xi and you can see some of the stats
01:25 xyz_ sammers: OK, "$Xi" is used in a Perl file distributed with OpenSSL. That makes sense. :-)
01:40 sammers timotimo, thanks for sharing that link.
01:42 sammers xyz_, the most commonly used term for .go files is err
01:54 kupopo joined #perl6
01:58 kupopo I'm having the darnedest time finding documentation on regex/grammar character classes - docs.perl6.org/language/regexes doesn't really clarify the grammar for character classes at all.  How can I express (from P5) [^] ]?
01:58 kupopo (i.e. anything other than whitespace or a close bracket)
01:59 brokenchicken kupopo: <-[\]]>
02:00 brokenchicken kupopo: oh, wait that also excludes space right?
02:00 brokenchicken m: say 'foo] bar' ~~ m:g/<-[\]\ ]>+/
02:00 camelia rakudo-moar 1aeea1: OUTPUT«(「foo」 「bar」)␤»
02:00 brokenchicken m: say 'foo] bar' ~~ m:g/<-[\] ]>+/
02:00 camelia rakudo-moar 1aeea1: OUTPUT«(「foo」 「 bar」)␤»
02:01 * brokenchicken expected for that to either work or warn :(
02:01 brokenchicken m: say 'foo] bar' ~~ m:g/<-[] ]>+/
02:01 camelia rakudo-moar 1aeea1: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Unable to parse expression in metachar:sym<assert>; couldn't find final '>' ␤at <tmp>:1␤------> 3say 'foo] bar' ~~ m:g/<-[] 7⏏5]>+/␤»
02:01 brokenchicken right, so <-[\]\ ]>
02:01 brokenchicken <-[]> is the [^] and stuff inside is the stuff you're excluding
02:02 brokenchicken kupopo: also, I can recommend filing an https://github.com/perl6/doc Issue saying you couldn'
02:02 brokenchicken t find this info or whatever
02:03 kupopo Thanks - for whatever reason I was under the impression that escaping didn't work in that context.  Will do.
02:04 brokenchicken kupopo: I see it mentioned here: https://docs.perl6.org/language/regexes.html#Enumerated_character_classes_and_ranges
02:04 brokenchicken though it took me a minute to find that myself.... and I knew what to look for :(
02:07 brokenchicken m: say 'foo] bar' ~~ m:g/<-[\c[RIGHT SQUARE BRACKET]\c[SPACE]]>+/
02:07 camelia rakudo-moar 1aeea1: OUTPUT«(「foo」 「bar」)␤»
02:07 brokenchicken neat
02:07 brokenchicken m: say 'foo] bar' ~~ m:g/<-[  \c[RIGHT SQUARE BRACKET]  \c[SPACE]  ]>+/
02:07 camelia rakudo-moar 1aeea1: OUTPUT«(「foo」 「bar」)␤»
02:07 brokenchicken ah, k, I see why it's good that space doesn't work
02:07 brokenchicken *doesn't warn
02:08 cale2 joined #perl6
02:09 kupopo All I see is "You are also allowed to write the backslashed forms for character classes between the [ ] ."
02:09 kupopo And \] is not what I could call a "backslashed form for a character class", so it was a little misleading.  Filed https://github.com/perl6/doc/issues/1146
02:10 kupopo m: say 'foo] bar' ~~ m:gs/<-[] ]>+/
02:10 camelia rakudo-moar 1aeea1: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Unable to parse expression in metachar:sym<assert>; couldn't find final '>' ␤at <tmp>:1␤------> 3say 'foo] bar' ~~ m:gs/<-[] 7⏏5]>+/␤»
02:11 kupopo m: say 'foo] bar' ~~ m:g:s/<-[] ]>+/
02:11 camelia rakudo-moar 1aeea1: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Unable to parse expression in metachar:sym<assert>; couldn't find final '>' ␤at <tmp>:1␤------> 3say 'foo] bar' ~~ m:g:s/<-[] 7⏏5]>+/␤»
02:11 kupopo m: say 'foo] bar' ~~ m:g:s/<-[\] ]>+/
02:11 camelia rakudo-moar 1aeea1: OUTPUT«(「foo」 「 bar」)␤»
02:11 brokenchicken need to escape space too
02:11 brokenchicken or use \s if you want any whitespace
02:11 kupopo Odd, I had assumed the space was just eaten, so adding :s adverb would solve it
02:11 kupopo er, : s
02:11 brokenchicken It is just eaten
02:12 brokenchicken Oh
02:12 brokenchicken hm
02:12 kupopo So :sigspace only applies to outside character classes?
02:12 kupopo m: say 'foo] bar' ~~ m:g:s/ <-[\] ]>+/
02:12 camelia rakudo-moar 1aeea1: OUTPUT«(「foo」 「 bar」)␤»
02:12 brokenchicken I'll file a bug report for that one and have someone take a look if it's supposed to be that way
02:13 kupopo I must be using :sigspace wrong...
02:13 brokenchicken kupopo: or it's a bug :P
02:13 brokenchicken m: say " " ~~ m:s/<-[ ]>/
02:13 camelia rakudo-moar 1aeea1: OUTPUT«===SORRY!===␤Iteration past end of iterator␤»
02:13 brokenchicken fun :)
02:16 brokenchicken Ticket https://rt.perl.org/Ticket/Display.html?id=130586
02:17 kupopo gotcha
02:29 cdg joined #perl6
02:33 hartenfels1 joined #perl6
02:33 shayan_ left #perl6
02:33 john51_ joined #perl6
02:34 mindos_ joined #perl6
02:34 kipd_ joined #perl6
02:35 jcallen_ joined #perl6
02:35 mr_ron_ joined #perl6
02:36 obfusk_ joined #perl6
02:36 hoelzro joined #perl6
02:36 sufrosti1o joined #perl6
02:37 kentnl joined #perl6
02:37 notostraca joined #perl6
02:37 Ven joined #perl6
02:38 riatre_ joined #perl6
02:39 [ptc]_ joined #perl6
02:40 tardisx_ joined #perl6
02:40 _chee joined #perl6
02:46 agentzh joined #perl6
02:48 ilbot3 joined #perl6
02:48 Topic for #perl6 is now »ö« Welcome to Perl 6! | https://perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:,  or /msg camelia p6: ... | irclog: http://irc.perl6.org or http://colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
02:49 leego joined #perl6
02:49 stmuk_ joined #perl6
02:50 ilogger2 joined #perl6
02:50 khw joined #perl6
02:50 bwisti joined #perl6
02:54 TeamBlast joined #perl6
03:01 llfourn joined #perl6
03:08 cpage_ joined #perl6
03:10 leego joined #perl6
03:15 xtreak joined #perl6
03:39 Celelibi joined #perl6
03:47 cpage joined #perl6
03:53 noganex_ joined #perl6
04:01 haxmeister joined #perl6
04:04 haxmeister is padre still maintained?
04:05 agentzh can i open a file handle on a Perl 6 string? Like in Perl 5: open my $in, "<", \$str ?
04:22 dj_goku agentzh: https://docs.perl6.org/language/io and
04:26 agentzh dj_goku: i read through that file but see no reference on opening a pseudo file from a perl 6 string buffer instead of from the file system.
04:26 agentzh dj_goku: am i missing something obvious here? thanks
04:30 dj_goku I am confused on why you want to open a file handle on a string?
04:31 sammers agentzh, I don't think this is possible in p6
04:34 BenGoldberg In perl6, file handles are just objects.  So if it doesn't yet exist, you can simply write a class which does what you want.
04:34 [Coke] haxmeister: I don't think so; last release was 2013 or so
04:34 haxmeister ok thank you [Coke] ..
04:34 [Coke] agentzh: pretty sure that's already in the ecosystem.
04:35 agentzh thanks for your answers!
04:35 [Coke] see IO::String and IO::Blob
04:35 agentzh ah, interesting. thanks
04:40 BenGoldberg m: my $foo = 'abc'; (my $fh = IO::String.new).open( $foo, :bind ); $fh.print: "def"; $foo.say;
04:40 camelia rakudo-moar 1aeea1: OUTPUT«Could not find symbol '&String'␤  in block <unit> at <tmp> line 1␤␤Actually thrown at:␤  in block <unit> at <tmp> line 1␤␤»
04:40 BenGoldberg m: use IO::String; my $foo = 'abc'; (my $fh = IO::String.new).open( $foo, :bind ); $fh.print: "def"; $foo.say;
04:40 camelia rakudo-moar 1aeea1: OUTPUT«===SORRY!===␤Could not find IO::String at line 1 in:␤    /home/camelia/.perl6␤    /home/camelia/rakudo-m-inst-2/share/perl6/site␤    /home/camelia/rakudo-m-inst-2/share/perl6/vendor␤    /home/camelia/rakudo-m-inst-2/share/perl6␤    CompUnit::Re…»
04:42 * BenGoldberg wonders why .open in IO::String doesn't return self
05:17 AlexDaniel joined #perl6
05:36 Cabanossi joined #perl6
06:00 rurban joined #perl6
06:05 labster joined #perl6
06:13 bwisti joined #perl6
06:34 rurban joined #perl6
06:34 sammers m: use Test; is ((1..5) ==> grep({$_ > 2}) ==> all()), all(3, 4, 5), "test all";
06:34 camelia rakudo-moar 1aeea1: OUTPUT«not ok 1 - test all␤␤# Failed test 'test all'␤# at <tmp> line 1␤# expected: all(3, 4, 5)␤#      got: all(3, 4, 5)␤»
06:34 sammers hmm
06:36 sammers m: use Test; is ((1..5) ==> grep({$_ > 2}) ==> all()), (3|4|5), "test all";
06:36 camelia rakudo-moar 1aeea1: OUTPUT«ok 1 - test all␤»
06:40 AlexDaniel sammers: well, it should be (3&4&5)
06:40 AlexDaniel and that will give the same output…
06:40 AlexDaniel expected: all(3, 4, 5) got: all(3, 4, 5)
06:40 AlexDaniel :|
06:41 agentzh joined #perl6
06:43 sammers what is the difference between (3|4|5) and (3&4&5)?
06:43 sammers m: (3&4&5).WHAT
06:43 camelia rakudo-moar 1aeea1: ( no output )
06:43 timotimo m: say 4 == (3&4&5)
06:43 camelia rakudo-moar 1aeea1: OUTPUT«all(False, True, False)␤»
06:43 sammers m: say (3&4&5).WHAT
06:43 camelia rakudo-moar 1aeea1: OUTPUT«(Junction)␤»
06:43 timotimo m: say so 4 == (3&4&5)
06:43 camelia rakudo-moar 1aeea1: OUTPUT«False␤»
06:43 timotimo m: say 4 == (3|4|5)
06:43 camelia rakudo-moar 1aeea1: OUTPUT«any(False, True, False)␤»
06:43 timotimo m: say so 4 == (3|4|5)
06:43 camelia rakudo-moar 1aeea1: OUTPUT«True␤»
06:45 sammers ok, on this example, is test evaluating expected as a string?
06:45 sammers m: use Test; is ((1..5) ==> grep({$_ > 2}) ==> all()), all(3, 4, 5), "test all";
06:45 camelia rakudo-moar 1aeea1: OUTPUT«not ok 1 - test all␤␤# Failed test 'test all'␤# at <tmp> line 1␤# expected: all(3, 4, 5)␤#      got: all(3, 4, 5)␤»
06:45 sammers what does that mean?
06:46 timotimo m: use Test; is all(1, 2, 3), all(1, 2, 3), "junk"
06:46 camelia rakudo-moar 1aeea1: OUTPUT«not ok 1 - junk␤␤# Failed test 'junk'␤# at <tmp> line 1␤# expected: all(1, 2, 3)␤#      got: all(1, 2, 3)␤»
06:47 timotimo m: use Test; ok all(1, 2, 3) eqv all(1, 2, 3), "junk"
06:47 camelia rakudo-moar 1aeea1: OUTPUT«not ok 1 - junk␤␤# Failed test 'junk'␤# at <tmp> line 1␤»
06:47 timotimo it's applying the comparison operation to the junction and it autothreads
06:47 timotimo the problem is: not all of 1, 2, and 3 equals all of 1, 2, and 3
06:47 timotimo because each of 1, 2, and 3 has 2 in the other junction that it doesn't equal
06:49 sammers ah, ok
06:49 timotimo by 2 i mean "two of the other values"
06:50 timotimo have you had a look at the roast tests for junctions to see how they deal with that?
06:50 wamba joined #perl6
06:51 RabidGravy joined #perl6
06:51 sammers on that feed operator, the docs say " it is often required that you call with parentheses (though this is not required for the very last routine/method)." but if you remove the last () from all() like this, 'use Test; is ((1..5) ==> grep({$_ > 2}) ==> all), (3|4|5), "test all";' there is a compile error.
06:51 mr_ron joined #perl6
06:51 timotimo that's an example from the docs? that's bad :)
06:52 sammers the example ends on sort
06:52 sammers but it fails with say
06:52 sammers print, printf, one, etc.
06:53 sammers https://docs.perl6.org/language/operators#index-entry-feed
06:54 sammers this works:
06:54 sammers m: <people of earth> ==> map({ .tc }) ==> grep /<[PE]>/ ==> sort
06:54 camelia rakudo-moar 1aeea1: ( no output )
06:54 sammers this fails:
06:54 sammers m: <people of earth> ==> map({ .tc }) ==> grep /<[PE]>/ ==> say
06:54 camelia rakudo-moar 1aeea1: OUTPUT«5===SORRY!5===␤Argument to "say" seems to be malformed␤at <tmp>:1␤------> 3> map({ .tc }) ==> grep /<[PE]>/ ==> say7⏏5<EOL>␤Other potential difficulties:␤    Unsupported use of bare "say"; in Perl 6 please use .say if you meant $_, or u…»
06:58 sammers timtomo, I should note, the any() test is nothing of signifigance, just testing out odd cases
06:58 moritz m: <people of earth> ==> map({ .tc }) ==> grep /<[PE]>/ ==> say()
06:58 camelia rakudo-moar 1aeea1: OUTPUT«(People Earth)␤»
06:59 sammers right
06:59 sammers moritz, that works fine, but the docs say the final sub/method can ommit the ()
07:00 sammers it fails on any, all, one, say, print, printf, etc. so I think the docs are wrong or ()-less support hasn't been added to those methods yet?
07:02 domidumont joined #perl6
07:02 moritz m: <people of earth> ==> map({ .tc }) ==> grep /<[PE]>/ ==> say;
07:02 camelia rakudo-moar 1aeea1: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Unsupported use of bare "say"; in Perl 6 please use .say if you meant $_, or use an explicit invocant or argument, or use &say to refer to the function as a noun␤at <tmp>:1␤------> 3> map({ .tc }) ==> g…»
07:03 moritz sammers: not sure which one; in doubt I'd change the docs, because it's easier than changing the parser :-)
07:03 sammers timotimo, I will take a look through https://github.com/perl6/roast/tree/master/S03-junctions
07:03 sammers thanks
07:03 sammers ha
07:04 sammers moritz, ok, is there somewhere I can find out the intended use? I would like to contribute if possible here.
07:05 sammers I can update the docs, but if this is "supposed" to work then maybe I can add a note about how this isn't implemented for all subs / methods yet.
07:05 CIAvash joined #perl6
07:10 aborazmeh joined #perl6
07:10 aborazmeh joined #perl6
07:16 agentzh joined #perl6
07:26 xtreak joined #perl6
07:33 effbiai joined #perl6
07:33 effbiai joined #perl6
07:45 Ven joined #perl6
07:59 Ven joined #perl6
08:07 domidumont joined #perl6
08:08 moritz sammers: I guess this is a corner case nobody thought of before, so you'll most likely find nothing in the design docs
08:11 sammers moritz: should I add this to RT just to capture it somewhere?
08:12 moritz sammers: your choice
08:13 sammers ok, I will put something together
08:13 sammers is it possible to test for the SORRY compile errors?
08:15 Vynce joined #perl6
08:16 sammers nevermind
08:16 moritz X::Comp
08:22 sammers thanks
08:26 zakharyas joined #perl6
08:30 Ven joined #perl6
08:38 agentzh joined #perl6
08:44 melezhik joined #perl6
08:45 Ven joined #perl6
08:49 dakkar joined #perl6
08:55 g4 joined #perl6
08:58 bhm joined #perl6
09:01 rindolf joined #perl6
09:02 obfusk joined #perl6
09:02 jonas1 joined #perl6
09:08 perlpilot joined #perl6
09:15 Ven joined #perl6
09:15 agentzh joined #perl6
09:23 wamba joined #perl6
09:30 Ven joined #perl6
09:31 bjz joined #perl6
09:41 domidumont1 joined #perl6
09:45 Ven joined #perl6
10:00 Ven joined #perl6
10:04 bjz joined #perl6
10:13 astj joined #perl6
10:14 ocbtec joined #perl6
10:31 Ven joined #perl6
10:41 kalkin- joined #perl6
10:41 astj joined #perl6
10:41 astj joined #perl6
10:45 Gasher joined #perl6
10:45 agentzh joined #perl6
10:53 araraloren joined #perl6
10:54 gregf_ joined #perl6
10:55 Gasher joined #perl6
11:01 Ven joined #perl6
11:03 kalkin- hi #perl6
11:04 DrForr Afternoon.
11:11 sftp joined #perl6
11:11 araraloren Good evening~~
11:13 kalkin- m: use IO::Socket::SSL; IO::Socket::SSL.new(:host(<jabber.org>), :5222port);
11:13 camelia rakudo-moar c9a9bc: OUTPUT«===SORRY!===␤Could not find IO::Socket::SSL at line 1 in:␤    /home/camelia/.perl6␤    /home/camelia/rakudo-m-inst-2/share/perl6/site␤    /home/camelia/rakudo-m-inst-2/share/perl6/vendor␤    /home/camelia/rakudo-m-inst-2/share/perl6␤    CompUni…»
11:13 kalkin- couldn't camelia use some outside modules? Or am i calling the wrong bot?
11:14 darutoko joined #perl6
11:14 kalkin- I want to do this: perl6 -MIO::Socket::SSL -e "IO::Socket::SSL.new(:host(<jabber.org>), :5222port)"
11:14 raschipi joined #perl6
11:18 AlexDaniel star: use IO::Socket::SSL; IO::Socket::SSL.new(:host(<jabber.org>), :5222port);
11:18 camelia star-m 2016.10: OUTPUT«===SORRY!===␤Could not find IO::Socket::SSL at line 1 in:␤    /home/camelia/.perl6␤    /home/camelia/star-2016.10/share/perl6/site␤    /home/camelia/star-2016.10/share/perl6/vendor␤    /home/camelia/star-2016.10/share/perl6␤    CompUnit::Repository…»
11:19 kalkin- basically IO::Socket::SSL && OpenSSL module try to connect to servers via obsolete and insecure SSLv3. Which of course doesn't work with modern servers supporting only ≥ TLSv1 like XMPP servers
11:19 kalkin- I tried hardcoding in IO::Socket::SSL code the version via OpenSSL.new: :version(1.2), but still the same error
11:20 kalkin- this is the error: err code: 336130315
11:20 kalkin- error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number
11:20 Ven joined #perl6
11:21 parv joined #perl6
11:23 parv thanks to the ones responsible for adding & publicizing the irc log.
11:23 timotimo that's moritz
11:23 parv ok
11:24 parv thank you moritz (for the irc logs)
11:25 agentzh joined #perl6
11:25 raschipi parv: say it like this: moritz++
11:26 parv ok then.
11:26 raschipi One day we will get around summing up people's karma in the channel.
11:26 sammers m: dd [ $*VM.version, $*PERL.compiler.version ]
11:26 camelia rakudo-moar c9a9bc: OUTPUT«[v2016.12.113.gd.1.da.1.ba, v2016.12.389.gc.9.a.9.bc.8]␤»
11:26 user9 joined #perl6
11:28 ufobat joined #perl6
11:29 kalkin- .ask sergot can you please glance at io-socket-ssl/#17? any hints how I can fix this issue and submit a PR back would be great!
11:29 yoleaux kalkin-: I'll pass your message to sergot.
11:30 Ven joined #perl6
11:31 AlexDaniel that's not the only irc log of this channel though
11:31 AlexDaniel here's anothre one: http://colabti.org/irclogger/irclogger_log/perl6?date=2017-01-19
11:34 Geth joined #perl6
11:35 buggable joined #perl6
11:35 huggable joined #perl6
11:36 kalkin- Hmm I think the SSLv3 issue is coming from the OpenSSL module
11:36 NeuralAnomaly joined #perl6
11:36 NeuralAnomaly_ joined #perl6
11:38 kalkin- Even when there is a commit saying Don't use SSLv3 for tests, you may be want to test it with a server don't supporting SSLv3 as fall back. (https://github.com/sergot/openssl/commit/4a5a262812381dfaf5f921a7a56274c4899bc2e0)
11:38 kalkin- I don't want to panic, but this is a pretty heavy security issue
11:39 parv AlexDaniel, what do you mean (as colbati.org link is also listed in the topic)?
11:39 parv *colabti.org
11:40 AlexDaniel which topic?
11:40 parv AlexDaniel, this irc channel topic.
11:40 AlexDaniel parv: ah, yea
11:41 AlexDaniel though I'm not sure who is running it
11:41 AlexDaniel feb ?
11:41 * AlexDaniel has no idea who that is
11:42 parv later people; see you soon ...
11:43 moritz I can't remember either; they asked once if it was OK to use the CSS from "my" logger, which is why they look a bit similar
11:45 timotimo https://engineering.instagram.com/dismissing-python-garbage-collection-at-instagram-4dca40b29172  -  near the end they talk about how they had to patch python so that it doesn't clean up all gc-managed memory at process termination. moar is already doing it like that by default :)
11:48 jnthn I'm guessing Python probably can't be patched like that in general.
11:48 jnthn Since folks will have code relying on it
11:48 timotimo potentially, yeah
11:48 jnthn One of the reasons that we are so unwilling to promise anything along these lines in Moar
11:48 timotimo it's good that we don't guarantee DESTROY to be run at process termination
11:48 timotimo yep
11:48 jnthn Yes, I didn't want to tie our hands on GC algorithm choices for decades to come :)
11:53 brokenchicken kalkin-: what's the security issue?
11:56 lukaramu joined #perl6
11:57 xtreak joined #perl6
11:58 kalkin- brokenchicken: using SSLv3
11:59 kalkin- brokenchicken: If you do OpenSSL.new(:client) and try to connect to something it will use SSLv3 instead of the more modern ones. If you try to enforce the version if will fail with the above mentioned error
12:00 raschipi yuck.
12:00 Ven joined #perl6
12:01 kalkin- https://github.com/sergot/openssl/commit/4a5a262812381dfaf5f921a7a56274c4899bc2e0 ← this commit says Don't use SSLv3 for tests, but it still does, but now silently
12:01 raschipi joined #perl6
12:01 kalkin- If I havent started reworking Net::XMPP no one would have noticed for some time. (XMPP Servers enforce use of TLS)
12:02 kalkin- star: try use OpenSSL;
12:02 camelia star-m 2016.10: OUTPUT«===SORRY!===␤Could not find OpenSSL at line 1 in:␤    /home/camelia/.perl6␤    /home/camelia/star-2016.10/share/perl6/site␤    /home/camelia/star-2016.10/share/perl6/vendor␤    /home/camelia/star-2016.10/share/perl6␤    CompUnit::Repository::Absolu…»
12:02 brokenchicken I see by default it's using: $method = try {$client ?? OpenSSL::Method::TLSv1_2_client_method() !! OpenSSL::Method::TLSv1_2_server_method()} || try {$client ?? OpenSSL::Method::TLSv1_client_method() !! OpenSSL::Method::TLSv1_server_method()}  ;
12:03 kalkin- brokenchicken: try that: perl6 -MIO::Socket::SSL -e "IO::Socket::SSL.new(:host(<jabber.org>), :5222port)"
12:03 kalkin- IO::Socket::SSL uses in background OpenSSL.new(:client) which should use the mentioned default method, but the error says other wise
12:04 raschipi If that's the version it uses be default, it also won't work be default, since clients don't accept SSl anymore, it's all TLS.
12:04 bjz joined #perl6
12:05 kalkin- raschipi: ? as far as i understand the code by default it should use TLS?
12:06 mniip_ joined #perl6
12:07 kalkin- or am I misunderstanding something?
12:07 brokenchicken kalkin-: well, I copy-pasted the code it uses by default.
12:07 brokenchicken Maybe before you start claiming security issues you should double check the problem is where you think it is :)
12:08 kalkin- brokenchicken: yes and it should use TLS, right? there is no mentioning of SSLv3_client_method?
12:08 kalkin- brokenchicken: or am I blind?
12:09 * kalkin- is completely confused
12:10 brokenchicken I'm saying find out if it's actually using SSLv#
12:10 brokenchicken The error suggests to me it's jabber that's using it and the module craps out saying wrong version
12:11 kalkin- brokenchicken: ohh I did my homework https://xmpp.net/result.php?domain=jabber.org&amp;type=client#tls look at the table
12:11 kalkin- SSLv2 No, SSLv3 No
12:11 kalkin- :)
12:12 moritz kalkin-: ok, start from the beginning. What have you found that makes you think there's a security problem, and how would an attacker exploit it?
12:14 kalkin- moritz: SSLv3 is considered to be vulnerable and shouldn't be used. There're multiple different attacks on it i.e. POODLE. This is the reason the XMPP community started to migrate to TLS only connections
12:15 kalkin- an attacker can read your encrypted connection when using SSLv3(?)
12:16 mr_ron joined #perl6
12:16 kalkin- may be some one more knowledgeable than me can expand on it, but there are reasons that you should use ≥ TLSv1
12:18 kalkin- Also the applied crypto hardening guide recommends disabling SSLv3 https://bettercrypto.org/static/applied-crypto-hardening.pdf
12:18 Ven joined #perl6
12:18 moritz kalkin-: so have you observed an SSLv3 connection being issued by the OpenSSL module?
12:19 cognominal joined #perl6
12:20 kalkin- moritz: that's my interpretation of the error following this code perl6 -MIO::Socket::SSL -e "IO::Socket::SSL.new(:host(<jabber.org>), :5222port)"
12:20 kalkin- Hmm may be I was too tired yesterday evening and misunderstood the error? let me research it again
12:21 brokenchicken karlkin- your gomework url reports for hermes2.jabber.org but in your code yoy're connecting to just jabber.org... are they the same?
12:21 moritz kalkin-: if you got an error, it seems that no connection was opened, right?
12:21 mniip joined #perl6
12:21 timotimo ideally you'd follow the appropriate SRV record
12:22 timotimo which i'm not sure how you'd do currently in rakudo/moar
12:22 kalkin- timotimo: not at all, besides using Net::DNS
12:22 kalkin- brokenchicken: yes., try hermes2.jabber.org same issue
12:23 brokenchicken I'm not at a computer right now.
12:23 kalkin- Ohh I'm stupid
12:23 brokenchicken Try some other server?
12:24 kalkin- It's XMPP if you don't use legacy SSL/TLS only 5223 port, you need to signal that you want to use TLS on 5222 because of legacy reasons
12:24 raschipi brokenchicken: How do you use IRC without a computer? Do you have a telepathy bridge?
12:24 kalkin- of course it works if you try to connect to 5223
12:24 kalkin- *facepalm*
12:25 brokenchicken raschipi, or a phone?
12:25 kalkin- sorry for annoying you guys
12:25 raschipi brokenchicken: That's a computer.
12:25 moritz phones these days really are computers.
12:25 brokenchicken kalkin-, it's fine. Glad there aren't any issues.
12:26 lizmat m: say "\c[man facepalming]"   # :-)
12:26 camelia rakudo-moar c9a9bc: OUTPUT«🤦‍♂️␤»
12:26 moritz m: say "\c[woman facepalming]"
12:26 camelia rakudo-moar c9a9bc: OUTPUT«🤦‍♀️␤»
12:26 moritz just to be on the safe side :-)
12:26 kalkin- hmm, linux libertine doesn't support it. I see a square + gender symbol :)
12:26 lizmat moritz++  :-)
12:26 moritz m: say "\c[genderless person facepalming]"
12:26 camelia rakudo-moar c9a9bc: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Unrecognized character name genderless person facepalming␤at <tmp>:1␤------> 3say "\c[genderless person facepalming7⏏5]"␤»
12:27 kalkin- moritz: who are to assume my gender is binary! :D
12:27 moritz a stastically well-versed person, of course :-)
12:27 ilmari m: say "\c[face palm]"
12:27 camelia rakudo-moar c9a9bc: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Unrecognized character name face palm␤at <tmp>:1␤------> 3say "\c[face palm7⏏5]"␤»
12:28 ilmari huh, that is the unicode character name
12:28 ilmari m: say "\c[FACE PALM]"
12:28 camelia rakudo-moar c9a9bc: OUTPUT«🤦␤»
12:28 ilmari ah
12:28 ilmari case matters
12:28 moritz ilmari: you need to SCREAM to be heard :-)
12:28 brokenchicken weird that it does there
12:28 kalkin- hmm github facepalm man and women both look the same. but i guess there're man with long hair to.
12:29 brokenchicken m: "\c[MAN FACEPALMING]"
12:29 camelia rakudo-moar c9a9bc: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Unrecognized character name MAN FACEPALMING␤at <tmp>:1␤------> 3"\c[MAN FACEPALMING7⏏5]"␤»
12:30 brokenchicken so zws are lowercase but normal stuff is uppercase?
12:30 moritz that's weird
12:30 moritz should be both case insensitive, if you ask me
12:30 moritz or both uppercase
12:30 brokenchicken +1
12:30 moritz samcv: ^^
12:32 ilmari unicode probably has an opinion on that
12:33 cognominal joined #perl6
12:33 kalkin- .tell sergot never mind my previous message. my bad
12:33 yoleaux kalkin-: I'll pass your message to sergot.
12:34 Ven joined #perl6
12:39 ChoHag joined #perl6
12:41 rurban joined #perl6
12:48 cognominal joined #perl6
12:52 Ven joined #perl6
12:53 agentzh joined #perl6
12:58 jnthn moritz: I believe that codepoint names being uppercase and sequence names being lowercase is part of the mechanism for avoiding conflicts between the two :)
12:59 jnthn Also, iirc, the Unicode data files have them that way (uppercsae for codepoint names, lowercase for sequence names)
13:03 bjz_ joined #perl6
13:11 Ven joined #perl6
13:13 azawawi joined #perl6
13:13 azawawi hi #perl6
13:14 cognominal joined #perl6
13:14 sammers joined #perl6
13:15 moritz \o azawawi
13:15 geekosaur joined #perl6
13:21 lmmx joined #perl6
13:28 lizmat azawawi o/
13:28 user9 joined #perl6
13:29 azawawi :)
13:29 araraloren :)
13:30 * azawawi starts working on GTK::Simple
13:30 raschipi azawawi: What else is there in the GTK:: namespace?
13:31 Ven joined #perl6
13:31 raschipi Oh, there's GTK::Simpler
13:32 tadzik :o
13:32 araraloren Is GTK::Simpler replaced GTK::Simple ?
13:32 jnthn Doubt it
13:33 jnthn iirc it's built upon it
13:33 timotimo i haven't heard of GTK::Simpler yet
13:33 tadzik I like the idea
13:33 tadzik from the synopsis example
13:33 jnthn GTK::Simple maybe shoulda just been called GTK:: :)
13:33 * brokenchicken starts working on GTK::Simplest
13:33 tadzik GTK::ColonColon
13:33 jnthn oops
13:33 azawawi GTK::Simplest next :)
13:33 raschipi I think it's because it doesn't expose full functionality.
13:33 araraloren Oh, It said `This module provides a simpler API for GTK::Simple`
13:33 jnthn GTK :)
13:34 tadzik GTK::Harder, GTK::Better, GTK::Faster, GTK::Stronger
13:34 brokenchicken .oO( GTK::Scooter )
13:34 raschipi GTK::Stronk
13:34 araraloren GTK::Best
13:34 timotimo so GTK:: is kind of like GTK--
13:35 jnthn The history was approximately: jnthn takes long train trip to give a talk, wants to show off how supplies are great for dealing with UI events, writes a tiny bit of GTK support, and picks GTK::Simple as a name.
13:35 azawawi timotimo: a quick question, why did we need to do this https://github.com/perl6/gtk-simple/commit/8db5f12232432fec38fd0714efeeb09528904976?
13:36 timotimo azawawi: panda throws a hissy fit when the files that are referenced in resources in the meta6 file aren't there
13:36 jnthn I then handed it off for others to care for, because building/maintaining a UI binding library is the last thing I had time for, but the name GTK::Simple lived on :-)
13:36 azawawi There is also GTK::Scintilla https://github.com/azawawi/perl6-gtk-scintilla :)
13:36 jnthn By now it covers a lot of GTK, iirc :)
13:36 azawawi timotimo: we're deprecating panda right?
13:36 tadzik there are 16 modules with ::Simple in the ecosystem
13:37 raschipi GTK::baroque GTK::byzantine GTK::convoluted GTK::daedal GTK::elaborate GTK::intricate GTK::involute GTK::involved GTK::knotty GTK::labyrinthian GTK::sophisticated GTK::tangled
13:38 araraloren They are GTK family
13:38 jnthn Next time I'll call my same code GTK::ForHell'sSakeChangeThis :)
13:38 jnthn *sample
13:38 jnthn Anyway, (everyone who carried it forward)++ :)
13:38 brokenchicken azawawi: from Rakudo Star yes. But as a piece of software... it's just a third-party distro like any other
13:39 timotimo GTK::SoonToBeDeprecated
13:39 brokenchicken buggable: eco ::Simple
13:39 buggable brokenchicken, Found 5 results: HTTP::Server::Simple, IO::Capture::Simple, LWP::Simple, Grammar::Profiler::Simple, Email::Simple. See http://modules.perl6.org/#q=%3A%3ASimple
13:39 brokenchicken .oO( bug... )
13:39 azawawi brokenchicken: thx
13:39 tadzik jnthn: GTK::Sample is not bad either :)
13:39 jnthn Ecosystem::Query::Bots::Are::Simple :)
13:39 jnthn tadzik: Hah, didn't think of that :)
13:39 azawawi timotimo: writing a comment there :)
13:41 buggable joined #perl6
13:41 brokenchicken buggable: eco ::Simple
13:41 buggable brokenchicken, Found 16 results: HTTP::Server::Simple, IO::Capture::Simple, LWP::Simple, Grammar::Profiler::Simple, Email::Simple. See http://modules.perl6.org/#q=%3A%3ASimple
13:41 raschipi Yay!
13:42 agentzh joined #perl6
13:43 raschipi buggable: eco dialog
13:43 buggable raschipi, Inform 'Easy to use GUI Dialog box using GTK3 label, button, entry widgets': https://github.com/finanalyst/p6-inform
13:46 raschipi A dialog-like module should be included in *.
13:48 iH2O joined #perl6
13:49 brokenchicken Yes! Finally! Improve git blame on gitHub!
13:49 holli_ joined #perl6
13:50 brokenchicken https://github.com/blog/2304-navigate-file-history-faster-with-improved-blame-view
13:51 Ven joined #perl6
13:52 brokenchicken heh, though using that feature leaves github in wide-view mode even if you switch to other pages :}
14:12 Ven joined #perl6
14:12 azawawi re https://github.com/perl6/gtk-simple/pull/74 . Please review.
14:14 brokenchicken Geth: help
14:14 Geth brokenchicken, Source at https://github.com/perl6/geth To add repo, add an 'application/json' webhook on GitHub pointing it to http://geth.perl6.party/?chan=#perl6 and choose 'Send me everything' for events to send | use `ver URL to commit` to fetch version bump changes
14:16 brokenchicken azawawi: I would recommend using AUTHOR_TESTING var
14:16 agentzh joined #perl6
14:16 brokenchicken azawawi: it's the one used by Test::When, which in turn follows Lancaster Consensus followed by Perl 5
14:17 brokenchicken https://github.com/zoffixznet/perl6-Test-When#author
14:17 brokenchicken https://github.com/Perl-Toolchain-Gang/toolchain-site/blob/master/lancaster-consensus.md#environment-variables-for-testing-contexts
14:19 * azawawi reads
14:19 azawawi brokenchicken: i used to use "AUTHOR_TESTING" until Test::META suggested otherwise
14:19 iH2O left #perl6
14:19 brokenchicken :S
14:20 brokenchicken I'll open an issue on it
14:20 azawawi brokenchicken++
14:24 azawawi brokenchicken: Guideliness vs rules (Pirates of the Caribbean) http://www.imdb.com/title/tt0325980/quotes?item=qt0416731 :)
14:26 timotimo heh heh.
14:26 timotimo parlay!
14:26 azawawi lol
14:27 azawawi travis ci:  Investigating - We’re currently investigating an issue affecting `sudo: required` builds for both public and private repositories ... Oh well
14:27 cdg joined #perl6
14:27 cdg joined #perl6
14:28 brokenchicken They have code on Pirates of Caribbean?
14:28 brokenchicken Wonder if it's perl....
14:28 * azawawi Packing & going home. Have a nice weekend everyone :)
14:28 timotimo they run the Black Perl distribution
14:28 azawawi Black Perl :)
14:28 DrForr timotimo++ # beat me to it.
14:28 azawawi you know it is a good name for rakudo star (for marketing that is) :)
14:30 timotimo we can call it that when it's really, really, really god damn fast
14:30 brokenchicken guessing black perl is the ship?
14:30 DrForr No, it's Perl Poetry.
14:31 Ven joined #perl6
14:32 timotimo Perl Pottery?
14:33 finanalyst joined #perl6
14:33 AlexDaniel joined #perl6
14:33 AlexDaniel “should be both case insensitive, if you ask me”
14:33 AlexDaniel if I recall correctly, samcv is aware of that
14:33 finanalyst @search senlin ascends
14:34 brokenchicken finanalyst: this is a warez-free network
14:35 skids joined #perl6
14:36 finanalyst brokenchicken: I know. sigh! this happens because of lags. i thought i had solved it. hand head in shame
14:37 brokenchicken that book is like $5, bruh
14:37 finanalyst just found it on smashwords. thinking about it.
14:37 finanalyst not the price, the review
14:37 finanalyst actually, 2.99
14:39 kyan joined #perl6
14:43 AlexDaniel hmm, looking at http://stackoverflow.com/questions/41689023
14:44 AlexDaniel why don't we provide some sort of unicode brackets for substr
14:44 AlexDaniel $foo「5..8」 hmm
14:45 * brokenchicken hopes this won't segue into "let's add some weird brackets into core for string indexing" :P
14:46 AlexDaniel .oO( why not? )
14:46 brokenchicken Stop adding stuff!
14:46 lizmat joined #perl6
14:46 brokenchicken :)
14:46 AlexDaniel why
14:46 brokenchicken Make a module
14:46 AlexDaniel meh
14:47 AlexDaniel same thing could've been said about most of the features
14:48 brokenchicken Yup.
14:48 AlexDaniel but really, typing out .substr(…, 1) is really annoying when all you need is just one char
14:49 araraloren You can made one for yourself ~~
14:49 jnthn If you're doing it that often in a given bit of code, just define a sub/operator for it
14:49 brokenchicken Like defaults based on :U the decision was for that to be a module first before it being included in core.
14:49 brokenchicken So it could be tried out in the wild before being commited to whatever impl was cooked up first.
14:50 arnsholt jnthn: Semi-random question: Can we specify a special-cased implementation for a particular signature of a metaop?
14:50 araraloren Make a module is a good idea. Perl6 already has a lot of feature, so many feature ..
14:50 brokenchicken Or the superscript powers. That too was a module first, before we added it to core.
14:50 arnsholt Like special-casing [+] when applied to a List[Num]?
14:51 brokenchicken [+] is already special cased to .sum
14:51 AlexDaniel brokenchicken: hmm what was the module, by the way?
14:51 brokenchicken AlexDaniel: for powers?
14:51 AlexDaniel yes
14:51 Ven joined #perl6
14:52 brokenchicken AlexDaniel: Operators::Math::Superscripts
14:52 jnthn arnsholt: Umm...don't think we can at the moment.
14:52 brokenchicken AlexDaniel: https://github.com/zoffixznet/perl6-Operators-Math-Superscripts
14:52 bwisti joined #perl6
14:53 jnthn arnsholt: Though lizmat++ just refactored that bunch so probably knows best by this point :)
14:53 AlexDaniel brokenchicken: and how many people used this module?
14:53 jnthn arnsholt: The answer before the refactor woulda been "only if you're lucky and the accientally-exposed META_FOO function was a multi"...
14:53 brokenchicken AlexDaniel: I don't have any statistics
14:53 AlexDaniel personally I don't buy it in this case. I'd much rather not introduce a dependency in my code just for more convenient char indexing.
14:54 AlexDaniel so creating a module for something that basic is… meh
14:54 AlexDaniel but whatever
14:54 brokenchicken AlexDaniel: but you rather make extra maintenance for core devs and buy Perl6 into supporting a possibly poorly-designed feature essentially forever?
14:54 jnthn m: sub c($s, $i) { $s.substr($i, 1) }; say c("foo", 1)
14:54 camelia rakudo-moar 7ef368: OUTPUT«o␤»
14:54 jnthn AlexDaniel: Don't take a dependency on it, just write the one line sub in your code
14:55 AlexDaniel yeah, and make anybody reading this code wonder wtf c is
14:55 brokenchicken AlexDaniel: what I'm not buying is "extra dependency" nonsense.
14:55 brokenchicken We support modules exactly for this reason.
14:55 jnthn AlexDaniel: Umm...that degenerates to "never define a subroutine, people won't know what the name is" :P
14:56 AlexDaniel jnthn: nope, it's just not worth it in this case
14:56 brokenchicken heh
14:56 jnthn Then it's not worth making it shorter than .sbustr($i, 1) either :P
14:56 brokenchicken Meaning .substr() isn't a pain to type after all
14:56 AlexDaniel we don't want to introduce another feature – fine, whatever. But don't say that a module will help, it won't
14:57 brokenchicken AlexDaniel: sure it will. It can provide a trial implementation to find any flaws with it without any commitments for support. And if enough people think the module's a good idea it's a good argument for inclusion into core.
14:59 brokenchicken For example, you showed 「5..8」 but we use 「...」 for "no interpretation there whatever" quoters... so now it's confusing for beginners to have same quoters used for ranges
14:59 brokenchicken etc
14:59 lizmat joined #perl6
15:01 brokenchicken m: sub postcircumfix:<♥ ♥> (Str $x, Range $y) { $x.substr($y) }; say "meows"♥3..5♥
15:01 camelia rakudo-moar 7ef368: OUTPUT«ws␤»
15:02 agentzh joined #perl6
15:04 brokenchicken m: my $mp = "\c[man facepalming]"; my $wp = "\c[woman facepalming]"; (「sub postcircumfix:<」 ~ $mp ~ ' ' ~ $wp ~ 「> (Str $x, Range $y) { $x.substr($y) }; say "meows"」 ~ $mp ~ '3..5' ~ $wp).EVAL
15:04 camelia rakudo-moar 7ef368: OUTPUT«ws␤»
15:04 brokenchicken haha
15:04 brokenchicken m: my $mp = "\c[man facepalming]"; my $wp = "\c[woman facepalming]"; (「sub postcircumfix:<」 ~ $mp ~ ' ' ~ $wp ~ 「> (Str $x, Range $y) { $x.substr($y) }; say "meows"」 ~ $mp ~ '3..5' ~ $wp).say
15:04 camelia rakudo-moar 7ef368: OUTPUT«sub postcircumfix:<🤦‍♂️ 🤦‍♀️> (Str $x, Range $y) { $x.substr($y) }; say "meows"🤦‍♂️3..5🤦‍♀️␤»
15:05 brokenchicken m: sub postcircumfix:<🤦‍♂️ 🤦‍♀️> (Str $x, Range $y) { $x.substr($y) }; say "meows"🤦‍♂️3..5🤦‍♀️
15:05 camelia rakudo-moar 7ef368: OUTPUT«ws␤»
15:05 brokenchicken Doesn't render right of any of my devices, but it works! :)
15:06 arnsholt jnthn: Cool! So no need to suggest we do Kahan summation for nums, unless I want to be volunteered into getting that to work first O:)
15:09 Ven joined #perl6
15:11 Geth gtk-simple/master: 4 commits pushed by jonathanstowe++
15:11 Geth gtk-simple/master: 40533aee11 | Ignore resources for now…
15:11 Geth gtk-simple/master: e605849e82 | Add comment for panda resources workaround for non-windows platforms. timotimo++, dd author Test::META tests. Make META6.json more readable and bump to 0.1.5. Use zef instead of panda. Use 2016.11 (rakudo*) for testing…
15:11 Geth gtk-simple/master: fb1001c633 | Fix appveyor ci…
15:11 Geth gtk-simple/master: 547f237611 | Merge pull request #74 from azawawi/master…
15:11 Geth gtk-simple/master: review: https://github.com/perl6/gtk-simple/compare/eec866cefb...547f237611
15:12 brokenchicken m: constant &term:("\c[BLACK HEART SUIT]") = &die; ♥
15:12 camelia rakudo-moar 7ef368: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Missing initializer on constant declaration␤at <tmp>:1␤------> 3constant &term7⏏5:("\c[BLACK HEART SUIT]") = &die; ♥␤»
15:12 brokenchicken Is there a way to use the char name like that in term definition?
15:12 brokenchicken instead of the actual one
15:13 brokenchicken m: sub term:«\c[BLACK HEART SUIT]» { die }; ♥
15:13 camelia rakudo-moar 7ef368: OUTPUT«Died␤  in sub term:<♥> at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
15:13 brokenchicken Oh, seems to be something to do with constants
15:13 brokenchicken m: constant &term:«\c[BLACK HEART SUIT]» = &die ; ♥
15:13 camelia rakudo-moar 7ef368: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Bogus statement␤at <tmp>:1␤------> 3nt &term:«\c[BLACK HEART SUIT]» = &die ;7⏏5 ♥␤    expecting any of:␤        prefix␤        term␤»
15:17 Geth gtk-simple: aaf2b11c5c | (Zoffix Znet)++ | 4 files
15:17 Geth gtk-simple: s:g/TEST_AUTHOR/AUTHOR_TESTING/
15:17 Geth gtk-simple: review: https://github.com/perl6/gtk-simple/commit/aaf2b11c5c
15:18 lmmx joined #perl6
15:19 hchienjo joined #perl6
15:21 brokenchicken m: sub term:«\c[man facepalming]» { die |@_ }; "\c[man facepalming] 'w00t awesome!'".EVAL
15:21 camelia rakudo-moar 7ef368: OUTPUT«5===SORRY!5=== Error while compiling /home/camelia/EVAL_0␤Two terms in a row␤at /home/camelia/EVAL_0:1␤------> 3🤦‍♂️7⏏5 'w00t awesome!'␤    expecting any of:␤        infix␤        infix stopper␤        statement end␤     …»
15:22 brokenchicken hm how come?
15:22 brokenchicken ah
15:22 brokenchicken m: sub prefix:«\c[man facepalming]» { die |@_ }; "\c[man facepalming] 'w00t awesome!'".EVAL
15:22 camelia rakudo-moar 7ef368: OUTPUT«w00t awesome!␤  in sub prefix:<🤦‍♂️> at <tmp> line 1␤  in block <unit> at EVAL_0 line 1␤  in block <unit> at <tmp> line 1␤␤»
15:22 brokenchicken \o/
15:28 brokenchicken .oO( make a language entirely out of ZWS Emoji... )
15:28 agentzh joined #perl6
15:30 Ven joined #perl6
15:31 brokenchicken heh, it's weird they got all kinds of these sports emojis, but none for "playing videogames" or "reading a book" or anything that doesn't involve sweat and balls....
15:32 khw joined #perl6
15:32 brokenchicken m: " 👯‍♀️".uninames.say
15:32 camelia rakudo-moar ed482e: OUTPUT«(SPACE WOMAN WITH BUNNY EARS ZERO WIDTH JOINER FEMALE SIGN VARIATION SELECTOR-16)␤»
15:33 brokenchicken don't even know what that one is heh
15:34 brokenchicken "women with bunny ears partying"... ... Who makes these :}
15:34 brokenchicken m: "\c[men with bunny ears partying]"
15:34 camelia rakudo-moar ed482e: OUTPUT«WARNINGS for <tmp>:␤Useless use of constant string "👯‍♂️" in sink context (line 1)␤»
15:34 brokenchicken m: say "\c[men with bunny ears partying]"
15:34 camelia rakudo-moar ed482e: OUTPUT«👯‍♂️␤»
15:44 lmmx joined #perl6
15:47 araraloren AlexDaniel, a sample for slice `$f[2 : 4]`  https://gist.github.com/araraloren/19bc439c6fba86f7ca3b86418766204e
15:48 AlexDaniel :S
15:49 AlexDaniel using other brackets is probably a good idea
15:50 brokenchicken m: say join (1, 2, 3):
15:50 camelia rakudo-moar ed482e: OUTPUT«␤»
15:50 perlpilot PDL uses $piddle(2:4)  and I'm not so sure "other brackets" is actually better there.
15:54 araraloren Here square bracket is suitable .
15:55 agentzh joined #perl6
16:01 Ven joined #perl6
16:05 kyan joined #perl6
16:06 AlexDaniel not at all
16:07 AlexDaniel otherwise you'd argue that string concatenation with + should work. Not in perl 6, no, and that's great
16:07 raschipi AlexDaniel: C uses [] to do it.
16:07 AlexDaniel :|
16:07 kyan joined #perl6
16:07 perlpilot raschipi: saying "C does it" is not really an argument for anything.  :)
16:08 raschipi It will be [$:$], not [$,$]
16:08 raschipi I'm just mindstorming.
16:08 AlexDaniel just pick any other brackets you like
16:08 brokenchicken We should totally add + for concatenation :P
16:08 AlexDaniel as simple as that
16:09 perlpilot why not $string.slice($range)?  Why do we need array-ish brackets?
16:09 brokenchicken perlpilot: we already have .substr($range) :(
16:09 AlexDaniel substr already works like this, no?
16:09 moritz because having a method for it isn't enough line noise
16:09 perlpilot oh ... then same question but with substr instead of slice
16:09 perlpilot (though moritz already answer :)
16:10 brokenchicken it should really be :)   4:$str:7
16:10 brokenchicken ssh does it!
16:11 user9 joined #perl6
16:13 brokenchicken m: sub infix:<:> (Int $s, Str $v, Int $e) is assoc("list") { $s.substr: $s..$e }; say 2:"foobar":5
16:13 camelia rakudo-moar ed482e: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Confused␤at <tmp>:1␤------> 3oc("list") { $s.substr: $s..$e }; say 2:7⏏5"foobar":5␤    expecting any of:␤        colon pair␤»
16:13 brokenchicken m: sub infix:<:> (Int $s, Str $v, Int $e) is assoc("list") { $s.substr: $s..$e }; say 2:"foobar":5
16:13 camelia rakudo-moar ed482e: OUTPUT«Start argument to substr out of range. Is: 2, should be in 0..1; use *-2 if you want to index relative to the end␤  in sub infix:<:> at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤Actually thrown at:␤  in block <unit> at <tmp> line 1␤␤»
16:13 brokenchicken wat
16:13 brokenchicken m: sub infix:<:> (Int $s, Str $v, Int $e) is assoc("list") { $v.substr: $s..$e }; say 2:"foobar":5
16:13 camelia rakudo-moar ed482e: OUTPUT«obar␤»
16:14 brokenchicken SHIP IT! :)
16:14 alimon joined #perl6
16:15 brokenchicken m: sub infix:<🔪> (Int $s, Str $v, Int $e) is assoc("list") { $v.substr: $s..$e }; say 2🔪"foobar"🔪5
16:15 camelia rakudo-moar ed482e: OUTPUT«obar␤»
16:15 brokenchicken hehe
16:16 raschipi u: 🔪
16:16 unicodable6 raschipi, U+1F52A HOCHO [So] (🔪)
16:19 brokenchicken better yet:
16:19 brokenchicken m: sub infix:<↦> {$^b.substr: $^a}; sub infix:<↤> {$^a.substr: 0, $^a.chars-$^b}; say 3↦"foobar"; say "foobar"↤4 ~ "x"; say 3↦"foobar"↤1
16:19 camelia rakudo-moar ed482e: OUTPUT«bar␤fox␤ba␤»
16:20 cale2 joined #perl6
16:20 brokenchicken \o/
16:20 cale2 is there a perl6 playground? Like a console in the browser?
16:21 raschipi cale2: "/msg camelia"
16:21 agentzh joined #perl6
16:21 Ven joined #perl6
16:21 perlpilot There's also tryperl6.org, but I don't know if that's been kept up to date.
16:25 brokenchicken also glot.io
16:25 brokenchicken tryperl6 gives "Process not found"
16:25 raschipi It seems tryperl6.org is already under too much load.
16:26 brokenchicken oh booted now...
16:26 brokenchicken runs v2016.05.103.g.7.fabb.57
16:26 agentzh joined #perl6
16:28 cale2 tryperl6 works. It's just a bit slow
16:29 brokenchicken /msg camelia is best
16:29 raschipi camelia: You're the best.
16:30 cale2 I'm thinking that I could almost emulate Elixir entirely using perl6 pipes
16:31 cale2 ===> that type of thing
16:31 cale2 "feed operator"
16:31 brokenchicken cool
16:31 Ven joined #perl6
16:31 perlpilot cale2: I think you're a tad optimistic  :)
16:32 perlpilot (only because I think feeds haven't gotten all the love they might need)
16:32 brokenchicken and they're not yet autothreade AFAIK
16:34 * jnthn woulda thought supply blocks were a more natural way to do actors in Perl 6
16:42 cale2 dang
16:42 cale2 I mean, I guess method chaining is similar
16:43 cale2 but when writing methods that are chainable, you always have to return self, right?
16:43 hchienjo joined #perl6
16:43 perlpilot yep
16:43 cale2 Are feed operators low key methods?
16:43 perlpilot (well ... or some object that will respond to the next method in the chain)
16:49 st_elmo joined #perl6
16:50 Ven joined #perl6
16:53 CQ joined #perl6
16:59 cale2 Yeah, actually, the feed operator becomes a bit complex with OOP
17:04 wamba joined #perl6
17:04 tester3 joined #perl6
17:10 Ven joined #perl6
17:12 jdv79 wasn't someone working on a p6 version of plack?
17:12 jdv79 i don't see it in the eco
17:13 brokenchicken nope
17:14 brokenchicken You're prolly thinking of https://github.com/supernovus/perl6-psgi
17:14 brokenchicken hmmm
17:14 jnthn Wasn't Crust in this space too?
17:14 perlpilot There's also https://github.com/lopnor/p6-plackdo
17:15 brokenchicken Ah, this one https://github.com/zostay/P6W
17:15 hartenfels joined #perl6
17:15 brokenchicken Maybe I'm misremembering.
17:15 girafe joined #perl6
17:19 jdv79 oh my there are many.  just hope i don't pick a loser when the shakeout happens
17:19 perlpilot jdv79: Crust would be a good choice IMHO
17:20 jdv79 i guess i'm remembering the P6W one since he was talking about remaking psgi/plack to leverage p6's strengths
17:20 jdv79 yeah, ok
17:23 raschipi .ask TimToady Why did you call patch, patch?
17:23 yoleaux raschipi: I'll pass your message to TimToady.
17:23 raschipi https://www.reddit.com/r/pcmasterrace/comments/5owmg6/why_its_called_a_patch/
17:24 raschipi .tell TimToady https://www.reddit.com/r/pcmasterrace/comments/5owmg6/why_its_called_a_patch/
17:24 yoleaux raschipi: I'll pass your message to TimToady.
17:24 agentzh joined #perl6
17:29 lizmat joined #perl6
17:30 Ven joined #perl6
17:37 gfldex cale2: https://glot.io/new/perl6
17:41 TimToady I called it patch because that was already the common term for it in computing, even if patches were generally applied by hand before that.
17:41 yoleaux 17:23Z <raschipi> TimToady: Why did you call patch, patch?
17:41 yoleaux 17:24Z <raschipi> TimToady: https://www.reddit.com/r/pcmasterrace/comments/5owmg6/why_its_called_a_patch/
17:43 raschipi Do you know how much older diff is than patch?
17:44 brokenchicken Some of the accepted answers on Perl 6 SO questions really scare me :| http://stackoverflow.com/questions/41648119/how-can-i-completely-flatten-a-perl-6-list-of-lists-of-lists
17:45 brokenchicken and it was smls that wrote it :S
17:48 lostinfog joined #perl6
17:48 raschipi brokenchicken: how weould you do it?
17:48 raschipi would*
17:50 Ven joined #perl6
17:50 TimToady raschipi: no, I only know when patch was written :)
17:50 raschipi Thanks.
17:52 ilmari diff was written in the early 1970s, according to wikipedia
17:52 ilmari «first shipped with the 5th Edition of Unix in 1974»
17:52 ilmari so people were applying patches manually for over ten years?!
17:53 raschipi ilmari: See the link above: they were applyint them even more manually before that.
17:53 ilmari ah, diff could output ed scripts too
17:53 ilmari raschipi: yeah, i saw that
17:54 kyan joined #perl6
17:55 raschipi I would say applying a patch manually was done way before there were any computers, even: https://en.wikipedia.org/wiki/Jacquard_loom
17:55 TimToady it's an ancient word, and well suited for metaphorical borrowing into tech
17:58 mr_ron joined #perl6
18:00 TimToady The word "patch" implies that everything around it was okay, which, when you think about it, reflects the basic optimism that every programmer must feel. :)
18:00 cale2 How does the list.flatten built in not already completely flatten a list?
18:01 TimToady doesn't descend into Scalar objects, which means it doesn't flatten Array
18:01 TimToady afk &
18:02 labster joined #perl6
18:03 raschipi TimToady: as someone who uses patched clothes, it doesn't imply that, no.
18:06 agentzh joined #perl6
18:09 cale2 So you can write your own version of flatten with multi dispatch
18:10 Ven joined #perl6
18:14 brokenchicken raschipi: as an entirely generic answer, I'd go with "I wouldn't". If you got structure, there's a reason for it; and if there's no reason, why is it structured? But the scary part about those answers is all the various sideeffects those solutions have, yet the answerers provide them as equals. the map+slip solution doesn't flatten hashes at all, the $<> thing flattens them into pairs, gather+deepmap+take
18:14 brokenchicken loses the keys entirely and takes only the values, and gather @a».take does same, but will also lose order when we make » actually autothreaded.
18:14 brokenchicken Yet the answers all present them as equal solution. And bdfoy who's currently writing a Perl 6 book is even praising the deepmap solution as universal
18:15 raschipi Well, it's their data, let them throw it away.
18:15 Actualeyes joined #perl6
18:16 brokenchicken What?
18:16 raschipi If I need to perform that transformation, I would use the solution he recommends.
18:16 brokenchicken ... and have a bug in your code...
18:17 raschipi Why is it a bug?
18:18 brokenchicken Why is it not a bug?
18:18 brokenchicken I just told you the solutions each have different side effects that answers don't bother mentioning and you tell me why is it a bug.
18:19 brokenchicken starting with (<a b c>, {x => "y", "z" => 42}) and ending up with (42, "y", "c", "a", "b") looks like a bug to me
18:23 cale2 brokenchicken: for flattening lists, I'm trying to do something like the commented out code here: https://glot.io/snippets/emc2qo9cqx
18:25 cale2 Not sure what kind of guards you can use in perl6 functions though
18:26 brokenchicken cale2: if you mean Lists lists, just use flat
18:26 brokenchicken m: say flat ((4,5,6),("f","z",(1, 3),"n"))
18:26 camelia rakudo-moar ed482e: OUTPUT«(4 5 6 f z 1 3 n)␤»
18:29 brokenchicken m: say flat ((4,5,6), $["f","z",[1, {x => "y"}, (1...*), 3],"n"])».List
18:29 camelia rakudo-moar ed482e: OUTPUT«(4 5 6 f z 1 {x => y} (...) 3 n)␤»
18:29 cale2 brokenchicken: So it doesn't do a deep flatten. I thought the point of Stack Overflow question was that it didn't
18:30 FROGGS joined #perl6
18:30 cale2 * does
18:30 Ven joined #perl6
18:30 brokenchicken cale2: it does. It just doesn't descend into itemized iterables (or whatever the right term is)
18:31 brokenchicken m: say flat ((4,5,6), $["f","z",[1, {x => "y"}, (1...*), 3],"n"])».list
18:31 camelia rakudo-moar ed482e: OUTPUT«(4 5 6 f z [1 {x => y} (...) 3] n)␤»
18:31 brokenchicken m: say gather ((4,5,6), $["f","z",[1, {x => "y"}, (1...*), 3],"n"]).deepmap: *.take
18:31 camelia rakudo-moar ed482e: OUTPUT«(4 5 6 f z 1 y 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 8…»
18:32 brokenchicken ^ another problemw ith .deepmap take
18:34 brokenchicken m: say ((4,5,6), $["f","z",[1, {x => "y"}, (1...*), 3],"n"]).flatmap: *.List
18:34 camelia rakudo-moar ed482e: OUTPUT«(4 5 6 f z 1 {x => y} (...) 3 n)␤»
18:36 brokenchicken wrong to: flattens bags into pairs
18:36 brokenchicken There ain't a good generic solution. So best way is to not have the problem :)
18:37 brokenchicken m: (1...*).perl
18:37 camelia rakudo-moar ed482e: OUTPUT«Cannot .elems a lazy list␤  in block <unit> at <tmp> line 1␤␤Actually thrown at:␤  in block <unit> at <tmp> line 1␤␤»
18:37 brokenchicken hm...
18:39 raschipi brokenchicken: people will program their programs in the way they want, you can't control it.
18:39 raschipi stop complaining about baby perl6.
18:40 raschipi If people have to use "correct solutions", it isn't perl.
18:41 brokenchicken raschipi: it's interesting that your suggestions seem to involve letting evil propagate: sexists remarks -> let the guy clear his head; people giving wrong answers on a popular QA site -> it's their data, let them throw away.
18:41 cale2 raschipi: the result of having "incorrect solutions" on stack overflow is that "babies" will get discouraged and confused, and stop using perl6
18:42 raschipi I don't let evil propagate, like I'm doing right now. I'm discussing with you, ain't I?
18:42 brokenchicken You told me to stop complaining
18:43 raschipi No, I'm told you it's againt the spirit od the language to complain.
18:43 * brokenchicken rolls eyes
18:43 brokenchicken m: "
18:43 camelia rakudo-moar ed482e: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Unable to parse expression in double quotes; couldn't find final '"' ␤at <tmp>:1␤------> 3"7⏏5<EOL>␤    expecting any of:␤        double quotes␤        term␤»
18:43 brokenchicken m: "\c[man rolling eyes]"
18:43 camelia rakudo-moar ed482e: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Unrecognized character name man rolling eyes␤at <tmp>:1␤------> 3"\c[man rolling eyes7⏏5]"␤»
18:44 raschipi I was told by TimToady in his book this is how things are, therefore you're also breaking rule 1.
18:44 * brokenchicken doesn't mind
18:45 cale2 I like the idea perl having baby speak and also eloquent poetry
18:45 cale2 but a baby doesn't often understand poetry
18:45 perlpilot cale2: I like the reality of it more than the idea ;)
18:46 cale2 and a an adult poet doesn't like baby speak
18:46 cale2 So keep that in mind when answering stack overflow i guess
18:47 labster joined #perl6
18:47 diakopter Perl 6 has been on modulecounts.com for more than a year; it's grown from 460 to 771 modules
18:47 wamba joined #perl6
18:48 brokenchicken ...which is still the bottom of the barrel as far as that site's concerned :P
18:49 diakopter during the same timeframe, node/js grew from 220,000 modules to 380,000
18:49 brokenchicken m: say 771/460; say 380000/220000
18:49 camelia rakudo-moar ed482e: OUTPUT«1.676087␤1.727273␤»
18:49 brokenchicken that's cause they make a new release for each version or something innit?
18:49 brokenchicken + massive wheel reinvention
18:49 Ven joined #perl6
18:50 diakopter no, that's not counting versions/releases; that's unique modules
18:51 brokenchicken 459/day... insane
18:52 * brokenchicken releases leftpad.pm6 to try to catch up...
18:52 diakopter heheh
18:54 mr_ron Noticed the ad for Full Stuck Developer and couldn't resist googling for other work with that specialty https://www.google.com/#q=%22full+stuck+developer%22
18:54 diakopter they have 300 million package downloads daily
18:55 diakopter but yes there are plenty of acme-ish things such as https://www.npmjs.com/package/ifyouwanttogetthesumoftwonumberswherethosetwonumbersarechosenbyfindingthelargestoftwooutofthreenumbersandsquaringthemwhichismultiplyingthembyitselfthenyoushouldinputthreenumbersintothisfunctionanditwilldothatforyou
18:58 mspo I got an email for "full stack" recently
18:59 dogbert17 joined #perl6
19:03 Tonik joined #perl6
19:05 raschipi "full stack" means "we don't have a proper I.T. department"
19:05 st_elmo joined #perl6
19:05 agentzh m: my $a = 32; say $a.isa(NumStr);
19:05 camelia rakudo-moar ed482e: OUTPUT«False␤»
19:05 agentzh is this a bug?
19:06 brokenchicken nope
19:06 agentzh m: my $a = 32; say $a.does(NumStr);
19:06 camelia rakudo-moar ed482e: OUTPUT«False␤»
19:06 brokenchicken agentzh: NumStr is a subclass of both Num and Str. 32 on the other hand is an Int
19:06 agentzh brokenchicken: how can i test if an object is a primitive value?
19:06 brokenchicken agentzh: unsure what you mean by primitive value
19:06 agentzh like Int, Num, Str
19:06 agentzh unblessed values
19:07 agentzh and non-container values
19:07 brokenchicken agentzh: hm, they are tho
19:07 brokenchicken oh value types I think's the word
19:07 brokenchicken agentzh: what are you trying to do tho?
19:07 agentzh like in Perl 5: !ref $_
19:07 brokenchicken agentzh: yeah, we don't have anything like that
19:07 agentzh i'm just writing a generic traversal function.
19:08 hartenfels agentzh: How about $thing ~~ Numeric|Stringy?
19:08 agentzh traversing a generic data structure
19:08 agentzh hartenfels: oh that looks nice if it works :)
19:08 agentzh thanks, i'll try
19:08 agentzh seems like i should include Bool here too.
19:08 hartenfels True
19:09 brokenchicken agentzh: that'll do the trick for numerics and strings, but we also have Cool that can act as either, so... keep that in mind
19:09 brokenchicken agentzh: Bool is Int and so does Numeric
19:09 agentzh brokenchicken: oh, good to know!
19:09 Ven joined #perl6
19:09 agentzh thanks!
19:10 brokenchicken agentzh: you've heard of .duckmap, right? A generic traversal function.
19:10 hartenfels m: say * ~~ Numeric|Stringy for 12, 12.0, True, 'hello', [], '/'.IO, {}
19:10 camelia rakudo-moar ed482e: OUTPUT«{ ... }␤{ ... }␤{ ... }␤{ ... }␤{ ... }␤{ ... }␤{ ... }␤»
19:10 hartenfels Oops
19:10 hartenfels m: say $_ ~~ Numeric|Stringy for 12, 12.0, True, 'hello', [], '/'.IO, {}
19:10 camelia rakudo-moar ed482e: OUTPUT«True␤True␤True␤True␤False␤False␤False␤»
19:10 gfldex m: subset Value where Int|Str|Num|Bool; say (1,"1",1/2,True,Hash,Array) »~~» Value;
19:10 camelia rakudo-moar ed482e: OUTPUT«(True True False True False False)␤»
19:10 gfldex agentzh: ^^^
19:10 brokenchicken missing Rat and Complex
19:11 brokenchicken and FatRat
19:11 gfldex m: subset Value where Int|Str|Num|Rat|Complex|FatRat|Bool; say (1,"1",1/2,True,Hash,Array) »~~» Value;
19:11 camelia rakudo-moar ed482e: OUTPUT«(True True True True False False)␤»
19:11 gfldex how about int ?
19:11 brokenchicken I think that'll fall under Int
19:11 gfldex my int $i = 1; say $i ~~ Int;
19:12 gfldex m: my int $i = 1; say $i ~~ Int;
19:12 camelia rakudo-moar ed482e: OUTPUT«True␤»
19:12 brokenchicken m: subset Value where Int|Str|Num|Rat|Complex|FatRat|Bool; say (1,"1",1/2,True,Hash,Array, my int $ = 42) »~~» Value;
19:12 camelia rakudo-moar ed482e: OUTPUT«(True True True True False False True)␤»
19:12 brokenchicken yeah
19:12 brokenchicken m: subset Value where Numeric|Stringy; say (1,"1",1/2,True,Hash,Array, my int $ = 42) »~~» Value;
19:12 camelia rakudo-moar ed482e: OUTPUT«(True True True True False False True)␤»
19:12 st_elmo joined #perl6
19:13 brokenchicken m: subset Value where Numeric|Stringy; (1,"1",1/2,True, [<1>, <42e0>, ("moar stuff",)]).duckmap(-> Value $_ {"some sort of {.^name} value" }).say
19:13 camelia rakudo-moar ed482e: OUTPUT«(some sort of Int value some sort of Str value some sort of Rat value some sort of Bool value [some sort of IntStr value some sort of NumStr value (some sort of Str value)])␤»
19:14 brokenchicken agentzh: ^ like that one. We also got a .deepmap
19:16 brokenchicken Stuff's like IO::Path ain't included in that tho
19:16 brokenchicken and Dateish
19:18 Ven joined #perl6
19:19 brokenchicken BUT will include enums
19:19 brokenchicken m: enum Meows <a b c>; subset Value where Numeric|Stringy; (1,.5,True, a, Broken, DateTime.now, [42e0, ("moar stuff",)]).duckmap(-> Value $_ {"some sort of {.^name} value" }).say
19:19 camelia rakudo-moar ed482e: OUTPUT«(some sort of Int value some sort of Rat value some sort of Bool value some sort of Meows value some sort of PromiseStatus value 2017-01-19T20:19:59.443604+01:00 [some sort of Num value (some sort of Str value)])␤»
19:20 agentzh brokenchicken: that's interesting.
19:23 raschipi What would be the difference between Cool and you subset Value above?
19:23 hartenfels Cool also has Array and Hash.
19:24 brokenchicken m: subset Value where Numeric|Stringy; say [] but Numeric ~~ Value
19:24 camelia rakudo-moar ed482e: OUTPUT«True␤»
19:24 brokenchicken You can also cheat like that
19:24 raschipi Cool
19:25 brokenchicken And IO::Path and List and Map and Seq
19:26 raschipi m: subset Value where Numeric|Stringy; say NumStr ~~ Value
19:26 camelia rakudo-moar ed482e: OUTPUT«True␤»
19:26 brokenchicken Not sure what's weirder... that Hash is Cool or that Setties and Baggies ain't :/
19:26 brokenchicken NumStr is just a subclass of Num and Str
19:27 brokenchicken Just like StrNum is a subclass of Str and Num
19:27 raschipi m: subset Value where Numeric|Stringy; say HashBag ~~ Value
19:27 camelia rakudo-moar ed482e: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Expected a term, but found either infix ~~ or redundant prefix ~␤  (to suppress this message, please use a space like ~ ~)␤at <tmp>:1␤------> 3ue where Numeric|Stringy; say HashBag ~~7⏏5 Value␤»
19:28 brokenchicken it's BagHash
19:28 brokenchicken it's ain;'t any of 'em, just Any and Mu
19:28 raschipi m: subset Value where Numeric|Stringy; say BagHash ~~ Value
19:28 camelia rakudo-moar ed482e: OUTPUT«False␤»
19:28 brokenchicken and does Baggy, and QuantHash
19:28 brokenchicken and Associative
19:28 raschipi m: say BagHash ~~ Cool
19:28 camelia rakudo-moar ed482e: OUTPUT«False␤»
19:28 brokenchicken m: say QuantHash.^roles
19:28 camelia rakudo-moar ed482e: OUTPUT«((Associative))␤»
19:29 brokenchicken ^ that shows what roles a thing does
19:29 brokenchicken m: say BagHash.^mro
19:29 camelia rakudo-moar ed482e: OUTPUT«((BagHash) (Any) (Mu))␤»
19:29 brokenchicken and this shows the classes
19:29 brokenchicken m: dd [.^mro, .^roles] without NumStr
19:29 camelia rakudo-moar ed482e: OUTPUT«[(NumStr, Num, Str, Cool, Any, Mu), (Real, Numeric, Stringy)]␤»
19:34 agentzh hah, there is a .^roles method. handy.
19:34 agentzh brokenchicken: where can i get a list of those meta methods?
19:35 * agentzh already knows .^name, .^methods, and .^attributes.
19:35 brokenchicken m: say BagHash.HOW.^methods».name.sort.say
19:35 camelia rakudo-moar ed482e: OUTPUT«(ACCEPTS ACCEPTS ASSIGN-KEY ASSIGN-POS AT-KEY AT-POS Array BIND-KEY BIND-POS BUILDALL BUILDALLPLAN BUILDPLAN BUILD_LEAST_DERIVED Bag BagHash Bool CREATE Capture DELETE-KEY DELETE-POS DUMP DUMP-OBJECT-ATTRS DUMP-PIECES EXISTS-KEY EXISTS-POS FLATTENABLE_HASH…»
19:35 agentzh hah, didn't realize .HOW supports those meta methods too. *grin*
19:35 agentzh thanks
19:36 agentzh seems like the docs are lagging behind.
19:36 brokenchicken agentzh: the $x.^blah is a shorthand for $x.HOW.blah($x)
19:36 agentzh brokenchicken: yeah, i was aware of that. just didn't know HOW.HOW is possible :)
19:36 brokenchicken m: say BagHash.HOW.^mrow
19:36 camelia rakudo-moar ed482e: OUTPUT«No such method 'mrow' for invocant of type 'NQPClassHOW'␤  in block <unit> at <tmp> line 1␤␤»
19:36 brokenchicken m: say BagHash.HOW.^mro.say
19:36 camelia rakudo-moar ed482e: OUTPUT«((ClassHOW) (Any) (Mu))␤True␤»
19:37 brokenchicken m: say 42.HOW.HOW.HOW.HOW.HOW.HOW.HOW.HOW.HOW.HOW.HOW.HOW.HOW.HOW.HOW.HOW.HOW.HOW.HOW.HOW.HOW.HOW.HOW.HOW.HOW.HOW.HOW.HOW.HOW.HOW
19:37 camelia rakudo-moar ed482e: OUTPUT«No such method 'gist' for invocant of type 'KnowHOW'␤  in block <unit> at <tmp> line 1␤␤»
19:37 brokenchicken m: say 42.HOW.HOW.HOW.HOW.HOW.HOW.HOW.HOW.HOW.HOW.HOW.HOW.HOW.HOW.HOW.HOW.HOW.HOW.HOW.HOW.HOW.HOW.HOW.HOW.HOW.HOW.HOW.HOW.HOW.HOW.^name
19:37 camelia rakudo-moar ed482e: OUTPUT«KnowHOW␤»
19:37 agentzh oy
19:37 brokenchicken :)
19:37 agentzh maybe going too meta? *grin*
19:37 brokenchicken :)
19:39 Ven joined #perl6
19:39 agentzh Numberic|Stringy serves me very well. thanks for the help!
19:40 agentzh is there a shorthand for .can("dump-me").Bool ?
19:40 girafe joined #perl6
19:40 agentzh it's kinda annoying that .can() does not return a boolean directly.
19:40 raschipi cast it to bool with ?
19:40 raschipi cast it to bool with "?"
19:41 agentzh i'm just using it in when.
19:41 agentzh so the retval of .can() makes when fails.
19:41 agentzh s/fails/fail/
19:41 agentzh raschipi: ? is a prefix operator?
19:41 timotimo yup
19:42 agentzh thanks! i just found it in the long p6 operator list :D
19:42 agentzh much better than .Bool.
19:43 raschipi There's also the lower precedence "so" that does the same thing.
19:43 * agentzh is having a lot of fun coding in p6.
19:43 brokenchicken m: dd "foo".^lookup('dump-me')
19:43 camelia rakudo-moar ed482e: OUTPUT«Mu␤»
19:44 brokenchicken m: dd so "foo".^lookup('dump-me')
19:44 camelia rakudo-moar ed482e: OUTPUT«Bool::False␤»
19:44 agentzh raschipi: thanks for the tip!
19:44 brokenchicken There's also .so
19:44 agentzh ah, .^lookup().
19:44 agentzh is it expected to be faster or slower than .can()?
19:44 raschipi Like when children fight: "So!" "Not so!" "So!" "Not so!".
19:44 brokenchicken agentzh: you can just write it as *.can("blahg") if you're using it in when
19:45 agentzh what's the * magic?
19:45 raschipi Yo're supposed to fill it in, not P6 in this case.
19:45 agentzh i used to see that in @a[*-3]
19:45 brokenchicken agentzh: makes a lambda for roughly -> $x { $x.can("blah") }
19:45 raschipi Oh, neat.
19:46 brokenchicken agentzh: and `when` smartmatches and smartmatch against a Callable uses the truthiness of the return value as result, hence you avoid the ? or .so or .Bool
19:46 brokenchicken hm
19:46 agentzh got it.
19:46 agentzh i guess creating a closure here is a bit slower?
19:46 brokenchicken m: when .can('blah') { say "whatever" }; say "meow"
19:46 camelia rakudo-moar ed482e: OUTPUT«meow␤»
19:46 brokenchicken m: when .can('rotor') { say "whatever" }; say "meow"
19:46 camelia rakudo-moar ed482e: OUTPUT«meow␤»
19:47 brokenchicken m: when .can('List') { say "whatever" }; say "meow"
19:47 camelia rakudo-moar ed482e: OUTPUT«meow␤»
19:47 brokenchicken .oO( dafuq )
19:47 brokenchicken m: dd .can('List')
19:47 camelia rakudo-moar ed482e: OUTPUT«(Method+{<anon|55315056>}.new,)␤»
19:47 brokenchicken Ah right smartmatch
19:48 raschipi agentzh: Don't worry about performance until you can profile it.
19:49 brokenchicken m: sub x { say "running $^x" }; $_ = True; when x 42 {}; when x 45 {}
19:49 camelia rakudo-moar ed482e: OUTPUT«running 42␤»
19:50 brokenchicken agentzh: I'd say the *.can... is more correct. When smartmatches. The *.can basically calls .can() on whatever's in $_ and the return value's truthiness is used for whether or not `when` is run. Whereas with just .can() you're using return value to smartmatch against original value
19:50 brokenchicken Which is why you're needing the .Bool on it
19:51 brokenchicken And that'd prolly give you wrong results when you least expect it
19:51 brokenchicken m: given False { when ?.can('List') { say "lulz fail" }; }
19:51 camelia rakudo-moar ed482e: OUTPUT«lulz fail␤»
19:51 brokenchicken m: given False { when ?.can('dasdasdasdsad') { say "lulz fail" }; }
19:51 camelia rakudo-moar ed482e: ( no output )
19:51 brokenchicken or not
19:52 brokenchicken mhm, smartmatch with false's alwayus false
19:52 brokenchicken Never mind then :)
19:54 brokenchicken agentzh: as for slowness, I'd think it'd be just an irrelevant compile time hit
19:55 brokenchicken m: for ^100_000 { when *.can("foo") {} }; say now - INIT now
19:55 camelia rakudo-moar ed482e: OUTPUT«0.5298808␤»
19:55 brokenchicken m: for ^100_000 { when .can("foo") {} }; say now - INIT now
19:55 camelia rakudo-moar ed482e: OUTPUT«0.5724014␤»
19:55 brokenchicken even "faster"
19:56 agentzh hah
19:58 agentzh brokenchicken: where can i find the docs for "*"?
19:58 agentzh it looks very interesting
19:58 brokenchicken agentzh: it's Whatever (and when it makes lambdas, it's WhateverCode)
19:58 brokenchicken There's also a HyperWhatever that's two stars
19:59 agentzh Okay, i see.
19:59 agentzh thanks
19:59 raschipi https://docs.perl6.org/type/Whatever
19:59 raschipi https://docs.perl6.org/type/WhateverCode
19:59 brokenchicken huggable: Whatever
19:59 huggable brokenchicken, Placeholder for an unspecified value/argument: https://docs.perl6.org/type/Whatever
19:59 agentzh raschipi: thanks!
19:59 brokenchicken Yeah, first section in Whatever seems to talk about the good stuff
19:59 agentzh raschipi: what do you usually use for profiling p6 code?
20:00 brokenchicken perl6 has --profile option
20:00 agentzh yeah, the doc is very clear.
20:00 agentzh brokenchicken: nice! i'll try it out :)
20:00 * agentzh is writing a DSL compiler in p6.
20:00 raschipi huggable: performance
20:00 huggable raschipi, nothing found
20:00 brokenchicken m: (* * * * * * * * * * * * * * * * * * * * * * *)[^12+1].say
20:00 camelia rakudo-moar ed482e: ( no output )
20:00 brokenchicken no output? You're tricking me, robot
20:01 brokenchicken m: (* * * * * * * * * * * * * * * * * * * * * * *)[^12+1].say
20:01 camelia rakudo-moar ed482e: ( no output )
20:01 brokenchicken weird
20:01 brokenchicken oh right
20:01 brokenchicken m: (* * * * * * * * * * * * * * * * * * * * * * *)(^12+1).say
20:01 camelia rakudo-moar ed482e: OUTPUT«Too few positionals passed; expected 12 arguments but got 1␤  in block <unit> at <tmp> line 1␤␤»
20:01 raschipi https://docs.perl6.org/language/performance
20:01 brokenchicken m: (* * * * * * * * * * * * * * * * * * * * * * *)(|(^12+1)).say
20:01 camelia rakudo-moar ed482e: OUTPUT«479001600␤»
20:02 geekosaur huggable, performance :is: https://docs.perl6.org/language/performance
20:02 huggable geekosaur, Added performance as https://docs.perl6.org/language/performance
20:03 brokenchicken agentzh: it's kinda slow for large programs (the browser crawls to halt loading so much JSON). There's --profile-filename=whatever.sql option that outputs SQL format but there ain't yet a viewer for that format
20:03 brokenchicken other than...raw SQL queries I mean :P
20:04 Ven joined #perl6
20:05 moritz do we have an implementation of https://en.wikipedia.org/wiki/Error_function somewhere in Perl 6?
20:06 brokenchicken not in core
20:06 brokenchicken uuu pretty graphs
20:06 perlpilot maybe on rosettacode
20:06 agentzh brokenchicken: oh yeah, the .html takes forever to load in my chrome it seems.
20:08 moritz https://github.com/colomon/Math-Odd-Functions exposes erf through NativeCall
20:09 agentzh okay, finally rendered.
20:09 brokenchicken prof-m: say 'hello world'
20:09 camelia prof-m : OUTPUT«No such file or directory»
20:09 camelia .. Prof: http://p.p6c.org/3dc9d17
20:09 agentzh chrome has asked me a few times whether to kill that page.
20:09 brokenchicken hehe
20:09 agentzh the report is very nice.
20:10 camelia prof-m : OUTPUT«(timeout)Can't exec "./rakudo-inst/bin/perl6-m": No such file or directory at lib/EvalbotExecuter.pm line 206.␤cat: /home/camelia/rakudo-inst/revision: No such file or directory␤␤now running scp...␤/tmp/mprof.html: No such file or directory␤»
20:10 camelia .. Prof: http://p.p6c.org/3dc9d2d
20:10 agentzh tho painful to render
20:10 brokenchicken hm, that url is a 404
20:10 brokenchicken Ah, and that is why...
20:10 agentzh okay, the grammar takes most of the CPU time.
20:10 agentzh the parser.
20:11 agentzh i have a p5 implementation for the same parser and the p5 version is 100% faster.
20:11 raschipi But is it as nice?
20:12 agentzh p6 version is nicer, of course.
20:12 brokenchicken agentzh: only 100%? That's actually quite nice
20:12 agentzh though i'm not very happy with p6's actions class.
20:12 agentzh the Capture objects can be tedious to deal with when constructing my own AST.
20:13 agentzh brokenchicken: yeah, i benchmarked several real-world input, most of them are quite large.
20:13 brokenchicken agentzh: got code to look at?
20:13 raschipi We're within an order of magnitude of Perl5, very nice.
20:13 brokenchicken of the Actions class
20:13 agentzh brokenchicken: the p5 version has been massively profiled and optimized in the last month.
20:13 agentzh using 5.24.0
20:14 lmmx joined #perl6
20:14 brokenchicken m: say sum (1..100000000000000000000000000000000)
20:14 camelia rakudo-moar ed482e: OUTPUT«5000000000000000000000000000000050000000000000000000000000000000␤»
20:14 agentzh brokenchicken: sorry, it is company code atm, so i cannot show it to you.
20:14 brokenchicken But we can do THAT instantly! :)
20:14 brokenchicken agentzh: alright :)
20:15 agentzh the p6 grammar is relatively large.
20:15 agentzh 411 LOC.
20:15 agentzh for a production DSL used in CDN and ISP networks.
20:15 brokenchicken neat
20:16 mspo 50% slower is pretty good for p6
20:16 mspo actually really good
20:16 brokenchicken the upcoming release will have quite a few of nice optimizations too
20:16 agentzh mspo: yeah, i was actually surposed when i first saw the results.
20:16 agentzh *surprised
20:16 brokenchicken https://github.com/rakudo/rakudo/blob/nom/docs/ChangeLog#L94-L147
20:17 brokenchicken buggable: speed
20:17 buggable brokenchicken, ▆▃▄▅▃▅▄▄▃█▆▃▃▄▄▄▄▅▄▅▄▅▅▆▄▄▆▄▄▆▄▂▁▂▃▂▂▄▃▂▇▂▂▃▁▁▁▃▁▂ data for 2016-12-30–2017-01-19; range: 4.873s–5.958s
20:17 agentzh mspo: i had been expecting a 10x slow down or something.
20:17 agentzh *grin*
20:17 mspo agentzh: yeah
20:17 mspo agentzh: does that include moar startup time and stuff?
20:17 agentzh mspo: nope.
20:17 mspo okay so a good measurement
20:17 mspo agentzh: nice that you're using p6 at work
20:18 agentzh mspo: i used now() in p6 to benchmark the real thing.
20:18 agentzh *to time
20:18 agentzh mspo: sure, that's been my dream since 2007 :)
20:18 brokenchicken :)
20:19 agentzh mspo: we're also implementing a subset of Perl 6 targeting LuaJIT so that we can also run Perl 6 online.
20:19 mspo agentzh: crazy
20:19 brokenchicken :o
20:19 agentzh mspo: a lot of tests have already passed :)
20:20 agentzh a recursive fib(35) p6 program is 10x faster in our p6 compiler than rakudo+moarvm.
20:20 dwarring joined #perl6
20:20 agentzh the goal is to make our compiler bootstrapped.
20:20 agentzh and i'm currently borrowing rakduo to bootstrap my own compiler and other DSL compilers :)
20:20 agentzh *my own p6 compiler
20:21 agentzh so i really appreciate all you guys' help here.
20:21 agentzh i'm still learning p6 myself.
20:21 agentzh discovering new cool features everyday.
20:22 perlpilot agentzh: constant cool features is part of the Perl Way  ;)
20:22 agentzh perlpilot: indeed!
20:22 agentzh glad to see my p6 code is so much nicer than p5.
20:23 agentzh getting rid of a lot of parens, for example *grin*
20:23 agentzh and my $self = shift
20:23 agentzh "my self = shit" *grin*
20:23 Ven joined #perl6
20:24 agentzh using at least a subset of Perl 6 in very busy network gateways and web applications is definitely a goal of our team :)
20:24 brokenchicken cool
20:25 agentzh it has to be significantly faster than perl 5 too.
20:25 mspo where is this? :)
20:25 mspo luajit is probably faster than p5 for some stuff
20:25 agentzh mspo: not open sourced yet :)
20:25 mspo but p5 is pretty fast
20:25 agentzh mspo: still busy hacking on it.
20:25 mspo agentzh: I mean where do you work?
20:25 brokenchicken " recursive fib(35) p6 program is 10x faster in our p6 compiler than rakudo+moarvm" .... I hope to eventually see some PRs to rakudo/moarvm with ideas :)
20:25 agentzh mspo: yeah, p5 is pretty fast as compared to rakduo, but still not fast enough for CDN and ISP gateways.
20:26 perlpilot agentzh: I had a minor dream at last year's TPC::NA (neé YAPC::NA) of giving a talk at this year's TPC::NA called "Perl 6 in Production"   Alas, I've yet to use it that way.
20:26 mspo agentzh: yeah I'm sure
20:26 brokenchicken m: my $fib = (1, 1, *+*...*); for ^000 { $ = $fib[^100] }; say now - INIT now
20:26 camelia rakudo-moar ed482e: OUTPUT«Potential difficulties:␤    Leading 0 does not indicate octal in Perl 6. Please use 0o00 if you mean that.␤    at <tmp>:1␤    ------> 3my $fib = (1, 1, *+*...*); for ^0007⏏5 { $ = $fib[^100] }; say now - INIT now␤0.0018209␤»
20:26 mspo study luajit tricks and see how you can't use them because the language is too flexible
20:26 brokenchicken m: my $fib = (1, 1, *+*...*); for ^1000 { $ = $fib[^100] }; say now - INIT now
20:26 camelia rakudo-moar ed482e: OUTPUT«0.31964028␤»
20:26 brokenchicken m: my $fib = (1, 1, *+*...*); for ^10_000 { $ = $fib[^100] }; say now - INIT now
20:26 camelia rakudo-moar ed482e: OUTPUT«2.8997799␤»
20:29 kyan joined #perl6
20:32 brokenchicken m: my $fib = (1, 1, *+*...*); $ = $fib[^10000]; say now - INIT now; given now { $ = $fib[^10000]; say now - $_ }
20:32 camelia rakudo-moar ed482e: OUTPUT«0.3054540152␤0.020881␤»
20:32 agentzh mspo: i work in the SF bay area.
20:32 brokenchicken neat
20:33 agentzh mspo: for the OpenResty Inc company.
20:33 agentzh mspo: i used to work for CloudFlare.
20:33 mspo agentzh: okay
20:34 mspo agentzh: I was thinking openrest (luajit) but didn't realize they were a company
20:34 mspo agentzh: and knew it wasn't fastly since you weren't parsing VCL
20:34 agentzh mspo: well, we are just setting up the company.
20:34 mspo okay
20:35 agentzh mspo: and OpenResty is being supported by the OpenResty Software Foundation as well, which is nonprofit org in Hongkong.
20:35 * agentzh hates VCL.
20:35 mspo VCL isn't fun I agree
20:36 mspo but fastly is nice
20:36 agentzh We invented an Edge DSL for that purpose.
20:36 agentzh a pure rule-based language.
20:36 agentzh can be compiled down to optimized Lua code.
20:36 mspo can you do restarts and rewrites?
20:36 agentzh targeting OpenResty/LuaJIT. and i'm currently working on the p6 version of the Edge DSL compiler.
20:36 agentzh we already have a p5 version.
20:37 agentzh and the benchmark i talked about earlier is for this edge compiler.
20:37 brokenchicken \o/
20:37 mspo cotendo used to have an xml config language
20:38 * agentzh hates xml too *grin*
20:38 brokenchicken :)
20:38 agentzh well, CDN vendors will be part of our customers, though not exclusively.
20:38 mspo I mostly use the gui for fastly stuff but it's nice to have the vcl escape hatch
20:39 wamba joined #perl6
20:39 agentzh OpenResty Inc is not a CDN vendor.
20:39 agentzh we sell licenses of software.
20:39 mspo trying to use cloudflare or anyone else is like wearing handcuffs
20:39 agentzh including p6 compilers *grin*
20:39 dalek perl6-examples: 4fc79e3 | (David Warring)++ | t/categories/cookbook/17sockets.t:
20:39 dalek perl6-examples: fix spurious socket test failure
20:39 dalek perl6-examples: review: https://github.com/perl6/perl6-examples/commit/4fc79e3031
20:39 dalek perl6-examples: 67713c4 | (David Warring)++ | M (2 files):
20:39 dalek perl6-examples: add a META6.json. Simplify install-deps rule in the Makefile
20:39 dalek perl6-examples: review: https://github.com/perl6/perl6-examples/commit/67713c4963
20:39 mspo so you're going to sell the DSL?
20:39 mspo to like.. a distil
20:40 mspo whitelabel cdn?
20:40 agentzh mspo: we sell solutions, apps, and tools.
20:40 mspo agentzh: okay
20:41 mspo agentzh: when distil, f5, and cdnetworks starts calling with their new "DSL config language to show me" I'll think about you
20:42 agentzh mspo: cool, thanks.
20:42 mspo limelight
20:43 agentzh mspo: we have multiple DSLs, for different domains.
20:43 Ven joined #perl6
20:43 agentzh mspo: Perl 6, Ruby, Python, and JS will also be our "DSLs" *grin*
20:43 agentzh at least a core subset of them.
20:43 agentzh and LuaJIT is our "common language runtime"
20:43 mspo tricky
20:44 agentzh mspo: yeah, tricky, and that's why we can sell them *grin*
20:44 agentzh we may open source the unoptimized versions of these compilers to the community.
20:44 mspo agentzh: going to also do HCL?
20:44 agentzh and just sell the optimized versions.
20:44 espadrine_ joined #perl6
20:44 mspo that could be interesting
20:45 mspo (hashicorp config langauge) so you were a first class target of terraform
20:45 agentzh mspo: what is HCL?
20:45 agentzh okay, just saw your message.
20:47 Geth perl6-examples: 504ddbf2f3 | (David Warring)++ | META6.json
20:47 Geth perl6-examples: typo
20:47 Geth perl6-examples: review: https://github.com/perl6/perl6-examples/commit/504ddbf2f3
20:47 agentzh yeah, we may consider that.
20:47 agentzh inventing new compilers in perl 6 is just too much fun.
20:51 zakharyas joined #perl6
20:52 nicq20 joined #perl6
21:03 Ven joined #perl6
21:09 TEttinger joined #perl6
21:10 lizmat joined #perl6
21:12 cdg joined #perl6
21:17 ggoebel joined #perl6
21:19 gfldex ugexe: could you have a look at the following build log that I don't understand please? https://gist.github.com/gfldex/666e16b708f3bda7be5883de99928128
21:23 Ven joined #perl6
21:24 Geth perl6-examples: 3c5645b210 | (David Warring)++ | README.md
21:24 Geth perl6-examples: [README.md] update dependency installation notes.
21:24 Geth perl6-examples: review: https://github.com/perl6/perl6-examples/commit/3c5645b210
21:32 nicq20 left #perl6
21:42 lizmat_ joined #perl6
21:42 Ven joined #perl6
21:53 ugexe gfldex: heh, the only thing I could guess is maybe a zef bug with how it filters on a distribution's license
21:54 ugexe Operator::defined-alternation fetches fetched once, extracted once, but then during the filter stage it gets duplicated somehow
21:54 RabidGravy well you've all gone another month without breaking any of my modules
21:56 RabidGravy of course something that has an external dependency fails because the world changes
21:58 brokenchicken RabidGravy, sorry, we'll try hardner next month :p
21:58 brokenchicken You checked againt HEAD, right?
21:58 RabidGravy yrah
21:58 brokenchicken cool
21:58 moritz organizations can now apply at Google Summer of Code
21:59 moritz anybody want to do a Perl 6 application?
22:00 RabidGravy and 18 minutes vs more than double that 6 months ago
22:00 [Coke] moritz: there isn't a Perl 6 organization.
22:01 [Coke] Haven't heard anything about TPF applying, but I think the last time we did, we were not chosen, maybe in favor of new blood.
22:01 [Coke] I'm sure we could find some p6 projects if we did it via the TPF.
22:02 Ven joined #perl6
22:05 MasterDuke agentzh: if you do --profile-filename=something.json you can use https://github.com/tadzik/p6profiler-qt, which can handle much larger profiles than the browser can
22:13 lizmat joined #perl6
22:14 raiph joined #perl6
22:18 jdv79 is there a way in a signature to transform using a method call?  like run from-json?
22:22 Ven joined #perl6
22:25 moritz [Coke]: there doesn't have to be legal Perl 6 organization to apply as a Perl 6 project, as far as I understand
22:26 gfldex m: role Transform { method Transform { 't' ~ self } }; my $i = 42 but Transform; sub f( Transform(Int) $i){ say $i }; f $i;
22:26 camelia rakudo-moar ed482e: OUTPUT«42␤»
22:26 moritz [Coke]: they even have provisions for projects that can't accept payments (let SPI handle it, for example)
22:26 gfldex i did expect it to call Transform
22:26 ugexe gfldex: that doesn't seem to be it either. I'll have to add some extra debugging stuff to figure this out because its looking like it might be a rakudo bug
22:26 moritz [Coke]: and TPF didn't get in the last two (?) times, so maybe a separate attempt would be more helpful
22:26 ugexe i'll figure it out tonight though
22:27 gfldex brilliant, I should be able to write the blog post tomorrow that I wanted to write 2 days ago :)
22:28 moritz time for sleep here, g'night
22:28 gfldex i do not expect it to call Transform anymore
22:29 gfldex ugexe: removing license from META.info didnt work for me either
22:30 jdv79 Variable definition of type Str:D requires an initializer
22:30 jdv79 that seems a bit misleading
22:30 jdv79 as a "is required" will suffice
22:31 jdv79 as a "is required" will suffice
22:31 jdv79 oops
22:34 brokenchicken m: class { has Str:D $x }
22:34 camelia rakudo-moar ed482e: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Variable definition of type Str:D requires an initializer␤at <tmp>:1␤------> 3class { has Str:D $x 7⏏5}␤»
22:34 brokenchicken m: class { has Str:D $.x }
22:34 camelia rakudo-moar ed482e: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Variable definition of type Str:D requires an initializer␤at <tmp>:1␤------> 3class { has Str:D $.x 7⏏5}␤»
22:34 brokenchicken prolly could say "attribute" instead of variable too
22:35 brokenchicken jdv79: file it. rakudobug@perl.org
22:42 agentzh MasterDuke: thanks for the tip!
22:43 agentzh is there a shorthand for "!(a === b)" ?
22:43 brokenchicken a !=== b
22:44 agentzh it works?!
22:44 brokenchicken yup, ! is a meta operator
22:44 agentzh m: "hello" !=== "hello"
22:44 camelia rakudo-moar ed482e: OUTPUT«Potential difficulties:␤    Useless use of !=== in sink context␤    at <tmp>:1␤    ------> 3"hello" 7⏏5!=== "hello"␤»
22:44 agentzh m: say "hello" !=== "hello"
22:44 camelia rakudo-moar ed482e: OUTPUT«False␤»
22:44 agentzh wow
22:44 agentzh thanks!
22:44 brokenchicken m: say "hello" !=== "ballo"
22:44 camelia rakudo-moar ed482e: OUTPUT«True␤»
22:44 MasterDuke agentzh: np. there's a QT imposed limit on the size profile it can handle (~130Mb IIRC), so if the profile ends up larger than that you'll have to use SQL
22:45 agentzh MasterDuke: gotcha. thanks
22:45 agentzh speaking of p6 profiling, i'm thinking about porting my sampling-based systemtap flame graph tools over to the perl 6 world.
22:45 agentzh they work great for perl 5 and luajit, for example.
22:46 agentzh usable for online sampling.
22:46 brokenchicken sweet
22:46 agentzh https://github.com/agentzh/perl-systemtap-toolkit
22:46 agentzh i used to give a talk on perl 6 flame graphs on YAPC::NA: https://www.google.com/url?sa=t&amp;rct=j&amp;q=&amp;esrc=s&amp;source=web&amp;cd=4&amp;cad=rja&amp;uact=8&amp;ved=0ahUKEwi_857opM_RAhVO6WMKHaKpAYYQFgguMAM&amp;url=http%3A%2F%2Fagentzh.org%2Fmisc%2Fslides%2Fyapc-na-2013-flame-graphs.pdf&amp;usg=AFQjCNEmRnyBtmK2HQzXKI_38v6utu3rgA&amp;sig2=71DrDXCjAe67MeF4PFmgtA
22:47 agentzh sorry for the google search link. it should be http://agentzh.org/misc/slides/yapc-na-2013-flame-graphs.pdf
22:48 agentzh we successfully used this flame graph tool to make perl 5's pegex parsing framework times faster IIRC.
22:48 agentzh and the data output is minimal. thanks to the sampling approach.
22:49 agentzh we also have tools for LuaJIT VM profiling: https://github.com/openresty/stapxx#lj-vm-states
22:49 agentzh similar to what the current perl 6 profiler report offers.
22:49 agentzh like GC overhead shreshold, and etc.
22:50 agentzh how much time spent on JITted code and how much on interpreted code, and how much on external C calls.
22:50 agentzh but they are very light weight.
22:50 agentzh and can be enabled and disabled dynamically when the process is running.
22:50 agentzh and no change is needed in the target application.
22:51 agentzh and even getting a full report of all the GC object stats, live and dead, all those not yet collected: https://github.com/openresty/stapxx#lj-gc-objs
22:52 haxmeister joined #perl6
22:52 haxmeister http://www.perlfoundation.org/perl6/index.cgi%3Fperl_6_tutorial_part_1
22:52 haxmeister ^switches languages in middle of tut
22:53 ugexe gfldex: heh https://github.com/gfldex/perl6-rakudo-slippy-semilists/blob/master/META6.info#L15
22:54 haxmeister left #perl6
22:54 Geth perl6-examples: ba0795cec5 | (David Warring)++ | 4 files
22:54 Geth perl6-examples: switch from panda to zef
22:54 Geth perl6-examples: review: https://github.com/perl6/perl6-examples/commit/ba0795cec5
22:54 Geth perl6-examples: 33124d6c5a | (David Warring)++ | META6.json
22:54 Geth perl6-examples: add missing File::Find dependency
22:54 Geth perl6-examples: review: https://github.com/perl6/perl6-examples/commit/33124d6c5a
22:54 Geth perl6-examples: a1dabfb813 | (David Warring)++ | categories/euler/prob288-shlomif.p6
22:54 Geth perl6-examples: optimize euler prob 288
22:55 Geth perl6-examples:
22:55 Geth perl6-examples: Lower to native ints. 4x speed improvement.
22:55 Geth perl6-examples: review: https://github.com/perl6/perl6-examples/commit/a1dabfb813
22:57 ugexe gfldex: btw its META6.json, not META6.info (and preferably not META.info)
22:59 brokenchicken haxmeister, that's hilarious :)
22:59 cognominal joined #perl6
23:00 brokenchicken it's also very dated.... "The language changes a bit every week and Rakudo doesn't support every command"
23:02 Ven joined #perl6
23:07 cyphase joined #perl6
23:14 trnh joined #perl6
23:21 [Coke] moritz: (tpf, p6) sure, we could put together a go ourselves.
23:21 [Coke] (but we should make the TPF take any money if we get it and put it in the p6 fund.)
23:22 Ven joined #perl6
23:32 mr-foobar joined #perl6
23:39 Praise joined #perl6
23:42 Ven joined #perl6
23:54 lmmx joined #perl6

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

Perl 6 | Reference Documentation | Rakudo