[00:02] *** reportable6 left [00:13] *** lichtkind left [00:35] *** Xliff joined [00:55] *** frost joined [01:04] *** reportable6 joined [01:04] *** neshpion left [01:12] *** rakuUser left [02:12] *** bloatable6 left [02:12] *** squashable6 left [02:12] *** sourceable6 left [02:12] *** coverable6 left [02:12] *** reportable6 left [02:12] *** quotable6 left [02:12] *** nativecallable6 left [02:12] *** greppable6 left [02:12] *** benchable6 left [02:12] *** linkable6 left [02:12] *** notable6 left [02:12] *** statisfiable6 left [02:12] *** committable6 left [02:12] *** tellable6 left [02:12] *** bisectable6 left [02:12] *** shareable6 left [02:12] *** releasable6 left [02:12] *** unicodable6 left [02:12] *** evalable6 left [02:12] *** committable6 joined [02:13] *** nativecallable6 joined [02:13] *** greppable6 joined [02:13] *** quotable6 joined [02:13] *** tellable6 joined [02:13] *** benchable6 joined [02:14] *** linkable6 joined [02:14] *** kybr left [02:14] *** squashable6 joined [02:14] *** notable6 joined [02:14] *** evalable6 joined [02:17] *** kybr joined [03:09] ¦ doc/special-chars-in-char-ranges: 3a0d01c988 | (Daniel Sockwell)++ (committed using GitHub Web editor) | doc/Language/regexes.pod6 [03:09] ¦ doc/special-chars-in-char-ranges: Fix whitespace [03:09] ¦ doc/special-chars-in-char-ranges: [03:09] ¦ doc/special-chars-in-char-ranges: Remove trailing whitespace. [03:09] ¦ doc/special-chars-in-char-ranges: review: https://github.com/Raku/doc/commit/3a0d01c988 [03:14] *** bisectable6 joined [03:14] *** shareable6 joined [03:14] *** coverable6 joined [03:15] *** reportable6 joined [03:15] *** sourceable6 joined [03:59] *** keutoi joined [04:03] ¦ doc: 9741c66cc2 | (Daniel Sockwell)++ (committed using GitHub Web editor) | doc/Language/regexes.pod6 [04:03] ¦ doc: Explain behavior of non-alphanumerics in <[ ]> [04:03] ¦ doc: [04:03] ¦ doc: The docs previously mentioned that you can use \ to escape characters inside <[ ]> ; this [04:03] ¦ doc: commit adds the fact that you don't need to escape most non-alphanumeric characters the way [04:03] ¦ doc: you do in the portion of a regex outside <[ ]> and that you must escape (rather than quote) [04:03] ¦ doc: characters inside <[ ]> for them to have their literal meaning. [04:03] ¦ doc: review: https://github.com/Raku/doc/commit/9741c66cc2 [04:03] Link: https://docs.raku.org/language/regexes [04:03] ¦ doc: 3a0d01c988 | (Daniel Sockwell)++ (committed using GitHub Web editor) | doc/Language/regexes.pod6 [04:03] ¦ doc: Fix whitespace [04:03] ¦ doc: [04:03] ¦ doc: Remove trailing whitespace. [04:03] *** discord-raku-bot left [04:03] ¦ doc: review: https://github.com/Raku/doc/commit/3a0d01c988 [04:03] ¦ doc: c6b9012fee | (Will Coleda)++ (committed using GitHub Web editor) | doc/Language/regexes.pod6 [04:03] ¦ doc: Merge pull request #3948 from Raku/special-chars-in-char-ranges [04:03] ¦ doc: [04:03] ¦ doc: Explain behavior of non-alphanumerics in <[ ]> [04:03] ¦ doc: review: https://github.com/Raku/doc/commit/c6b9012fee [04:04] *** discord-raku-bot joined [04:15] *** unicodable6 joined [04:15] *** bloatable6 joined [04:30] *** synthmeat left [04:31] *** synthmeat joined [04:50] *** clarjon_1 joined [04:52] *** clarjon1 left [05:05] *** Sgeo left [05:13] *** Xliff_ joined [05:13] *** statisfiable6 joined [05:17] *** Xliff left [05:26] Hello :) [05:27] https://dev.to/thibaultduponchelle/the-ephemeral-miniconf-clement-oudot-2a1a and https://dev.to/thibaultduponchelle/the-ephemeral-miniconf-jose-joaquin-atria-2m5h jjatria maybe plans to talk about Raku (?) [05:28] *** aleksb joined [05:35] hi, something counter-intuitive is happening, if this isn't a compiler bug can someone please explain this behaviour? [05:35] sub test { [05:35] gather { [05:35] loop (my $d = 1; $d < 5; $d++) { [05:35] take (0, $d); [05:36] } [05:36] } [05:36] } [05:36] say test(); # output: ((0 1) (0 2) (0 3) (0 4)) [05:36] say eager test(); # output: ((0 5) (0 5) (0 5) (0 5)) [05:59] *** ufobat_ joined [06:02] *** reportable6 left [06:03] *** reportable6 joined [06:09] *** markus_ left [06:13] *** releasable6 joined [07:05] *** keutoi left [07:05] *** keutoi joined [07:11] m: sub test { gather { loop (my $d = 1; $d < 5; $d++) { take (0, $d); } } }; say test(); say eager test() # aleksb fyi you can run code here [07:11] rakudo-moar 5492452b2: OUTPUT: «((0 1) (0 2) (0 3) (0 4))␤((0 5) (0 5) (0 5) (0 5))␤» [07:12] m: sub test { gather { loop (my $d = 1; $d < 5; $d++) { take (0, $d); } } }; say eager test(); [07:12] rakudo-moar 5492452b2: OUTPUT: «((0 5) (0 5) (0 5) (0 5))␤» [07:13] m: sub test { gather { loop (my $d = 1; $d < 5; $d++) { take (0, $d); } } }; my $x = eager test; say $x[0] === $x[1] [07:13] rakudo-moar 5492452b2: OUTPUT: «False␤» [07:13] huh. Thought that might be it [07:18] m: sub test { gather { loop (my $d = 1; $d < 5; $d++) { take (0, $d); } } }; my $l := eager test(); say $l.WHAT; [07:18] rakudo-moar 5492452b2: OUTPUT: «(List)␤» [07:18] m: sub test { gather { loop (my $d = 1; $d < 5; $d++) { take (0, $d); } } }; my $l := eager test(); dd $l.WHAT; [07:18] rakudo-moar 5492452b2: OUTPUT: «List␤» [07:18] m: sub test { gather { loop (my $d = 1; $d < 5; $d++) { take (0, $d); } } }; my $l := eager test(); dd $l; [07:18] rakudo-moar 5492452b2: OUTPUT: «((0, 5), (0, 5), (0, 5), (0, 5))␤» [07:19] m: sub test { gather { loop (my $d = 1; $d < 5; $d++) { take 0, $d; } } }; my $l := eager test(); dd $l; [07:19] rakudo-moar 5492452b2: OUTPUT: «((0, 5), (0, 5), (0, 5), (0, 5))␤» [07:19] m: sub test { gather { my $d = 1; while $d < 5 { take (0, $d++); } } }; say test(); say eager test() [07:19] rakudo-moar 5492452b2: OUTPUT: «((0 1) (0 2) (0 3) (0 4))␤((0 1) (0 2) (0 3) (0 4))␤» [08:05] *** linkable6 left [08:05] *** evalable6 left [08:09] *** lichtkind joined [08:19] *** neither joined [08:28] *** patrickb joined [08:45] aleksb: "the variable is declared as a lexical variable in the loop's outer or containing scope so that it can be used in code following the loop statement." [08:46] *** neither12 joined [08:46] *** neither12 left [08:46] and gather/take must preserve the scope [08:46] *** neither81 joined [08:46] *** neither81 left [08:48] *** neither left [09:20] *** lizmat_ joined [09:20] *** lizmat_ left [09:20] *** lizmat_ joined [09:21] *** C0l0mb0 joined [09:21] *** C0l0mb0 left [09:23] *** lizmat left [09:23] *** col0mbo joined [09:23] gfldex: does (0, $d) capture a reference to $d rather than its value? Using [0, $d] instead does what I expect [09:23] *** TempIRCLogger left [09:23] m: sub test { gather { loop (my $d = 1; $d < 5; $d++) { take [0, $d] } } }; say eager test() [09:23] rakudo-moar 5492452b2: OUTPUT: «([0 1] [0 2] [0 3] [0 4])␤» [09:24] *** lizmat_ left [09:24] m: sub test { gather { loop (my $d = 1; $d < 5; $d++) { take (0, $d) } } }; say eager test() [09:24] rakudo-moar 5492452b2: OUTPUT: «((0 5) (0 5) (0 5) (0 5))␤» [09:27] *** lizmat joined [09:28] *** lizmat joined [09:29] *** TempIRCLogger joined [09:29] aleksb: yeah, i seem to recall someone wrote a blog post recently talking about the difference between Arrays and List and how they interact with containers/values [09:32] m: my $x = 1; my $y = (0, $x); $x++; say $y [09:32] rakudo-moar 5492452b2: OUTPUT: «(0 2)␤» [09:38] *** neither joined [09:39] well, I guess that's just how it works... seems strange for "immutable" lists to be so easy to change [09:41] well, it's a matter of perspective. the lists themselves can't change, but the things in the lists can [09:50] Is there a "correct" way to store the value, not the variable, in the list? I can do +$d or $d.clone [09:50] *** col0mbo left [09:53] m: my $x = 1; my $y = (0, $x<>); $x++; say $y # another way [09:53] rakudo-moar 5492452b2: OUTPUT: «(0 1)␤» [09:54] ah I think I needed that operator for something recently thanks [09:55] it's the decont (de-containerizer) operator [09:56] mentioned in https://docs.raku.org/language/containers (and probably other places, but that's the first place i looked) [09:57] yeah thanks I need to review that [10:07] *** linkable6 joined [10:08] *** evalable6 joined [10:48] hello, does raku have the similar things as [x;y;z] in python, where i can use index from x to y counting by z steps? [10:49] m: my @a = ^20; say @a[1,3..*] [10:49] rakudo-moar 5492452b2: OUTPUT: «(1 (3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19))␤» [10:49] m: my @a = ^20; say @a[1,3...*] [10:49] rakudo-moar 5492452b2: OUTPUT: «(1 3 5 7 9 11 13 15 17 19)␤» [10:50] *** kylese joined [10:52] oh, thanks lizmat [10:52] or any other algorithm you can think of with ... [10:56] Yes, it is really impressive. [10:56] *** squashable6 left [10:57] m: my @a = ^20; say @a.skip.rotor(1 => 1).flat # TIMTOWTDI [10:57] rakudo-moar 5492452b2: OUTPUT: «(1 3 5 7 9 11 13 15 17 19)␤» [10:58] Yes, it is really impressive. [10:58] *** squashable6 left [10:58] rakudo-moar 5492452b2: OUTPUT: «(1 3 5 7 9 11 13 15 17 19)␤» [11:01] hi, I have a class `A` and its implementation in a file. I also have some infix operator declarations for type `A` outside the class e.g., to have `$a1 + $a2`. Can I move these operator subroutines to another file and `use` them along with the class? [11:02] MasterDuke thanks, it's also a good way,TMTOWTDI! [11:02] benchable6: compare my @a = ^20; my @b; @b = @a[1,3...*] for ^10_000; ||| my @a = ^20; my @c; @d = @c.skip.rotor(1 => 1).flat for ^10_000; [11:02] MasterDuke, ¦my: «Cannot find this revision (did you mean “nom”?)» [11:03] benchable6: HEAD compare my @a = ^20; my @b; @b = @a[1,3...*] for ^10_000; ||| my @a = ^20; my @c; @d = @c.skip.rotor(1 => 1).flat for ^10_000; [11:03] MasterDuke, starting to benchmark the 1 given commit [11:03] MasterDuke, No new data found [11:05] benchable6: compare HEAD my @a = ^20; my @b; @b = @a[1,3...*] for ^1_000; ||| my @c = ^20; my @d; @d = @c.skip.rotor(1 => 1).flat for ^1_000; # i didn't the sequence version would be that much slower [11:05] MasterDuke, starting to benchmark the 1 given commit [11:05] MasterDuke, ¦HEAD: «04===SORRY!04=== Error while compiling /tmp/Q5mKSSUk5I␤Missing block␤at /tmp/Q5mKSSUk5I:1␤------> 03y $b = Bench.new; $b.cmpthese(10, %subs)08⏏04␤» [11:05] m: sub f { gather for ^19 { state $i = 1; take $i++ } }; say (my @a = ^20)[&f]; [11:05] rakudo-moar 5492452b2: OUTPUT: «(1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19)␤» [11:05] frost: subscripts also take callables ^^^ [11:06] benchable6: compare HEAD my @a = ^20; my @b; @b = @a[1,3...*] for ^1_000; ||| my @c = ^20; my @d; @d = @c.skip.rotor(1 => 1).flat for ^1_000; [11:06] MasterDuke, starting to benchmark the 1 given commit [11:06] *** sena_kun joined [11:06] MasterDuke, https://gist.github.com/cea6e1eb84580f6f218770953295b805 [11:07] neither: The operators will refere to the type object produced by the class. As long as those are available at compile time, you can put the operators where you like. [11:07] ugh, don't know why that took so long to get right [11:14] gfldex: Yes that's the issue: I get `Invalid typename 'A' in parameter declaration.` as you say. I don't know how to make it available at compile time. [11:15] neither: did you try a forward declaration? [11:19] neither: You will have to `use` the module with the class definitions in the file with the operators. [11:24] *** neither left [11:37] *** neither joined [11:49] *** lizmat left [11:50] *** lizmat joined [11:50] *** lizmat left [11:51] *** lizmat joined [11:53] *** TempIRCLogger left [11:54] *** lizmat left [11:54] *** lizmat joined [11:55] *** TempIRCLogger joined [12:03] *** reportable6 left [12:03] *** reportable6 joined [12:29] *** patrickb left [12:39] *** patrickb joined [12:42] *** happy-dude left [12:42] *** juanfra left [12:42] *** AlexDaniel left [12:42] *** cnx left [12:42] *** demostanis[m] left [12:42] *** CIAvash left [12:45] *** juanfra joined [12:53] *** unixcat64 left [12:54] *** Sgeo joined [12:56] *** unixcat64 joined [12:56] *** unixcat64 left [12:56] *** unixcat64 joined [13:02] *** cnx joined [13:02] *** happy-dude joined [13:02] *** demostanis[m] joined [13:02] *** AlexDaniel joined [13:02] *** CIAvash joined [13:03] gfldex: I have 3 files: `main.rakumod`, `ops.rakumod` and `script.raku`. If I `use` the `main` module in `ops`, rakumod files are compiling fine. Aim is to `use main` from `script.raku` and to be able to use the class in `main` module along with its operations available, e.g., `$a1 + $a2` to be possible. But from `script.raku`, it doesn't see the [13:03] operators. [13:06] *** rakuUser joined [13:08] *** unixcat64 left [13:09] *** unixcat64 joined [13:11] *** kylese left [13:19] *** Xliff_ left [13:28] *** neither left [13:29] *** Xliff joined [13:30] *** Manifest0 left [13:37] *** frost left [13:46] * lizmat clickbaits https://rakudoweekly.blog/2021/08/30/2021-35-superseding/ [14:02] *** neither joined [14:15] *** b2gills left [14:15] *** b2gills joined [14:27] *** neither55 joined [14:28] *** neither left [14:29] *** keutoi left [14:33] *** unixcat64 left [14:34] *** unixcat64 joined [14:46] *** tejr left [14:46] *** tejr joined [14:48] *** unixcat64 left [14:49] *** unixcat64 joined [14:54] *** unixcat64 left [14:55] *** unixcat64 joined [15:24] *** unixcat64 left [15:24] *** unixcat64 joined [15:30] *** Manifest0 joined [15:36] *** patrickb left [15:37] *** neither55 left [16:02] *** ufobat_ left [16:08] *** ufobat_ joined [16:37] *** MoC joined [16:57] *** squashable6 joined [16:59] *** ufobat__ joined [17:02] *** ufobat_ left [17:22] *** rakuUser left [17:32] *** rakuUser joined [17:44] *** jaguart joined [18:02] *** reportable6 left [18:36] *** sena_kun left [18:38] *** SmokeMachine__ left [18:38] *** SmokeMachine__ joined [19:25] *** ufobat__ left [19:36] *** jess joined [19:58] *** ufobat__ joined [20:04] *** reportable6 joined [20:37] *** ufobat__ left [20:42] *** MoC left [21:29] *** rakuUser left [21:43] *** MasterDuke left [21:46] Whoever figured out the BUILD/TWEAK constructor split was a genius. The more I try to use more rigid non-Raku languages the more I'm convinced nothing else is sane. [21:47] *** neshpion joined [22:02] phogg: Examples, pls? I'm interested in seeing how other people have been using that. [22:05] I have nothing particularly worth sharing, just a general delight in the way that composition with them works [22:06] for a work project I and one of my co-workers liberally stole the Raku object model and implemented it in PHP, and it is there where we have repeatedly found the objects and APIs to be superior [22:06] things I have in real Raku are too trivial by comparison [22:15] *** rakuUser joined [22:19] *** rakuUser left [22:19] *** rakuUser joined [22:30] *** Oshawott joined [22:32] <[Coke]> phogg: are you able to consider switching to Raku wholesale? [22:32] [Coke]: would if we could [22:32] <[Coke]> I hear that. [22:32] a couple million lines of code don't get rewritten overnight [22:33] <[Coke]> What if there was an Inline::PHP? [22:33] we had been saying for years "sure would be nice if the APIs and libraries in PHP didn't suck" and then in 2017 my co-maintainer said "I am just going to write a version of Str." [22:33] *** archenoth left [22:34] One thing lead to another, and things are much better now. If you box hard enough you can get pretty far even without a language that really supports modifying itself [22:34] lack of multiple inheritance is a pretty hard limit [22:35] I should eventually port our extensions to Str and other things out and put them up as raku modules. There are some useful things maybe others would want. [22:36] <[Coke]> cool. [22:39] if there was a working Inline::PHP that would help a lot. [22:40] that would give us an easier incremental transition path without having to stop and rewrite the world. [22:49] *** MasterDuke joined [23:09] *** SystemFFan joined [23:20] *** lichtkind left