🦋 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.
01:34 hulk joined 01:36 kylese left
Voldenet m: role C {}; role R is C {}; say Any but R 01:37
camelia Could not build C3 linearization: ambiguous hierarchy
in block <unit> at <tmp> line 1
Voldenet you don't even need that add_parent for this error
m: role C {}; role R { ::?CLASS.^add_role: C }; say Any but R # maybe? 01:40
camelia (Any+{R})
01:45 Guest4 joined 01:46 Guest4 left
tbrowder .tell jdv i just read what i replied and now i understand your confusion. what i was trying to say is that raku's class system encapsulates much of what Steven was showing us about closures in perl. and with much cleaner syntax. 02:01
tellable6 tbrowder, I'll pass your message to jdv
02:05 arkiuat left 02:15 hulk left, kylese joined 02:16 arkiuat joined 02:21 arkiuat left 02:41 arkiuat joined 02:47 arkiuat left 02:53 arkiuat joined 03:45 kylese left 03:47 kylese joined 04:03 Guest99 joined 04:12 Guest99 left 04:25 Aedil joined 06:30 Sgeo left 06:38 bdju left 06:48 bdju joined 08:01 wayland76 joined 08:05 donaldh left 08:16 arkiuat left
SmokeMachine m: my @a; for ^10_000 { @a[$_] = $_ for ^500; $ = @a.sum }; say now - INIT now 08:17
camelia 2.362096113
SmokeMachine m: use NativeCall; my @a; for ^10_000 { @a[$_] = $_ for ^500; $ = @a.sum }; say now - INIT now 08:18
camelia 0.378976435
08:18 lichtkind joined
SmokeMachine why is that difference on time... I thought `use`ing something that's not used should take longer... but it takes very very faster... 08:19
and still odd... If I use the NativeCall, it takes a time between both... 08:21
m: use NativeCall; my @a := CArray[uint16].new: 500; for ^10_000 { @a[$_] = $_ for ^500; $ = @a.sum }; say now - INIT now
camelia 1.317238684
SmokeMachine Any idea? 08:22
08:28 arkiuat joined 08:32 arkiuat left 08:38 arkiuat joined 08:44 arkiuat left 09:12 arkiuat joined 09:17 arkiuat left
SmokeMachine Why adding `use NativeCall` makes it faster? Should I alway add that? 09:22
disbot3 <frostcod> that looks like a bug... 09:23
SmokeMachine frostcod: but what’s the buggy version? The one without NativeCall and slow, or the one with NativeCall and fast? 09:31
09:45 arkiuat joined 09:51 arkiuat left 10:03 gordonfish left 10:14 arkiuat joined, wayland76 left 10:17 melezhik joined
melezhik . 10:17
tellable6 2025-07-19T11:33:12Z #raku <wayland76> melezhik You might be interested in github.com/spitsh/spitsh :)
10:17 Sampersand joined 10:19 arkiuat left
melezhik wayland76: thanks for that. Looks like spitsh is not maintained any more, I remember I even did something for this project few years ago. Anyways . With regards to your latest post “Raku: Pathways …” these are all reasonable thoughts - thanks and thanks for mentioning Sparrow by the way, yep it does not have a dedicated web site, but there is sparrowhub.io which provides some information 10:21
tellable6 melezhik, I'll pass your message to wayland76
SmokeMachine It seems the problem is when setting an item… 10:26
m: use NativeCall; my @a; for ^10_000 { @a[$_] = $_ for ^500 }; say now - INIT now
camelia 0.188701888
SmokeMachine m: my @a; for ^10_000 { @a[$_] = $_ for ^500 }; say now - INIT now 10:27
camelia 2.049250717
SmokeMachine That’s too odd for me…
Any idea why this 20x time difference when using NativeCall and not using it? And why is it faster when uaing NativeCall??? Should I always use it? 10:29
(ok… around 10x) 10:31
timo what :) :) :) 10:34
"use Test" also makes it faster fwiw 10:35
SmokeMachine Yes, it does… is that any module? 10:36
disbot3 <holmdunc> guifa: Rather, HTMLWindow, right? 🙂 raku.land/zef:guifa/UI::HTMLWindow 10:37
SmokeMachine use Red seems to make it faster as well…
lizmat my theory: using a module causes some hot core paths being optimized already before the benchmarked code is being run
without using the module, that optimization would occur during the benchmarked code, making it slower 10:38
SmokeMachine use v6 and use v6.e don’t…
lizmat: but if that optmization can be done earlier (as when using a module), shouldn’t it? 10:39
10:40 arkiuat joined
lizmat but that's the nature of spesh: it will only optimize stuff that is actually being run (a lot) 10:41
SmokeMachine It seems “need” (instead of “use”) also makes it faster
lizmat but having said that: I see the same code with use Test also have a total wallclock less 10:42
SmokeMachine lizmat: but it wasn’t run at all when using a module, right?
lizmat m: my @a; for ^10_000 { @a[$_] = $_ for ^500; $ = @a.sum }; say now - BEGIN now
camelia 2.233379327
10:42 Sampersand left
lizmat m: use Test; my @a; for ^10_000 { @a[$_] = $_ for ^500; $ = @a.sum }; say now - BEGIN now 10:42
camelia 0.35719743
10:42 Sampersand joined
lizmat so there's *definitely* something fishy going on here 10:42
10:44 arkiuat left
SmokeMachine Something interesting is that, on my tests, using push didn’t get any difference using and not using a module… 10:48
m: use Test; my @a; for ^10_000 { @a.push: $_ for ^500; $ = @a.sum }; say now - BEGIN now 10:49
timo could using a module cause a different core to become relevant?
camelia (timeout)
SmokeMachine m: use Test; my @a; for ^10_000 { @a.push: $_; $ = @a.sum }; say now - BEGIN now 10:51
camelia 1.571824083
SmokeMachine m: my @a; for ^10_000 { @a.push: $_; $ = @a.sum }; say now - BEGIN now
camelia 1.553995042
10:53 Sampersand left 10:56 Sampersand joined
timo turning spesh log on has the same effect of adding "use Test" in one of the test cases 10:58
it's quite possible that timing of spesh runs has something to do with this
in fact, i just had 4 fast runs followed by a slow run 10:59
melezhik .
11:00 arkiuat joined 11:02 Sampersand left
timo gist.github.com/timo/ac0718ed248af...52a11dcb8b 11:02
11:04 arkiuat left 11:05 Sampersand joined
lizmat could the difference be hash order related ? 11:08
11:08 Sampersand left 11:19 jjido joined 11:20 arkiuat joined 11:24 arkiuat left 12:00 arkiuat joined 12:05 arkiuat left 12:37 arkiuat joined 12:41 arkiuat left 12:53 arkiuat joined 12:58 arkiuat left 13:03 jjido left 13:06 melezhik left 13:18 arkiuat joined 13:23 arkiuat left 13:31 jjido joined 13:32 jjido left 13:35 arkiuat joined 13:39 arkiuat left 14:02 arkiuat joined 14:07 arkiuat left 14:23 arkiuat joined 15:00 librasteve_ joined
guifa disbot: twas tired when i typed but yeah haha 15:13
disbot3 ^^
15:14 human-blip joined 15:17 nine left 15:18 nine joined 15:26 jjido joined 15:32 jjido left
[Coke] 15 years ago today: Parrot VM 2.6.0 released 15:38
disbot3 <librasteve> weekly: 15 years ago today: Parrot VM 2.6.0 released 15:39
[Coke] notable6: statuss 15:45
notable6 [Coke], No notes for “statuss”
[Coke] releasable6: next
releasable6 [Coke], Next release in ≈38 days and ≈3 hours. There are no known blockers. Changelog for this release was not started yet
[Coke], Details: gist.github.com/adc845964addceeb0c...dbb8696aa8
[Coke] hey, everyone's back.
lizmat++, presumably
librasteve_: pulled that note from my FB history 15:46
disbot3 <antononcube> Got this cup from Amazon today; I am not sure should I use it or not... 15:47
<antononcube> cdn.discordapp.com/attachments/633...82ee2&
15:58 jjido joined 16:03 jjido left
SmokeMachine weekly: dev.to/fco/bringing-structural-pro...-raku-2ook 16:09
notable6 SmokeMachine, Noted! (weekly)
disbot3 <librasteve> \o/ 16:24
librasteve_ notable6 weekly 16:25
notable6: weekly
notable6 librasteve_, 1 note: 2025-07-21T16:09:09Z <SmokeMachine>: dev.to/fco/bringing-structural-pro...-raku-2ook
librasteve_ notable6: weekly reset 16:26
notable6 librasteve_, Moved existing notes to “weekly_2025-07-21T16:26:13Z”
librasteve_ teases rakudoweekly.blog/2025/07/21/2025-...-sleeping/ 16:43
17:01 deoac joined 17:47 jjido joined 17:50 guifa left 18:29 guifa joined
guifa ab5tract : of course you could come out with a module that all but does what I hand coded in UI::HTMLWindow 18:29
the exact same week
18:32 releasable6 left, releasable6 joined, arkiuat left, arkiuat joined 18:34 deoac left 19:06 human_blip joined
ab5tract :) 19:06
Sorry I didn’t get that released sooner 19:07
19:07 human-blip left, rir left 19:08 rir joined 19:09 rir left, rir joined
lizmat wonders what ab5tract's module is 19:10
19:19 arkiuat left
disbot3 <melezhik.> Yes you do 😊 19:22
19:22 rir left
disbot3 <antononcube> @melezhik. It seems that is a dare! 19:23
<melezhik.> Oh, not with my wife LOL 😂 19:24
<melezhik.> Oh I mean it won’t be an issue with my wife she knows everything 19:25
ab5tract lizmat: Resource::Wrangler 19:29
lizmat and that would be the same as UI::HTMLWindows ? 19:30
ab5tract AIUI guifa hand rolled the same functionality for using resources in that distribution 19:31
lizmat aaah.... ok 19:32
19:41 jjido left 19:50 arkiuat joined 19:54 arkiuat left 20:22 Aedil left 20:27 arkiuat joined 20:32 arkiuat left
guifa basically I just grab a tmp directory and then add my own rando directory (each window will get one) and then push in whatever files someone needs 20:48
eventually I want to be able to allow adding in non-resource files, but the prefix situation gets a bit more complicated there (not unsolvable, just not sure what I want it to look like) 20:49
20:54 arkiuat joined 20:59 arkiuat left 21:13 arkiuat joined 21:46 lichtkind left
leont Does anyone have an opinion on github.com/Leont/app-prove6/issues/22 ? 21:55
21:57 dismae joined
ugexe there are other tools that also only use t/. and then if we have t/ and test/ we have to figure out what happens when you have both. further, it wouldn't surprise me if some workflows still use the perl prove to run their tests which would (presumably) not be supporting such a directory 21:58
using TIMTOWTDI seems like a bit of a stretch as well... i often see people using it to justify literally anything they want to add 22:01
they are also mistaken on why the extension was changed from .t to .rakutest. it was not because .t wasn't descriptive enough, it was that tooling couldn't tell what language the test files were 22:08
to be clear i agree with leont that using t/ wasn't a great decision on our part, i don't think adding another directory makes the situation better 22:11
guifa agree 22:13
disbot3 <librasteve> i said (over on the issue) ... imho the downside (having multiple places to put tests) is larger than the upside (spell "t" a nicer way) 22:14
ugexe something like github.com/Raku/problem-solving/issues/393 could work towards solving the problem since then tools could look at the meta data to see which tests to run, and those tests could be in any directory
lizmat ugexe: good point: if someone would specify test files to be run, they could live anywhere 22:15
22:22 dismae left 23:05 Sgeo joined