»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_log/perl6 | UTF-8 is our friend! 🦋
Set by Zoffix on 25 July 2018.
atweiden-air m: multi sub abc(Bool:D :abc($)! where .so --> Str:D) { 'got :abc' }; multi sub abc(Bool:D :def($)! where .so --> Str:D) { 'got :def' }; abc(:abc); abc(:def); 00:12
camelia ( no output )
atweiden-air m: multi sub abc(Bool:D :abc($)! where .so --> Str:D) { 'got :abc' }; multi sub abc(Bool:D :def($)! where .so --> Str:D) { 'got :def' }; say(abc(:abc)); say(abc(:def));
camelia got :abc
got :def
atweiden-air m: multi sub abc(Bool:D :abc($)! where .so --> Str:D) { 'got :abc' }; multi sub abc(Bool:D :def($)! where .so --> Str:D) { 'got :def' }; my Bool:D %mode{Str:D} = :abc, :def; %mode.pick.say; say(abc(%mode.pick)); 00:13
camelia abc => True
Cannot resolve caller abc(abc => True); none of these signatures match:
(Bool:D :abc($)! where { ... } --> Str:D)
(Bool:D :def($)! where { ... } --> Str:D)
in block <unit> at <tmp> line 1
atweiden-air anyone know why this is not passing %mode.pick is not matching the signature with :abc or :def above? 00:14
sena_kun give me a second...
m: multi sub abc(Bool:D :abc($)! where .so --> Str:D) { 'got :abc' }; multi sub abc(Bool:D :def($)! where .so --> Str:D) { 'got :def' }; my Bool:D %mode{Str:D} = :abc, :def; %mode.pick.say; say(abc(|%mode.pick)); 00:15
camelia abc => True
got :abc
sena_kun m: multi sub abc(Bool:D :abc($)! where .so --> Str:D) { 'got :abc' }; multi sub abc(Bool:D :def($)! where .so --> Str:D) { 'got :def' }; my Bool:D %mode{Str:D} = :abc, :def; %mode.pick.say; say(abc(|%mode.pick));
camelia abc => True
got :def
sena_kun please note `|` in call.
like, `say(abc(|%mode.pick));`.
atweiden-air ok
thanks
sena_kun the reason is that in a hash you store pairs, so when you pick one, it tries to pass a Pair there 00:16
to pass it as a named argument, you need to "decontainerize" it.
which can be done using `|`. another option will be...
hmm, I am not sure about another option, but I hope that helps. please ask if there is anything unclear. :) 00:18
atweiden-air yes, it does gist.github.com/atweiden/23c881c06...78f5f4c2ab
sena_kun oops, I need to re-learn that... docs.perl6.org/type/Signature#inde...parameters <- docs here say that `|` converts parameter into Capture, which is different from deconteinerization. :( Well, as Capture is a something that represents routine arguments, once again, it converts a Pair into something that might be passed into a routine as a named arg. 00:20
sena_kun memoized hiragana the hard way using drag-n-drop. :) 00:21
atweiden-air was there 00:22
atweiden-air saw flash
sena_kun hehe
well, it was like around two years ago from now, can say it becomes very natural with some practice. atweiden-air just out of curiosity, have you started recently or not so? 00:23
atweiden-air very recently
sena_kun not flash though, but hiragana.
atweiden-air, oh, good luck and I wish you a lot of perseverance. If any advices wanted: wanikani every single day at least twice does a miracle and totally worth it(no, I didn't get paid for this). 00:25
but back to Perl 6, atweiden-air, are you just trying out various stuff from Perl 6 syntax to learn or want some tips on how to make the script less "official"? 00:26
sena_kun probably the first one, but just in case
s/probably/guesses/ 00:27
atweiden-air in this case, i wanted to avoid flash; did it in about 10 mins 00:28
i have some more extensive p6 scripts at github.com/atweiden
sena_kun: thanks for the wanikani recommendation; wish i had heard of it before buying skritter for 2 yrs 00:29
sena_kun atweiden-air, I have no longer studying kanji(though probably have to, lol, but anyway too lazy when can read books and stuff) and hearing first time about skritter service, but I guess anything with SRS and some kanji order presence does the job with enough time investment. Even e.g. Anki. 00:31
s/have/am/
atweiden-air sena_kun: do you have a wanikana promo code by chance 00:38
about to buy lifetime membership i think
sena_kun unfortunately, I don't think so, sorry. :( I have used montly payment and haven't recieved any promo codes. they have a three level trial and I _highly_ recommend firstly go through it fully, to check if that's "your" thing, because an advice of some random person(such as me) over the internet is cool, but everyone is still different. 00:41
sena_kun and it depends on your goals, I think. It doesn't teach you a big about stroke order and handwriting, so if your goal is to recognize && be able to read stuff - that's one thing. If you want to write using pen&paper... Wanikani is not really useful. 00:42
s/big/bit/
ugh, it seems typos and late night are friends. 00:43
atweiden-air suppose i'll go through the free tiers first then 00:47
sena_kun tries to golf the script as much as possible 00:48
Xliff sena_kun: OOOH! I wanna learn Japanese. 01:06
At least enough to be able to listen to it.
sena_kun Xliff, how can I be helpful? :)
Xliff What would be the best tool to use to accomplish that? 01:07
Would Wanikani work for me?
I actually have SOME experience with Hiragana.
Kanji? Not so much.
sena_kun Xliff, well, listening depends on what do you want to listen to. Some cool lectures on hard topics? Some schoolgirls chatting in some random anime? Real-life talking? 01:09
Xliff Anime, mostly. :)
sena_kun Xliff, well... :]
I am here between a golfed script and hexchat, give me a minute please...
Xliff And I know Anime conversations are never like the real thing. 01:10
sena_kun yeah
Xliff LOL! sena_kuuun... always take your time. I can wait.
atweiden-air bbl 01:12
sena_kun o/ 01:13
hmm, well, I guess it's late already and I just cannot write this last piece. :S 01:30
gist.github.com/Altai-man/1555ae3a...0a60b30efd <- not super-short, but I tried. 01:31
I wish I could inline `@map `definition too into previous line, but it seems I miss something about unpacking of positionals. 01:32
and this last `$q. $a` is totally cheating, as in original script it shows an index to user...
Xliff, mind if I pm you? 01:33
Xliff Not at all! :) 01:37
leont Ran into another «Cannot invoke this object (REPR: Null; VMNull)» 01:38
Xliff sena_kun: Shouldn't %HIRAGANA.pick.map be %HIRAGANA.pairs.pick.map? 01:39
sena_kun Xliff, why? 01:40
%HIRAGANA is already a Hash and Hash has pick implemented.
so no need to convert to an array of Pairs, I think.
Xliff Oh! I am looking at the docs and they don't mention pick! 01:41
leont m: class Foo { has &foo = sub { $^foo }; method bar($arg) { foo($arg) } }; Foo.new.bar(42)
camelia Cannot invoke this object (REPR: Null; VMNull)
in method bar at <tmp> line 1
in block <unit> at <tmp> line 1
sena_kun m: my %a = one => 1, two => 2; say %a.pick; say %a.pick; say %a.pick;
camelia one => 1
two => 2
two => 2
Xliff m: %a = ( a => 1, b => 2 ); say %a.pick(2)
camelia 5===SORRY!5=== Error while compiling <tmp>
Variable '%a' is not declared
at <tmp>:1
------> 3<BOL>7⏏5%a = ( a => 1, b => 2 ); say %a.pick(2)
Xliff m: my %a = ( a => 1, b => 2 ); say %a.pick(2)
camelia (b => 2 a => 1)
Xliff So it is!
vrurg Xliff: basically, almost all core methods are defined on Any. pick is very simple an universal: multi method pick() { self.list.pick } 01:50
vrurg Docs are just incomplete, but that's a known problem. 01:51
cpan-p6_ 03cpan-p6_ reporting for duty! [Perl 6] 02git.tyil.nl/perl6/app-cpan-uploadnotifierbot 02:11
sena_kun leont, I know it's probably not what you want, but... 02:21
m: class Foo { my &foo = sub { $^foo.say }; method bar($arg) { foo($arg) } }; Foo.new.bar(42);
camelia 42
sena_kun and `has` usage resulting in `Cannot invoke this object` is probably a bug to be reported at Rakudo repo. 02:22
It may be a reasonable error for some reason I am not aware about, but having a better error message for a case will be very cool. :) 02:23
sena_kun goes afk
SmokeMachine m: class Foo { has &!foo = sub { $^foo }; method bar($arg) { &!foo($arg) } }; Foo.new.bar(42) 03:38
camelia ( no output )
SmokeMachine m: role Foo { my &foo = sub { $^foo.say }; method bar($arg) { foo($arg) } }; Foo.new.bar(42); 03:39
camelia 42
SmokeMachine m: multi trait_mod:<is>(Attribute $attr, :&bla!) {say 42}; role :: { has $.a is bla{;} } 03:42
camelia ===SORRY!===
Cannot invoke this object (REPR: Null; VMNull)
SmokeMachine m: multi trait_mod:<is>(Attribute $attr, :&bla!) {say 42}; class :: { has $.a is bla{;} } 03:43
camelia 42
cpan-p6 03cpan-p6 reporting for duty! [Perl 6] 02git.tyil.nl/perl6/app-cpan-uploadnotifierbot 06:09
jmerelo releasable6: status 06:33
releasable6 jmerelo, Next release will happen when it's ready. 4 blockers. 115 out of 245 commits logged (⚠ 41 warnings)
jmerelo, Details: gist.github.com/44af37ff3548ca64d4...dc4de3739e
jmerelo One blocker less...
m: say Any.cando(coll)
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared routine:
coll used at line 1. Did you mean 'roll'?
jmerelo m: say Any.cando("coll")
camelia No such method 'cando' for invocant of type 'Any'. Did you mean 'can'?
in block <unit> at <tmp> line 1
jmerelo m: say Any.coll 06:34
camelia No such method 'coll' for invocant of type 'Any'. Did you mean any of these?
Bool
all
roll

