Zoffix | .text of privmsg/notice events is mutable, but I've not explored how well it works or had any need to mutate anything yet | 00:01 | |
timotimo | right | ||
Zoffix | There's .emit and .emit-custom in the design spec for emitting events, but I've not done anything yet there, due to lack of usecases. | ||
timotimo | and things like "turn all bot messages into swedish chef english" would better be a filter | 00:02 | |
would it be allowed to have the message passed into an "is rw" parameter? | |||
that article reads very well | 00:03 | ||
and the module seems good | |||
great job! | |||
AlexDaniel | Zoffix: I have a question! | 01:25 | |
Zoffix: or a feature request, I'm not sure yet | 01:26 | ||
Zoffix: looking at this: “It's not uncommon for a bot command to take some time to execute. In those cases, we don't want the bot to lock up while the command is doing its thing.” | |||
Zoffix: OK, what if I want to write multiple messages? | |||
Zoffix: Something like: “OK, doing what you asked me to do”… “Still working on it, hang on!”… “OK DONE!” | 01:27 | ||
Zoffix | Use $.irc.send | 01:29 | |
AlexDaniel | Zoffix: right in irc-to-me? | 01:31 | |
Zoffix | method irc-privmsg-channel ($e) { start { sleep 2; $.irc.send: :where($e.channel) :text('OK, doing what you asked me to do'); sleep 2; $.irc.send: :where($e.channel) :text('Still working on it, hang on!'); sleep 3; $.irc.send: :where($e.channel) :text('OK DONE!'); Nil; } } | ||
AlexDaniel | ah ok | 01:32 | |
Zoffix | Probably doing $e.reply: 'message....'; will work too | ||
AlexDaniel | Zoffix: for some reason I was thinking that if I sleep for long periods of time in irc-privmsg-channel it will hang the bot | ||
Zoffix | method irc-privmsg-channel ($e) { start { sleep 2; $e.reply: 'OK, doing what you asked me to do'; sleep 2; $e.reply: 'Still working on it, hang on!'; sleep 3; $.e.reply: 'OK DONE!'; } } | ||
It won't hang 'cause it's inside the start {} | 01:33 | ||
AlexDaniel | aaah | ||
timotimo | it'd be kinda neat if a filter could also know what message/event triggered a reply, so that for channels with an [off] marker it could also include the [off] marker in every bit of output | ||
but that seems like it'd require a bit of cooperation from plugin authors to work | |||
which means it'd never work | |||
Zoffix | Interesting. Useless use of "not " in expression "not ($slurp_p and $slurp_n)" in sink context (line 7590) | 03:04 | |
At stage optimize | 03:05 | ||
Oh, it's my $need_cap = $sig.count == Inf and not ($slurp_p and $slurp_n);. I think TimToady pointed that out a bit ago | 03:06 | ||
m: use Test; throws-like { grep $_ == 1, 1,2,3 }, X::Match::Bool | 03:08 | ||
camelia | rakudo-moar 22949d: OUTPUT« 1..2Use of uninitialized value of type Any in numeric context in block at <tmp> line 1 ok 1 - code dies ok 2 - right exception type (X::Match::Bool)ok 1 - did we throws-like X::Match::Bool?» | ||
dalek | ast: 896d43f | (Zoffix Znet)++ | S32-list/grep.t: .grep propagates .is-lazy RT#128773 |
03:09 | |
synopsebot6 | Link: rt.perl.org/rt3//Public/Bug/Displa...?id=128773 | ||
MasterDuke | i noticed that today also. and additionally, my parse times have gone up a bit, from the high 50s to the high 60s-low 70s | 03:10 | |
Zoffix | Mine too. It hovered around 60 and now it's at 66 | 03:11 | |
dalek | kudo/nom: 32f341b | (Zoffix Znet)++ | src/core/Block.pm: Fix conditional with incorrect precedence |
03:23 | |
ast: 671baf4 | (Zoffix Znet)++ | S32-list/grep.t: Avoid spurious warnings in output |
03:27 | ||
kudo/nom: 15ee3c3 | lizmat++ | src/core/Any-iterable-methods.pm: Fix for RT #128779 and RT #126921 Sorry it took so long to fix: this one definitely slipped through the cracks :-( |
09:51 | ||
synopsebot6 | Link: rt.perl.org/rt3//Public/Bug/Displa...?id=128779 | ||
Link: rt.perl.org/rt3//Public/Bug/Displa...?id=126921 | |||
lizmat | re slower compile times: I think I will have to concur, looking at my latest "cold" spectest result: | 10:11 | |
Files=1112, Tests=52514, 238 wallclock secs (13.65 usr 4.10 sys + 1452.07 cusr 124.32 csys = 1594.14 CPU) | |||
there are 3 more files, and 76 more tests, but the previous low was 225 wallclock / 1535 CPU | 10:12 | ||
Zoffix giggles at comments on www.reddit.com/r/programming/comme...ome_async/ | 10:42 | ||
People think :from<Perl5> uses a Perl 5 compiler in Rakudo :) nine++ | 10:43 | ||
"In theory it should be though, as you can define a grammar for Perl 5 and make a Perl 5 compiler in Perl 6 that would work like this." | 10:45 | ||
tadzik | may be worth pointing them to FROGGS++'s v5 | 10:46 | |
Zoffix | This is my evolution of parse times: gist.github.com/zoffixznet/b11127c...051d4b1871 | 10:57 | |
m: say "{(47.491 - 44.624)/47.491*100}% slower" | 10:58 | ||
camelia | rakudo-moar 15ee3c: OUTPUT«6.036933% slower» | ||
Zoffix | 44-45s being what I normally had in the past | ||
nine | Zoffix: am I understanding this correctly? You run the Perl 5 code on a different thread? | 11:15 | |
Zoffix | nine, yeah, it runs in a start{} block | ||
nine | And it works? | 11:16 | |
Zoffix | Seems to | ||
nine | Awesome :) | ||
jnthn | Zoffix++ # nice article :) | 11:26 | |
Zoffix | Thanks. | ||
jnthn | Also nice use of async stuffs. :) Seeing people do neat stuff with them helps motivate me to spend the tedious hours hunting/fixing the instabilities in them. :) | 11:39 | |
lizmat | m: say 255/238; say 1594/1535 # concurring roughly with slowdown in parsing that Zoffix calculated | 11:40 | |
camelia | rakudo-moar 15ee3c: OUTPUT«1.0714291.038436» | ||
lizmat | Zoffix: s/procrastenator/procrastinator/ | 11:42 | |
Zoffix | Thanks. Fixed. | 11:44 | |
dalek | ast: 9697a3b | (Zoffix Znet)++ | S32-list/sort.t: sort stored in a sub returns a List RT#128779 |
11:46 | |
synopsebot6 | Link: rt.perl.org/rt3//Public/Bug/Displa...?id=128779 | ||
dalek | ast: 94d5bc9 | (Zoffix Znet)++ | S32-list/sort.t: detached .sort returns a List RT#126921 |
||
synopsebot6 | Link: rt.perl.org/rt3//Public/Bug/Displa...?id=126921 | ||
lizmat | I wonder how much trouble it would be to make "sub a(/foo/) {}" be sugar for "sub a($ where /foo/)" | 11:48 | |
Zoffix | It sucks a bit that dalek cuts off output silently. Above, the very latest commit is missing entirely: github.com/perl6/roast/commit/9dd9...0821f9ddff | ||
There's an RFC RT ticket for sub a(/foo/) work; same as sub a('foo') works | 11:49 | ||
lizmat | ah, ok :-) | ||
Zoffix | This one rt.perl.org/Ticket/Display.html?id=128278 | 11:50 | |
jnthn | I don't immediately see a syntactic ambiguity in doing it | 11:51 | |
Zoffix | Looks like spectest no longer hangs on my home VM \o/ | 12:01 | |
jnthn | Zoffix: It was a hanging S17-supply test before? :) | ||
Zoffix | Yeah | ||
jnthn++ fixing things | |||
jnthn | Yeah, that one I got. Actually there's still another problem that can cause such a hang but it's much less common to hit it. | 12:02 | |
(Have to get really unlucky wiht the timing) | |||
Got a branch to fix that too, but it manages to bust .throttle | |||
Zoffix looks at rt.perl.org/Ticket/Display.html?id...et-history | 12:08 | ||
"Note that we don't generally test sink warnings currently." <-- is there a reason for it or can I go and add tests? | |||
I see [Coke] reopened the ticket and added the testsneeded tag. | 12:09 | ||
moritz | Zoffix: I don't think snik warnings are mandatory for a compiler | 13:28 | |
*sink | |||
it's in the "let's see what we can do for you, but we won't promise anything" category | 13:29 | ||
much like compile-time errors on signature mismatches are a nice-to-have feature | |||
Zoffix | We still can test it, just not as part of roast. | 13:30 | |
psch | m: "foo"; CATCH { default { say "caught"; .perl.say } } | 13:32 | |
camelia | rakudo-moar 15ee3c: OUTPUT«WARNINGS for <tmp>:Useless use of constant string "foo" in sink context (line 1)» | ||
dalek | p: 4dbabe9 | (Pawel Murias)++ | src/vm/js/ (9 files): [js] Rename $call to $$call for consistency. |
||
p: 659181a | (Pawel Murias)++ | src/vm/js/ (5 files): [js] Rename $apply to $$apply for consistency. |
|||
psch | m: "foo"; CONTROL { default { say "caught"; .perl.say } } | ||
camelia | rakudo-moar 15ee3c: OUTPUT«WARNINGS for <tmp>:Useless use of constant string "foo" in sink context (line 1)» | ||
psch | sink warnings completely bypass our CX everything? | 13:33 | |
moritz | yes, they are compile-time | ||
psch | so output testing | ||
mst | you can't SIGWARN 'em somehow? | 13:36 | |
Zoffix | .ask [Coke] I see you re-opened with testsneeded tag. Should we test sink warnings (see TimToady's comment on ticket)? Where should we test; in Rakudo's test suit? rt.perl.org/Ticket/Display.html?id...et-history | 13:47 | |
yoleaux2 | Zoffix: I'll pass your message to [Coke]. | ||
dalek | p: 166b381 | (Pawel Murias)++ | src/vm/js/nqp-runtime/reprs.js: [js] Fix undeclared variable. |
13:53 | |
p: 4b27a15 | (Pawel Murias)++ | src/vm/js/nqp-runtime/reprs.js: [js] Remove debugging leftover. |
14:12 | ||
Zoffix | .oO( bot idea: you give it a date, it gives you a list of Rakudo commits on for that day ) |
14:32 | |
Oh, I guess that's what git log --since=yyyy-mm-dd --before=yyyy-mm-dd is for | 14:35 | ||
committable, help | 14:40 | ||
committable | Zoffix: Like this: committable: f583f22,HEAD say 'hello'; say 'world' | ||
Zoffix | committable, 470be033192dd34cf7336e77ca46573f5cdadfb5 class SinkCanary { method sink { note "SUNK!" } }; my ($a) = SinkCanary.new; | ||
committable | Zoffix: ¦«470be03»: SUNK! | ||
Zoffix | committable, 470be033192dd34cf7336e77ca46573f5cdadfb5,HEAD class SinkCanary { method sink { note "SUNK!" } }; my ($a) = SinkCanary.new; | ||
committable | Zoffix: ¦«470be03»: SUNK!|«HEAD»: | ||
Zoffix | MasterDuke++ AlexDaniel++ # useful bots | 14:41 | |
committable, join #zofbot | |||
committable | Zoffix: ¦«join»: Cannot find this revision | ||
Zoffix | .ask AlexDaniel is is possible to make committable/bisectable join #zofbot? I don't wanna spam #perl6-dev | 14:42 | |
yoleaux2 | Zoffix: I'll pass your message to AlexDaniel. | ||
Zoffix | committable, 470be033192dd34cf7336e77ca46573f5cdadfb5 use Test; { my $is-sunk = False; my class SinkCanary { method sink { $is-sunk = True } }; my ($a) = SinkCanary.new; isnt $is-sunk, True, 'not sunk' } | 14:43 | |
committable | Zoffix: ¦«470be03»: not ok 1 - not sunk# Failed test 'not sunk'# at /tmp/KAb2CHYWM4 line 1# twice: 'True' «exit code = 1» | ||
MasterDuke | Zoffix: they don't currently have any logic to join new channels, the channels are hardcoded at start time | 14:44 | |
but i'll create an issue for that | |||
Zoffix | MasterDuke++ | ||
committable, 470be033192dd34cf7336e77ca46573f5cdadfb5 use Test; { my $is-sunk = False; my ($a) = class { method sink { $is-sunk = True } }.new; isnt $is-sunk, True, 'not sunk' } | 14:53 | ||
committable | Zoffix: ¦«470be03»: not ok 1 - not sunk# Failed test 'not sunk'# at /tmp/EAa9kf9HAN line 1# twice: 'True' «exit code = 1» | ||
dalek | ast: 1b57b3d | (Zoffix Znet)++ | S04-statements/sink.t: my ($a) = ... does not trigger sinking RT#127491 |
14:55 | |
synopsebot6 | Link: rt.perl.org/rt3//Public/Bug/Displa...?id=127491 | ||
MasterDuke | they are also in #perl6, so you could divide your spamming across each | 14:56 | |
Zoffix | :/ | ||
dalek | ast: 9a4af3b | (Zoffix Znet)++ | S04-statements/sink.t: Reword test to make it clearer what it tests |
14:58 | |
b2gills | I think that the only kind of tests that could/should be in roast for sink warnings, are ones that test to make sure there aren't any warnings. | 15:55 | |
TimToady | well, otoh, pragmatically speaking, the sink warnings are a very important part of what allows us to use the fancy precedence table without confusing people more than we do | 15:57 | |
whenever you use something either tighter or looser than you expected, values and pure functions tend to fall off, and we're just spotting those bits falling to the floor | 16:02 | ||
so from a usability point of view, it's very much a part of the language | |||
the danger is that we might produce a warning we'd have to retract later if circumstances made it impossible to detect | 16:03 | ||
b2gills | Which would mean that tests for sink warnings would be better separated from roast, or a part of roast that is explicitly optional | 16:05 | |
TimToady | well, we have the concept of stress tests | 16:06 | |
but in some sense these are low-stress, not high-stress | 16:07 | ||
mst | clearly sink warnings belong there, given that precedence related confusion definitely induces stress | 16:08 | |
TimToady | so I guess I'm basically okay with just including sink warning presence/absence tests in roast itself, since the stakes are low enough that changes can be considered errata | 16:15 | |
btw, the slowdown noted recently might be due to actually doing the want processing on some method bodies that were inadvertently omitted before, and that means a lot more annotations on the qast tree | 16:19 | ||
if so, we could probably get that performance back by baking common annotations into the nodes themselves rather than into attached hashes | |||
especially for things like :WANTED, which is just boolean, and could go in a bitmask | 16:20 | ||
Zoffix | m: use use Foo::Bar | 17:10 | |
camelia | rakudo-moar 15ee3c: OUTPUT«===SORRY!===Could not find symbol '&Bar'» | ||
TimToady | GIGO :) | 17:20 | |
Zoffix | :) | 17:28 | |
MasterDuke | is there some reason Proc::Async doen't have an exit code and signal? | 17:34 | |
TimToady | you mean, is there a *good* reason? | 17:38 | |
the usual good reason is that it would require time travel to the future wait(), but there could be bad reasons too :) | 17:41 | ||
Zoffix | MasterDuke, the .result of the Promise .start returns is a Proc object. It does have .exitcode and .signal | 17:56 | |
japhb | Zoffix++ # Excellent IRC::Client article | 19:29 | |
dalek | kudo/nom: 1035edb | lizmat++ | src/core/Any-iterable-methods.pm: Fix for RT #128780 - also make .min/.max about 40% faster - rewrite with nqp::ops and iterator - should be much more memory friendly as no longer copying data around |
20:35 | |
synopsebot6 | Link: rt.perl.org/rt3//Public/Bug/Displa...?id=128780 | ||
Zoffix | m: say :2a cmp :3a | 21:02 | |
camelia | rakudo-moar 1035ed: OUTPUT«Less» | ||
Zoffix | m: say :4a cmp :3a | ||
camelia | rakudo-moar 1035ed: OUTPUT«More» | ||
Zoffix | m: say { :3a, :4a }.max | ||
camelia | rakudo-moar 1035ed: OUTPUT«a => 4» | ||
Zoffix | m: say { :4a, :3a }.max | ||
camelia | rakudo-moar 1035ed: OUTPUT«a => 3» | ||
Zoffix | How does it sort pairs by default? | ||
FROGGS_ | in the last two example there is only one pair, no? | ||
m: say { :3a, :4a } | 21:03 | ||
camelia | rakudo-moar 1035ed: OUTPUT«{a => 4}» | ||
Zoffix | Oh. FROGGS_++ | ||
FROGGS_ | m: say { :3b, :4a }.max | ||
camelia | rakudo-moar 1035ed: OUTPUT«b => 3» | ||
lizmat | m: say { :3b, :4a }.max(*.value) | 21:04 | |
camelia | rakudo-moar 1035ed: OUTPUT«a => 4» | ||
lizmat | is probably what you meant ? | ||
Zoffix | I was just wondering what it does when no argument is given to min/max | 21:05 | |
lizmat | it cmps the pairs | 21:07 | |
m: say a => 3 cmp b => 4 | |||
camelia | rakudo-moar 1035ed: OUTPUT«Unexpected named parameter 'a' passed in block <unit> at <tmp> line 1» | ||
lizmat | m: say (a => 3) cmp (b => 4) | ||
camelia | rakudo-moar 1035ed: OUTPUT«Less» | ||
lizmat | m: say (a => 5) cmp (b => 4) | 21:08 | |
camelia | rakudo-moar 1035ed: OUTPUT«Less» | ||
lizmat | infix:<cmp> for pairs is: (a.key cmp b.key) || (a.value cmp b.value) | ||
Zoffix | lizmat++ thanks | 21:09 | |
m: say { :3b, :4a }.minmax | |||
camelia | rakudo-moar 1035ed: OUTPUT«Index out of range. Is: 1, should be in 0..0 in block <unit> at <tmp> line 1Actually thrown at: in any at gen/moar/m-Metamodel.nqp line 3055 in block <unit> at <tmp> line 1» | ||
lizmat | Zoffix: that one I didn't fix yet | 21:10 | |
Zoffix | Hm. What would it return though? | 21:11 | |
m: say ((a => 5) ... (f => 6)) | |||
camelia | rakudo-moar 1035ed: OUTPUT«===SORRY!===Method 'succ' not found for invocant of class 'Pair'» | ||
Zoffix | m: say ((a => 5) .. (f => 6)) | ||
camelia | rakudo-moar 1035ed: OUTPUT«:a(5)..:f(6)» | ||
Zoffix | m: .say for ((a => 5) .. (f => 6)) | ||
camelia | rakudo-moar 1035ed: OUTPUT«Method 'succ' not found for invocant of class 'Pair' in block <unit> at <tmp> line 1» | ||
lizmat | ZoffixL: it would return a Range with a Pair at each endpoint | 21:12 | |
Zoffix | Range with Pair end points doesn't seem to be working. | 21:16 | |
m: say ((a => 5) .. (b => 6))[0] | |||
camelia | rakudo-moar 1035ed: OUTPUT«Method 'succ' not found for invocant of class 'Pair' in block <unit> at <tmp> line 1» | ||
lizmat | Zoffix: yeah, I think it only makes sense to call .min and .max on it | 21:17 | |
dalek | ast: 9b9c39a | (Zoffix Znet)++ | S03-operators/minmax.t: min/max on Hashes RT#128780 |
21:25 | |
synopsebot6 | Link: rt.perl.org/rt3//Public/Bug/Displa...?id=128780 | ||
dalek | kudo/nom: dd0fe7f | lizmat++ | / (2 files): Add optimized min/max/minmax for native arrays - int/num/str arrays - between 15x and 25x as fast as the non-native equivalent |
21:34 | |
ast: 1952a14 | (Zoffix Znet)++ | S03-operators/minmax.t: Remove trailing whitespace |
|||
lizmat | timotimo: so was it a native array you did .min / .max on or not ? | 21:39 | |
timotimo | no | 21:45 | |
wow, 15x and 25x | 21:48 | ||
that's really good | |||
dalek | kudo/nom: 373634e | lizmat++ | / (2 files): Don't need cmp for natives And make the method multi's so that the min/max/minmax(&by) case isi done by the candidates in Any |
22:03 | |
lizmat | will look at Any.minmax tomorrow | 22:04 | |
good night, #perl6! | |||
timotimo | yay | 22:05 | |
MasterDuke | Zoffix: i had tried a whole bunch of stuff, but missed that, thanks | 22:38 | |
i'm getting more useful stuff with that, but i still can't get a .signal to work on anything | 22:40 | ||
travis-ci | Rakudo build errored. Elizabeth Mattijsen 'Don't need cmp for natives | 23:08 | |
travis-ci.org/rakudo/rakudo/builds/148589867 github.com/rakudo/rakudo/compare/d...3634e72766 |