[00:25] *** jpn left
[00:26] *** jpn joined
[00:29] *** guifa left
[00:40] <SmokeMachine> I'd like to make it a compile-time thing... to break if the value-class is mutating it's attributes and /or it have mutable attributes... I think the first part may be possible with RakuAST... but the 2nd part not even with that, I think... An attribute can be of type Any and be populated with a List or an Array, for example... we only know when an object is instanciated, right?

[00:41] <SmokeMachine> Another thing is that I'm using `Proxy`s to be sure the attribute is not changed... That might be slow, right? but I can't find an different was for doing that... any suggestion?

[00:44] *** jpn left
[00:45] <SmokeMachine> even modifying `set_value()` would not help (as I learned on Red, and tried again now)

[00:45] *** jpn joined
[00:47] <SmokeMachine> m: class Bla { has $.a; method b { $!a = 42 } }; (my $attr = Bla.^attributes.head) does role :: { method set_value(|) { say "here" } }; my $bla = Bla.new; say "1st try: "; $bla.b; say "2nd try: "; $attr.set_value: $bla, 1

[00:47] <camelia> rakudo-moar 7190eae29: OUTPUT: «1st try: ␤2nd try: ␤here␤»

[01:04] *** jpn left
[01:37] *** hulk joined
[01:38] *** kylese left
[02:15] *** hulk left
[02:15] *** kylese joined
[02:26] <SmokeMachine> is there a way to find out from the class type if its objects will be value objects?

[02:28] <SmokeMachine> m: for Array, List, Hash, Map { say .^name; say .WHICH.^name; say .new.WHICH.^name }

[02:28] <camelia> rakudo-moar 7190eae29: OUTPUT: «Array␤ValueObjAt␤ObjAt␤List␤ValueObjAt␤ObjAt␤Hash␤ValueObjAt␤ObjAt␤Map␤ValueObjAt␤ObjAt␤»

[02:29] <SmokeMachine> m: for Array, List, Hash, Map, Bag, BagHash, Set, SetHash { say .^name; say .WHICH.^name; say .new.WHICH.^name }

[02:29] <camelia> rakudo-moar 7190eae29: OUTPUT: «Array␤ValueObjAt␤ObjAt␤List␤ValueObjAt␤ObjAt␤Hash␤ValueObjAt␤ObjAt␤Map␤ValueObjAt␤ObjAt␤Bag␤ValueObjAt␤ValueObjAt␤BagHash␤ValueObjAt␤ObjAt␤Set␤ValueObjAt␤ValueObjAt␤SetHash␤ValueObjAt␤ObjAt␤»

[03:20] *** tirnanog left
[03:23] *** tirnanog joined
[03:23] *** tirnanog left
[03:40] *** guifa joined
[04:06] *** vrurg left
[04:57] *** vrurg joined
[05:30] *** Sgeo left
[06:02] *** guifa left
[06:32] <Voldenet> SmokeMachine: every class that returns value objects has `WHICH(–> ValueObjAt:D)` as one of multi dispatch candidates

[06:34] <Voldenet> m: sub is-valueobj($t) { $t.^methods.grep({.name ~~ "WHICH"}).flatmap(*.candidates).map(*.signature).grep({ .params[0].type eqv $t && .returns eqv ValueObjAt:D }).so }; for Array, List, Hash, Map, Bag, BagHash, Set, SetHash { say [.^name, is-valueobj($_), .WHICH.^name, .new.WHICH.^name] }

