🦋 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.
00:07 pecastro left 00:48 natrys left 00:55 japhb left, japhb_ joined 00:56 dotdotdot joined 01:11 kvw_5 joined 01:12 dataangel left, dataangel joined 01:14 kvw_5_ left 01:30 japhb_ left 01:32 japhb joined 01:34 lucasb left 01:48 aborazmeh joined, MasterDuke left
timotimo so, how do we take a heap snapshot at the time a "too many open files" error occurs and grab the paths to all objects that hold on to a file descriptor? 01:58
additionally / alternatively: grab a stack trace every time a file is opened and hang it off the object that holds on to the fd 01:59
another alternative, just dump stack traces whenever a file descriptor gets created period. figure it out post-mortem from printf to stderr from during the run 02:00
02:00 db48x joined 02:06 Manifest0 left, Manifest0 joined 02:27 agentzh joined 02:51 japhb left 02:53 japhb joined 03:16 neshpion left, DiffieHellman left 03:17 aborazmeh left, DiffieHellman joined 03:33 wingfold left 03:34 wingfold joined 03:38 wingfold left 03:53 wingfold joined 03:57 wingfold left 04:00 [Sno] joined 04:01 sno left 04:03 wingfold joined 04:08 sivoais joined 04:12 wingfold left 04:23 wingfold joined 04:28 wingfold left 04:31 brtastic joined 04:55 wingfold joined 05:02 wingfold left 05:13 parv joined 05:15 wingfold joined 05:20 wingfold left 05:31 wingfold joined 05:36 wingfold left 05:50 wingfold joined 05:57 jmerelo joined, wingfold left
jmerelo releasable6:status 05:58
releasable6 jmerelo, Next release will happen when it's ready. 3 blockers. 0 out of 178 commits logged (⚠ 1 warnings)
jmerelo, Details: gist.github.com/6b1774952ef803bd6c...dbda24a340
06:06 softmoth left 06:11 wingfold joined 06:16 wingfold left 06:18 parabolize left 06:28 wingfold joined 06:32 wingfold left 06:34 zxcvz joined 06:44 wingfold joined 06:48 wingfold left, |oLa|1 joined 06:51 |oLa| left 07:13 wingfold joined 07:15 stux|RC-only joined 07:17 wingfold left 07:20 stux|RC joined 07:23 stux|RC-only left 07:24 asymptotically joined 07:26 stux|RC left 07:28 stux|RC-only joined 07:30 wingfold joined 07:32 wamba joined 07:37 wingfold left 07:40 wingfold joined 07:45 wingfold left 07:47 stux|RC joined 07:57 wingfold joined, bdju left 08:01 wingfold left 08:08 linkable6 left 08:09 bdju joined 08:11 linkable6 joined 08:20 asymptotically left 08:25 hakonhagland joined 08:27 wingfold joined 08:28 MasterDuke joined 08:34 wingfold left 08:36 linkable6 left 08:38 linkable6 joined 08:41 wamba left 08:47 wingfold joined 08:50 wamba joined 08:52 wingfold left 08:55 aborazmeh joined 08:56 rindolf joined 09:07 wingfold joined 09:12 wingfold left 09:21 jmerelo left 09:26 wingfold joined 09:28 domidumont joined 09:30 wingfold left 09:31 Sgeo left 09:33 _jrjsmrtn joined 09:34 __jrjsmrtn__ left 09:43 wingfold joined 09:49 wingfold left 09:51 jmcgnh left 09:56 jmcgnh joined 10:04 natrys joined 10:07 patrickb joined 10:10 wingfold joined 10:18 wingfold left 10:27 wingfold joined 10:29 wingfold left 10:30 wingfold joined 10:44 brtastic left 11:03 patrickb left 11:08 [ptc] left 11:33 aborazmeh left 11:47 aborazmeh joined 11:57 hakonhagland left 12:04 asymptotically joined 12:08 wingfold left 12:09 wingfold joined 12:13 wingfold left 12:23 [Sno] left 12:27 wingfold joined 12:34 wingfold left 12:36 tejr left 12:37 tejr joined 12:46 wamba left 12:47 wingfold joined 12:51 wingfold left 13:02 wamba joined 13:03 wingfold joined 13:05 frost-lab joined 13:07 sno joined, wingfold left 13:16 sno left 13:17 kurahaupo_ left, wingfold joined, domidumont left 13:18 sno joined 13:21 b2gills left 13:27 kurahaupo joined 13:42 parabolize joined 13:47 MasterDuke left 13:51 wingfold left 13:53 wingfold joined 13:55 MasterDuke joined 14:00 wingfold left 14:01 wingfold joined, b2gills joined 14:19 lucasb joined 14:40 frost-lab left 14:45 softmoth joined 14:59 aborazmeh left 15:00 brtastic joined 15:09 pecastro joined 15:46 mowcat joined 15:48 mowcat left 15:53 parv left 16:07 kurahaupo left 16:08 kurahaupo joined 16:16 domidumont joined 16:34 domidumont left 16:36 rouking joined
rouking I need to build a tree structure where each layer alternates between one of four types. These types do share a common role, but the issue is I need to instantiate children inside the parent, which means using the actual class and not just the role, creating a circular dependency 16:37
I'm wondering if there's a better way to resolve this problem than moving everything into one file and creating stubs 16:38
16:48 brtastic left 16:59 wamba left 17:02 asymptotically left 17:03 swaggboi left, Sgeo joined 17:15 natrys left 17:16 domidumont joined 17:22 brtastic joined 17:25 domidumont left 17:26 domidumont joined 17:28 kybr joined
kybr what's a better way to do this? gather for ((1,2,3) X* (4,5,6)) -> $a, $b, $c { take ($a, $b, $c) } 17:29
guifa rouking: hmm, so one thing I’ve done in the past is to have the children “register” themselves in some way with the parent 17:33
tio.run/##ZY7BboMwEETv/oqRqtxajj2A...V/W7ps4/gL
m: say ((1,2,3) X* (4,5,6)).batch(3) 17:35
camelia ((4 5 6) (8 10 12) (12 15 18))
guifa kybr: ^^
kybr .batch ! thank you.
guifa or rotor, too 17:36
batch $x == rotor $x, :partial
kybr is there a more linear algebra way? just curious. this is fine.
guifa you mean by using the named variables? The only other thing I can think of off the top of my head would be 17:40
m: say gather for ((1,2,3) X* (4,5,6)) { take ($^a, $^b, $^c) };
camelia ((4 5 6) (8 10 12) (12 15 18))
kybr ahh, ok 17:41
guifa but if I misunderstood I can try to think of something else, I’m not a huge math geek but I can hack some decent stuff together in Raku ^_^ 17:43
kybr i was trying my hand at making a little tool for analyzing number series as they describe here: getpocket.com/explore/item/how-a-s...ket-newtab 17:47
my @arithmetic = 2, 2 + (3 * 1), 2 + (3 * 2) ... *;
my @geometric = 2 * 3**0, 2 * 3**1, 2 * 3**2 ... *;
(@arithmetic[^6] X+ @arithmetic[^6]).Set.elems; 17:48
(@arithmetic[^6] X* @arithmetic[^6]).Set.elems;
turns out i don't need to un-flatten the list coming out of the X. 17:49
17:50 domidumont left 18:04 zxcvz left
tadzik m: sub if ( \if ) { say if; }; my \if = 42; if( if) if if # twitter.com/b2gills/status/1383841825954287622 18:06
camelia 42
tadzik kek
m: sub if ( \if ) { say if; }; my \if = 42; if(if) if if # hmm 18:07
camelia 42
tadzik m: sub if ( \if ) { say if; }; my \if = 42; if if if if # hmm!
camelia 5===SORRY!5=== Error while compiling <tmp>
Missing block
at <tmp>:1
------> 3if ) { say if; }; my \if = 42; if if if 7⏏5if # hmm!
tadzik aww :(
b2gills It breaks if you add any spaces where there isn't any
m: sub if ( \if ) { say if; }; my \if = 42; if( if ) if if
camelia 5===SORRY!5=== Error while compiling <tmp>
Unable to parse expression in argument list; couldn't find final ')' (corresponding starter was at line 1)
at <tmp>:1
------> 3y if; }; my \if = 42; if( if 7⏏5) if if
tadzik right
b2gills m: sub if ( \if ) { say if ; }; my \if = 42; if( if) if if
camelia 5===SORRY!5=== Error while compiling <tmp>
Unsupported use of bare "say". In Raku please use: .say if you meant
to call it as a method on $_, or use an explicit invocant or argument,
or use &say to refer to the function as a noun.
at <tmp…
tadzik still, fun :)
18:20 mowcat joined 18:43 Geth left 19:05 mowcat left 19:07 rir joined 19:18 rir left 19:39 patrickb joined 19:45 mowcat joined 19:50 wamba joined 19:59 asymptotically joined 20:19 patrickb left 20:23 swaggboi joined
samcv Hi everyone. Just wanted to announce that the PaperCall for the 2021 Perl and Raku Conference is open. So far we only have 1 Raku talk, and we would really love if we got more submissions from the Raku community. Thanks www.papercall.io/tprcic21 20:35
kybr link to an example of defining my own hyperoperator?
codesect` If I have some non-Seq Iterable and call .grep/.map/etc, is there any way to turn it back into whatever type it was before? 20:36
e.g., if I know it was an Array, I can call .Array
(same if I knew it was a List, I could call .List). But what if I don't know? Is there a "collect this back to what it was" method I'm missing somehow? Or, alternately, is there a way to grep/map over a List/Array without losing their current type? 20:41
ugexe m: my List $a := (1,2,3,4); my Array $b := [5,6,7,8]; say $a.grep(*.so)."{$a.^name}"().WHAT; say $b.grep(*.so)."{$b.^name}"().WHAT; # probably the best you can do
japhb codesect`: .= grep?
camelia (List)
(Array)
codesect` ugexe: that's what I currently have, but it felt a little gross so I thought I'd ask. (well, actually, what I cave is even worse, because I had "$a.WHAT.raku()"() - at least your suggestion avoids the second call) 20:44
ugexe for it to just turn back into the original type would imply everything that can be iterated over knows how to create a collection of itself 20:45
codesect` japhb: that's a good idea in general. In the particular instance I'm dealing with, I don't want to assign to the variable 20:46
ugexe List is immutable
codesect` also that :) 20:47
japhb Heh 20:48
codesect` ugexe: yeah, fair point re: Iterables not knowing how to create collections of themselves. I guess I was imagining it being possible in a single-line call; with e.g., `my List $a = (1, 2, 3); my $b.grep(* %% 2).collect;` it doesn't seem like an _impossibility_ for $b to know that it should collect into a List without positionals having to know all the time 20:51
but it'd definitely require some special casing, and I can see why we don't 20:52
ugexe i dont see how $b would communicate its original type through the underlying sequence
i would expect that would require something like perls 20:53
'wantarray' which is impossible in raku afaik
codesect` I guess I was imagining some sort of special-casing of grep/etc so that it wouldn't return a Seq in some situations. But that'd certainly be harry - and maybe not even possible 20:55
El_Che wasn't wantarray the reason of the perljam rant at the CCC?
codesect` As I said, I can see why we don't
m: sub f(\x) { say x.WHAT }; f(do for (1, 2).List {$_}); f(do for [1, 2].Array {$_}) 21:01
camelia (List)
(List)
codesect` I guess I _am_ kind of surprised that there's not a way to have the second of those calls build itself back into an Array - many of the same points apply, of course, in that it'd still need to "remember" the pre-iteration type 21:03
but it somehow feels like it should be easier to do so when there aren't any Seqs involved. But I'm not sure why 21:04
ugexe m: my List $a := (1,2,3,4); my Array $b := [5,6,7,8]; my $aa = $a.WHAT.new: $a.grep(*.so); my $bb = $b.WHAT.new: $b.grep(*.so); say $aa.WHAT; say $bb.WHAT 21:13
camelia (List)
(Array)
ugexe this is at least slightly less worse 21:14
21:17 asymptotically left
codesect` oh, that is a bit better 21:18
ty
21:18 oneeggeach joined 21:26 codesect` left 21:27 codesections joined 21:34 aborazmeh joined 21:42 rindolf left, wingfold left, wingfold joined 21:43 wingfold left 21:44 wingfold joined 21:45 wingfold left, wingfold joined 21:46 wingfold_ joined, wingfold left 21:47 wingfold joined, wingfold_ left, wingfold left, wingfold joined 21:48 wingfold_ joined, wingfold left 21:49 wingfold joined, wingfold_ left 21:50 wingfold left, wingfold joined 21:51 wingfold left, wingfold joined 22:03 amber1 joined 22:05 amber1 is now known as kiti_nomad, kiti_nomad left 22:13 oneeggeach left 22:14 dataange` joined, dataangel left
guifa kybr: it’s not possible to create your own hyper operator. At least not doing anything simple, you’d need to create a slang in order to process the base operator, although the slang itself might not be toooo hard to do 22:23
22:28 aborazmeh left
guifa s/process/parse 22:28
22:42 parv joined, wamba left 22:43 kybr left 22:44 parvXirc joined, parvx joined 22:45 parvx_ joined, aborazmeh joined 22:47 parvx_ left, parv left 22:49 parvXirc left, parvx left 22:50 parv joined 23:02 pecastro left 23:06 mowcat left 23:12 mahafyi left 23:18 brtastic left 23:22 aborazmeh left