[00:06] *** Sankalp- joined [00:06] *** Sankalp left [00:06] *** Sankalp- is now known as Sankalp [00:08] *** reportable6 left [00:09] *** reportable6 joined [00:38] *** [Coke] left [00:42] *** [Coke] joined [01:13] *** aris32 left [01:16] *** lichtkind left [01:21] *** summer left [02:21] *** evalable6 left [02:21] *** linkable6 left [02:23] *** linkable6 joined [02:24] *** evalable6 joined [03:24] *** linkable6 left [03:24] *** evalable6 left [03:27] *** linkable6 joined [03:27] *** evalable6 joined [03:38] *** Sankalp left [03:42] *** Sankalp joined [04:16] *** vrurg left [04:17] *** vrurg joined [05:04] *** andinus left [05:04] *** donpdonp|z_ left [05:04] *** dg left [05:04] *** jjatria left [05:04] *** broquain1 left [05:04] *** pat_js left [05:04] *** broquaint joined [05:04] *** donpdonp|z_ joined [05:04] *** jjatria joined [05:04] *** dg joined [05:04] *** andinus joined [05:04] *** pat_js joined [05:07] *** avuserow left [05:07] *** dcx left [05:07] *** phogg left [05:07] *** tailgate left [05:07] *** bartolin_ left [05:07] *** JRaspass left [05:07] *** El_Che left [05:07] *** goblin left [05:07] *** renormalist left [05:07] *** El_Che joined [05:07] *** goblin joined [05:07] *** renormalist joined [05:07] *** bartolin joined [05:07] *** avuserow joined [05:08] *** JRaspass joined [05:08] *** phogg joined [05:09] *** tailgate joined [05:09] *** dcx joined [06:07] *** reportable6 left [06:09] *** reportable6 joined [07:09] *** evalable6 left [07:09] *** linkable6 left [07:09] *** Sgeo left [07:11] *** evalable6 joined [07:12] *** linkable6 joined [07:48] *** Sankalp left [07:48] *** dakkar joined [07:51] *** sena_kun joined [07:53] *** Sankalp joined [07:54] *** ab5tract joined [07:56] *** sena_kun left [07:57] *** sena_kun joined [08:06] A few things: [08:06] 1. I kept so much time pondering on the performance [08:06] of HTML::Tag using --profile that I still haven't checked HTML::Entities::Fast, sorry [08:06] of HTML::Tag using --profile that I still haven't checked HTML::Entity::Fast, sorry [08:08] 2. I got basically nowhere... I would be really thankful if someone more knowledgeable could point out what is so costly about .render. Now I uploaded the version benchmarked to both github and fez as the latest version also I made this little test file which is how I tried to see the expensive part [08:08] what really hits me is the number of sink calls - where do they come from? [08:10] 3. Where to look for the rakudo profile HTML file generation? I would take a look for it, maybe I could add a more useful navigation back and forth; I would have been happy if there was something like that. [08:11] since it's an SPA, I would hope that it cannot be too difficult... the content must be loaded some way, the same data could be identified and stored in the window history [08:17] timo knows [08:17] 2022-07-24T23:26:51Z #raku lizmat for some reasons rak does not search on my SparkyCI alpine test box - http://sparrowhub.io:2222/report/914 - but maybe this Rakudo version thing? [08:18] *** jdv left [08:19] *** vasko joined [08:19] *** vasko left [08:19] *** vasko joined [08:24] *** jdv joined [08:24] Nemokosch, the profiler html app lives in the nqp repository, i think under src/vm/moar or so [08:39] Oh right [08:39] https://github.com/Raku/nqp/blob/master/src/vm/moar/profiler/template.html [08:43] there's also moarperf, which has a Cro backend to do some heavy lifting for you, and also supports the memory snapshot profiler [08:56] haha, heard of it! [08:57] i wish i had more energy for it next to my day job [08:57] at the day job i'm working with svelte and some of the performance benefits it has over react could be amazing for moarperf [08:58] *** ab5tract left [08:58] is the code of this template file deliberately this legacy-ish? [08:59] because I doubt the history api would work with browsers that demand this sort of code [09:03] it hasn't been touched in a couple of years [09:03] it's still the previous version of angular [09:08] It doesn't help that I'm clueless about angular... [09:08] or pretty much any JS frontend frameworks for that matter [09:10] back and forth navigation would indeed be cool, yeah [09:11] moarperf tries to do that, i don't remember how well i got it to work [09:17] *** sena_kun left [09:22] regarding sink calls, often times they can be almost completely optimized away, and in the profiling case, overhead from recording the call and return may balloon up the cost artificially, so that's a thing to keep in mind [09:23] *** djerius left [09:23] *** djerius_ joined [09:28] yeah, that's the uncertainty principle at work there :-) [09:29] maybe you could use component-like solution Raku-only like what I was playing with last weekend... https://github.com/FCO/Cro-WebSocket-WebComponents-test (I'm still trying to understand how useful it is...) [09:30] sorry... it seems there is no server on what you are talking... sorry... [09:30] moarperf does have a server, the SPA for the default --profile does not [09:32] the most reliable way to figure out if the sink calls are actually cheap is to read the spesh log, but that's a science unto itself [09:32] lizmat: haven't looked if you added more to the spesh module, could this be something it could learn, how good sink calls are handled? %) [09:33] JRasspass++ - thank you! I see that https://raku.land/github:jsimonet/Log::Any and friends have readme! [09:33] I haven't touched the Spesh module for a long time [09:34] that's fine [09:39] I mean, the profiler wouldn't lie that they are costly, right? ... [09:39] i think it does try to measure the overhead of measuring a call up front, so that it can subtract that [09:40] *** amenonsen left [09:40] *** amenonsen joined [09:40] the profile inserts code that (sometime? always?) prevents inlining, so it *can* make a difference [09:40] *** lichtkind joined [09:40] it tries not to prevent inlining [09:41] i'm not sure when it does prevent it? [09:41] when it puts the size above the inlining limit ? [09:42] i definitely wrote code to subtract profiling-added instruction sizes [09:42] it may not be in master, but i sure hope it is :) :) [09:43] I mean, really, if you have time, I'd be more than thankful if you took a look at it. I uploaded both the module and a little gist that I tried to analyze. [09:47] installing zef as we speak [10:01] *** sena_kun joined [10:05] *** Kaiepi left [10:05] i froze up my computer for a bit there :D [10:05] are the tests supposed to be clean? because i do have some failures [10:07] *** Kaiepi joined [10:10] aaaah bruh [10:10] one space is missing [10:11] the benchmark only runs for one second, that's really not much for benchmarking [10:12] ... [10:12] Liz told me that the HTML gets out of hand if it runs for longer :heh: [10:12] decide you guys [10:14] depends on the browser you use, I guess... [10:15] my experience is that if you profile something that runs longer than a few seconds, you get a HTML file of several MBs that at least Safari basically chokes on [10:16] Seq.pm's sink spends a lot of time inclusive but barely an time exclusive, which looks to me like that just does the work of a loop, like a for loop or so [10:16] I'm gonna upload the test-passing version, thank you for noticing the big dumb [10:18] I'm not sure what you are looking at [10:18] 7.01 ms just on sinks, exclusive time [10:18] compared to 9.75ms on maps, exclusive time [10:18] the percentages are quite surely wrong in the exclusive time column [10:19] but they are wrong consistently, at least [10:27] map itself shouldn't do much at all [10:28] 2ms on List sink, 30ms on List's sink [10:28] map 18.6ms exclusive time [10:30] "The profiled code ran for 264.96ms. Of this, 56.37ms were spent on garbage collection (that's 21.27%)." [10:39] Still, these are at the top [10:39] could be from being called a whole lot, too :) [10:40] i put a `for ^10 {` around the code including the "render to file" call [10:41] okay [10:42] sorting exclusive time now puts sink far to the bottom [10:43] also, thank you for the help either way, I really spent hours pondering about it and got nowhere, partly because I don't comprehend the generated data itself [10:43] yes it definitely is A Bit Much [10:44] List.pm's sink is at 142130 calls total, 1% inclusive, 0.5% exclusive time [10:44] so each individual call does barely anything apparently [10:45] I don't know/think that it's the main reason for the module (and the render call in particular!) to be this slow [10:46] But it got my attention why there is such a big number of sink calls in the first place [10:47] I don't see how it would follow from the code [10:47] right, sink calls are generated in the background and we rely on optimization to throw them out when they are not needed [11:07] *** evalable6 left [11:07] *** linkable6 left [11:09] *** evalable6 joined [11:10] *** linkable6 joined [12:06] *** reportable6 left [12:07] *** [Coke] left [12:09] *** reportable6 joined [12:11] *** Xliff left [12:27] *** [Coke] joined [13:27] *** evalable6 left [13:27] *** linkable6 left [13:30] *** linkable6 joined [13:30] *** evalable6 joined [13:46] *** morte_ joined [13:54] *** Xliff joined [13:54] \o [13:55] Is it possible to adjust the timezone of an existing datetime instance? [13:55] : my $dt = DateTime.new( year => 2021, month => 12, day => 1); $dt.gist.say; $dt.timezone = -14400; $dt.gist.say [13:55] m: my $dt = DateTime.new( year => 2021, month => 12, day => 1); $dt.gist.say; $dt.timezone = -14400; $dt.gist.say [13:55] rakudo-moar aa5e68005: OUTPUT: «2021-12-01T00:00:00Z␤Cannot modify an immutable Int (0)␤ in block at line 1␤␤» [13:55] This seems oddly limiting to me. [13:57] what? immutability? [13:59] Well, the fact that you can't adjust the timezone. Yes. [13:59] look https://docs.raku.org/type/DateTime#method_in-timezone [13:59] At least, not without creating a new DateTime object. [14:00] Oh, LOL! My eyes skipped right over that. I thought that method meant "Is object 'in this timezone'" [14:00] Nemokosch++ [14:01] and yet another Rakudo Weekly News hits the Net: https://rakudoweekly.blog/2022/07/25/2022-30-what/ [14:04] yeah, tbf the name is disturbing [14:04] why not with-timezone or something [14:07] *** DarthGandalf left [14:07] *** Tirifto left [14:08] I wonder if https://raku.land/zef:lizmat/Method::Also would work on core classes [14:10] afk& [14:13] *** Sgeo joined [14:28] *** sena_kun left [14:28] *** Altai-man joined [14:28] lizmat++ [14:29] *** DarthGandalf joined [14:29] What's the best way to pass a parameter to an grammar action class? Can you .new? [14:37] sure you can [14:38] m: grammar { rule TOP { .+ } }.parse("whatever", :actions(class :: { has $.x; method TOP ($/) { make ($.x ~~ ~$/) } }.new(:x("whatever")))).made.say [14:38] rakudo-moar aa5e68005: OUTPUT: «True␤» [14:57] *** melezhik joined [14:57] o/ [14:57] Hi lizmat - any thoughts on this App-Rak failure? - http://sparrowhub.io:2222/report/912 [15:03] *** wingfold joined [15:09] I also create a positive/negative test for App-Rak search within dir - in "Sparrow" style - https://raw.githubusercontent.com/melezhik/images/master/BC9A1952-F523-47D7-AD79-4BFF9357CBF2.jpeg [15:17] *** Tirifto joined [15:20] *** melezhik left [16:16] *** morte_ left [16:22] *** alethkit left [16:22] *** patrickb left [16:27] *** alethkit joined [16:27] *** patrickb joined [16:34] *** alethkit left [16:34] *** patrickb left [16:36] *** patrickb joined [16:37] *** alethkit joined [16:42] *** dakkar left [16:42] *** morte_ joined [17:06] *** Altai-man left [17:21] *** alethkit left [17:21] *** patrickb left [17:22] *** patrickb joined [17:22] For the whatever anomaly I've shown... [17:23] *** alethkit joined [17:23] Either I'm very stupid some way or some serious issue is going on [17:32] but I can't be _that_ stupid, after all, I just expect { .&function($second-argument) } and *.&function($second-argument) do exactly the same thing regardless of context... [17:33] also this cannot be just a parsing error because the behavior changes if the argument I try to bind is a fully fledged local variable, not a function parameter itself [17:33] it goes from Mu to Any [17:33] so it does take something, after all [17:42] *** sena_kun joined [17:51] *** lizmat_ joined [17:52] *** discord-raku-bot left [17:53] *** gfldex left [17:55] *** lizmat left [17:55] *** Xliff left [18:00] *** lizmat_ is now known as lizmat [18:06] *** reportable6 left [18:09] *** reportable6 joined [18:15] *** mexen joined [18:15] *** Nemokosch joined [18:16] . [18:16] For the weird parameter problem earlier [18:17] I have a reasonably golf-ish way to do it, I still don't understand the behavior even if it is possibly correct [18:18] what I need is a function with 2 arguments and another function with andthen .map andthen .map chaining in it [18:19] m: sub lin5($a, $b) { 5*$a + $b }; sub problems($x) { (1 .. 100).roll(10) andthen .map(* + 2) andthen .map(*.&lin5($x)) }; say problems(10) [18:19] rakudo-moar aa5e68005: OUTPUT: «Type check failed in binding to parameter '$b'; expected Any but got Mu (Mu)␤ in sub lin5 at line 1␤ in block at line 1␤␤» [18:20] I don't see how I messed up the precedence if I did [18:20] the WhateverCode bit sees $x but not its actual value [18:21] if I define a variable inside the function and try to pass that, it will be (Any) instead of (Mu) [18:21] m: sub lin5($a, $b) { 5*$a + $b }; sub problems($x) { my $y = 11; (1 .. 100).roll(10) andthen .map(* + 2) andthen .map(*.&lin5($y)) }; say problems(10) [18:21] rakudo-moar aa5e68005: OUTPUT: «Use of uninitialized value of type Any in numeric context␤(250 95 375 270 270 420 170 310 90 340)␤ in sub lin5 at line 1␤Use of uninitialized value of type Any in numeric context␤ in sub lin5 at line 1␤Use of uninitialized valu…» [18:22] any idea ^^ [18:23] *** Nemokosch left [18:43] you _can't_ do .map(*.&lin5($y)) [18:43] m: sub lin5($a, $b) { 5*$a + $b }; sub problems($x) { my $y = 11; (1 .. 100).roll(10) andthen .map(* + 2) andthen .map({.&lin5($y)}) }; say problems(10) [18:43] rakudo-moar aa5e68005: OUTPUT: «(166 211 156 436 146 361 396 486 146 276)␤» [18:55] *** sena_kun left [18:56] *** sena_kun joined [18:58] it is a bit weird to me that $y is Any in this context, but method calls with whatever-star always cause problems to me [19:20] *** irc_user joined [19:25] *** Nemokosch joined [19:27] Actually, you _can_ [19:27]  m: sub lin5($a, $b) { 5*$a + $b }; sub problems($x) { my $y = 11; (1 .. 100).roll(10).map(* + 2) andthen .map(*.&lin5($y)) }; say problems(10) [19:27] rakudo-moar aa5e68005: OUTPUT: «(131 426 391 311 206 46 141 421 156 511)␤» [19:28] literally one andthen less and it works [19:29] I can agree that WhateverCode usually gets one into trouble - but this very apparently can work so it sounds more like a personal opinion that one can't use it here :P [19:31] m: sub lin5($a, $b) { 5*$a + $b }; sub problems($x) { (1 .. 100).roll(10).map(* + 2) andthen .map(*.&lin5($x)) }; say problems(10) [19:31] rakudo-moar aa5e68005: OUTPUT: «(165 225 205 120 50 340 330 295 450 220)␤» [19:31] right, this works with the parameter as well [19:36] "can work" never beats "will always work" ;) [19:38] it beats "can't work", however [19:43] true that :) [19:49] *** sena_kun left [19:50] *** sena_kun joined [19:56] *** morte_ left [19:59] *** Nemokosch left [20:07] m: sub lin5($a, $b) { 5*$a + $b }; sub problems($x) { my $y = 11; (1 .. 100).roll(10) andthen .map(* + 2) andthen { .map(*.&lin5($y)) } }; say problems(10) [20:07] rakudo-moar aa5e68005: OUTPUT: «(46 271 76 271 71 396 506 366 491 416)␤» [20:07] …uh oh [20:12] *** Nemokosch joined [20:12] what's up [20:15] that looks like a bug of some sort [20:17] what is this, even, a code block out of the blue? because andthen is an operator, not a statement [20:18] sometimes I can't decide if the problem is that something works or that it doesn't [20:19] oh wait... andthen creates a block from the right side [20:20] I've been swimming a bit in –target=ast and apparently nothing gets bound to a declared variable [20:25] *** vrurg left [20:26] vrurg already fleeing [20:34] I'm unsure if I'm even right though, reading qast is difficult [20:35] Is there a way to load a module at runtime while validating auth and version? I can do `require`, but that seems to ignore `:auth<>` and `:ver<>` [20:44] "validating"? [20:44] you use the module with version an auth [20:44] e.g. > use MIME::Base64:ver<1.2.3>:auth [20:44] But that is at compile time [20:45] "validating" = "making sure that the one I loaded is the one I think I loaded" [21:13] there's ^auth and ^api on ModuleHOW but I'm not sure whether it returns anything useful: `(require MIME::Base64).^auth.say` has usable result but `(require Libarchive).^auth.say` doesn't [21:14] *** discord-raku-bot joined [21:14] m: sub lin5($a, $b) { 5*$a + $b }; sub problems($x) { (1 .. 100).roll(10) andthen ( .map(* + 2) andthen  .map(*.&lin5($y)) ) }; say problems(10) [21:14] rakudo-moar aa5e68005: OUTPUT: «===SORRY!=== Error while compiling ␤Variable '$y' is not declared. Perhaps you forgot a 'sub' if this was␤intended to be part of a signature?␤at :1␤------> hen ( .map(* + 2) andthen  .map(*.&lin5(⏏$y)) ) }; say proble…» [21:15] oh right [21:15] m: sub lin5($a, $b) { 5*$a + $b }; sub problems($x) { (1 .. 100).roll(10) andthen ( .map(* + 2) andthen .map(*.&lin5($x)) ) }; say problems(10) [21:15] rakudo-moar aa5e68005: OUTPUT: «(80 155 200 405 195 150 500 295 480 55)␤» [21:15] see? with this precedence, it would work [21:15] m: sub lin5($a, $b) { 5*$a + $b }; sub problems($x) { (1 .. 100).roll(10) andthen .map(* + 2) andthen ( .map(*.&lin5($x)) ) }; say problems(10) [21:15] rakudo-moar aa5e68005: OUTPUT: «Type check failed in binding to parameter '$b'; expected Any but got Mu (Mu)␤ in sub lin5 at line 1␤ in block at line 1␤␤» [21:15] with this, however [21:17] oh cool, we're back again [21:19] anyway, I'm gonna open an issue for this, as usual :D [21:20] *** discord-raku-bot left [21:20] *** discord-raku-bot joined [21:26] m: sub lin5($a, $b) { 5*$a + $b }; sub problems($x) { (1 .. 100).roll(10) andthen .map(*.&lin5($x)) andthen .map(* + 2) }; say problems(10) [21:26] rakudo-moar aa5e68005: OUTPUT: «(297 182 247 272 392 42 402 62 342 262)␤» [21:27] the order is also important [21:27] *** gfldex joined [21:27] m: sub lin5($a, $b) { 5*$a + $b }; sub problems($x) { (1 .. 100).roll(10) andthen .map(*.&lin5($x)) andthen .map(* + $x) }; say problems(10) [21:27] rakudo-moar aa5e68005: OUTPUT: «Cannot resolve caller infix:<+>(Int:D, VMNull); none of these signatures matches:␤ ($x = 0)␤ (\a, \b)␤ (Real $a, Real $b)␤ (Int:D $a, Int:D $b --> Int:D)␤ (int $a, int $b --> int)␤ (uint $a, uint $b --> uint)␤ (Num:D…» [21:28] yes yes, that would have been the next remark [21:28] it doesn't even have to be a function call [21:28] it can be anything whatevercurried and it has to be on the right [21:28] *** discord-raku-bot left [21:29] *** discord-raku-bot joined [21:29] *** irc_user left [21:32] m: sub lin5($a, $b) { 5*$a + $b }; sub problems($x) { (1 .. 100).roll(10) andthen .map(* + 2) andthen ( .&(* + $x) ) }; say problems(16) [21:32] rakudo-moar aa5e68005: OUTPUT: «26␤» [21:32] This, however, works [21:32] this is really annoyingly complicated to reproduce [21:33] or describe, for that matter... [21:38] *** kjp joined [21:39] it's not even that WhateverCode's can't form closures because sometimes it looks like they can, or it's optimized away at least [21:41] *** sena_kun left [21:43] Voldenet: yeah, I tried those and they didn't seem to work for me. But knowing after loading that the one I loaded was not the right one doesn't really help if I cannot then somehow load the right one [21:45] https://github.com/rakudo/rakudo/issues/5004 today's piece of art, lol [21:48] "art" :) [21:49] I'd like to think this is art, since it was a huge effort to get to this point with the analysis even [21:49] true [21:50] jjatria: https://github.com/rakudo/rakudo/blob/aa5e68/src/Perl6/Actions.nqp#L2354 – I'm looking for hints and it might just be that auth is never being attached when doing `require` [21:53] Oh, interesting. I wonder if this was intentional [21:54] I would find that strange, really [21:54] It does seem like a strange limitation, because both `use` and `need` honour it [21:54] I only made one issue today, let's go for it! [21:55] Nemokosch++ [21:57] I would write an issue for that as well, seriously, but for that, first I would need to know the context and so on... also, it would be nice to go to sleep :D [21:57] yeah, /me is hitting the straw now [21:58] I could be also reading the code for require wrong, it's sufficiently complex for me [21:59] *** Nemokosch left [22:12] *** vrurg joined [22:33] *** discord-raku-bot left [22:33] *** discord-raku-bot joined [22:39] *** melezhik joined [22:39] o/ [22:51] .tell jjatria I bumped on Lorea tool and think that Tomtit could be good combination with it - https://gitlab.com/jjatria/lorea/-/tree/master/#configuration , what if distribute standard Lorea configurations suitable for different environments (like ruby/Raku/go) as Tomtit profiles ? - https://github.com/melezhik/Tomtit#profiles , so user can just [22:51] say "tom --profile lorea && tom lorea-ruby-conf" and voila, loira for Ruby configuration file is populated ? [22:51] melezhik, I'll pass your message to jjatria [22:52] I can drop a simple Tomtit::Profile::Loira module for that or even you can try this ...it's simple coding required ... [22:54] we could even ship Tomtit::Profile::Loira as a dependency of App::Loira , so a user always have uptodate version of Loira config bootstrapers ... [22:54] of App::Loira  -> for of App::Loira [22:56] *** melezhik left [23:12] *** maettu left [23:25] *** wingfold left [23:29] *** Woodi left [23:38] *** maettu joined