»ö« 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.
00:00 ely-se left 00:06 firstdayonthejob left 00:09 tmch left 00:19 virtualsue left
ugexe m: use Test; plan 2; ok 1; skip-rest(); subtest { my $x = Str.asjfofef; ok $x; }; # expected? (i kinda expect `subtest` to get skipped entirely) 00:29
camelia rakudo-moar 978754: OUTPUT«1..2␤ok 1 - ␤ok 2 - # SKIP <unknown>␤Method 'asjfofef' not found for invocant of class 'Str'␤ in block <unit> at /tmp/SZK8BmahIr line 1␤␤»
timotimo i've relaxed the requirement to have a callmethod on the LHS of a metaop-assign to also allowing sub calls 00:34
spec testing nao
00:35 johndau joined 00:40 ggoebel17 left
timotimo spec tested clean 00:42
John[Lisbeth] can you do something similar efficiency and function wise to switch case statements in c? 00:49
timotimo you're not going to reach equivalent performance of a jumplist yet, but you can have a given/when clause
in general, you will find that perl6 performance is a bit lacking at the moment 00:50
this year we'll finally be focusing a whole lot on performance improvements
the effects of that are already felt in some places, have a look at this: 6guts.wordpress.com/2016/03/06/dig...lity-work/
John[Lisbeth] just add more cores 00:52
timotimo heh.
well, you can do that in perl6 reasonably well
on the other hand, our memory consumption sometimes gets a bit bad ;) 00:53
"just add more rams" isn't such an easy option
John[Lisbeth] more threads! 00:54
128 bit operating system for the win 00:55
timotimo hah
John[Lisbeth] delete system 32 00:56
timotimo if you already need one of those, you probably have some epic requirements
John[Lisbeth] all I needs me is some recursion boi 00:57
gimme some of that sweet recursion son
timotimo yeah, we don't have a recursion limit ...
John[Lisbeth] perl has ver y few limits from what I understand 00:58
or rather very few restrictions
timotimo yeah, kind of
John[Lisbeth] I've heard it's one of the most permissive languages
timotimo hm, could be
John[Lisbeth] and very few wats once you learn the depth of the syntax 00:59
timotimo in #perl6 we like to say "for every DWIM there's an equivalent WAT of equivalent magnitude" or something like that 01:00
b2gills Perl 5 does have a few WATs, but those were mostly from maintaining backward compatibility with older versions
John[Lisbeth]: If you want to see some Perl 6 videos on YouTube: www.youtube.com/playlist?list=PLRu...FwobZHdXdK 01:03
John[Lisbeth] I am not sure I want to put perl into my brain yet 01:05
Hotkeys is a 'WAT' where you get confused
timotimo it's something unexpected that you can't relate to 01:06
John[Lisbeth] It's where the syntax in a langauge does something different than it normally does
01:06 aindilis joined
John[Lisbeth] irregular syntas 01:06
special case syntax
skids WAT exists without a formal definition for the practical joke value of making people google for it.
timotimo WAT is not limited to syntax, it's much stronger in semantics IMO
ah, so it's warnocked 01:07
01:08 yeahnoob joined
John[Lisbeth] Perl 6 is just LOTR 2 you guys 01:08
Hotkeys so does it stand for something or is it just the word you produce when it happens
John[Lisbeth] maybe cause when you come across a wat you say "wat" 01:09
skids There are backronyms but they are, well, backronyms.
tweakism Hotkeys: you need to watch the video that coined it 01:18
at least this sense of it
www.destroyallsoftware.com/talks/wat
Hotkeys alright 01:19
yeah okay
this is what I thought it meant
gonna keep watching this though 01:20
tweakism it's really good. 01:21
Hotkeys that was great 01:23
skids NaNNaNNaNNaN Batman! 01:24
tweakism and it's not an acronym, it's a funny way to say 'what'
skids: the point where I lose it is when {} + {} = NaN
01:24 Skarsnik left
timotimo which is why perl6 goes with coercive operators that always coerce all arguments the same way 01:30
rather than trying to figure out what to coerce to what depending on what types of stuff you've passed
which is why + is always addition, never string concatenation. and ~ is string concatenation only, not - for example - list concatenation as well
01:50 ggoebel16 joined 01:53 perlawhirl joined
perlawhirl hi perlers 02:00
who's awake
skids o/ 02:03
tweakism \o 02:04
timotimo ohai
02:09 Actualeyes joined
perlawhirl hi. if i'm reading a matrix (lines of elements) in from STDIN, i can do this: my @x = lines».words».list; 02:10
as is often the case with STDIN, the last line is usually blank, resulting in a final element of '()'. What's the best way around this (if i don't know whether the last line is a newline) 02:11
coming from a golfing point of view... (sorry)
timotimo .grep(+*) is a possibility 02:13
skids m: my @x = (lines».words».list).grep(*.elems); say @x[0,1,*-1] # would remove all blank lines if that's ok.
camelia rakudo-moar 0b69c7: OUTPUT«((Céad slán ag sléibhte maorga Chontae Dhún na nGall) (Agus dhá chéad slán ag an Eireagal ard ina stua os cionn caor is coll;) (Atá beo go buan gan bhuairt gan ghruaim fá ghleanntáin ghlas’ Ghaoth Dobhair.))␤»
timotimo +* is shorter :(
perlawhirl timotimo: thanks, will try it out 02:16
maybe we need a 'perl6-golf' sub-channel... all the 'lowly' golf talk can happen there :D
02:17 kalkin-- joined
tweakism hrm, why would the last line often be blank? 02:17
timotimo because you only ^D on a blank line 02:18
02:18 cdg joined
timotimo and it's good styile to end files in \n, because that way things end up fine with cat 02:18
tweakism I understand ending files in \n
but that's not the same as a blank line
POSIX says \n is a line terminator, not separator. 02:19
timotimo ah, sorry
tweakism i.e., a file with 3 lines (of text), should have 3 \n's 02:20
perlawhirl hmm... well i was catting a file to simulate the stdin, so i may be compounding things 02:21
02:21 kalkin- left
tweakism I'm just wondering now if perl is doing it like split('\n') 02:21
and inventing a non-existent last blank line 02:22
skids m: ("1\n2\n".lines.>>.words).perl.say 02:23
camelia rakudo-moar 0b69c7: OUTPUT«(("1",).Seq, ("2",).Seq)␤»
perlawhirl i think the issue is .list
i don't want a Seq, i want an array, so I added .list, which yes, seems to create that last ()
skids m: ("1\n2\n".lines.>>.words>>.list).perl.say 02:24
camelia rakudo-moar 0b69c7: OUTPUT«(("1",), ("2",))␤»
skids Sure there isn't an extra "\n"? 02:25
perlawhirl i'll check my inputs 02:27
ok, forget i said anything about STDIN typically ending in a \n... i just want to ignore blank lines from STDIN 02:28
in which case the grep(+*) seems to the way to go 02:29
tweakism perlawhirl: stdin does typically end in \n; what you said was it typically ends with a blank line :) 02:30
perlawhirl m: my @x = ("1\n2\n\n".lines.>>.words>>.list); say @x;
camelia rakudo-moar 0b69c7: OUTPUT«[(1) (2) ()]␤»
perlawhirl just trying to avoid that empty element
but have @x be a list (Array) and not a Seq 02:31
m: my @x = ("1 2 3\n4 5 6\n7 8 9\n".lines.>>.words>>.list); say (@x, |([Z] @x)); 02:34
camelia rakudo-moar 0b69c7: OUTPUT«([(1 2 3) (4 5 6) (7 8 9)] (1 4 7) (2 5 8) (3 6 9))␤»
perlawhirl if there's a trailing newline... i end up with this
m: my @x = ("1 2 3\n4 5 6\n7 8 9\n\n".lines.>>.words>>.list); say (@x, |([Z] @x));
camelia rakudo-moar 0b69c7: OUTPUT«([(1 2 3) (4 5 6) (7 8 9) ()])␤»
timotimo .tell jnthn i just pushed a branch "generate_buildallplan", perhaps it'll be a workable starting-point for compiling BUILDALL via the compiler services. it's rather rough, though, and currently asplodes during stage parse. 02:35
yoleaux timotimo: I'll pass your message to jnthn.
02:35 idiosyncrat_ left 02:48 kid51 left
timotimo .tell jnthn in particular, the nqp::getattr for $!reified really doesn't belong into the generate_buildplan_executor, but rather into compose. and i think i need to low-level-invoke that method in order to have an nqp::list instead of a List there. 02:55
yoleaux timotimo: I'll pass your message to jnthn.
03:12 skids left 03:30 Herby_ joined
Herby_ Evening, everyone! 03:31
\o 03:33
o/
03:44 ggoebel16 left 03:47 noganex_ joined 03:49 noganex left 03:50 ggoebel16 joined
Hotkeys Herby_: \o/ 03:53
03:57 Herby_ left 03:58 perlawhirl left 04:18 beatdown joined 04:20 shmibs joined 04:23 beatdown left 04:31 wamba joined 04:40 cdg left 04:42 tardisx left 04:43 dj_goku left 04:54 dj_goku joined 05:06 johndau` joined 05:10 johndau left 05:15 themonke1bob11 joined 05:16 notbenh_ is now known as notbenh, themonkeybob11 left 05:17 _notbenh joined 05:21 themonke1bob11 left 05:24 yeahnoob left 05:30 johndau` is now known as johndau 05:38 Cabanossi left 05:40 Cabanossi joined 05:45 pierrot left 05:49 khw left 05:50 vendethiel joined 05:53 themonkeybob11 joined 05:57 themonkeybob11 left 05:59 themonkeybob11 joined, bjz joined 06:08 bjz left 06:14 vendethiel left 06:25 bjz joined 06:29 bjz_ joined 06:31 bjz left 06:35 kurahaupo joined, quester joined 07:01 amanminz joined 07:03 amanminz left 07:04 themonkeybob11 left 07:05 CIAvash joined 07:09 kurahaupo left 07:14 sevvie left 07:18 domidumont joined 07:22 johndau` joined, domidumont left 07:23 domidumont joined 07:25 vendethiel joined, firstdayonthejob joined, johndau left 07:29 domidumont left 07:30 Actualeyes left, bjz joined
masak morning, #perl6 07:31
tweakism Hello.
07:32 bjz_ left 07:41 nakiro joined 07:45 domidumont joined 07:48 vendethiel left, themonkeybob11 joined
moritz \o 07:49
07:51 fireartist joined 07:53 themonkeybob11 left 07:55 johndau` is now known as johndau 07:58 mr-foobar joined 08:02 abraxxa joined 08:05 Possum joined 08:08 wamba left, wamba1 joined 08:13 darutoko joined 08:17 wamba1 left 08:19 zakharyas joined
[Tux] test 22.141 08:22
test-t 12.784
csv-parser 52.474
08:23 sno left 08:29 abraxxa left, abraxxa joined 08:30 tmch joined
sortiz \o #perl6 08:30
08:31 Actualeyes joined 08:33 themonkeybob11 joined
masak o/ 08:35
08:37 themonkeybob11 left 08:39 firstdayonthejob left 08:40 pmurias joined 08:42 yeahnoob joined 08:51 RabidGravy joined, Actualeyes left
RabidGravy marning! 08:53
08:53 pmurias left 08:54 pmurias joined 08:58 agent008_ left 08:59 zpmorgan left, pmurias left
DrForr RabidGravy: Got the handler stuff almost straightened out over the weekend, I collected a few more ideas this morning before I came in to work. 09:00
RabidGravy nice
DrForr Well, not really ideas per se as I knew they'd be handy, it was more along the lines of "Aha, I finally have a practical example of why you'd want this." 09:01
multi GET( 'settings', [ BlogID $blogID, UserID $userID ] ) # matching GET /settings?blogid=a35b9972&userID=123532 09:03
09:03 agent008 joined 09:04 pmurias joined 09:06 pmurias left 09:07 araujo joined, araujo left, araujo joined
masak DrForr: initial reaction: it feels a bit odd that those parameters would be positional. they don't "feel" positional in the URL, they feel named 09:08
DrForr Mm, good point. 09:09
09:09 pmurias joined
DrForr I was mostly focusing on the fact that they're kind of out-of-band, dropping the [] entirely might be the right thing. 09:11
09:12 pmurias left 09:14 pmurias joined 09:16 pmurias left 09:17 quester left
DrForr Yeah, I'm happy with multi GET( 'settings', BlogID :$blogID, UserID :$userID ) {...} since I can typecheck BlogID and UserID. 09:18
There may be other methods that don't have $blogID, or have userID that doesn't match the UserID type.
Plus the : stands out enough that it'll be clear that they're optional. 09:19
09:19 pmurias joined 09:22 themonkeybob11 joined, pmurias left
RabidGravy I'll sow a thought in your head while you are thinking of matching things, header fields such a "Content-Type" 09:23
DrForr Well, I was thinking about checking the return value from the method and if $v ~~ JSON, set the content-type to application/JSON. 09:24
09:24 ambs joined
RabidGravy most things just tend to use e.g. Content-Type to select a mechanism to render the output, but some appplications may want to select a completely different processing model 09:24
09:24 pmurias joined 09:25 FROGGS joined 09:27 themonkeybob11 left
RabidGravy In an imaginary streaming server for instance, one might respond to GET /foo .. Content-Type: application/json with metadata of the stream, to audio/mpeg with a Channel or supply that shovels the stream 09:29
DrForr Well, right now it just populates the content, but I probably should leave more to the handler author than that. Maybe just proffering a 'make-HTML' helper that returns the expected Plack response. 09:31
Or keep the 'is handler' as is and create a 'is raw-handler' that lets you return what you wish. 09:32
An "imaginary" streaming server, of course :) 09:33
09:40 CIAvash left 09:43 pmurias left 09:48 pmurias joined 09:49 wamba joined 10:02 johndau left
masak oh, so there's a .put method on Mu? that explains the failure mode I'm seeing. 10:05
10:10 themonkeybob11 joined
RabidGravy chortle 10:11
ls
10:15 themonkeybob11 left 10:16 _nadim joined
_nadim Good morning! 10:18
10:18 Actualeyes joined
_nadim I am a bit surprised by the Match object that is returned in the second example of this code nopaste.linux-dev.org/?981110 10:20
I was expecting #1 and #2 to return the same. Could someone explain it? code at the bottom is with DDT, clearer and slower to display. 10:21
timotimo if you want to interpolate a regex as code, you have to use <$regex>
$regex will stringify the regex and match it as a string 10:22
kalkin-- When working directly on rakudo the Exceptions are pretty much useless :(.
Error while compiling, type X::UNdeclared::Symbols: routine_suggesion (unstringifiable object)....
timotimo kalkin--: you're using --ll-exception, right?
ah, yeah
kalkin-- no I'm not, I will try that
timotimo does it at least tell you what symbols were undeclared?
kalkin-- nop
timotimo ll exception probably won't help there 10:23
kalkin-- at line 36881, near ""
timotimo oh, it could be that's a casualty of the GLR perhaps?
10:24 pmurias left
_nadim timotimo: that would make sense if it worked like you said but it doesn't. 10:24
10:24 azawawi joined
azawawi hi 10:24
yoleaux 5 Mar 2016 19:34Z <AlexDaniel> azawawi: well, I don't use Atom so I can't tell. It's also very hard for me to imagine switching to atom after all emacs/vim experience I had. So I am not the right person to answer this question ;)
kalkin-- timotimo: dunno. I'm trying to figure out why some code which just passes some strings does not work if refactored to own sub. Nothing special, but weird...
RabidGravy that looks like, it's crapping out when it tries to do:
m: sub foo() {}; fob()
camelia rakudo-moar 0b69c7: OUTPUT«5===SORRY!5=== Error while compiling /tmp/ORlVY8jWjs␤Undeclared routine:␤ fob used at line 1. Did you mean 'foo'?␤␤»
azawawi we use META6.json or META.json?
RabidGravy META6.json or META.info 10:25
I think because META6.json is stated in the s22 people are converging on that
10:26 pmurias joined
azawawi RabidGravy: and META.info? :) 10:27
timotimo nopaste.linux-dev.org/?981127 - kalkin-- can you try this patch?
kalkin-- timotimo: just a second
10:27 Skarsnik joined, virtualsue joined
timotimo m: my $string = 'aaaaaa' ; my $regex = / $<t1> = a $<t2> = a a/ ; ($string ~~ m:g/$regex/ ).perl.say ; 10:28
camelia rakudo-moar 0b69c7: OUTPUT«(Match.new(ast => Any, list => (), hash => Map.new(()), orig => "aaaaaa", to => 3, from => 0), Match.new(ast => Any, list => (), hash => Map.new(()), orig => "aaaaaa", to => 6, from => 3))␤»
Skarsnik Hello
timotimo m: my $string = 'aaaaaa' ; my $regex = / $<t1> = a $<t2> = a a/ ; ($string ~~ m:g/$regex/ ).say ;
camelia rakudo-moar 0b69c7: OUTPUT«(「aaa」 「aaa」)␤»
timotimo m: my $string = 'aaaaaa' ; my $regex = / $<t1> = a $<t2> = a a/ ; say $regex.Str
camelia rakudo-moar 0b69c7: OUTPUT«Regex object coerced to string (please use .gist or .perl to do that) in block <unit> at /tmp/q7FW8AenFR line 1␤␤»
timotimo oh, right 10:29
jnthn _nadim: /$regex/ will simply call the regex in $regex, but then doesn't save the results anywhere. Note that regexes aren't just strings in Perl 6, so you're not splicing one bit of regex into another, but rather calling one from the other. You'd need something like <xxx=$regex> to capture
yoleaux 6 Mar 2016 22:38Z <lizmat> jnthn: dd :(&foo:(--> Bool)).params[0] # seems wrong to have a post-constraint here?
RabidGravy azawawi, in the META.list:
yoleaux 02:35Z <timotimo> jnthn: i just pushed a branch "generate_buildallplan", perhaps it'll be a workable starting-point for compiling BUILDALL via the compiler services. it's rather rough, though, and currently asplodes during stage parse.
02:55Z <timotimo> jnthn: in particular, the nqp::getattr for $!reified really doesn't belong into the generate_buildplan_executor, but rather into compose. and i think i need to low-level-invoke that method in order to have an nqp::list instead of a List there.
RabidGravy 129 META6.json
439 META.info
2 META.json
timotimo well, i guess i should not talk before waking up :)
kalkin-- timotimo: now i get the error unstringifiable BOOTHash 10:30
timotimo kalkin--: can you paste the whole thing, please?
kalkin-- timotimo: exceptinon or code?
timotimo exception, but code might also be helpful 10:31
jnthn .tell lizmat The signature check compiles into a postconstraint; we can't really do it out of nominal typing, I don't think, and don't know we'd want to introduce a whole new mechanism when we can compile it as a constraint.
yoleaux jnthn: I'll pass your message to lizmat.
jnthn timotimo: Thanks, will look later today, or tomorrow. :)
timotimo jnthn: damn, then there was no need to make it half-work before bedtime after all! :P 10:32
_nadim jnthn, timotimo: thank you. the one thing that I slightly dislike is that it adds an extra match, for xxx, which makes it a little different from the original regex
timotimo _nadim: well, it at least makes things not be surprising when you have a $foo in your regex 10:33
kalkin-- Here are both of them gist.github.com/kalkin/91bde8660f948b1b56ac my routine which breaks is around line 943-951 10:34
timotimo just from looking at / (foo) $other_regex (bar) / you can tell that foo will be in $0 and bar will be in $1
_nadim timotimo: indeed. thanks for the golfing, I was writting it but you, again, beat me to it.
timotimo kalkin--: you'll be getting a patch that'll make that exception print properly in a few minutes
kalkin-- timotimo: Awesome! 10:35
10:37 CIAvash joined
_nadim timotimo: and maybe this is a good incitment for not putting regexs in $varable but tokens instead, makes things even clearer. 10:38
azawawi RabidGravy: thx 10:39
azawawi continues working on LibZip 10:40
timotimo kalkin--: your error was format-line not having a self. in front
the patch for getting the error printed properly will land soon, too. 10:41
_nadim my $r = /.../ stringifies but my regex r {} doesn't. Is there a way to get r as a string?
10:41 espadrine joined
kalkin-- timotimo: Thanks, I thought i declared it as sub 10:42
10:42 skids joined
timotimo the error print-out would have told you, except someone changed all those attributes to hashes some time after safely_stringify was made, but nobody saw that error since then 10:43
that's the problem when you get an exception to fly before its declaration gets parsed
we can't just call its .message because that code doesn't exist yet
kalkin-- Ahh i see 10:44
timotimo but now safely-stringify knows how to deal with BOOTHash and BOOTArray 10:45
gist.github.com/timo/e80e3b24efdb36c2c074 <-
kalkin-- cool 10:46
timotimo dalek seems to be offline, but i just pushed that commit i was talking about
wow, hack.p6c.org in general seems rather unhappy 10:47
sortiz Seems that dalek isn't working. 10:48
timotimo yeah, well, it runs on hack.p6c.org
kalkin-- timotimo: awesome, I will checkout the changes
timotimo sortiz: i might know more about the situation once hack lets me in via ssh 10:50
sortiz Well, BDIish v0.1.4 is out: DBDish::Pg now supports Blobs too, and a memory leak fixed in .prepare
timotimo, ok. Thanks. 10:51
Skarsnik did you fix the array part? x) 10:52
timotimo moritz: it seems i can't reach hack.p6c.org via ssh at all; collectd also isn't responding. seems like my hands are tied with regards to fixing it 10:54
10:55 azawawi left
sortiz Skarsnik, Nop, I need the tests for array behavior to know what need fixing, you'll know where I can find some? 10:55
_nadim I've been away for two months or so. I build the latest and my first impression was that it was slightly faster but I have a test example that now takes eon (40s, I think it was more like a few seconds before). Has anything changed that I should be aware of tht could trigger this? 10:56
timotimo hm, two months is after the GLR ...
_nadim GLR?
timotimo great list refactor
jnthn Yes, because it's March now, and that was in 2015 :P
timotimo yeah :)
_nadim: does it use any modules at all? it might be precompiling for a long time; you can find out by supplying --stagestats to perl6 and seeing how long stage parse takes (and how often it shows up) 10:57
sortiz Skarsnik, If you are talking about the DBDish Pg array support. :-)
_nadim timotimo: it's the run time that is a problem
timotimo i'm just saying since we precompile modules that we use at run-time, it's hard to tell without looking at --stagestats 10:58
masak 007 just got its 400th test! \o/
timotimo masak: neat! :)
Skarsnik sortiz, github.com/perl6/DBIish/blob/maste..._arrays.p6
10:58 skids left
_nadim timotimo: but running twice should eliminate the problem, no? 10:58
timotimo not necessarily 10:59
masak also, implementing `a[1][2] = 3;`-style assignment was a lot easier than I thought.
10:59 virtualsue left
timotimo there are things that prevent precompilation from storing its stuff; like use lib after having loaded another module 10:59
or augment
_nadim timotimo: Ok. it's been writing the profile file for 5 mn or so, not a good sign either
timotimo uh-oh, how big's the .html file so far?
_nadim 256 M 11:00
timotimo hahaha, oh crap :)
yeah, your browser won't load that 11:01
_nadim yeah something like that :)
probably not
yoohoo! it too 9 minutes to write the html file!
11:02 salv0 left
timotimo i think you might be able to extract the general information from the resulting file 11:02
like how many GC runs it does, or how much time it spends in running/gc/spesh 11:03
_nadim well it definitly crashed in one of the browsers! 11:04
timotimo no surprise to me :D
sortiz Skarsnik, I thought that azawawi++ had a proper test suite for arrays. :( 11:05
_nadim timotimo: it loaded in firefox, well, it is still but it says 692 GC 11:06
timotimo that's kind of much, but not terribly much
Skarsnik sortiz, my issue with pg Array is having Array in hash, not Array of Array. For now it give stuff like [['a', 'b'], ] instead of ['a', 'b'] 11:07
_nadim 30 000 000 callframes, to put it in perspective, this is a 30 lines data dump.
timotimo i think i want to see your code :D
_nadim it says 45% of time in GC, it's still loading in the browser, I can only see glimpses 11:08
timotimo holy moly :)
_nadim timotimo: panda insta Data::Dump::Tree. The example is examples/JSON_parsed.pl 11:09
11:10 virtualsue joined
sortiz Skarsnik, Can you write a little test with your expectations? 11:10
timotimo holy crap, that's kinda pretty! 11:12
11:13 skids joined
_nadim I'll live in the hope that it is about DDT. 11:13
timotimo yeah, the output is pretty 11:14
_nadim it's readable at least. filtering takes one quite long. it's a port of something I did for P5
more functionality in the third of the code. who said P6 doesn't rock?! 11:15
timotimo it's also super slow ;)
_nadim it is slower than .perl but since any output of .perl takes ages to figure out, it's not much slower ;) 11:16
some things are fast other slow and other DEATH slooooow
well, I am waiting for super P6 optimizations ;)
timotimo well, perf says it's spending 6.5% of its time inside MVM_gc_root_add_frame_roots_to_worklist. and also, 5.15% in MVM_frame_invoke
_nadim what run time did you get? 11:17
timotimo er
_nadim it used to be seconds, now I get 40 seconds
timotimo "too long to be bothered to restart and put 'time' in front"
imgur.com/LFg2GGN - this is fun 11:19
_nadim try the other, eample/all, example/named_captures, ...
they are much faster and they have more output
timotimo you see how a whole lot of stuff has to do with frames?
that's another thing on the "to improve" list of our most talented engineers :P
_nadim my browser is still loading :)
11:20 pmurias left
timotimo i.imgur.com/LFg2GGN.png - you can wget this one 11:20
_nadim unfortunately I m not well versed in that. But I wonder what in the code could do that. Seriously, examples that output twice as much taken 100th of the time 11:21
timotimo i *think* _int_malloc comes from creating a bunch of Int objects that surpass the 32bit mark
11:22 salv0 joined
Skarsnik sortiz, I added a test for it 11:22
timotimo _nadim: if i had to guess i'd say it's heavily dependent on how deep your call stack grows 11:23
_nadim timotimo: and that's what surprises me, there only a few levels in this dump. 11:24
well it did say 30 10⁶ frames. I'll chase that down.
11:25 pmurias joined
sortiz Skarsnik, the pg_array.p6, with a minor change say: name => Bill, pay_by_quarter => [10000 10000 10000 10000], salary_by_month => [511.123 622.345 1], schedule => [[meeting lunch] [training day presentation]] # Seems good to me :) 11:25
Skarsnik duh 11:26
RabidGravy for reference on the performance thing, my naive termcap parser will now do a ful termcap in under a minute, down from around four minutes a year ago 11:27
still not good enough to release the module without some work on optimising it a bit though 11:28
11:29 salv0 left
_nadim timotimo: imgur.com/JgA7sOJ 11:31
11:32 salv0 joined, TEttinger left
timotimo urgh, that gc time is *painful* 11:33
worst i've seen is like 10% 11:34
_nadim timotimo: did you try the other examples? I'd to know if they also run rapidelly on other boxes
timotimo faster
the last bit of named_captures is also slow, for example
_nadim as soon as I get in grammars and such, things get slower. Debug time! 11:37
Skarsnik sortiz, hm, it crash for me Method 'of' not found for invocant of class 'Int' did you fix that?
timotimo well, grammars aren't super crazy fast, either 11:38
11:38 kid51 joined
sortiz Skarsnik, wait a minute... About to commit with test included passing.... 11:39
_nadim the parsing is fast, it's when displaying the results. maybe some part are computed each time. but again, this was much faster 2 months ago (I should be careful when I say that :) ) 11:40
timotimo oh, hm
well, can you find a version close to the one that makes it go slow?
i wanted to make a named_captures that only does the last piece 11:43
but instead of just the last part i get Method 'line' not found for invocant of class 'Cursor'
oh, of course 11:44
forgot to uncomment "my regex line"
_nadim :)
moritz timotimo: I'm rebooting hack right now 11:45
11:45 [Coke] left, masak left, psch left, synopsebot6 left, dalek joined, ChanServ sets mode: +v dalek, synopsebot6 joined
timotimo moritz: at least this time we have collectd's logged data 11:46
thank you, moritz :)
moritz timotimo: I can give you access on the hypervisor, so that in future you can also reboot hack
dalek Iish: f0f776d | (Salvador Ortiz)++ | / (2 files):
DBDish::Pg: Fixes for array handling
11:47
11:47 themonkeybob11 joined
timotimo hurm. i could reboot it, but could i do anything to make it better without rebooting? 11:47
wow, that was kind of fast
moritz timotimo: dunno
timotimo hmm
logging in as root via a serial console kind of deal?
moritz timotimo: no; install virt-manager (a gui program), and enter [email@hidden.address] as an ssh connection 11:48
timotimo: are you coming to the hackathon on Saturday? If yes, I can show you there
timotimo i'll come! 11:49
it's on the 12th, yeah? this saturday?
sortiz Skarsnik, Can you give it a try?
moritz timotimo: correct
timotimo i'm connected! 11:50
moritz timotimo: I'll create a wiki page for the hackathon, and give you the link when it's done
timotimo lovely :)
wow, hack has been down for a *long* time
well, i can see hack's TLB irq spiked before collectd stopped collecting 11:52
11:52 themonkeybob11 left
timotimo the load didn't increase a crazy amount before it went belly-up 11:52
and there was still memory free
the fork rate spiked quite ab it 11:53
a bit*
rjbs jnthn++ latest blog post: interesting!
11:54 perlawhirl joined
perlawhirl hi perlers 11:54
Skarsnik sortiz, I can't find code that use it, huhu
DrForr Hody. 11:55
(that'd be the Western version of 'Hodor')
11:58 pmurias left
timotimo ournalctl -r -b -1 -> Failed to look up boot -1: Cannot assign requested address 11:58
that's a really weird error to have
systemd versions >= 223 will show "-- No entries --" instead. Are you running at least 223? 11:59
11:59 virtualsue left
timotimo so it just didn't keep the data around 12:00
so ... the journal from before the crash are completely gone? :\ 12:01
perlawhirl what would be the best way to watch 2 files in different paths, but have the same action performed 12:02
jnthn perlawhirl: merge
timotimo doc.perl6.org/type/Supply#method_merge 12:03
huggable: Supply.merge
huggable timotimo, nothing found
timotimo huggable: Supply::merge
huggable timotimo, nothing found
timotimo hmm.
jnthn perlawhirl: doc.perl6.org/routine/merge
oh, timotimo beat me to it :P
12:03 sno joined
timotimo falls over for a short while 12:04
i was thinking "maybe i'm tired during the day because of my allergy medicine. and since it's basically freezing outside, are there any pollen out there at all anyway? i should try skipping.
Skarsnik sortiz, I remember what annoyed me with these array. This does not work
timotimo now i'm tired *and* actively allergically reacting to the pollen >_> 12:05
Skarsnik gist.github.com/Skarsnik/5970cec31a4b906b324a
moritz timotimo: get well soon
perlawhirl thanks all <timotimo huggable jnthn> 12:06
jnthn timotimo: urgh :(
12:07 labster left
RabidGravy perlawhirl, "my @paths = ".", "/tmp", "/var"; my $supply = Supply.merge(@paths.map({ $_.IO.watch })); react { whenever $supply { say $_; } }" 12:08
by way of concrete working example
more verbose versions are available ;-) 12:09
Skarsnik oh there is a IO.watch? look neat 12:10
sortiz Skarsnik, I think that I can fix that...
RabidGravy I think that was one of the first features that made me really go OoOOOoooOOOooh 12:11
perlawhirl thanks Rabid... I was on my way there... already had a react block. I'll be back if i get stucl :D 12:12
Skarsnik sortiz, good luck, I give up try to find how to bind or not to have the right form of array in the hash x)
DrForr I'll have to remember the .watch business to impleemnt the restart stuff in Prancer. 12:13
RabidGravy :) 12:14
12:14 kaare_ joined
perlawhirl RabidGravy: yep all working. my files are already IO objects, so it was a simple matter of $s = Supply.merge($file1.watch, $file2.watch); 12:14
RabidGravy yay!
groovetastic! 12:15
jnthn suppliesingly easy async \o/
perlawhirl also using $s.stable(1) so as only to trigger once per change... a file update triggers 4 changes on linux, so stable comes in handy
sortiz Skarsnik, now the rest of code uses real types, but the array path uses the old strings, I will change that.
perlawhirl jnthn: HAH!
DrForr www.youtube.com/watch?v=5AplRigbvtI 12:16
Skarsnik sortiz, it's not the type affection, it's more the fact the new/build construction does not see $[] as array to give to an array attribute
jnthn
.oO( Type affection? Like role Cuddle[::T] { ... } )
12:18
lunch & 12:20
sortiz Skarsnik, Inside an array all elements are itemized, but can be of any type, I only need to propagate the needed type to the generic constructor. 12:21
12:24 rindolf joined
perlawhirl RabidGravy: fwiw, if your paths are already IO objects, you can do Supply.merge(@paths».watch) 12:27
RabidGravy yaw
I'm a "hyper denialist"
if you want a full featured example of "doing stuff on file changes" you may be interested in github.com/jonathanstowe/Tinky/blo...code-files 12:28
perlawhirl hah, i'm on the fence. they are not yet hyper, and map is more explicit
cool, will check it out 12:29
12:32 masak joined
perlawhirl RabidGravy: OH! btw... in your code samples in README.md... you can can get syntax highlighting with ```perl6 12:33
12:35 themonkeybob11 joined 12:40 themonkeybob11 left
RabidGravy Oooh you learn something new everyday :) 12:40
12:40 sufrostico joined
perlawhirl yeah, i learned it when someone told skids on here. 12:41
sortiz Skarsnik, your stuff need something like: got: ${:name("Bill"), :pay_by_quarter(Array[Int].new(10000, 10000, 10000, 10000)), :salary_by_month(Array[Num].new(511.123e0, 622.345e0, 1e0)), :schedule($[Array[Str].new("meeting", "lunch"), Array[Str].new("training day", "presentation")])} ? 12:47
Skarsnik hm, maybe?
12:47 kid51 left
sortiz With the change, the new test fails ;) 12:48
Skarsnik I just remember than when it was giving me [[porper array],]; doing %h<k> = %k<k>[0]; and Class.new(|%h) worked 12:49
12:51 rindolf left 12:58 themonkeybob11 joined 13:06 musiKk_ joined 13:11 musiKk_ left
_nadim Given class C is B is A and B and A defining method something. How can I force calling a specifc class' method? 13:24
moritz _nadim: yes, self.A::something() 13:25
_nadim thank you
13:29 CIAvash left 13:31 FROGGS left 13:36 [Coke] joined
[Coke] crawls his way back onto IRC. 13:37
masak [Coke]: welcome back!
RabidGravy no crawling, skipping or bounding are permissible but not crawling
DrForr What about sillywalks? 13:38
RabidGravy silly walking iss fine 13:39
masak unless it's so silly it's actually crawling
[Coke] irssi question: any idea why some channels I have saved come back as just (e.g.) (8:freenode) with no indication of what channel it actually was? 13:41
[Coke] gives up on trying to review post-disconnect.
13:42 themonkeybob11 left
jast tends to happen if irssi remembers what used to be in that window but didn't actually rejoin the channel 13:42
e.g. if you saved the channel without the -auto flag or the server prevented you from rejoining at the time you connected 13:43
13:43 themonkeybob11 joined
_nadim timotimo: well, I found something that made it twice as slow. and when I think about it ... I was pretty stupid. I have $s.perl ne 'Mu', which means that everything was rendered add nauseum! 13:45
How do I compare a variable to Mu?
[Coke] m: my Mu $a; say 3 ~~ Mu; say $a ~~ Mu; # checking 13:46
camelia rakudo-moar 2f78f0: OUTPUT«True␤True␤»
_nadim mmm, bleahh, I tried that something didn't work. thanks I'll try again, makes the tast go from 40 s to less than 2 secs. 13:48
rudi_s Hi. Is there a glob in perl6?
moritz nope 13:49
rudi_s So I'll have to use dir and then filter with a regex?
jnthn rudi_s: No, but there's an IO::Glob module available
moritz and there no "type globs" (p5 thingy) either :-) 13:50
_nadim m: my $a ; say $a ~~ Mu 13:53
camelia rakudo-moar 2f78f0: OUTPUT«True␤»
RabidGravy _nadim, >
m: my Mu $a; my Int $b; say $a.WHAT =:= Mu, $b.WHAT =:= Mu
camelia rakudo-moar 2f78f0: OUTPUT«TrueFalse␤»
_nadim thank you, everything matches Mu that's why I did a stupid hack 13:54
RabidGravy yep
_nadim what's the =:=, compared to ==
or ~~ 13:55
RabidGravy the ~~ will match all superclasses and roles (so almost always true with Mu)
sortiz Skarsnik, Done. You just need to make an automatic class constructor...
_nadim RabidGravy: and the fantasmagoric =:= 13:56
RabidGravy the =:= is "container identity"
so the variable's .WHAT and the type Mu are the same thing 13:57
_nadim m: my Mu $a; my Int $b; say $a.WHAT !=:= Mu ;
camelia rakudo-moar 2f78f0: OUTPUT«False␤»
13:58 perlawhirl left, themonkeybob11 left
_nadim RabidGravy: I wrote "I also had the pleasure to meet Mu, although theorically you can't meet Mu." I should have write the displeasure. 13:59
rudi_s How can I match a variable verbatim, like \Q..\E in perl5? 14:02
masak rudi_s: that's the default 14:03
m: my $x = "fo+"; say "fo+" ~~ /^ $x $/; say "foooo" ~~ /^ $x $/
camelia rakudo-moar 2f78f0: OUTPUT«「fo+」␤Nil␤»
masak m: my $x = "fo+"; say so "fo+" ~~ /^ $x $/; say so "foooo" ~~ /^ $x $/ 14:04
camelia rakudo-moar 2f78f0: OUTPUT«True␤False␤»
jnthn rjbs: Just spotted www.nntp.perl.org/group/perl.perl5....34775.html in the p5p weekly summary; bit tied up with other $dayjob tasks to read the whole thread and see if it was mentioned, but Perl 6 does have qqw, if you want to nab some design :) 14:05
Skarsnik sortiz, ?
sortiz Skarsnik, for the binding to work the class needs a BUILD submethod, that's all. 14:07
14:08 pmurias joined, mzgcz joined
pmurias where do the result of TPF grant applications get announced? news.perlfoundation.org? 14:09
Skarsnik sortiz, I don't know, this work (worked?) for me github.com/Skarsnik/fimstuff/blob/...ry.pm6#L75 tags and character tags are both Array[Str] and the Story class does not have a constructor/build defined 14:10
jnthn pmurias: Yes, though you may receive notification by email before that happens too. 14:11
And if you're me, a week after that email you'll get bored of waiting and let the cat out of the bag yourself. :P 14:12
rudi_s masak: Thank you.
jnthn gets the impression tpf++ could use more volunteers :) 14:13
lizmat people at TPF are volunteers, just like the rest of us 14:14
yoleaux 10:31Z <jnthn> lizmat: The signature check compiles into a postconstraint; we can't really do it out of nominal typing, I don't think, and don't know we'd want to introduce a whole new mechanism when we can compile it as a constraint.
[Coke] jnthn: it's an oddly run beast.
(they have GC volunteers, for example, who could probably do more else-ways, but I don't think thtat's generally tapped) 14:15
lizmat jnthn: so a post constraint implies a runtime check, so a mismatch at compile, right?
nine jnthn: indeed. I've been trying to set up recurring donations to the P6 core fund for three months. Progress is slooow... 14:16
jnthn lizmat: I'm...confused? :) 14:18
awwaiid hoelzro: in your n-gram post, Dumb nit -- In your "Extracting n-grams" section code snippet, you should indent the inline Perl 6 code a nice 4 spaces or something. Rakudo won't care that everything has whitespace in the front, and your script will read better :)
jnthn lizmat: Oh, you mean that since the check is runtime, then we can't compare them at compile time? 14:19
lizmat m: dd :(&foo:()) ~~ :(&foo:()) # jnthn
camelia rakudo-moar 2f78f0: OUTPUT«Bool::True␤»
lizmat this should be false
jnthn: indeed
14:20 pmurias left
lizmat even though the signatures look identical, we can't be sure from introspection 14:20
because we can't look into the post constraint
jnthn lizmat: Yeah, we certainly can't with the current way we handle that.
Though 14:21
m: say :(&foo:()).perl
camelia rakudo-moar 2f78f0: OUTPUT«:(&foo where { ... })␤»
jnthn m: say :(&foo:()).params[0].constraints
camelia rakudo-moar 2f78f0: OUTPUT«all(-> ;; $_ { #`(Block|83355984) ... })␤»
jnthn Yeah, we can't :)
m: say :(1).params[0].constraints
camelia rakudo-moar 2f78f0: OUTPUT«all(1)␤»
lizmat ok, so if a spectest relies on it being possible, it's wrong :-)
jnthn Though I wonder... 14:22
m: say sub foo($x) { } ~~ :($x)
camelia rakudo-moar 2f78f0: OUTPUT«False␤»
lizmat jnthn: that one, will work
14:22 mzgcz left
sortiz Skarsnik, Two things changed: Now the produced arrays are in fact Typed and the resulting hash is used directly. Works well. And make sense, through a generic public accessor you can assign, but not bind to the arrays, needed for types preservation. 14:22
lizmat m: dd :(6) ~~ :(6)
camelia rakudo-moar 2f78f0: OUTPUT«Bool::True␤»
jnthn If code objects smart-matched against signatures properly, then we could actually maybe make it work
lizmat because the post-constraint is actually stored as a value
jnthn By storing the signature directly in the constraint
Because all we do is smart-match against it 14:23
hoelzro awwaiid: thanks for the suggestion; just made the change!
lizmat jnthn: yeah, I could see that work
masak I just saw shimmeryfairy.wordpress.com/2016/0...w-im-gone/
for those of you looking for the whole quote at the end of it, it's here: irclog.perlgeek.de/perl6/2016-01-19#i_11909557
lizmat wonders if masak reads the P6W :-)
masak lizmat: yes, that's where I found it :) 14:24
I'm an irrgular reader, but jnthn said something that reminded me of p6w
rjbs jnthn: yeah, may have a look at subtleties of p6 qqw
lizmat masak: I think we should let ShimmerFairy work things out for herself 14:25
I mean, if the Eagles can get together again :-)
*could
masak troo
well, one can hope
awwaiid hoelzro: looks nice! Also good article :) 14:26
14:26 [Sno] joined
Ulti jnthn just as an FYI between 26th Feb Rakudo and from 5 minutes ago my code has gone from 71.3% JIT compiled frames down to 62.6% and takes a bit longer 14:26
I can put the profiles somwhere for you if that is useful 14:27
hoelzro thanks! glad you enjoyed it =)
awwaiid hoelzro: what does ">|" in shell do? and now that I'm looking again you're missing the ;done
jnthn masak: While it's a pity, I also don't really think pointing fingers at other volunteers and saying "you fucked up" is the kind of atmosphre I want in Perl 6 development.
masak agreed. 14:28
14:29 molaf joined, sno left
jnthn Ulti: Interesting. Does the number of inlined frames change between the two? 14:29
geekosaur awwaiid, in bash it toggles the "must (not) exist" check
jnthn Ulti: If yes, I wonder if we bail on JITting some things. 14:30
masak maybe what this highlights is that "be nice" (and S27) and "principle of charity" isn't always enough. sometimes people just end up bummed out and leave.
Ulti yeah 17.5% inlined upto 20.3% a lot of the frames lost from JIT appear to be in the specialised
so is that just them being inlined instead?
awwaiid geekosaur: mmm. I don't know what that means :) . ohh -- for the redirect file it's putting it into?
geekosaur yes 14:31
RabidGravy Eagles getting back together again? NO!
Ulti the speed is probably about the same all things considered given its just a single data point
awwaiid ah. and found a ref now with those keywords -- unix.stackexchange.com/questions/45...at-does-do
thanks!
RabidGravy destroys "country rock" with fire
Ulti and the variance on speed is measured in seconds
I always run a few times to get things in IO cache though
jnthn Ulti: Well, I think the way we measure JIT or not in the profiler is smart enough to keep that number consistent despite inlining
Ulti: So if we're JITting less now then it really does mean we're not JITting something we used to 14:32
hoelzro awwaiid: >| overrides noclobber
Ulti jnthn oh :(
awwaiid ah, and I have noclobber=off
Ulti whatever it is must be quite minor at least to my code
jnthn Ulti: Could you set MVM_JIT_LOG=jit_log and run it with that?
And gist/send me the resulting file?
Ulti I can on the latest version
jnthn Sure, that's enough
Ulti k k
jnthn It should tell me what particular non-JITted ops we block on 14:33
dalek kudo/nom: bb0eab2 | lizmat++ | src/core/Parameter.pm:
Include post constraint in Parameter.ACCEPTS
14:38
kudo/repl6: f6c5b23 | hoelzro++ | src/ (2 files):
Provide callback in adverbs for signalling more input

There's really no good interface for signalling that we need more input, especially across the NQP↔Perl 6 boundary. Ideally, I would make eval return multiple values, and the second value
  (or something) would signal multi-line input, but that would change
the interface, and potentially upset anyone using NQP outside of the Rakudo effort.
14:40
masak also, ShimmerFairy seems to have wrongly concluded that the biggest problem with her approach was the lack of an apology. when the problem was more that she was being grating, accusing, and unconstructive. 14:42
14:43 ParsonsNose joined
Ulti jnthn was too big for gist mattoates.co.uk/files/perl6/BioInfo...8-ga329e2d 14:45
dalek ast: af717d6 | lizmat++ | S03-smartmatch/signature-signature.t:
Mark now failing test as TODO

Because Parameter.ACCEPTS also includes post constraint checking since bb0eab24f7e8a2f1 and having a Callable as a post constraint will always fail the smart match (because we can not introspect the Callable), and the signature on a Callable ( like :(&foo:() ) is compiled as a Callable, this test no longer succeeds.
Discussion at irclog.perlgeek.de/perl6/2016-03-07#i_12149245
Since the idea posted there would be to store the signature directly in the post constraint, I've todoed this test for better times.
[Coke] does that change in roast mean we're breaking a 6.c test?
lizmat [Coke]: yes, the todo will be needed in 6.c-errata as well 14:47
14:51 brrt joined 14:54 damnlie left
dalek ast/6.c-errata: 2c19daf | lizmat++ | S03-smartmatch/signature-signature.t:
Mark now failing test as TODO

Because Parameter.ACCEPTS also includes post constraint checking since bb0eab24f7e8a2f1 and having a Callable as a post constraint will always fail the smart match (because we can not introspect the Callable), and the signature on a Callable ( like :(&foo:() ) is compiled as a Callable, this test no longer succeeds.
Discussion at irclog.perlgeek.de/perl6/2016-03-07#i_12149245
Since the idea posted there would be to store the signature directly in the post constraint, I've todoed this test for better times.
15:02
_nadim .tell timotimo new version of DDT is waiting for merge in ecosystem. the example that took 42 seconds this morning takes less than 2 seconds. 15:07
yoleaux _nadim: I'll pass your message to timotimo.
jnthn Ulti: Thanks, that's useful. 15:11
15:11 FROGGS joined, AlexDaniel joined
dalek osystem: c8c3707 | (Nadim Khemir)++ | META.list:
CHANGED: v1.0.2
15:13
osystem: 653a904 | jnthn++ | META.list:
Merge pull request #167 from nkh/master

CHANGED: v1.0.2
lizmat jnthn: fwiw, [Tux]'s test-t also saw a bit of a drop in performance that looked like it was just outside of noise range 15:14
jnthn lizmat: Yeah, maybe it could be attributed to similar causes
|Tux| sorry I missed timings during the past week, but the promised WiFi in the appartment was apparently non-existent 15:15
http only and very very very instable (if it did last for more than 5 minutes at all)
lizmat [Tux]: you were on holiday! :-) 15:19
15:20 yeahnoob left
RabidGravy Gah! Everything I touch explodes into a whole himalaya of yaks 15:20
lizmat knows the feeling :-)
15:20 Actualeyes left 15:22 rindolf joined
[Coke] has temporarily solved that by not hacking on things! 15:22
[Coke] is not happy with this arrangement.
15:23 brrt left
_nadim is looking for a some ugly, big, blobby, umpossible to read, the more complex the better, data structures to dump. Either the data structures or how to generate them. 15:26
dalek kudo/nom: f1bfd5a | lizmat++ | src/core/Parameter.pm:
Oops, we should .ACCEPTS instead of eqv

Which, btw, will also handle the case when we store the signature in the post constraint in the future
AlexDaniel jnthn++ # less memory leaks, yeaaa! 15:28
15:35 damnlie joined
jnthn m: sub bs-ds($n) { my @p = item {}; for ^$n { my $ds = (Hash, Array).pick.new; my $to = @p[(^@p).pick]; $to ~~ Hash ?? ($to{join '', ('a'..'z').pick xx 5} = $ds) !! $to.push($ds); @p.push($ds) }; @p[0] }; say bs-ds(50).perl 15:35
camelia rakudo-moar f1bfd5: OUTPUT«${:hrhjp(${:ezefp($[]), :oeygr(${}), :uepmn(${}), :xscyk($[])}), :njbjq($[[[[], [[],]], {:llmow($[[],])}, {}], [[[[], [{},]],], [{:gbeme(${}), :riipy($[])}, {:qpeun(${})}]], [[[[{},],], [{:fgalc(${:kndui(${:dgxck($[])})})}, []]], {}], {:vdkmt(${})}]), :vpa…»
jnthn _nadim: ^^ random crap data structure generator ;)
Skarsnik huhu
lizmat m: dd :($a,$b) ~~ :($a ;; $b) # jnthn: another case of WAT? should this be true? 15:40
camelia rakudo-moar f1bfd5: OUTPUT«Bool::True␤»
15:41 fireartist left 15:44 hoelzro left, hoelzro joined
jnthn lizmat: Good question. :) 15:44
lizmat: It doesn't affect the set of accepted values
lizmat: It does of course affect how it multi-dispatches
lizmat so you're saying, for the Parameter.ACCEPTS,it shouldn't matter 15:45
but for the Signature.ACCEPTS it should ?
jnthn Tricky :)
lizmat I try not to ask dumb questions :-) 15:47
15:55 ambs left
lizmat FWIW, making it affect Parameter.ACCEPTS: 15:56
$ 6 'dd :($a ;; $b).params[1] ~~ :($a,$b).params[1]'
Bool::False
does not cause any spectest errors
jnthn lizmat: I think that, since we use this to decide if two multis are "the same" for the purpose of role composition, we have to consider the ;; 15:59
lizmat: I'm not sure it's worth the complexity of lifting that logic out of Parameter and into Signature 16:00
_nadim jnthn: I am trying it right now!
lizmat ok, I'll leave it in Parameter then for now 16:01
dalek kudo/nom: c7be33a | lizmat++ | src/core/Parameter.pm:
Parameter.ACCEPTS checks being part of MMD

