»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
Set by moritz on 22 December 2015.
samcv TreyHarris, support is now in mi6 \o/ 00:00
AlexDaniel … junctions? …
00:00 kurahaupo left
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:00
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:02
so, it's not an array of hash variables, just an array of hashes 00:03
TreyHarris sorry, that's what I meant, but like this: 00:05
m: my %h = (:1st, :2nd); my %j = (:3rd, :4th); my @a = (%h, %j); say @a.contains({:1st, :2nd})
camelia True
TreyHarris m: my %h = (:1st, :2nd); my %j = (:3rd, :4th); my @a = (%h, %j); say @a.contains({:1st,})
camelia True
TreyHarris m: my %h = (:1st, :2nd); my %j = (:3rd, :4th); my @a = (%h, %j); say @a.contains({:6th,}) 00:06
camelia False
TreyHarris is that the behavior you want?
iyra: or check for the entire hash?
iyra yes, that seems to be what I want 00:08
thanks
I'll give it a go
TreyHarris iyra: fyi, the "{'year':2014, 'month':9} syntax is incorrect 00:10
iyra oh
for a hash?
TreyHarris yes--you want {:year(2014)} or { year => 2014 }
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?
TreyHarris for hash assignment
00:12 espadrine left
iyra i thought the parens were lists :D 00:12
TreyHarris iyra: of course. but you can't use the syntactic sugar as easily.
Geth doc: 1d656857c9 | (Zoffix Znet)++ | 4 files
Make `make xtest` pass
00:14
TreyHarris m: my %h = ('a key' => 2000, :nother-key(3)); say %h<nother-key>; say %h<a key>; say %h{'a key'}
camelia 3
((Any) (Any))
2000
TreyHarris iyra: do you understand the camelia output above? 00:15
iyra yes
okay, that makes sense
00:16 mcmillhj joined
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:16
iyra what should be used instead to test hash presence in a list? 00:17
MasterDuke_ grep or first probably 00:18
~~ might work also
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')
camelia Array @a = ["a", "b", "c"]
True
MasterDuke_ m: my @a = <a b c>; dd @a; say 'a b' ~~ @a; say 'a' ~~ @a 00:20
camelia Array @a = ["a", "b", "c"]
False
False
00:21 kurahaupo joined
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
m: my %h = (:1st, :2nd); my %j = (:3rd, :4th); my @a = (%h, %j); say @a.grep({ $_ === %h }) 00:24
camelia ({nd => 2, st => 1})
TreyHarris like that
MasterDuke_ hm, i'm not thinking all that quickly. let me see 00:25
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:26
iyra I think i'll go with grep, because it seemed to work in a test case I did, but thanks 00:27
TreyHarris m: my %h = (:1st, :2nd); my %j = (:3rd, :4th); my @a = (%h, %j); say @a.first({ $_<th>:exists }) 00:30
camelia {rd => 3, th => 4}
samcv help
m: say ('.travis.aaayml', 'LICENSE').grep(/ LICENSE/)
camelia (LICENSE)
samcv m: say ('.travis.aaayml', 'LICENSE').grep(/:i LICENSE/) 00:31
camelia (.travis.aaayml LICENSE)
samcv why does this happen?
m: say ('.travis.aaayml', 'LICENSE').grep(m:i/ LICENSE/)
camelia 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 mcmillhj left
samcv m: say ('.travis.aaayml', 'LICENSE').grep({$_ ~~ m:i/ LICENSE/}) 00:31
camelia (.travis.aaayml LICENSE)
samcv :(
i'm confused
TreyHarris what does say return?
multi method say(--> Bool:D) 00:32
oh, there's a space there, sorry 00:33
samcv: you want 'rx', not 'm' 00:34
to pass the regex to grep rather than pass the result of matching $_ against it 00:35
m: say ('.travis.aaayml', 'LICENSE').grep(rx:i/ LICENSE/) 00:36
camelia (.travis.aaayml LICENSE)
TreyHarris uh... that's not what I get 00:37
m: my @a = ('.travis.aaayml', 'LICENSE').grep(rx:i/ LICENSE/); @a.say 00:38
camelia [.travis.aaayml LICENSE]
TreyHarris I'm getting just LICENSE on my perl6 install 00:39
samcv bisectable6, say ('.travis.aaayml', 'LICENSE').grep(rx:i/ LICENSE/)
bisectable6, help
TreyHarris, what version do you have for `perl6 --version` 00:40
TreyHarris This is Rakudo version 2017.03-123-gcb27bce built on MoarVM version 2017.03-87-g5d73bf4 00:41
implementing Perl 6.c. 00:42
looks like bisectable6 wants you to use a colon, not a comma.... and it just died anyway :)
samcv hm
great :)
evalable6, say ('.travis.aaayml', 'LICENSE').grep(rx:i/ LICENSE/)
evalable6: say ('.travis.aaayml', 'LICENSE').grep(rx:i/ LICENSE/)
committable6: help 00:43
committable6 samcv, Like this: committable6: f583f22,HEAD say ‘hello’; say ‘world’ # See wiki for more examples: github.com/perl6/whateverable/wiki/Committable
samcv committable6: evalable6: say ('.travis.aaayml', 'LICENSE').grep(rx:i/ LICENSE/)
committable6 samcv, ¦evalable6:: «Cannot find this revision (did you mean “6a86a67”?)»
samcv err.
iyra what's a good way to access the 'year' element of this list? List $month = $(:year(2017), :month(2))
TreyHarris m: say ('.travis.aaayml', 'LICENSE').grep(rx:i/ nothing/)
camelia ()
samcv committable6, 2017.02.HEAD say ('.travis.aaayml', 'LICENSE').grep(rx:i/ LICENSE/)
committable6 samcv, ¦2017.02.HEAD: «Cannot find this revision (did you mean “2017.04.2”?)»
TreyHarris m: say ('.travis.aaayml', 'LICENSE').grep(rx:i/ aaa/)
camelia (.travis.aaayml)
TreyHarris m: say ('.travis.aaayml', 'LICENSE').grep(rx:i/ license/)
camelia (.travis.aaayml LICENSE)
samcv committable6, HEAD say ('.travis.aaayml', 'LICENSE').grep(rx:i/ LICENSE/)
AlexDaniel, help 00:44
AlexDaniel релло :)
hello*
samcv bisectable is dead :( 00:45
00:45 bisectable6 joined, ChanServ sets mode: +v bisectable6
TreyHarris samcv: ask and ye shall receive 00:46
samcv bisectable6: say ('.travis.aaayml', 'LICENSE').grep(rx:i/ LICENSE/)
bisectable6 samcv, No build for revision “HEAD”
AlexDaniel samcv: three minutes please :)
samcv ok :)
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?
AlexDaniel I don't think there was this problem before
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);
TreyHarris iyra: put braces around the anonymous hash, not parens 00:51
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
AlexDaniel, bisect log: gist.github.com/b5768f8133ff9fb69e...f49db11471
AlexDaniel, (2017-04-14) github.com/rakudo/rakudo/commit/82...75f0bf0f7e
AlexDaniel samcv: actually, no reason to wait ↑
samcv hmm
m: say ".travis.aaayml' ~~ m:i/LICENSE/ 00:53
camelia 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…
samcv m: say ".travis.aaayml" ~~ m:i/LICENSE/
camelia 「l」
samcv m: say so ".travis.aaayml" ~~ m:i/LICENSE/
camelia True
iyra TreyHarris, thanks
samcv wtf
ahh
AlexDaniel :o
samcv how this happen. and tests not catch it in roast? 00:54
00:54 grumble joined
AlexDaniel this… looks very broken 00:54
samcv m: say so ".travis.aaayml" ~~ m:i/LICENS/
camelia True
AlexDaniel /o\
samcv somethings but not others
m: say so ".travis.aaayml" ~~ m:i/LICEN/
camelia True
samcv m: say so ".travis.aaayml" ~~ m:i/LICE/
camelia True
samcv idk what it's doing...
AlexDaniel e: say 42
evalable6 No build for 9ed89d947. Not sure how this happened!
AlexDaniel haha XD 00:55
samcv m: say so ".travis.aaayml" ~~ m:i/eeeeeeee/
camelia False
samcv m: say so ".travis.aaayml" ~~ m:i/eeeeee/
camelia False
samcv m: say so ".travis.aaayml" ~~ m:i/eeeeeeb
camelia 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…
samcv m: say so ".travis.aaayml" ~~ m:i/eeeeeeb/
camelia False
samcv m: say so ".travis.aaayml" ~~ m:i/eeeb/
camelia False
samcv m: say so ".travis.aaayml" ~~ m:i/license/
camelia True
samcv m: say so ".travis.aaayml" ~~ m:i/licensee/
camelia True
samcv m: say so ".travis.aaayml" ~~ m:i/licenseee/
camelia True
samcv m: say so ".travis.aaayml" ~~ m:i/licenseeee/
camelia True
samcv hmm... really.
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
camelia (2 2 12)
samcv this is super odd
m: say so ".travis.aaayml" ~~ m:i/alicenseeee/
camelia False
samcv m: say so ".travis.aaayml" ~~ m:i/licenseeee/
camelia True
samcv m: say so "travis.aaayml" ~~ m:i/licenseeee/
camelia True
samcv m: say so ".travis.aaayml" ~~ m:i/licenseeee/ 00:56
camelia True
samcv m: say so ".travis.aaayml" ~~ m:i/iicenseeee/
camelia False
samcv only with the letter l?
samcv dies
m: for 'a'..'z' { say so ".travis.aaayml" ~~ m:i/ $_ 'icenseeee'/ } 00:57
camelia 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
samcv m: for 'a'..'z' { my $string = "$_" ~ "icense"; say so ".travis.aaayml" ~~ m:i/$string/ }
camelia 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
samcv m: use MONKEY; for 'a'..'z' { my $string = "$_" ~ "icense"; EVAL qq 'say so ".travis.aaayml" ~~ m:i/$string/' } 00:58
camelia 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
samcv o.O
TreyHarris m: say so ".travis.aaayml" ~~ m:i/license/ 00:59
camelia True
TreyHarris m: say so ".travis.aaayml" ~~ m:i/licens/
camelia True
TreyHarris m: say so ".travis.aaayml" ~~ m:i/lic/
camelia True
TreyHarris m: say so ".travis.aaayml" ~~ m:i/li/ 01:00
camelia True
TreyHarris m: say so ".travis.aaayml" ~~ m:i/yay/
camelia False
TreyHarris m: say so ".travis.aaaym" ~~ m:i/license/
camelia False
TreyHarris m: say so ".travis.aaaym" ~~ m:i/mule/
camelia True
TreyHarris m: say so ".travis.aaaymX" ~~ m:i/mule/
camelia False
TreyHarris m: say so ".travis.aaaymX" ~~ m:i/xray/
camelia True
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/' } }
iyra it would be nice if this returned true... 01:01
m: my @m; @m.push: {year=>2017, month=>4}; say so @m.grep({year=>2017, month=>4});
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/' } }
camelia (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…
False
l
l
l
l
l
l
l
l
l
l
TreyHarris samcv: last character on left matches anything starting with that on right
samcv it only is wrong for the letter l
TreyHarris m: say so ".travis.aaaymX" ~~ m:i/xray/ 01:02
camelia True
samcv oh
TreyHarris that's right?
samcv no
TreyHarris looks wrong to me
samcv yeah
TreyHarris m: say so ".travis.aaaymn" ~~ m:i/nono/
camelia True
01:02 mcmillhj left
samcv ok i see 01:02
last on left matches 1st on right 01:03
m: "abc" ~~ m:i/caaaaa/
camelia ( no output )
samcv m: say "abc" ~~ m:i/caaaaa/
camelia 「c」
samcv ok at least we know what's causing it
m: say "ab" ~~ m:i/aa/ 01:04
camelia False
samcv m: say "ab" ~~ m:i/ba/
camelia 「b」
01:04 kurahaupo left
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
camelia True
iyra ugexe, thanks a lot! 01:07
01:13 mcmillhj joined, astj joined 01:14 devmikey left, bjz joined
AlexDaniel e: say 42 01:17
evalable6 42
AlexDaniel \o/
took 3 attempts to get it right… :S
01:18 mcmillhj left, astj left
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
camelia False
TreyHarris why?
eater m: class B { method A { say "f"; } }; my $d = "A"; my $b = B.new; $b.($d)();
camelia No such method 'CALL-ME' for invocant of type 'B'
in block <unit> at <tmp> line 1
eater how do I get this to work?
u-ou wow, Grammar::Debugger is nice 01:20
01:20 aborazmeh joined, aborazmeh left, aborazmeh joined
TreyHarris m: my $m = {:year(2000), :month(2)}.Map; say $m.WHICH 01:21
camelia Map|Str|month(2) Str|year(2000)
geekosaur m: class B { method A { say "f"; } }; my $d = "A"; my $b = B.new; $b."$d"();
camelia f
eater geekosaur: oh
thanks
TreyHarris shouldn't that make $m ~~ $m True?
geekosaur there's also ::($x) but this form is optimized iirc
eater geekosaur: this being? 01:22
geekosaur the ."$x" form
TreyHarris being an immutable container, I thought that's how Map was supposed to work
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:25
01:25 labster left
TreyHarris two identical maps do not cmp or smartmatch. 01:26
they do cmp. they don't smartmatch, so they don't grep or first
01:29 Zoffix joined, mcmillhj joined
Zoffix TreyHarris: the $m ~~ $m thing, yeah, should be true. Right not it's checking for key $m in $m 01:29
s/not/now/;
It's in my TODO list to fix.
TreyHarris ok 01:30
01:31 sufrostico left
eater Zoffix: are you able to turn on Travis CI for perl6/ecosystem? 01:31
Zoffix eater: shows it as On already 01:32
01:33 mcmillhj left
Zoffix eater: I see no .travis file in master 01:34
Geth ecosystem: 09dc1056b6 | eater++ (committed by Zoffix Znet) | 2 files
Add travis tests for newly added packages (#323)

  * Add travis tests for newly added packages
  * Travis: add comment explaining why we are skipping certain lines
  * disable building on branch update, use @zoffixznet's code
eater Zoffix: hmmm, didn't show on for me in travis
maybe someone else did it 01:35
thanks anywa
01:35 Cabanossi left
samcv ok at least i've figuredd out the case insensitive bug happens in the indexic op 01:35
but i know how to fix it
01:36 Cabanossi joined
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
Add Travis badge
eater Zoffix: it only builds PRs? so how would a badge help? :') 01:37
Zoffix eater: oh.
samcv this is a really bad bug though :(
Zoffix Well, badge would help look at result?
samcv we already did a point release rigth ;)
eater I mean I could make it test every package on branch update 01:38
Zoffix Still says no builds... travis-ci.org/perl6/ecosystem
01:38 Ben_Goldberg joined
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 BenGoldberg left, Ben_Goldberg is now known as BenGoldberg
eater Zoffix: ye, if you open a 01:38
PR with a new package is should do a thing\
Geth ecosystem/zoffixznet-patch-1: 96707c7b46 | (Zoffix Znet)++ (committed using GitHub Web editor) | META.list
use modern META name
01:40
ecosystem: zoffixznet++ created pull request #325:
use modern META name
Zoffix cool, it's doing things 01:41
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:42
01:42 Zoffix is now known as mst
mst I choose to code Perl 6 only from now on and will contribute to core code a lot! 01:43
01:43 mst is now known as Zoffix
Zoffix tehe 01:43
eater Zoffix: hmm the only question is then how to notify people about it?
01:44 Ben_Goldberg joined
Zoffix eater: how will it notify now? We just wait for travis to complete before merging? 01:44
01:44 BenGoldberg left, Ben_Goldberg is now known as BenGoldberg
eater ye, but I can understand that's too slow :') 01:44
01:45 mcmillhj joined
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:45
u-ou mst: no more perl 5?
mst ah, it was zoffix being a twit
Zoffix :) 01:46
u-ou ;o
mst sadly he changed nick back again shortly before the ghost landed
Zoffix hehe
eater Zoffix: ye, hmmm.. I'll look into what I can do to fix that 01:47
01:48 ilbot3 joined, ChanServ sets mode: +v ilbot3, Ben_Goldberg joined, BenGoldberg left, Ben_Goldberg is now known as BenGoldberg
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:48
eater post-merge? 01:49
Zoffix Yeah
Or open an Issue on the failing module
eater why not directly comment?
Zoffix eater: or that, if it's possible
01:50 mcmillhj left
eater well your package is all fine :> 01:50
Zoffix: will look into it tomorrow
but its 4AM, now so I geuss Im gonna get some sleep first :')
Zoffix
.oO( or have some bot auto-merge after it passes or something )
eater isn't there an option, merge after succesful build? 01:51
Zoffix No idea
If there is, that'd be sweet
eater chrisdown.name/2015/09/27/auto-mer...is-ci.html
that would automate the whole thing
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
samcv ok hopefully i fixed that nasty regex bug.... 01:53
running spectest now
Geth ecosystem: 0e0a9af96a | (Zoffix Znet)++ (committed using GitHub Web editor) | META.list
use modern META name (#325)
samcv so we have two point releases already... hmm 01:54
who's up for another :)
02:00 labster joined, mcmillhj joined 02:01 ufobat_ left 02:05 mcmillhj left 02:06 noganex joined 02:10 bjz left
MasterDuke_ m: my @a = {:1a, :2b}, {:3c, :4d}, {:5e, :6f}; say so @a.first(* eqv {:3c, :4d}) 02:10
camelia True
02:11 labster left, iyra left
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
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
though not sure how to do the second one.
02:13 labster joined
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
and not return 'sta'
so looks like i'm having to deal with this at least partially to fix this bug 02:15
02:16 mcmillhj joined
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
a list of anonymous hashes is a p5ism that doesn't seem as useful in Perl 6
02:21 mcmillhj left
MasterDuke_ could be. but the result of a from-json would likely have a list of hashes you might want to search 02:25
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:26
02:28 Xliff joined
Xliff \o 02:28
m: my @a = qw<1 2 3 a 5 6>; @a.grep(Int).say 02:29
camelia ()
Xliff m: my @a = qw<1 2 3 a 5 6>; @a.grep({ Int }).say
camelia ()
Xliff m: my @a = qw<1 2 3 a 5 6>; @a.grep({ * ~~ Int }).say
camelia 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({ *…
Xliff m: my @a = qw<1 2 3 a 5 6>; @a.grep( * ~~ Int ).say
camelia ()
Xliff :(
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
camelia ()
[]
Xliff m: my @a = qw<1 2 3 a 5 6>; say @a; 02:31
camelia [1 2 3 a 5 6]
Xliff rut roh
m: my @a = (1, 2, 3, 'a', 5, 6); say @a;
camelia [1 2 3 a 5 6]
Xliff Hrm.
docs.perl6.org/routine/grep <-- implies that should work. 02:32
m: say ('hello', 1, 22/7, 42, 'world').grep: Int;
camelia (1 42)
02:32 mcmillhj joined
Xliff Aaand... it does! 02:32
m: my @a = (1, 2, 3, 'a', 5, 6); say @a[0].WHAT;
camelia (Int)
Xliff m: my @a = (1, 2, 3, 'a', 5, 6); say @a[0].NAME; 02:33
camelia No such method 'NAME' for invocant of type 'Int'
in block <unit> at <tmp> line 1
Xliff m: my @a = (1, 2, 3, 'a', 5, 6); say @a[0].^name;
camelia Int
MasterDuke_ m: my @a = qw<1 2 3 a 5 6>; @a.grep( { $_ ~~ IntStr } ).say
camelia ()
MasterDuke_ m: my @a = <1 2 3 a 5 6>; @a.grep( * ~~ IntStr ).say
camelia (1 2 3 5 6)
Xliff m: say (1, 2, 3, 'a', 5 6).grep: Int; 02:34
camelia 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…
Xliff m: say (1, 2, 3, 'a', 5, 6).grep: Int;
camelia (1 2 3 5 6)
Xliff So that works. But when assigning to an array, it doesn't?
m: say (1, 2, 3, 'a', 5, 6).grep(Int);
camelia (1 2 3 5 6)
Xliff m: my @a = qw<1 2 3 a 5 6>; say @a.list.grep(Int) 02:35
camelia ()
Xliff m: my @a = qw<1 2 3 a 5 6>; say @a.list.grep: Int
camelia ()
Xliff m: say (1, 2, 3, 'a', 5, 6).grep(Str);
camelia (a)
Xliff m: say (1, 2, 3, 'a', 5, 6).grep(Cool);
camelia (1 2 3 a 5 6)
Xliff m: say (1, 2, 3, 'a', 5, 6).grep(Rat);
camelia ()
Xliff ?!?
m: say (1, 2, 3, 'a', 5, 6).grep(Num);
camelia ()
02:35 Cabanossi left
Xliff m: say (1, 2, 3, 'a', 5, 6).grep(IntStr); 02:36
camelia ()
02:36 Cabanossi joined
Xliff m: say (1, 2, 3, 'a', 5, 6).grep(* ~~ IntStr); 02:36
camelia ()
MasterDuke_ m: my @a = <1 2 3 a 5 6>; say @a.list.map( { $_.WHAT } )
camelia ((IntStr) (IntStr) (IntStr) (Str) (IntStr) (IntStr))
MasterDuke_ m: my @a = qw<1 2 3 a 5 6>; say @a.list.map( { $_.WHAT } )
camelia ((Str) (Str) (Str) (Str) (Str) (Str))
02:36 mcmillhj left
Xliff OK. IntStr coz use of q/qq 02:37
So this is actually not what I really want to test.
m: my %a = { 1 => 1, 2 => 2, 3 => 3, 'a' => 4 }; %a.keys.say 02:38
camelia 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)
Xliff m: my %a = ( 1 => 1, 2 => 2, 3 => 3, 'a' => 4 ); %a.keys.say
camelia (a 1 3 2)
Xliff m: my %a = ( 1 => 1, 2 => 2, 3 => 3, 'a' => 4 ); %a.keys.grep(Int).say
camelia ()
Xliff m: my %a = ( 1 => 1, 2 => 2, 3 => 3, 'a' => 4 ); %a.keys.grep(IntStr).say
camelia ()
Xliff m: my %a = ( 1 => 1, 2 => 2, 3 => 3, 'a' => 4 ); %a.keys.map({ $_.WHAT }).say 02:39
camelia ((Str) (Str) (Str) (Str))
Xliff m: my %a = ( 1 => 1, 2 => 2, 3 => 3); %a.keys.map({ $_.WHAT }).say
camelia ((Str) (Str) (Str))
Xliff O_o
So all hash keys are Str?!
MasterDuke_ yeah, unless you specify a typed hash 02:40
Xliff *Isigh*
Good to know. Thanks.
So I know what I need now.
02:43 BenGoldberg left
geekosaur "object hash" is the magic phrase you're looking for 02:44
02:48 mcmillhj joined 02:52 mcmillhj left
Xliff Thanks, geekosaur 02:53
m: say "0.00" <=> "0.01"
camelia Less
Xliff m: say "0.01" <=> "0.00"
camelia More
Xliff m: say "0.01".val <=> "0.012".val
camelia No such method 'val' for invocant of type 'Str'
in block <unit> at <tmp> line 1
Xliff m: say "0.01".Num 02:55
camelia 0.01
geekosaur I think you don't need to convert there because <=> does it (leg is the string version) 02:57
03:12 poohman joined
poohman t 03:13
p6:say 3 03:14
p6:say 3;
MasterDuke_ poohman: need a space after the :
poohman thanks
p6: say 3; 03:15
camelia 3
03:15 bjz joined
poohman Masterduke -Thanks, been awhile since I was here 03:15
MasterDuke_ np 03:16
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
03:18 raschipi joined 03:19 mcmillhj joined 03:20 dj_goku joined
TreyHarris m: my %h{Cool}; %h<3> = 1; %h<a> = 2; say %h.perl; %h<3.1> = 3; say %h.perl 03:23
camelia (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
TreyHarris is that a bug?
03:24 mcmillhj left
TreyHarris I get the same thing when I use a typed hash with any supertype and use keys from two different subtypes 03:24
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 3: 1
2.0: 3
a: 2
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 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
MasterDuke_ poohman: don't know anything about gtk::simple or nativecall. might want to ask jnthn or timotimo when they're around 03:29
03:31 bjz left
poohman MasterDuke: ok thanks 03:31
03:32 BenGoldberg joined 03:33 MilkmanDan joined 03:44 Cabanossi left 03:45 Cabanossi joined 03:51 drrho_ joined 03:52 isBEKaml joined
isBEKaml OHHAI, can I not use HEAD builds for MoarVm with NQP anymore now? I is sad :-( 03:53
03:58 BenGoldberg left
TreyHarris what is the correct syntax for plan :skip-all? 04:00
m: use Test; plan :skip-all;
camelia 1..0 # Skipped: True
TreyHarris that seems nice, but it doesn't work when run via mi6, I get a signature error: 04:01
Cannot resolve caller plan(:skip-all); none of these signatures match: 04:02
($number_of_tests)
in block <unit> at t/ps-example.t line 4
04:03 raschipi left
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
TreyHarris, bisect log: gist.github.com/ff3c55d12ad71472cc...a9bc437f89
TreyHarris, (2017-04-05) github.com/rakudo/rakudo/commit/14...4391fe6617
TreyHarris ah, it wasn't implemented yet in rakudo yet. 04:05
04:12 krshn joined 04:28 Cabanossi left 04:29 isBEKaml left 04:30 Cabanossi joined 04:35 astj joined 04:40 astj left 04:47 aborazmeh left 04:52 Actualeyes joined 04:54 Actualeyes left 05:12 kurahaupo joined 05:13 Cabanossi left 05:15 Cabanossi joined 05:28 kurahaupo left 05:45 kurahaupo joined, kurahaupo_ joined 05:49 kurahaupo left, kurahaupo joined 05:52 kurahaupo_ left 05:54 kurahaupo left 05:56 wamba joined
samcv bug has been fixed in PR here. if anyone wants to take a look github.com/MoarVM/MoarVM/pull/586 06:07
detailed explanation for bug and fix in PR body
06:08 nadim joined 06:13 CIAvash joined
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:15
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
but that presents the problem of that an empty string is supposed to be found in every string.
and that would be a match of 0 codepoints... so is the kicker 06:17
06:19 gdonald left 06:20 gdonald joined 06:28 Cabanossi left 06:30 Cabanossi joined
u-ou hi 06:32
samcv hi u-ou
06:34 wamba left
samcv looks like travis ci is switching to dist: trusty on april 29th or something 06:41
which is when ubuntu EOL's updates on it or something
actually wait. i'm not sure... what it actually means 06:42
blog.travis-ci.com/2017-04-17-precise-EOL looks like change in q3? though
maybe they're just warning you it's EOLing
06:44 sena_kun joined
sena_kun 06:44
yoleaux 21 Apr 2017 19:41Z <TimToady> sena_kun: File::Ignore is working again
21 Apr 2017 20:46Z <samcv> sena_kun: thanks!
07:13 Cabanossi left 07:15 domidumont joined, Cabanossi joined 07:20 domidumont left 07:21 domidumont joined 07:26 rindolf joined 07:36 darutoko joined, winnie_ joined
winnie_ p6 : say 1; 07:37
07:38 winnie_ left
sena_kun p6: say 1; 07:39
camelia 1
nadim Morning! can one have a man page installed when installing with zef?
07:40 bjz joined 07:41 poohman left
samcv i don't think that's an option currently but if somebody wanted to add it. 07:41
u-ou is there a way to say the type List of Str? 07:42
like in a returns statement
samcv the type List?
of Str. what does that mean
u-ou I guess there's only one type of List
nvm 07:43
sena_kun [Str], [Int], I can guess.
samcv well. there are for nqp
m: "blah".^attributes.say 07:45
camelia (str $!value)
samcv m: ('blah','blah').^attributes.say 07:46
camelia (Mu $!reified Mu $!todo)
07:50 winnie_ joined 07:51 poohman joined
poohman test 07:51
winnie_ p6: say 1; 07:52
camelia 1
07:52 parv joined
winnie_ p6: say (10+1/6 +5); 07:52
camelia 15.166667
07:55 isBEKaml joined 07:57 isBEKaml left
moritz \o 08:01
08:02 TEttinger left
moritz timotimo: fwiw the automatic update of perl6-all-modules seems to work now 08:03
08:06 cpage_ joined 08:08 krshn left 08:15 domidumont left 08:16 domidumont joined 08:26 ufobat_ joined
u-ou sleepy 08:41
samcv moritz, nice 08:43
08:46 skids left 08:53 robertle joined
timotimo moritz: very cool! 09:11
u-ou do you guys write code when you're sleepy 09:13
samcv yes 09:14
source: am sleeping. am coding
u-ou lol 09:15
timotimo i am actually a sleep
u-ou i sleep for about 12 hours a night
09:18 labster left
samcv err i meant to say "am sleepy" oh well. 09:20
proof i'm sleepy there you go
u-ou hee 09:22
hehe
timotimo "beep beep i'm a sleep" 09:27
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:41
Any idea as to where I could have botched it up?? 09:44
u-ou you need to install libgtk 09:45
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
so you'll need to install those, too, poohman
09:46 John[Lisbeth] joined
John[Lisbeth] he he he so I hear there is a new kid on the block with dem good macros 09:46
you know dem good macros namsayin
why a person so inclined could do whatever they'd like in a language with fully extensible macros 09:47
09:47 dct joined
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:48
but slangs are more powerful than macros 09:49
09:49 jferrero joined
poohman I installed libgtk but no devel packages - will try - thanks 09:49
09:55 dct left
poohman cool worked with wayland 09:55
thanks
09:59 dct joined 10:01 pmurias joined
timotimo nice 10:01
10:06 parv left
poohman has anybody ported perl6 to sailfishos?? 10:07
timotimo that's one of the smartphone OSes, right?
poohman yes but with normal glibc 10:08
not bionic
they are running in Wayland too
timotimo then i suspect it would be pretty easy
u-ou what about raspberry pi 10:09
does that run perl6
timotimo raspberry pi already works
u-ou yay
timotimo compiling it on the device requires a hefty amount of swap space, though
poohman hmmm - I have a device - let me give it a shot
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
poohman ok 10:11
u-ou compiling it you mean?
timotimo i'm not sure how much exactly
poohman ja why not a great idea?? 10:12
10:26 NeuralAnomaly joined, ChanServ sets mode: +v NeuralAnomaly, NeuralAnomaly_ joined, ChanServ sets mode: +v NeuralAnomaly_ 10:31 Geth joined, ChanServ sets mode: +v Geth 10:32 ufobat_ left 10:47 iyra joined 10:48 colomon joined 10:49 dct left
colomon “rakudobrew test” failing on both OS X and Linux 10:53
“Couldn't determine correct make program. Aborting.”
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.
u-ou: look at the commit chart for rakudo
u-ou why
jnthn u-ou: Because colomon decidedly counts as that :P 10:56
colomon I’m still #8 rakudo committer all time despite not having committed anything since “Christmas” 10:57
jnthn: I’m trying to update code from 2012. Grammar::parse appears to return something different on failure since then. 10:58
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.
jnthn And in 2012 if Nil existed then it probably vanished in list context
colomon how do I test for a Nil return?
10:59 gdonald left
colomon (crazily this code used to work on both rakudo AND niezca) 11:00
jnthn Well, it's be false so there's always nok TheGrammar.parse($stuff) 11:01
*falsey
colomon is a Match object always true?
(now)
masak backlogging, I saw the word "callback" being used. how do people use this word? 11:02
u-ou ahh. my mistake, hehe.
masak (I think I know what it means, but I didn't agree with the way it was used. not completely, anyway.)
colomon u-ou: no worries
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"
u-ou no caffeine = bad
jnthn colomon: No, they can still crop up, but not as a return value from .parse
colomon jnthn++ 11:04
jnthn multi method Bool(Match:D:) { nqp::p6bool($!pos >= $!from) }
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
:)
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.
u-ou ;o
jnthn masak: I think that definition may be missing that the routine may stash the callback away for something *else* to later call back
Which is a case I'd still call a callback :) 11:08
u-ou off to bed
night night
masak jnthn: yes. I almost added "(directly or indirectly)", if that helps
the problem is that you'd need `caffeine` to be both something term-y, and something that can be assigned to
u-ou: 'night
11:08 dct joined
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
m: say (*-1).^name
camelia { ... }
masak ...huh 11:10
m: say (*-1).WHAT
camelia (WhateverCode)
masak first time `.WHAT` gave me a better result than `.^name` ;)
guess I'm running into some subtle version of the semipredicate problem or something :P
jnthn hah, I suspect the first one actually manage to curry the .^name :D 11:11
m: say ((*-1).^name)(42)
camelia Int
jnthn Yup :)
masak :P 11:12
jnthn But yes, I'd probably have said "generates a closure"
masak well... :P
"closure" is another problematic one
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
what jnthn said
jnthn Right, so what does *+1 close over? :)
masak the... operator?
jnthn Yes :)
Since operators are lexically defined ;)
masak I only know that since I've been through hell with macros and lexical scopes :P
jnthn :P 11:14
masak m: my &c; { &c = * + * }; { sub infix:<+>($, $) { "MWHAHAHA" }; say 40 + 2; say c(40, 2) } 11:15
camelia MWHAHAHA
42
masak ...demonstrated here ^
masak pictures several backloggers' brains silently but beautifully exploding
11:15 grondilu left
jnthn If mine is like "so what", have I been here too long? :) 11:16
masak jnthn: yep. you're beyond saving.
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
jnthn ooh, that reminds me I've got a post I almost was done drafting and should finish up :) 11:20
11:33 dct left
colomon shakes fist at past colomon 11:34
let me guess, the parse / subparse distinction is also newer than 2012? :) 11:40
jnthn Quite possibly :) 11:42
timotimo wow, moarvm compiles under windows again ... after i miraculously broke it beyond recognition 11:44
El_Che timotimo: are you cheating and using the new Linux subsystem of w10? :) 11:50
masak lol, I blog'd! strangelyconsistent.org/blog/the-ro...f-all-eval 11:51
(more grumpy than usual. but hopefully in the end constructive.)
colomon four test files passing now 11:53
pmurias m: my $foo := "taking liberties with lexicals"; EVAL 'say $foo'; 11:58
camelia taking liberties with lexicals
pmurias m: my $foo = "taking liberties with lexicals"; EVAL 'say $foo'; 11:59
camelia taking liberties with lexicals
pmurias masak: accessing lexicals that are not marked dynamic is something that normal functions shouldn't do
masak well, sure. 12:01
I'm not saying that `eval` isn't strange
or that it doesn't have side effects 12:02
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:03
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
note*
12:05 MasterDuke_ joined
masak though maybe the rationale for that is that it's some kind of keyboard-dehuffmanized feature, not a bug :P 12:06
12:07 winnie__ joined 12:10 winnie_ left
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:11
12:19 Khisanth joined 12:29 AlexDaniel joined
timotimo phew, that headache is probably dealt with now 12:34
let's see what appveyor thinks
12:35 wamba joined 12:41 poohman left 12:42 colomon_ joined 12:43 colomon left, colomon_ is now known as colomon, jferrero left 12:44 gdonald joined
Geth ecosystem: 3f7447c3e2 | (Marcel Timmerman)++ (committed using GitHub Web editor) | META.list
Change of meta filename

