🦋 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:00 oneeggeach joined 00:19 monkey__ left 00:21 pecastro left 00:33 monkey__ joined 01:14 vike left 01:55 monkey__ left 02:13 vike joined 02:18 kvw_5 joined 02:20 vike left 02:22 kvw_5_ left 02:44 mahafyi left, _jrjsmrtn joined 02:45 __jrjsmrtn__ left 03:00 aindilis joined 03:04 oneeggeach left 03:09 monkey__ joined 03:10 oneeggeach joined 03:13 muffindrake left 03:14 muffindrake joined 03:37 oneeggeach left 03:38 kaiwulf left 03:48 Sgeo_ joined 03:50 Sgeo left 03:54 monkey__ left 03:56 rindolf joined 04:12 Kaiepi left, Kaiepi joined 04:21 wamba joined 04:44 Toilie left 04:58 xinming left, xinming joined 05:06 eax left 05:28 xinming left, xinming joined 05:47 xinming left 05:49 xinming joined 06:02 vike joined, parabolize left 06:19 aluaces joined 06:20 ufobat joined 06:52 Sgeo_ left 06:59 aborazmeh left 07:12 jmerelo joined 07:34 Manifest0 left 07:36 Manifest0 joined 07:38 defaultxr left 07:49 stoned75 joined, domidumont joined 07:57 pecastro joined 07:58 xinming left, abraxxa joined 07:59 xinming joined 08:03 abraxxa left 08:04 frost-lab joined, abraxxa joined 08:20 Pitonisa joined 08:21 mahafyi joined 08:24 aindilis left, aindilis` joined 08:28 defaultxr joined 08:34 Pitonisa left 08:43 dakkar joined 08:48 mahafyi left 08:49 xinming left 08:50 xinming joined 09:11 Kaiepi left 09:13 Kaiepi joined 09:30 plvicente joined 09:47 plvicente left 09:50 asy joined 09:52 asymptotically left 10:03 Kaiepi left 10:04 Kaiepi joined 10:07 asy is now known as asymptotically 10:16 dakkar_ joined, dakkar left 10:30 xinming left, xinming joined 10:33 plvicente joined 10:34 asy joined 10:35 asymptotically left, asy is now known as asymptotically 10:44 stoned75 left 10:48 plvicente left 10:58 Doc_Holliwood joined 11:09 orinthe0 joined, orinthe left, orinthe0 is now known as orinthe 11:19 plvicente joined 11:22 MasterDuke left 11:24 dakkar_ is now known as dakkar 11:35 MasterDuke joined
Doc_Holliwood @Stern-Brocot = 0, 1, 1, { |(@Stern-Brocot[$_ - 1] + @Stern-Brocot[$_], @Stern-Brocot[$_]) given ++$+1 } ... *; 11:39
what's that ++$+1 doing?
MasterDuke pre-incrementing (`++`) the anonymous state variable (`$`) and adding one to it (`+ 1`) 11:41
11:49 plvicente left 11:50 aluaces left 11:52 frost-lab left 12:06 MasterDuke left 12:07 MasterDuke joined 12:27 plvicente joined 12:41 plvicente left 12:53 MasterDuke left 12:54 monkey__ joined 12:55 MasterDuke joined 13:00 plvicente joined 13:04 xinming left 13:06 xinming joined 13:32 kaiwulf joined, DarthGandalf left 13:33 plvicente left 13:43 monkey__ left 13:46 abraxxa left, abraxxa joined 13:50 aluaces joined 13:52 Sgeo joined 13:56 notagoodidea joined
notagoodidea Looking at benhoyt.com/writings/count-words/ I was doing a version in Raku. 13:56
Basically, it is : my $counts = BagHas.new; $counts.add($_.lc.comb(/\w+/)) for $*IN.lines; and spurt $counts.kv in a file. 13:57
MasterDuke .words instead of .comb(/\w+/) should be faster 13:58
we've just been chatting about this over in #moarvm 13:59
notagoodidea The differences between .words and .comb(/\w+/) is the punctation handling too? 14:02
m: say "foo,bar".comb(/\w+/); 14:04
camelia (foo bar)
notagoodidea m: say "foo,bar".words;
camelia (foo,bar)
14:18 kakadzhun joined 14:30 parabolize joined 14:45 aindilis` left 14:51 xinming left, xinming joined 14:57 plvicente joined, Doc_Holliwood left 15:00 Kaiepi left 15:03 kakadzhun left
notagoodidea mm MasterDuke you were talking about the article or just .words vs .comb? I have simple solution around ~3s pastebin.com/9JQ3V6Nm 15:08
MasterDuke the article 15:10
you must have good hardware, it takes 11s for me 15:13
notagoodidea nah, I was using one version of the input not the 10x duplicate -_-' 15:15
with a simple time and output to stdout ~22sec :D 15:19
that hurts. 15:21
MasterDuke ha, i get ~1.5s for the single input
notagoodidea You have good hardware :D 15:22
MasterDuke ryzen 3700x, pretty happy with it
notagoodidea i5-6200U, 8Go from a Thinkpad X270. 15:23
With the profiler, its ~33sec 15:24
Now, how to do better :D 15:26
MasterDuke a plain hash is faster. a Bag goes off the .WHICH of the keys, so ends up allocating many more Strs 15:29
notagoodidea Yep, I was looking at it. But even `lc` and `words` alone take ~2s on my computer (in the profiler) 15:30
15:31 stux|RC left 15:33 Doc_Holliwood joined
MasterDuke i can get it down to 9.5s by switching to a branch of moarvm i'm working on 15:36
15:37 b2gills left 15:41 stux|RC joined 15:52 plvicente left 15:53 Kaiepi joined 15:57 epony left 16:00 BarrOff[m] left 16:02 APic left 16:07 plvicente joined 16:12 b2gills joined 16:18 Doc_Holliwood left
notagoodidea mm, weird using a Hash if indeed faster than a BagHash but the %foo.sort(*.values).reverse is slower on the Hash than the BagHash ?? 16:19
lizmat *.values ?? not *.value ? 16:21
notagoodidea thanks lizmat that was it, stupid mistakes :D 16:24
16:25 mowcat joined 16:29 parabolize left 16:37 APic joined 16:38 epony joined 16:40 APic left 16:45 APic joined 16:52 plvicente left 16:54 parabolize joined 16:56 plvicente joined 17:03 mowcat left 17:10 tbrowder__ joined 17:14 juanfra__ left, tbrowder left, ssm left, juanfra__ joined, juanfra__ left, juanfra__ joined, vike left, tbrowder__ is now known as tbrowder, ssm joined 17:15 plvicente left 17:17 karupanerura left 17:19 karupanerura joined, gordonfish left 17:31 gordonfish joined 17:37 dakkar left 17:53 brtastic joined, vike joined 18:00 ssm_ joined 18:03 ssm left, juanfra__ left, Nasrudin left 18:05 aborazmeh joined, juanfra__ joined, Nasrudin joined 18:06 aborazmeh left, aborazmeh joined 18:07 kiti_nomad[m] left, l-as left, tusooa left, unclechu left, JJAtria[m] left, CIAvash left 18:08 AlexDaniel` left, pwr22 left, Tirifto[m] left, Nasrudin left, patrickbkr[m] left, uzl[m] left, notagoodidea left 18:09 ThaEwat left, juanfra__ left 18:18 xinming left 18:20 xinming joined 18:25 DarthGandalf joined 18:32 domidumont left 18:33 ThaEwat joined, wamba left 18:41 wamba joined 18:42 kiti_nomad[m] joined, AlexDaniel` joined, patrickbkr[m] joined, Tirifto[m] joined, unclechu joined, tusooa joined, JJAtria[m] joined, l-as joined, uzl[m] joined, Nasrudin joined, juanfra__ joined, pwr22 joined, CIAvash joined 18:47 brtastic left 18:51 aborazmeh left 18:55 aborazmeh joined, plvicente joined 19:06 Sgeo_ joined 19:07 plvicente left 19:10 El_Che_ joined, avarab joined, avarab left, avarab joined, ufobat left, jjmerelo joined, drakonis- joined 19:11 stux|RC-- joined, notable6 left, quotable6 left, drakonis left, Sgeo left, jmerelo left, avar left, El_Che left, stux|RC-only left, markmarkmark left, quotable6 joined, notable6 joined, bisectable6 left 19:12 drakonis- is now known as drakonis 19:14 markmarkmark joined
lizmat and another Rakudo Weekly News hits the Net: rakudoweekly.blog/2021/03/15/2021-...year-itch/ 19:15
codesections lizmat++ 19:16
19:18 mowcat joined 19:28 domidumont joined 19:31 ambs left, spacebat2 left, ambs joined 19:32 spacebat2 joined, domidumont left 19:47 jjmerelo left 19:52 tailgate joined
codesections .ask MasterDuke I saw you mention in #moarvm that your Raku startup time is ~75ms. Have you done anything to get it that fast, or do you just have a fast machine? I'm at ~125ms 19:55
tellable6 codesections, I'll pass your message to MasterDuke
19:58 neshpion joined 20:10 bisectable6 joined 20:14 rindolf left 20:15 Doc_Holliwood joined 20:19 bisectable6 left, bisectable6 joined 20:24 Kaiepi left
gfldex codesections: time raku -e 'use v6' # real 0m0.086s # model name : AMD Ryzen 7 5800X 8-Core Processor 20:34
codesections gfldex: interesting. Similar here, but that's different than how I had been measuring startup time. Out of curiosity, what do you get for time raku -e 'unit sub MAIN {}' 20:42
gfldex codesections: real 0m0.094 20:43
:D Perl 5 is to fast to be measued 20:44
codesections interesting. I get 0.104. I'm curious both about why I see so much bigger a jump with &MAIN than you do and surprised that either of us have as large a one as we do/that loading an empty &MAIN takes 10%+ of the startup time 20:45
gfldex do you got fast RAM? 20:46
japhb gfldex: I kinda wondered when machines would get fast enough that perl5 startup was sub-1ms. Guess it finally happened. :-) 20:48
codesections gfldex: 3000MHz 20:49
japhb: yeah, Perl's startup time is pretty impressive. Basically as fast as Bash (though Dash still has a bit of a lead) 20:51
gfldex 3400MHz here. I could see a speedup in other workloads too after the upgrade. (povray, lzo)
MasterDuke codesections: haven't done anything extra. ryzen 3700x, 3200mhz ram
0.092s for `time raku -e 'unit sub MAIN {}'` 20:52
the 0.075s is for `time raku -e ''` 20:53
codesections Fascinating. That's a good 10% faster than me, with a ryzen 3950x, 3000MHz ram 20:54
gfldex Does raku still look for modules, even if there is no use-statement?
japhb gfldex: RAKU_MODULE_DEBUG (I think that's the name) should tell youi 20:55
*you
leont For me it fluctuates between 80-100 msec
20:55 dmc00 left
japhb Sorry RAKUDO_MODULE_DEBUG 20:55
MasterDuke codesections: decent ssd? 20:56
20:56 bisectable6 left, notable6 left, quotable6 left, statisfiable6 left, greppable6 left, bloatable6 left, benchable6 left, tellable6 left, nichfury left, shadowpaste left, takside left
japhb 130-136ms for raku -e '' here, but this is a several-year-old laptop. 20:56
codesections nvme, even 20:57
20:57 bisectable6 joined, notable6 joined, quotable6 joined, statisfiable6 joined, greppable6 joined, bloatable6 joined, benchable6 joined, tellable6 joined, nichfury joined, shadowpaste joined, takside joined
MasterDuke i will admit to being slightly surprised it was this fast. istr it usually being ~0.12s 20:57
same here (nvme ssd)
gfldex Once the cache is primed, SSD wont change things. 20:58
I got 64GB in my linux box now. It refuses to read from disk. :)
I just learned that CX::Return can't .resume. Makes sense. :) 21:02
21:11 stoned75 joined 21:16 takside left, takside joined 21:19 wamba left 21:26 stoned75 left 21:29 notagoodidea joined 21:30 xinming left 21:31 xinming joined 21:34 shadowpaste left 21:37 shadowpaste joined 21:43 brtastic joined 21:48 Black_Ribbon joined 21:52 japhb left 21:54 japhb joined
tellable6 2021-03-15T19:55:46Z #raku <codesections> MasterDuke I saw you mention in #moarvm that your Raku startup time is ~75ms. Have you done anything to get it that fast, or do you just have a fast machine? I'm at ~125ms 22:00
codesections go home, tellable6, you're drunk 22:01
notagoodidea Hahaha :D
ok, so my bottleneck is post circumfix { }.. I think that is the hard stop to try with an hash. 22:07
22:08 sena_kun left
MasterDuke you could just call %hash.AT-KEY directly, but that'd be an optimized version, not the simple version 22:13
22:17 brtastic left
notagoodidea MasterDuke: Oh. I finally used a combo of AT-KEY/ASSIGN-KEY and is defined(0). 22:23
22:25 xinming left
lizmat weekly: don't forget Covid Observer next week: covid.observer/news/#20210308 22:25
notable6 lizmat, Noted! (weekly)
22:25 xinming joined
uzl[m] lizmat++ 22:39
I'm always amazed how liz keeps on top of everything Raku related :) 22:40
lizmat well, I missed the 1 year anniversary of covid.observer :-( 22:49
so I'm not on top as I could be
22:55 xinming left, xinming joined 22:56 notagoodidea left
lizmat sleep& 22:57
22:57 stux|RC-- left 23:00 stux|RC-only joined 23:02 spacebat2 left 23:07 spacebat2 joined
japhb I dunno who is still awake in here (so I guess I'll announce it again in a few hours when Europe is waking up), but I've got something to announce: 23:07
🎉‭🎉‭🎉‭ I've just released MUGS 0.0.5 at github.com/Raku-MUGS (and uploaded into the fez/zef ecosystem). 23:08
It's built on lots of other Raku awesomeness, including Cro, Red, and RPG::Base (see github.com/Raku-MUGS/MUGS/blob/mai...lt-with.md for more details) 23:09
It's a platform for building game services, designed to host any game, and any UI. 23:10
Currently I have only a few (very simple) games uploaded, and two simple UIs: CLI (ANSI terminal) and WebSimple (basic HTML/trivial CSS) 23:11
m6locks holy crap
japhb I have in the works a full-screen TUI, a GTK+ interface, and lots more games -- including some twitch-style games, proving that Cro can serve fast enough to play at least 2D games remotely. 23:12
m6locks DOOM?-)
japhb Anyone interested can join me on #mugs here at Freenode or file issues on the github.com/Raku-MUGS repos
m6locks: Well, I did write a DOOM level viewer in Perl 5, I suppose I could port that .... :-) 23:13
23:13 dogbert11 joined
japhb I'd have to revive the OpenGL work that I did back in the Parrot days, but perhaps that's worth doing. Hmmmm. 23:13
japhb drops another yak on the "to be shaved" heap 23:14
m6locks nice, I'd reckon DOOM runs on GTK since it's been ported everywhere
japhb (BTW, performance-wise, there are recently merged patches for Cro that make its minimum RTT faster, but the Cro folks are working to put the finishing touches on their next release, so if you try it now, expect it to be slightly slower.) 23:15
23:16 Doc_Holliwood left
japhb m6locks: Oh yeah, definitely does run on everything (it's hilarious to see classic Doom inside emulators inside modern Doom games, BTW) 23:16
23:16 dogbert2 left
m6locks :) 23:17
japhb My kids have recently gotten to see the games of my teen years by finding them as easter eggs in the follow-ons from *their* teen years, which is kinda fun to watch. "Oh yeah, I remember this level, you have to get over to that spot over there to get the chainsaw." 23:18
Anyway, release roadmap is here: github.com/Raku-MUGS/MUGS/blob/mai...roadmap.md 23:20
Anyone interested in working on (or playing) games implemented in Raku, please join me on #mugs :-)
MasterDuke japhb: wouldn't github.com/Raku-MUGS/MUGS-Games/bl...od#L18-L25 be slightly faster as `.first`s? 23:24
japhb LOL 23:25
I was not expecting that as an early reaction!
MasterDuke heh, i was just clicking around randomly
japhb Yes, it would be faster, but 1) This is on the client side, so it is not as performance-critical as on the server side, however 2) It should be fixed anyway since the WebSimple gateway uses the client code to talk to the backend, so it isn't purely limited by a single user's inputs; thankfully 3) the lists are usually quite short. :-) 23:27
Oh, come to think of it, first might not be all that much faster there, because the expected case is that none of the greps find anything. Would speed up handling of errors. 23:30
MasterDuke i'm to bed, but it looks cool
japhb I figured most people would be heading to bed (or already in it) at this time of day, 23:31
but I also noticed a few people this week talking about their personal games-in-Raku project, so I figured announcing now (and then again in a few hours) was better than sitting on it even longer.
ugexe i wouldnt expect first to be much/any faster... its not actually going to grep every element in bool context 23:32
moon-child m: sub postfix:<&>(Code &x) { start &x }; { sleep 2; say 1 } & 23:33
camelia 5===SORRY!5=== Error while compiling <tmp>
Strange text after block (missing semicolon or comma?)
at <tmp>:1
------> 3ode &x) { start &x }; { sleep 2; say 1 }7⏏5 &
expecting any of:
infix
infix stopper
moon-child why doesn't ^^ work?
ugexe or rather its not going to grep every element after encountering one match
23:33 mowcat left
japhb ugexe: Ah, didn't realize that was optimized away. 23:33
23:34 mowcat joined
japhb m: sub postfix:<&>(Code &x) { start &x }; ({ sleep 2; say 1 })& 23:34
camelia Type check failed in binding to parameter '&x'; expected Callable[Code] but got Block (-> ;; $_? is raw = O...)
in sub postfix:<&> at <tmp> line 1
in block <unit> at <tmp> line 1
japhb OH! 23:35
m: sub postfix:<&>(&x) { start x() }; ({ sleep 2; say 1 })&
camelia ( no output )
moon-child works locally anyway 23:36
thanks!
japhb moon-child: You had extra space before the postfix op, and had doubled-up the type constraint on the x param.
moon-child ahh I see
so Code &x means it has to return COde?
japhb moon-child: Yeah, which you can see by looking at the implementation of the Callable role 23:38
github.com/rakudo/rakudo/blob/mast...llable.pm6 23:39
23:47 _jrjsmrtn left 23:48 __jrjsmrtn__ joined