🦋 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.
bronco_creek Hi. I have been away a long time (years)! I recently got the LTA error message "Cannot find method 'default' on object of type NQPMu" I figured out my reproducible mistake. Is this of interest here? 00:50
My problem occurs with Rakudo Star version 2019.03.1 built on MoarVM version 2019.03 00:51
discord6 <theangryepicbanana> bronco_creek: is that on repl.it? (that's the exact thing it says on repl.it so I thought I'd ask) 01:00
<theangryepicbanana> repl.it actually uses 2019.07.1
bronco_creek Sorry, don't even know what repl.it is... 01:03
I have not tried to reproduce this error from the command line, but I can make it happen from a method in a small class. 01:06
Happens when I try to redeclare a variable within a method where the variable name is in the method's signature. 01:07
discord6 <theangryepicbanana> well that's probably the issue 01:07
<theangryepicbanana> afaik you can't redeclare variables like that 01:08
bronco_creek Sure. Just saying that a better error message would be helpful. No line numbers or anything.
discord6 <theangryepicbanana> ah it's only for subs
<theangryepicbanana> seems like an overlooked bug
<theangryepicbanana> might want to open an issue in the rakudo github repo 01:09
bronco_creek K. I'll see if I can remember how to do that tomorrow. In my time zone, it's now happy hour. Thanks discord6. 01:11
discord6 <theangryepicbanana> ye 01:13
vrurg bronco_creek: Would be better to test against latest rakudo
discord6 <theangryepicbanana> I'm on a bridge 01:14
<theangryepicbanana> (discord bridge)
bronco_creek Thanks theangrypicbanana. Don't jump! 01:15
vrurg bronco_creek: there is a recent release of RakudoStar 2020.01
discord6 <theangryepicbanana> lol
bronco_creek Thanks Vrurg. I'll test against the new version before filing a bug. 01:16
Voldenet SmokeMachine: if you go with the regex analogy, you should have some equivalent to /.*/, but I doubt it'd be very nice, because then adding events to the stream would require additions to matchers 01:24
Voldenet SmokeMachine: maybe it would be good to be able to tell what is this matcher interested in and how should it treat unmatched events (ignore non-matching or fail the whole match) 01:33
Voldenet SmokeMachine: it would be implicit that only event types used in the match are interesting, but `event { match ev1(*.a < 5)|ev2(*.b > -4) { ev1(#1) && ev2(b == #1.a) }}` 01:38
SmokeMachine Voldenet: I liked that... I was thinking something like that but that would be possible to use inside of just parts of the match... (like blocks, []) 01:40
maybe we could have matches blocks inside of match blocks if we want it into just a part of the match... 01:43
Voldenet SmokeMachine: OTOH it would be very obvious what does this mean `event { match { ev(#1) && . ** 0..10 && ev(#1.a == a) }}` 01:45
Voldenet SmokeMachine: and if someone really wanted such filter `event a { is match { ev(a < 5) ^ ev2(b > -4) } }; event ev2 { match { a(#1) && a(b == #1.a) } }`, though it sounds pointlessly verbose 01:48
SmokeMachine Voldenet: I think ignore other events should be the default... don't you think? 01:51
Voldenet I think so too, because it's practical 01:53
SmokeMachine yes 02:00
Voldenet `event ev2 { use strict; match { a(#1) && . ** 0..* && a(b == #1.a) } }`
SmokeMachine: `use strict` for more verbose syntax sounds ok 02:01
m: no strict; $x = 42; 02:02
evalable6
Voldenet SmokeMachine: in fact, if event allowed more match blocks, every block could get its own strict matching rules 02:03
SmokeMachine Voldenet: what about `event { match { :strict(ev1(*.a < 5)|ev2(*.b > -4)) ev1(#1) && ev2(b == #1.a) }}` ? 02:06
Voldenet why :strict, it's not very obvious :grep would be more 02:07
but to me strict matching would mean "match this sequence exactly", like regex - it'd allow making things like mouse gestures 02:08
SmokeMachine yes... but would be more precise for port knocking... 02:09
the thing about the strict is that we only want it strict for a few events... I mean, only for events with the same ip on the port-knocking example... 02:10
if some other ip start knocking, we don want to cancel the first ip that was doing the sequence... 02:11
SmokeMachine Voldenet: other way I thought would be: `even knocked { match { :track(?ip == #1.ip) { knock(#1, port == 1) knock(port == 2) knock(port == 3) } } }` 02:14
and everything inside that track should have ip == #1.ip and be strict 02:15
Voldenet it really asks for multiple chained matchers: `event knocked { match { knock(#1) knock(ip == #1) } and match { knock(port == 1) && knock(port == 2) && knock(port == 3) } } 02:17
uh
`event knocked { match { knock(#1) knock(ip == #1.ip) } and match { knock(port == 1) && knock(port == 2) && knock(port == 3) } }
and even `event knocked { match { knock(#1) knock(ip == #1.ip) } and match { use strict; knock(port == 1) && knock(port == 2) && knock(port == 3) } }`
Voldenet in which case the second matcher would get by-ip matched sequence and then would need to strictly match the sequence given 02:18
SmokeMachine Voldenet: think on `:track(bla == #ble.bla)` as a way of creating multiple tracks, where every event inside of each track has the same bla. and we can match inside of that track, an once that track has all the events that are important, we can exactly match... 02:22
Voldenet if you can have multiple tracks, then it's very similar 02:25
Voldenet But how would you tell which type to accept into matcher? `match { :track(type == "knock", ip = #1.ip) knock(port == 1) && knock(port == 2) && knock(port == 3) }` 02:29
SmokeMachine I was thinking to :track accept a filter (a == b) or a event-matcher (knock(?ip == #1.ip)) 02:32
or | chains 02:33
I mean `:track(a = #bla.a | ev() | ev2(b == #ble.b))` 02:35
Voldenet and what if :track() block would need its own :track block? :P `(match (track (track (knock (== ip (ip #1)))))) 02:37
SmokeMachine :) 02:38
`:track(a == #bla.a | ev() | ev2(b == #ble.b))` (I've forgotten 1 =) 02:39
Voldenet there's grouping syntax though, might as well use it: match { [ knock(#1, ?ip == #1.ip) ] and [ knock(port == 1) && knock(port == 2) && knock(port == 3) ] } 02:44
withp How should/does one typedef something that is under the hood a uint32 into a 'size_t' or a 'gpg_error_t' or what have you in NativeCall bindings? I was starting to just replace every instance of 'size_t' in this header with uint32 but got a profound feeling that I was missing something simple/fundamental. 03:19
andrzejku hi hello 09:39
moritz good morning andrzejku 09:40
andrzejku good morning :) we hadn't speak for a long time 09:41
moritz indeed 09:53
my raku involvement is pretty low right now
moritz but I do organize the German Perl and Raku workshop 09:53
El_Che moritz: that's not a low investment :) 10:32
andrzejku moritz, it is better than do nothing :D 10:35
cpan-raku New module released to CPAN! Term::Choose::Util (1.3.3) by 03KUERBIS 10:40
cpan-raku New module released to CPAN! Math::Libgsl::Matrix (0.1.0) by 03FRITH 13:13
Doc_Holliwood Ok, this is spooky. 14:56
I have a script with 3 subs I benchmark 14:57
When I run cmpthese(sub1, sub2); cmpthese(sub1, sub3); then sub1 runs 3000 times per second in both cases 14:58
Now, when I run cmpthese(sub1, sub2) alone, sub1 also runs 3000 times per second 14:59
BUT when I run cmpthese(sub1, sub3); alone, sub1 is consistently twice as fast with 6000 times per second
What the actual guys?
MasterDuke jit/spesh warmup? or maybe some bad statistics? do MVM_SPESH_BLOCKING=1 and/or MVM_SPESH_NODELAY=1 change anything 15:01
jnthn Doc_Holliwood: Would need to see the code to make any guesses.
Doc_Holliwood Sure.
hold on
jnthn But in general, the optimizer will decide what to do based upon overall program behavior 15:03
jnthn (The dynamic one in MoarVM that keeps stats, I mean) 15:03
Doc_Holliwood gist.github.com/holli-holzer/8e07a...d5beb5b852 15:04
it's take-two-push-one that behaves that way
when i uncomment the first cmpthese call (ignore the last six lines), the speed of it drops 15:05
jnthn I wonder what Bench is doing also... :) 15:06
Doc_Holliwood Do you have a better idea? 15:08
Honest question, not a snappy response
jnthn Well, I know that if you do two loops one after the other in code, the optimization of the second one typically comes out worse 15:09
So was curious to see if it was doing that
But no, it ain't. Though it does seem to run all the iterations of one thing before trying any of the others 15:10
Doc_Holliwood So you do see the same behaviour?
jnthn Haven't tried it, and too many slides to write today to do so
Anyway, since spesh considers past program behavior to be an indicator of future program behavior, and doesn't know how to back out of that, then it's possible it can make choices based on what it sees happening which turn out to be bad for things that happen in the future 15:11
Doc_Holliwood WHAT? You ain't wann do no free work for me, how dare you?
;-) 15:12
jnthn :)
jnthn I'd suggest taking a look at --profile to see if there's clues in there 15:12
Doc_Holliwood Yeah well, I have no clue how to interpret that output tbh 15:13
cpan-raku New module released to CPAN! Gnome::N (0.15.5) by 03MARTIMM 16:00
leont p: say :f("foo" but False) eqv :f("foo" but False) 16:34
r: say :f("foo" but False) eqv :f("foo" but False)
How do you run something in the bots again?
tadzik m: say 1 16:35
evalable6 1
leont m: say :f("foo" but False) eqv :f("foo" but False) 16:36
evalable6 False
leont That is a bug, right?
leont I guess it's because both anonymous roles are unique 16:37
leont m: say "foo" but False eqv "foo" but False 17:50
evalable6 False
cpan-raku New module released to CPAN! Supply::Folds (0.0.1) by 03KAIEPI 18:17
jdv79 nopaste.linux-dev.org/?1291224 19:22
any ideas?
i have openssl-devel installed... 19:23
openssl-devel-1.1.1d-2.fc31.x86_64 19:24
MasterDuke jdv79: there have been a bunch of people with similar(ish) problems, and i think sometimes it was that they needed a particular version of openssl-devel
i'd suggest searching the logs of this channel 19:25
cpan-raku New module released to CPAN! Math::Libgsl::BLAS (0.0.3) by 03FRITH 19:27
jdv79 i only see this convo in a search 19:28
jdv79 raku-dev search only shows nine runimating on native lib versioning or something 19:29
looks similar to github.com/sergot/openssl/issues/72 19:30
MasterDuke should probably also search the perl6 named channels
jdv79 no bueno 19:32
hmm
MasterDuke github.com/sergot/openssl/issues/68 maybe 19:33
jdv79 this is fun cause i upgraded my box because an old version of openssl was cauing issues that nine fixed and now its broken again 19:34
MasterDuke ha
jdv79 nine: any ideas? i get the feeling you know a lot about this area... 19:35
Geth doc: sjn++ created pull request #3226:
Perl 6 -> Raku name changes + URL updates
20:09
nine jdv79: have you reinstalled the OpenSSL module (with --force)? 21:06
SmokeMachine Voldenet: what if `[:bla () () ()]` be equivalent of `[bla() bla() bla()]` and `[:bla(a == 1) (b == 2) (b == 3)]` == `[bla(a == 1, b == 2) bla(a == 1, b == 3)]`? That way, the port-knocking could b write like this:
nine after the upgrade
SmokeMachine www.irccloud.com/pastebin/IjrxM83m/
Voldenet: the `:` would mean that everything inside of the group (or the whole match) follow that rules... but you could override it for each event if you want... 21:08
Voldenet then using ¯\_(ツ)_/¯() would basically discard anything but ¯\_(ツ)_/¯, how to match more event types? 21:09
SmokeMachine end if I want a event without type, I could `(any == thing)`
Voldenet uh
then using :something() would basically discard anything but ¯\_(ツ)_/¯, how to match more event types?
Voldenet I forgot having an emote on : whatever, lol 21:09
SmokeMachine (that's not related to the strict stuff...) 21:10
Voldenet I think that `:(type = "knock", ?ip == #1.ip)` could be equivalent
SmokeMachine yes, I think so... 21:11
SmokeMachine `:(a == 1) bla() bla()` == `bla(a == 1) bla(a == 1)` == `:bla(a == 1) () ()` == `:(type == "bla", a == 1) () ()` 21:13
Voldenet and, obviously, :[bla(a == 1), ble()] 21:14
hm, nevermind, it's not obvious at all
SmokeMachine Voldenet: you mean `:[bla(a == 1), ble()] () ()` == `[bla(a == 1) ble] ** 2`? 21:15
Voldenet yes, so it is quite obvious after all 21:16
SmokeMachine I think that makes sense...
moon-child can someone explain to me the deal with why the lucky stiff?
He apparently made p2 and potion, which seem cool 21:17
SmokeMachine but I'm not sure... I was thinking on `()` as a event matcher, and one event only...
moon-child if I go to his website now, it's techblogspam. But there's also a suspicious 'about' page indicating it might not be squatted
SmokeMachine Voldenet: `** N` and `** M..N` for `N != Inf` is implemented 21:21
Voldenet: But I'll need to redo the QueryStorage... it's too buggy... 21:22
Voldenet well, I'm not sure if it's necessary, but it's just syntax candy anyway 21:23
SmokeMachine one query is overriding the previous query... :(
rypervenche Should it be possible to chain methods when using .= ? 21:29
m: my $var = "SOMETHING"; $var .= substr(4).lc; say $var;
evalable6 THING
rypervenche In the REPL it will give the correct output, but not assign it to the variable. 21:30
MasterDuke the repl has lots of problems 21:31
jnthn But in this case the repl is probably right in telling that it evaluates to the result of .lc 21:53
$var .= substr(4).lc is parsed as ($var .= substr(4)).lc 21:54
rypervenche So chaining methods with .= isn't something desired/possible?
lizmat not at the moment, I would say 22:00
jnthn Just them with .= ? 22:01
m: my $var = "MANSLAUGHTER"; $var .= substr(4) .=lc; say $var 22:02
evalable6 laughter
jnthn uh, just chain :)
lizmat heh :-) 22:06
rypervenche Ahhh, it needs multiple .= . Ok, thanks. 22:10
cpan-raku New module released to CPAN! PDF::Class (0.4.1) by 03WARRINGD 22:20
Geth doc: Kaiepi++ created pull request #3227:
Document how to type enums
23:20