🦋 Welcome to the former MAIN() IRC channel of the Raku Programming Language (raku.org). This channel has moved to Libera (irc.libera.chat #raku) Set by lizmat on 23 May 2021. |
|||
00:02
reportable6 left,
reportable6 joined
00:07
kjp joined
00:32
Doc_Holliwould left
00:44
Doc_Holliwood joined
|
|||
japhb | 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:46 | |
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:47 | ||
00:50
kjp left
01:16
tejr left
01:19
canw joined
01:21
tejr joined,
kjp joined
|
|||
rassoc | 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
|
|||
japhb | .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 | |
tellable6 | japhb, I'll pass your message to rassoc | ||
japhb | decent chance you need to do a *lot* with data in those formats. | ||
.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 | ||
tellable6 | japhb, I'll pass your message to rassoc | ||
moon-child | 'write it in nqp' is the raku version of 'write it in assembly' | 01:59 | |
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
|
|||
john | hello gents and ladies. | 04:14 | |
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,
reportable6 joined
06:07
Doc_Holliwould joined,
Doc_Holliwood left
06:19
_________ left
06:27
holli__ joined
06:30
Doc_Holliwould left,
_________ joined
06:37
Sgeo left
06:48
patrickb joined
06:50
abraxxa joined
06:56
abraxxa left,
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,
Geth joined
07:50
dakkar joined
07:51
_________ joined
07:57
synthmeat left
07:59
Xliff joined
|
|||
Xliff | \o | 07:59 | |
moon-child | o/ | 08:00 | |
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
|
|||
melezhik | . | 14:51 | |
15:09
melezhik left
15:11
MoC left
15:34
Doc_Holliwood left
15:47
patrickb left
16:11
smarton left,
smarton joined
16:27
xerxes joined
|
|||
gfldex | Does Raku being impossible to teach mean that we don't have to worry about being dragged into the GitHub Copilot debate? :-> | 16:51 | |
17:03
dakkar left
|
|||
[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 | |
17:25
Kaipi left
17:26
Kaipi joined,
cognominal joined
|
|||
gfldex | Maybe Micro$oft can write you an AI that suggests things worth remembering. | 17:27 | |
[Coke] | probably already one in Azure somewhere. | 17:29 | |
lizmat | well, what would keep MS from downloading open source modules from anywhere else to run Copilot on? | 17:32 | |
tellable6 | 2021-07-08T13:01:19Z #raku-dev <tbrowder> 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 | ||
gfldex | lizmat: see: twitter.com/C64Revival/status/1412...7801189376 | 17:34 | |
and for giggles: twitter.com/ferrix/status/1412813396123267073 | |||
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:38 | ||
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:39 | ||
lizmat | but what would moving to Gitea or GitLab bring ? | 17:40 | |
gfldex | M$ wont touch those. | 17:41 | |
Others might, but not M$. They got a good legal team. | |||
[Coke] | Is there a discussion to move us off github? | ||
gfldex | Not really. | 17:42 | |
[Coke] | ok, good. :) | ||
17:45
xerxes left
|
|||
polettix_ | hello all | 17:45 | |
sub whatever (@x) { @x.shift } ; my @y = 1..3; @y.say; whatever(@y); @y.say | |||
evalable6 | [1 2 3] [2 3] |
||
gfldex | 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 | |
Voldenet | Well, people can find code in your project and steal it anyway | ||
polettix_ | wondering why @x "is rw" here, I thought parameters were supposed to be read-only by default | ||
17:46
xinming joined
|
|||
gfldex | m: say ‚Hi polettix_! Do you ♥ Raku?‘; | 17:47 | |
camelia | Hi polettix_! Do you ♥ Raku? | ||
Voldenet | and people actually do that - if copilot generates something like that looks like "the whole bloody program" they may get suspicious | ||
polettix_ | gfldex: enough to try learning it :) | ||
gfldex | polettix_: We consider @x to be an object that you call public methods on. | 17:48 | |
And public methods are fair game. :) | |||
polettix_ | I see | 17:49 | |
sub whatever (@x) { shift @x } ; my @y = 1..3; @y.say; whatever(@y); @y.say | |||
evalable6 | [1 2 3] [2 3] |
||
polettix_ | this is a bit more objectable ;) | ||
or maybe *less* objectable! (terrible pun) | 17:50 | ||
Voldenet | sub whatever (@x) { shift @x } ; my @y := 1..3; @y.say; whatever(@y); @y.say | ||
m: sub whatever (@x) { shift @x } ; my @y := 1..3; @y.say; whatever(@y); @y.say | |||
camelia | 1..3 Cannot call 'shift' on an immutable 'Range' in sub whatever at <tmp> line 1 in block <unit> at <tmp> line 1 |
||
Voldenet | you could do this | ||
polettix_ | 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 :) | |||
gfldex | m: sub oi(@a) is pure { @a[*]:delete }; my @a = <1 2 3>; oi(@a); dd @a; | 17:54 | |
camelia | WARNINGS for <tmp>: Useless use of "oi(@a)" in expression "oi(@a)" in sink context (line 1) Array @a = [] |
||
gfldex | polettix_: at least we are honest ^^^ | ||
18:02
reportable6 left
18:03
reportable6 joined
18:20
Doc_Holliwood joined
18:26
sono joined
|
|||
Xliff | m: sub whatever (Map @x) { shift @x } ; my @y := 1..3; @y.say; | 18:31 | |
camelia | 1..3 | ||
Xliff | m: sub whatever (Map @x) { shift @x } ; my @y := 1..3; @y.say; hatever(@y); @y.say | 18:32 | |
camelia | 5===SORRY!5=== Error while compiling <tmp> Undeclared routine: hatever used at line 1. Did you mean 'whatever'? |
||
Xliff | m: sub whatever (Map @x) { shift @x } ; my @y := 1..3; @y.say; whatever(@y); @y.say | ||
camelia | 1..3 Type check failed in binding to parameter '@x'; expected Positional[Map] but got Range (1..3) in sub whatever at <tmp> line 1 in block <unit> at <tmp> line 1 |
||
Xliff | m: sub whatever (@x) { shift @x } ; my @y := 1..3; @y.say; whatever(@y.Map); @y.say | ||
camelia | 1..3 Odd number of elements found where hash initializer expected: Found 3 (implicit) elements: Last element seen: 3 in block <unit> at <tmp> line 1 |
||
Xliff | m: sub whatever (List @x) { shift @x } ; my @y := 1..3; @y.say; whatever(@y); @y.say | ||
camelia | 1..3 Type check failed in binding to parameter '@x'; expected Positional[List] but got Range (1..3) in sub whatever at <tmp> line 1 in block <unit> at <tmp> line 1 |
||
Xliff | m: sub whatever (List @x) { shift @x } ; my @y := 1..3; @y.say; whatever(@y.Array); @y.say | 18:33 | |
camelia | 1..3 Type check failed in binding to parameter '@x'; expected Positional[List] but got Array ([1, 2, 3]) in sub whatever at <tmp> line 1 in block <unit> at <tmp> line 1 |
||
Xliff | m: sub whatever (List @x) { shift @x } ; my @y := 1..3; @y.say; whatever(@y.List); @y.say | ||
camelia | 1..3 Type check failed in binding to parameter '@x'; expected Positional[List] but got List ((1, 2, 3)) in sub whatever at <tmp> line 1 in block <unit> at <tmp> line 1 |
||
Xliff | m: sub whatever (List $x) { shift @x } ; my @y := 1..3; @y.say; whatever(@y.List); @y.say | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> Variable '@x' is not declared. Did you mean '$x'? at <tmp>:1 ------> 3sub whatever (List $x) { shift 7⏏5@x } ; my @y := 1..3; @y.say; whatever(@ |
||
Xliff | m: sub whatever (List $x) { shift $x[] } ; my @y := 1..3; @y.say; whatever(@y.List); @y.say | ||
camelia | 1..3 Cannot call 'shift' on an immutable 'List' in sub whatever at <tmp> line 1 in block <unit> at <tmp> line 1 |
||
Xliff | There we go. | ||
List == Immutable Array | |||
Map == Immutable Hash | |||
FYI | 18:34 | ||
18:36
john joined
|
|||
Voldenet | `my @whatever` creates an Array and `=` to it uses list assignment | 18:38 | |
m: my @y := 1..3; @y = 1..3; | 18:39 | ||
camelia | Cannot modify an immutable Range (1..3) in block <unit> at <tmp> line 1 |
||
Voldenet | but @y is only expected to be Positional | ||
18:40
john left
|
|||
Voldenet | m: my @y = 1..3; @y = 1..3; | 18:41 | |
camelia | ( no output ) | ||
18:45
Kaipi left,
Kaipi joined
18:47
Kaipi left,
Kaipi joined
|
|||
gfldex | Xliff: did you consider NativeCall? | 18:49 | |
18:50
Kaipi left,
Kaipi joined
18:54
nibble joined
18:56
kylese joined
|
|||
gfldex | m: sub whatever (List() $x) { shift $x } ; my @y = 1..3; whatever(@y); @y.say | 19:09 | |
camelia | [2 3] | ||
gfldex | 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:10 | |
Xliff | gfldex: What do you mean by "did you consider NativeCall"? | 19:18 | |
There. That's my 581,502nd line of Raku written... | 19:20 | ||
Or there abouts... | |||
19:30
bd3i joined
19:49
john joined
|
|||
raydiak | 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; | |||
camelia | [1] | ||
raydiak | ^ LTA | ||
and the error should look similar to: | |||
m: sub s (@x is rw) { @x = 1 }; my @a = ^3; s @a; say @a; | |||
camelia | 5===SORRY!5=== Error while compiling <tmp> 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 <tmp>:1 |
||
raydiak | 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; | |||
camelia | [0 1 2] | ||
raydiak | this all feels rather inconsistent to me | ||
19:55
john left
20:01
kylese left
20:09
nibble left,
Xliff left
20:21
Sgeo left
20:23
Sgeo joined
20:40
john joined
|
|||
gfldex | 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:01 | |
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:03 | ||
So play nice or ppl wont use your modules. :) | 21:04 | ||
21:05
RandalSchwartz joined
|
|||
Voldenet | There could be mutability rules enforced by the compiler by either marking routines able to even use NativeCall/routines that use NativeCall | 21:16 | |
or mutability rules that apply only to raku code by design | 21:17 | ||
tonyo | immutable everything | 21:23 | |
gfldex | 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:27 | |
21:36
john left
21:39
john joined
|
|||
xinming | Is there a place to list all modules change sorted by last modification date? | 21:54 | |
modules.raku.org/search/ <--- This just list all modules, doesn't support any sort options | |||
gfldex | raku.land/recent | 21:55 | |
21:55
john left
|
|||
xinming | thanks | 21:56 | |
Voldenet | Hence `could be`, I'm not sure whether true immutability would even be practical without the language supporting immutable concepts | 22:19 | |
22:34
dogbert17 left
22:43
Tirifto left
22:44
Tirifto joined
22:53
Kaiepi joined,
Kaipi left
|
|||
japhb | 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:07 | |
23:16
oodani left,
oodani joined
|
|||
moon-child | there's (or, will be) also codesections' (‘codesections's’?) thing | 23:17 | |
23:20
oodani left
23:21
oodani joined
|
|||
japhb | moon-child: Yeah, the second spelling with the s's is correct. | 23:25 | |
moon-child | I'm not sure if 'codesections' is plural or not | 23:28 | |
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:30 | ||
(assuming you interpret 'codesections' as referring to multiple sections of code, which I think is reasonable) | 23:32 | ||
japhb | Well, for example "Miles" is a common name. When referring to something they possess, it is "Miles's". | 23:34 | |
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:35 | ||
tonyo | or, for possessive, just Miles' | 23:38 | |
codesections' talk is also correct | 23:39 | ||
moon-child | 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 | |||
*clearly | 23:41 |