[00:02] *** reportable6 left [00:02] *** reportable6 joined [00:07] *** kjp joined [00:32] *** Doc_Holliwould left [00:44] *** Doc_Holliwood joined [00:46] Another possibly valuable (but far less easy to automate) task for volunteers is perf testing modules. (I say far harder because there's no obvious baseline to compare against, unless you're just looking for Rakudo regressions, or contribute a perf test to the module.) [00:47] My reason for thinking that is I wonder how much of the *perceived* slowness of Raku in actual use is low-level modules that haven't been optimized yet. [00:50] *** kjp left [01:16] *** tejr left [01:19] *** canw joined [01:21] *** tejr joined [01:21] *** kjp joined [01:27] perceived? i have measured my far from optimized, heavily allocating ruby tools and the raku ported counterparts, seeing 5x-100x slowdowns and *a lot* more mem usage, e.g. 34mb vs 2.3gb. now, handwriting some super hot stuff in nqp help quite a bit, sometimes even resulting in a slight speedup. that said, i don't think that that's the whole picture when it comes to perf, seeing what kind of mind-bending work jnthn has to do to free up a few cycles here and [01:27] there. anyways, time for bed. thanks again for the help above! [01:33] *** justsomeguy joined [01:45] *** rassoc left [01:53] .tell rassoc Oh, I wasn't saying there aren't lots of places that need optimization. I meant, when someone sits down and says "Is Raku going to be fast enough for my needs?" then having slow and/or memory hogging standard modules can make the answer "No" without going any farther. One of many reasons that e.g. JSON::Fast and CBOR::Simple are rather heavily optimized. Because if you need them, there's a [01:53] japhb, I'll pass your message to rassoc [01:53] decent chance you need to do a *lot* with data in those formats. [01:54] .tell rassoc (message got cut) Because if you need them, there's a decent chance you need to do a *lot* with data in those formats. [01:54] japhb, I'll pass your message to rassoc [01:59] 'write it in nqp' is the raku version of 'write it in assembly' [02:08] *** leah2 left [02:10] *** Doc_Holliwood left [02:55] *** Kaipi left [02:56] *** Kaipi joined [03:29] *** canw left [04:12] *** john joined [04:14] hello gents and ladies. [04:19] *** john left [04:41] *** RandalSchwartz joined [04:46] *** Doc_Holliwood joined [05:44] *** RandalSchwartz left [05:53] *** jmcgnh left [05:56] *** jmcgnh joined [06:03] *** reportable6 left [06:03] *** reportable6 joined [06:07] *** Doc_Holliwould joined [06:07] *** Doc_Holliwood left [06:19] *** _________ left [06:27] *** holli__ joined [06:30] *** Doc_Holliwould left [06:30] *** _________ joined [06:37] *** Sgeo left [06:48] *** patrickb joined [06:50] *** abraxxa joined [06:56] *** abraxxa left [06:56] *** abraxxa joined [07:03] *** vrurg_ joined [07:05] *** vrurg left [07:07] *** stoned75_ joined [07:10] *** stoned75 left [07:16] *** Eddward left [07:28] *** holli__ left [07:40] *** _________ left [07:44] *** Geth left [07:44] *** Geth joined [07:50] *** dakkar joined [07:51] *** _________ joined [07:57] *** synthmeat left [07:59] *** Xliff joined [07:59] \o [08:00] o/ [08:13] *** synthmeat joined [08:19] *** leah2 joined [08:50] *** rassoc joined [08:57] *** MoC joined [09:45] *** frost joined [10:36] *** rassoc left [10:49] *** sono left [10:58] *** Doc_Holliwood joined [10:59] *** Kaipi left [11:00] *** Kaipi joined [11:13] *** guifa left [11:14] *** frost left [11:28] *** frost joined [12:02] *** reportable6 left [12:03] *** reportable6 joined [12:16] *** justsomeguy left [12:52] *** Doc_Holliwood left [14:00] *** Eddward joined [14:06] *** Doc_Holliwood joined [14:09] *** Sgeo joined [14:38] *** stoned75_ left [14:51] *** melezhik joined [14:51] . [15:09] *** melezhik left [15:11] *** MoC left [15:34] *** Doc_Holliwood left [15:47] *** patrickb left [16:11] *** smarton left [16:11] *** smarton joined [16:27] *** xerxes joined [16:51] Does Raku being impossible to teach mean that we don't have to worry about being dragged into the GitHub Copilot debate? :-> [17:03] *** dakkar left [17:25] <[Coke]> me: let me try something in raku. Realize I'm running an old version. rakubrew switch to the newer one I installed a month ago. realize I don't have zef. install zef, readline, back into raku.... have entirely forgotten why I came in this room. [17:25] *** Kaipi left [17:26] *** Kaipi joined [17:26] *** cognominal joined [17:27] Maybe Micro$oft can write you an AI that suggests things worth remembering. [17:29] <[Coke]> probably already one in Azure somewhere. [17:32] well, what would keep MS from downloading open source modules from anywhere else to run Copilot on? [17:32] 2021-07-08T13:01:19Z #raku-dev lizmat is there an issue with my rakudo docs PR #4441? my intent was to get published pretty much as is and let you experts add to it--a living WIP [17:34] lizmat: see: https://twitter.com/C64Revival/status/1412963077801189376 [17:34] and for giggles: https://twitter.com/ferrix/status/1412813396123267073 [17:38] Joking aside, if we would have a big userbase, this would be a problem for us. As I understand it, Copilot chops up publicly _visible_ code into sections of up to 10 lines of code and tries to find a match while you type new code in VS. And they don't care about the license of those 10 lines of code. [17:39] Not much a problem for Java, because that will always be fair use. In Raku 10 lines of code can be the whole bloody program. [17:40] but what would moving to Gitea or GitLab bring ? [17:41] M$ wont touch those. [17:41] Others might, but not M$. They got a good legal team. [17:41] <[Coke]> Is there a discussion to move us off github? [17:42] Not really. [17:42] <[Coke]> ok, good. :) [17:45] *** xerxes left [17:45] hello all [17:45] sub whatever (@x) { @x.shift } ; my @y = 1..3; @y.say; whatever(@y); @y.say [17:45] polettix_, rakudo-moar 1bd0411c0: OUTPUT: «[1 2 3]␤[2 3]␤» [17:46] The cool thing is that not M$ is violating the license but the user of VS with that Copilot plugin. The user of Copilot is creating the derived work. So if you publish under any license that requires attribution, you can go and hunt projects that use 10 lines of code of your work. [17:46] Well, people can find code in your project and steal it anyway [17:46] wondering why @x "is rw" here, I thought parameters were supposed to be read-only by default [17:46] *** xinming joined [17:47] m: say ‚Hi polettix_! Do you ♥ Raku?‘; [17:47] rakudo-moar 1bd0411c0: OUTPUT: «Hi polettix_! Do you ♥ Raku?␤» [17:47] and people actually do that - if copilot generates something like that looks like "the whole bloody program" they may get suspicious [17:47] gfldex: enough to try learning it :) [17:48] polettix_: We consider @x to be an object that you call public methods on. [17:48] And public methods are fair game. :) [17:49] I see [17:49] sub whatever (@x) { shift @x } ; my @y = 1..3; @y.say; whatever(@y); @y.say [17:49] polettix_, rakudo-moar 1bd0411c0: OUTPUT: «[1 2 3]␤[2 3]␤» [17:49] this is a bit more objectable ;) [17:50] or maybe *less* objectable! (terrible pun) [17:50] sub whatever (@x) { shift @x } ; my @y := 1..3; @y.say; whatever(@y); @y.say [17:50] m: sub whatever (@x) { shift @x } ; my @y := 1..3; @y.say; whatever(@y); @y.say [17:50] rakudo-moar 1bd0411c0: OUTPUT: «1..3␤Cannot call 'shift' on an immutable 'Range'␤ in sub whatever at line 1␤ in block at line 1␤␤» [17:50] you could do this [17:51] Voldenet: I was expecting @x to be considered immutable inside whatever() no matter what you pass it [17:51] anyway... it's what I was expecting, just this :) [17:54] m: sub oi(@a) is pure { @a[*]:delete }; my @a = <1 2 3>; oi(@a); dd @a; [17:54] rakudo-moar 1bd0411c0: OUTPUT: «WARNINGS for :␤Useless use of "oi(@a)" in expression "oi(@a)" in sink context (line 1)␤Array @a = []␤» [17:54] polettix_: at least we are honest ^^^ [18:02] *** reportable6 left [18:03] *** reportable6 joined [18:20] *** Doc_Holliwood joined [18:26] *** sono joined [18:31] m: sub whatever (Map @x) { shift @x } ; my @y := 1..3; @y.say; [18:31] rakudo-moar 1bd0411c0: OUTPUT: «1..3␤» [18:32] m: sub whatever (Map @x) { shift @x } ; my @y := 1..3; @y.say; hatever(@y); @y.say [18:32] rakudo-moar 1bd0411c0: OUTPUT: «5===SORRY!5=== Error while compiling ␤Undeclared routine:␤ hatever used at line 1. Did you mean 'whatever'?␤␤» [18:32] m: sub whatever (Map @x) { shift @x } ; my @y := 1..3; @y.say; whatever(@y); @y.say [18:32] rakudo-moar 1bd0411c0: OUTPUT: «1..3␤Type check failed in binding to parameter '@x'; expected Positional[Map] but got Range (1..3)␤ in sub whatever at line 1␤ in block at line 1␤␤» [18:32] m: sub whatever (@x) { shift @x } ; my @y := 1..3; @y.say; whatever(@y.Map); @y.say [18:32] rakudo-moar 1bd0411c0: OUTPUT: «1..3␤Odd number of elements found where hash initializer expected:␤Found 3 (implicit) elements:␤Last element seen: 3␤ in block at line 1␤␤» [18:32] m: sub whatever (List @x) { shift @x } ; my @y := 1..3; @y.say; whatever(@y); @y.say [18:32] rakudo-moar 1bd0411c0: OUTPUT: «1..3␤Type check failed in binding to parameter '@x'; expected Positional[List] but got Range (1..3)␤ in sub whatever at line 1␤ in block at line 1␤␤» [18:33] m: sub whatever (List @x) { shift @x } ; my @y := 1..3; @y.say; whatever(@y.Array); @y.say [18:33] rakudo-moar 1bd0411c0: OUTPUT: «1..3␤Type check failed in binding to parameter '@x'; expected Positional[List] but got Array ([1, 2, 3])␤ in sub whatever at line 1␤ in block at line 1␤␤» [18:33] m: sub whatever (List @x) { shift @x } ; my @y := 1..3; @y.say; whatever(@y.List); @y.say [18:33] rakudo-moar 1bd0411c0: OUTPUT: «1..3␤Type check failed in binding to parameter '@x'; expected Positional[List] but got List ((1, 2, 3))␤ in sub whatever at line 1␤ in block at line 1␤␤» [18:33] m: sub whatever (List $x) { shift @x } ; my @y := 1..3; @y.say; whatever(@y.List); @y.say [18:33] rakudo-moar 1bd0411c0: OUTPUT: «5===SORRY!5=== Error while compiling ␤Variable '@x' is not declared. Did you mean '$x'?␤at :1␤------> 3sub whatever (List $x) { shift 7⏏5@x } ; my @y := 1..3; @y.say; whatever(@␤» [18:33] m: sub whatever (List $x) { shift $x[] } ; my @y := 1..3; @y.say; whatever(@y.List); @y.say [18:33] rakudo-moar 1bd0411c0: OUTPUT: «1..3␤Cannot call 'shift' on an immutable 'List'␤ in sub whatever at line 1␤ in block at line 1␤␤» [18:33] There we go. [18:33] List == Immutable Array [18:33] Map == Immutable Hash [18:34] FYI [18:36] *** john joined [18:38] `my @whatever` creates an Array and `=` to it uses list assignment [18:39] m: my @y := 1..3; @y = 1..3; [18:39] rakudo-moar 1bd0411c0: OUTPUT: «Cannot modify an immutable Range (1..3)␤ in block at line 1␤␤» [18:39] but @y is only expected to be Positional [18:40] *** john left [18:41] m: my @y = 1..3; @y = 1..3; [18:41] rakudo-moar 1bd0411c0: ( no output ) [18:45] *** Kaipi left [18:45] *** Kaipi joined [18:47] *** Kaipi left [18:47] *** Kaipi joined [18:49] Xliff: did you consider NativeCall? [18:50] *** Kaipi left [18:50] *** Kaipi joined [18:54] *** nibble joined [18:56] *** kylese joined [19:09] m: sub whatever (List() $x) { shift $x } ; my @y = 1..3; whatever(@y); @y.say [19:09] rakudo-moar 1bd0411c0: OUTPUT: «[2 3]␤» [19:10] Also, the type constraint is missleading. It's a contraint what you can pass into the sub, not what the sub can do to the container it's being called with. [19:18] gfldex: What do you mean by "did you consider NativeCall"? [19:20] There. That's my 581,502nd line of Raku written... [19:20] Or there abouts... [19:30] *** bd3i joined [19:49] *** john joined [19:50] fwiw, I think polettix_ has a somewhat valid observation. at the very least, explicitly marking @ and % params as readonly should throw an error: [19:50] m: sub s (@x is readonly) { @x = 1 }; my @a = ^3; s @a; say @a; [19:50] rakudo-moar 1bd0411c0: OUTPUT: «[1]␤» [19:50] ^ LTA [19:50] and the error should look similar to: [19:50] m: sub s (@x is rw) { @x = 1 }; my @a = ^3; s @a; say @a; [19:50] rakudo-moar 1bd0411c0: OUTPUT: «5===SORRY!5=== Error while compiling ␤For parameter '@x', '@' sigil containers don't need 'is rw' to be writable␤Can only use 'is rw' on a scalar ('$' sigil) parameter, not '@x'␤at :1␤» [19:51] the only way to actually make sure the passed var won't be modified, is: [19:51] m: sub s (@x is copy) { @x = 1 }; my @a = ^3; s @a; say @a; [19:51] rakudo-moar 1bd0411c0: OUTPUT: «[0 1 2]␤» [19:51] this all feels rather inconsistent to me [19:55] *** john left [20:01] *** kylese left [20:09] *** nibble left [20:09] *** Xliff left [20:21] *** Sgeo left [20:23] *** Sgeo joined [20:40] *** john joined [21:01] raydiak: also, `is copy` does a shallow copy. We do have a few methods in CORE with the suffix `-rw` and the odd `subst-mutate`. So yes, there is inconsistancy. However, @a is a _container_. So it is mutable by definition. [21:03] NativeCall is the reason why there can't be any mutablility-rules that are enforced by the compiler. As soon as you are in C land, all bets are off. [21:04] So play nice or ppl wont use your modules. :) [21:05] *** RandalSchwartz joined [21:16] There could be mutability rules enforced by the compiler by either marking routines able to even use NativeCall/routines that use NativeCall [21:17] or mutability rules that apply only to raku code by design [21:23] immutable everything [21:27] Voldenet: That is true. Raku is a programmable programming language. You can build your own type system to turn it into another language. However, that leaves the question why you don't code in Haskell if you want Haskell semantics. [21:36] *** john left [21:39] *** john joined [21:54] Is there a place to list all modules change sorted by last modification date? [21:54] https://modules.raku.org/search/ <--- This just list all modules, doesn't support any sort options [21:55] https://raku.land/recent [21:55] *** john left [21:56] thanks [22:19] Hence `could be`, I'm not sure whether true immutability would even be practical without the language supporting immutable concepts [22:34] *** dogbert17 left [22:43] *** Tirifto left [22:44] *** Tirifto joined [22:53] *** Kaiepi joined [22:53] *** Kaipi left [23:07] Voldenet: Raku *does* support immutability, it's just not the default used with shorthands: [] and {} give you mutable containers, so that's what people end up with by default. But there's nothing that stops you from manually creating Lists and Maps. [23:16] *** oodani left [23:16] *** oodani joined [23:17] there's (or, will be) also codesections' (‘codesections's’?) thing [23:20] *** oodani left [23:21] *** oodani joined [23:25] moon-child: Yeah, the second spelling with the s's is correct. [23:28] I'm not sure if 'codesections' is plural or not [23:30] ah, chicago talks about 'nouns plural in form, singular in meaning', saying their possessives should be spelt like regular plurals. So it would be codesections', with no extra s on the end [23:32] (assuming you interpret 'codesections' as referring to multiple sections of code, which I think is reasonable) [23:34] Well, for example "Miles" is a common name. When referring to something they possess, it is "Miles's". [23:35] I was assuming that any nick should be treated as singular if it refers to an individual, singular if it refers to a bot or mass noun, and plural if it refers to a group of people that share an attribute ("singers") [23:38] or, for possessive, just Miles' [23:39] codesections' talk is also correct [23:40] japhb: I don't know if 'Miles' the name is 'plural in form', though; I think it's just a singular word that ends in 's' [23:40] whereas codesections is clearely the plural of code section. Manual uses as an example 'the united states'; you wouldn't refer to a 'united state', but it's still plural [23:41] *clearly