Welcome to the main channel on the development of MoarVM, a virtual machine for NQP and Rakudo (moarvm.org). This channel is being logged for historical purposes.
Set by lizmat on 24 May 2021.
nine There is just no better way to learn really all about a language than implementing a compiler for it. Suddenly I understand how ParametricRoleHOW, ParametricRoleGroupHOW and CurriedRoleHOW fit together. 11:52
nine Huh....timing does seem to become a bit of an issue now and then in RakuAST 15:09
dogbert17 how is that possible? 15:11
nine Like when to add a parametric role to its role group. At BEGIN time (when we find or create the group) the role doesn't have a compiled body block yet, so we can't add then. At the time we create the meta object it's too late as in the mean time we may want to specialize the role for a class.
nine Yet in the end it's ye good olde semipredicate problem again. Role groups are themselves type objects, i.e. not concrete, thus if $group just doesn't do what I meant 15:42
preventing PRODUCE-META-OBJECT from actually adding the role to its group
nine We haz role groups! 17:28
Now the final piece of the puzzle seems to be currying of roles.
lizmat nine++ 17:36
meanwhile on SO: stackoverflow.com/questions/724165...-from-rust
nine I don't think we support structs as value types 17:51
At least for return values 17:52
nine m: role Foo[$i] { }; sub foo(Foo:D[Int]) { }; foo(Foo[Int]) 18:02
camelia Parameter '<anon>' of routine 'foo' must be an object instance of type
'Foo', not a type object of type 'Foo[Int]'. Did you forget a '.new'?
in sub foo at <tmp> line 1
in block <unit> at <tmp> line 1
18:02
nine m: role Foo[$i] { }; sub foo(Foo:D[Int]) { }; foo(Foo[Str].new)
camelia ( no output )
nine Somehow, I don't think that's right 18:03
Makes me realize, that I may have done RakuAST::Type::Coercion and RakuAST::Type::Definedness wrong. They should take a base type instead of a type name, so they become composable. 18:06