🦋 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:42
abraxxa-home left
01:11
epony left
01:12
epony joined
01:24
Tirifto left
01:26
Tirifto joined
02:19
Manifest0 left
02:21
hulk joined,
kylese left
02:34
jpn joined
02:38
jpn left
03:07
jjido left
03:15
hulk left,
kylese joined
03:30
kylese left
03:34
kylese joined
|
|||
roguerakudev | So I have an enum for "packet subtype", where the values are going to get packed into a single byte along with a packet type, and I want to be able to reuse values across different keys, which is totally possible, but I then want to be able to recover the correct enum value from a plain integer for incoming packets | 03:59 | |
my thought was to have a For[PacketType $FOR] { ... } role which I could mix into the integer values, e.g. 0b0000001 but For[PacketType::Whatever] | 04:00 | ||
however, that results in a somewhat cryptic error, "Incompatible MROs in P6opaque rebless for types Int+{For[PacketType]} mixin and PacketSubtype" | 04:01 | ||
I was wondering if anyone had a way around this or a different idea for a nice way to achieve what I'm trying to achieve | 04:02 | ||
04:24
jpn joined
04:31
jpn left
04:36
jpn joined
04:49
jpn left
05:09
jpn joined
06:50
CIAvash joined
07:31
CIAvash left
07:37
CIAvash joined
07:38
CIAvash left
07:39
CIAvash joined
07:49
CIAvash left
07:52
CIAvash joined
08:08
CIAvash left
08:11
jpn left
09:01
jpn joined
09:05
jjido joined
09:20
sena_kun joined
|
|||
gfldex | m: role R[$a] { has $.type = $a }; enum foo (bar => 42 but R['answer']); dd bar.value.type; | 09:41 | |
camelia | "answer" | ||
gfldex | @roguerakudev If that ^^^ doesn't work for you, I would suspect an only Rakudo version. | ||
09:57
jjido left
11:20
Manifest0 joined
11:21
jpn left
11:31
jpn joined
|
|||
andinus | ingy: rakudo.org/downloads/rakudo lists all releases | 11:32 | |
11:43
jpn left
11:57
Manifest0 left
|
|||
melezhik | . | 12:10 | |
tellable6 | 2024-01-16T22:17:07Z #raku <tonyo> melezhik: i do have some thoughts around that, i need to think through how to move ahead with those before i have any meaningful questions | ||
melezhik | tonyo: ++ | ||
12:14
Sgeo left
12:33
jpn joined
12:40
jpn left
12:44
jpn joined
|
|||
tbrowder__ | ok, i just released an updated Abbreviation with default action to provide a regex "alternation" (not a junction) for a single word. | 12:47 | |
for example: my $a = abbrev "Args"; say $a; # OUTPUT: A|Ar|Arg|Args | 12:49 | ||
i | 12:52 | ||
arg, can't even remember proper module name, plural: Abbreviations | 12:54 | ||
13:00
jpn left
|
|||
tbrowder__ | .seen ssotka | 13:05 | |
tellable6 | tbrowder__, I saw ssotka 2016-05-10T17:04:30Z in #perl6: <ssotka> Beagle Bros. Ads. | ||
13:24
jpn joined
14:19
vrurg_ joined
14:22
vrurg left
14:28
jjido joined
14:37
coleman left
14:39
coleman joined
14:40
coleman left,
coleman joined
15:01
Manifest0 joined
15:29
AlexDaniel joined
15:43
jpn left
15:49
jpn joined
15:58
jjido left
16:54
epony left
17:32
jpn left
17:36
epony joined,
jjido joined
17:37
jpn joined
18:13
teatwo left
|
|||
lucs | lizmat: What do you think of use lib $?FILE.IO.dirname ? | 19:07 | |
Oops, wrong channel (confused between IRC and Discord). | 19:08 | ||
librasteve | lizmat: i heard that you woukd like to deprecate use lib ... would be interested to hear the ins and outs (suggest we wash the laundry here and not on begoinner channel)??? | 19:10 | |
19:12
jpn left
19:16
jpn joined
19:37
abraxxa-home joined
19:47
jpn left
|
|||
roguerakudev | gfldex: yeah, sure enough I'm on a somewhat old rakudo version on this machine | 19:54 | |
Hm, but even on 2023.12 I'm still getting the same error | 19:57 | ||
antononcube | I am very curious about anythin use lib related. | ||
roguerakudev | oh, but not if I have only one enum value listed in the enum | ||
very interesting... | |||
it's not a weird precedence thing either, because even with parens to make it explicit, same result | 19:59 | ||
m: role R[$a] { has $.type = $a }; enum foo (bar => 42 but R['answer'], baz => 41 but R['question']); dd bar.value.type; | |||
evalable6 | (exit code 1) ===SORRY!=== Incompatible MROs in P6opaque rebless for types Int+{R[Str]} mixin and foo |
||
Raku eval | Exit code: 1 ===SORRY!=== Incompatible MROs in P6opaque rebless for types Int+{R[Str]} mixin and foo | ||
roguerakudev | You know you're really programming when you hit compiler bugs like this :^) | 20:00 | |
20:14
jpn joined
20:48
jpn left
21:12
Sgeo joined
21:38
jpn joined
22:02
abraxxa-home left
22:09
jpn left
22:40
jpn joined
22:46
jpn left
|
|||
Opened an issue for the above: github.com/rakudo/rakudo/issues/5515 | 22:48 | ||
22:52
jpn joined
23:00
jpn left
|
|||
_grenzo | tbrowder: You rang? | 23:02 | |
Was ssotka on IRC | |||
23:29
jpn joined
23:35
jpn left
23:41
sena_kun left
|