Raku Conference Day 2 on Youtube: www.youtube.com/watch?v=BL9-XdC9WYI 🦋 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 14 August 2022.
Xliff \i 04:30
tellable6 2022-08-18T16:33:38Z #raku <tonyo> xliff fwiw i have a working slang to parse the datalog query stuff for an ORM, i've been waiting for rakuast to get there so i don't need to rewrite the code generation from it
Xliff \o even...
Why won't this work? replit.com/@Xliff/MaybeProtectedTrait#main.raku
Is it because I am trying to pass a type object (which is undefined) instead of a defined value?
Is there any way to pass a type object via trait? 04:31
.tell tonyo Nice! I'd love to see it when you're done! If you need someone to test, please let me know.
tellable6 Xliff, I'll pass your message to tonyo
Guest10 \o 04:36
XliffyMac .tell lizmat If I wanted to create a .drop method that worked from the opposite end as .skip, would .reverse.skip($n).reverse be sufficient, or would it be better (read faster) to write it in nqp? 06:41
tellable6 XliffyMac, I'll pass your message to lizmat
XliffyMac .tell lizmat In other words, would something like "my $iter : self.reverse.iterator; Seq.new( $iter.skip-at-least($n).reverse ...)" be a way to implement it in nqp? 06:42
tellable6 XliffyMac, I'll pass your message to lizmat
lizmat m: 06:52
evalable6
tellable6 2022-08-21T06:41:25Z #raku <XliffyMac> lizmat If I wanted to create a .drop method that worked from the opposite end as .skip, would .reverse.skip($n).reverse be sufficient, or would it be better (read faster) to write it in nqp?
lizmat m: dd (1..10).head(*-4)
camelia (1, 2, 3, 4, 5, 6).Seq
lizmat XliffyMac ^^ ?? 06:53
Nemokosch . 06:59
tellable6 2022-08-14T09:05:57Z #raku <SmokeMachine> Nemokosch: did you understand ResultSeq? (Sorry, I’m checking it in long intervals… I’m at the coliseum today… :)
2022-08-14T09:41:48Z #raku <SmokeMachine> Nemokosch: that’s a good way for understanding ResultSeq
2022-08-18T17:34:22Z #raku <jdv> Nemokosch: i answered your question. how about answering mine?
2022-08-20T18:12:14Z #raku <MasterDuke> Nemokosch: github.com/MoarVM/MoarVM/blob/mast...1006-L1072
hey Nemokosch, you have a message: gist.github.com/36461ee4187168cb9f...058541fad2
XliffyMac lizmat: I'm trying to avoid the *-x syntax 07:27
But thanks for example!
For reference, your example would be equivalent to my proposed .drop(3)
Er... .drop(4) 07:28
sub drop ($a, $n) { $a.reverse.skip($n).reverse }; (1..10).&drop(4).say 07:29
evalable6 (1 2 3 4 5 6)
XliffyMac I'm wondering if that would be worth converting to nqp and submitting a PR for consideration.
sub drop ($a, $n) { $a.head(*-$n) }; (1..10).&drop(4).say 07:31
evalable6 (1 2 3 4 5 6)
XliffyMac I should bench those.
atweiden-air_ m: role B { has $.b }; role A { has $.a; multi method new(*%o (:$a, :$b!)) { self.^mixin(B).bless(|%o) }; multi method new(*%o (:$a)) { self.bless(|%o) } }; multi a(A $ (:a($) where .so) --> True) {*}; multi a(A $ (:a($)) --> False) {*}; a(A.new).say; a(A.new(:a)).say; try a(A.new(:a, :b)).say; $!.WHAT.say; 23:27
camelia False
True
(NoMatch)
atweiden-air_ m: role B { has $.b }; role A { has $.a; multi method new(*%o (:$a, :$b!)) { self.^mixin(B).bless(|%o) }; multi method new(*%o (:$a)) { self.bless(|%o) } }; multi a($ (:a($) where .so) --> True) {*}; multi a($ (:a($)) --> False) {*}; a(A.new).say; a(A.new(:a)).say; try a(A.new(:a, :b)).say; $!.WHAT.say if $!; 23:31
camelia False
True
(NoMatch)
atweiden-air_ does deconstruction stop working for objects with mixins? 23:33