[00:02] *** reportable6 left [00:06] *** reportable6 joined [00:17] *** justsomeguy joined [00:38] *** evalable6 joined [01:22] *** neshpion left [01:36] *** Sgeo left [01:39] *** Sgeo joined [01:54] *** ameameFan joined [01:54] *** justsomeguy left [02:03] *** ameameFan left [02:08] *** jess left [02:09] *** jess joined [02:10] <[Coke]> submitted a trivial PR to Cro, that's something, anyway. [02:26] *** ameameFan joined [02:37] *** linkable6 joined [03:21] *** jess left [03:24] *** neshpion joined [03:38] *** jmcgnh left [03:48] *** jmcgnh joined [04:12] *** neshpion left [04:40] *** squashable6 left [04:41] *** squashable6 joined [04:55] *** squashable6 left [04:57] *** squashable6 joined [05:05] *** squashable6 left [05:05] *** squashable6 joined [06:00] *** frost joined [06:02] *** reportable6 left [07:02] *** unicodable6 left [07:02] *** bloatable6 left [07:02] *** statisfiable6 left [07:02] *** sourceable6 left [07:02] *** committable6 left [07:02] *** quotable6 left [07:02] *** tellable6 left [07:02] *** greppable6 left [07:02] *** linkable6 left [07:02] *** releasable6 left [07:02] *** bisectable6 left [07:02] *** notable6 left [07:02] *** benchable6 left [07:02] *** squashable6 left [07:02] *** shareable6 left [07:02] *** evalable6 left [07:02] *** nativecallable6 left [07:02] *** coverable6 left [07:03] *** greppable6 joined [07:03] *** sourceable6 joined [07:03] *** bloatable6 joined [07:04] *** coverable6 joined [07:04] *** evalable6 joined [07:04] *** statisfiable6 joined [07:05] *** unicodable6 joined [07:05] *** quotable6 joined [07:05] *** shareable6 joined [07:05] *** notable6 joined [07:25] *** abraxxa joined [07:30] *** abraxxa left [07:31] *** abraxxa joined [07:37] *** jmcgnh left [07:43] *** dakkar joined [07:46] *** Sgeo left [07:47] *** jmcgnh joined [08:04] *** linkable6 joined [08:04] *** releasable6 joined [08:04] *** nativecallable6 joined [08:32] * lizmat clickbaits https://rakudoweekly.blog/2021/08/16/2021-33-cucumbering/ [09:03] *** squashable6 joined [09:04] *** tellable6 joined [09:04] *** bisectable6 joined [09:05] *** committable6 joined [09:05] *** benchable6 joined [09:12] *** ameameFan left [09:22] *** jo joined [10:04] *** reportable6 joined [10:33] *** dogbert11 left [11:07] *** thundergnat joined [11:08] Is there a reason that concurrency is not enabled for .first? Or maybe I am just doing it wrong... [11:09] m: put (^∞).map(1 ~ *).race.map( -> \n { next unless [eq] (2,3,4,5,6).map: { (n × $_).comb.sort.join }; n } ).first; say now - INIT now; [11:09] rakudo-moar 289a62f4a: OUTPUT: «142857␤0.549896505␤» [11:09] m: put (^∞).map(1 ~ *).map( -> \n { next unless [eq] (2,3,4,5,6).map: { (n × $_).comb.sort.join }; n } ).first; say now - INIT now; [11:09] rakudo-moar 289a62f4a: OUTPUT: «142857␤0.753836408␤» [11:09] m: put (^∞).map(1 ~ *).race.first( -> \n { [eq] (2,3,4,5,6).map: { (n × $_).comb.sort.join } } ); say now - INIT now; [11:09] rakudo-moar 289a62f4a: OUTPUT: «142857␤1.010666259␤» [11:09] *** sena_kun joined [11:09] m: put (^∞).map(1 ~ *).first( -> \n { [eq] (2,3,4,5,6).map: { (n × $_).comb.sort.join } } ); say now - INIT now; [11:09] rakudo-moar 289a62f4a: OUTPUT: «142857␤0.775302808␤» [11:10] ^^ .map and .race.map are faster than both .first and .race.first [11:12] And .race.first is significantly slower than bare .first. (I know, it depends on the load, but this calculation should be heavy enough to benefit from race.) [11:14] Or possibly I am just confused... I would certainly not be the first time. (probably not even the first time today 🙄) [11:14] I can't stick around, but I read the logs regularly. [11:15] *** thundergnat left [12:03] *** reportable6 left [12:04] Hello, I have a subroutine which returns some JSON data. I'd like to iterate over each pair in the data and run the amount through my stake-int-friendly routine so the number becomes human readable - but I can't really figure out how to break down the data for iteration. https://www.irccloud.com/pastebin/UW0o3sD9/ [12:05] example data ^ https://www.irccloud.com/pastebin/veHjkNOA/ [12:11] kawaii_, is that me or you are doing a loop on values and stake-int-friendly returns not a pair value, and then you try to initialize a hash with those not pair values? [12:12] maybe you mean something like... [12:13] my %stakes = stakers-info<>.map({ $_ => stake-int-friendly($_) })? [12:13] oh, hmm, this looks like it makes more sense, let me try it :) [12:13] I am really not sure desugaring (unpacking?) in signatures work this way as you probably intend it to. [12:15] sena_kun: thank you, this works perfectly :) [12:16] m: sub foo { @(%( a => '12001464284108570651140', d => 'rdx1' ),) }; my %hash = do for @(foo) -> $item { $item => ($item * 2) }; say %hash; [12:16] rakudo-moar 289a62f4a: OUTPUT: «{rdx1 => 24002928568217141302280}␤» [12:16] the call to .Hash is not necessary [12:16] yw [12:23] sena_kun: am I going about trying to iterate over this in a Cro template the wrong way? `<:sub input($_)><@stakes><.amount> : <.delegator>` [12:23] `template 'stakes.crotmp', format-stakes;` [12:26] kawaii_, your template assumes you are passing a hash with `stakes => ...`, but your `format-stakes` routine returns just a hash? [12:26] so you probably need something like `%( stakes => format-stakes() )`? [12:27] *** demostanis[m] joined [12:28] Wouldn't Raku with Rust macros be awesome? [12:42] why not Raku with Raku macros ? :-) [12:42] Raku macros seem less fun than Rust's [12:44] in their current state: yes, I agree :-) [12:49] Yeah, it's waiting for RakuAST before it gets really interesting [12:50] What's RakuAST? [12:50] A big refactor that's currently in progress on how code gets transformed into bytecode [12:52] or, more relevant to macros, a way for macros to actually look inside their arguments and make sense of them, and also a way to generate code without splicing strings together [12:53] demostanis[m]: https://www.youtube.com/watch?v=B5-gNKRw4gY&list=PL_OYHwbArcGgqbwXzxLBDMlaa0hr9A4c0&index=8 this video explains what it is, and the current status of the project [13:14] demostanis[m]: recommended :-) [13:23] seconded [13:26] *** Sgeo joined [13:34] *** codesections joined [13:41] *** jess joined [13:43] Ahh ok. I understand. It seems like a lot of work. [13:44] yep [13:44] but necessary [13:57] *** jaguart joined [14:04] *** jess left [14:04] *** reportable6 joined [14:20] thundergnat: there is no .first on hypers yet [14:20] lizmat, I'll pass your message to thundergnat [14:24] * leont still has to watch that presentation, but it's in front of their yt queue [14:33] *** tib joined [14:34] * jdv is wondering if the mem leaking will change incidently by all the new big changes [14:36] * lizmat has no doubt about that. But if it will leak more or less, that's the question :-) [14:36] *** clarkema joined [14:40] Hello, I'm looking for a kind volunteer to proofread a long blog post (long = 22 minutes read according to devto) and report me mistakes (technical and english). Of course it's about raku :) [14:41] I could read it. If that proofs anything, I don't know. :) [14:41] I can do the grammar bit [14:51] *** wingfold joined [14:51] jdv: any mem leaking in particular in mind? [14:51] m:say DateTime.now [14:51] frost, rakudo-moar 289a62f4a: OUTPUT: «2021-08-17T16:51:47.136597+02:00␤» [14:52] *** frost left [14:56] *** mattil joined [14:58] thank you a lot gfldex and Altreus I'm already on it with lizmat :) :) [15:00] yes, the very same that mr lembark ran into [15:00] i can probably repro it these days - maybe i will [15:01] i think the prevailing guess was libuv buffers or soemething now that i think about it [15:01] :) [15:02] jdv: https://github.com/rakudo/rakudo/issues/3086 ? [15:03] *** abraxxa left [15:06] hmm, i don't think so. [15:06] i'll try to golf it. i'll be back in a few hours probably... [15:09] cool [15:12] *** jo left [15:59] is there a syntax to match on hash keys? [16:00] there's .keys.grep [16:01] m: "!foo"~~/'!' [$({:1foo,:2bar}.keys)]/ [16:01] rakudo-moar 289a62f4a: ( no output ) [16:01] m: say "a" ~~ %(a=>1) [16:01] rakudo-moar 289a62f4a: OUTPUT: «True␤» [16:01] m: say "a" ~~ %(b=>1) [16:01] rakudo-moar 289a62f4a: OUTPUT: «False␤» [16:02] Altreus: but I want it the other way around (full keys as part of a regex, not parts of keys described by regex) [16:04] m: "!foo" ~~ any( $({:1foo,:2bar}.keys) ); # does any work? [16:04] rakudo-moar 289a62f4a: ( no output ) [16:04] o you'd have to map maybe [16:04] m: "!foo" ~~ any( {:1foo,:2bar}.keys.map: / $_ / ); # maybe? [16:04] rakudo-moar 289a62f4a: OUTPUT: «No such method '!cursor_start' for invocant of type 'Str'␤ in block at line 1␤␤» [16:04] eh something like that [16:05] I anticipate you're trying to inject it into an existing regex anyway [16:05] m: my %a=(foo=>1, bar=>2); say "!foo" ~~ /@(%a.keys)/ [16:05] rakudo-moar 289a62f4a: OUTPUT: «「foo」␤» [16:05] like that? [16:05] m: my %a=(foo=>1, bar=>2); say "!foo" ~~ /'!'@(%a.keys)/ [16:05] rakudo-moar 289a62f4a: OUTPUT: «「!foo」␤» [16:06] yeah! thank you dakkar! did not know about the @() inside of a regex [16:06] pat_js: the `@(%a.keys)` in that case is expanded to something like `['foo'|'bar']` [16:06] that's an intelligent DWIM [16:06] I like that [16:07] https://docs.raku.org/language/regexes#Quoted_lists_are_LTM_matches plus the "normal" way to cast something to a list [16:07] https://docs.raku.org/language/regexes#Regex_interpolation oh, it's actually mentioned at the end of this section [16:09] "the longest-match alternation" [16:09] That's where I should have looked better… thank you again [16:09] m: my @increasingly-edible = ; say 'food' ~~ /@increasingly-edible/; [16:09] rakudo-moar 289a62f4a: OUTPUT: «「food」␤» [16:09] the documentation is *vast*, I knew something like that was documented but it still took me a while to find it! [16:10] m: say 'food' ~~ /< food foo fo f >/ [16:10] rakudo-moar 289a62f4a: OUTPUT: «「food」␤» [16:10] ah! order not important [16:10] Altreus: yep, lists get interpreted as `|`-alternatives, that do longest-token-matching [16:11] m: say 'food' ~~ /[f||fo||foo||food]/ [16:11] rakudo-moar 289a62f4a: OUTPUT: «「f」␤» [16:11] `||` does left-to-right [16:11] aha [16:11] I don't think there's a way to have @-interpolations do `||`, though [16:11] Where to draw the line between "relevant here" and "go and find that out", when writing docs, is difficult [16:12] Personally I would have at least nb'd that there were | and || lists [16:12] "lists" [16:12] in regex [16:12] alternations [16:12] *** linkable6 left [16:12] *** evalable6 left [16:13] *** evalable6 joined [16:17] oh I just realised this section is part of the | doc :D [16:36] *** dakkar left [16:57] *** wingfold left [17:11] *** b2gills left [17:11] *** b2gills joined [17:25] *** sena_kun left [17:42] *** MoC joined [18:03] *** reportable6 left [18:04] *** reportable6 joined [18:10] *** MoC left [18:14] *** linkable6 joined [18:27] *** xinming left [18:27] *** xinming joined [18:50] *** avuserow left [18:50] *** synthmeat left [18:50] *** avuserow joined [18:50] *** synthmeat joined [18:52] New blog post on using Perl modules in Raku: https://phoenixtrap.com/2021/08/17/perl-raku-best-frenemies/ [18:54] *** abraxxa-home joined [18:59] mjgardner++ [19:12] *** neither joined [19:15] *** abraxxa-home left [19:31] *** discord-raku-bot left [19:31] *** discord-raku-bot joined [19:45] *** discord-raku-bot left [19:46] *** discord-raku-bot joined [20:21] *** mattil left [20:25] *** lucasb joined [20:32] *** jrjsmrtn left [20:34] *** jrjsmrtn joined [20:42] lolibloggedalittle: https://gfldex.wordpress.com/2021/08/17/most-fancy/ [20:50] *** clarkema left [20:53] *** neither left [21:09] *** Sgeo left [21:12] *** Sgeo joined [21:38] *** holyghost joined [22:03] *** holyghost left [22:04] *** holyghost_ joined [22:04] ugh! network kill. [22:05] mjgardner Nice post! I think you posted twice the Raku snippet whereas you wanted to post a pure Perl 5 version in the « Perl feed finder » part + there is 2 words without space « typesused » [22:05] anyway, hacking perl5 for third Ph.D. Will work more on AI-NLP later on. [22:05] But this is a great post with a lot of interesting links as usual (you know I’m a fan) [22:13] Thanks tib. The hazards of crossposting to another CMS… [22:13] Should be fixed now [22:14] Fixed mjgardner [22:15] Thank you for this [23:04] *** evalable6 left [23:04] *** linkable6 left [23:05] *** evalable6 joined [23:21] *** holyghost joined [23:37] *** holyghost_ left