[06:34] <camelia> rakudo-moar 7190eae29: OUTPUT: «[Array False ValueObjAt ObjAt]␤[List False ValueObjAt ObjAt]␤[Hash False ValueObjAt ObjAt]␤[Map False ValueObjAt ObjAt]␤[Bag True ValueObjAt ValueObjAt]␤[BagHash False ValueObjAt ObjAt]␤[Set True ValueObjAt ValueObjAt]␤[SetHash False Val…»

[06:40] <Voldenet> hm, `.params[0].type eqv $t` doesn't consider inheritance

[06:48] <Voldenet> I'm suspecting it's possible to create a Signature object to match against WHICH directly

[06:49] <Voldenet> `$t.^can("WHICH") ~~ :($t –> ValueObjAt:D)` or something similar

[07:02] *** thaewrapt left
[07:10] *** thaewrapt joined
[07:15] *** thaewrapt left
[07:25] *** fluca1978 joined
[07:25] *** fluca1978 left
[07:26] *** thaewrapt joined
[07:31] *** thaewrapt left
[07:42] *** thaewrapt joined
[07:52] *** thaewrapt left
[07:54] *** wayland76 joined
[08:02] *** beastieboo__ joined
[08:04] *** beastieboo_ left
[08:05] *** thaewrapt joined
[08:05] *** beastieboo_ joined
[08:08] *** beastieboo__ left
[08:18] <El_Che> releasable6: status

[08:18] <tellable6> 2024-06-27T19:22:44Z #raku-dev <jdv> El_Che 2024.06 release happened

[08:18] <releasable6> El_Che, Next release in ≈27 days and ≈10 hours. There are no known blockers. Changelog for this release was not started yet

[08:18] <releasable6> El_Che, Details: https://gist.github.com/b82e54a21c385aabb868a2b964ed7da4

[08:19] <El_Che> ok

[08:25] *** thaewrapt left
[08:33] *** avuserow_ left
[08:33] *** avuserow_ joined
[08:36] *** thaewrapt joined
[08:41] *** thaewrapt left
[08:42] *** jpn joined
[08:52] *** thaewrapt joined
[08:58] *** thaewrapt left
[09:09] *** thaewrapt joined
[09:14] *** soverysour joined
[09:15] *** thaewrapt left
[09:18] *** soverysour left
[09:26] *** thaewrapt joined
[09:31] *** thaewrapt left
[09:42] *** thaewrapt joined
[09:49] *** thaewrapt left
[09:55] *** thaewrapt joined
[10:02] *** thaewrapt left
[10:14] *** thaewrapt joined
[10:19] *** thaewrapt left
[10:30] *** thaewrapt joined
[10:34] *** thaewrapt left
[10:45] <discord-raku-bot> <librasteve> SmokeMachine: I like the concept of ValueClass … took a look at the strawman … is the idea that I go class MyClass Is ValueClass {…}?

[10:46] *** thaewrapt joined
[10:47] <discord-raku-bot> <librasteve> I guess you saw the grant proposal from codesections a while back … that was more a low level how to apply TRIEs or similar to making objects immutable at the low level iirc

[10:49] <discord-raku-bot> <librasteve> also, I would say that for serious OO we should be relaxed about always wanting $! attributes and just making consumers go obj.attr: 42 rather than obj.attr=42 for setter methods

[10:50] <discord-raku-bot> <librasteve> imo that’s the best use of the :

[10:57] *** dpk left
[10:58] *** dpk joined
[11:02] *** thaewrapt left
[11:13] *** thaewrapt joined
[11:20] *** thaewrapt left
[11:30] *** thaewrapt joined
[11:36] *** thaewrapt left
[11:44] <El_Che> still rerunning for failing t/09-moar/00-misc.t  

[11:44] <El_Che> that's the new biggest flipper test

[11:46] *** thaewrapt joined
[11:53] *** thaewrapt left
[11:57] *** thaewrapt joined
[12:03] <El_Che> cloudsmith push deb nxadm-pkgs/rakudo-pkg/ubuntu/oracular rakudo-pkg-Ubuntudevel_2024.06-01_amd64.deb

[12:03] <El_Che> Checking deb package upload parameters ... ERROR

[12:03] <El_Che> Failed to validate upload parameters! (status: 422 - Unprocessable Entity)

[12:03] *** thaewrapt left
[12:03] <El_Che> like with every release, I need to tell cloudsmith to add a repo

[12:03] <El_Che> I am their canary

[12:12] *** thaewrapt joined
[12:18] *** hudo_ left
[12:19] *** hudo_ joined
[12:20] *** hudo_ left
[12:21] *** hudo_ joined
[12:44] *** sftp left
[12:45] *** wayland joined
[12:47] *** wayland76 left
[12:58] <lizmat> El_Che: re t/09-moar/00-misc.t  I've run that in a loop for 40 minutes on an Intel box, and didn't crash once  :-(

[13:20] *** jpn left
[13:31] <El_Che> the github containers have less resources, that may be a factor

[13:36] <El_Che> packages uploaded to repos

[13:48] *** jpn joined
[14:03] *** Sgeo joined
[14:09] *** jpn left
[14:13] *** jpn joined
[14:54] *** soverysour joined
[15:09] *** soverysour left
[15:11] <SmokeMachine> Voldenet: thanks! I’ll see if I can improve the module with that…  but now I’m thinking that I’ll need to wait to test it on instantiation any way…

[15:13] <SmokeMachine> librasteve: no, at least currently you would replace the keyboard class with the keyboard value-class

[15:16] <SmokeMachine> I was searching a way to not need to use Proxy on that for performance reasons… but couldn’t find a way… it just uses nqp::getattr(), right? If I override it… it will impact everything, right (and I’m not even sure if that’s possible…)

[15:17] <SmokeMachine> Does anyone have any idea on how I could replace Proxy on ValueClass with something to get a better performance?

[15:18] <SmokeMachine> (I haven’t test the performance… I just believe Proxy is slow… I could be wrong)

[15:19] * lizmat looks

[15:23] <lizmat> m: my $a := 42; $a = 666

[15:23] <camelia> rakudo-moar 7190eae29: OUTPUT: «Cannot assign to an immutable value␤  in block <unit> at <tmp> line 1␤␤»

[15:23] <lizmat> isn't that error message good enough for you?

[15:24] <lizmat> because that appears to be the only reason for using a Proxy, right?

[15:24] <SmokeMachine> Yes, but I need that on attributes…

[15:25] <SmokeMachine> lizmat: I just saw your ValueType (https://raku.land/zef:lizmat/ValueType)…

[15:25] <lizmat> m: class A { has $.b; method TWEAK() { $!b := 42 } }; A.new.b = 666

[15:25] <camelia> rakudo-moar 7190eae29: OUTPUT: «Cannot modify an immutable Int (42)␤  in block <unit> at <tmp> line 1␤␤»

[15:26] <SmokeMachine> Oh!!! That’s a great one!!

[15:27] <SmokeMachine> I’ll try that! Do you do that on ValueType?

[15:27] <SmokeMachine> If you do… I’ll probably delete mine…

[15:28] <SmokeMachine> It seem you only add a WHICH…

[15:29] <lizmat> yeah, if you as an author decide to make make the attributes settable, then it cannot be a ValueType by definitionn

[15:30] <lizmat> so I feel it's a case of DIHWIDT

[15:30] <lizmat> I mean, even in your code it would be possible to circumvent the test

[15:31] <SmokeMachine> Yes… it will be always possible, right? But you would need to try harder…

[15:31] <lizmat> I guess it could also check the accessor methods

[15:31] *** jpn left
[15:32] <SmokeMachine> If it is rw?! I do it on attributes and on the whole class

[15:33] <lizmat> m: class A { has $.a }; dd A.^find_method("a").signature

[15:33] <camelia> rakudo-moar 7190eae29: OUTPUT: «:(A:D $:: *%_)␤»

[15:33] <lizmat> m: class A { has $.a is rw }; dd A.^find_method("a").signature

[15:33] <camelia> rakudo-moar 7190eae29: OUTPUT: «:(A:D $:: *%_)␤»

[15:33] <lizmat> sadly, no difference in signature

[15:34] <SmokeMachine> https://github.com/FCO/ValueClass/blob/main/lib/MetamodelX/ValueClass.rakumod#L5

[15:35] <SmokeMachine> I changed the attribute’s compose() to die if it is rw

[15:35] <SmokeMachine> And the classes set_rw() to always die

[15:35] <SmokeMachine> (Metaclass’ I mean)

[15:37] <lizmat> yeah, I saw

[15:38] <SmokeMachine> Make sense?

[15:38] <SmokeMachine> I think I’ll do something your ValueType do, I’ll also cache the WHICH return…

[15:38] <lizmat> yeah... but lemme see if it's easily added to ValueType

[15:38] *** jpn joined
[15:40] <SmokeMachine> If you add that (and the binds for each attribute) to your ValueType, I’ll probably make my ValueClass become just a keyword that applies your ValueType…

[15:49] <lizmat> I was thinking of adding:

[15:49] <lizmat>     if @attributes.grep(*.rw) -> @mutables { 

[15:49] <lizmat>         die "These attributes are mutable: "

[15:49] <lizmat>           ~ @mutables.map(*.name).join(', ');

[15:49] <lizmat>     }

[15:52] <lizmat> but I'm not sure it should go beyond that, really

[15:56] <SmokeMachine> I think that’s ok… I can continue with CalueClass than… :)

[15:57] <SmokeMachine> And about the binding… I think I’ll need to continue with the proxies with Positionals and Associatives, right? https://glot.io/snippets/gxjkszeuxv

[15:58] <lizmat> why not: "method a { $!a := 42 }" ?

[15:59] <lizmat> also: you can specify on attributes is built(:bind)

[15:59] <SmokeMachine> Sorry, I didn’t get it…

[15:59] <lizmat> m: class A { has $.a is built(:bind) }

[15:59] <camelia> rakudo-moar 7190eae29: ( no output )

[16:00] <lizmat> m: class A { has $.a is built(:bind) = 30 }

[16:00] <camelia> rakudo-moar 7190eae29: ( no output )

[16:00] <lizmat> then you don't need the TWEAK

[16:00] <SmokeMachine> I tested that and it was still not breaking and changeable (I may have done something wrong, of course)

[16:00] <lizmat> m: class A { has $.a is built(:bind) = 30 }; A.new.a = 42

[16:00] <camelia> rakudo-moar 7190eae29: OUTPUT: «Cannot modify an immutable Int (30)␤  in block <unit> at <tmp> line 1␤␤»

[16:00] <SmokeMachine> Oh! :bind?! I haven’t used that!

[16:02] <lizmat> I guess you could add that to your metaclass., executing that trait_mod on it

[16:03] <SmokeMachine> Yes… that’s my plan now…

[16:03] <SmokeMachine> There is a problem…

[16:05] <SmokeMachine> m: class C { has $.a is built(:bind) }; C.new.a = 13

[16:05] <camelia> rakudo-moar 7190eae29: OUTPUT: «Cannot modify an immutable 'Any' type object␤  in block <unit> at <tmp> line 1␤␤»

[16:05] <lizmat> isn't that what you want?

[16:05] <SmokeMachine> m: class C { has $.a is built(:bind); method a { $!a = 13 } }; C.new.a

[16:05] <camelia> rakudo-moar 7190eae29: ( no output )

[16:06] <lizmat> I mean value types are supposed to be immutable

[16:06] <SmokeMachine> If there is no value it allows editin it from inside the class…

[16:06] <lizmat> well, *that* I would consider a case of DIHWIDT

[16:07] <SmokeMachine> m: class C { has $.a is built(:bind) = Any; method a { $!a = 13 } }; C.new.a

[16:07] <camelia> rakudo-moar 7190eae29: OUTPUT: «assign requires a concrete object (got a Any type object instead)␤  in method a at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»

[16:07] <SmokeMachine> Maybe I’ll need to always set something…

[16:08] <lizmat> still I'm not clear of what you want *exactly*  :-)

[16:08] <SmokeMachine> I don’t want  to give to the developer the chance to forget that shouldn’t be mutated…

[16:09] <lizmat> but what if you would allow * to be specified for a value, but want to use Inf inside?

[16:09] <lizmat> then being able to do: $!a := Inf if $!a ~~ Whatever inside TWEAK would be very helpful

[16:09] <SmokeMachine> If the developer choose to use value-class instead of class… they shouldn’t be “allowed” to mutate…

[16:11] <SmokeMachine> Using Proxy I could just make my TWEAK run after the custom one and that would work…

[16:12] <SmokeMachine> It would be exame “mutable until TWEAK and immutable after TWEAK”

[16:12] <lizmat> feels like a heck of a lot of complexity to guard against stupid developers  :-)

[16:13] <SmokeMachine> I don’t know the other developers… but I am stupid enough to need that…

[16:14] <SmokeMachine> I can also do the binding on TWEAK…

[16:14] <lizmat> then by all means!  :-)

