🦋 Welcome to Raku! raku.org/ | evalbot usage: 'p6: say 3;' or /msg camelia p6: ... | irclog: colabti.org/irclogger/irclogger_log/raku
Set by ChanServ on 14 October 2019.
[Coke] (y) 00:03
leont r: role Foo[Int $a] {}; role Bar[Int $a] does Foo[$a] {} 00:58
camelia ( no output )
5===SORRY!5=== Error while compiling <tmp>
No appropriate parametric role variant available for 'Foo':
Cannot resolve caller (Foo[Mu]:U, Mu:U); none of these signatures match:
(::$?CLASS ::::?CLASS Mu, Int $a)
at <tmp>:1
leont I assume that is a bug?
It seems to work without type, just not with explicit types 00:59
leont Or more precisely, if Foo's argument is typed 01:00
moon-child Callable[Str] is the type of a callable returning Str. How can I express the types of the parameters in the type? 02:13
elcaro I'm not sure you can. a Callable symbol could be a multi, so I think the best you can do is (iterate through .cadidates if necessary and) inspect .signature 02:21
parabolize :m role R1[Int $a] { method foo {$a} }; class C1 does R1[3] {}; C1.n 02:38
:r role R1[Int $a] { method foo {$a} }; class C1 does R1[3] {}; C1.new.foo.say;
r: role R1[Int $a] { method foo {$a} }; class C1 does R1[3] {}; C1.new.foo.say; 02:39
camelia 3
parabolize leont: I don't think the class needs the sig 02:40
I'm not sure what you are trying to do though
parabolize there is some examples in roast/S14-roles/parameterized-basic.t 02:45
gfldex r: my Int $a = 10; role Foo[$a] {}; role Bar[Int $a] does Foo[$a] {} 09:24
camelia ( no output )
gfldex leont: ^^^ at the time `does Foo[$a]` is evaluated the container `$a` is Mu. The `$a` in Bar[Int $a] is a different container. 09:26
leont So "inheriting" the argument across roles doesn't work at all? 09:29
gfldex r: role Foo[$a] {}; role Bar[Int $a = 10] does Foo[$a] {} 10:08
camelia ( no output )
gfldex leont: Well kinda, but it may not do what you want. 10:09
leont I can see why it doesn't work, but it's would be a useful pattern if it did 11:36
leont Is there a good pack 'H*' replacement that isn't marked experimental? 12:45
lizmat does P5pack have it? 12:51
SmokeMachine japhb: what a great surprise it was to learn you can use Red with MUGS! :) 17:56
SmokeMachine I have 2 small suggestion about that, if you don’t mind: github.com/Raku-MUGS/MUGS-Core/blo...akumod#L40 you could use `schema(@models).create` and for everything else you can use `red-do :transaction, { … }` for transactions 18:02
SmokeMachine japhb: ^^ 18:02
leont Getting this error when compiling rakudo on a fresh checkout: «While looking for 'CORE.c.setting.moarvm': no such file or directory» 19:57
Anyone got a clue what could be going on?
moritz_ leont: the last time somebody had this error, it was an OOM in an earlier compilation stage 19:58
leont moritz_: Thanks, I'm pretty sure that's exactly it (this VPS has 512M ram apparently, not sure how I'm going to get rakudo on it) 19:59
tyil I've had success with 1 gb memory raspi over a year ago, but not with VMs that had less 20:00
moritz_ leont: compile somewhere else, compile it over? 20:02
japhb SmokeMachine: Glad you liked the "surprise". Thanks for the Red tips! More always welcome. 20:39
Xliff \o 21:10
Is there a Raku-approved way to take a void* from a CLib and hand it off to a Buf for management without an implicit copy?
summerisle_ I think that if you just say 'Buf' in a native sig, nativecall assumes you mean Pointer[Void] as far as calling convention goes. 21:11
Xliff summerisle_: Yeah, I've had bad luck with using Buf in NativeCall sigs. Usually results in a SegV. 21:12
summerisle_ hmm, i need to re-ident but i was doing a ton of stuff with nativecall and buffers that was going well
Xliff I have prior experience. Heh
summerisle so what are you doing Xliff 21:14
iirc i was doing some stuff with binary data in buffers and passing them around nativecall 21:15
Xliff libical bindings 21:16
Particularly libical.github.io/libical/apidocs/...ource.html
leont My supply { whenever { ... } } is closing down without me asking for it. I'm not sure what I'm doing wrong 21:36
summerisle Xliff: and nativecast() won't do the trick? 21:57
i suppose you could always abuse memcpy 22:05
Xliff Already there. :) 22:06
summerisle: Will have to try nativecast.
Still would like a way to tell Buf what its size is, which we currenly cannot do.
leont Also, a CLOSE on another supply is running twice. I can't quite explain that either 22:34
leont Turned out some of my debugging wasn't working, and the problem was somewhere else entirely 23:40