🦋 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.
japhb Anyone have any idea how to create and display a new window in GTK::Simple? I'm feeling like an idiot because the obvious things are very much not working for me, but there aren't any examples that spawn a new window in Raku code (11-file-chooser-button.pl6 opens a new window, but it happens in C code) 00:39
rypervenche japhb: What do you mean it happens in C code? 01:29
japhb rypervenche: It's builtin (C-level) GTK+ functionality of the gtk_file_chooser_button to open a gtk_file_chooser when clicked, not something wired up in the Raku code of GTK::Simple 01:48
SmokeMachine Voldenet: www.irccloud.com/pastebin/Il7vS6Hs/ 04:12
SmokeMachine Voldenet: this is working as expected: github.com/FCO/EventExpressionLang...t-knocking 04:36
Geth doc: eb754a2b3c | (JJ Merelo)++ | doc/Language/variables.pod6
Revision and reindexing #2632
07:01
doc: c7c185394b | (JJ Merelo)++ | 2 files
Revision and reindexing #2632

Eliminates the word "container" in the variables file, since constants are defined in "terms" as variables with no container.
linkable6 Link: docs.raku.org/language/variables
Geth doc: ba52a17d3d | (JJ Merelo)++ | doc/Language/terms.pod6
Revision of constant constraints #2632