[16:14] <lizmat> going to have to go afk

[16:14] <lizmat> laters&

[16:14] <SmokeMachine> Thanks for your help!

[16:15] *** soverysour joined
[16:16] *** soverysour left
[16:18] *** soverysour joined
[16:18] *** soverysour left
[16:18] *** soverysour joined
[16:18] *** soverysour left
[16:18] *** soverysour joined
[16:40] *** soverysour left
[16:55] *** soverysour joined
[17:09] *** beastieboo__ joined
[17:12] *** beastieboo_ left
[17:52] *** sftp joined
[18:11] *** JRaspass left
[18:11] *** jjatria left
[18:11] *** JRaspass joined
[18:11] *** jjatria joined
[19:04] <SmokeMachine> do we have something like Tuple (https://raku.land/zef:lizmat/Tuple) for Associative? My ValueClass is going to use Tuple by default when a Positional attribute is defined... I'd like to have something like that for Associative...

[19:05] <SmokeMachine> I think I found it... ValueMap (https://raku.land/zef:lizmat/ValueMap)

[19:06] <lizmat> heh  :)

[19:07] <SmokeMachine> https://usercontent.irccloud-cdn.com/file/DNKq5V8m/image.png

[19:15] <lizmat> :-)

[19:16] *** jpn left
[19:25] <SmokeMachine> that makes sense, right? If I'm creating a class that can't have non value attributes, it makes sense to change the default class for @ and % attributes from non-values to values ones, right?

