🦋 Welcome to the MAIN() IRC channel of the Raku Programming Language (raku.org). Log available at irclogs.raku.org/raku/live.html . If you're a beginner, you can also check out the #raku-beginner channel! Set by lizmat on 6 September 2022. |
|||
00:27
SmokeMachine left,
SmokeMachine joined
01:17
ulipink joined
02:27
hulk joined
02:29
kylese left
03:15
hulk left,
kylese joined
03:21
yewscion_ joined
03:25
yewscion_ left
03:30
kylese left
03:34
kylese joined
03:44
yewscion_ joined
03:49
yewscion_ left
03:59
yewscion_ joined
04:01
yewscion left
04:32
yewscion joined
04:36
yewscion left
07:01
PotatoGim left
07:02
PotatoGim joined
07:28
yewscion_ left
07:30
yewscion_ joined,
yewscion_ left
07:33
Aedil joined
07:37
Aedil left
07:40
kst left
07:41
Aedil joined
08:11
qesat60 left
08:13
qesat60 joined
09:17
dfarnsworth left,
dfarnsworth joined
09:44
sena_kun joined
09:50
abraxxa-home joined
|
|||
patrickb | [Coke]: I believe I have fixed your module installation issue on Windows you recently sent a Gist about. It should go into the 2025.10 release. | 09:56 | |
lizmat | 01 I presume ? | ||
patrickb | :-P | ||
Yes | |||
09:57
Guest55 joined
10:08
Guest55 left
11:03
abraxxa-home left,
abraxxa-home joined
11:04
abraxxa-home left
11:05
abraxxa-home joined
11:23
Sgeo left
11:32
ulipink left
11:48
ulipink joined,
ulipink left,
ulipink joined
13:28
jpn joined
13:35
kjp left
14:06
Guest39 joined
14:12
ulipink left
14:14
Guest39 left
14:31
ulipink joined
14:36
ulipink left
14:49
ulipink joined,
ulipink left,
ulipink joined
14:55
ulipink left
15:02
guifa joined
15:11
sena_kun left,
sena_kun joined
15:14
Xliff left
15:15
sena_kun left
15:16
sena_kun joined
15:23
ulipink joined
15:27
ulipink left
15:47
guifa left,
guifa joined
15:51
ulipink joined
15:56
ulipink left
16:26
ulipink joined
16:31
ulipink left
16:50
ulipink joined
16:54
ulipink left
16:55
guifa left
|
|||
librasteve | I am a bit surprised by this ... | 17:05 | |
m: my %i = :one[1], :two[2]; class A { has $.one; has $.two }; A.new(|%i).raku.say; | 17:06 | ||
evalable6 | A.new(one => $[1], two => $[2]) | ||
Raku eval | A.new(one => $[1], two => $[2]) | ||
librasteve | vs this... | ||
m: my %i = :one[1], :two[2]; class B { has @.one; has @.two }; B.new(|%i).raku.say; | |||
Raku eval | B.new(one => [[1],], two => [[2],]) | ||
evalable6 | B.new(one => [[1],], two => [[2],]) | ||
librasteve | seems that if I put an Array as a Pair value, then I have to flatten somewhere to stick it into an Array attr ... I guess this is what is intended, but it seems kinda odd to have to remember to do that | 17:08 | |
timo | m: my %i = :one(1,), :two(2,); class B { has @.one; has @.two }; B.new(|%i).raku.say; | 17:10 | |
camelia | B.new(one => [(1,),], two => [(2,),]) | ||
timo | m: my %i = :one(1,), :two(2,); %i.raku.say | 17:11 | |
camelia | {:one($(1,)), :two($(2,))} | ||
timo | m: my %i; %i<one> := [1]; %i<two> := [2]; %i.raku.say | ||
camelia | {:one([1]), :two([2])} | ||
timo | m: my %i; %i<one> := [1]; %i<two> := [2]; %i.raku.say; class B { has @.one; has @.two }; B.new(|%i).raku.say; | ||
camelia | {:one([1]), :two([2])} B.new(one => [1], two => [2]) |
||
timo | m: my %i is Map = :one[1], :two[2]; %i.raku.say | 17:12 | |
camelia | Map.new((:one([1]),:two([2]))) | ||
timo | m: my %i is Map = :one[1], :two[2]; %i.raku.say; class B { has @.one; has @.two }; B.new(|%i).raku.say; | 17:13 | |
camelia | Map.new((:one([1]),:two([2]))) B.new(one => [1], two => [2]) |
||
timo | you need something that doesn't put scalar containers in the values of %i if you want them to be assigned the way you wanted it to | ||
17:24
ulipink joined,
zupss is now known as zups
17:29
ulipink left
|
|||
librasteve | timo: yeah, I see --- most of the time I am impressed that the @ and % classes and literals dwim --- so I usually recommend that beginners go with @ and % sigils to start with before having to juggle containers ... I guess example lies beyond the sugar and you just have to know the underlying features | 17:31 | |
17:32
guifa joined
17:47
apac joined
17:57
guifa left
18:04
guifa joined
|
|||
[Coke] | no fix going into the .01 release at this point. | 18:19 | |
Let's get it in a branch and CI tested, though | |||
18:24
ulipink joined,
ulipink left,
ulipink joined
18:25
guifa left
18:29
ulipink left
18:36
ulipink joined,
ulipink left,
ulipink joined
18:40
ulipink left
18:44
jpn left
|
|||
SmokeMachine | I think I understand why it isn’t… but should something like this be possible? glot.io/snippets/h40cui46g4 | 19:02 | |
I mean, should FALLBACK validate the signature for the caller? I mean, should it also be called if the only method found expects the caller to be defined, the FALLBACK expects undefined and the caller is undefined? (Maybe too specific…) | 19:08 | ||
19:12
ulipink joined,
ulipink left,
ulipink joined
19:16
ulipink left
19:31
ulipink joined
19:41
ulipink left
19:55
ulipink joined
19:59
ulipink left
20:00
zetaaaa joined
|
|||
xinming | Is there a better way to detect list contains certian element except using .first? | 20:18 | |
[Coke] | That's probably the best unless you can be working with another data structure like a Set | 20:19 | |
wambash | m: say so 9 == (1,2,3,4).any ** 2 | 20:27 | |
Raku eval | True | ||
evalable6 | True | ||
xinming | Got it, thanks | 20:30 | |
20:37
ulipink joined,
ulipink left,
ulipink joined
20:42
ulipink left
20:45
ramman joined
21:04
kjp joined
|
|||
ugexe | grep | 21:15 | |
21:16
ulipink joined
|
|||
ugexe | m: say so grep { 9 == $_ }, 1..Inf | 21:17 | |
camelia | True | ||
21:17
abraxxa-home left
|
|||
ugexe | it is slightly better than first in that its return value in boolean context is explicitly if the element was there | 21:19 | |
first returns the first element found, which you already know anyway | |||
21:30
Sgeo joined
|
|||
timo | when the first element found by .first happens to falsish or undefined, it's not trivial to figure out if it was there or not, so you would most probably want `.first` with `:k` and `with` or `so ... .defined` | 21:34 | |
[Coke] | O_o; that seems counterintuitive to me. | 21:39 | |
21:56
guifa joined
22:03
Xliff joined
|
|||
Xliff | .release | 22:03 | |
22:04
ulipink left
|
|||
jdv | .what | 22:04 | |
22:05
kjp left,
Aedil left,
kjp joined
|
|||
[Coke] | I'm working on it | 22:09 | |
Xliff | Working on what? | 22:11 | |
I was just wondering if 2025.01 was going to be cut this weekend. | |||
[Coke] | ... the release. | 22:12 | |
Xliff | Oh, cool! [Coke]++ | ||
[Coke] | I got about 90% of the way through and then realized I can't do it on a mac, so am switching to a linux box now. | ||
22:19
apac left
|
|||
nahita3882 | $val ∈ @list is also an option | 22:24 | |
22:35
ulipink joined
|
|||
timo | right! as well as nelem) if you prefer words | 22:36 | |
22:39
ulipink left
22:44
sena_kun left
22:46
sftp left
22:50
sftp joined
22:54
ulipink joined
22:59
ulipink left
23:00
sftp left
23:04
sftp joined
23:30
ulipink joined,
ulipink left,
ulipink joined
|