Mostly reflow, since everything was there already (thanks @zoffix)
linkable6 DOC#2632 [open]: github.com/Raku/doc/issues/2632 [Hacktoberfest][RFE][big][docs][good first issue][help wanted][new][⚠ Top Priority ⚠] Checklist for 6.d
linkable6 Link: docs.raku.org/language/terms
El_Che hopefully he'll return some day 07:13
jmerelo El_Che: zoffix? I don't think so. For the foreseeable future, at least 07:14
tellable6 2020-02-20T20:17:35Z #raku <tbrowder> jmerelo: sorry about the news...
2020-02-20T21:36:10Z #raku <patrickb> jmerelo: Is there a way to find out why we were rejected at this years GSoC? That'd be really good to know.
2020-02-20T21:36:42Z #raku <patrickb> jmerelo: Was the TPF organization deleted? When I try to log in with my google account it says I'm not part of any organization anymore...
jmerelo .tell patrickb, no, no way that I know of. And yes, the organization has been deleted for me too; it returned a 403. 07:15
tellable6 jmerelo, I'll pass your message to patrickb
jmerelo releasable6: status 08:41
releasable6 jmerelo, Next release in ≈1 day and ≈10 hours. There are no known blockers. 163 out of 247 commits logged
jmerelo, Details: gist.github.com/81970e56864179f595...86bd98f47e
jmerelo .tell Altai-man great job!
tellable6 jmerelo, I'll pass your message to Altai-man_
nwc10 OK, I (technically $ork, written by $other) have a long running process that seems to slowly eat all the RAM. It *looks* like I can use the snapper module to tell it to periodically take heap snapshots (eg once an hour) - but I can't find any example docs to "steal". Where should I be looking? 09:25
jmerelo nwc10 it's part of Telemetry: docs.raku.org/type/Telemetry#module_snapper 09:28
nwc10 jmerelo: yes, and *that* doesn't seem to have many docs either 09:28
nwc10 aha, at least, not in the repository. 09:29
jmerelo nwc10: what you see is what you get, I'm afraid... Please raise an issue requesting an enhancement
lizmat nwc10: RAKUDO_SNAPPER=3600 raku -Msnapper your program ? 09:38
nwc10 cool, that's what I thought might well do the job
(was distracted by actual $ork)
but I have to
1) figure out where the CWD is
2) figuure how how to do this when it's currently run from a systemd unit
and *then* I have to figure out what to do to process heap snapshots 09:39
lizmat well, snapper doesn't take heap snapshots, it just queries some system parameters in a separate thread and writes them to STDERR
nwc10 jmerelo: I had gone quiet because your link to docs.raku.org looked like it might give me enough clue to figure something out
lizmat it is really simple, almost braindead 09:40
nwc10 hangon, confused by that last statement. I *thought* that I'd figured it out as the snapper module calls Telemetry::snapper, and in turn that creates a thread tha calls Telemetry::snap (at the regular interval) and *that* takes snapshots 09:41
and in turn, snapper (the module) can be controled from the environment. But *only* the interval (which is what matters most) 09:42
the basic question I'm trying to answer is "is this memory consumption from
1) a but in the code which is keeping objects around?
lizmat yeah, so it's nothing like the snapshot module that Timo is working on, is what I'm saying 09:43
nwc10 2) a problemetic interaction with the MoarVM GC, such that the amound of system memory grows, but the GC doesn't actually leak anything
or
3) a real leak
"
we've eliminated answer 0 - "bad reaction to something it's talking to" 09:44
ie it's slowly eating RAM, not geting upset by something and (figuratively) expoding
exploding
lizmat can you not rule out 2. by running on ulimit something ?
nwc10 lizmat: I think I understand the question, and I don't think so. Left to run, this process eats all RAM on the VM in about 2 or 3 days 09:45
lizmat and will it die then because of OOM ? or will it continue to run ? 09:46
nwc10 it does because of OOM
the OOM killer takes an unhealthy interest in it
so I'm asuming that ulimit will just mean something else kilsl it first 09:47
although, I see, that might be itneresting because it might give a backtrace of *where* the failed allocation was
but first, apart from $ork, my coffee cup has a bug that I need to fix. 09:49
Geth doc: jsoref++ created pull request #3225:
Spelling
10:31
Geth doc/master: 5 commits pushed by (Josh Soref)++, (Juan Julián Merelo Guervós)++ 10:52
Voldenet SmokeMachine: that's fairly cool, I'll maybe try to write an actual port knocking solution with that, just to see how short would it be :) 11:11
Geth rakudo.org: 2b6fb4dd16 | (Naoum Hankache)++ (committed using GitHub Web editor) | templates/star.html.ep
Update some links
12:04
discord6 <Highlander> How does one check what type restriction is on a container? 14:18
jnthn m: my Int $a; say $a.VAR.of 14:19
evalable6 (Int)
discord6 <Highlander> Thanks
<Highlander> Ah, so VAR gets the Scalar 14:20
<Highlander> makes sense
guifa Not that if using a where clause that might fail 14:21
Well, it doesn’t fail, it just doesn’t get you very useful information
m: my $a where Int|Str = 4; say $a.VAR.of 14:22
evalable6 (<anon>)
guifa . o O ( yet another reason to prefer subtypes to where clauses )
errr subsets*
[Coke] jnthn++ # finally able to run a full "make xtest" in doc again. 14:27
discord6 <Highlander> Another somewhat more complex question about subroutine calling: say I have my $a = 1 -- $a.VAR.of is (Mu), fine 14:28
<Highlander> but then if I pass that into sub test(Int $param) { say $param.VAR.of; } it tells me Int doesn't have an "of" method 14:29
jnthn Yes, because there's no container there, the Int is bound directly into $param 14:30
discord6 <Highlander> Oh? I was under the impression it was just a readonly container
jnthn You'd need `Int $param is copy` to insist on that
A readonly container is created if the thing is Iterable and would flatten when it shoudln't, otherwise it optimizes that way and just binds the value 14:31
*away
discord6 <Highlander> Fair enough 14:32
jnthn (Which in some programs saves a non-trivial percentage of allocations...)
discord6 <Highlander> Yeah, I could see direct binding being a big gain there 14:33
Geth doc: 54843fdae3 | Coke++ | xt/words.pws
learn new class

