🦋 Welcome to the former MAIN() IRC channel of the Raku Programming Language (raku.org). This channel has moved to Libera (irc.libera.chat #raku)
Set by lizmat on 23 May 2021.
00:03 reportable6 left 00:04 reportable6 joined 00:14 slu left 00:18 avuserow left, avuserow joined 00:36 sono joined
Hydrazer probably like this or something 00:38
$x +< (+^$y)
well you don't really need to brackets but it's more clear 00:39
00:39 rassoc joined
rassoc m: (<a 1>, <b 2>).flat.Hash.say # moon-child 00:41
camelia {a => 1, b => 2}
rassoc shame .flat isn't working for arrays :(
.List.flat is just as ugly as .map(&slip)
00:47 monkey_ joined 00:51 melezhik left
moon-child huh, why doesn't Array.flat work the same way? 01:03
rassoc who knows. another one of those raku mysteries i'm facing coming from ruby 01:22
it's even smoother there: kv.to_h # => {:a=>1, :b=>2} 01:23
Juerd It's pretty smooth in Raku if you have actual pairs to begin with, or a single list of alternating keys and values. 01:25
m: hash <a b c d>
camelia ( no output )
Juerd m: say hash <a b c d>
camelia {a => b, c => d}
Juerd m: say hash :a<b>, :c<d>
camelia {a => b, c => d}
Juerd Now, transforming a 2 element list to a pair is just unnecessarily complicated. 01:26
As is flattening something beyond the outermost list. 01:27
01:31 thundergnat joined
thundergnat m: say hash [<a b>, <c d>]».map: &flat 01:31
camelia {a => b, c => d}
rassoc still not quite sure why this has to hold, as specified in roast: 01:32
cmp-ok $x.flat, '===', $x, 'Array:U.flat is identity';
01:37 thundergnat left 01:39 cornett left
moon-child Array:U or Array:D? 01:45
01:45 _ed joined 01:48 rassoc left 01:50 _ed left 02:06 monkey_ left 02:07 abraxxa left 02:18 _ed joined 02:43 _ed left 03:15 wtwt5237 joined
wtwt5237 hi, all. I have been keeping a runtime benchmark for the raku language for every release in the past two years. In the past few months, I see a large increase in runtime for the same task performed with newly released versions 03:17
tellable6 2020-06-23T07:14:28Z #raku <MasterDuke> wtwt5237: i get fluctuating numbers on repeated runs. as low as 5.9s and as high as 7.2s. you might just have gotten a lucky 2020.02 and an unlucky 2020.0(5|6)
wtwt5237 github.com/wtwt5237/raku-for-bioin.../README.md
I want to bring this to the attention of the developers, so they may look into why 03:18
moon-child wtwt5237: if you want to get dev eyes on that, better places are probably #raku-dev and #moarvm 03:22
that said, if you are looking to make code performant, regex are probably not the way to go. You might also want to look into nqp. But (assuming MasterDuke's hypothesis is not correct) performance regressions are still worth looking into 03:25
03:26 _ed joined
wtwt5237 thx! 03:28
03:29 wtwt5237 left, monkey_ joined 03:30 _ed left 03:52 RandalSchwartz left 04:12 monkey_ left 04:35 whati joined 04:36 whati left 05:36 greppable6 left, statisfiable6 left, coverable6 left, squashable6 left, notable6 left, linkable6 left, reportable6 left, shareable6 left, nativecallable6 left, committable6 left, tellable6 left, bloatable6 left, evalable6 left, quotable6 left, bisectable6 left, sourceable6 left, benchable6 left, releasable6 left, unicodable6 left 05:37 bloatable6 joined, sourceable6 joined, releasable6 joined, squashable6 joined, unicodable6 joined, bisectable6 joined 05:38 evalable6 joined, coverable6 joined, reportable6 joined, greppable6 joined, tellable6 joined, notable6 joined, committable6 joined 05:39 statisfiable6 joined, shareable6 joined, benchable6 joined, nativecallable6 joined 05:40 quotable6 joined, linkable6 joined 05:52 gordonfish- joined 05:54 gordonfish left 06:02 reportable6 left 06:04 reportable6 joined 06:10 Kaiepi left 06:12 Kaiepi joined 06:32 abraxxa joined 06:33 abraxxa1 joined 06:37 abraxxa left 07:09 parv joined 07:29 Sgeo left 07:50 dakkar joined 08:09 juanfra left, demostanis[m] left, AlexDaniel left, cnx left, tyil[m] left, CIAvash left, littlebenlittle[ left, ComplYue[m] left 08:33 linkable6 left 08:34 linkable6 joined 08:35 linkable6 left 08:38 linkable6 joined 08:51 parv left 09:03 patrickb joined 09:07 dakkar left 09:08 dakkar joined 09:09 kawaii_ is now known as kawaii 09:16 _ed joined 09:21 _ed left 09:38 dakkar left, dakkar joined 10:09 rassoc joined
gfldex m:```use v6.*; say 3``` 10:22
10:22 sono left
m:```use v6.*; say 4``` 10:22
tbrowder m: use Modf 10:23
camelia 5===SORRY!5=== Error while compiling <tmp>
Could not find Modf in:
10:24 dakkar_ joined, dakkar_ left
tbrowder m: use Text::Utils 10:24
camelia 5===SORRY!5=== Error while compiling <tmp>
Could not find Text::Utils in:
tbrowder m: use JSON::Fast
camelia 5===SORRY!5=== Error while compiling <tmp>
Could not find JSON::Fast in:
tbrowder m: use Test 10:25
camelia ( no output )
tbrowder g'day, all
10:27 discord-raku-bot left, discord-raku-bot joined 10:38 ufobat joined 10:50 Xliff left 10:52 Ven_de_Thiel joined
Ven_de_Thiel o/ 10:52
11:02 linkable6 left 11:05 linkable6 joined
lizmat And another Rakudo Weekly News hits the Net: rakudoweekly.blog/2021/06/29/2021-26-r3/ 11:11
moritz and another one hits, and another hits, another one htis the net! 11:12
rassoc lizmat: thanks! 11:14
moon-child: the Array.flat issue seems to go back a fair bit: github.com/rakudo/rakudo/pull/834#...-238749080 11:15
11:16 linkable6 left
rassoc even zoffix thought it should be changed 11:16
11:17 linkable6 joined 11:49 abraxxa1 left 11:52 abraxxa joined 11:57 dogbert11 joined, dogbert17 left 12:02 reportable6 left 12:04 abraxxa left 12:05 reportable6 joined, abraxxa joined 12:08 colomon left 12:33 frost left 12:49 _ed joined 12:56 _ed left 13:02 RandalSchwartz joined 13:03 kawaii left
nirnam ever will cached and hyper gonna play nice together? 13:20
is there a road map for that? 13:21
13:21 kawaii_ joined, _ed joined
dakkar nirnam: how do they break? (never used them together, I'd like to know of problems beforehand) 13:22
nirnam how do they break? interestingly 13:23
dakkar can you show me an example? 13:26
13:26 _ed left
perlbot nirnam pasted a new file at l.perl.bot/p/3rkd92 - 13:26
nirnam ofcourse, dakkar 13:27
dakkar oooh, I had completely mis-understood/read, I thought you were talking about the `.cache` method on Seq 13:28
nirnam the same thing can be write in perl 5 with thread and thread::shared as cache (I think, never tried)
oh, sorry I mean sub cache 13:29
dakkar yeah yeah, if `is cached` doesn't lock, that code will produce pretty weird results/errors
($work meeting, brb)
Doc_Holliwood m: say grep *.contains( none <b c d> ), <a b c d e> 13:41
camelia (a e)
Doc_Holliwood how do none junctions work?
feels like spooky action to me
moritz basically just like not(any(...)) 13:49
13:54 nirnam left, nirnam joined 14:14 _ed joined 14:18 Sgeo joined 14:19 _ed left 14:29 _ed joined 14:34 _ed left 14:53 Shaeto joined 15:15 _ed joined 15:16 patrickb left 15:19 _ed left 15:31 _ed joined 15:37 _ed left 15:39 abraxxa left 15:49 abraxxa joined 15:58 neshpion joined 15:59 ufobat left 16:03 abraxxa left 16:04 abraxxa joined
tonyo tbrowder: fez isn't a module creator, just a utility for making your module show up in the ecosystem 16:09
it produces as few side effects as possible
tbrowder gotcha, thnx
so the fez user needs to manually ensure the data in META6 are consistent with what zef knows about the release. is that a true statement? 16:14
tonyo yea
it makes no changes to files, no version bumps, no auth changes in the META etc
mi6 already does that stuff so i didn't see the need to reinvent (i do everything manually anyway), there is a PR on mi6 to integrate with fez 16:16
tbrowder ok, so should i remove any adverbs on the module file’s unit name line?
tonyo in what sense?
tbrowder i think mi6 puts it there, e.g.: unit module foo:auth<zef:tb>:ver<0.2.3>; 16:18
i think mi6 doesn’t care if i remove all 16:19
i’ll check mi6 some more, though. 16:20
tonyo oh, that's fine - fez makes sure the resources claimed in the meta actually exist and vice versa but doesn't parse or make sure they load or anything
tbrowder gotcha! looking good, thnx 16:21
tonyo i see modf up there, lookin good 16:29
16:32 _ed joined 16:37 dakkar left 16:39 _ed left 16:44 Ven_de_Thiel left 16:53 bd3i joined 17:24 _ed joined 17:35 _ed left 17:45 _ed joined 18:02 reportable6 left 18:03 reportable6 joined 18:05 rassoc left 18:17 _ed left 18:21 RaycatWhoDat joined 18:23 gordonfish- is now known as gordonfish 18:36 Shaeto left, parv joined, parv left, parv joined 18:44 nirnam left 18:46 nirnam joined, RandalSchwartz left 18:54 RaycatWhoDat left 18:55 _ed joined 18:57 abraxxa-home joined 19:08 _ed left
[Coke] nirnam: if you haven't already, please open a ticket for that hyper/cached issue. (note that cached is experimental, but this definitely needs to be fixed if it's going to go mainstream) 19:31
github.com/rakudo/rakudo/blob/mast...mod#L3-L19 - there's no locking going on there. 19:34
nirnam I tried manual caching, give similar error, and switch hyper with thread same error, there's something more going here 19:35
MasterDuke manual caching with locking?
nirnam nope 19:36
[Coke] thinks docs.raku.org/type/Lock::Async might be enough? 19:38
nirnam If it break the way I think it break, just not let each hyper modipy the same caches at the same time would be enough 19:40
MasterDuke you have to have some sort of locking, modifying an array or hash isn't thread-safe. currently you'll get segfaults and such, though eventually we hope to made it higher-level errors
nirnam But I just ficking up raku from perl5 recently, I'm not sure if I can make that happen
[Coke] for now, I'd skip the cached then until we can fix this bug. 19:41
trying to add a simple lock to :cached... 19:43
MasterDuke is trying the same thing
nirnam :cached and .hyper would speed up that snippet code, especially if it that easy this would be a sole for me
alway apreciate a tool that have parallelism in the design, except js async there not much I can think off 19:45
[Coke] MasterDuke: worse here: MoarVM oops: MVM_str_hash_entry_size called with a stale hashtable pointer 19:46
er, whoops it threw out my change. 19:47
one sec. :)
ok, doesn't crash but is always returning Nil... 19:48
19:48 dvergin joined
[Coke] MasterDuke: gist.github.com/coke/e70575dd882c0...75d6c75b03 is not quite right 19:50
MasterDuke yeah, i'm not sure why (haven't done much locking code myself) 19:51
[Coke] ... don't need the ternary if we're only locking the callsame...
MasterDuke i have almost the identical change locally
19:52 dvergin left
[Coke] I think the callsame might need changing. 19:53
gist.github.com/coke/e70575dd882c0...75d6c75b03 has my current version, which fails to crash, but returns Nil 19:55
I bet the callsame is confused because now it's in the protect. 19:56
oh. don't need to protect the callsame. 19:57
nirnam the thread & manual cache version does run sometimes, the other times is just blow up 19:58
[Coke] I imagine sometimes you can get lucky 20:01
perlbot nirnam pasted a new file at l.perl.bot/p/8tgl1v -
[Coke] MasterDuke: my current version dies with 999936 47 20:02
MoarVM oops: MVM_str_hash_fetch_nocheck called with a stale hashtable pointer
nirnam that doesn't seem right, starting point 47 doesn't generate that long of a chain 20:03
[Coke] updated gist. have to take a call 20:04
nirnam oh it bolloc it other way round, sorry
[Coke] Yes, it means my cache implementation is completely screwed up. :)
nirnam the out put is correct
do raku have formatter in the same vein as perl::tidy? every spaces and tabs trigger my ocd now aday 20:07
20:08 Tirifto left 20:09 Tirifto joined 20:10 RandalSchwartz joined
MasterDuke not really. i thought drforr had one in the works before he died that was transferred to the community modules repo, but i don't see it there 20:11
RandalSchwartz drforr died? :( 20:12
nirnam I'm sorry to hear that
MasterDuke year or two ago, scuba accident on a cruise 20:13
nirnam since raku have proper grammer and parser build in I thought that could be one already 20:14
I really hope this isn't 'only perl can parse perl' situation 20:15
MasterDuke conf.raku.org/talk/147 has some relevant info
github.com/raku-community-modules/Raku-Parser is what drforr was working on, but i'm not sure how complete it is (or if the next step of implementing a ::Tidy was started) 20:17
but as jnthn will explain in his talk, RakuAST should make such things much easier 20:18
nirnam "This year, it takes place online on August 7, 2021" 20:23
also Food freference in profile/edit 20:24
how does that work?
MasterDuke maybe they'll mail people a snack 20:26
nirnam I watched most of damian conway and bruce gray talk for perl & raku conf on youtube, this is gonna be my first live conference 20:28
20:37 AntonOks joined 20:40 AntonOks left 20:53 zoli73 joined 20:54 zoli73 left
MasterDuke nirnam: ok, i have it safely using `.hyper` and `is cached`, but i'm not sure how much faster it is 21:01
nirnam can I see the patch? so I can test it out
MasterDuke gist.github.com/MasterDuke17/c2769...5a5f73788e 21:03
oh, that should be Lock::Async
btw, there are some micro-optimizations you could do to your code 21:04
21:04 _ed joined 21:05 m6502 joined
MasterDuke wait, maybe it shouldn't be Lock::Async 21:06
ooo, i just got a MoarVM oops. maybe the whole thing needs to be protected 21:10
21:12 m6502 left 21:17 abraxxa-home left
nirnam rakumod supposed so be in /usr/share/perl6 right? because gentoo doesn't give me any of it 21:17
gonna have to build from git hub
MasterDuke yeah
21:19 _ed left
nirnam I have .moarvm but not .rakumod, I didn't even know how this happened nor does how my rakudo even work in the first place 21:19
MasterDuke those are the pre-compiled bytecode 21:20
21:24 bd3i left 21:26 bd3i joined, _ed joined 21:30 _ed left
nirnam it is no longer crashed 21:45
21:47 _ed joined
nirnam annd id died 21:54
right about when it gonna be mostly cache hit 21:55
22:02 juanfra joined 22:03 Doc_Holliwood left
nirnam the run that does survived, hyper with :cached is about 1.16 times faster 22:04
22:04 tyil[m] joined, CIAvash joined 22:05 ComplYue[m] joined, demostanis[m] joined, AlexDaniel joined, cnx joined, littlebenlittle[ joined 22:11 juanfra left, demostanis[m] left 22:12 AlexDaniel left, Doc_Holliwood joined 22:13 tyil[m] left 22:14 CIAvash left, ComplYue[m] left, cnx left 22:15 littlebenlittle[ left 22:18 Doc_Holliwould joined 22:21 Doc_Holliwood left 22:27 juanfra joined 22:32 bd3i left 22:33 demostanis[m] joined, AlexDaniel joined, cnx joined, m6502 joined, littlebenlittle[ joined, tyil[m] joined, ComplYue[m] joined 22:34 CIAvash joined 22:36 m6502 left, jgaz joined 22:41 _ed left 22:58 jgaz left 23:29 _ed joined 23:33 _ed left 23:42 _ed joined 23:47 _ed left 23:49 _ed joined 23:52 neshpion left 23:56 _ed left 23:59 _ed joined