Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2017-04-22

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:00 samcv TreyHarris, support is now in mi6 \o/
00:00 AlexDaniel … junctions? …
00:00 TreyHarris iyra: that's an unusual question. you have a variable to a hash and you want to see if the same hash is present in a list?
00:02 iyra I was thinking more that I have a list of hashes like: ({'year'=>2017, 'month'=>2}, {'year'=>2016, 'month'=>11}, ...) and I want to check if something like {'year':2014, 'month':9} exists in there
00:03 iyra so, it's not an array of hash variables, just an array of hashes
00:05 TreyHarris sorry, that's what I meant, but like this:
00:05 TreyHarris m: my %h = (:1st, :2nd); my %j = (:3rd, :4th); my @a = (%h, %j); say @a.contains({:1st, :2nd})
00:05 camelia rakudo-moar 9ed89d: OUTPUT: «True␤»
00:05 TreyHarris m: my %h = (:1st, :2nd); my %j = (:3rd, :4th); my @a = (%h, %j); say @a.contains({:1st,})
00:05 camelia rakudo-moar 9ed89d: OUTPUT: «True␤»
00:06 TreyHarris m: my %h = (:1st, :2nd); my %j = (:3rd, :4th); my @a = (%h, %j); say @a.contains({:6th,})
00:06 camelia rakudo-moar 9ed89d: OUTPUT: «False␤»
00:06 TreyHarris is that the behavior you want?
00:06 TreyHarris iyra: or check for the entire hash?
00:08 iyra yes, that seems to be what I want
00:08 iyra thanks
00:08 iyra I'll give it a go
00:10 TreyHarris iyra: fyi, the "{'year':2014, 'month':9} syntax is incorrect
00:10 iyra oh
00:10 iyra for a hash?
00:10 TreyHarris yes--you want {:year(2014)} or { year => 2014 }
00:11 TreyHarris sorry, no, I typoed--those braces should be parens
00:11 iyra thank you, but I want to ask: can you have spaces or other strange characters in hash keys, then?
00:11 TreyHarris for hash assignment
00:12 iyra i thought the parens were lists :D
00:12 TreyHarris iyra: of course. but you can't use the syntactic sugar as easily.
00:14 Geth ¦ doc: 1d656857c9 | (Zoffix Znet)++ | 4 files
00:14 Geth ¦ doc: Make `make xtest` pass
00:14 Geth ¦ doc: review: https://github.com/perl6/doc/commit/1d656857c9
00:14 TreyHarris m: my %h = ('a key' => 2000, :nother-key(3)); say %h<nother-key>; say %h<a key>; say %h{'a key'}
00:14 camelia rakudo-moar 9ed89d: OUTPUT: «3␤((Any) (Any))␤2000␤»
00:15 TreyHarris iyra: do you understand the camelia output above?
00:15 iyra yes
00:15 iyra okay, that makes sense
00:16 mcmillhj joined #perl6
00:16 MasterDuke_ TreyHarris: .contains is a string function. it works (sometimes) because the array you're .contains'ing on stringifies to something that has the same string as the argument stringifies to
00:17 iyra what should be used instead to test hash presence in a list?
00:18 MasterDuke_ grep or first  probably
00:18 MasterDuke_ ~~ might work also
00:19 TreyHarris MasterDuke_: I couldn't get ~~ to work, in either direction
00:19 MasterDuke_ m: my @a = <a b c>; dd @a; say @a.contains('a b')
00:19 camelia rakudo-moar 9ed89d: OUTPUT: «Array @a = ["a", "b", "c"]␤True␤»
00:20 MasterDuke_ m: my @a = <a b c>; dd @a; say 'a b' ~~ @a; say 'a' ~~ @a
00:20 camelia rakudo-moar 9ed89d: OUTPUT: «Array @a = ["a", "b", "c"]␤False␤False␤»
00:21 kurahaupo joined #perl6
00:21 MasterDuke_ yeah, first or grep, not ~~
00:21 TreyHarris MasterDuke_: can you illustrate the syntax for first or grep? i had to write it out longhand to get it to work, i suspect there's shorthand
00:24 TreyHarris m: my %h = (:1st, :2nd); my %j = (:3rd, :4th); my @a = (%h, %j); say @a.grep({ $_ === %h })
00:24 camelia rakudo-moar 9ed89d: OUTPUT: «({nd => 2, st => 1})␤»
00:24 TreyHarris like that
00:25 MasterDuke_ hm, i'm not thinking all that quickly. let me see
00:26 TreyHarris iyra: take note of what MasterDuke_ just pointed out. .contains is a string-contains, which may be what you want (but if it is it's a kludge)
00:27 iyra I think i'll go with grep, because it seemed to work in a test case I did, but thanks
00:30 TreyHarris m: my %h = (:1st, :2nd); my %j = (:3rd, :4th); my @a = (%h, %j); say @a.first({ $_<th>:exists })
00:30 camelia rakudo-moar 9ed89d: OUTPUT: «{rd => 3, th => 4}␤»
00:30 samcv help
00:30 samcv m: say ('.travis.aaayml', 'LICENSE').grep(/ LICENSE/)
00:30 camelia rakudo-moar 9ed89d: OUTPUT: «(LICENSE)␤»
00:30 samcv m: say ('.travis.aaayml', 'LICENSE').grep(/:i LICENSE/)
00:31 camelia rakudo-moar 9ed89d: OUTPUT: «(.travis.aaayml LICENSE)␤»
00:31 samcv why does this happen?
00:31 samcv m: say ('.travis.aaayml', 'LICENSE').grep(m:i/ LICENSE/)
00:31 camelia rakudo-moar 9ed89d: OUTPUT: «Use of uninitialized value of type Any in string context.␤Methods .^name, .perl, .gist, or .say can be used to stringify it to something meaningful.␤  in block <unit> at <tmp> line 1␤()␤»
00:31 samcv m: say ('.travis.aaayml', 'LICENSE').grep({$_ ~~ m:i/ LICENSE/})
00:31 camelia rakudo-moar 9ed89d: OUTPUT: «(.travis.aaayml LICENSE)␤»
00:31 samcv :(
00:31 samcv i'm confused
00:31 TreyHarris what does say return?
00:32 TreyHarris multi method say(--> Bool:D)
00:33 TreyHarris oh, there's a space there, sorry
00:34 TreyHarris samcv: you want 'rx', not 'm'
00:35 TreyHarris to pass the regex to grep rather than pass the result of matching $_ against it
00:36 TreyHarris m: say ('.travis.aaayml', 'LICENSE').grep(rx:i/ LICENSE/)
00:36 camelia rakudo-moar 9ed89d: OUTPUT: «(.travis.aaayml LICENSE)␤»
00:37 TreyHarris uh... that's not what I get
00:38 TreyHarris m: my @a = ('.travis.aaayml', 'LICENSE').grep(rx:i/ LICENSE/); @a.say
00:38 camelia rakudo-moar 9ed89d: OUTPUT: «[.travis.aaayml LICENSE]␤»
00:39 TreyHarris I'm getting just LICENSE on my perl6 install
00:39 samcv bisectable6, say ('.travis.aaayml', 'LICENSE').grep(rx:i/ LICENSE/)
00:39 samcv bisectable6, help
00:40 samcv TreyHarris, what version do you have for `perl6 --version`
00:41 TreyHarris This is Rakudo version 2017.03-123-gcb27bce built on MoarVM version 2017.03-87-g5d73bf4
00:42 TreyHarris implementing Perl 6.c.
00:42 TreyHarris looks like bisectable6 wants you to use a colon, not a comma.... and it just died anyway :)
00:42 samcv hm
00:42 samcv great :)
00:42 samcv evalable6, say ('.travis.aaayml', 'LICENSE').grep(rx:i/ LICENSE/)
00:42 samcv evalable6: say ('.travis.aaayml', 'LICENSE').grep(rx:i/ LICENSE/)
00:43 samcv committable6: help
00:43 committable6 samcv, Like this: committable6: f583f22,HEAD say ‘hello’; say ‘world’ # See wiki for more examples: https://github.com/perl6/whateverable/wiki/Committable
00:43 samcv committable6: evalable6: say ('.travis.aaayml', 'LICENSE').grep(rx:i/ LICENSE/)
00:43 committable6 samcv, ¦evalable6:: «Cannot find this revision (did you mean “6a86a67”?)»
00:43 samcv err.
00:43 iyra what's a good way to access the 'year' element of this list? List $month = $(:year(2017), :month(2))
00:43 TreyHarris m: say ('.travis.aaayml', 'LICENSE').grep(rx:i/ nothing/)
00:43 camelia rakudo-moar 9ed89d: OUTPUT: «()␤»
00:43 samcv committable6, 2017.02.HEAD say ('.travis.aaayml', 'LICENSE').grep(rx:i/ LICENSE/)
00:43 committable6 samcv, ¦2017.02.HEAD: «Cannot find this revision (did you mean “2017.04.2”?)»
00:43 TreyHarris m: say ('.travis.aaayml', 'LICENSE').grep(rx:i/ aaa/)
00:43 camelia rakudo-moar 9ed89d: OUTPUT: «(.travis.aaayml)␤»
00:43 TreyHarris m: say ('.travis.aaayml', 'LICENSE').grep(rx:i/ license/)
00:43 camelia rakudo-moar 9ed89d: OUTPUT: «(.travis.aaayml LICENSE)␤»
00:43 samcv committable6, HEAD say ('.travis.aaayml', 'LICENSE').grep(rx:i/ LICENSE/)
00:44 samcv AlexDaniel, help
00:44 AlexDaniel релло :)
00:44 AlexDaniel hello*
00:45 samcv bisectable is dead :(
00:45 bisectable6 joined #perl6
00:46 TreyHarris samcv: ask and ye shall receive
00:46 samcv bisectable6: say ('.travis.aaayml', 'LICENSE').grep(rx:i/ LICENSE/)
00:46 bisectable6 samcv, No build for revision “HEAD”
00:46 AlexDaniel samcv: three minutes please :)
00:46 samcv ok :)
00:47 AlexDaniel for some reason whateverable keeps producing broken builds
00:47 TreyHarris iyra: $month[0]<year> ... but why did you choose such an odd structure to store that in?
00:47 AlexDaniel I don't think there was this problem before
00:48 AlexDaniel something, somewhere became less stable… hmmm…
00:48 iyra TreyHarris, I thought I was storing it into a hash, actually.. I'm not sure what happened. here is the code I use to add each element to the list: @m.push: (year => $date.year, month => $date.month);
00:51 TreyHarris iyra: put braces around the anonymous hash, not parens
00:52 AlexDaniel bisectable6: new=HEAD^ say ('.travis.aaayml', 'LICENSE').grep(rx:i/ LICENSE/)
00:52 bisectable6 AlexDaniel, Bisecting by output (old=2015.12 new=HEAD^) because on both starting points the exit code is 0
00:52 bisectable6 AlexDaniel, bisect log: https://gist.github.com/b5768f8133ff9fb69ea5e5f49db11471
00:52 bisectable6 AlexDaniel, (2017-04-14) https://github.com/rakudo/rakudo/commit/822566f1ade5af59dc69ff264609bf75f0bf0f7e
00:52 AlexDaniel samcv: actually, no reason to wait ↑
00:52 samcv hmm
00:53 samcv m: say ".travis.aaayml' ~~ m:i/LICENSE/
00:53 camelia rakudo-moar 9ed89d: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Unable to parse expression in double quotes; couldn't find final '"' ␤at <tmp>:1␤------> 3say ".travis.aaayml' ~~ m:i/LICENSE/7⏏5<EOL>␤    expecting any of:␤        argument list␤        do…»
00:53 samcv m: say ".travis.aaayml" ~~ m:i/LICENSE/
00:53 camelia rakudo-moar 9ed89d: OUTPUT: «「l」␤»
00:53 samcv m: say so ".travis.aaayml" ~~ m:i/LICENSE/
00:53 camelia rakudo-moar 9ed89d: OUTPUT: «True␤»
00:53 iyra TreyHarris, thanks
00:53 samcv wtf
00:53 samcv ahh
00:53 AlexDaniel :o
00:54 samcv how this happen. and tests not catch it in roast?
00:54 grumble joined #perl6
00:54 AlexDaniel this… looks very broken
00:54 samcv m: say so ".travis.aaayml" ~~ m:i/LICENS/
00:54 camelia rakudo-moar 9ed89d: OUTPUT: «True␤»
00:54 AlexDaniel /o\
00:54 samcv somethings but not others
00:54 samcv m: say so ".travis.aaayml" ~~ m:i/LICEN/
00:54 camelia rakudo-moar 9ed89d: OUTPUT: «True␤»
00:54 samcv m: say so ".travis.aaayml" ~~ m:i/LICE/
00:54 camelia rakudo-moar 9ed89d: OUTPUT: «True␤»
00:54 samcv idk what it's doing...
00:54 AlexDaniel e: say 42
00:54 evalable6 AlexDaniel, rakudo-moar 9ed89d947: OUTPUT: «No build for 9ed89d947. Not sure how this happened!»
00:55 AlexDaniel haha XD
00:55 samcv m: say so ".travis.aaayml" ~~ m:i/eeeeeeee/
00:55 camelia rakudo-moar 9ed89d: OUTPUT: «False␤»
00:55 samcv m: say so ".travis.aaayml" ~~ m:i/eeeeee/
00:55 camelia rakudo-moar 9ed89d: OUTPUT: «False␤»
00:55 samcv m: say so ".travis.aaayml" ~~ m:i/eeeeeeb
00:55 camelia rakudo-moar 9ed89d: OUTPUT: «5===SORRY!5===␤Regex not terminated.␤at <tmp>:1␤------> 3say so ".travis.aaayml" ~~ m:i/eeeeeeb7⏏5<EOL>␤Couldn't find terminator / (corresponding / was at line 1)␤at <tmp>:1␤------> 3say so ".travis.aaayml" ~~ m:i/eeeeeeb7⏏5<EO…»
00:55 samcv m: say so ".travis.aaayml" ~~ m:i/eeeeeeb/
00:55 camelia rakudo-moar 9ed89d: OUTPUT: «False␤»
00:55 samcv m: say so ".travis.aaayml" ~~ m:i/eeeb/
00:55 camelia rakudo-moar 9ed89d: OUTPUT: «False␤»
00:55 samcv m: say so ".travis.aaayml" ~~ m:i/license/
00:55 camelia rakudo-moar 9ed89d: OUTPUT: «True␤»
00:55 samcv m: say so ".travis.aaayml" ~~ m:i/licensee/
00:55 camelia rakudo-moar 9ed89d: OUTPUT: «True␤»
00:55 samcv m: say so ".travis.aaayml" ~~ m:i/licenseee/
00:55 camelia rakudo-moar 9ed89d: OUTPUT: «True␤»
00:55 samcv m: say so ".travis.aaayml" ~~ m:i/licenseeee/
00:55 camelia rakudo-moar 9ed89d: OUTPUT: «True␤»
00:55 samcv hmm... really.
00:55 TreyHarris m: my @a; @a.push: {:year(2017), :month(2) }; @a.push: {:year(2106), :month(2)}; @a.push: { year => 2015, month => 12 }; say @a.map(*<month>) # for iyra
00:55 camelia rakudo-moar 9ed89d: OUTPUT: «(2 2 12)␤»
00:55 samcv this is super odd
00:55 samcv m: say so ".travis.aaayml" ~~ m:i/alicenseeee/
00:55 camelia rakudo-moar 9ed89d: OUTPUT: «False␤»
00:55 samcv m: say so ".travis.aaayml" ~~ m:i/licenseeee/
00:55 camelia rakudo-moar 9ed89d: OUTPUT: «True␤»
00:55 samcv m: say so "travis.aaayml" ~~ m:i/licenseeee/
00:55 camelia rakudo-moar 9ed89d: OUTPUT: «True␤»
00:56 samcv m: say so ".travis.aaayml" ~~ m:i/licenseeee/
00:56 camelia rakudo-moar 9ed89d: OUTPUT: «True␤»
00:56 samcv m: say so ".travis.aaayml" ~~ m:i/iicenseeee/
00:56 camelia rakudo-moar 9ed89d: OUTPUT: «False␤»
00:56 samcv only with the letter l?
00:56 * samcv dies
00:57 samcv m: for 'a'..'z' { say so ".travis.aaayml" ~~ m:i/ $_ 'icenseeee'/ }
00:57 camelia rakudo-moar 9ed89d: OUTPUT: «False␤False␤False␤False␤False␤False␤False␤False␤False␤False␤False␤False␤False␤False␤False␤False␤False␤False␤False␤False␤False␤False␤False␤False␤False␤False␤»
00:57 samcv m: for 'a'..'z' { my $string = "$_" ~ "icense"; say so ".travis.aaayml" ~~ m:i/$string/ }
00:57 camelia rakudo-moar 9ed89d: OUTPUT: «False␤False␤False␤False␤False␤False␤False␤False␤False␤False␤False␤False␤False␤False␤False␤False␤False␤False␤False␤False␤False␤False␤False␤False␤False␤False␤»
00:57 mcmillhj joined #perl6
00:58 samcv m: use MONKEY; for 'a'..'z' { my $string = "$_" ~ "icense"; EVAL qq 'say so ".travis.aaayml" ~~ m:i/$string/' }
00:58 camelia rakudo-moar 9ed89d: OUTPUT: «False␤False␤False␤False␤False␤False␤False␤False␤False␤False␤False␤True␤False␤False␤False␤False␤False␤False␤False␤False␤False␤False␤False␤False␤False␤False␤»
00:58 samcv o.O
00:59 TreyHarris m: say so ".travis.aaayml" ~~ m:i/license/
00:59 camelia rakudo-moar 9ed89d: OUTPUT: «True␤»
00:59 TreyHarris m: say so ".travis.aaayml" ~~ m:i/licens/
00:59 camelia rakudo-moar 9ed89d: OUTPUT: «True␤»
00:59 TreyHarris m: say so ".travis.aaayml" ~~ m:i/lic/
00:59 camelia rakudo-moar 9ed89d: OUTPUT: «True␤»
01:00 TreyHarris m: say so ".travis.aaayml" ~~ m:i/li/
01:00 camelia rakudo-moar 9ed89d: OUTPUT: «True␤»
01:00 TreyHarris m: say so ".travis.aaayml" ~~ m:i/yay/
01:00 camelia rakudo-moar 9ed89d: OUTPUT: «False␤»
01:00 TreyHarris m: say so ".travis.aaaym" ~~ m:i/license/
01:00 camelia rakudo-moar 9ed89d: OUTPUT: «False␤»
01:00 TreyHarris m: say so ".travis.aaaym" ~~ m:i/mule/
01:00 camelia rakudo-moar 9ed89d: OUTPUT: «True␤»
01:00 TreyHarris m: say so ".travis.aaaymX" ~~ m:i/mule/
01:00 camelia rakudo-moar 9ed89d: OUTPUT: «False␤»
01:00 TreyHarris m: say so ".travis.aaaymX" ~~ m:i/xray/
01:00 camelia rakudo-moar 9ed89d: OUTPUT: «True␤»
01:00 samcv m: use MONKEY; for ^100 { for 'a'..'z' { my $string = "$_" ~ "icense"; EVAL qq 'say "$_" if so "{('a'..'z').pick}travis.aaayml" ~~ m:i/$string/' } }
01:01 iyra it would be nice if this returned true...
01:01 iyra m: my @m; @m.push: {year=>2017, month=>4}; say so @m.grep({year=>2017, month=>4});
01:01 samcv m: use MONKEY; for ^10 { for 'a'..'z' { my $string = "$_" ~ "icense"; EVAL qq 'say "$_" if so "{('a'..'z').pick}travis.aaayml" ~~ m:i/$string/' } }
01:01 camelia rakudo-moar 9ed89d: OUTPUT: «(timeout)l␤l␤l␤l␤l␤l␤l␤l␤l␤l␤l␤l␤l␤l␤l␤l␤l␤l␤l␤l␤l␤l␤l␤l␤l␤l␤l␤l␤l␤l␤l␤l␤l␤l␤l␤l␤l␤l␤l␤l␤l␤l␤l␤l␤l␤l␤l␤l␤l␤l␤l␤l␤l␤l␤l␤l␤l␤l␤l␤l␤l␤l…»
01:01 camelia rakudo-moar 9ed89d: OUTPUT: «False␤»
01:01 camelia rakudo-moar 9ed89d: OUTPUT: «l␤l␤l␤l␤l␤l␤l␤l␤l␤l␤»
01:01 TreyHarris samcv: last character on left matches anything starting with that on right
01:01 samcv it only is wrong for the letter l
01:02 TreyHarris m: say so ".travis.aaaymX" ~~ m:i/xray/
01:02 camelia rakudo-moar 9ed89d: OUTPUT: «True␤»
01:02 samcv oh
01:02 TreyHarris that's right?
01:02 samcv no
01:02 TreyHarris looks wrong to me
01:02 samcv yeah
01:02 TreyHarris m: say so ".travis.aaaymn" ~~ m:i/nono/
01:02 camelia rakudo-moar 9ed89d: OUTPUT: «True␤»
01:02 samcv ok i see
01:03 samcv last on left matches 1st on right
01:03 samcv m: "abc" ~~ m:i/caaaaa/
01:03 camelia rakudo-moar 9ed89d: ( no output )
01:03 samcv m: say "abc" ~~ m:i/caaaaa/
01:03 camelia rakudo-moar 9ed89d: OUTPUT: «「c」␤»
01:03 samcv ok at least we know what's causing it
01:04 samcv m: say "ab" ~~ m:i/aa/
01:04 camelia rakudo-moar 9ed89d: OUTPUT: «False␤»
01:04 samcv m: say "ab" ~~ m:i/ba/
01:04 camelia rakudo-moar 9ed89d: OUTPUT: «「b」␤»
01:06 samcv and it only happens if it's actually in the text of the file. but doesn't happen if the regex is on a variable
01:06 ugexe m: my @m; @m.push: {year=>2017, month=>4}; say so @m.grep(*.<year> == 2017 && *.<month> == 4); # iyra you want to use comparison operators
01:06 camelia rakudo-moar 9ed89d: OUTPUT: «True␤»
01:07 iyra ugexe, thanks a lot!
01:13 mcmillhj joined #perl6
01:13 astj joined #perl6
01:14 bjz joined #perl6
01:17 AlexDaniel e: say 42
01:17 evalable6 AlexDaniel, rakudo-moar 9ed89d947: OUTPUT: «42»
01:17 AlexDaniel \o/
01:17 AlexDaniel took 3 attempts to get it right… :S
01:19 samcv now that i have tests written. i gotta fix this regex thing...
01:19 TreyHarris m: my $m = {:year(2000), :month(2)}.Map; say so $m ~~ $m
01:19 camelia rakudo-moar 9ed89d: OUTPUT: «False␤»
01:19 TreyHarris why?
01:19 eater m: class B { method A { say "f"; } }; my $d = "A"; my $b = B.new; $b.($d)();
01:19 camelia rakudo-moar 9ed89d: OUTPUT: «No such method 'CALL-ME' for invocant of type 'B'␤  in block <unit> at <tmp> line 1␤␤»
01:19 eater how do I get this to work?
01:20 u-ou wow, Grammar::Debugger is nice
01:20 aborazmeh joined #perl6
01:20 aborazmeh joined #perl6
01:21 TreyHarris m: my $m = {:year(2000), :month(2)}.Map; say $m.WHICH
01:21 camelia rakudo-moar 9ed89d: OUTPUT: «Map|Str|month(2) Str|year(2000)␤»
01:21 geekosaur m: class B { method A { say "f"; } }; my $d = "A"; my $b = B.new; $b."$d"();
01:21 camelia rakudo-moar 9ed89d: OUTPUT: «f␤»
01:21 eater geekosaur: oh
01:21 eater thanks
01:21 TreyHarris shouldn't that make $m ~~ $m True?
01:21 geekosaur there's also ::($x) but this form is optimized iirc
01:22 eater geekosaur: this being?
01:22 geekosaur the ."$x" form
01:22 TreyHarris being an immutable container, I thought that's how Map was supposed to work
01:25 TreyHarris I was thinking that was the answer to iyra in general if he didn't want to compare each key, or if the elements of the list contained mappings with different keys. But it doesn't work.
01:26 TreyHarris two identical maps do not cmp or smartmatch.
01:26 TreyHarris they do cmp. they don't smartmatch, so they don't grep or first
01:29 Zoffix joined #perl6
01:29 mcmillhj joined #perl6
01:29 Zoffix TreyHarris: the $m ~~ $m thing, yeah, should be true. Right not it's checking for key $m in $m
01:29 Zoffix s/not/now/;
01:29 Zoffix It's in my TODO list to fix.
01:30 TreyHarris ok
01:31 eater Zoffix: are you able to turn on Travis CI for perl6/ecosystem?
01:32 Zoffix eater: shows it as On already
01:34 Zoffix eater: I see no .travis file in master
01:34 Geth ¦ ecosystem: 09dc1056b6 | eater++ (committed by Zoffix Znet) | 2 files
01:34 Geth ¦ ecosystem: Add travis tests for newly added packages (#323)
01:34 Geth ¦ ecosystem:
01:34 Geth ¦ ecosystem: * Add travis tests for newly added packages
01:34 Geth ¦ ecosystem:
01:34 Geth ¦ ecosystem: * Travis: add comment explaining why we are skipping certain lines
01:34 Geth ¦ ecosystem:
01:34 Geth ¦ ecosystem: * disable building on branch update, use @zoffixznet's code
01:34 Geth ¦ ecosystem: review: https://github.com/perl6/ecosystem/commit/09dc1056b6
01:34 eater Zoffix: hmmm, didn't show on for me in travis
01:35 eater maybe someone else did it
01:35 eater thanks anywa
01:35 samcv ok at least i've figuredd out the case insensitive bug happens in the indexic op
01:35 samcv but i know how to fix it
01:36 Cabanossi joined #perl6
01:36 samcv though not 100% sure why it's happening. but i can just add an extra check to make sure that the searched for string is not longer than the end of the haystack
01:36 Geth ¦ ecosystem: d5273ec199 | (Zoffix Znet)++ (committed using GitHub Web editor) | README.md
01:36 Geth ¦ ecosystem: Add Travis badge
01:36 Geth ¦ ecosystem: review: https://github.com/perl6/ecosystem/commit/d5273ec199
01:37 eater Zoffix: it only builds PRs? so how would a badge help? :')
01:37 Zoffix eater: oh.
01:37 samcv this is a really bad bug though :(
01:37 Zoffix Well, badge would help look at result?
01:37 samcv we already did a point release rigth ;)
01:38 eater I mean I could make it test every package on branch update
01:38 Zoffix Still says no builds... https://travis-ci.org/perl6/ecosystem
01:38 Ben_Goldberg joined #perl6
01:38 Zoffix Dunno. In profile is says the repo is enabled
01:38 samcv i mean branch update might be useful. just set it as ignored?
01:38 eater Zoffix: ye, if you open a
01:38 eater PR with a new package is should do a thing\
01:40 Geth ¦ ecosystem/zoffixznet-patch-1: 96707c7b46 | (Zoffix Znet)++ (committed using GitHub Web editor) | META.list
01:40 Geth ¦ ecosystem/zoffixznet-patch-1: use modern META name
01:40 Geth ¦ ecosystem/zoffixznet-patch-1: review: https://github.com/perl6/ecosystem/commit/96707c7b46
01:40 Geth ¦ ecosystem: zoffixznet++ created pull request #325: use modern META name
01:40 Geth ¦ ecosystem: review: https://github.com/perl6/ecosystem/pull/325
01:41 Zoffix cool, it's doing things
01:46 Zoffix eater: perhaps it's better for it to build on new updates to HEAD when the update is in META.list. Plenty of PRs get merged within minututes or even seconds
01:46 mst I choose to code Perl 6 only from now on and will contribute to core code a lot!
01:46 Zoffix tehe
01:46 eater Zoffix: hmm the only question is then how to notify people about it?
01:46 Ben_Goldberg joined #perl6
01:46 Zoffix eater: how will it notify now? We just wait for travis to complete before merging?
01:46 eater ye, but I can understand that's too slow :')
01:46 mcmillhj joined #perl6
01:46 Zoffix What I forsee happening if we wait is there'll be forgotten PRs because people would see notifcation, come look and see travis still working, and leave and forget about the PR
01:46 u-ou mst: no more perl 5?
01:46 mst ah, it was zoffix being a twit
01:46 Zoffix :)
01:46 u-ou ;o
01:46 mst sadly he changed nick back again shortly before the ghost landed
01:46 Zoffix hehe
01:48 ilbot3 joined #perl6
01:48 Topic for #perl6 is now »ö« Welcome to Perl 6! | https://perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:,  or /msg camelia p6: ... | irclog: http://irc.perl6.org or http://colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
01:48 Ben_Goldberg joined #perl6
01:48 Zoffix eater: maybe add irc notifications? Currently travis bot is AWOL, but when it works, we'd have it complain in channel and someone can just comment on the PR saying there are failures or something
01:49 eater post-merge?
01:49 Zoffix Yeah
01:49 Zoffix Or open an Issue on the failing module
01:49 eater why not directly comment?
01:49 Zoffix eater: or that, if it's possible
01:50 eater well your package is all fine :>
01:50 eater Zoffix: will look into it tomorrow
01:50 eater but its 4AM, now so I geuss Im gonna get some sleep first :')
01:50 Zoffix .oO( or have some bot auto-merge after it passes or something )
01:51 eater isn't there an option, merge after succesful build?
01:51 Zoffix No idea
01:51 Zoffix If there is, that'd be sweet
01:51 eater https://chrisdown.name/2015/09/27/auto-merging-successful-builds-from-travis-ci.html
01:51 eater that would automate the whole thing
01:52 Zoffix Cool. Maybe, if possible, add some protection that watches when stuff gets removed. If more stuff got removed than stuff got added, don't merge and tell a human to merge. We don't want someone accidentally to bump off a module and not notice it
01:52 * Zoffix &
01:52 Zoffix left #perl6
01:53 samcv ok hopefully i fixed that nasty regex bug....
01:53 samcv running spectest now
01:53 Geth ¦ ecosystem: 0e0a9af96a | (Zoffix Znet)++ (committed using GitHub Web editor) | META.list
01:53 Geth ¦ ecosystem: use modern META name (#325)
01:53 Geth ¦ ecosystem: review: https://github.com/perl6/ecosystem/commit/0e0a9af96a
01:54 samcv so we have two point releases already... hmm
01:54 samcv who's up for another :)
02:00 labster joined #perl6
02:00 mcmillhj joined #perl6
02:06 noganex joined #perl6
02:10 MasterDuke_ m: my @a = {:1a, :2b}, {:3c, :4d}, {:5e, :6f}; say so @a.first(* eqv {:3c, :4d})
02:10 camelia rakudo-moar 9ed89d: OUTPUT: «True␤»
02:11 MasterDuke_ TreyHarris, iyra: bunch of distractions, but ^^^ is what i was thinking of
02:11 samcv gonna have to change the internal loop to return information about how many characters it expands
02:12 samcv though for indexic op we really need to return in addition to whether or not it found the index, but if it DID find the index, we need to know how many it expanded
02:12 samcv though not sure how to do the second one.
02:13 labster joined #perl6
02:13 samcv but should be able to internally change it for now, and will decide about the ops later. because we'll need to somehow convey info that 'sta' ~~ m:i/st/  should return only one cp
02:13 samcv and not return 'sta'
02:15 samcv so looks like i'm having to deal with this at least partially to fix this bug
02:16 mcmillhj joined #perl6
02:17 TreyHarris MasterDuke_: yeah, but in general a list of structlikes should be maps or objects, not anonymous hashes, and then you can just grep them directly (well, whenever the bug with Map is fixed)
02:17 TreyHarris a list of anonymous hashes is a p5ism that doesn't seem as useful in Perl 6
02:25 MasterDuke_ could be. but the result of a from-json would likely have a list of hashes you might want to search
02:26 MasterDuke_ and yeah, you'll usually be searching just by key or value, but if you want to see if k/v pair is present...
02:28 Xliff joined #perl6
02:28 Xliff \o
02:29 Xliff m: my @a = qw<1 2 3 a 5 6>; @a.grep(Int).say
02:29 camelia rakudo-moar 9ed89d: OUTPUT: «()␤»
02:29 Xliff m: my @a = qw<1 2 3 a 5 6>; @a.grep({ Int }).say
02:29 camelia rakudo-moar 9ed89d: OUTPUT: «()␤»
02:29 Xliff m: my @a = qw<1 2 3 a 5 6>; @a.grep({ * ~~ Int }).say
02:29 camelia rakudo-moar 9ed89d: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Malformed double closure; WhateverCode is already a closure without curlies, so either remove the curlies or use valid parameter syntax instead of *␤at <tmp>:1␤------> 3 = qw<1 2 3 a 5 6>; @a.grep({ *…»
02:29 Xliff m: my @a = qw<1 2 3 a 5 6>; @a.grep( * ~~ Int ).say
02:29 camelia rakudo-moar 9ed89d: OUTPUT: «()␤»
02:29 Xliff :(
02:30 MasterDuke_ m: my @a = qw<1 2 3 a 5 6>; @a.grep( * ~~ IntStr ).say
02:30 Xliff m: my @a = qw<1 2 3 a 5 6>.grep: Int; @a.say
02:30 camelia rakudo-moar 9ed89d: OUTPUT: «()␤»
02:30 camelia rakudo-moar 9ed89d: OUTPUT: «[]␤»
02:31 Xliff m: my @a = qw<1 2 3 a 5 6>; say @a;
02:31 camelia rakudo-moar 9ed89d: OUTPUT: «[1 2 3 a 5 6]␤»
02:31 Xliff rut roh
02:31 Xliff m: my @a = (1, 2, 3, 'a', 5, 6); say @a;
02:31 camelia rakudo-moar 9ed89d: OUTPUT: «[1 2 3 a 5 6]␤»
02:31 Xliff Hrm.
02:32 Xliff https://docs.perl6.org/routine/grep <-- implies that should work.
02:32 Xliff m: say ('hello', 1, 22/7, 42, 'world').grep: Int;
02:32 camelia rakudo-moar 9ed89d: OUTPUT: «(1 42)␤»
02:32 mcmillhj joined #perl6
02:32 Xliff Aaand... it does!
02:32 Xliff m: my @a = (1, 2, 3, 'a', 5, 6); say @a[0].WHAT;
02:32 camelia rakudo-moar 9ed89d: OUTPUT: «(Int)␤»
02:33 Xliff m: my @a = (1, 2, 3, 'a', 5, 6); say @a[0].NAME;
02:33 camelia rakudo-moar 9ed89d: OUTPUT: «No such method 'NAME' for invocant of type 'Int'␤  in block <unit> at <tmp> line 1␤␤»
02:33 Xliff m: my @a = (1, 2, 3, 'a', 5, 6); say @a[0].^name;
02:33 camelia rakudo-moar 9ed89d: OUTPUT: «Int␤»
02:33 MasterDuke_ m: my @a = qw<1 2 3 a 5 6>; @a.grep( { $_ ~~ IntStr } ).say
02:33 camelia rakudo-moar 9ed89d: OUTPUT: «()␤»
02:33 MasterDuke_ m: my @a = <1 2 3 a 5 6>; @a.grep( * ~~ IntStr ).say
02:33 camelia rakudo-moar 9ed89d: OUTPUT: «(1 2 3 5 6)␤»
02:34 Xliff m: say (1, 2, 3, 'a', 5 6).grep: Int;
02:34 camelia rakudo-moar 9ed89d: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Two terms in a row␤at <tmp>:1␤------> 3say (1, 2, 3, 'a', 57⏏5 6).grep: Int;␤    expecting any of:␤        infix␤        infix stopper␤        statement end␤        statement modifier…»
02:34 Xliff m: say (1, 2, 3, 'a', 5, 6).grep: Int;
02:34 camelia rakudo-moar 9ed89d: OUTPUT: «(1 2 3 5 6)␤»
02:34 Xliff So that works. But when assigning to an array, it doesn't?
02:34 Xliff m: say (1, 2, 3, 'a', 5, 6).grep(Int);
02:34 camelia rakudo-moar 9ed89d: OUTPUT: «(1 2 3 5 6)␤»
02:35 Xliff m: my @a = qw<1 2 3 a 5 6>; say @a.list.grep(Int)
02:35 camelia rakudo-moar 9ed89d: OUTPUT: «()␤»
02:35 Xliff m: my @a = qw<1 2 3 a 5 6>; say @a.list.grep: Int
02:35 camelia rakudo-moar 9ed89d: OUTPUT: «()␤»
02:35 Xliff m: say (1, 2, 3, 'a', 5, 6).grep(Str);
02:35 camelia rakudo-moar 9ed89d: OUTPUT: «(a)␤»
02:35 Xliff m: say (1, 2, 3, 'a', 5, 6).grep(Cool);
02:35 camelia rakudo-moar 9ed89d: OUTPUT: «(1 2 3 a 5 6)␤»
02:35 Xliff m: say (1, 2, 3, 'a', 5, 6).grep(Rat);
02:35 camelia rakudo-moar 9ed89d: OUTPUT: «()␤»
02:35 Xliff ?!?
02:35 Xliff m: say (1, 2, 3, 'a', 5, 6).grep(Num);
02:35 camelia rakudo-moar 9ed89d: OUTPUT: «()␤»
02:36 Xliff m: say (1, 2, 3, 'a', 5, 6).grep(IntStr);
02:36 camelia rakudo-moar 9ed89d: OUTPUT: «()␤»
02:36 Cabanossi joined #perl6
02:36 Xliff m: say (1, 2, 3, 'a', 5, 6).grep(* ~~ IntStr);
02:36 camelia rakudo-moar 9ed89d: OUTPUT: «()␤»
02:36 MasterDuke_ m: my @a = <1 2 3 a 5 6>; say @a.list.map( { $_.WHAT } )
02:36 camelia rakudo-moar 9ed89d: OUTPUT: «((IntStr) (IntStr) (IntStr) (Str) (IntStr) (IntStr))␤»
02:36 MasterDuke_ m: my @a = qw<1 2 3 a 5 6>; say @a.list.map( { $_.WHAT } )
02:36 camelia rakudo-moar 9ed89d: OUTPUT: «((Str) (Str) (Str) (Str) (Str) (Str))␤»
02:37 Xliff OK. IntStr coz use of q/qq
02:37 Xliff So this is actually not what I really want to test.
02:38 Xliff m: my %a = { 1 => 1, 2 => 2, 3 => 3, 'a' => 4 }; %a.keys.say
02:38 camelia rakudo-moar 9ed89d: OUTPUT: «Potential difficulties:␤    Useless use of hash composer on right side of hash assignment; did you mean := instead?␤    at <tmp>:1␤    ------> 3a = { 1 => 1, 2 => 2, 3 => 3, 'a' => 4 }7⏏5; %a.keys.say␤(1 a 3 2)␤»
02:38 Xliff m: my %a = ( 1 => 1, 2 => 2, 3 => 3, 'a' => 4 ); %a.keys.say
02:38 camelia rakudo-moar 9ed89d: OUTPUT: «(a 1 3 2)␤»
02:38 Xliff m: my %a = ( 1 => 1, 2 => 2, 3 => 3, 'a' => 4 ); %a.keys.grep(Int).say
02:38 camelia rakudo-moar 9ed89d: OUTPUT: «()␤»
02:38 Xliff m: my %a = ( 1 => 1, 2 => 2, 3 => 3, 'a' => 4 ); %a.keys.grep(IntStr).say
02:38 camelia rakudo-moar 9ed89d: OUTPUT: «()␤»
02:39 Xliff m: my %a = ( 1 => 1, 2 => 2, 3 => 3, 'a' => 4 ); %a.keys.map({ $_.WHAT }).say
02:39 camelia rakudo-moar 9ed89d: OUTPUT: «((Str) (Str) (Str) (Str))␤»
02:39 Xliff m: my %a = ( 1 => 1, 2 => 2, 3 => 3); %a.keys.map({ $_.WHAT }).say
02:39 camelia rakudo-moar 9ed89d: OUTPUT: «((Str) (Str) (Str))␤»
02:39 Xliff O_o
02:39 Xliff So all hash keys are Str?!
02:40 MasterDuke_ yeah, unless you specify a typed hash
02:40 Xliff *Isigh*
02:40 Xliff Good to know. Thanks.
02:40 Xliff So I know what I need now.
02:44 geekosaur "object hash" is the magic phrase you're looking for
02:48 mcmillhj joined #perl6
02:53 Xliff Thanks, geekosaur
02:53 Xliff m: say "0.00" <=> "0.01"
02:53 camelia rakudo-moar 9ed89d: OUTPUT: «Less␤»
02:53 Xliff m: say "0.01" <=> "0.00"
02:53 camelia rakudo-moar 9ed89d: OUTPUT: «More␤»
02:53 Xliff m: say "0.01".val <=> "0.012".val
02:53 camelia rakudo-moar 9ed89d: OUTPUT: «No such method 'val' for invocant of type 'Str'␤  in block <unit> at <tmp> line 1␤␤»
02:55 Xliff m: say "0.01".Num
02:55 camelia rakudo-moar 9ed89d: OUTPUT: «0.01␤»
02:57 geekosaur I think you don't need to convert there because <=> does it (leg is the string version)
03:12 poohman joined #perl6
03:13 poohman t
03:14 poohman p6:say 3
03:14 poohman p6:say 3;
03:14 MasterDuke_ poohman: need a space after the :
03:14 poohman thanks
03:15 poohman p6: say 3;
03:15 camelia rakudo-moar 9ed89d: OUTPUT: «3␤»
03:15 bjz joined #perl6
03:15 poohman Masterduke -Thanks, been awhile since I was here
03:16 MasterDuke_ np
03:18 poohman tried to run a few native call examples yesterday - gtk::Simple . Had downloaded Gtk::simple using zef - but had the message no libgtk-3.so
03:18 raschipi joined #perl6
03:19 mcmillhj joined #perl6
03:20 dj_goku joined #perl6
03:23 TreyHarris m: my %h{Cool}; %h<3> = 1; %h<a> = 2; say %h.perl; %h<3.1> = 3; say %h.perl
03:23 camelia rakudo-moar 9ed89d: OUTPUT: «(my Any %{Cool} = IntStr.new(3, "3") => 1, :a(2))␤Ambiguous call to 'infix:<cmp>'; these signatures all match:␤:(Int:D \a, Rational:D \b)␤:(Str:D \a, Str:D \b --> Order:D)␤  in block <unit> at <tmp> line 1␤␤»
03:23 TreyHarris is that a bug?
03:24 TreyHarris I get the same thing when I use a typed hash with any supertype and use keys from two different subtypes
03:26 TreyHarris m: my %h{Cool}; %h<3> = 1; %h<a> = 2; %h<2.0> = 3; for %h.kv -> $k, $v { say "$k: $v" }
03:26 camelia rakudo-moar 9ed89d: OUTPUT: «3: 1␤2.0: 3␤a: 2␤»
03:27 TreyHarris m: my %h{Cool}; %h<3> = 1; %h<a> = 2; %h<2.0> = 3; for %h.kv -> $k, $v { say "$k: $v" }; say %h
03:27 camelia rakudo-moar 9ed89d: OUTPUT: «3: 1␤2.0: 3␤a: 2␤Ambiguous call to 'infix:<cmp>'; these signatures all match:␤:(Int:D \a, Rational:D \b)␤:(Str:D \a, Str:D \b --> Order:D)␤  in block <unit> at <tmp> line 1␤␤»
03:29 MasterDuke_ poohman: don't know anything about gtk::simple or nativecall. might want to ask jnthn or timotimo when they're around
03:31 poohman MasterDuke: ok thanks
03:32 BenGoldberg joined #perl6
03:33 MilkmanDan joined #perl6
03:45 Cabanossi joined #perl6
03:51 drrho_ joined #perl6
03:52 isBEKaml joined #perl6
03:53 isBEKaml OHHAI, can I not use HEAD builds for MoarVm with NQP anymore now? I is sad :-(
04:00 TreyHarris what is the correct syntax for plan :skip-all?
04:00 TreyHarris m: use Test; plan :skip-all;
04:00 camelia rakudo-moar 9ed89d: OUTPUT: «1..0 # Skipped: True␤»
04:01 TreyHarris that seems nice, but it doesn't work when run via mi6, I get a signature error:
04:02 TreyHarris Cannot resolve caller plan(:skip-all); none of these signatures match:
04:02 TreyHarris ($number_of_tests)
04:02 TreyHarris in block <unit> at t/ps-example.t line 4
04:04 TreyHarris bisectable6: new=HEAD^ use Test; plan :skip-all;
04:04 bisectable6 TreyHarris, Bisecting by exit code (old=2015.12 new=HEAD^). Old exit code: 1
04:04 bisectable6 TreyHarris, bisect log: https://gist.github.com/ff3c55d12ad71472ccc909a9bc437f89
04:04 bisectable6 TreyHarris, (2017-04-05) https://github.com/rakudo/rakudo/commit/14b6d5f36074b4ed8644d37a01c2bf4391fe6617
04:05 TreyHarris ah, it wasn't implemented yet in rakudo yet.
04:12 krshn joined #perl6
04:30 Cabanossi joined #perl6
04:35 astj joined #perl6
04:52 Actualeyes joined #perl6
05:12 kurahaupo joined #perl6
05:15 Cabanossi joined #perl6
05:45 kurahaupo joined #perl6
05:45 kurahaupo_ joined #perl6
05:49 kurahaupo joined #perl6
05:56 wamba joined #perl6
06:07 samcv bug has been fixed in PR here. if anyone wants to take a look https://github.com/MoarVM/MoarVM/pull/586
06:07 samcv detailed explanation for bug and fix in PR body
06:08 nadim joined #perl6
06:13 CIAvash joined #perl6
06:15 samcv i'm still trying to think the best way to eventually expose this extra data. what would make most sense for indexic to return back... cause i can set return values of the INTERNAL loop to whatever i want, but still need an api of how to relay info on the length of the match.
06:16 samcv i would use 0 = no match and >0 means it found a match of such and such a length in the haystack, and if the length is equal to the needle's length then you know there was no expansion
06:16 samcv but that presents the problem of that an empty string is supposed to be found in every string.
06:16 samcv and that would be a match of 0 codepoints... so is the kicker
06:20 gdonald joined #perl6
06:30 Cabanossi joined #perl6
06:32 u-ou hi
06:32 samcv hi u-ou
06:41 samcv looks like travis ci is switching to dist: trusty on april 29th or something
06:41 samcv which is when ubuntu EOL's updates on it or something
06:42 samcv actually wait. i'm not sure... what it actually means
06:42 samcv https://blog.travis-ci.com/2017-04-17-precise-EOL looks like change in q3? though
06:42 samcv maybe they're just warning you it's EOLing
06:44 sena_kun joined #perl6
06:44 sena_kun
06:44 yoleaux 21 Apr 2017 19:41Z <TimToady> sena_kun: File::Ignore is working again
06:44 yoleaux 21 Apr 2017 20:46Z <samcv> sena_kun: thanks!
07:15 domidumont joined #perl6
07:15 Cabanossi joined #perl6
07:20 domidumont joined #perl6
07:26 rindolf joined #perl6
07:36 darutoko joined #perl6
07:36 winnie_ joined #perl6
07:37 winnie_ p6 : say 1;
07:39 sena_kun p6: say 1;
07:39 camelia rakudo-moar 9ed89d: OUTPUT: «1␤»
07:39 nadim Morning!  can one have a man page installed when installing with zef?
07:40 bjz joined #perl6
07:41 samcv i don't think that's an option currently but if somebody wanted to add it.
07:42 u-ou is there a way to say the type List of Str?
07:42 u-ou like in a returns statement
07:42 samcv the type List?
07:42 samcv of Str. what does that mean
07:42 u-ou I guess there's only one type of List
07:43 u-ou nvm
07:43 sena_kun [Str], [Int], I can guess.
07:43 samcv well. there are for nqp
07:45 samcv m: "blah".^attributes.say
07:45 camelia rakudo-moar 9ed89d: OUTPUT: «(str $!value)␤»
07:46 samcv m: ('blah','blah').^attributes.say
07:46 camelia rakudo-moar 9ed89d: OUTPUT: «(Mu $!reified Mu $!todo)␤»
07:50 winnie_ joined #perl6
07:51 poohman joined #perl6
07:51 poohman test
07:52 winnie_ p6: say 1;
07:52 camelia rakudo-moar 9ed89d: OUTPUT: «1␤»
07:52 parv joined #perl6
07:52 winnie_ p6: say (10+1/6 +5);
07:52 camelia rakudo-moar 9ed89d: OUTPUT: «15.166667␤»
07:55 isBEKaml joined #perl6
08:01 moritz \o
08:03 moritz timotimo: fwiw the automatic update of perl6-all-modules seems to work now
08:06 cpage_ joined #perl6
08:16 domidumont joined #perl6
08:26 ufobat_ joined #perl6
08:41 * u-ou sleepy
08:43 samcv moritz, nice
08:53 robertle joined #perl6
09:11 timotimo moritz: very cool!
09:13 u-ou do you guys write code when you're sleepy
09:14 samcv yes
09:14 samcv source: am sleeping. am coding
09:15 u-ou lol
09:15 timotimo i am actually a sleep
09:15 u-ou i sleep for about 12 hours a night
09:20 samcv err i meant to say "am sleepy" oh well.
09:20 samcv proof i'm sleepy there you go
09:22 u-ou hee
09:22 u-ou hehe
09:27 timotimo "beep beep i'm a sleep"
09:41 poohman hello I tried to run an example from Gtk::Simple after installing it with zef but got the error no libgtk-3.so
09:44 poohman Any idea as to where I could have botched it up??
09:45 u-ou you need to install libgtk
09:46 timotimo the difficult part is that the .so file (i.e. without version numbers attached) is only in the -dev or -devel version of the package
09:46 timotimo so you'll need to install those, too, poohman
09:46 John[Lisbeth] joined #perl6
09:46 John[Lisbeth] he he he so I hear there is a new kid on the block with dem good macros
09:46 John[Lisbeth] you know dem good macros namsayin
09:47 John[Lisbeth] why a person so inclined could do whatever they'd like in a language with fully extensible macros
09:47 dct joined #perl6
09:48 timotimo yeah, what you heard about there is probably the slangs feature we have. macros are currently just in there in a version that'll be replaced in the future
09:49 timotimo but slangs are more powerful than macros
09:49 jferrero joined #perl6
09:49 poohman I installed libgtk but no devel packages - will try - thanks
09:55 poohman cool worked with wayland
09:55 poohman thanks
09:59 dct joined #perl6
10:01 pmurias joined #perl6
10:01 timotimo nice
10:07 poohman has anybody ported perl6 to sailfishos??
10:07 timotimo that's one of the smartphone OSes, right?
10:08 poohman yes but with normal glibc
10:08 poohman not bionic
10:08 poohman they are running in Wayland too
10:08 timotimo then i suspect it would be pretty easy
10:09 u-ou what about raspberry pi
10:09 u-ou does that run perl6
10:09 timotimo raspberry pi already works
10:09 u-ou yay
10:09 timotimo compiling it on the device requires a hefty amount of swap space, though
10:09 poohman hmmm - I have a device - let me give it a shot
10:10 poohman directly on the device - no patience to get a dev environment going for sailfish
10:10 timotimo as long as you somehow can get a bit above 1 gig of ram, it can work
10:11 poohman ok
10:11 u-ou compiling it you mean?
10:11 timotimo i'm not sure how much exactly
10:12 poohman ja why not a great idea??
10:26 NeuralAnomaly joined #perl6
10:26 NeuralAnomaly_ joined #perl6
10:31 Geth joined #perl6
10:47 iyra joined #perl6
10:48 colomon joined #perl6
10:53 colomon “rakudobrew test” failing on both OS X and Linux
10:53 colomon “Couldn't determine correct make program. Aborting.”
10:54 u-ou rakudobrew is for rakudo devs
10:54 colomon which isn’t what I wanted to bring up here at all, just something I found trying to answer my question on my own.
10:54 colomon u-ou: look at the commit chart for rakudo
10:54 u-ou why
10:56 jnthn u-ou: Because colomon decidedly counts as that :P
10:57 colomon I’m still #8 rakudo committer all time despite not having committed anything since “Christmas”
10:58 colomon jnthn: I’m trying to update code from 2012.  Grammar::parse appears to return something different on failure since then.
10:59 jnthn colomon: It returns Nil these days; I believe it used to return a failed Match object
10:59 colomon right, all my tests look for a Match object whose value is false.
10:59 jnthn And in 2012 if Nil existed then it probably vanished in list context
10:59 colomon how do I test for a Nil return?
11:00 colomon (crazily this code used to work on both rakudo AND niezca)
11:01 jnthn Well, it's be false so there's always nok TheGrammar.parse($stuff)
11:01 jnthn *falsey
11:01 colomon is a Match object always true?
11:01 colomon (now)
11:02 masak backlogging, I saw the word "callback" being used. how do people use this word?
11:02 u-ou ahh. my mistake, hehe.
11:02 masak (I think I know what it means, but I didn't agree with the way it was used. not completely, anyway.)
11:02 colomon u-ou: no worries
11:03 colomon u-ou: bit grumpy here, just woke up and no caffiene in the house
11:03 masak Wikipedia seems to have it as "a function that you pass as a parameter to a routine, so that the routine can call it at leisure"
11:03 u-ou no caffeine = bad
11:03 jnthn colomon: No, they can still crop up, but not as a return value from .parse
11:04 colomon jnthn++
11:04 jnthn multi method Bool(Match:D:) { nqp::p6bool($!pos >= $!from) }
11:06 jnthn Could test .defined to be really super sure, I guess, but I've just gone with nok in my own tests
11:06 colomon all right, that’s another .t file fixed
11:06 colomon :)
11:07 * colomon is amused that the .t files seem to have more problems than the “actual” code so far
11:07 masak u-ou: I tried making the statment `no caffeine = bad;` compile under Rakudo, but I had to give up.
11:07 u-ou ;o
11:07 jnthn masak: I think that definition may be missing that the routine may stash the callback away for something *else* to later call back
11:08 jnthn Which is a case I'd still call a callback :)
11:08 u-ou off to bed
11:08 u-ou night night
11:08 masak jnthn: yes. I almost added "(directly or indirectly)", if that helps
11:08 masak the problem is that you'd need `caffeine` to be both something term-y, and something that can be assigned to
11:08 masak u-ou: 'night
11:08 dct joined #perl6
11:09 masak jnthn: in the backlog it was asserted that `*-1` generates a callback. I'd only agree with that if the `*-1` were also a parameter. otherwise it'd just a callable, I guess.
11:09 masak m: say (*-1).^name
11:09 camelia rakudo-moar 9ed89d: OUTPUT: «{ ... }␤»
11:09 masak ...huh
11:10 masak m: say (*-1).WHAT
11:10 camelia rakudo-moar 9ed89d: OUTPUT: «(WhateverCode)␤»
11:10 masak first time `.WHAT` gave me a better result than `.^name` ;)
11:10 masak guess I'm running into some subtle version of the semipredicate problem or something :P
11:11 jnthn hah, I suspect the first one actually manage to curry the .^name :D
11:11 jnthn m: say ((*-1).^name)(42)
11:11 camelia rakudo-moar 9ed89d: OUTPUT: «Int␤»
11:11 jnthn Yup :)
11:12 masak :P
11:12 jnthn But yes, I'd probably have said "generates a closure"
11:12 masak well... :P
11:12 masak "closure" is another problematic one
11:13 jnthn And before you complain it doesn't close over anything... :)
11:13 masak to me that's a word that we should save for the cases where, right
11:13 masak what jnthn said
11:13 jnthn Right, so what does *+1 close over? :)
11:13 masak the... operator?
11:13 jnthn Yes :)
11:13 jnthn Since operators are lexically defined ;)
11:13 masak I only know that since I've been through hell with macros and lexical scopes :P
11:14 jnthn :P
11:15 masak m: my &c; { &c = * + * }; { sub infix:<+>($, $) { "MWHAHAHA" }; say 40 + 2; say c(40, 2) }
11:15 camelia rakudo-moar 9ed89d: OUTPUT: «MWHAHAHA␤42␤»
11:15 masak ...demonstrated here ^
11:15 * masak pictures several backloggers' brains silently but beautifully exploding
11:15 jnthn If mine is like "so what", have I been here too long? :)
11:16 masak jnthn: yep. you're beyond saving.
11:16 masak jnthn: and I was going to say "and I'm one of the very few people who still understand you"... but the truth is that you write wonderfully expository blog posts, so I can't honestly claim that :D
11:17 grondilu joined #perl6
11:20 jnthn ooh, that reminds me I've got a post I almost was done drafting and should finish up :)
11:34 * colomon shakes fist at past colomon
11:40 colomon let me guess, the parse / subparse distinction is also newer than 2012?  :)
11:42 jnthn Quite possibly :)
11:44 timotimo wow, moarvm compiles under windows again ... after i miraculously broke it beyond recognition
11:50 El_Che timotimo: are you cheating and using the new Linux subsystem of w10? :)
11:51 masak lol, I blog'd! http://strangelyconsistent.org/blog/the-root-of-all-eval
11:51 masak (more grumpy than usual. but hopefully in the end constructive.)
11:53 colomon four test files passing now
11:58 pmurias m: my $foo := "taking liberties with lexicals"; EVAL 'say $foo';
11:58 camelia rakudo-moar 9ed89d: OUTPUT: «taking liberties with lexicals␤»
11:59 pmurias m: my $foo = "taking liberties with lexicals"; EVAL 'say $foo';
11:59 camelia rakudo-moar 9ed89d: OUTPUT: «taking liberties with lexicals␤»
11:59 pmurias masak: accessing lexicals that are not marked dynamic is something that normal functions shouldn't do
12:01 masak well, sure.
12:01 masak I'm not saying that `eval` isn't strange
12:01 masak or that it doesn't have side effects
12:03 masak and I'm not going to go on a windmill-tilting tour to try to lowercase the function again -- especially not given how easy it is to just do it with a line of code ;)
12:05 masak I do not in passing that `MONKEY-SEE-NO-EVAL` is trickier to type than one might think: because of the combination of all-caps and hyphens, one has to press and releast Shift four times at the right moments
12:05 masak note*
12:05 MasterDuke_ joined #perl6
12:06 masak though maybe the rationale for that is that it's some kind of keyboard-dehuffmanized feature, not a bug :P
12:07 winnie__ joined #perl6
12:11 timotimo El_Che: nope, it was all lack of understanding of what hoops you need to jump through for something to compile on windows
12:19 Khisanth joined #perl6
12:29 AlexDaniel joined #perl6
12:34 timotimo phew, that headache is probably dealt with now
12:34 timotimo let's see what appveyor thinks
12:35 wamba joined #perl6
12:42 colomon_ joined #perl6
12:44 gdonald joined #perl6
12:45 Geth ¦ ecosystem: 3f7447c3e2 | (Marcel Timmerman)++ (committed using GitHub Web editor) | META.list
12:45 Geth ¦ ecosystem: Change of meta filename
12:45 Geth ¦ ecosystem:
12:45 Geth ¦ ecosystem: Change of meta filename of Config::DataLang::Refine
12:45 Geth ¦ ecosystem: review: https://github.com/perl6/ecosystem/commit/3f7447c3e2
12:58 colomon p6: say ”κόσμε”.ords
12:58 camelia rakudo-moar 9ed89d: OUTPUT: «(954 972 963 956 949)␤»
12:59 colomon returning (92, 88, 50, 92, 48, 51, 66, 65, 49, 70, 55, 57, 48, 51, 67, 51, 48, 51, 66, 67, 48, 51, 66, 53, 92, 88, 48, 92) on my system?!
13:00 colomon oh, never mind
13:01 colomon my real problem is that I’m expected 954,8057,963,956,949 and getting 954,972,963,956,949
13:02 lizmat colomon; perhaps composed vs decomposed ?
13:02 lizmat hmmm...same number of values
13:02 lizmat m: say "ό".ord
13:02 camelia rakudo-moar 9ed89d: OUTPUT: «972␤»
13:02 lizmat .u ό
13:02 yoleaux U+03CC GREEK SMALL LETTER OMICRON WITH TONOS [Ll] (ό)
13:03 lizmat seems correct to me
13:03 colomon m: say 8057.chr
13:03 camelia rakudo-moar 9ed89d: OUTPUT: «ό␤»
13:04 colomon m: say 8057.chr.ords
13:04 camelia rakudo-moar 9ed89d: OUTPUT: «(972)␤»
13:04 colomon that’s what’s tripping me up
13:11 abraxxa joined #perl6
13:14 timotimo m: say uninames(8057, 972)
13:14 camelia rakudo-moar 9ed89d: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Calling uninames(Int, Int) will never work with any of these multi signatures:␤    (Str:D $str)␤at <tmp>:1␤------> 3say 7⏏5uninames(8057, 972)␤»
13:14 timotimo m: say .&uniname for 972, 8057
13:14 camelia rakudo-moar 9ed89d: OUTPUT: «GREEK SMALL LETTER OMICRON WITH TONOS␤GREEK SMALL LETTER OMICRON WITH OXIA␤»
13:14 timotimo is one of those deprecated by unicode or something?
13:15 timotimo like greek questionmark?
13:15 Cabanossi joined #perl6
13:17 timotimo well, no clue if "deprecated" is a word that makes sense for this
13:18 * masak .oO( decoded by unicode ) :P
13:22 pmurias masak: I'm pretty sure nobody tried to optimize the ease of typing 'MONKEY-SEE-NO-EVAL'
13:22 * colomon has just updated his test to accept either answer
13:23 jferrero joined #perl6
13:23 timotimo fileformat.info says DecompositionGREEK SMALL LETTER OMICRON WITH TONOS (U+03CC)
13:23 timotimo for the one with oxia
13:24 timotimo just like greek question mark has decomposition SEMICOLON
13:26 isBEKaml joined #perl6
13:26 isBEKaml .
13:28 masak pmurias: I have to agree on that one
13:30 bjz joined #perl6
13:43 colomon hurm.  why am I getting Seq.new-consumed() in my array?
13:46 colomon m: dd [Any, (Nil, Nil, Nil).Seq].grep(?*)
13:46 camelia rakudo-moar 9ed89d: OUTPUT: «((Nil, Nil, Nil).Seq,).Seq␤»
13:47 masak m: say ?(Nil, Nil, Nil)
13:47 camelia rakudo-moar 9ed89d: OUTPUT: «True␤»
13:48 * masak .oO( omg it's full of Nils )
13:50 colomon I’m still getting tripped up by the 2015 list changes.  is there a blog post somewhere explaining everything?
13:52 colomon I need to be returning an empty Slip?
13:53 tamiya joined #perl6
13:54 masak colomon: what are you trying to do?
13:54 masak m: sub foo { return }; say ?foo
13:54 camelia rakudo-moar 9ed89d: OUTPUT: «False␤»
13:54 masak m: sub foo { return [] }; say ?foo
13:54 camelia rakudo-moar 9ed89d: OUTPUT: «False␤»
13:54 masak m: sub foo { return () }; say ?foo
13:54 camelia rakudo-moar 9ed89d: OUTPUT: «False␤»
13:54 masak m: sub foo { return Slip.new }; say ?foo
13:54 camelia rakudo-moar 9ed89d: OUTPUT: «False␤»
13:54 colomon the ?* was just an attempt to work around things
13:56 colomon recursively analyse a list which may include sublists, filtering out the information I’m looking for.
13:56 colomon used to return Nil and everything was fine
13:57 colomon but now the sublists don’t go away.
13:57 colomon I can probably think of a better way…. hmmm.
13:57 colomon indeed.  less functionaly but it will work
13:58 Skarsnik joined #perl6
13:59 tamiya perl
13:59 tamiya left #perl6
13:59 AlexDaniel perl6
14:01 colomon sorted
14:06 colomon well, my new version appears to have an infinite loop.  :\
14:08 timotimo uh oh
14:08 timotimo when i get that i usually attach gdb, go "up" until i hit a frame that has a "tc", then "call MVM_dump_backtrace(tc)"
14:13 colomon timotimo: interesting.  but I knew about where it was, already tracked down and fixed
14:15 guest947 joined #perl6
14:16 timotimo OK!
14:17 MilkmanDan joined #perl6
14:23 guest947 joined #perl6
14:28 jameslenz joined #perl6
14:40 khw joined #perl6
15:10 winnie__ joined #perl6
15:10 winnie_ joined #perl6
15:11 winnie_ Hi again - do we have a gcc version prerequisite to compile rakudo??
15:15 Cabanossi joined #perl6
15:19 timotimo i don't think so, we develop with -std=c89 after all
15:19 timotimo are you experiencing trouble?
15:20 winnie_ ja in Sailfish it gives a C90 error regarding declaration of unions
15:20 timotimo oh, what file?
15:20 timotimo oh crap
15:21 timotimo it's telemeh.c, isn't it
15:21 winnie_ wait long filename
15:21 winnie_ dyncall_callvm_arm32_arm_armhf.c
15:21 winnie_ its in moarvm in nqp
15:22 timotimo oh
15:22 winnie_ source/rakudo/nqp/MoarVM/3rdparty/dyncall/dyncall/dyncall_callvm_arm32_arm_armhf.c
15:22 timotimo if dyncall is giving you trouble, try using libffi instead
15:23 winnie_ im trying to put the union declaration in the header
15:23 winnie_ ok
15:23 timotimo you can give the Configure.pl a --moar-flags option or something
15:23 davido_ joined #perl6
15:23 astj joined #perl6
15:24 winnie_ let me have a look
15:25 skids joined #perl6
15:27 timotimo hm, what's the right flag for libffi
15:27 timotimo maybe --has-libffi?
15:30 tyil I use a shebang pointing to perl6, should I still use `use v6;`?
15:30 tyil if (yes) { why? }
15:31 El_Che yes
15:31 El_Che v6c or something
15:31 El_Che for when v6d comes out it doesn't break your code
15:32 tyil ah
15:32 tyil thats good to know
15:32 tyil thanks
15:32 tyil I usually see people adding `use v6` without the c
15:33 AlexDaniel tyil: well, the point of adding 「use v6」 is so that it complains if your run it with perl 5
15:33 El_Che ^-- that too
15:33 AlexDaniel which… I don't think is sensible at all
15:33 El_Che ^-- and that as well :)
15:33 tyil I had no issues running my code without the v6, just with a perl6 shebang, so I wondered
15:34 El_Che I think the versioning is a nice touch
15:34 AlexDaniel but the thing is, if you have a shebang and if you use .p6 extension, I can't see how can anybody run it with perl5
15:34 tyil I dont intend to try and load it up in perl 5 manually, but the v6c keeping it working for newer versions is nice
15:34 El_Che AlexDaniel: perl yourscript
15:34 AlexDaniel El_Che: sure, why would you type that? :)
15:35 AlexDaniel perl yourscript.p6 # huh? :)
15:35 El_Che AlexDaniel: I won't. All my colleagues do, however
15:35 AlexDaniel well, then perhaps that's a good practice
15:35 El_Che I tend to leave the extension on unix, mostly
15:35 El_Che becasue I don't care in what lang a program is written
15:35 AlexDaniel sure, but then you rely on shebang…
15:36 AlexDaniel like, we have no protection for people running perl6 scripts with bash
15:36 El_Che also, people use "perl programname" when they don't feel like chmod'ing something
15:36 AlexDaniel tyil: in any case, do what makes sense to you, there are no hard rules for this :)
15:37 El_Che the versioning is best practice
15:37 tyil the v6c makes sense, so I'll apply that
15:37 AlexDaniel even using v6.c to protect yourself from v6.d changes is not that big of a win given that v6.d is mostly additive
15:37 El_Che AlexDaniel: thing are allowed to break, so they will break
15:38 tyil its better to be safe
15:38 tyil in this case
15:38 tyil a good practice to learn
15:38 tyil some change sometime might break something
15:40 El_Che indeed
15:44 winnie_ timotimo: Putting the union declaration in the header didnt help
15:45 winnie_ --moar-option=??
15:45 Cabanossi joined #perl6
15:45 timotimo okay, does --has-libffi work?
15:45 timotimo yeah, you have a perl Configure.pl --gen-moar something something line, right?
15:45 winnie_ ja
15:46 timotimo the --moar-option=--has-libffi flag goes there
15:46 vike joined #perl6
15:46 winnie_ ok I currently ran with --moar-option=has-libffi - let it abort ill try again
15:52 astj joined #perl6
15:55 AlexDaniel While this story may seem completely unrelated to some, I think we can all learn something from it. A local online hardware store has sold me a bunch of items for a price of a unit instead of a price of the pack. Just to name some of the items I bought: a pack of 200 screws for 0.01€ (normally 2.54€ for the pack), 25 meters of aluminium tape for 0.29€ (normally 7.31€, which is 0.29€ per meter), a pack of 5 batteries for 0.64€ (n
15:55 AlexDaniel 3.19€), a set of 4 cheap-ish chisels for 2.85€ (normally 11.40€, so that's a price per chisel), and also a set of 5 screwdrivers for 0.07€ (normally 13.34€, I still have no idea how this one could have happened)
15:55 AlexDaniel in total I received “free” items for about 90€
15:56 kurahaupo joined #perl6
15:56 AlexDaniel so I'm thinking, how hard would it be to implement a feature that would check the price and say “hey, this price per unit seems a bit unrealistic, are you sure you want to continue?”
15:58 kurahaupo_ joined #perl6
15:59 AlexDaniel where “unrealistic” could mean <0.01€ per piece, this would've solved the problem for screws and other small stuff
15:59 [particle] joined #perl6
16:00 AlexDaniel (oops, I mean I received 90€ worth of items for “free”. You get it)
16:12 eater is there a META6.json field for library dependencies?
16:13 dct joined #perl6
16:14 wamba joined #perl6
16:15 Cabanossi joined #perl6
16:17 timotimo you mean like native libraries? we don't have that
16:17 eater :(
16:19 timotimo there's some prior art for grabbing dlls on windows, fwiw
16:19 timotimo GTK::Simple has something, LibSSH has something
16:28 eater wasn't there a lib for it
16:28 eater if there isn't
16:28 eater time to type :")
16:28 * eater builds ALL the things
16:31 timotimo there's LibraryMake
16:31 timotimo that's for when you are distributing the source code and have to compile it at install time
16:32 tyil can I do something like `my $f = "function-name"; $f();`, which will then try to run the sub `function-name`?
16:32 timotimo yeah, you need ::('&function-name') for that
16:32 timotimo or ::($name-in-string)
16:35 tyil its getting me closer
16:35 tyil I have http://termbin.com/tyzn rn
16:36 tyil Im getting a No such symbol 'Controllers::Home.index'
16:36 tyil the get "/b" route works
16:37 timotimo have you tried Hiker yet?
16:37 tyil not yet
16:38 timotimo it has a thing where it loads stuff from folders for you
16:38 timotimo i.e. it prescribes a way to name your stuff and it'll hook it all up for you
16:41 winnie_ timtimo : with libffi after a while of compilation I get a Bus error
16:42 tyil timotimo: if possible I'd like to learn it myself, I want to become more knowledgable on perl 6, though Hiker does look interesting
16:44 timotimo sure
16:45 gfldex tyil: you will have to get hold of the type object and use that to dispatch to the method
16:46 tyil get $route => sub { ::($handler).index(request) };
16:46 gfldex m: class C { method m { say 'oi‽' } }; my $c = ::('C'); $c."m"();
16:46 camelia rakudo-moar 624fe8: OUTPUT: «oi‽␤»
16:46 tyil this one is valid
16:46 pierrot joined #perl6
16:47 tyil ah
16:47 tyil that looks nice, gfldex
16:50 TreyHarris m: my %h{Cool}; %h<3> = 1; %h<a> = 2; %h<2.0> = 3; for %h.kv -> $k, $v { say "$k: $v" }; say %h
16:50 camelia rakudo-moar 624fe8: OUTPUT: «3: 1␤2.0: 3␤a: 2␤Ambiguous call to 'infix:<cmp>'; these signatures all match:␤:(Int:D \a, Rational:D \b)␤:(Str:D \a, Str:D \b --> Order:D)␤  in block <unit> at <tmp> line 1␤␤»
16:50 TreyHarris Is that a bug, or should you not expect a mixed-type like that to be renderable directly?
16:53 TreyHarris (From Haskell, I'm used to this kind of behavior: just because each part of a composite can be shown, and the composite can be shown for each part of homogeneous type, you'll get a nasty error if you try to show that composite with heterogeneous types.)
16:53 domidumont joined #perl6
16:53 timotimo oh, is that because say %h is trying to sort its elements?
16:54 TreyHarris timotimo: yes
16:54 TreyHarris on stringification, Hash sorts its keys
16:54 timotimo well, that's bad :)
16:55 TreyHarris the idea, IIRC is that least surprise was violated when by adding an element the entirety of a hash display could rejumble in a seemingly nondeterministic way
16:55 TreyHarris but .perl probably shouldn't attempt to sort the keys, and it also failes in this case
16:56 TreyHarris m: my %h{Cool}; %h<3> = 1; %h<a> = 2; %h<2.0> = 3; for %h.kv -> $k, $v { say "$k: $v" }; say %h.perl
16:56 camelia rakudo-moar 624fe8: OUTPUT: «3: 1␤2.0: 3␤a: 2␤Ambiguous call to 'infix:<cmp>'; these signatures all match:␤:(Int:D \a, Rational:D \b)␤:(Str:D \a, Str:D \b --> Order:D)␤  in block <unit> at <tmp> line 1␤␤»
16:56 eater :m class A { method B { say "ay"; } }; my $d = ::("A"); my $e = $d.^lookup("B"); $e($d); say $e.perl;
16:56 eater m: class A { method B { say "ay"; } }; my $d = ::("A"); my $e = $d.^lookup("B"); $e($d); say $e.perl;
16:56 camelia rakudo-moar 624fe8: OUTPUT: «ay␤method B (A $: *%_) { #`(Method|51040296) ... }␤»
16:56 TreyHarris I'd think we want to never have .perl raise an exception unless there's absolutely no other option
16:57 TreyHarris m: my %h{Cool}; %h<3> = 1; %h<a> = 2; %h<2.0> = 3; for %h.kv -> $k, $v { say "$k: $v" }; dd %h
16:57 camelia rakudo-moar 624fe8: OUTPUT: «3: 1␤2.0: 3␤a: 2␤Ambiguous call to 'infix:<cmp>'; these signatures all match:␤:(Int:D \a, Rational:D \b)␤:(Str:D \a, Str:D \b --> Order:D)␤  in block <unit> at <tmp> line 1␤␤»
16:57 timotimo yeah, i'd say that's a good stance on .perl
17:00 Cabanossi joined #perl6
17:02 TreyHarris orderability isn't a constraint on hash keys, is it? they just need to uniquely .WHICH
17:02 TreyHarris oh, but we cmp by .WHICH as a last resort, don't we
17:03 timotimo right, we can
17:03 TreyHarris so everything is orderable even if it may be arbitrarily so
17:03 timotimo we can order things by memory location, of course. but we have a moving gc in moarvm, so ordering won't be stable over the lifetime of a hash
17:05 TreyHarris timotimo: can the exception be caught and re-force ordering using infix:<cmp>(Any, Any)?
17:05 timotimo that'd be possible
17:05 TreyHarris I'm having trouble finding where this is implemented in rakudo
17:06 TreyHarris (the stringification of Hash, I mean, not cmp, that I can find)
17:06 MasterDuke_ .gist i believe
17:07 timotimo s: {a => b}, 'gist', \()
17:07 timotimo where'd the bot go?
17:07 timotimo only in -dev
17:08 timotimo https://github.com/rakudo/rakudo/blob/624fe8f/src/core/Hash.pm#L213
17:08 timotimo there's the .sort you're looking for
17:08 timotimo a few lines above that is the .sort for .perl
17:11 TreyHarris what is 'given ++$'? it's used in the same way for Hash, List, and native_array
17:12 kaare_ joined #perl6
17:12 timotimo $ sets up an anonymous state variable
17:12 timotimo and given sets it as the $_ for the scope it scopes over
17:13 TreyHarris right, but the ++?
17:13 timotimo pre-increment
17:13 TreyHarris pre-increment, but why?
17:13 timotimo so that the value changes
17:14 timotimo if you post-increment instead of pre-increment you'll get Any (the type object) the first time
17:14 TreyHarris oh, i see. it's a cursor
17:14 ufobat_ joined #perl6
17:14 timotimo that'll give you a warning about use of undefined value
17:14 timotimo m: for ^10 { say $++ }
17:14 camelia rakudo-moar 624fe8: OUTPUT: «0␤1␤2␤3␤4␤5␤6␤7␤8␤9␤»
17:14 timotimo oh?
17:14 timotimo m: say $
17:14 camelia rakudo-moar 624fe8: OUTPUT: «(Any)␤»
17:15 TreyHarris m: for ^10 { say ++$ }
17:15 camelia rakudo-moar 624fe8: OUTPUT: «1␤2␤3␤4␤5␤6␤7␤8␤9␤10␤»
17:15 TreyHarris it's just easier to index by 1, I think everyone would agree ;-)
17:16 TreyHarris (that's why I asked that part; a post-increment would make more sense to me)
17:18 timotimo m: say (my $a = Any)++
17:18 camelia rakudo-moar 624fe8: OUTPUT: «0␤»
17:18 timotimo so the ++ must be turning what it returns into a number, too
17:18 timotimo i.e. returns not the value before incrementing, but the numified value before incrementing
17:18 TreyHarris timotimo: ah, that makes sense
17:21 John[Lis` joined #perl6
17:21 timotimo that's very helpful
17:35 gfldex m: my $a = Str; say $a++;
17:35 camelia rakudo-moar 624fe8: OUTPUT: «0␤»
17:37 gfldex m: use variables :D; my $a = $;
17:37 camelia rakudo-moar 624fe8: OUTPUT: «Type check failed in assignment to $a; expected type Any:D cannot be itself (perhaps Nil was assigned to a :D which had no default?)␤  in block <unit> at <tmp> line 1␤␤»
17:57 kurahaupo joined #perl6
17:59 labster joined #perl6
17:59 winnie_ joined #perl6
18:00 winnie_ timotimo: The 1G memory requirement you spoke about was for the MoarVM??
18:00 Cabanossi joined #perl6
18:01 MasterDuke_ winnie_: rakudo
18:02 timotimo rakudo has one step that takes a huge amount of memory
18:02 timotimo it's the one that starts with "stage start .... 0.000" or something like that
18:03 MasterDuke_ and i think it's closer to 2g needed
18:03 timotimo could very well be
18:04 SmokeMachine m: say {try 5 == 5}()
18:04 camelia rakudo-moar 624fe8: OUTPUT: «WARNINGS for <tmp>:␤Useless use of "==" in expression "5 == 5" in sink context (line 1)␤True␤»
18:04 SmokeMachine m: say {try {5 == 5}}()
18:04 camelia rakudo-moar 624fe8: OUTPUT: «True␤»
18:07 SmokeMachine m: say {;}()
18:07 camelia rakudo-moar 624fe8: OUTPUT: «Nil␤»
18:07 SmokeMachine m: say {ENTER {5 == 5}}()
18:07 camelia rakudo-moar 624fe8: OUTPUT: «True␤»
18:07 SmokeMachine m: say {ENTER {5 == 6}}()
18:07 camelia rakudo-moar 624fe8: OUTPUT: «False␤»
18:08 SmokeMachine m: say {LEAVE {5 == 5}}()
18:08 camelia rakudo-moar 624fe8: OUTPUT: «WARNINGS for <tmp>:␤Useless use of "==" in expression "5 == 5" in sink context (line 1)␤Nil␤»
18:08 SmokeMachine m: say {LEAVE {say 1}}()
18:08 camelia rakudo-moar 624fe8: OUTPUT: «1␤Nil␤»
18:09 SmokeMachine is the ENTER correct? should it's return be returned by the block?
18:09 SmokeMachine m: say {ENTER {42}}()
18:09 camelia rakudo-moar 624fe8: OUTPUT: «42␤»
18:09 SmokeMachine m: say {LEAVE {5 == 5}}()
18:09 camelia rakudo-moar 624fe8: OUTPUT: «WARNINGS for <tmp>:␤Useless use of "==" in expression "5 == 5" in sink context (line 1)␤Nil␤»
18:09 SmokeMachine m: say {LEAVE 5 == 5}()
18:09 camelia rakudo-moar 624fe8: OUTPUT: «WARNINGS for <tmp>:␤Useless use of "==" in expression "5 == 5" in sink context (line 1)␤Nil␤»
18:10 BenGoldberg joined #perl6
18:10 MilkmanDan joined #perl6
18:11 lucs m: use Test; sub foo { ok(1) }; foo
18:11 camelia rakudo-moar 624fe8: OUTPUT: «ok 1 - ␤»
18:11 lucs m: sub bar { require Test; ok(1) }; bar    # How does 'require' work?
18:11 camelia rakudo-moar 624fe8: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Undeclared routine:␤    ok used at line 1␤␤»
18:12 BenGoldberg m: sub baz { require Test qw(&ok); ok(1) }; baz
18:12 camelia rakudo-moar 624fe8: OUTPUT: «===SORRY!===␤Cannot invoke this object (REPR: Null; VMNull)␤»
18:12 BenGoldberg That's an LTA error message.
18:19 TimToady masak: yes, it was intentionally dehuffmanized, but what we won't tell you is that you can just say "use MONKEY;" to let all the monkeys out of the barrel simultaneously
18:22 TimToady SmokeMachine: any initializing phaser can be used for its value, but finalizing phasers are all called too late to use their value, in the absence of a time machine
18:22 SmokeMachine TimToady: ok, thanks!
18:29 TimToady note, however, that CATCH is in neither of those categories, since it runs before the stack is unwound
18:29 TimToady m: say sub {CATCH {return 22}; die 'oops'}()
18:29 camelia rakudo-moar 624fe8: OUTPUT: «22␤»
18:30 TimToady so you can actually return out of a CATCH
18:30 moritz m: sub () { CATCH { } 5 }()
18:30 camelia rakudo-moar 624fe8: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Strange text after block (missing semicolon or comma?)␤at <tmp>:1␤------> 3sub () { CATCH { }7⏏5 5 }()␤»
18:30 moritz m: sub () { CATCH { }; 5 }()
18:30 camelia rakudo-moar 624fe8: ( no output )
18:30 moritz m: say sub () { CATCH { }; 5 }()
18:30 camelia rakudo-moar 624fe8: OUTPUT: «5␤»
18:30 moritz m: say sub () { 5; CATCH { } }()
18:30 camelia rakudo-moar 624fe8: OUTPUT: «WARNINGS for <tmp>:␤Useless use of constant integer 5 in sink context (line 1)␤Nil␤»
18:30 TimToady yes, we currently force you to use 'return' there
18:31 moritz I wonder if CATCH should be excluded from the normal statement counting
18:31 simcop2387 joined #perl6
18:31 moritz but that might be too much cute thinking
18:31 TimToady I can argue it both ways, so we've done nothing :)
18:32 Geth ¦ ecosystem/feature-add-taglibc: 6ed2fa77a8 | eater++ (committed using GitHub Web editor) | META.list
18:32 Geth ¦ ecosystem/feature-add-taglibc: Add TagLibC
18:32 Geth ¦ ecosystem/feature-add-taglibc: review: https://github.com/perl6/ecosystem/commit/6ed2fa77a8
18:32 moritz yes, understandable
18:33 Geth ¦ ecosystem: the-eater++ created pull request #326: Add TagLibC
18:33 Geth ¦ ecosystem: review: https://github.com/perl6/ecosystem/pull/326
18:42 pierrot joined #perl6
18:43 Geth ¦ ecosystem: aff570fb30 | eater++ (committed by Moritz Lenz) | META.list
18:43 Geth ¦ ecosystem: Add TagLibC
18:43 Geth ¦ ecosystem: review: https://github.com/perl6/ecosystem/commit/aff570fb30
18:44 eater np moritz
18:45 Cabanossi joined #perl6
19:15 masak TimToady: I think all the MONKEYs are a bit wasted on me, is all. maybe there are people who find them hilarious and/or apt.
19:18 masak I realize that if we always just said "be boring but clear", we'd become Python, which is like, the worst :P but still.
19:18 masak sometimes clarity is better than monkeys
19:18 moritz I too feel that EVAL + MONKEY are a bit over the top
19:18 TimToady the serious side of MONKEYs is that it gives a manager something unique to grep for so she can say "don't do that"
19:19 timotimo yeah, "eval is a very dangerous function" really ought to point at "code injection"
19:19 timotimo or something
19:19 TimToady it's not just about cuteness
19:19 masak good
19:19 moritz upper-casing EVAL xor MONKEY woul be good enough, IMHO
19:19 moritz I like upper-case EVAL, fwiw
19:20 TimToady .oO(disputandem non est de gustibus)
19:20 timotimo .o( ghost bus )
19:21 moritz ghost buster!
19:21 SmokeMachine m: say any(42, 42.0).Numeric
19:21 camelia rakudo-moar 7a3a6a: OUTPUT: «Cannot resolve caller Numeric(Int: ); none of these signatures match:␤    (Mu:U \v: *%_)␤  in block <unit> at <tmp> line 1␤␤»
19:22 * masak .oO( MONKEY-NO-ACCOUNTING-FOR-TASTE )
19:32 TEttinger joined #perl6
19:38 zapwai joined #perl6
19:39 TimToady and I'd also seriously contend that monkeys are an apposite metaphor for the ways in which our natural instincts tend to mislead us into poor programming practices
19:40 El_Che TimToady: the problem with metaphors is that not everyone get them
19:41 timotimo the problem with metaphors is that they are too much like ducks
19:41 masak TimToady: if we really cared about making `EVAL` safe in the way the compile-time error intends, then IMO it should not be a function that one can pass around and assign freely
19:42 El_Che TimToady: good with orange sause?
19:42 El_Che I meant timotimo
19:51 TreyHarris From reading the docs, I would think this would be valid way to ask a type what its default value is, but it doesn't work:
19:51 TreyHarris m: sub default-for(Mu:U ::Type) { use variables :D; my Type $v = Type(Nil); $v.perl }; dd default-for(Int)
19:51 camelia rakudo-moar 2bae61: OUTPUT: «X::TypeCheck::Assignment exception produced no message␤  in sub default-for at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
19:52 TreyHarris (I _am_ asking both what the  way to ask that question is, and why my sub doesn't work)
19:54 espadrine joined #perl6
19:59 AlexDaniel masak: how come you need eval so often that you've even decided to write a blog post about it?
20:02 gfldex TreyHarris: your sub doesn't work because you have a type constraint on a type capture.
20:02 pecastro joined #perl6
20:04 TreyHarris m: sub default-for(::Type) { use variables :D; my Type $v = Type(Nil); $v.perl }; dd default-for(Int)
20:04 camelia rakudo-moar 2bae61: OUTPUT: «X::TypeCheck::Assignment exception produced no message␤  in sub default-for at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
20:06 TreyHarris gfldex: Not like that... (Mu:U ::Type) was I thought the correct signature for a required type argument
20:13 TreyHarris gfldex: Sorry, I wasn't trying to argue with you that you're wrong--I'm just trying to understand what the right answer is. I phrased that question as a statement. "(Mu:U ::Type) isn't the correct signature for a required type argument? Then what is?" was what I meant
20:13 gfldex m: sub s(::Type $f!){}; s()
20:13 camelia rakudo-moar 2bae61: OUTPUT: «Too few positionals passed; expected 1 argument but got 0␤  in sub s at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
20:13 gfldex m: sub s(::Type $f!){}; s()
20:13 camelia rakudo-moar 2bae61: OUTPUT: «Too few positionals passed; expected 1 argument but got 0␤  in sub s at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
20:14 gfldex m: sub s(::Type $f!){}; s(1)
20:14 camelia rakudo-moar 2bae61: ( no output )
20:16 pmurias m: my $foo := &EVAL; $foo("say 'Hi'") # Should this require MONKEY-SEE-NO-EVAL?
20:16 camelia rakudo-moar 2bae61: OUTPUT: «Hi␤»
20:17 TreyHarris m: sub is-type(Mu:U ::Type) { say Type.perl }; is-type(Int); is-type(Str); is-type(4)
20:17 camelia rakudo-moar 2bae61: OUTPUT: «Int␤Str␤Parameter '<anon>' requires a type object of type Mu, but an object instance was passed.  Did you forget a 'multi'?␤  in sub is-type at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
20:21 lucs How do I get a module to load for example only when some function is called at runtime?
20:21 lucs My naive, à la Perl 5, usage of 'require' appears not to work like, well, in Perl 5:
20:22 lucs m: sub foo { require Test; ok(1) }; foo
20:22 camelia rakudo-moar 2bae61: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Undeclared routine:␤    ok used at line 1␤␤»
20:22 salv0 joined #perl6
20:22 geekosaur the problem is not the require, it's the compile time checking for ok when you load at runtime
20:23 lucs Yes, makes sense. Is there no way to do like what we can do in Perl 5?
20:25 lucs (not necessairyly using 'require', it's just what appeared natural to me)
20:25 geekosaur well, the require is right, it's the other part I'm not sure how to defeat :/
20:25 lucs Yeah, I saw your earlier attempt :(
20:26 TreyHarris m: constant T = 'Test'; sub foo { use ::(T); ok(1) }; foo
20:26 camelia rakudo-moar 2bae61: OUTPUT: «ok 1 - ␤»
20:26 lucs Hmm...
20:28 lucs So 'use' can happen at runtime, eh.
20:28 lucs m: sub foo { use ::('Test'); ok(1) }; foo
20:28 camelia rakudo-moar 2bae61: OUTPUT: «ok 1 - ␤»
20:29 lucs (if I understand correctly)
20:29 TreyHarris lucs: no, use is still happening at compile time; that's why a constant or a literal worked
20:30 lucs Ah.
20:30 TreyHarris m: my $t = 'Test'; sub foo { use ::($t); ok(1) }; foo
20:30 camelia rakudo-moar 2bae61: OUTPUT: «===SORRY!===␤Name ::($t) is not compile-time known, and can not serve as a ␤»
20:31 lucs So is there no way to load a module conditionally, at runtime?
20:32 gfldex lucs: see https://docs.perl6.org/syntax/require
20:32 lucs gfldex: Yeah, I read that, recognizing most of the words :(
20:35 TreyHarris m: my $t = 'Test'; sub foo { require ::($t) <&ok>; ok(1) }; foo
20:35 camelia rakudo-moar 2bae61: OUTPUT: «ok 1 - ␤»
20:36 lucs TreyHarris: Oh, so that looks like it's loaded at runtime, right?
20:36 TreyHarris lucs: yes
20:37 lucs Ah, but I notice the 'ok' symbol needs to be explicitly mentioned  <&ok>
20:37 lucs (not ideal, eh)
20:38 lucs And I think your example can be simplified to:
20:38 lucs m: sub foo { require ::('Test') <&ok>; ok(1) }; foo
20:38 camelia rakudo-moar 2bae61: OUTPUT: «ok 1 - ␤»
20:38 TreyHarris lucs: there would be no way to compile foo() if that weren't the case. You can use dynamic lookup if you want but that's even wordier
20:39 lucs It makes sense.
20:39 TreyHarris lucs: i wasn't going for simplicity, I was showing that theoretically any module name that had an 'ok' could have been in $t
20:39 lucs Yes, right.
20:39 TreyHarris because I was assuming you wanted runtime loading in order to switch on something, right? is it just to defer the compile-time hit?
20:40 gfldex m: my $name = "Test"; require ::($name); dd ::('Test')::EXPORT::DEFAULT::.keys;
20:40 camelia rakudo-moar 2bae61: OUTPUT: «()␤»
20:40 lucs In my current case, just defer the load until the function is (if ever) invoked.
20:40 zakharyas joined #perl6
20:41 TreyHarris lucs: then mentioning the symbols you need by name doesn't seem that inconvenient
20:41 lucs That's true.
20:41 Geth ¦ ecosystem: the-eater++ created pull request #327: Update TagLibC url
20:41 Geth ¦ ecosystem: review: https://github.com/perl6/ecosystem/pull/327
20:42 lucs TreyHarris: Yeah, that should do it. Thanks.
20:42 astj joined #perl6
20:42 timotimo m: require ::("Test"); say ::("Test::EXPORT::DEFAULT::&ok")
20:42 camelia rakudo-moar 2bae61: OUTPUT: «sub ok (;; Mu | is raw) { #`(Sub|76826344) ... }␤»
20:42 timotimo m: require ::("Test"); say ::("Test::EXPORT::DEFAULT::&ok")(1, "yeah!")
20:42 camelia rakudo-moar 2bae61: OUTPUT: «ok 1 - yeah!␤True␤»
20:42 timotimo depending on how the module is set up you don't have to go through the export package
20:43 timotimo i.e. if it uses "our sub ok" for example
20:43 astj joined #perl6
20:43 timotimo at least i think so
20:43 gfldex m: require ::("Test"); my &ok = ::("Test::EXPORT::DEFAULT::&ok"); ok('oi‽');
20:43 camelia rakudo-moar 2bae61: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Cannot use variable &ok in declaration to initialize itself␤at <tmp>:1␤------> 3); my &ok = ::("Test::EXPORT::DEFAULT::&7⏏5ok"); ok('oi‽');␤    expecting any of:␤        double quotes␤   …»
20:44 gfldex m: require ::("Test"); my &ok = ::("Test::EXPORT::DEFAULT::&ok");
20:44 camelia rakudo-moar 2bae61: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Cannot use variable &ok in declaration to initialize itself␤at <tmp>:1␤------> 3); my &ok = ::("Test::EXPORT::DEFAULT::&7⏏5ok");␤    expecting any of:␤        double quotes␤        term␤»
20:44 gfldex confused rakudo is confused
20:44 gfldex m: require ::("Test"); my &ok = ::("Test::EXPORT::DEFAULT::&ok");
20:44 camelia rakudo-moar 2bae61: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Cannot use variable &ok in declaration to initialize itself␤at <tmp>:1␤------> 3); my &ok = ::("Test::EXPORT::DEFAULT::&7⏏5ok");␤    expecting any of:␤        double quotes␤        term␤»
20:44 gfldex m: require ::("Test"); my &mmk = ::("Test::EXPORT::DEFAULT::&ok"); mmk('oi‽')
20:44 camelia rakudo-moar 2bae61: OUTPUT: «ok 1 - ␤»
20:45 gfldex very confused indeed
20:45 timotimo that's funny
20:45 gfldex it's mindlessly parsing
20:45 timotimo that check isn't very old
20:46 gfldex timotimo: can you rakudobug please?
20:47 gfldex i will go and file the docs issue :)
20:47 timotimo sorry, neck deep in something else now :S
20:51 TreyHarris m: require ::("Test"); my $ok = ::("Test::EXPORT::DEFAULT::&ok"); $ok(1, 'yes')
20:51 camelia rakudo-moar 2bae61: OUTPUT: «ok 1 - yes␤»
20:52 TreyHarris m: require ::("Test") <&ok>; ok(1, 'yes')
20:52 camelia rakudo-moar 2bae61: OUTPUT: «ok 1 - yes␤»
20:52 TreyHarris why is assigning &ok to a local superior?
20:53 timotimo it isn't
20:53 timotimo if you only call it once, it's pretty much the same
20:53 timotimo if you want to call it multiple times, you'd be doing a package lookup each time
20:54 labster joined #perl6
20:55 timotimo gfldex: when i start meta6 with any flags i get Use of uninitialized value $github-user of type Any in string context.
20:55 timotimo (META6::bin) line 80
20:55 timotimo perhaps have to upgrade META6, too. hold on
20:57 timotimo but META6 is failing some tests. i wonder if that's the File::Ignore related thing?
20:57 Geth ¦ ecosystem: 659f9d7f24 | eater++ | META.list
20:57 Geth ¦ ecosystem: Update TagLibC url
20:57 Geth ¦ ecosystem: review: https://github.com/perl6/ecosystem/commit/659f9d7f24
20:57 Geth ¦ ecosystem: 9e19fd3509 | eater++ (committed using GitHub Web editor) | META.list
20:57 Geth ¦ ecosystem: Merge pull request #327 from the-eater/feature-update-taglibc-url
20:57 Geth ¦ ecosystem:
20:57 Geth ¦ ecosystem: Update TagLibC url
20:57 Geth ¦ ecosystem: review: https://github.com/perl6/ecosystem/commit/9e19fd3509
20:59 gfldex timotimo: is your gitconfig at ~/.gitconfig ?
20:59 TreyHarris m: require ::("Test"); our sub ok { ::("Test::EXPORT::DEFAULT::&ok")(|@_) }; ok(1, 'yeah')
20:59 camelia rakudo-moar 2bae61: OUTPUT: «ok 1 - yeah␤»
20:59 TreyHarris lucs: ^ if you need both the module and the sub to be variable
21:01 TreyHarris I don't know how to remove the calling stack since goto sub is gone
21:02 TreyHarris s/remove/replace/
21:02 timotimo it is
21:04 TreyHarris oh? I thought it was removed for .callsame, .callwith, et. al.
21:04 gfldex timotimo: could you run `perl6 -e 'use Git::Config; say git-config<credential><username>'` please?
21:04 samcv crisis semi-averted.
21:05 TreyHarris m: require ::("Test"); our sub ok { goto ::("Test::EXPORT::DEFAULT::&ok")(|@_) }; ok(1, 'yeah')
21:05 camelia rakudo-moar 2bae61: OUTPUT: «ok 1 - yeah␤Cannot resolve caller goto(Bool); none of these signatures match:␤    (Label:D \x --> Nil)␤  in sub ok at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
21:05 samcv fixed 100% of known yesterday/todya bugs in the underlying ops for the case insensitive regex
21:05 samcv so should be good to go for another point release
21:06 samcv ;-)
21:11 lucs TreyHarris: Thanks
21:12 TreyHarris lucs: goto's only implementation I see in rakudo is for Label, so I'm not sure how you turn that into a goto sub equivalent
21:14 timotimo gfldex: (Any)
21:14 ponbiki joined #perl6
21:15 timotimo fwiw, there is no "credential" section in my gitconfig
21:16 TreyHarris lucs: and the Label.goto implementation is just to throw a NYI, so I think effectively it isn't there even if theoretically it isn't "gone"
21:16 ponbiki joined #perl6
21:17 lucs :)
21:19 ilmari joined #perl6
21:19 DrForr Hey, some new faces arond, cool.
21:20 DrForr At least there were :) Anyone awake?
21:20 El_Che DrForr: still using this? http://kurlander.net/DJ/Projects/ComicChat/FromVWG.jpg
21:21 timotimo El_Che: where did you get that idea? :)
21:21 El_Che new faces
21:21 timotimo oh, heh
21:22 DrForr Believe it or not, at one time I knew where the creator hung out :)
21:23 El_Che DrForr: small world
21:23 DrForr I'd still hate to paint it.
21:23 timotimo i used comic chat once, but it was before i had internet, so not much to do with it at all
21:23 eater :')
21:23 eater timotimo: how did you use it then?
21:24 timotimo i wrote text in the input box and selected emotions on the side
21:24 El_Che every generation reinvents irc
21:24 El_Che I wonder if slack/mattermost + giphy is that different
21:25 samcv i think i'm the only person that signs their commits with gpg. at least that i've seen, in rakudo/nqp/moar
21:26 pmurias comic chat seems awesome
21:26 timotimo yeah, i didn't sign any commits so far
21:26 samcv that MS windows thing? or is there a newer thing
21:26 timotimo i don't have a well-honed gpg key any more
21:26 samcv mine signs every commit and aborts otherwise
21:26 timotimo i used to have one with like 50 signatures or something
21:26 samcv hm
21:27 samcv mine doesn't have that many signatures but. i mean it's listed everywhere well
21:27 samcv though there's an issue with me encrypting things. like somehow the signature works but i can't encrypt things becaus ethe encryption part is expired. and i haven't been able to fix that
21:27 timotimo oh, heh.
21:27 timotimo but you don't use your key to encrypt stuff to others
21:28 DrForr Just curious if anyone's done a 'git foo' like setup yet in Perl 6 yet, specifically I'd like to be able to create 'git-foo' binaries that handle validation on their own; exec'ing 'git-foo' from 'git' 'foo' is one way...
21:28 timotimo others use your key to encrypt stuff towards you
21:28 samcv see timotimo https://i.imgur.com/GVU4aRk.png
21:28 samcv err there's something i can't do
21:28 timotimo huh
21:29 timotimo well, there's something i seem to know nothing about :P
21:29 samcv i dunno how to fix...
21:29 El_Che samcv: are you supposed to be able to rollover keys?
21:29 samcv rollover?
21:29 timotimo creating subkeys should be ... easy?
21:29 samcv well i just need to sign the encryption key and have the expiration date change
21:29 samcv but whenever i try to do that, it just has no visible change though probably signs some subkey
21:29 El_Che I don't think that's a good idea
21:29 timotimo i don't think you can actually change the expiration date of any key?
21:30 El_Che at least not with ssl and the like
21:30 timotimo but you can have as many subkeys as you want, i'd expect
21:30 samcv yes you can timotimo
21:30 El_Che you keep the old key to decrypt stuff, by encrypt with the new one
21:30 El_Che I remember doing something like that when I used gpg in my mails
21:31 samcv these are the same subkeys i've always had
21:31 El_Che but that must have been years
21:31 samcv i changed the exiry date to never expire. but for some reason only did it for one subjey
21:31 samcv subkey
21:31 timotimo the key i have on my laptop expired 2017-05-21 ... hold on, that's in the future!
21:31 El_Che funny that I was more paranoid when I didn't know for sure the NSA was reading everyone's mail, than when it git out they did :)
21:32 samcv well paranoia comes from some sense of not knowing for sure
21:32 samcv so that makes sens
21:33 El_Che it's not because you're paranoid that they aren"t after you kind of thing :)
21:34 labster joined #perl6
21:35 bhm joined #perl6
21:35 samcv yay i fixed it!
21:36 samcv it worked this time. maybe newer gpg version idk
21:36 samcv but i did the exact same thing i did before. but this time it worked
21:36 timotimo perfect
21:36 samcv sending to server now
21:37 El_Che samcv: I don't know if it's good practice
21:37 samcv well. if i set an expiry date. then things i sign will expire
21:37 El_Che security wise the sensible thing to do is to rotate keys
21:37 El_Che (stronger ciphers, etc)
21:37 samcv even if the key WAS valid when i signed it
21:37 samcv it still is invalid
21:37 samcv and i don't like that
21:40 samcv hmm hasn't updated yet. maybe will use gpg to push not this gui thing http://keys.gnupg.net/pks/lookup?op=vindex&amp;fingerprint=on&amp;search=0xA68DF012C3881D62
21:40 samcv but as you can see heh signed the first key many times trying to get that other one signed again
21:41 gfldex timotimo: see bottom of https://github.com/gfldex/perl6-meta6-bin#github
21:41 timotimo hm, why is there only one credential section and only one "username" in there?
21:41 timotimo like, what if i have a bitbucket, too?
21:42 gfldex i'm just shelling out to git (for now)
21:42 gfldex and talk to the github api for that matter
21:42 timotimo like, the "credential" thing isn't made up by you, right?
21:42 gfldex no
21:42 timotimo why is it like that? :D
21:43 dct joined #perl6
21:43 gfldex timotimo: see https://git-scm.com/docs/gitcredentials
21:44 timotimo how do i keep b0rking this tool
21:44 gfldex so you may have a [credential "https://timotimo.uber"]
21:44 timotimo meta6 --set-license=Artistic-2.0 --meta6-file-name=META6.json  -  is this wrong?
21:44 El_Che https://pbs.twimg.com/media/C-AQOVNV0AAdQ08.jpg <-- made me laugh
21:45 Cabanossi joined #perl6
21:46 gfldex timotimo: that should work
21:46 timotimo Type META6 does not support associative indexing.  -  in sub MAIN at /home/timo/perl6/install/share/perl6/site/sources/08A003E9585BF4F4FEBD6559AE70DDC410B29DDC (META6::bin) line 216
21:46 gfldex timotimo: no wait, you need to set basedir
21:47 timotimo what kind of value do i set it to?
21:47 gfldex a path without the META6.json part
21:48 timotimo and . isn't valid?
21:48 gfldex it is and the default
21:48 gfldex so is META6.json
21:48 samcv woo 35 license fields fixed so far :) good work everyone https://github.com/perl6/ecosystem/issues/324
21:49 timotimo meta6 --set-license=Artistic-2.0 --base-dir=(pwd) --meta6-file-name=META6.json
21:49 timotimo that's what i have now and it still gives that error
21:49 timotimo when i just "cat META6.json" i get my data
21:49 gfldex let me check
21:51 timotimo let me look what version of META6 i'm running ...
21:51 kyan joined #perl6
21:52 gfldex timotimo: i did send a PR that way a few days ago
21:52 timotimo META6:ver('0.0.11'):auth('github:jonathanstowe')
21:52 timotimo that's a little bit antique, isn't it ...
21:53 timotimo but META6 latest won't pass its tests :<
21:53 * timotimo hits it with a large hammer
21:53 gfldex can't be hard to fix, it's barely doing anything
21:54 timotimo okay, now it sets the license
21:54 timotimo in sub MAIN at /home/timo/perl6/install/share/perl6/site/sources/08A003E9585BF4F4FEBD6559AE70DDC410B29DDC (META6::bin) line 216
21:54 timotimo Use of uninitialized value of type Str in string context.
21:54 timotimo not sure how this one happens
21:59 samcv m: say 'abc' ~~ m:i/bcd/
21:59 camelia rakudo-moar ce41e4: OUTPUT: «False␤»
21:59 samcv m: say 'abc' ~~ m:i/bc/
21:59 camelia rakudo-moar ce41e4: OUTPUT: «「bc」␤»
21:59 samcv very goodly
21:59 samcv m: say 'st' ~~ m:i/sta/
21:59 camelia rakudo-moar ce41e4: OUTPUT: «False␤»
22:00 samcv m: say 'stb' ~~ m:i/sta/
22:00 camelia rakudo-moar ce41e4: OUTPUT: «False␤»
22:00 samcv good good good
22:01 timotimo oh, META6's example my-meta.pl has license as "Artistic", but the license field in the META6.json as well as LICENSE is Artistic-2.0
22:01 nadim joined #perl6
22:01 samcv where is this example
22:01 samcv oh. the repo?
22:01 timotimo yeah examples/my-meta.pl
22:01 samcv yep
22:02 timotimo https://github.com/jonathanstowe/META6/blob/master/example/my-meta.pl
22:03 samcv yep
22:04 samcv looks like the only PR jonathanstowe accepted was to META for the META6.json file. but reject for all the other ones
22:04 samcv i forgot about that he did merge the META change
22:18 gfldex timotimo: META6 itself is fine, seams to come from JSON::Marshall
22:24 ggoebel joined #perl6
22:24 bjz joined #perl6
22:30 gfldex m: say so "foo" cmp Any;
22:30 camelia rakudo-moar ce41e4: OUTPUT: «Use of uninitialized value of type Any in string context.␤Methods .^name, .perl, .gist, or .say can be used to stringify it to something meaningful.␤  in block <unit> at <tmp> line 1␤True␤»
22:30 gfldex timotimo: that's where that warning comes from
22:32 imcsk8 joined #perl6
22:33 timotimo oh, interesting
22:35 gfldex m: say so "foo" eq Any;
22:35 camelia rakudo-moar ce41e4: OUTPUT: «Use of uninitialized value of type Any in string context.␤Methods .^name, .perl, .gist, or .say can be used to stringify it to something meaningful.␤  in block <unit> at <tmp> line 1␤False␤»
22:48 gdonald joined #perl6
22:56 eater how do I unpack an hash e.g. in an argument list
22:56 eater so I can full fill a slurpy argument?
22:57 timotimo you'll put a | in front of the %foo
22:57 eater timotimo: <3
22:57 eater thanks
23:13 Ven joined #perl6
23:45 Cabanossi joined #perl6
23:52 labster joined #perl6

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

Perl 6 | Reference Documentation | Rakudo