Allow simple plural - it's clear from formatting Supply is a class name we aren't going to dynamically change spelling on
14:34
pmurias MasterDuke: I have started working on getting the truffle backend to work on the new graalvm 14:48
MasterDuke pmurias: nice!
pmurias MasterDuke: got to refactor some stuff as they enforce a separation between the language implementation and the launcher (In our case that would be the part running on the old backend) 14:49
MasterDuke hm, is that a good thing for us in the long run anyway? i.e., will it help with eventually making the truffle backend the primary/only jvm backend? 14:50
pmurias in the long run we want our backend to be registered the same way all the other truffle languages are 14:52
so they can eval Raku code using the same API as they use for JS and TruffleRuby
MasterDuke yeah, that would be nice 14:53
pmurias but in the short run the truffle NQP isn't yet bootstrapped so we use a workaround where we parse on the old backend
discord6 <もふもふいつ撫でも (Mofu MOFO)> I am not complaining, friends, but I am curious. I once caught wind that hawtness related to vastly improving performance in Perl6 is somewhere down the pipe. Is this gonna be reality someday? I am excite. 16:30
Altai-man_ have you seen www.youtube.com/watch?v=QNeu0wK92NE ? 16:32
there are new releases montly and each one packs numerous "Make Foo.bar baz percents faster". Also some heavy VM optimizations are work in progress, some of them will be included in 2020.03 release (hopefully). 16:33
discord6 <もふもふいつ撫でも (Mofu MOFO)> As long as it'll eventually be as fast as Ruby, das all I want. I am very entitled human being who demands things I didn't pay for to be gr8. 16:36
Altai-man_ as the report states, some things are _already_ faster/on par with ruby, some are not there yet, so one might hope (and help). :) 16:37
Doc_Holliwood Another great day in Apple Support. Now for the interesting stuff in life :) 16:41
Doc_Holliwood This tweet: twitter.com/jjatria/status/1230554758215155713 we should adopt that and use it as a motto / marketing ploy 16:44
"Raku, the language you never knew you always wanted", that's just poetic
discord6 <もふもふいつ撫でも (Mofu MOFO)> I wonder how long it's going to take for me to stop calling it Perl6. 16:45
Doc_Holliwood maybe it helps getting rid of the 6 in your name? 16:47
discord6 <もふもふいつ撫でも (Mofu MOFO)> I mean, I could do it now. But it wouldn't be coming from the heart.
<もふもふいつ撫でも (Mofu MOFO)> I dunno mang, this is what my username looks like: i.imgur.com/osAP3k1.png 16:49
Grinnz it's the discord bridge that has 6 in the name
discord6 <もふもふいつ撫でも (Mofu MOFO)> This Bridge guy has so many personalities.
Altai-man_ >Russian locale 16:50
surprising
Doc_Holliwood Are you one of those russian hackers they talk about in the news all the time, Grinnz? 16:51
discord6 <もふもふいつ撫でも (Mofu MOFO)> Vodka joke goes here.
Grinnz I'm only like, 1/16th russian
Altreus hmm that's less than roulette 16:52
discord6 <もふもふいつ撫でも (Mofu MOFO)> is there any way to do something like perl my \Х = 3; my \У = 8; my \Й = 11; say ( X²+Y²=Й² ); ? 17:00
lizmat m: my \Х = 3; my \У = 8; my \Й = 11; say Х²+У²==Й² # if you consistently use the right characters, and use == instead of =, then yes 17:03
evalable6 False
jmerelo After the GSoC upset, we've still got to try outreachy. Please submit your ideas here github.com/perl-foundation-outreac...2020-ideas 17:11
Doc_Holliwood Does this leak? gist.github.com/holli-holzer/74caa...646edcdf43 17:13
i guess not, but ...
tyil Doc_Holliwood: discord6 is the name of a bot which bridges this channel to a channel on discord 17:35
I guess I *should* change the nickname sometime soon
rypervenche Consistency <3 17:39
tyil jmerelo: I haven't paid a lot of attention lately, what happened with gsoc?
you may pm or email if thats more convenient
lizmat TPF was not selected for GSOC 17:41
tyil :(
Doc_Holliwood i'm tired of writing %% 2 18:10
can i have .even and .odd please?
sena_kun Doc_Holliwood, sure! *jokes about sub even / sub odd* 18:13
sena_kun m: my &foo = method(Int:D $a --> Bool) { $a %% 2 }; say 43.&foo; 18:14
evalable6 (exit code 1) 04===SORRY!04=== Er…
sena_kun, Full output: gist.github.com/f4db6fbc7e8479d475...fca63308da
sena_kun hm
m: my &foo = method { self %% 2 }; say 43.&foo; say 42.&foo; 18:15
evalable6 False
True
sena_kun shorter one wins. :P
m: my &foo = * %% 2 ; say 43.&foo; say 42.&foo; 18:16
evalable6 False
True
Doc_Holliwood I know you can do that. That's not the point.
sena_kun Doc_Holliwood, I got your point, but while not being core dev, I somehow can't say I appreciate the idea of making CORE fatter. 18:17
Doc_Holliwood The only way to enhance a builtin type is monkeypatching it, yes? 18:19
sena_kun Doc_Holliwood, but / does role also?
Doc_Holliwood and thus code that does that cannot be precompiled, right?
sena_kun m: '1 %% 2'.chars.say; '1.is-even'.chars.say; 18:20
evalable6 6
9
sena_kun m: '(1 %% 2)'.chars.say; '1.is-even'.chars.say;
evalable6 8
9
Doc_Holliwood Yeah, but then you have to write it out everywhere like here: gist.github.com/holli-holzer/74caa...646edcdf43
sena_kun is not sure if right gist 18:21
Doc_Holliwood 1 but Linked
sena_kun ah, I see
I still don't get it. Typing `is-even` is slower / requires more keystokes than `%% 2` even with parens on. 18:22
Doc_Holliwood m: role foo { method bar { say "bar" } }; subset FInt of Int does foo;
evalable6 (exit code 1) 04===SORRY!04=== Error while compiling /tmp/eBPqH3ePIO
No such method 'add_role' for invocant of type 'Perl6::Metamodel::SubsetHOW'
at /tmp/eBPqH3ePIO:1
Doc_Holliwood german keyboards are horrible, let me put it this way
sena_kun you might argue that `()` keys are more distant than letters
Doc_Holliwood also the shift key 18:23
m: role foo { method bar { say "bar" } }; class FInt is Int does foo {}; 18:24
evalable6
Doc_Holliwood m: role foo { method bar { say "bar" } }; class FInt is Int does foo {}; FInt(99).bar;
evalable6 (exit code 1) Cannot find method 'FInt' on object of type Int
in block <unit> at /tmp/dEfwwv0d6H line 1
Doc_Holliwood m: role foo { method bar { say "bar" } }; class FInt is Int does foo {}; FInt.new(99).bar;
evalable6 bar
Doc_Holliwood that's not pretty either 18:25
lizmat Doc_Holliwood: get a US Intl keyboard :-) 18:54
Doc_Holliwood I'm confused enough by using a Mac at day and a PC at night, liz =) 18:56
discord6 <もふもふいつ撫でも (Mofu MOFO)> My life is using all mac as my portable workstation, winderp with WSL at home, SSH-ing into servers all day-everyday, and then using NetBSD's pkgsrc all day everyday on Linux and especially macOS. AKA, all the same shit if I have a POSIX shell and can open a web browser to look at catgirls 19:01
Geth ¦ problem-solving: lizmat assigned to jnthn Issue $*CWD is an IO::Path, IO::Path.CWD is a Str github.com/Raku/problem-solving/issues/164 20:34
SmokeMachine Hi guys! I was thinking... there is a big difference between EEL and regexp is that if I do this `/"a" "a" "a"/` it matches "aaa" and do not matches "aaba" but with EEL, if I do `bla() bla() bla()` would match this sequence `{"type" : "bla"}{"type" : "bla"}{"type" : "bla"}` but also would match this sequence `{"type" : "bla"}{"type" : "bla"}{"type" : "ble"}{"type" : "bla"}` it would ignore the `ble` one... so I'm 21:20
thinking on doing something like: `:!ignore`. and it could receive condition, for example: `:!ignore(bla(a == #1.a)) bla(#1, b == 1) bla(a == #1.a, b == 1)` that way, it would match `{"type" : "bla", "a" : 42, "b" : 1 }{"type" : "bla", "a" : 42, "b" : 1 }` and `{"type" : "bla", "a" : 42, "b" : 1 }{"type" : "bla", "a" : 42, "b" : 2 }{"type" : "bla", "a" : 42, "b" : 1 }` but not `{"type" : "bla", "a" : 42, "b" : 1
}{"type" : "bla", "a" : 42, "b" : 2 }{"type" : "bla", "a" : 42, "b" : 1 }`. But I don't think `ignore` is the right name for it... what do you guys thing?
Voldenet: ^^
[Coke] yays as he gets to use a little Raku for a small work project. 21:39
rypervenche [Coke]: Woot woot! 21:44
Xliff What would be the best way to resolve this? 22:25
m: role A { submethod BUILD (:$a) { say "A" } }; role B { also does A; submethod BUILD (:$b) { say "B" } }; class C does B { }; C.new
evalable6 (exit code 1) 04===SORRY!04=== Error while compiling /tmp/v_517kM0wL
Package 'B' already has a submethod 'BUILD' (did you mean to declare a multi-method?)
at /tmp/v_517kM0wL:1
Xliff m: role A { submethod BUILD (:$a) { say "A" } }; role B { submethod BUILD (:$b) { say "B" } }; class C does B does A { }; C.new 22:26
evalable6 (exit code 1) 04===SORRY!04=== Error while compiling /tmp/ViCJryQeYE
Method 'BUILD' must be resolved by class C because it exists in multiple roles (A, B)
at /tmp/ViCJryQeYE:1
Xliff m: role A { submethod BUILD (:$a) { say "A" } }; role B { submethod BUILD (:$b) { say "B" } }; class C does B { also does A }; C.new
evalable6 (exit code 1) 04===SORRY!04=== Error while compiling /tmp/eFSAPiFHek
Method 'BUILD' must be resolved by class C because it exists in multiple roles (A, B)
at /tmp/eFSAPiFHek:1
Xliff Tricky because I sometimes have need for an object to be created from either role A or role B. A few objects must do both for functionality's sake. 22:27
xinming in Proc::Async.new: blabla 22:29
my $sed = Proc::Async.new: 'sed', '-e', 's/xxx/yyy/g'; $sed.bind-stdin($*IN); await $sed.start; <--- How can this promise to be Kept when the $*IN is closed by external program? Or, what is the right way to close the $*IN ? 22:30
hmm, Ignore me, this example works, the problem is, when I add something like $sed.stdout.lines.map(...) broke the code 22:33
the $sed.stdout.lines.map(...) will hang the script, what caused that please? 22:34
jnthn I'd need to see how you're consuming that supply to help 22:36
xinming my $sed = Proc::Async.new: 'sed', '-e', 's/xxx/yyy/g'; $sed.bind-stdin($*IN); $sed.stdout.lines.map({ $_ }); await $sed.start; 22:37
jnthn: I changed $sed.stdout.lines... to $sed.stdout.tap(-> $_ { ... }); worked fine. 22:38
I just curious why with stdout.lines will pause the script.
jnthn Because you don't consume the data 22:40
And it won't fire the process exit supply until the stdout/stderr were cosumed
Otherwise you could easily get data loss
Sorry, process exit *promise* 22:41