[19:27] <lizmat> yes, it does  :-)

[19:30] <SmokeMachine> :)

[19:41] <SmokeMachine> lizmat: is this expected? I mean is that () around the values correct? https://usercontent.irccloud-cdn.com/file/N4DwqEfa/image.png

[19:41] *** soverysour left
[19:42] <lizmat> yes, otherwise Map.new will interprete the pairs as named args

[19:42] <SmokeMachine> :+1

[19:42] <SmokeMachine> 👍

[19:59] *** beastieboo_ joined
[20:02] *** beastieboo__ left
[20:20] <SmokeMachine> lizmat: should an empty Tuple be false?

[20:20] <SmokeMachine> m: say ?[]

[20:20] <camelia> rakudo-moar 7190eae29: OUTPUT: «False␤»

[20:26] *** beastieboo__ joined
[20:29] *** beastieboo_ left
[20:38] *** xinming left
[20:39] *** xinming joined
[21:09] <discord-raku-bot> <librasteve> m: ().so.say

[21:09] <evalable6> librasteve, rakudo-moar 7190eae29: OUTPUT: «Cannot test 7190eae29b8e7a1be56789a221ba14ded934c52a (Broken archive)»

[21:09] <linkable6> (2024-06-27) https://github.com/rakudo/rakudo/commit/7190eae29b Merge pull request #5600 from rakudo/release-2024.06

