🦋 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.
Xliff \o 01:44
Can someone tell me why my %?RESOURCES is empty? I have the entry in META6.json and files exist in resources/ -- am I missing anythinng
ugexe Can you show your work? 02:06
ugexe I suspect you’re trying to call .keys on %?RESOURCES, but I don’t think you can do that. It’s not a hash despite the %, it’s just like a hash 02:11
You can do $?DISTRIBUTION.meta<resources> to list them 02:14
.vushu @melezhik it works now thank you ! ci.sparrowhub.io/report/3855 🙂 06:20
tellable6 2023-12-20T20:07:50Z #raku <melezhik> vushu: SparrowCI build fails for raylib binding - ci.sparrowhub.io/report/3851
melezhik Cool! 07:10
tellable6 2023-12-08T16:35:28Z #raku <lizmat> melezhik: on further thought, you might want to try with something like: rak --per-line='*.lines.rotor(3 => -2)'
2023-12-08T16:40:31Z #raku <lizmat> melezhik: actually: rak --per-line='*.lines.rotor(3 => -2)>>.Str'
melezhik o/ 16:53
SparrowCI how has got it's own logo (maybe not final version, but still better then nothing ... ) - ci.sparrowhub.io - check it out! 16:54
only visible from browsers though due to some old css issue 16:55
Geth ecosystem/main: 95c71aa3bb | (Elizabeth Mattijsen)++ | META.list
Remove OO::Actors

It now lives in the zef ecosystem
21:40
gdown It looks like when I tested lists as keys in hashes before, (see prev. discussion: irclogs.raku.org/raku/2023-12-18.html) I forgot to use an actual typed key, and just stringified it. In actuality, lists act like classes, in that different lists have a different WHICH, even if they have the same contents. 21:50
m: my $h := :{ 'piano' => 12, (1,2,3) => 42 }; dd $h; dd $h{$(1,2,3)}:exists
camelia :{(1, 2, 3) => 42, :piano(12)}
Bool::False
gdown Interestingly, sets with the same contents appear that they /do/ have the same value for WHICH. Is this always true? 21:52
m: my $a = set(2,3); my $b = set(2,3); dd $a.WHICH, $b.WHICH
camelia ValueObjAt.new("Set|8ED3E00FD894015F539EDEDB42909192284FF6EA")
ValueObjAt.new("Set|8ED3E00FD894015F539EDEDB42909192284FF6EA")
gdown So, sets are very easy to work with as keys, I guess 21:54
nemokosch Good question if this is guaranteed 22:37
I don't see it stated in the docs, at least 22:42
it would make sense, though
I think the hash of a Set doesn't change in practice 22:58
however, Sets still aren't deeply immutable 22:59
m: my @array = 1, 2; my $set = Set.new(@a, 666); dd $set, $set.WHICH; @array.push: 4; dd $set, $set.WHICH
evalable6 (exit code 1) 4===SORRY!4=== Er…
Raku eval Exit code: 1 ===SORRY!=== Error while compiling /home/glot/main.raku Variable '@a' is not declared at /home/glot/main.raku:1 ------> my @array = 1, 2; my $set = Set.new(⏏@a, 666); dd $set, $set.WHICH; @array.pu
evalable6 nemokosch, Full output: gist.github.com/7d18509523fb285c68...c33efad2f1
nemokosch m: my @array = 1, 2; my $set = Set.new(@array, 666); dd $set, $set.WHICH; @array.push: 4; dd $set, $set.WHICH 23:00
evalable6 Set $set = Set.new(666,[1, 2])
ValueObjAt.new("Set|67EECC7FAFFDED8FE3BB852BF6B3FF9ABDFA9598")
Set $set = Set.new(666,[1, 2, 4])
ValueObjAt.new("Set|67EECC7FAFFDED8FE3BB852BF6B3FF9ABDFA9598")
Raku eval Set $set = Set.new([1, 2],666) ValueObjAt.new("Set|35A02A591B07452F5E764279B667F9E5B9D17FDE") Set $set = Set.new([1, 2, 4],666) ValueObjAt.new("Set|35A02A591B07452F5E764279B667F9E5B9D17FDE")
nemokosch I'd assume a hash that contains numbers is well-behaved but something that contains complex data is not 23:02
set*
gdown Makes sense, seems like the WHICH for the set is calculated based on the WHICH of the array, which doesn't change 23:02
nemokosch I'd assume a hash that contains numbers is well-behaved but something that contains complex data is not 23:03
set*
gdown Makes sense, seems like the WHICH for the set is calculated based on the WHICH of the array, which doesn't change 23:03
nemokosch which also means Set.new([1, 2],666) === Set.new([1, 2],666) will be False 23:04
gdown Yeah
jdv El_Che: release happened 23:25
gdown nemokosch: Ah, sets are value objects, which is why they act like that. You can tell because calling WHICH returns a ValueObjAt instead of an ObjAt. 23:26
gdown So, the correct way of using a class as a key would be to set all attributes to be immutable, and override WHICH to return a ValueObjAt: docs.raku.org/type/ValueObjAt 23:29