Change of meta filename of Config::DataLang::Refine
12:45
colomon p6: say ”κόσμε”.ords 12:58
camelia (954 972 963 956 949)
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?! 12:59
oh, never mind 13:00
my real problem is that I’m expected 954,8057,963,956,949 and getting 954,972,963,956,949 13:01
lizmat colomon; perhaps composed vs decomposed ? 13:02
hmmm...same number of values
m: say "ό".ord
camelia 972
lizmat .u ό
yoleaux U+03CC GREEK SMALL LETTER OMICRON WITH TONOS [Ll] (ό)
lizmat seems correct to me 13:03
colomon m: say 8057.chr
camelia ό
colomon m: say 8057.chr.ords 13:04
camelia (972)
colomon that’s what’s tripping me up
13:11 abraxxa joined 13:13 Cabanossi left
timotimo m: say uninames(8057, 972) 13:14
camelia 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)
timotimo m: say .&uniname for 972, 8057
camelia GREEK SMALL LETTER OMICRON WITH TONOS
GREEK SMALL LETTER OMICRON WITH OXIA
timotimo is one of those deprecated by unicode or something?
like greek questionmark? 13:15
13:15 Cabanossi joined 13:16 abraxxa left
timotimo well, no clue if "deprecated" is a word that makes sense for this 13:17
masak .oO( decoded by unicode ) :P 13:18
13:19 domidumont left
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
timotimo fileformat.info says DecompositionGREEK SMALL LETTER OMICRON WITH TONOS (U+03CC) 13:23
for the one with oxia
just like greek question mark has decomposition SEMICOLON 13:24
13:26 isBEKaml joined, bjz left
isBEKaml . 13:26
13:28 iyra left
masak pmurias: I have to agree on that one 13:28
13:30 bjz joined
colomon hurm. why am I getting Seq.new-consumed() in my array? 13:43
m: dd [Any, (Nil, Nil, Nil).Seq].grep(?*) 13:46
camelia ((Nil, Nil, Nil).Seq,).Seq
masak m: say ?(Nil, Nil, Nil) 13:47
camelia True
masak .oO( omg it's full of Nils ) 13:48
colomon I’m still getting tripped up by the 2015 list changes. is there a blog post somewhere explaining everything? 13:50
I need to be returning an empty Slip? 13:52
13:53 tamiya joined
masak colomon: what are you trying to do? 13:54
m: sub foo { return }; say ?foo
camelia False
masak m: sub foo { return [] }; say ?foo
camelia False
masak m: sub foo { return () }; say ?foo
camelia False
masak m: sub foo { return Slip.new }; say ?foo
camelia False
colomon the ?* was just an attempt to work around things
recursively analyse a list which may include sublists, filtering out the information I’m looking for. 13:56
used to return Nil and everything was fine
but now the sublists don’t go away. 13:57
I can probably think of a better way…. hmmm.
indeed. less functionaly but it will work
13:58 Skarsnik joined
tamiya perl 13:59
13:59 tamiya left
AlexDaniel perl6 13:59
colomon sorted 14:01
well, my new version appears to have an infinite loop. :\ 14:06
timotimo uh oh 14:08
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:11 isBEKaml left
colomon timotimo: interesting. but I knew about where it was, already tracked down and fixed 14:13
14:15 guest947 joined, MilkmanDan left
timotimo OK! 14:16
14:17 MilkmanDan joined 14:22 guest947 left 14:23 guest947 joined 14:28 guest947 left, jameslenz joined 14:29 sena_kun left 14:40 khw joined, winnie__ left 14:55 bjz left 15:04 wamba left 15:09 Skarsnik left 15:10 winnie__ joined, winnie_ joined
winnie_ Hi again - do we have a gcc version prerequisite to compile rakudo?? 15:11
15:14 Cabanossi left, winnie__ left 15:15 Cabanossi joined
timotimo i don't think so, we develop with -std=c89 after all 15:19
are you experiencing trouble?
winnie_ ja in Sailfish it gives a C90 error regarding declaration of unions 15:20
timotimo oh, what file?
oh crap
it's telemeh.c, isn't it 15:21
winnie_ wait long filename
dyncall_callvm_arm32_arm_armhf.c
its in moarvm in nqp
timotimo oh 15:22
winnie_ source/rakudo/nqp/MoarVM/3rdparty/dyncall/dyncall/dyncall_callvm_arm32_arm_armhf.c
timotimo if dyncall is giving you trouble, try using libffi instead
winnie_ im trying to put the union declaration in the header 15:23
ok
timotimo you can give the Configure.pl a --moar-flags option or something
15:23 davido_ joined, astj joined
winnie_ let me have a look 15:24
15:25 skids joined
timotimo hm, what's the right flag for libffi 15:27
maybe --has-libffi?
tyil I use a shebang pointing to perl6, should I still use `use v6;`? 15:30
if (yes) { why? }
El_Che yes 15:31
v6c or something
for when v6d comes out it doesn't break your code
15:32 davido_ left
tyil ah 15:32
thats good to know
thanks
I usually see people adding `use v6` without the c
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
AlexDaniel which… I don't think is sensible at all
El_Che ^-- and that as well :)
tyil I had no issues running my code without the v6, just with a perl6 shebang, so I wondered
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
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
El_Che AlexDaniel: perl yourscript
AlexDaniel El_Che: sure, why would you type that? :)
perl yourscript.p6 # huh? :) 15:35
El_Che AlexDaniel: I won't. All my colleagues do, however
AlexDaniel well, then perhaps that's a good practice
El_Che I tend to leave the extension on unix, mostly
becasue I don't care in what lang a program is written
AlexDaniel sure, but then you rely on shebang…
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
AlexDaniel tyil: in any case, do what makes sense to you, there are no hard rules for this :)
El_Che the versioning is best practice 15:37
tyil the v6c makes sense, so I'll apply that
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
El_Che AlexDaniel: thing are allowed to break, so they will break
tyil its better to be safe 15:38
in this case
a good practice to learn
some change sometime might break something
15:39 CIAvash left
El_Che indeed 15:40
15:43 Cabanossi left
winnie_ timotimo: Putting the union declaration in the header didnt help 15:44
--moar-option=?? 15:45
15:45 Cabanossi joined
timotimo okay, does --has-libffi work? 15:45
yeah, you have a perl Configure.pl --gen-moar something something line, right?
winnie_ ja
timotimo the --moar-option=--has-libffi flag goes there 15:46
15:46 vike joined
winnie_ ok I currently ran with --moar-option=has-libffi - let it abort ill try again 15:46
15:52 astj left, astj joined
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€ (no 15:55
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)
in total I received “free” items for about 90€
15:56 kurahaupo joined 15:57 astj left
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:57
15:58 kurahaupo_ joined
AlexDaniel where “unrealistic” could mean <0.01€ per piece, this would've solved the problem for screws and other small stuff 15:59
15:59 [particle] joined
AlexDaniel (oops, I mean I received 90€ worth of items for “free”. You get it) 16:00
16:01 kurahaupo left
eater is there a META6.json field for library dependencies? 16:12
16:14 dct joined, Cabanossi left, wamba joined 16:15 Cabanossi joined
timotimo you mean like native libraries? we don't have that 16:17
eater :(
timotimo there's some prior art for grabbing dlls on windows, fwiw 16:19
GTK::Simple has something, LibSSH has something
eater wasn't there a lib for it 16:28
if there isn't
time to type :")
eater builds ALL the things
timotimo there's LibraryMake 16:31
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`?
timotimo yeah, you need ::('&function-name') for that
or ::($name-in-string)
tyil its getting me closer 16:35
I have termbin.com/tyzn rn
16:36 dct left
tyil Im getting a No such symbol 'Controllers::Home.index' 16:36
the get "/b" route works
timotimo have you tried Hiker yet? 16:37
tyil not yet
timotimo it has a thing where it loads stuff from folders for you 16:38
i.e. it prescribes a way to name your stuff and it'll hook it all up for you
winnie_ timtimo : with libffi after a while of compilation I get a Bus error 16:41
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:42
timotimo sure 16:44
gfldex tyil: you will have to get hold of the type object and use that to dispatch to the method 16:45
tyil get $route => sub { ::($handler).index(request) }; 16:46
gfldex m: class C { method m { say 'oi‽' } }; my $c = ::('C'); $c."m"();
camelia oi‽
tyil this one is valid
16:46 pierrot joined
tyil ah 16:47
that looks nice, gfldex
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 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
TreyHarris Is that a bug, or should you not expect a mixed-type like that to be renderable directly?
(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
16:53 domidumont joined
timotimo oh, is that because say %h is trying to sort its elements? 16:53
TreyHarris timotimo: yes 16:54
on stringification, Hash sorts its keys
timotimo well, that's bad :)
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
but .perl probably shouldn't attempt to sort the keys, and it also failes in this case 16:56
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
camelia 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
eater :m class A { method B { say "ay"; } }; my $d = ::("A"); my $e = $d.^lookup("B"); $e($d); say $e.perl;
m: class A { method B { say "ay"; } }; my $d = ::("A"); my $e = $d.^lookup("B"); $e($d); say $e.perl;
camelia ay
method B (A $: *%_) { #`(Method|51040296) ... }
TreyHarris I'd think we want to never have .perl raise an exception unless there's absolutely no other option
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 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
timotimo yeah, i'd say that's a good stance on .perl
16:59 Cabanossi left 17:00 Cabanossi joined
TreyHarris orderability isn't a constraint on hash keys, is it? they just need to uniquely .WHICH 17:02
oh, but we cmp by .WHICH as a last resort, don't we
timotimo right, we can 17:03
TreyHarris so everything is orderable even if it may be arbitrarily so
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:04
TreyHarris timotimo: can the exception be caught and re-force ordering using infix:<cmp>(Any, Any)? 17:05
timotimo that'd be possible
TreyHarris I'm having trouble finding where this is implemented in rakudo
(the stringification of Hash, I mean, not cmp, that I can find) 17:06
MasterDuke_ .gist i believe
timotimo s: {a => b}, 'gist', \() 17:07
where'd the bot go?
only in -dev
github.com/rakudo/rakudo/blob/624f...sh.pm#L213 17:08
there's the .sort you're looking for
a few lines above that is the .sort for .perl
TreyHarris what is 'given ++$'? it's used in the same way for Hash, List, and native_array 17:11
17:12 kaare_ joined
timotimo $ sets up an anonymous state variable 17:12
and given sets it as the $_ for the scope it scopes over
TreyHarris right, but the ++? 17:13
timotimo pre-increment
TreyHarris pre-increment, but why?
timotimo so that the value changes
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
timotimo that'll give you a warning about use of undefined value 17:14
m: for ^10 { say $++ }
camelia 0
1
2
3
4
5
6
7
8
9
timotimo oh?
m: say $
camelia (Any)
TreyHarris m: for ^10 { say ++$ } 17:15
camelia 1
2
3
4
5
6
7
8
9
10
TreyHarris it's just easier to index by 1, I think everyone would agree ;-)
(that's why I asked that part; a post-increment would make more sense to me) 17:16
timotimo m: say (my $a = Any)++ 17:18
camelia 0
timotimo so the ++ must be turning what it returns into a number, too
i.e. returns not the value before incrementing, but the numified value before incrementing
TreyHarris timotimo: ah, that makes sense
17:21 John[Lis` joined
timotimo that's very helpful 17:21
17:25 John[Lisbeth] left
gfldex m: my $a = Str; say $a++; 17:35
camelia 0
gfldex m: use variables :D; my $a = $; 17:37
camelia 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, Cabanossi left 17:59 kurahaupo_ left, winnie_ left, labster joined, winnie_ joined
winnie_ timotimo: The 1G memory requirement you spoke about was for the MoarVM?? 18:00
18:00 Cabanossi joined
MasterDuke_ winnie_: rakudo 18:01
timotimo rakudo has one step that takes a huge amount of memory 18:02
it's the one that starts with "stage start .... 0.000" or something like that
MasterDuke_ and i think it's closer to 2g needed 18:03
timotimo could very well be
SmokeMachine m: say {try 5 == 5}() 18:04
camelia WARNINGS for <tmp>:
Useless use of "==" in expression "5 == 5" in sink context (line 1)
True
SmokeMachine m: say {try {5 == 5}}()
camelia True
18:05 winnie_ left
SmokeMachine m: say {;}() 18:07
camelia Nil
SmokeMachine m: say {ENTER {5 == 5}}()
camelia True
SmokeMachine m: say {ENTER {5 == 6}}()
camelia False
SmokeMachine m: say {LEAVE {5 == 5}}() 18:08
camelia WARNINGS for <tmp>:
Useless use of "==" in expression "5 == 5" in sink context (line 1)
Nil
SmokeMachine m: say {LEAVE {say 1}}()
camelia 1
Nil
SmokeMachine is the ENTER correct? should it's return be returned by the block? 18:09
18:09 MilkmanDan left
SmokeMachine m: say {ENTER {42}}() 18:09
camelia 42
SmokeMachine m: say {LEAVE {5 == 5}}()
camelia WARNINGS for <tmp>:
Useless use of "==" in expression "5 == 5" in sink context (line 1)
Nil
SmokeMachine m: say {LEAVE 5 == 5}()
camelia WARNINGS for <tmp>:
Useless use of "==" in expression "5 == 5" in sink context (line 1)
Nil
18:10 BenGoldberg joined, MilkmanDan joined
lucs m: use Test; sub foo { ok(1) }; foo 18:11
camelia ok 1 -
lucs m: sub bar { require Test; ok(1) }; bar # How does 'require' work?
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared routine:
ok used at line 1
BenGoldberg m: sub baz { require Test qw(&ok); ok(1) }; baz 18:12
camelia ===SORRY!===
Cannot invoke this object (REPR: Null; VMNull)
BenGoldberg That's an LTA error message.
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:19
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:24 BenGoldberg left
TimToady note, however, that CATCH is in neither of those categories, since it runs before the stack is unwound 18:29
m: say sub {CATCH {return 22}; die 'oops'}()
camelia 22
TimToady so you can actually return out of a CATCH 18:30
moritz m: sub () { CATCH { } 5 }()
camelia 5===SORRY!5=== Error while compiling <tmp>
Strange text after block (missing semicolon or comma?)
at <tmp>:1
------> 3sub () { CATCH { }7⏏5 5 }()
moritz m: sub () { CATCH { }; 5 }()
camelia ( no output )
moritz m: say sub () { CATCH { }; 5 }()
camelia 5
moritz m: say sub () { 5; CATCH { } }()
camelia WARNINGS for <tmp>:
Useless use of constant integer 5 in sink context (line 1)
Nil
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
moritz but that might be too much cute thinking 18:31
TimToady I can argue it both ways, so we've done nothing :)
Geth ecosystem/feature-add-taglibc: 6ed2fa77a8 | eater++ (committed using GitHub Web editor) | META.list
Add TagLibC
18:32
moritz yes, understandable
Geth ecosystem: the-eater++ created pull request #326:
Add TagLibC
18:33
18:40 pierrot left 18:42 pierrot joined
Geth ecosystem: aff570fb30 | eater++ (committed by Moritz Lenz) | META.list
Add TagLibC
18:43
18:43 Cabanossi left
eater np moritz 18:44
18:45 Cabanossi joined 19:10 nadim left
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:15
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
sometimes clarity is better than monkeys
moritz I too feel that EVAL + MONKEY are a bit over the top
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"
timotimo yeah, "eval is a very dangerous function" really ought to point at "code injection" 19:19
or something
TimToady it's not just about cuteness
masak good
moritz upper-casing EVAL xor MONKEY woul be good enough, IMHO
I like upper-case EVAL, fwiw
19:19 darutoko left
TimToady
.oO(disputandem non est de gustibus)
19:20
timotimo .o( ghost bus )
moritz ghost buster! 19:21
SmokeMachine m: say any(42, 42.0).Numeric
camelia Cannot resolve caller Numeric(Int: ); none of these signatures match:
(Mu:U \v: *%_)
in block <unit> at <tmp> line 1
masak .oO( MONKEY-NO-ACCOUNTING-FOR-TASTE ) 19:23
19:27 labster left 19:32 TEttinger joined 19:34 salv0 left 19:38 zapwai joined
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:39
19:40 kaare_ left
El_Che TimToady: the problem with metaphors is that not everyone get them 19:40
timotimo the problem with metaphors is that they are too much like ducks 19:41
19:41 domidumont left
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:41
El_Che TimToady: good with orange sause? 19:42
I meant timotimo
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
m: sub default-for(Mu:U ::Type) { use variables :D; my Type $v = Type(Nil); $v.perl }; dd default-for(Int)
camelia X::TypeCheck::Assignment exception produced no message
in sub default-for at <tmp> line 1
in block <unit> at <tmp> line 1
TreyHarris (I _am_ asking both what the way to ask that question is, and why my sub doesn't work) 19:52
19:54 espadrine joined
AlexDaniel masak: how come you need eval so often that you've even decided to write a blog post about it? 19:59
gfldex TreyHarris: your sub doesn't work because you have a type constraint on a type capture. 20:02
20:02 pecastro joined
TreyHarris m: sub default-for(::Type) { use variables :D; my Type $v = Type(Nil); $v.perl }; dd default-for(Int) 20:04
camelia X::TypeCheck::Assignment exception produced no message
in sub default-for at <tmp> line 1
in block <unit> at <tmp> line 1
TreyHarris gfldex: Not like that... (Mu:U ::Type) was I thought the correct signature for a required type argument 20:06
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()
camelia Too few positionals passed; expected 1 argument but got 0
in sub s at <tmp> line 1
in block <unit> at <tmp> line 1
gfldex m: sub s(::Type $f!){}; s() 20:14
camelia Too few positionals passed; expected 1 argument but got 0
in sub s at <tmp> line 1
in block <unit> at <tmp> line 1
gfldex m: sub s(::Type $f!){}; s(1)
camelia ( no output )
pmurias m: my $foo := &EVAL; $foo("say 'Hi'") # Should this require MONKEY-SEE-NO-EVAL? 20:16
camelia Hi
TreyHarris m: sub is-type(Mu:U ::Type) { say Type.perl }; is-type(Int); is-type(Str); is-type(4) 20:18
camelia 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
lucs How do I get a module to load for example only when some function is called at runtime? 20:21
My naive, à la Perl 5, usage of 'require' appears not to work like, well, in Perl 5:
m: sub foo { require Test; ok(1) }; foo 20:22
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared routine:
ok used at line 1
20:22 salv0 joined
geekosaur the problem is not the require, it's the compile time checking for ok when you load at runtime 20:22
lucs Yes, makes sense. Is there no way to do like what we can do in Perl 5? 20:23
(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 :/
lucs Yeah, I saw your earlier attempt :(
TreyHarris m: constant T = 'Test'; sub foo { use ::(T); ok(1) }; foo 20:26
camelia ok 1 -
lucs Hmm...
So 'use' can happen at runtime, eh. 20:28
m: sub foo { use ::('Test'); ok(1) }; foo
camelia ok 1 -
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
lucs Ah. 20:30
TreyHarris m: my $t = 'Test'; sub foo { use ::($t); ok(1) }; foo
camelia ===SORRY!===
Name ::($t) is not compile-time known, and can not serve as a
lucs So is there no way to load a module conditionally, at runtime? 20:31
gfldex lucs: see docs.perl6.org/syntax/require 20:32
lucs gfldex: Yeah, I read that, recognizing most of the words :(
TreyHarris m: my $t = 'Test'; sub foo { require ::($t) <&ok>; ok(1) }; foo 20:35
camelia ok 1 -
lucs TreyHarris: Oh, so that looks like it's loaded at runtime, right? 20:36
TreyHarris lucs: yes
lucs Ah, but I notice the 'ok' symbol needs to be explicitly mentioned <&ok> 20:37
(not ideal, eh)
And I think your example can be simplified to: 20:38
m: sub foo { require ::('Test') <&ok>; ok(1) }; foo
camelia ok 1 -
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
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
lucs Yes, right.
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?
gfldex m: my $name = "Test"; require ::($name); dd ::('Test')::EXPORT::DEFAULT::.keys; 20:40
camelia ()
lucs In my current case, just defer the load until the function is (if ever) invoked.
20:40 zakharyas joined
TreyHarris lucs: then mentioning the symbols you need by name doesn't seem that inconvenient 20:41
lucs That's true.
Geth ecosystem: the-eater++ created pull request #327:
Update TagLibC url
lucs TreyHarris: Yeah, that should do it. Thanks. 20:42
20:42 astj joined
timotimo m: require ::("Test"); say ::("Test::EXPORT::DEFAULT::&ok") 20:42
camelia sub ok (;; Mu | is raw) { #`(Sub|76826344) ... }
timotimo m: require ::("Test"); say ::("Test::EXPORT::DEFAULT::&ok")(1, "yeah!")
camelia ok 1 - yeah!
True
20:42 astj left
timotimo depending on how the module is set up you don't have to go through the export package 20:42
i.e. if it uses "our sub ok" for example 20:43
20:43 astj joined
timotimo at least i think so 20:43
gfldex m: require ::("Test"); my &ok = ::("Test::EXPORT::DEFAULT::&ok"); ok('oi‽');
camelia 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
gfldex m: require ::("Test"); my &ok = ::("Test::EXPORT::DEFAULT::&ok"); 20:44
camelia 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
gfldex confused rakudo is confused
m: require ::("Test"); my &ok = ::("Test::EXPORT::DEFAULT::&ok");
camelia 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
gfldex m: require ::("Test"); my &mmk = ::("Test::EXPORT::DEFAULT::&ok"); mmk('oi‽') 20:45
camelia ok 1 -
gfldex very confused indeed
timotimo that's funny
gfldex it's mindlessly parsing
timotimo that check isn't very old
gfldex timotimo: can you rakudobug please? 20:46
i will go and file the docs issue :) 20:47
timotimo sorry, neck deep in something else now :S
20:47 astj left
TreyHarris m: require ::("Test"); my $ok = ::("Test::EXPORT::DEFAULT::&ok"); $ok(1, 'yes') 20:51
camelia ok 1 - yes
TreyHarris m: require ::("Test") <&ok>; ok(1, 'yes') 20:52
camelia ok 1 - yes
TreyHarris why is assigning &ok to a local superior?
timotimo it isn't 20:53
if you only call it once, it's pretty much the same
if you want to call it multiple times, you'd be doing a package lookup each time
20:54 John[Lis` left, labster joined
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
(META6::bin) line 80
perhaps have to upgrade META6, too. hold on
but META6 is failing some tests. i wonder if that's the File::Ignore related thing? 20:57
Geth ecosystem: 659f9d7f24 | eater++ | META.list
Update TagLibC url
ecosystem: 9e19fd3509 | eater++ (committed using GitHub Web editor) | META.list
Merge pull request #327 from the-eater/feature-update-taglibc-url

Update TagLibC url
gfldex timotimo: is your gitconfig at ~/.gitconfig ? 20:59
TreyHarris m: require ::("Test"); our sub ok { ::("Test::EXPORT::DEFAULT::&ok")(|@_) }; ok(1, 'yeah')
camelia ok 1 - yeah
TreyHarris lucs: ^ if you need both the module and the sub to be variable
I don't know how to remove the calling stack since goto sub is gone 21:01
s/remove/replace/ 21:02
timotimo it is
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?
samcv crisis semi-averted.
TreyHarris m: require ::("Test"); our sub ok { goto ::("Test::EXPORT::DEFAULT::&ok")(|@_) }; ok(1, 'yeah') 21:05
camelia 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
samcv fixed 100% of known yesterday/todya bugs in the underlying ops for the case insensitive regex
so should be good to go for another point release
;-) 21:06
lucs TreyHarris: Thanks 21:11
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:12
21:13 wamba left
timotimo gfldex: (Any) 21:14
21:14 ponbiki joined
timotimo fwiw, there is no "credential" section in my gitconfig 21:15
21:15 bhm left
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
21:16 ponbiki left, ponbiki joined
lucs :) 21:17
21:19 ilmari joined
DrForr Hey, some new faces arond, cool. 21:19
At least there were :) Anyone awake? 21:20
El_Che DrForr: still using this? kurlander.net/DJ/Projects/ComicChat/FromVWG.jpg
timotimo El_Che: where did you get that idea? :) 21:21
El_Che new faces
timotimo oh, heh
DrForr Believe it or not, at one time I knew where the creator hung out :) 21:22
El_Che DrForr: small world 21:23
DrForr I'd still hate to paint it.
timotimo i used comic chat once, but it was before i had internet, so not much to do with it at all
eater :')
21:23 rindolf left
eater timotimo: how did you use it then? 21:23
timotimo i wrote text in the input box and selected emotions on the side 21:24
El_Che every generation reinvents irc
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
pmurias comic chat seems awesome 21:26
timotimo yeah, i didn't sign any commits so far
samcv that MS windows thing? or is there a newer thing
timotimo i don't have a well-honed gpg key any more
samcv mine signs every commit and aborts otherwise
timotimo i used to have one with like 50 signatures or something
samcv hm
mine doesn't have that many signatures but. i mean it's listed everywhere well 21:27
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
timotimo oh, heh.
but you don't use your key to encrypt stuff to others
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
samcv see timotimo i.imgur.com/GVU4aRk.png
err there's something i can't do
timotimo huh
well, there's something i seem to know nothing about :P 21:29
samcv i dunno how to fix...
El_Che samcv: are you supposed to be able to rollover keys?
samcv rollover?
timotimo creating subkeys should be ... easy?
samcv well i just need to sign the encryption key and have the expiration date change
but whenever i try to do that, it just has no visible change though probably signs some subkey
El_Che I don't think that's a good idea
timotimo i don't think you can actually change the expiration date of any key?
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
samcv yes you can timotimo
El_Che you keep the old key to decrypt stuff, by encrypt with the new one
21:30 labster left
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
El_Che but that must have been years
samcv i changed the exiry date to never expire. but for some reason only did it for one subjey
subkey
timotimo the key i have on my laptop expired 2017-05-21 ... hold on, that's in the future!
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 :)
samcv well paranoia comes from some sense of not knowing for sure 21:32
so that makes sens
El_Che it's not because you're paranoid that they aren"t after you kind of thing :) 21:33
21:34 labster joined 21:35 bhm joined
samcv yay i fixed it! 21:35
it worked this time. maybe newer gpg version idk 21:36
but i did the exact same thing i did before. but this time it worked
timotimo perfect
samcv sending to server now
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
El_Che security wise the sensible thing to do is to rotate keys
(stronger ciphers, etc)
samcv even if the key WAS valid when i signed it
it still is invalid
and i don't like that
21:37 zakharyas left
samcv hmm hasn't updated yet. maybe will use gpg to push not this gui thing keys.gnupg.net/pks/lookup?op=vindex...12C3881D62 21:40
but as you can see heh signed the first key many times trying to get that other one signed again
gfldex timotimo: see bottom of github.com/gfldex/perl6-meta6-bin#github 21:41
timotimo hm, why is there only one credential section and only one "username" in there?
like, what if i have a bitbucket, too?
gfldex i'm just shelling out to git (for now) 21:42
and talk to the github api for that matter
timotimo like, the "credential" thing isn't made up by you, right?
gfldex no
timotimo why is it like that? :D
21:43 dct joined
gfldex timotimo: see git-scm.com/docs/gitcredentials 21:43
21:44 Cabanossi left
timotimo how do i keep b0rking this tool 21:44
gfldex so you may have a [credential "timotimo.uber"]
timotimo meta6 --set-license=Artistic-2.0 --meta6-file-name=META6.json - is this wrong?
El_Che pbs.twimg.com/media/C-AQOVNV0AAdQ08.jpg <-- made me laugh
21:45 Cabanossi joined
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
gfldex timotimo: no wait, you need to set basedir
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?
gfldex it is and the default
so is META6.json
samcv woo 35 license fields fixed so far :) good work everyone github.com/perl6/ecosystem/issues/324
timotimo meta6 --set-license=Artistic-2.0 --base-dir=(pwd) --meta6-file-name=META6.json 21:49
that's what i have now and it still gives that error
when i just "cat META6.json" i get my data
gfldex let me check
timotimo let me look what version of META6 i'm running ... 21:51
21:52 kyan joined
gfldex timotimo: i did send a PR that way a few days ago 21:52
timotimo META6:ver('0.0.11'):auth('github:jonathanstowe')
that's a little bit antique, isn't it ...
but META6 latest won't pass its tests :< 21:53
timotimo hits it with a large hammer
gfldex can't be hard to fix, it's barely doing anything
timotimo okay, now it sets the license 21:54
in sub MAIN at /home/timo/perl6/install/share/perl6/site/sources/08A003E9585BF4F4FEBD6559AE70DDC410B29DDC (META6::bin) line 216
Use of uninitialized value of type Str in string context.
not sure how this one happens
samcv m: say 'abc' ~~ m:i/bcd/ 21:59
camelia False
samcv m: say 'abc' ~~ m:i/bc/
camelia 「bc」
samcv very goodly
m: say 'st' ~~ m:i/sta/ 22:00
camelia False
samcv m: say 'stb' ~~ m:i/sta/
camelia False
samcv good good good
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
22:01 nadim joined
samcv where is this example 22:01
oh. the repo?
timotimo yeah examples/my-meta.pl
samcv yep 22:02
timotimo github.com/jonathanstowe/META6/blo...my-meta.pl
samcv yep 22:03
looks like the only PR jonathanstowe accepted was to META for the META6.json file. but reject for all the other ones 22:04
i forgot about that he did merge the META change
22:11 pmurias left 22:16 dct left
gfldex timotimo: META6 itself is fine, seams to come from JSON::Marshall 22:18
22:24 ggoebel joined, bjz joined
gfldex m: say so "foo" cmp Any; 22:30
camelia 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
gfldex timotimo: that's where that warning comes from
22:32 imcsk8 left, imcsk8 joined
timotimo oh, interesting 22:33
gfldex m: say so "foo" eq Any; 22:35
camelia 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 left, gdonald joined
eater how do I unpack an hash e.g. in an argument list 22:56
so I can full fill a slurpy argument?
timotimo you'll put a | in front of the %foo 22:57
eater timotimo: <3
thanks
23:03 labster left 23:05 nadim left 23:13 Ven joined, Ven left 23:17 espadrine left 23:43 Cabanossi left 23:45 Cabanossi joined 23:52 labster joined