[21:09] <discord-raku-bot> <Raku eval>  False 

[21:10] <discord-raku-bot> <librasteve> just reflecting that empty List is False

[21:11] *** beastieboo_ joined
[21:14] *** beastieboo__ left
[21:21] <SmokeMachine> https://www.irccloud.com/pastebin/nwYc14ej/

[21:21] <SmokeMachine> https://github.com/lizmat/ValueMap/issues/1

[21:21] <SmokeMachine> https://github.com/lizmat/Tuple/issues/4

[21:32] *** beastieboo__ joined
[21:34] *** beastieboo_ left
[22:09] <[Coke]> What's the expectation YOU have on those tickets? Are they false and you don't know why? True and you expect false?

[22:16] *** sena_kun joined
[22:38] <lizmat> they should be False: Tuple fixed now, ValueMap I'll do tomorrow

[22:38] <lizmat> sleep&

[22:53] *** sena_kun left
[23:31] <SmokeMachine> [Coke]: I would expect them to be false if empty…

[23:32] *** guifa joined
[23:34] <SmokeMachine> Hi guifa ! Did you see that? https://github.com/FCO/ValueClass

[23:35] <guifa> SmokeMachine++

[23:35] <SmokeMachine> guifa: it has many improvements from that first version

[23:35] <guifa> Perfect example by the way of why goign to conferences is so awesome

[23:35] <guifa> an idea was sparked during hallway track

[23:35] <guifa> and it got implemented within a day and a half

[23:35] <SmokeMachine> Totally agree

[23:36] <discord-raku-bot> <antononcube> @SmokeMachine and @guifa -- I assumed you still in Vegas gambling away the good karma you got from presenting TPRC.

[23:36] <guifa> I left last night unfortunately $day-job wrecked my plans to be there the whole week

[23:36] <discord-raku-bot> <antononcube> Not making new Raku values...

[23:36] <discord-raku-bot> <antononcube> Agh -- I see.

[23:38] <SmokeMachine> I’m just lm just going to my last walk (my wife wants me to buy some stuff for here) and  I’m going back to UK tomorrow

[23:39] <guifa> I'm hoping to make the london one

[23:39] <SmokeMachine> If you do, I’ll see you there

[23:39] <discord-raku-bot> <_grenzo> The London one is only 1 day...correct?

[23:39] <discord-raku-bot> <antononcube> Las Vegas, London -- to far me.

[23:40] <guifa> Yeah just a single day for London

[23:40] <SmokeMachine> Yes, 1 day

[23:40] <discord-raku-bot> <antononcube> Ah, yeah -- and just for one day!

[23:42] <SmokeMachine> Is ValueClass the first Raku module changing the default types for @ and % attributes inside a class?

[23:43] <discord-raku-bot> <antononcube> Well, I am currently making graphs (with Raku) -- so, a certain Raku conference would have been good place to discuss the corresponding packages.

[23:43] <discord-raku-bot> <antononcube> https://cdn.discordapp.com/attachments/633753286209699870/1256394538596044800/Raku-Graph-gallery-demo.png?ex=66809c18&is=667f4a98&hm=2a6d81d48d056049310816f08b661bbe9365f6b6e1803ed0765cd03c3a63e6ab&

[23:44] <discord-raku-bot> <antononcube> Damn, the Petersen graph got "disfigured" again!