in block <unit> at <tmp> line 1
Geth doc: 199fa862eb | (JJ Merelo)++ | doc/Language/operators.pod6
Redirects links

And also closes #2524 again. Fixes definition of operators, and does some reflow.
06:47
synopsebot Link: doc.perl6.org/language/operators
doc: cd63d328fa | (JJ Merelo)++ | doc/Type/Any.pod6
Some typo improvements and reflow
synopsebot Link: doc.perl6.org/type/Any
tyil it looks like minion1 goes out of memory whenever cpan-p6 gets hosted on it 07:54
Xliff Will perl6 -e 'use Module' precompile Module.pm6? 09:34
moritz I think so, yes 09:38
pmurias Xliff: without a 'no precompilation' in Module.pm6 it should 09:42
Xliff: if I want to make absolutely sure if precompilation happens I add a say in BEGIN ;) 09:43
Altreus I need vim to recognise when my .t files are in a Perl6 project and act accordingly. Any ideas? 🤔
cpan-p6 New module released to CPAN! XDG-BaseDirectory (0.0.9) by 03JSTOWE 09:48
Ulti Altreus: could maybe do it by what other buffers are open
unless you edit perl 5 and 6 at the same time
Altreus Hmm, seems like teaching a computer how to guess 09:50
tadzik look for a META6.json somewhere up in the directory tree? 09:51
no idea how to do it in vim though
cpan-p6 New module released to CPAN! gtk-glade (0.6.2) by 03MARTIMM 10:20
ufobat_ tadzik, 10:31
there are some issues/PR against your modules 10:33
Shell::Command and ClassX::StrictConstructor 10:35
could you please have a look?
tyil Altreus: add # vim: ft=perl6 at the end of the file 10:53
assixt adds that line automatically to all test files it generates 10:54
tadzik ufobat_: sure thing 11:07
ufobat_ thanks :D tadzik++
a comment on that github.com/tadzik/Shell-Command/issues/20 would be awesome 11:08
i am currently on windows and I am reimplementing those 2 lines over and over again
ZZZzz___ Hello Everybody. Short question about defining a list of hashes containing lists of hashes. This is what I came up with: pastebin.com/XGnECTpV 11:10
When iterating over the hashes in key-list it seems that the whole first hash is taken as a key for the second one. What I intended was that key-list contains two hashes. How do I accomplish that?
tadzik ufobat_: sounds like a good fit imho. It's not a shell command on linux, but from the looks of it it seems to be one on windows :) 11:11
if it makes the module more useful then I'm all for it, to hell with purity :P
ufobat_ woho! \o/
i am not sure what you want to do, ZZZzz___ 11:13
the key-list, is a list, there are no "keys" there are indexes 11:14
ZZZzz___ @list is supposed to be a list of hashes. each of those hashes should hold a list of hashes in key 'key-list'.
ufobat_ ZZZzz___ say @list[0]<key-list>[0]; # numer: 1, name: joe 11:16
aye
@list[0] is a hash, @list[0]<key-list> takes the list again, and then with [0] you get the hash {'number' => 1, 'name' => joe} 11:17
ZZZzz___ but for @list -> %h1 { 11:19
for %h1{"key-list"} -> %h2 {
say %h2;
}
}
yields Type check failed in binding to parameter '%h2'; expected Associative but got Array ($[{:name("joe"), :num...)
ZZZzz___ Seems I am using 'for' incorrectly. for @(%h1{"key-list"}) -> %h2 seems to do the trick! 11:21
Altreus tyil: right on :) 11:22
ufobat_ ahh
Altreus 'cept it didn't work 🤔
tyil works for me
ZZZzz___ and for me
jnthn ZZZzz___: Yes, it's because hash values are considered items, and `for` doesn't iterate an item 11:23
yoleaux 07:51Z <nine> jnthn: niner.name/files/inline-issue/master.log.gz vs. niner.name/files/inline-issue/patched.log.gz
07:54Z <nine> jnthn: To reproduce run: `time perl6 csv-ip5xs.pl < /tmp/hello.csv` from Tux' CSV repository and compare Inline-Perl5's master branch to the inline-demonstration branch (1 commit difference). I do not think that it's JIT related. Feels more like inlining will push the inliner's size over the inline limit and we'd benefit from that much more. Or so.
jnthn ZZZzz___: Another way is to put [] on the end rather than wrapping it up
tyil if you have vim views enabled, it may ignore it on consecutive opens, Altreus
Altreus: you also need to have modeline enabled in vim, which I thought was default 11:24
ZZZzz___ Thank you all very much for your input!
ufobat_ but woudn't it be simple to put a | infront of the %h1<key-list>
?
simpler
Altreus I thought so too 11:25
it might be being overridden by the au I have in my vimrc maybe
but you'd think modeline would win
ufobat_ ZZZzz___, yup for |%h1{"key-list"} -> %h2 { works too 11:26
ZZZzz___ ufobat_, I like this one even better. Thanks!
Altreus hmm I had a BufEnter for *.t that kept breaking my syntax, but even if I use BufRead it still overrides what the modeline says 13:13
cpan-p6 New module released to CPAN! URI-Template (0.0.7) by 03JSTOWE 14:01
ufobat_ who was maintaining zoffix modules? I found a race condition on github.com/zoffixznet/perl6-Temp-Path/issues/7 that I want to fix :) 14:39
lizmat AlexDaniel probably knows 14:40
ufobat_ ty :) 14:42
melezhik Hi! Can I have equivalents or something similar to Ruby mixins in Perl6? - ruby-doc.com/docs/ProgrammingRuby/...dules.html 14:51
MasterDuke melezhik: roles are pretty much the equivalent of mixins 14:53
docs.perl6.org/language/glossary#i...entry-role 14:54
melezhik MasterDuke: , thank you, will take a look
I am reading this - docs.perl6.org/language/objects#Mixins_of_roles 14:55
vrurg melezhik: For special cases you can use .^mixin. It's what is backing 'but', AFAIK. 15:09
andrzejku I want to write an SDL game for kid is it possible to run Perl6 on Android? 15:09
timotimo andrzejku: on the moarvm backend you won't have a jit unless the device is an x86-64, so performance won't be very good i'm afraid 15:14
daxim m: my $r = role { has Int $.x; }; my $foo-thing = Any.new but $r; $foo-thing.^name = 'Foo::some-dynamic-name-under-user-supplied-namespace-Foo'; dd $foo; # how to rebless? 15:20
camelia 5===SORRY!5=== Error while compiling <tmp>
Variable '$foo' is not declared
at <tmp>:1
------> 3-under-user-supplied-namespace-Foo'; dd 7⏏5$foo; # how to rebless?
andrzejku :<
timotimo I remmember you was working on Perl6 SDL
timotimo aye
andrzejku timotimo what's the state now? 15:21
timotimo it works. i don't have a very shiny example but that's only because i'm not good at game development or art :)
andrzejku timotimo ahh 15:23
andrzejku timotimo the problem is that my kid is small 15:23
he is only 3 y old and he have a problem with mouse
has*
but on tablet it is eathier to tap with finger 15:24
timotimo OK, if there is no need for high speed and fast reaction times, that should be totally fine
you could also investigate how well rakudo.js works in the browser of the device you've got 15:26
andrzejku mm yes but as I understand I have to compile moarvm with arm compiler?
timotimo yeah, the android NDK should come with everything you need i'd assume 15:27
andrzejku ok :O 15:27
timotimo when using SDL you'll have to draw every frame manually, but when you have an engine - which in this case can be the browser - you'll only have to do business logic for high-level behaviour and the frame-by-frame work is done by the engine
andrzejku timotimo I am not fan of browser 15:28
it is trap for humanity
timotimo fair enough
sena_kun andrzejku, while unrelated to programming, I have to warn you that screens are not totally safe for children as they increase risk of severe vision issues later in life(while adults are affected less strongly). Running Perl 6 on Android is a great thing on its own thuogh. :) 15:29
timotimo it should be possible to make a gdnative thing to work with rakudo, i.e. use rakudo with godot
andrzejku timotimo well ok :-) I will think about that
sena_kun Ya I heard about that
sena_kun but I was also a display kid I should say that the times and I was playing games is better then to drink vodka 15:30
vodka is much worse than screens 15:31
sena_kun andrzejku, it likely is, just wanted to note as health comes first. :) 15:32
timotimo if your 3 year old would start drinking vodka if you don't let them use the android tablet, i think something might be going wrong %) 15:33
just kidding, of course
andrzejku timotimo :-D
timotimo maybe we have to start work on something like e-paper number games etc. for small kids 15:34
which not damage their vision
andrzejku it helps a lot with learning new things 15:34
timotimo that sounds good 15:40
Voldenet Eh, I hate timezones, especially with historically-changing timezones 16:04
Is there any sane way of providing global override for .local? 16:08
melezhik how can I does for multiple roles? I am reading this - docs.perl6.org/language/objects#Inheritance 16:20
sena_kun `does A does B` 16:21
m: role A {}; role B {}; class C does A does B {};
camelia ( no output )
melezhik thanks
sena_kun yw 16:22
Kaiepi m: use nqp; role A { has $!a; submethod TWEAK(:$!a) { say $!a; } }; role B { method bless(*%args) { (self.CREATE but A).BUILDALL: Empty, %args } }; class C does B { }; say nqp::getattr(C.new(:1a), C but A, '$!a') 16:29
camelia (Any)
1
1
Kaiepi m: use nqp; role A { has $!a; submethod TWEAK(:$!a) { say $!a; } }; role B { method bless(*%args) { (self but A).CREATE.BUILDALL: Empty, %args } }; class C does B { }; say nqp::getattr(C.new(:1a), C but A, '$!a') 16:29
camelia 1
1
AlexDaniel wonders if there was any better way to do it… 16:32
dpk woah
[ptc] omfg
dpk apparently ChanServ isn't aware that you can voice/devoice up to (iirc) four people with one MODE command 16:33
AlexDaniel dpk: it accepts a bunch of nicks but then splits them by itself anyway… weird stuff
Kaiepi am i nuts for writing code like this? hastebin.com/erirevuhas.rb 16:34
AlexDaniel dpk: oh wait, MODE command?
dpk: I mean, there's probably a way to do it… 16:35
dpk i mean the IRC MODE command, not a/the ChanServ MODE command
sena_kun Kaiepi, it depends. If that's "end user" application code, I'd say... Probably. If that is _necessary_ "library-writer-side torture" to do magical things for end user... It depends. And in any way, COMMENT THE MEANING. :)
Kaiepi it's meant for library authors, not end users 16:36
and yeah it definitely needs commenting
sena_kun if you pour in enough comments and documentation for this piece explaning what is happening at all, then it'd be a less nuts, I guess. :) 16:37
lizmat checks her voice 16:38
AlexDaniel lizmat: sounds nice
lizmat :-)
melezhik how to declare class attribute as obligatory? 16:45
sena_kun has $.a is required;
sena_kun m: class A { has $.a is required }; A.new; 16:46
camelia The attribute '$!a' is required, but you did not provide a value for it.
in block <unit> at <tmp> line 1
melezhik thanks sena_kun:
jmerelo m: class A { has $.a is required is rw}; my $new_a = A.new(a=>3); $new_a.a = Nil; 16:51
camelia ( no output )
jmerelo m: class A { has $.a is required is rw}; my $new_a = A.new(a=>3); $new_a.a = Nil; say $new_a.perl
camelia A.new(a => Any)
jmerelo melezhik: so it's compulsory in the sense that you have to provide it when you create the object, but you'll have to check that it's non-null afterwards because the class will not do it for you. 16:52
releasable6: status
releasable6 jmerelo, Next release will happen when it's ready. 4 blockers. 115 out of 246 commits logged (⚠ 41 warnings)
jmerelo, Details: gist.github.com/ae53335dd33cebcd1a...80542b5fde
melezhik jmerelo: sure, thanks for clarification
ufobat_ jmerelo, i think I do understand the 2 issues we were discussing yesterday, just fyi 17:01
one is fixed, the other got an issue now.
github.com/zoffixznet/perl6-Temp-Path/issues/7 17:02
jmerelo ufobat_: great!
ufobat_: suggestion looks OK. You know that that module is now managed by AlexDaniel, right? 17:04
lucs Meep (testing -- what's this devoice thing?) 17:31
Um, so good morning everyone :) 17:32
jmerelo lucs: hi!
ufobat_ jmerelo, yes 18:34
AlexDaniel jmerelo: so I can merge PRs and stuff, but it turns out I cannot transfer repos easily 18:38
that's how personal repos on github work…
b2gills m: class A { has $.a is required is rw}; my $new_a = A.new(a=>Nil); dd $new_a; 18:43
camelia A $new_a = A.new(a => Any)
b2gills m: class A { has $.a is required is rw is default(Nil) }; my $new_a = A.new(a=>Nil); dd $new_a;
camelia A $new_a = A.new(a => Nil)
b2gills m: class A { has $.a is required is rw is default(Nil) }; my $new_a = A.new(); dd $new_a;
camelia The attribute '$!a' is required, but you did not provide a value for it.
in block <unit> at <tmp> line 1
jmerelo AlexDaniel: you can always fork to a new organization. 18:49
AlexDaniel jmerelo: yes but all tickets will remain in the old repo
jmerelo AlexDaniel: Right. My point is that you can probably give ufobat_ a commit bit (if you and him so want, of course) 18:50
AlexDaniel it's OK, I'll probably just ask them to transfer everything…
and until then I can accept PRs just fine 18:51
jmerelo AlexDaniel: good luck. It's a lot of work.
And talking about work...
releasable6: status
releasable6 jmerelo, Next release will happen when it's ready. 4 blockers. 115 out of 246 commits logged (⚠ 41 warnings)
jmerelo, Details: gist.github.com/371c58cc0e91c5ecc1...883ce55cdb
jmerelo So blockers will be blockers, right?
AlexDaniel GH#2623 needs some fixing. GH#2608 needs a decision and maybe some implementation, depending on the decision. GH#2576 is mips-only so that makes it hard. GH#2567 is something you can help with :) 18:54
synopsebot GH#2623 [open]: github.com/rakudo/rakudo/issues/2623 [⚠ blocker ⚠] Intermittent failure when running t/spec/S04-exceptions/fail.t
GH#2608 [open]: github.com/rakudo/rakudo/issues/2608 [⚠ blocker ⚠] Scope flattening and regexes
GH#2576 [open]: github.com/rakudo/rakudo/issues/2576 [⚠ blocker ⚠] flapper in t/06-telemetry/01-basic.t on mips
GH#2567 [open]: github.com/rakudo/rakudo/issues/2567 [⚠ blocker ⚠] Non-zero wait status: 11 in testt
jmerelo AlexDaniel: I do have an AMD64. let me see 18:55
AlexDaniel: it works, but this one is not an AMD, but a i7. Sorry, can't help (unless you mean something else) 19:09
AlexDaniel jmerelo: how many iterations? :)
Kaiepi how can i try to golf a moar malloc panic? 19:15
on HEAD it's using ridiculous amounts of memory when i run one of my bots but i don't know how to find out what's causing it to happen
on 2018.12 it doesn't happen 19:16
moritz I'd go with bisect then 19:17
Kaiepi how do i do that? 19:19
AlexDaniel Kaiepi: how to reproduce this? 19:23
Kaiepi: generally you'd just use `git bisect` but in most cases it's easier to us Whateverable to speed things up
Kaiepi git clone github.com/Kaiepi/p6-PSBot, set up its config, and run it with DEBUG=1 19:24
it panics after about 30 seconds or so 19:25
jmerelo AlexDaniel: I just run the test. It says it's 50.534403825807225x faster 19:38
AlexDaniel jmerelo: it's a flapper according to the OP, so you need to run it many times. Like: while make t/08-performance/99-misc.t; do :; done 19:39
Kaiepi: looking 19:40
jmerelo AlexDaniel: it's going. Different x values, smaller is 52 19:41
AlexDaniel Kaiepi: ohhh I have to register an account, right? 19:42
Kaiepi you don't 19:42
just leave the username and password as null and it'll log in as a guest
AlexDaniel jmerelo: that doesn't matter, it will segfault
jmerelo AlexDaniel: OK, I'll leave it running while this is on. It's been running for a few dozens times without a problem. 19:49
jmerelo AlexDaniel: turning off now. Still going... 20:06
Geth URI-Encode: fed582739e | cfa++ | 2 files
use v6.c, bump version number.
20:13
URI-Encode: 5f4d747d38 | (Aleks-Daniel Jakimenko-Aleksejev)++ (committed using GitHub Web editor) | 2 files
Merge pull request #11 from cfa/v6c

