🦋 Welcome to the MAIN() IRC channel of the Raku Programming Language (raku.org). This channel is logged for the purpose of keeping a history about its development | evalbot usage: 'm: say 3;' or /msg camelia m: ... | 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 8 June 2022.
Neuron Hello, where would I find Hash.raku() implementation? 05:18
On sparc (bit endian machine) it says negative numbers (like (\Hash_-2538074464 = {a => 42, b => Hash_-2538074464}) which breaks spectest 05:19
github.com/rakudo/rakudo/issues/4967
Voldenet Neuron: nqp::objectid github.com/MoarVM/MoarVM/blob/d11b...ectid.c#L5 05:47
m: my %h; %h = :42a, :b(%h); use nqp; say nqp::objectid(%h); say %h
camelia 5652383101248
(\Hash_5652383101248 = {a => 42, b => Hash_5652383101248})
Neuron Voldenet, thank you! 05:48
Voldenet though it's more convoluted 05:49
Voldenet Neuron: github.com/rakudo/rakudo/blob/51c0...t.pm6#L249 github.com/rakudo/rakudo/blob/1c04...u.pm6#L900 05:50
tellable6 Voldenet, I'll pass your message to Neuron
Nemokosch For the SO questions: yes, common sense helps with the numbers; the number format itself much less so 06:09
For me, the comma indicates a decimal fraction so ironically enough, this number format is rather exclusive from my perspective 06:12
Add the rather bizarre "thousand K" instead of "one M" and bang, confusion arises 06:14
Xliff Hi ho! 10:51
What
Can I dynamically add a parent to a given class via the HOW? 10:52
m: class A { method a { 42.say}; }; class B { }; B.^add-parent(A); B.a.say; 10:53
camelia No such method 'add-parent' for invocant of type
'Perl6::Metamodel::ClassHOW'
in block <unit> at <tmp> line 1
Xliff m: class A { method a { 42.say}; }; class B { }; B.^add_parent(A); B.a.say;
camelia Parents cannot be added to class 'B'after it has been composed
in block <unit> at <tmp> line 1
Xliff m: class A { method a { 42.say}; }; class B { }; use MONKEY-TYPING; augment class B { also is A }; B.a.say; 10:55
camelia ===SORRY!=== Error while compiling <tmp>
Parents cannot be added to class 'B'after it has been composed
at <tmp>:1
Xliff :(
m: class A { method a { 42.say}; }; my $x = Metamodel::ClassHOW.new_type( name => 'MyCustomB' ); $x.^add_parent(A); $x.^compose; $x.new.a.say' 10:59
camelia ===SORRY!=== Error while compiling <tmp>
Two terms in a row
at <tmp>:1
------> add_parent(A); $x.^compose; $x.new.a.say⏏'
expecting any of:
infix
infix stopper
statement end
statement …
Xliff m: class A { method a { 42.say}; }; my $x = Metamodel::ClassHOW.new_type( name => 'MyCustomB' ); $x.^add_parent(A); $x.^compose; $x.new.a.say
camelia 42
True
Xliff m: class A { method a { 42.say}; }; my $x = Metamodel::ClassHOW.new_type( name => 'MyCustomB' ); $x.^add_parent(A); $x.^compose; $x.new.a 11:00
camelia 42
Xliff m: class A { method a { 42.say}; }; my $x = Metamodel::ClassHOW.new_type( name => 'MyCustomB' ); $x.^add_parent(A); $x.^compose; $x.new.a; $x.^name.say
camelia 42
MyCustomB
Xliff Well, that's progress. Would love it if you could do it to previously composed classes, or could take a composed class and make a new uncomposed type from it. 11:01
At any rate... Happy Caturday.
Voldenet you don't need Metamodel::ClassHOW 11:14
m: class A { method a { 42.say}; }; my $x = .HOW.new_type( name => "MyCustomB" ); $x.^add_parent(A); $x.^compose; $x.new.a; $x.^name.say
camelia 42
MyCustomB
Voldenet Any.HOW sounds pretty nice too 11:15
xinming releasable6: status 14:20
releasable6 xinming, Next release in ≈34 days and ≈4 hours. There are no known blockers. 0 out of 23 commits logged (⚠ 89 warnings)
xinming, Details: gist.github.com/aaa1503f71faf9d78f...f36a37bcf3
xinming we have 1 release every 2 months now, right? 14:21