🦋 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:09 Aedil left 00:26 guifa left 00:29 guifa joined 01:15 oodani left 01:18 oodani joined 01:40 kylese left, kylese joined 01:44 arkiuat left 01:57 arkiuat joined 02:01 arkiuat left 02:15 kylese left, kylese joined 02:18 arkiuat joined 02:30 avar left 02:31 avar joined 03:02 guifa left 03:28 guifa joined 03:45 kylese left 03:47 kylese joined 04:17 sftp left 05:37 arkiuat left 05:46 mc2 left 05:48 mc2 joined, mc2 left, mc2 joined 05:49 arkiuat joined 05:53 arkiuat left 06:19 Sgeo left 06:21 Aedil joined 06:22 arkiuat joined 06:29 arkiuat left 06:43 arkiuat joined 06:50 arkiuat left 06:58 donaldh left 07:17 arkiuat joined 07:22 arkiuat left 07:48 jjido joined 07:51 arkiuat joined 07:56 arkiuat left 08:00 jjido left 08:04 lichtkind joined 08:10 dakkar joined 08:12 wayland76 joined 08:18 arkiuat joined 08:23 arkiuat left 08:54 arkiuat joined 08:58 arkiuat left 09:01 silug left, silug joined 09:03 donaldh joined 09:19 arkiuat joined 09:23 arkiuat left 09:38 arkiuat joined 09:42 arkiuat left 10:05 ilogger2_ left 10:06 ilogger2 joined 10:09 merp joined 10:12 arkiuat joined 10:17 arkiuat left 10:36 arkiuat joined 10:41 arkiuat left 11:09 arkiuat joined 11:14 arkiuat left 11:37 arkiuat joined 11:42 arkiuat left 12:12 arkiuat joined 12:17 arkiuat left 12:39 arkiuat joined 12:43 arkiuat left 13:12 arkiuat joined 13:16 arkiuat left 13:23 arkiuat joined
tbrowder .seen raiph 13:51
tellable6 tbrowder, I saw raiph 2024-11-18T22:12:37Z in #whateverable: <raiph> m: gist.github.com/raiph/d244e984dfbb...97aeebaaf6
tbrowder .tell raiph i’ve used term ‘parameter’ instead of ‘argument’ as you suggested 13:53
tellable6 tbrowder, I'll pass your message to raiph
14:06 arkiuat left 14:12 melezhik joined
disbot3 <melezhik.> My solution for TWC 330, task 330 - first ever Sparrow based solution )) gist.github.com/melezhik/1d77a5d2f...b3bb1bdbd0 14:14
14:18 arkiuat joined 14:23 arkiuat left 14:25 jast left 14:26 jast joined 14:50 arkiuat joined 14:55 arkiuat left 14:57 dominix joined 15:02 dominix left 15:12 swaggboi left 15:13 arkiuat joined
tbrowder just watched [Coke]'s presento, excellent, but fast! too bad you didn't have a chance for a longer session! some questions for [Coke]: (1) is there a complete, summary list of the current status of all the planned Raku changes somewhere we can print or copy for a slide, (2) what app did you use for the slides, and (3) are your glasses capable of easily seeing distance and reading (bi- or tri-focal)? i need new glasses badly and 15:14
yours look comfortable?
disbot3 <librasteve> great talk! 15:49
<librasteve> weekly: youtu.be/z8M05i8FA6k?si=_gs-PNFB-7lXxexo 15:50
15:59 deoac joined 16:09 human-blip left 16:11 human-blip joined 16:13 simcop2387 left 16:30 simcop2387 joined 16:31 melezhik left 16:36 dakkar left 16:54 human-blip left 16:56 human-blip joined 17:08 human-blip left 17:10 human-blip joined
Voldenet Oh no, the link has autotranslated audio 17:12
17:13 jjido joined
Voldenet fortunately it can be changed back without logging in 17:14
17:18 human-blip left 17:21 human-blip joined 17:45 Guest42 joined 17:46 Guest42 left 18:08 jjido left 18:11 arkiuat left 18:32 arkiuat joined 18:59 arkiuat left 19:07 arkiuat joined 19:35 swaggboi joined 19:50 kst joined 20:50 Guest6230 left 20:51 Guest1057 joined 21:10 arkiuat left 21:15 Aedil left 21:23 jrjsmrtn left 21:24 jjido joined 21:25 jrjsmrtn joined 21:26 arkiuat joined
arkiuat so in docs.raku.org/language/typesystem#Coercion it says "To allow built-in types to turn themselves into user defined types use augment or the MOP. 21:31
Raku highlighting
but the only example given is using augment. 21:32
Can one do this with the MOP without using MONKEY-TYPING?
lizmat yeah, and you probably shouldn't use augment unless you really, *really* know what you're doing 21:33
as to using the MOP: what are you trying to achieve? 21:34
arkiuat right, that's what I've heard, which is why I thought it weird that the doco gave an example using augment and not using MOP
well, I have subset of Int where { 0 <= $_ < 1 } and it needs to add and subtract circularly, as if 1 corresponded to 2 pi and these were radians 21:35
lizmat that probably needs fixing: looks like that example is pretty olf
arkiuat and it was handy to defined multi for infix + and -
everything's working fine, it just would be nice to coerce a Real between 0 and 1 to one of these 21:36
oh wait, % works on Num doesn't it. I should just be doing these %1 21:39
lizmat feels like it ?
arkiuat not used to having a modulo operator that isn't Int-only
still, I'd like to have type check on the range 21:40
and I misstated the subset, sorry; it's a subset of Real
lizmat wouldn't adding a infix<+> op for the subset type work ? 21:41
arkiuat yes, I've done that already, although I just redefined it to use %1 21:42
but if I feed a Real between 0 and 1 to one of the other methods defined for this type, it coughs up a type error 21:43
so I'd like to add a type-coercion method to Real without using augment
lizmat sadly the coercion protocol is not very well documented yet
perhaps github.com/Raku/problem-solving/issues/227 can be of use 21:44
arkiuat thank you! i'll take a look
21:55 El_Che left 21:57 El_Che joined
arkiuat well, after reading most of that, my first thought is it might be easier to just write multi methods handling the base types I'd need to coerce 21:57
heh, except when I switch screens to go look over the error messages from prove6 again, the first one that catches my eye is a failure of BUILD on type-check 22:00
which was working fine when I was using a subset instead of a class. I turned the subset into a class so I could add the multi infix methods for + and - 22:01
er, multi infix subs, I guess 22:03
well, for now, I'm just backing of that class and back to the named subset. I can still use the infix redefinitions for the named subset: I only turned it into a class because I thought it might be easy to add a coercion method after doing that, but apparently not 22:13
lizmat yeah, looks like I put you in the wrong direction, sorry 22:14
arkiuat not at all! I don't think there's really any easier way I could have learned what I now know about how difficult it can be to coerce basic built-in types to custom ones 22:15
I had no idea just an hour ago
22:34 arkiuat left 22:46 jjido left 23:02 lichtkind left 23:22 wayland76 left 23:34 vasko4 left 23:42 vasko4 joined 23:44 arkiuat joined, arkiuat left, Sgeo joined 23:45 arkiuat joined 23:55 vasko4 left