use v6.c, bump version number.
cpan-p6 New module released to CPAN! GDBM (0.0.4) by 03JSTOWE 20:21
AlexDaniel Kaiepi: I'm still on it… it gave me some weird error so I did `zef upgrade` in a hope that it's something about some module, and now I'm waiting and waiting… 20:57
zachk be cool is cpan-p6 put a url/link to the new modules that it notifies to this channel 21:02
AlexDaniel tyil: ↑ 21:03
tyil zachk: link to the repo, or the .tar.gz that got uploaded? 21:04
zachk link to the repo would be nice 21:05
tyil .bots 21:06
cpan-p6 03cpan-p6 reporting for duty! [Perl 6] 02git.tyil.nl/perl6/app-cpan-uploadnotifierbot
tyil I'll add an issue there
to remind myself to add it when I have time
zachk cool :) 21:07
tyil ofc, a link to the repo is only possible if the META6.json contains a src-url
Kaiepi what was the error AlexDaniel ? 21:08
timotimo greppable6: "use HTTP::Response"
greppable6 timotimo, Found nothing!
zachk there is no cpan page?
timotimo i think Pastebin::Shadowcat is missing a dependency 21:09
tyil hmm, I could link to the modules.perl6.org page, so long as I don't have App::CPAN running with an interface yet
timotimo oh? i wonder if that happened when LWP::Simple was replaced with HTTP::UserAgent?
hum 21:13
installing it via "zef install ." somehow made it not fail 21:14
AlexDaniel Kaiepi: ah-ha, ok… so I run `bin/psbot` and it runs… and nothing happens? 21:30
timotimo ^- same
^C10.25user 1.98system 8:20.70elapsed 2%CPU (0avgtext+0avgdata 323080maxresident)k 21:31
i thought perhaps it was still precomping or something
AlexDaniel memory usage is not very low but it's not growing
or at least not growing fast enough to cause any issue
Kaiepi nothing happens?
AlexDaniel yeah there's no output 21:32
Kaiepi oh
did you set the DEBUG env var?
timotimo oh, now i have
AlexDaniel OK, yeah, it's doing something
sauvin What was the mass devoice about?
timotimo what speed of growth are you seeing, Kaiepi? 21:33
AlexDaniel sauvin: sorry for that. +v was used to fight spam on this channel, there is no issue anymore so everyone was devoiced
timotimo i do see it growing slowly 21:34
283 now
284
sauvin AlexDaniel, yea, a common problem.
timotimo 286
AlexDaniel timotimo: yeah I see something like that too, but I think it'll settle at some point 21:35
sauvin AlexDaniel, does this channel have an -ops channel? 21:37
timotimo we don't have anything like that to my knowledge
sauvin I was kinda hoping to huddle with some of the ops to discuss spam mitigation measures. 21:38
AlexDaniel sauvin: there's #perl6-dev but no ops channel
sauvin: is it still an issue? It was quiet for a few days even though the bot was practically not doing anything 21:39
zachk i've seen like two spammers on freenode in the last month and one got banned fast by the freenode auto ban system on spam 21:40
sauvin Spam has been something of a waxing/waning net-wide nuisance for some time now. A number of channels have imposed restrictions in an effort to curtail it, such as requiring identification to nickserv before being allowed to enter the channel. 21:40
(fsov "some time now")
Kaiepi i'm not seeing any atm since i'm not running it on head anymore but it was trying to allocate 1.5GB of memory in 30 seconds 21:43
timotimo
timotimo well, i'm on head, it's now at 311 megabytes 21:45
it surely isn't from precompilation for example, right?
it totally does do its job?
Kaiepi it does
Kaiepi it finishes precomp and starts running before it runs out of memory 21:46
AlexDaniel sauvin: so the way p6bannerbot worked was like this 21:46
sauvin: +m so that only voiced can speak, +z so that ops see messages of those who don't have voice 21:47
sauvin: p6bannerbot bots gived voice like a minute after you join
if you spoke earlier, you're a spammer :) 21:48
pmurias I think the wait time was smaller then a minute 21:48
AlexDaniel 45 seconds
github.com/zoffixznet/perl6-banbot...bot.p6#L29 21:49
pmurias I guess our measures worked mostly because they weren't used network wide
AlexDaniel sauvin: so the assumption is that normal users wouldn't send a message that fast… which was actually correct most of the time. Most.
and yes, pmurias is right 21:50
sauvin I've considered installing a twit filter in my own channel: anybody who utters anything more than X times per minute is a flapjaw and needs to be removed.
AlexDaniel I guess they were banned on other channels and got kicked off the server entirely
but that measure worked extremely well for #perl6
sauvin THere's a bot called sigyn that automatically bans or klines spammers. 21:51
timotimo 314 megs
sauvin I believe it can be invited into the channel. Freenode staff runs it.
AlexDaniel sauvin: it used to be here, I think. It does ban bots very well :D 21:52
timotimo Kaiepi: is heaptrack available on your platform?
sauvin Why is it gone?
pmurias sauvin: I would guess the banning bots part
AlexDaniel I'm not sure. Does it have to be on the channel at all times to do its work?
timotimo i'd expect it to have to be, yeah 21:53
sauvin It can't react to what it can't see.
AlexDaniel mst: so we're curious, where's sigyn?
timotimo i'd expect we have asked for it to be removed? 21:54
it's still online
mst sigyn wanders off after 30 days of no hits
timotimo 316 megs by now
mst any op can re-invite her though
AlexDaniel I see. Thanks! 21:56
Kaiepi heaptrack? 21:57
doesn't look like it
mst AlexDaniel: basically if we get hit again, try a /invite as +o, if that doesn't work, poke me, if *that* doesn't work, cry in #freenode and blame me 21:59
AlexDaniel mst: OK, thanks. fwiw I can also get p6bannerbot back up when needed, it seemed to do its thing for us 22:00
mst yeah, that was a neat hack, I seriously considered using it in #perl
(and I suspect you're right that being weird helped save us, I've seen spambots optimised to e.g. not trigger sigyn if they're started in a particular mode, we just weren't a big enough target to develop mitigations against our defenses) 22:02
(I managed to almost entirely save irc.perl.org from the problem with a different evil trick for much the same reason)
(but now, pubtime)
masak .oO( pub-sub time ) 22:03
masak waves to #perl6 22:04
AlexDaniel mst: thank you for your work
lizmat and another Perl 6 Weekly hits the Net: p6weekly.wordpress.com/2019/01/21/...-youtubed/ 22:11
AlexDaniel oh wow, that youtube video 22:15
lizmat++
(Derek Banas)++ for the video, of course :)
hahainternet ooh worth a watch 22:16
and thanks lizmat p6weekly is always an enjoyable read
timotimo it went down to 304 megs 22:23
timotimo or maybe a little bit was swapped out 22:23
pmurias lizmat++ # always awesome to see what people have been up to 22:25
zachk perhaps garbage collection kicked in a bit? I have seen that before with other languages 22:37
cpan-p6_ 03cpan-p6_ reporting for duty! [Perl 6] 02git.tyil.nl/perl6/app-cpan-uploadnotifierbot 22:37
timotimo well, we do have a garbage collector 22:38
Kaiepi i'll check and see if it still happens on HEAD 22:49
Kaiepi MoarVM panic: Memory allocation failed; could not allocate 728748032 bytes 23:02
like 5 seconds after the bot started 23:03
zachk can we set heap sizes for the moarvm?
Kaiepi i tried using upping it with ulimit but instead of panicking it ground my computer to a halt 23:13
timotimo mhh 23:14
can you turn off spesh to see if it has anything at all to do with that?
cpan-p6_ New module released to CPAN! TAP (0.0.7) by 03LEONT 23:15
Kaiepi tried that 23:19
didn't help
timotimo your BSD has some pretty advanced tracing stuff, right?
dtrace or something?
Kaiepi timotimo, i tried using ktrace and for some reason it *doesn't* panic while i'm running it 23:33
timotimo ha 23:34
fantastic
El_Che In what world do we live in where ktrace does not panic? Doesn't anyone think of the children? 23:43
Kaiepi 77662 mmap calls and 370558 futex calls from moar over the 30 seconds i had the bot running 23:51
is that bad?
that's all that stood out from the logs 23:52
timotimo futex calls could come from locking/unlocking sockets perhaps? though that probably doesn't happen with async sockets, though they do use the message queue to transfer received/sent message data to the user code threads 23:53
the mmap calls could be any number of things, including the jit acquiring memory to put bytecode into 23:54
and any individual allocation that's "too big", like probably the bigger pages of the gen2 as well as the Fixed Size Allocator