🦋 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.
andinus lizmat 04:30
ah sorry, meant to /query
andinus looks like rakudo on rockylinux repos is broken 09:41
rakudo is currently at v2023.02, moarvm and nqp are at v2023.05, (seems like moarvm, nqp package size has reduced quite a bit too) 09:42
lizmat recently, like on 2023.06? or longer alreay?
andinus iirc until last month or so it was working, i upgraded a system today and rakudo fails 09:43
with Unhandled exception: Missing or wrong version of dependency 'gen/moar/stage2/MASTNodes.nqp' (from 'gen/moar/Pod.nqp')
tbrowder__ hi, looking for an opinion: given creation of a LOT of class objects, space and time wise, is it better to minimize attributes in favor of methods or vice versa? 13:21
that is, for example, i can have either attribute z or method z that calculates z if needed. 13:24
i think i'll favor fewer attrs and more methods. 13:30
lizmat YMMV really 13:48
how expensive is the calculation?
if you don't always need z, then calculating it (maybe only once and then store it in an attribute) would be more lazy :-) 13:49
vrurg And the last lizmat statement is exactly where AttrX::Mooish shines. :p 14:01
lizmat tbrowder_ ^^ 14:02
rf Morning folks 14:24
tellable6 2023-06-27T16:52:04Z #raku <tonyo> rf: did that work for you?
rf tonyo: lgtm 14:25
tonyo tak 16:00
MitarashiDango[m Is the directory specified in the checksum for Rakudo 2023.06 there intentionally? Its not consistent with previous releases. If it is, I'll need to update the asdf plugin for raku. 19:46
Voldenet tbrowder__: contrary to what people say (ymmv) I believe in never storing state that's not needed – computations scale well on 128-core systems, but no kind of storage scales well 20:58
storing state in such cases is an optimization technique for specific use case only, but it shouldn't be go-to strategy by default ever 20:59
Even if returning a value allocates and JIT is not optimizing it anyhow at the moment, it might in the future and state will be a lot harder to optimize 21:02
not that I say to never use state, just use it only when it speeds up a piece of code by 50% 21:07
or something equally impressive
librasteve tbrowder: I have found that lazy generation of classes is best - for example in Physics::Unit generating all 270 classes on start up was very slow ... so now I just make them when they are needed 21:37
its here github.com/librasteve/raku-Physics...it.rakumod at about line 320 21:40
lizmat jdv MitarashiDango[m> has a question re checksum 21:42
librasteve PS. I tried leveraging precomp but that route was a dead end - here is a blog post that hopefully illuminates the progress rakujourney.wordpress.com/2021/01/...ysicsunit/ 21:45
Voldenet if I remember correctly using postfix operators reloads the grammar on every new op :/ 21:59
that's why I'm using methods instead of symbols even if syntax isn't as nice 22:01
lizmat Voldenet: that's only true with compilation though, so anything precompiled doesn't have to do that 22:02
Voldenet but then you end up needing to put everything in the module
it works, but it's not as low-maintenance as simply having one file 22:03
lizmat afaik scripts are precompiled as well nowadays?