🦋 Welcome to the MAIN() IRC channel of the Raku Programming Language (raku.org). This channel is logged for the purpose of keeping a history about its development | evalbot usage: 'm: say 3;' or /msg camelia m: ... | 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 8 June 2022.
Nemokosch tellable please 08:35
tellable6 2022-06-09T10:57:03Z #raku <SmokeMachine> Nemokosch: ☝️
2022-06-11T19:11:12Z #raku <SmokeMachine> Nemokosch: a bug on 2022.06, lizmat gave me a great suggestion on making Red die on that version... so, on my new release this will happen on 2022.06: usercontent.irccloud-cdn.com/file/.../image.png
Nemokosch okay okay
stevied anyone having problems getting the grammar preview working in comma IDE? I have the paid version. 12:58
p6steve m: role A {}; multi postcircumfix:<[ ]>(A:D $a, Int $p) {say 42}; my $a = A.new; $a[2]; 13:37
camelia 42
p6steve works fine as a standalone script Welcome to Rakudo™ v2022.04. 13:38
BUT errors with Error while compiling /root/raku-Dan-Polars/bin/./synopsis-dan-polars.raku 13:39
Index out of range. Is: 2, should be in 0..0
this is alongside other custom postcircumfix:<[ ]> errors such as <<Type List does not support associative indexing.>> 13:41
(on the second one I am working with a cascade like this a[0]<a> that has been working fine for weeks 13:42
)
gfldex The first multi candidate that fully matches a signature will win. 13:43
p6steve the errors happen in about a 1000 line module ... is it possible this is a rakudo bug?
gfldex so you either have to define your own proto, or overload AT-POS and friends. 13:44
Working as intended.
here is a complete list of what you might want to implement: docs.raku.org/language/subscripts#...bscripting 13:45
gfldex We want the following to DWIM, so postcircumfix:<[ ]> must not care about the type. 13:47
m: postcircumfix:<[ ]>
camelia ===SORRY!=== Error while compiling <tmp>
Calling postcircumfix:<[ ]>() will never work with signature of the proto ($, |)
at <tmp>:1
------> <BOL>⏏postcircumfix:<[ ]>
gfldex m: my $a = 42; say $a[0];
camelia 42
p6steve gfldex: yes, I have been successfully doing the positional AT-POS and so on for some months - up to now I have had working (i) 13:48
(i) class DataFrame does Positional { method AT-POS ... } for this df[1;2] (ie 2d slicing) 13:49
(ii) multi postcircumfix:<[ ]>( DataFrame:D $df, Int $p ) is export {...} for this df[3] (return list of row objects) 13:50
these have been working side by side very nicely ... but now seems that (ii) is not winning 13:51
gfldex I'm building Rakudo HEAD right now. 13:53
p6steve gfldex: I will have another look at proto ... but this will kill (i), right?
gfldex yes, unless you also implement the missing multi candidates by hand. 13:54
p6steve gfldex: ok thanks - that gives me enough steer to get past this! I suspect that I have been relying on unreliable non-feature 13:56
gfldex You small example works on HEAD. So there may be some other issue somewhere. --ll-exception can provide details. 13:57
p6steve gist.github.com/p6steve/a72382128f...0f4bf44c2f 14:02
gfldex: does'nt make much sense to me ... is there a way to kist all the candidates for pcf:<[ ]> ?? 14:03
Anton Antonov I do. For me, the few times I tried the grammar preview, it worked for small grammars and, say, 50% of the time. 14:14
gfldex p6steve: define a local proto 14:29
stevied It was very buggy when I started using it a few months ago. Then a newer version seemed to fix things for the most part. But now I can't get it to run at all. Very odd. 14:31
p6steve I just found an issue that shuld be closed here github.com/rakudo/rakudo/issues/4722 15:27
uzl[m] <uzl[m]> "As per 2022.06, both `max 0..." <- codesections: Do you mind clarifying this question I have about this (github.com/rakudo/rakudo/commit/175e716f) commit's header? 16:33
m: class A { has $.attr is rw; }; my $a = A.new(:2attr); $a.attr **= 5; say $a; 16:58
camelia A.new(attr => 32)
uzl[m] m: class A { has $!attr; method attr is rw { $!attr } }; my $a = A.new(:2attr); $a.attr **= 5; say $a;
camelia A.new
uzl[m] m: class A { has $!attr; method attr { return-rw $!attr } }; my $a = A.new(:2attr); $a.attr **= 5; say $a; 17:00
camelia A.new
uzl[m] m: class A { has $!attr = 2; method attr is rw { $!attr } }; my $a = A.new(:2attr); $a.attr **= 5; say $a; 17:02
camelia A.new
uzl[m] m: class A { has $!attr = 2; method attr is rw { $!attr } }; my $a = A.new(:2attr); $a.attr **= 5; say $a.attr;
camelia 32
uzl[m] m: class A { has $!attr; method attr { return-rw $!attr } }; my $a = A.new(:2attr); $a.attr **= 5; say $a.attr; 17:02
camelia 1
uzl[m] m: class A { has $!attr = 2; method attr { return-rw $!attr } }; my $a = A.new(:2attr); $a.attr **= 5; say $a.attr; 17:03
camelia 32
uzl[m] Is it safe to assume to assume that `class A { has $.attr is rw; };`, `class A { has $!attr; method attr is rw { $!attr } };` and `class A { has $!attr; method attr { return-rw $!attr } };` are all equivalent? I know the first two are according to the docs but what about the third? 17:04
Too many assumes haha 17:05
gfldex uzl[m]: not quite, return-rw will throw CX::return 17:08
uzl[m] gfldex: I see! An example showcasing this exception? 17:14
gfldex uzl[m]: that's how return, last and friends work. They throw a control exception under the hood. Thusly, the compiler has to add a CONTROL block what hinders fastness. 17:18
Geth raku.org: ash++ created pull request #170:
Link the Raku Conf 2022
19:25
Geth raku.org: 5365c46ccb | (Andrew Shitov)++ (committed using GitHub Web editor) | source/index.html
Link the Raku Conf 2022 (#170)

  * Link the Raku Conf 2022
  * Link the Raku Conf 2022
19:26
sienet_ja_LSD[m] hope there will be numerous classes and tutorials in the conf 19:45
MitarashiDango[m Noticed that rakuenv wasn't on the AUR so tried my hand at putting together my first package with it: aur.archlinux.org/packages/rakuenv-git 19:50