🦋 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:19 aborazmeh left 00:25 pecastro left
timotimo comma has test coverage built-in 00:27
moarvm has a coverage logger that outputs rather raw data, just filenames and line numbers
you turn it on with an environment variable 00:28
00:40 Manifest0 left 00:43 stoned75 left 00:44 Manifest0 joined 00:45 codesect` left, stoned75 joined 00:51 Manifest0 left
Geth doc/parameter-sub_sig: 2d99f06920 | (Stoned Elipot)++ | doc/Type/Parameter.pod6
Update Parameter.sub_signature and add example
00:52
doc: stoned++ created pull request #3736:
Update Parameter.sub_signature and add example
00:52 Manifest0 joined
tbrowder i'm wondering about ways to ensure test coverage of public modules outside of the core code. 01:04
i know we have blin but that's for existing tests 01:05
01:09 wamba left 01:31 oneeggeach joined 01:46 oneeggeach left 01:49 stoned75 left 01:54 epony left 02:05 lucasb left 02:22 epony joined 02:23 moon-chilled is now known as moon-child 03:15 schlaftier6 joined 03:16 epony left 03:17 schlaftier left, schlaftier6 is now known as schlaftier
Xliff What's the best way to get the columns of a multi dimensional array? 03:17
El_Che: Yeah. That's a TV. :)
03:23 epony joined
Xliff Odd. 03:33
It seems to me that this is no longer lazy.
m: my @a = ^100000; my @b = ^100000; my @c = (@a x @b); say now -INIT now 03:34
camelia Can't repeat string, required number of graphemes (588889 * 100000) greater than max allowed of 4294967295
in block <unit> at <tmp> line 1
Xliff m: my @a = ^100000; my @b = ^100000; my @c = (@a X @b); say now -INIT now
camelia (timeout) 03:35
Xliff O_o
However, this is!
m: my @a = ^100000; my @b = ^100000; say (@a X @b); say now -INIT now
camelia ((0 0) (0 1) (0 2) (0 3) (0 4) (0 5) (0 6) (0 7) (0 8) (0 9) (0 10) (0 11) (0 12) (0 13) (0 14) (0 15) (0 16) (0 17) (0 18) (0 19) (0 20) (0 21) (0 22) (0 23) (0 24) (0 25) (0 26) (0 27) (0 28) (0 29) (0 30) (0 31) (0 32) (0 33) (0 34) (0 35) (0 36) (…
Xliff That turns out to be 0.6547 seconds on this end, since camelia rudely cut off my obnoxiously long output. 03:36
lizmat timotimo ^^
03:36 rypervenche left
Xliff m: (^10000),^name.say 03:37
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared routine:
name used at line 1
Xliff m: (^10000).^name.say
camelia Range
03:40 rypervenche joined 03:45 rindolf joined 03:59 clarjon1 joined 04:02 leont left
Xliff m: my @a[2; 2] = (<a b>, <c d>); my @b = @a.clone 04:06
camelia ( no output )
Xliff m: my @a[2; 2] = (<a b>, <c d>); my @b = @a.clone; @b.gist.say 04:07
camelia [a b c d]
Xliff m: my ($r, $c) = 2 xx 2; my @a[$r; $c] = (<a b>, <c d>); my @b = @a.clone 04:10
camelia ( no output )
04:10 _jrjsmrtn left, __jrjsmrtn__ joined 04:52 Xliff left 05:01 cpan-raku left 05:02 ensamvarg3 joined 05:04 void1 joined, void1 left 05:06 cpan-raku joined, cpan-raku left, cpan-raku joined 05:07 ensamvarg3 left, ensamvarg3 joined 05:22 samebchase left 05:28 xinming left 05:29 xinming joined 05:49 samebchase joined 05:57 xinming left, xinming joined 06:20 frost-lab joined 06:24 jmcgnh left
Geth doc: cbbdb3b759 | (Stoned Elipot)++ (committed by Juan Julián Merelo Guervós) | doc/Type/Parameter.pod6
Update Parameter.sub_signature and add example
06:29
linkable6 Link: docs.raku.org/type/Parameter
Geth doc: 67358682f7 | (Stoned Elipot)++ (committed by Juan Julián Merelo Guervós) | doc/Type/Parameter.pod6
Update Parameter.name and add example, ref #3580
linkable6 DOC#3580 [open]: github.com/Raku/doc/issues/3580 [checklist][docs] Checklist for 2020.08
06:30 jmcgnh joined 06:44 stoned75 joined 06:50 stoned75 left
coldpress anyone knows how to solve today's (Day 15's) Advent of Code part 2 in less than 1.6 hours? 06:56
06:57 sjm_uk joined 07:02 parabolize left 07:09 skids left 07:11 ufobat joined 07:20 aborazmeh joined, aborazmeh left, aborazmeh joined 07:29 ensamvarg3 left 07:42 ensamvarg3 joined 07:47 aborazmeh left 07:54 kensanata joined
moritz where is part 2? 07:55
08:03 stoned75 joined 08:06 dataangel left, dataange` joined 08:08 sena_kun joined
coldpress moritz: it's the same as part 1, but instead of finding the 2020th number, you find the 30000000th number 08:10
i'm now thinking of having an array for the lower-valued numbers, and a hashmapfor the higher-valued numbers
moritz can't you just have a hash that is indexed by number and the value is the last occurance index? 08:12
or is that too slow?
08:13 pecastro joined 08:17 domidumont joined 08:35 Sgeo left 08:36 wamba joined 08:39 dakkar joined
coldpress that takes 1.6++hours 08:44
numbers said are distributed logarithmically, so lower numbers are said very often 08:45
hashing an integer 30000000 times is not ideal
alright, can confirm that using an array for the lower 300 numbers gives a user time of 24min and sys time of 18min 08:51
timotimo huh that is a really big amount of sys time. it doesn't do a lot of swapping or anything, does it? 08:52
MasterDuke m: my %h; %h{$_}++ for ^1_000_000; say now - INIT now; say %h.elems;
camelia 3.4712895
1000000
08:53
MasterDuke m: my Int %h; %h{$_}++ for ^1_000_000; say now - INIT now; say %h.elems;
camelia 3.4336643
1000000
MasterDuke huh. locally i get a consistent difference of 0.4s slower for the Int hash 08:54
coldpress m: my Int %h; %h{$_}++ for ^30_000_000; say now - INIT now; say %h.elems; 08:56
camelia (timeout)
coldpress I think big hashmaps take more time
because not enough buckets or something like that 08:57
well I guess not all 30_000_000 numbers are actually hashed
should be more like 10_000_000 08:58
m: my Int %h; %h{$_}++ for ^10_000_000; say now - INIT now; say %h.elems;
camelia (timeout)
MasterDuke spends almost all the cpu time in MVMHash_gc_mark 09:03
non-linear. locally. 1m entries takes 2.5s, but 10m took 83s 09:04
09:08 Altai-man joined 09:09 kst left 09:11 frost-lab left, sena_kun left 09:15 ensamvarg3 left 09:29 ensamvarg3 joined 09:30 ufobat left 09:35 ufobat joined 09:38 ensamvarg3 left, cpan-raku left 09:40 cpan-raku joined, cpan-raku left, cpan-raku joined
timotimo m: my Int %h{Int}; %h{$_}++ for ^10_000_000; say now - INIT now; say %h.elems 09:41
camelia (timeout) 09:42
MasterDuke for 10m it's 5s quicker when it's not typed. i.e., 83s for Int, 78s for normal 09:44
timotimo ah, dang. possibly because stringifying an Int is slightly less work than putting the class name in front 09:45
m: say 1234.Str; say 1234.WHICH
camelia 1234
Int|1234
10:02 dakkar left 10:03 dakkar joined 10:07 morayj joined 10:15 morayj_ joined 10:17 morayj left, morayj_ is now known as morayj 10:28 kensanata left 10:32 ensamvarg3 joined 10:43 MasterDuke left 11:03 MasterDuke joined
tbrowder jmerelo: i keep getting a "ping back" on my advent article via email, click on the link, and get a piece of someone's blog but no comments that i can see. i would love to address the reply but can't see it. any ideas? 11:14
11:45 ensamvarg3 left 11:46 ensamvarg3 joined 11:53 ufobat_ joined 11:57 ufobat left
jmerelo tbrowder: other than marking it as spam, none. Thing is, it looks legit... 11:58
tbrowder thnx 11:59
jmerelo tbrowder: no problem :-)
12:13 sftp left 12:14 sftp joined
lizmat clickbaits rakudoweekly.blog/2020/12/14/2020-...wikipedia/ 12:39
m6locks clicks 12:59
13:09 sena_kun joined 13:11 Altai-man left 13:19 leont joined 13:20 squashable6 left 13:21 squashable6 joined 13:42 mahafyi joined 14:02 ensamvarg3 left 14:05 ufobat_ left 14:23 parabolize joined
leont wrote a thing dev.to/leontimmermans/better-argum...-long-2o13 14:45
tadzik huh, TIL about enums blowing up the parser 14:47
well, dispatcher
leont++ 14:48
14:48 Sgeo joined
leont Yeah, it's decidedly unhelpful behavior if you ask me 14:52
14:54 b2gills left
leont We really ought to have an option to disable it 14:58
15:00 ufobat_ joined 15:14 kensanata joined 15:22 pounce left 15:27 b2gills joined 15:32 kensanata left 15:43 skids joined, Celelibi left 15:48 stux|RC left 15:49 stux|RC joined
tony-o interesting article leont 15:49
15:55 brtastic joined 15:57 patrickb joined 16:00 stux|RC left 16:01 stux|RC joined 16:08 shlomif joined 16:16 rir joined 16:36 rindolf left 16:41 shlomif is now known as rindolf 16:49 patrickb left
rir In a parent class: self.^name.^attributes[0].get_value indirectly shows I have a BOOTSTRAPATTR. How do I get to the real Attributes in this situation. This is similar V V. 17:02
p6: (class E { has $.i = 1}).new().^name.^attributes[0].name;
camelia ( no output )
rir ^^ on my 6.c, I get: $!value 17:04
17:05 lizmat_ joined
MasterDuke p6: say (class E { has $.i = 1}).new().^name.^attributes[0].name; 17:06
camelia $!value
rir MasterDuke, I was thinking (or maybe not) that I was in a REPR here. 17:08
17:09 Altai-man joined, lizmat left, kensanata joined
MasterDuke not sure i follow 17:09
17:11 sena_kun left, lizmat_ is now known as lizmat
rir I am trying to manipulate self's Attributes array in a parent class ( a role might work) and am stuck on how to get beyond the BOOTSTRAPATTR precursor type. 17:12
dakkar I'm not sure what that ^name is doing 17:14
17:14 ufobat_ left
dakkar it returns a *string* 17:14
why are you looking at the attributes of a string?
m: (class E { has $.i=1 }).^attributes[0].name 17:15
camelia ( no output )
dakkar m: say (class E { has $.i=1 }).^attributes[0].name
camelia $!i
dakkar rir: ^
rir Thanks, dakkar, that shows me my error. Now to find the correction! 17:19
dakkar m: sub list_attrs($c) { $c.^attributes.map: -> $a { say "{$a.name} {$a.?readonly // False ?? 'ro' !! 'rw' } {$a.?container.^name }" } }; list_attrs(Str); list_attrs({}); list_attrs(->{}) 17:24
camelia $!value rw Nil
$!descriptor ro ContainerDescriptor::Untyped
$!storage ro BOOTHash
$!phasers rw Nil
$!why ro Nil
$!do ro Code
$!signature ro Signature
@!compstuff ro Nil
dakkar (slightly annoying that the MOP is not really consistent, due to the bootstrap bits) 17:25
17:38 dakkar left 17:45 rir left 17:47 cfa joined
cfa o/ 17:47
m: say 'foo' ~~ /foo/ 17:49
camelia 「foo」
cfa m: ('foo' ~~ /foo/) ~~ 'foo'
camelia ( no output )
cfa m: say ('foo' ~~ /foo/) ~~ 'foo'
camelia True
cfa m: say ('foo' ~~ /foo/) == 'foo' # LTA
camelia Cannot convert string to number: base-10 number must begin with valid digits or '.' in '3⏏5foo' (indicated by ⏏)
in block <unit> at <tmp> line 1
moon-child use eq for str compare 17:55
m: print ('foo' ~~ /foo/) eq 'foo'
camelia True
cfa hmm, yeah; i suppose 'foo' == 'foo' yields the same base conversion error 17:57
this is just a golfed typo (== instead of ~~), error struck me as lta 17:59
but to your point, i guess it's just a less golfed use of == instead of eq 18:00
moon-child yeah, we could probably get a nicer error msg for when numeric relational operators are used for uncool strings
cfa agreed 18:01
18:09 melezhik joined
melezhik .tell jmerelo, do we have free spots left in raku advent calendar? I have another post in mind for that 18:14
tellable6 melezhik, I'll pass your message to jmerelo 18:15
18:46 domidumont left, natrys joined
jmerelo melezhik: not totally sure, but in principle we're covered, thanks :-) 18:53
tellable6 2020-12-15T18:14:59Z #raku <melezhik> jmerelo, do we have free spots left in raku advent calendar? I have another post in mind for that
18:53 jmerelo left 18:54 aborazmeh joined, aborazmeh left, aborazmeh joined 18:56 MasterDuke left
melezhik .tell jmerelo , then, disregard my last post, I will probably put it as regular one ... no worries 18:58
tellable6 melezhik, I'll pass your message to jmerelo
18:59 morayj left
melezhik I just posted , might be interesting for people who want to use Raku for devops - www.reddit.com/r/rakulang/comments...s_cluster/ 19:02
notable6: Sparky on k8s cluster - sparrowdo.wordpress.com/2020/12/15...s-cluster/ 19:04
notable6 melezhik, Noted! (weekly)
19:11 sjm_uk left
[Coke] nandgame.com/ - off topic, but fun logic puzzle site. 19:20
(in circuitry form.) 19:21
19:24 stoned75 left 19:29 Doc_Holliwood joined
Doc_Holliwood heyo somebody in the mood for finding my schlemiehl? 19:30
i wrote this for todays advent puzzle: pastebin.com/sKEwmgFd
19:31 mowcat joined
Doc_Holliwood every million iterations takes one second longer than the previous one and i just don't see why 19:31
it also keeps using more and more memory, looks like a leak 19:32
19:46 sjm_uk joined 19:50 melezhik left
[Coke] your hash is increasing in size, no? 19:54
19:58 MasterDuke joined
Doc_Holliwood yes but that is negligble 20:03
it's in the 100s, element wise
20:05 cfa left 20:08 DarthGandalf left 20:09 DarthGandalf joined, Toilie is now known as dudz 20:10 dudz is now known as toilie 20:11 jmchael_ joined, jmchael left 20:12 MasterDuke left 20:25 Xliff joined
Xliff \o 20:26
Will $id be available in the else block if I do something like this: if expr() -> $id { ... } else { ... }
If not, what's the idiomatic way to do that? 20:27
20:30 squashable6 left, squashable6 joined
[Coke] m: if 33 -> $id { say $id } else { say 'nope' } 20:37
camelia 33
20:39 DarthGandalf left, DarthGandalf joined
[Coke] Doc_Holliwood: no specific comments on your solution there, but thank you for reminding me about AOC. 20:44
Doc_Holliwood Coke: array of? 20:46
20:48 Altai-man left
[Coke] advent of code 20:49
Doc_Holliwood ah yes. lol 20:57
20:59 sjm_uk left 21:00 MasterDuke joined 21:02 squashable6 left 21:04 squashable6 joined 22:01 rypervenche left 22:04 aborazmeh left 22:05 rypervenche joined 22:07 perlmaros left 22:18 natrys left 22:25 perlmaros joined
Geth doc: 28fc996651 | Coke++ | util/update-and-test
Don't check our dependencies if we don't have to
22:31
doc: 2da1c25483 | Coke++ | doc/Type/Array.pod6
Need empty parens for no arg sig
linkable6 Link: docs.raku.org/type/Array
22:33 ggoebel joined
ggoebel Doc_Holliwood: here's my Day 15 for AoC pastebin.com/zrCC4DTD 22:36
my laptop has an i5-5300U CPU @ 2.30GHz. my script takes around 24.5 minutes 22:38
I see a similar slow down, but on the order of 2-3 seconds per 1,000,000
I'm running your script now... looks to have similar performance 22:41
22:46 brtastic left 22:52 rindolf left
ggoebel your script ran in 17.5 minutes 22:57
22:57 squashable6 left 22:58 squashable6 joined
Doc_Holliwood this should run in 16ish minutes then 23:04
twitter.com/HrBollermann/status/13...2650756096
i eliminated the condition
23:24 ensamvarg3 joined 23:30 kensanata left 23:58 Xliff left