As discussed at irclog.perlgeek.de/perl6/2016-03-07#i_12149632
16:03
16:07 somesymbols joined
skids _nadim: I would think any modern dynamically generated webpage would parse into something sufficiently ugly, big, blobby, and impossible to read for most purposes :-) 16:09
_nadim skids: indeed 16:10
jnthn: look what you've done! imgur.com/nlDLl6r
but I think data structures from P6 modules would be neat as they would test for types that I may not have support for. 16:11
skids Try it on some Match objects? Maybe something in Grammar::BNF. 16:12
somesymbols Do something more convenient exists instead of --- @*ARGS=QX('DIR/B *.csv').split(/\n/) --- for gettings arguments in one-liner in windows? 16:13
16:13 musiKk_ joined
_nadim I do try grammars and such. Just added support for callframes too. 16:13
somesymbols: what about calling you script with dir/b/*.cvs as arguments and use the standard parsing? 16:14
jnthn _nadim: Oh my... :) 16:15
geekosaur _nadim, they want the result of that, not the strings themselves
and windows doesn't have $()
16:15 Actualeyes joined 16:16 nakiro left, themonkeybob11 joined, zakharyas left
jnthn somesymbols: dir(test => /\.csv/) maybe 16:17
lizmat I will be away for a few hours, and when back: work on the P6W 16:18
PSA: so if you have any news you want in there, let me know by privmsg or here on the channel 16:19
&
cognominal m: sub bs-ds($n) { my @p = item {}; for ^$n { my $ds = (Hash, Array).pick.new; my $to = @p[(^@p).pick]; $to ~~ Hash ?? ($to{join '', ('a'..'z').pick xx (1..5).pick} = $ds) !! $to.push($ds); @p.push($ds) }; @p[0] }; say bs-ds(10).perl
camelia rakudo-moar c7be33: OUTPUT«${:b($[{:qftq(${:votm($[])})},]), :sk($[[],]), :w(${}), :xte(${})}␤»
_nadim cognominal: that's why I can wait 5 secs to get something like this imgur.com/nlDLl6r 16:28
honestly, as soon as there is some quantity, .perl becomes difficult to read. 16:29
somesymbols _nadim: I need to mimic P5's magic diamonds ( <> )
FROGGS .perl is not meant to be read, .gist however is
timotimo moo 16:30
yoleaux 15:07Z <_nadim> timotimo: new version of DDT is waiting for merge in ecosystem. the example that took 42 seconds this morning takes less than 2 seconds.
_nadim somesymbols: got that from the explanation
FROGGS: I must admit that I have not used it much. Did use Data::Dump but it fails a tad too often at unexpected data.
rudi_s Can I access the current list of available subs? I know MY::.keys gets me local variables, but how do I get the subs? 16:33
FROGGS we currently just have two things: .perl which is meant to round-trip but is not meant to be seen by human eyes and whe have .gist which should like nice but is allowed to loose data
hoelzro rudi_s: all subs? even those from the standard library?
if so, you probably want CORE::.keys.grep(/^ '&'/)
FROGGS a .perl that looks nice would be nice though I guess
bbl
16:33 FROGGS left
rudi_s hoelzro: All subs is fine, thank you. 16:34
hoelzro m: .say for CORE::.keys.grep(/^ '&'/)
camelia rakudo-moar c7be33: OUTPUT«&callframe␤&flat␤&RETURN-LIST␤&infix:<∖>␤&splice␤&postcircumfix:<{ }>␤&callsame␤&GATHER␤&sinh␤&infix:<lt>␤&print␤&asech␤&GENERATE-ROLE-FROM-VALUE␤&infix:<eq>␤&ORDER␤&append␤&METAOP_TEST_ASSIGN:<&&>␤&METAOP_HYPER_POSTFIX…»
AlexDaniel .u ∖ 16:35
yoleaux U+2216 SET MINUS [Sm] (∖)
16:36 cdg joined
timotimo _nadim: i'm glad the time improved; maybe now a profile can be made that doesn't explode? 16:36
.perl can generate some deep call traces
_nadim most probably :)
rudi_s hoelzro: Hm. Doesn't seem to work. 16:37
m: sub foo() { }; say CORE::.keys.grep(/'foo'/).say
camelia rakudo-moar c7be33: OUTPUT«()␤True␤»
rudi_s m: sub foo() { }; say CORE::.keys.grep(/'foo'/).perl
camelia rakudo-moar c7be33: OUTPUT«().Seq␤»
hoelzro rudi_s: that's because foo isn't in CORE.setting
CORE:: is just what's in CORE.setting
sorry if my suggestion was misleading
rudi_s np - I want to get all subs. 16:38
Including my subs (only my subs is fine, but if all get included that's fine too).
hoelzro there might be a pseudostash you can use for "everything in scope", but afaik, you need to look at CORE::, MY::, and possibly a few others
somesymbols jnthn: @*ARGS=dir(test=>/\.csv/).map(*.Str) --- works fine but not convenient for oneliners
AlexDaniel somesymbols: what are you trying to do?
rudi_s hoelzro: Ah, it's in MY:: - not sure how I missed that. Thank you. 16:39
AlexDaniel ah, <>
timotimo if you're golfing, you can ~<<blah instead of blah.map(*.Str)
AlexDaniel somesymbols: what about ~«dir(test=>/\.csv/) ? :) 16:40
16:40 donaldh joined 16:41 jjido left
AlexDaniel m: .say for ~«dir 16:41
camelia rakudo-moar c7be33: OUTPUT«.cpanm␤.local␤.npm␤.perl6␤.perlbrew␤.rcc␤.ssh␤Perlito␤evalbot␤log␤niecza␤nqp-js␤p1␤p2␤perl5␤rakudo-inst-1␤rakudo-inst-2␤rakudo1␤rakudo2␤star-2014.09␤std␤.bash_history␤.bashrc␤mbox␤.lesshst␤evalbot.log␤.cp…»
timotimo _nadim: my modified version of named_captures is now way too fast to be interesting for performance analysis :P 16:42
16:43 khw joined
mspo should camelia be allowing that sort of thing? 16:43
somesymbols AlexDaniel: not bad but only windows10 can handle utf8 from stdin
_nadim timotimo: I told you that it was faster than what we had :)
timotimo well, yeah
"faster" doesn't quite do it justice :D
_nadim I'd like it to be a tad faster but it is, IMO, usable 16:44
can't get bell and whisltles without spending time on them.
AlexDaniel m: spurt ‘test’, ‘hello world’
camelia rakudo-moar c7be33: OUTPUT«spurt is disallowed in restricted setting␤ in sub restricted at src/RESTRICTED.setting line 1␤ in sub spurt at src/RESTRICTED.setting line 17␤ in block <unit> at /tmp/0wYnpM67Uy line 1␤␤»
_nadim gist is indeed better but still, anything a tad long become a pain. even without color, filtering, ... I still need something a bit better. nopaste.linux-dev.org/?981948 16:45
timotimo browser's having some difficulty with the profiles, still :|
_nadim timotimo: change browser, Chrome died on me, firefox took ages but managed 16:46
timotimo heh.
AlexDaniel geez some dir bug… 16:47
timotimo huh, firefox really does manage
rudi_s hoelzro: Any idea how to get this working if I use this with EVALFILE? I have sub foo() { }; EVALFILE 't.p6'; and in t.p6 I can call foo, but MY:: and OUTER:: doesn't list foo. 16:49
hoelzro rudi_s: what about OUTERS:: ? 16:50
I think LEXICAL:: covers all of it, now that I'm looking at S02-bits
16:51 domidumont left
rudi_s hoelzro: Neither work. 16:52
timotimo _nadim: it's a bit hard to sort by exclusive time in firefox ... :S but at least it doesn't outright crash 16:53
hoelzro rudi_s: don't work how?
NYI, or?
_nadim timotimo: maybe raw data in a perl structure that one can manipulate would be easier 16:54
timotimo you can get that
just --profile-filename=foo.json 16:55
and then use the qt profiler from tadzik's github
it doesn't analyze as much of the info, though
rudi_s hoelzro: Sorry, no output. It doesn't list foo.
hoelzro ah ha
well, I would recommend playing with other pseudostashes listed in S02 16:56
rudi_s hoelzro: I think I tried all of them. - I read in a blog-post, that perl6 uses Stashes for methods/subs, but I can't find anything how I can get the current stash. 16:58
hoelzro $?PACKAGE, iirc
not sure about methods, though
16:58 somesymbols left
hoelzro I forget how $?PACKAGE works when you're in a class 16:59
16:59 abraxxa left
rudi_s Empty too. 16:59
Hm. Another question, can I somehow exclude subs from EVAL/EVALFILE?
I want to provide a given list of subs to the evaled file, but it looks like it can access every sub declared.
hoelzro hmm, maybe UNIT:: 17:00
I don't about that; I would look at the EVALFILE impl
timotimo _nadim: it sorted! 17:02
_nadim: i see 13.39% time spent inside find_best_dispatchee, which is ... bad 17:04
_nadim: and yeah, the call stack looks deep ... dump, get_dump, get_dump, get_dump_lines, render_root, render_element, render_non_final, sink, sink-all, render_element, render_non_final, sink, sink-all, render_element, render_non_final, sink, sink-all, render_element, ... ... 17:06
_nadim there's quite a few multi methods
timotimo we shouldn't be hitting find_best_dispatchee more than a tiny bit
_nadim the depth of the stack is equal to the depth of the data structure, not much more 17:07
timotimo perhaps "times three", though :)
well, invocationg getting improved is a thing that'll happen in the future
_nadim nope, not times three, or at least it shouldn't 17:08
the first get_dum, dump, get_dump lines do no appear again
timotimo until then, i can say that JSON::Fast has a to-json that doesn't use recursion and it's significantly faster than JSON::Tiny which does use recursion
_nadim I am pretty sure of that 17:09
the dumper recusion is all in render_element/render_non_final etc ..
timotimo that's fair
do you have any "where" clauses in your code perhaps?
17:10 musiKk_ left
_nadim nope 17:10
timotimo hm, right
17:10 FROGGS joined
_nadim everything gets split, colored, wrapped, it takes some time 17:11
but everything goes through muti methods, one per type
although they are not more than 15 17:12
timotimo that's not the problem; normally we can dispatch via the multi cache 17:13
_nadim I must admit that I am curious about where the problem is. stack depth should not be it. there's a lot of calls tough 17:14
timotimo right. i don't know, either. it's not that easy to track where it gets called from, short of outputting a traceback from that particular function 17:17
which i'm not quite sure how to do from nqp
17:20 tmch left
_nadim I'm trying to wrap my head around the profilers output, as soon as the page loads 17:20
17:22 donaldh left 17:26 donaldh joined 17:35 SCHAAP137 joined
RabidGravy is curious about this "DeathMetal" drumkit he appears to have 17:40
timotimo RabidGravy: what kind of software does a no-clue-whatsoever-about-music linux user use to track out some melodies or something? i've looked at lmms, but i've been told that's the opposite of modern or something ... 17:44
RabidGravy just a simple piano roll style sequencer? I'd use seq24 17:45
timotimo when i was a wee lad, i played around with MadTracker a little bit, but i didn't have any sensible samples or something, so i never ended up making anything
RabidGravy but it's just a sequencer so you would have to arrange the instruments too
timotimo right; i'd probably fall back to lmms to get the instruments. and then i'd have a drumroll in there, too 17:46
17:46 telex left
timotimo er, piano roll 17:46
RabidGravy like notes in the Y axis, time in the X axis
timotimo yeah 17:47
RabidGravy I use Ardour almost exclusively these days, does recording, sequencing and everything
timotimo so ... are lmms or qtractor kind-of-okay?
ah
i've spent about an hour trying to get ardour to make any sound whatsoever. it's stayed silent the whole time 17:48
RabidGravy yeah, you need to hook jack up to your sound card, load instruments and stuff 17:49
timotimo just saying lmms was much easier :D
RabidGravy I've used lmms in the past, found it quite weird
rosegarden is another step up 17:50
for composition it's great
timotimo mhm
the thing is, i don't even have a feeling that'll let me figure out what kind of note i hear vs what letter i'd have for the note
i think i want to have a window open that'll show me what (approximate) note i'm whistling into the microphone :D 17:51
Woodi hi today :) 17:52
RabidGravy or if you want an old school tracker type thing apparently schismtracker.org/wiki/Schism%20Tracker works
but I haven't used it
timotimo it's so old-school that it hasn't seen a release in 4 years :)
seems legit
17:53 dwarring joined
timotimo www.youtube.com/watch?v=ACQlhNrCTI...e=youtu.be - i just recently saw this and it made me want to music. sadly, i can't music at all, so it's kind of difficult :D 17:54
(that's pico8's built-in tracker right there)
RabidGravy I tend to use real hardware for serious stuff www.facebook.com/RabidGravy/photos...8279215887 17:55
17:56 domidumont joined
timotimo yeah, i don't have any real hardware :) 17:56
and i don't do anything serious, ever.
Woodi I imagine perfect blog software as: 1) allows to GET static HTML posts; 2) allows logged-in person to create _static files_ via TinyMCE-like thing... no database around, no templates, just static HTML files. cannot find something like this... 17:57
17:57 telex joined
[Coke] anything in the pipeline for a march release that warrants a 6.d yet? 17:57
Woodi maybe Prencer or other Perl6 framework allow such thing ? 17:58
[Coke] Or are we still on target for a 6.c-only deliverable?
Woodi [Coke]: I vote 6.c up to 2017+ ...
[Coke] Woodi: it's going to be an organic thing, not a decree. 17:59
I'm asking if there is work in progress that impacts that; (Guessing no)
dalek kudo/nom: 42598a9 | coke++ | docs/release_guide.pod:
Sign up for month 7 in a row.
18:00
Woodi [Coke]++ !
18:01 donaldh left
dalek kudo/nom: 4a0ba74 | coke++ | docs/release_guide.pod:
remove placeholder

Only list dates we shipped, not potential dates we didn't
18:03
jnthn We'll likely do a 6.c.1 at some point in the next months, so folks can depend on the various fixes/improvements since 6.c. 18:04
The major lang releases for now are more about marketing, meaning they'll happen when we've things we really want to show off. Non-blocking await is a candidate for 6.d, for example. 18:05
[Coke] jnthn: is that month this month?
I doubt it. 18:06
hey, docs/ROADMAP could use some care (or deletion)
jnthn [Coke]: No, I don't think this month 18:07
[Coke] also docs/architecture.html
moritz why is non-blocking await a candidate for 6.d?
I mean, all it does is not using up a thread for await, no? 18:08
jnthn moritz: Yeah, which is quite a big deal for how you can use it.
RabidGravy me want
18:09 themonkeybob11 left
RabidGravy makes some of the madder potential uses of Tinky actually doable 18:09
AlexDaniel can anybody try something for me? Here is a oneliner (preferably run that in an empty directory): perl -E 'mkdir pack "h*", "60ba"'; perl6 -e 'dir'
18:10 themonkeybob11 joined
RabidGravy If anyone's wanting to fix what may be an actual bug in async though rt.perl.org/Ticket/Display.html?id=127428 would be nice :) 18:12
AlexDaniel what I am seeing here is “Malformed UTF-8 at line 1 col 2” and it just dies 18:13
jnthn RabidGravy: Yeah, looks like an actual bug
18:14 Actualeyes left
jnthn Back to the kitchen...and then nomming :) & 18:14
AlexDaniel anybody? 18:18
18:19 Laurent_R joined
ugexe i get the same thing 18:19
AlexDaniel: ^
AlexDaniel alright 18:20
18:22 donaldh joined
b2gills The documentation for quoting is both lacking, and wrong 18:23
It says that 「qqw//」 is the same as 「« »」 when it is actually the same as 「qqww//」 18:24
18:26 sufrostico left
[Coke] gets an email asking why 2016.02 didn't get a release announcement or a changelog. wtf? 18:26
RabidGravy "because you didn't do it" 18:28
AlexDaniel ugexe: thank you 18:29
ParsonsNose AlexDaniel I get no errors. it just makes a directory called ^F%AB/ .. 18:31
AlexDaniel ParsonsNose: is it on Windows?
ParsonsNose nooope
AlexDaniel ParsonsNose: which filesystem then?
ParsonsNose osx
AlexDaniel ParsonsNose: ok, thank you 18:32
ugexe gist.github.com/ugexe/327349da6cd1...e1-txt-L23 It seems like the CATCH on line 8 should catch it
(line 23 is where the error points to with --ll-exception)
Windows gives no error, and doesnt appear to make the directory 18:35
AlexDaniel xD 18:36
18:39 themonkeybob11 left 18:41 donaldh left
AlexDaniel ugexe: I submitted a ticket: rt.perl.org/Ticket/Display.html?id=127671 18:41
ugexe i wonder if its happening in the exception itself, in either :path or :os-error 18:42
AlexDaniel Oh by the way. Somebody was wondering why there is no protection against deep recursion. Now I've found this bug report: rt.perl.org/Ticket/Display.html?id=127253 18:44
… which was submitted by me. I should probably get a new brain to remember bugs that I have submitted 18:45
perlpilot AlexDaniel: does the second example in that ticket die faster? 18:46
AlexDaniel perlpilot: dunno! Try it? 18:47
perlpilot I did. They are both taking forever :)
AlexDaniel m: sub foo() { return foo }; say foo 18:48
camelia rakudo-moar 4a0ba7: OUTPUT«Memory allocation failed; could not allocate 37888 bytes␤»
AlexDaniel m: sub foo($x = foo) { 42 }; say foo
18:48 themonkeybob11 joined
camelia rakudo-moar 4a0ba7: OUTPUT«Memory allocation failed; could not allocate 14597504 bytes␤» 18:48
AlexDaniel perlpilot: looks like second one is slower 18:49
but I don't know why :)
18:49 vendethiel joined 18:51 skids left
rudi_s Is there a difference between module A { class B { .. } } and class A::B { .. } ? 18:51
18:52 alpha123 joined
perlpilot rudi_s: yes 18:53
rudi_s perlpilot: Perfect, thank you. 18:54
perlpilot rudi_s: why do you care that they are different? (and you didn't even ask what the difference is! :) 18:55
m: module A { class B { } }; class C::D { }; .say for A.HOW, C.HOW # this is the difference I was thinking of BTW 18:56
camelia rakudo-moar 4a0ba7: OUTPUT«Perl6::Metamodel::ModuleHOW.new␤Perl6::Metamodel::PackageHOW.new␤»
18:56 cpage_ left
rudi_s perlpilot: From what I understand, module provide some kind of name spacing and I wanted to know if the effect was the same when I used class A::B. The documentation didn't make that clear (to me). 18:57
Bascially I wanted to know if stuff defined inside class A::B are in the same "namespace" as stuff inside module A { class B { .. }}
AlexDaniel m: say gather ‘abc’ ~~ m/(.)+ {take ‘X’} ‘a’ / 18:58
camelia rakudo-moar 4a0ba7: OUTPUT«(X X X X X X)␤»
AlexDaniel can anybody figure out why is it backtracking like crazy on this one?
18:59 themonkeybob11 left
AlexDaniel m: say gather ‘abc’ ~~ m/(.)+ {take $0} ‘a’ / 18:59
camelia rakudo-moar 4a0ba7: OUTPUT«([「a」 「b」 「c」] [「a」 「b」 「c」] [「a」 「b」 「c」] [「b」 「c」] [「b」 「c」] [「c」])␤»
AlexDaniel ah, {} is part of backtracking? 19:00
m: say [~] gather ‘abcdef’ ~~ m/(.)+ {take ‘X’} ‘a’ / 19:02
camelia rakudo-moar 4a0ba7: OUTPUT«XXXXXXXXXXXXXXXXXXXXX␤»
perlpilot AlexDaniel: I can't tell if you understand what's going on or not :) 19:03
AlexDaniel ooooh, there's +
m: say [~] gather ‘abcdef’ ~~ m/(.)* {take ‘X’} ‘a’ / 19:04
camelia rakudo-moar 4a0ba7: OUTPUT«XXXXXXX␤»
AlexDaniel perlpilot: I was convinced that it was (.)* and so I was wondering why it has to go through all of this :D 19:05
perlpilot ok
then I'll assume you understand now
AlexDaniel perlpilot: well, actually, no 19:06
m: say gather ‘abc’ ~~ m/(.)* {take $0} ‘a’ /
camelia rakudo-moar 4a0ba7: OUTPUT«([「a」 「b」 「c」] [「a」 「b」 「c」] [「a」 「b」 「c」] [「a」 「b」 「c」])␤»
AlexDaniel perlpilot: why is it 'abc' all the time?
perlpilot Put the * inside the parens and maybe it'll be clearer? 19:07
AlexDaniel m: say gather ‘abc’ ~~ m/(.*) {take $0} ‘a’ /
camelia rakudo-moar 4a0ba7: OUTPUT«(「abc」 「ab」 「a」 「」)␤»
AlexDaniel perlpilot: now it looks right, but where does that difference come from? 19:08
RabidGravy after a year I found a use for gist.github.com/jonathanstowe/ff08...1b39aeebed
I also want sub signatures on a parameters to MAIN 19:10
19:11 themonkeybob11 joined
RabidGravy oops 19:13
m: multi sub MAIN( :@part ( $instrument, $fills ) ) { say @part.perl; }
camelia rakudo-moar 4a0ba7: OUTPUT«This type does not support elems␤ in sub MAIN at /tmp/bRi2dhOgnn line 1␤ in block <unit> at /tmp/bRi2dhOgnn line 1␤␤»
dalek osystem: ec54ab8 | kolikov++ | META.list:
Merge pull request #1 from kolikov/kolikov-add1

Please Add Lingua::EN::Conjugate
19:16
osystem: f9de14b | jnthn++ | /:
Merge pull request #168 from kolikov/master

Merge
19:16 themonkeybob11 left
19:18 zpmorgan joined, themonkeybob11 joined, tmch joined 19:22 jjido joined, labster joined 19:25 tokomer joined 19:28 tmch left 19:29 jjido left 19:30 tmch joined 19:32 virtualsue joined 19:34 tokomer left 19:38 CIAvash joined, ParsonsNose left 19:49 Laurent_R_ joined 19:50 spider-mario joined 19:52 Laurent_R left, Laurent_R_ is now known as Laurent_R 19:54 pierrot joined 19:56 espadrine left 19:58 ParsonsNose joined, firstdayonthejob joined
TreyHarris In for @list { ... CATCH { # here } }, is OUTER::<$_> the only way to refer to the loop variable (other than rewriting to for @list -> $elem)? 20:08
20:11 ely-se joined
masak yes 20:13
TreyHarris masak: thanks. didn't know if there was some shorthand for that particular case. 20:14
20:17 kaare_ left 20:21 domidumont left
RabidGravy so I found what the DeathMetal drumkit sounds like, not really buying the "Death Metal" tag, more like "battered old jazz kit" 20:25
20:29 jjido joined
lizmat timotimo: how would you describe your commits this week for the P6W ? 20:32
20:32 darutoko left
timotimo did i even do anything? 20:32
masak TreyHarris: well, you can always do something like `CATCH -> $err { # here }` 20:33
timotimo improved the code gen for metaop_assign (like +=) when native values or sub calls are on the LHS
masak 'night, #perl6
timotimo gnite masak :)
improved safe exception printing for when you're hacking on the core setting and an error occurs before Exception.pm has been reached
i'd say that's about all i did, right? 20:34
20:34 idiosyncrat_ joined
lizmat yup, thanks! 20:34
timotimo no, thank you
20:35 jjido left, jjido joined 20:39 labster left 20:40 yqt joined 20:41 cpage_ joined
jnthn Ooh, I did something weeklyable too :) 20:42
lizmat: fwiw, that last thing I wrote about in my blog post is as of today completed also (the memory saving) 20:43
lizmat but it didn't land in rakudo yet, did it ? 20:49
jnthn: ^^^
jnthn lizmat: Didn't do a Moar bump yet, no...so only for those who build absolute bleeding edge :) 20:50
lizmat I'd like to keep the P6W really about things that people can see when pulling rakudo and doing a standard build
the bleeding edge people should be on this channel anyway :-) 20:51
(also leaves some news for the next P6W :-)
jnthn Just in case I do nothing more this week? :-) 20:53
20:54 hacst joined
lizmat well, what can I see, looking back at the past weeks :-) 20:57
*say
Hotkeys I am bleeding edge and on this channel 20:58
lizmat Hotkeys! 20:59
Hotkeys lizmat!
20:59 zpmorgan left 21:00 molaf left, bakedb_ left, gypsydave5 left
[Coke] Dr. Scott! 21:01
Hotkeys lizmat: why so excited
21:01 rindolf left
lizmat is really rather fotonic 21:01
21:01 gypsydave5 joined, rindolf joined
lizmat argh, photonic :-) fotonic is a dutchism 21:02
as in easily excitable :-)
rudi_s Hi. Is there a simple way to apply a function to all values of a hash?
21:02 bakedb joined
Hotkeys ah 21:03
lizmat %hash.values>>.method
21:05 dhunt joined
dhunt M: say now - INIT now 21:05
camelia rakudo-MOAR 273e89: OUTPUT«0.0024624␤»
[Coke] Damian is going to be a keynote speaker at yapc::na this year. 21:06
rudi_s lizmat: Sorry, forgot to mention I want to replace the values with the result of the function.
lizmat m: my %h = a => 42, b => 666; %h.values>>.&postfix:<++>; dd %h # rudi_s
camelia rakudo-moar 4a0ba7: OUTPUT«Hash %h = {:a(43), :b(667)}␤»
rudi_s lizmat: How can I do the same with an arbitrary function? 21:07
lizmat m: my %h = a => 42, b => 666; sub a($a is rw) { $a++ }; %h.values>>.&a; dd %h # rudi_s 21:08
camelia rakudo-moar 4a0ba7: OUTPUT«Hash %h = {:a(43), :b(667)}␤»
jnthn m: my %h = a => 'omg', b => 'wtf'; .=&uc for %h.values; say %h 21:09
camelia rakudo-moar 4a0ba7: OUTPUT«a => OMG, b => WTF␤»
21:09 lichtkind joined
jnthn m: my %h = a => 'omg', b => 'wtf'; %h.values>>.=&uc; say %h # or maybe this 21:09
camelia rakudo-moar 4a0ba7: OUTPUT«a => OMG, b => WTF␤»
lichtkind i found out you versioning backup plan: third letter in azbuka is actually В which leads to to the holiday of Воскресения - easter :) 21:10
rudi_s lizmat: jnthn: Thank you. Can I combine that with an anonymous function? 21:11
21:12 wamba left
[Coke] at that point, it's not really more legible, is it? 21:12
lizmat m: my %h = a => 42, b => 666; %h.values>>.(sub (\a) { a++ }); dd %h # alas, not sure if that's a bug or a DIHWIDT
camelia rakudo-moar 4a0ba7: OUTPUT«Cannot find method 'CALL-ME'␤ in block <unit> at /tmp/mdjMoloPFw line 1␤␤»
[Coke] you can make your anon function ahead of time and assign it to a var.
m: my %h = a => 42, b => 666; my $why = sub (\a) { a++ }; %h.values>>.&$why; dd %h; 21:14
camelia rakudo-moar 4a0ba7: OUTPUT«Hash %h = {:a(43), :b(667)}␤»
Hotkeys I didn't realize you could call regular functions dottily
rudi_s Thanks. 21:15
lizmat Hotkeys: in that respect, Perl 6 is very much like Perl 5, where the object is always the first parameter when a method is called as a sub 21:16
Hotkeys ah 21:17
I didn't really ever use perl 5
jnthn m: my %h = a => 'omg', b => 'wtf'; %h.values>>.=&({ .uc ~ .tc }); say %h
camelia rakudo-moar 4a0ba7: OUTPUT«a => OMGOmg, b => WTFWtf␤»
rudi_s Is there also a nice way to get a copy of the complete hash? - I have a type constraint on the original hash which is not met after applying the function, so I'd like to store it in a new variable.
*the result 21:18
jnthn rudi_s: Just assigning one hash into another does that.
(Assignment is copying.)
Or do you mean apply a transforma nd get a new hash? 21:19
rudi_s True. But I thought about returning it immediately so I'd like to skip the temporary variable and just apply the function to the values of the old hash.
21:19 bjz left
rudi_s *and get a copy as result which I then can return. 21:19
jnthn m: my %h = a => 'omg', b => 'wtf'; my %i = %h.map({ .key => uc .value }); say %hi 21:20
camelia rakudo-moar 4a0ba7: OUTPUT«5===SORRY!5=== Error while compiling /tmp/HkFMzgZYPQ␤Variable '%hi' is not declared␤at /tmp/HkFMzgZYPQ:1␤------> 3%i = %h.map({ .key => uc .value }); say 7⏏5%hi␤»
jnthn m: my %h = a => 'omg', b => 'wtf'; my %i = %h.map({ .key => uc .value }); say %i
camelia rakudo-moar 4a0ba7: OUTPUT«a => OMG, b => WTF␤»
jnthn You can do something like that, replacing uc with ur function
21:21 CIAvash left
rudi_s Nice, thank you! 21:21
21:29 ambs joined
rudi_s m: my %x = A => <a b c>, B => <d e f>; for %x<A> { .say } 21:34
camelia rakudo-moar 4a0ba7: OUTPUT«(a b c)␤»
rudi_s Can I somehow change the %x definition so the for iterates over the <a b c> List?
for %x<A>.List { .say } works, but I'd like to get that behavior automatically.
ely-se m: my %x = A => @<a b c>, B => @<d e f>; for %x<A> { .say } 21:35
camelia rakudo-moar 4a0ba7: OUTPUT«(Nil Nil Nil)␤»
ugexe m: my %x = A => <a b c>, B => <d e f>; for |%x<A> { .say }
camelia rakudo-moar 4a0ba7: OUTPUT«a␤b␤c␤»
lizmat m: my %x = A => <a b c>.Slip, B => <d e f>.Slip; for %x<A> { .say }
camelia rakudo-moar 4a0ba7: OUTPUT«a␤b␤c␤»
lizmat rudi_s: ^^ 21:36
rudi_s lizmat: Thanks. What exactly is a slip?
lizmat
.oO(you give it the slip)
[Coke] rudi_s: docs.perl6.org/type/Slip 21:37
lizmat doc.perl6.org/type/Slip
FROGGS yay, got 78 slides ready which is probably about 40% of what I'm going to do
lizmat hehe
rudi_s lizmat: [Coke]: Thanks. 21:38
For a newcomer the "iteration concept" feels quite complicated in Perl6.
FROGGS so my presentation should be in a good shape after tomorrow evening and the train ride on Wednesday morning
moritz FROGGS: 21:39
erm 21:40
21:40 bjz joined
moritz I wanted to write something, didn't I? 21:40
sounds like quite some slides
21:40 donaldh joined
moritz I typically have about one slide per minute of talk 21:40
FROGGS moritz: my slides often just show one to three words 21:41
21:42 bjz left
rudi_s Is it expected, that Slip is not displayed in the .perl output? 21:42
Test failures like this are confusing: 21:43
# expected: {:A($("a", "b", "c")), :B($("d", "e", "f")), :C($("a", "b", "c", "d", "e", "f"))}
# got: {:A($("a", "b", "c")), :B($("d", "e", "f")), :C($("a", "b", "c", "d", "e", "f"))}
21:43 idiosyncrat_ left
lizmat Slips are supposed to be very volatile 21:45
timotimo disappearing underwear
rudi_s Hm. Makes the .perl output a little less useful when I don't see something but it's still considered different. 21:46
FROGGS well, Slip is meant to hide itself 21:47
lizmat rudi_s: you're not supposed to see slips
rudi_s FROGGS: Shouldn't comparsion then treat it as equal?
FROGGS rudi_s: I guess so, yes 21:48
rudi_s m: <a b c> eqv <a b c>.Slip
camelia rakudo-moar 4a0ba7: OUTPUT«WARNINGS for /tmp/GOMftwurbO:␤Useless use of "eqv" in expression "<a b c> eqv <a b c>.Slip" in sink context (line 1)␤»
rudi_s m: say <a b c> eqv <a b c>.Slip
camelia rakudo-moar 4a0ba7: OUTPUT«False␤»
rudi_s Still a little dangerous to ignore it, as an object behaves differently with and without a Slip.
FROGGS m: use Test; say is-deeply [1, (2, 3).Slip], [1, 2, 3], '...'
camelia rakudo-moar 4a0ba7: OUTPUT«ok 1 - ...␤True␤»
21:49 rollo joined
FROGGS m: use Test; say is [1, (2, 3).Slip], [1, 2, 3], '...' 21:49
camelia rakudo-moar 4a0ba7: OUTPUT«ok 1 - ...␤True␤»
ugexe m: my @a = 1,2,3; my $x = @a.Slip; say $x.perl
camelia rakudo-moar 4a0ba7: OUTPUT«slip$(1, 2, 3)␤»
FROGGS rudi_s: what test method is it using
?
rudi_s Hm. I'm confused.
21:50 chansen_ left
rudi_s Ah .. old perl6 version. 21:50
m: is-deeply %(A => <a b c>.Slip), %(A => <a b c>); 21:51
camelia rakudo-moar 4a0ba7: OUTPUT«5===SORRY!5=== Error while compiling /tmp/nW_fIo3E7t␤Undeclared routine:␤ is-deeply used at line 1␤␤»
rudi_s m: use Test; is-deeply %(A => <a b c>.Slip), %(A => <a b c>);
camelia rakudo-moar 4a0ba7: OUTPUT«not ok 1 - ␤␤# Failed test at /tmp/3Hye26gGjc line 1␤# expected: ${:A($("a", "b", "c"))}␤# got: ${:A(slip$("a", "b", "c"))}␤»
21:51 chansen_ joined
rudi_s So it shows up. 21:51
Perfect. Sorry for the confusion.
timotimo dinner is served \o/ 21:53
21:56 hacst left 21:59 [Sno] left 22:05 rollo left, rindolf left 22:06 labster joined 22:08 jjido left
rudi_s What is the best way to check if I can apply a regex to an object? I want to check for matches by applying a regex if the object supports regex matches and otherwise just accept it. 22:09
I could use $_ ~~ Str and $_ ~~ /regex/, but is there a better way?
Stringy maybe?
ugexe i think more details are needed. for example, are you referring to .ACCEPTS, which lets you set what your class smart matches against? or can you give an example that does what one might consider wrong? 22:23
or something like $str.?match(/$regex/) 22:24
timotimo /$regex/ is probably a million times slower than just $regex here 22:26
22:26 SCHAAP137 left 22:28 jjido joined
RabidGravy and surely any "Cool" value will accept a regex 22:30
22:36 profan joined, profan left
lizmat And another Perl 6 Weekly has just come off the press: p6weekly.wordpress.com/2016/03/07/...-enchante/ 22:36
22:36 profan joined
sjn yay! 22:37
rudi_s ugexe: foo(set(<a b c>), 'a', 'b', 'c', <a b c>); sub foo(*@x) { for @x { .. } } and .. should check if I can do $_ ~~ /regex/ and if not do nothing. 22:43
lizmat good night, #perl6!
rudi_s Good night.
RabidGravy toodles 22:44
sjn lizmat: ehrm, what's with conspi article you mention in the "Gems from the Backlog" section?
22:45 sno joined
hoelzro lizmat: there's a typo in my blog post title (s/Russion/Russian/) 22:45
lichtkind good night lizmat
sjn wake up, lizmat! the internets are wrong! :) 22:46
well, maybe these can wait 'till tomorrow..
the emoji link is broken too 22:47
seems like some utf88 char got into the url 22:48
22:50 FROGGS left, TEttinger joined
rudi_s ugexe: So, yeah, $str.?match looks fine. Thanks. 22:51
22:52 vendethiel left
timotimo i can fix things in the weekly 22:52
conspi article? 22:53
i'll fix the butterfly link 22:54
what else is broken?
rudi_s ugexe: Hm. Seems to break if I want to extract a group: 22:55
m: my $a = 'str'; if $a.?match(/(...)/) { say "match: $0" }
camelia rakudo-moar 4a0ba7: OUTPUT«Use of Nil in string context in block <unit> at /tmp/oI2o6OrySo line 1␤match: ␤»
rudi_s my $a = 'str'; if $a.match(/(...)/) { say "match: $0" }
m: my $a = 'str'; if $a.match(/(...)/) { say "match: $0" }
timotimo russian
camelia rakudo-moar 4a0ba7: OUTPUT«match: str␤»
timotimo updated
hoelzro спасибо! 22:56
22:57 ely-se left
Hotkeys Meta ops are fun 22:59
m: my &f = {[»+«](@^a Z»*»@^b) »/»sum @b}; say f([[0,2],[3,4],[0,1],[1,1]],[2,6,2,10])
camelia rakudo-moar 4a0ba7: OUTPUT«[1.4 2]␤»
rudi_s ugexe: My current solution is if ^.can('match') and $_ ~~ /regex/ { .. } - is this okay or can it be improved? 23:01
Hotkeys Why not just call match if it can be called 23:02
Wait 23:04
23:04 idiosyncrat_ joined
Hotkeys m: say so Nil 23:04
camelia rakudo-moar 4a0ba7: OUTPUT«False␤»
Hotkeys Perhaps use .?match(/regex/)
docs.perl6.org/language/operators#postfix_.%3F
Not sure if that's what you're looking for 23:05
23:07 kid51 joined
rudi_s Hotkeys: I tried that (as recommened by uge<tab>), but it seems not to work with capture groups or something else is broken: 23:08
m: my $a = 'str'; if $a.?match(/(...)/) { say "match: $0" }
camelia rakudo-moar 4a0ba7: OUTPUT«Use of Nil in string context in block <unit> at /tmp/C95xAq9joD line 1␤match: ␤»
rudi_s I've no idea why this happens though.
geekosaur save the result of the match, it will be Nil or a match object that you can use 23:09
23:11 tmch left
rudi_s geekosaur: Why is this not necessary when I use $a.match (or just $a ~~ /regex/)? 23:11
geekosaur m: my $a = 'str'; if so my $m = $a.?match(/(...)/) { say "match: $m[0]" }
camelia rakudo-moar 4a0ba7: OUTPUT«match: str␤»
23:11 virtualsue left
geekosaur because there's magic in that case :( 23:12
rather than making you save the match object it's assigned to (IIRC) $/ and things like $0 are aliases into that
rudi_s Yeah.
geekosaur but only if you do the match directly
rudi_s Ah. Hm. Too bad. I guess I'll stick to .^can('match'). - Thanks. 23:13
geekosaur m: my $a = 'str'; if so $/ = $a.?match(/(...)/) { say "match: $0" }
camelia rakudo-moar 4a0ba7: OUTPUT«match: str␤»
geekosaur hm,. the so shoudln't even be needed 23:14
m: my $a = 'str'; if $/ = $a.?match(/(...)/) { say "match: $0" }
camelia rakudo-moar 4a0ba7: OUTPUT«match: str␤»
geekosaur m: my $a = 'st'; if $/ = $a.?match(/(...)/) { say "match: $0" }
camelia ( no output )
geekosaur there you go
rudi_s Thanks! 23:16
Hotkeys \o/
23:17 spider-mario left 23:25 labster left 23:26 labster joined
RabidGravy This is an interesting read medium.com/@nayafia/what-success-r....tv3dlursc 23:30
dalek kudo-star-daily: a45663e | coke++ | log/ (9 files):
today (automated commit)
23:31
RabidGravy Almost finished Audio::Hydrogen (bar the documentation) and now wondering if I fix up Audio::PortAudio whether we can make a drum machine in Perl 6 23:37
I need someone to give me money just to shave yaks 23:38
23:40 jjido left
RabidGravy anyway bed time here 23:40
toodles!
23:45 RabidGravy left, firstdayonthejob left 23:57 themonkeybob11 left 23:58 Laurent_R left 23:59 themonkeybob11 joined, cdg left, cdg joined