🦋 Welcome to the MAIN() IRC channel of the Raku Programming Language (raku.org). This channel is logged for the purpose of keeping a history about its development | evalbot usage: 'm: say 3;' or /msg camelia m: ... | Log inspection is getting closer to beta. If you're a beginner, you can also check out the #raku-beginner channel!
Set by lizmat on 25 August 2021.
grondilu how do I remove C-style comments from a string? I thought .subst(/'//' .* $$/, '') would work at least for the // comments 08:45
m: say "foo //bar\nthat line should remain".subst(/'//' .* $$/, '') 08:46
camelia foo
grondilu m: say "foo //bar\nthat line should remain".subst(/'//' <-[\n]>* $$/, '') 08:47
camelia foo
that line should remain
Voldenet m: say "foo //bar\nthat line should remain".subst(/'//' \N* $$/, '') 08:49
camelia foo
that line should remain
Voldenet grondilu: ^ consider this
there's gotchas in it, because C doesn't support unicode 08:51
(I'm not sure how VT/FF are supported)
grondilu \N is a useful shortcut indeed 09:07
Chaul-Jhin-Kim Dear GOD/GODS and/or anyone else who can HELP ME (e.g. TIME TRAVELERS or MEMBERS OF SUPER-INTELLIGENT ALIEN CIVILIZATIONS): The next time I wake up, please change my physical form to that of FINN MCMILLAN formerly of SOUTH NEW BRIGHTON at 8 YEARS OLD and keep it that way FOREVER. I am so sick of this chubby Asian man body! Thank you! - CHAUL JHIN 12:41
KIM (a.k.a. A DESPERATE SOUL)
Voldenet what 13:06
nine I guess that just had to get out 13:29
[Coke] let's build a MOO on top of Raku and ditch irc. :) 13:49
grondilu "MOO"? 14:17
japhb grondilu: One of several variants on MUD (Multi-User Dungeon). Text-based MMORPG, essentially. 14:24
[Coke] my college had a bunch of people in the late 80s/early 90s who built a chat system and I think it's still in use today. Always prefered it to irc, but we had the luxury of being able to provision users so random spam like that was not present. (Entirely different kind of spam, but at least you knew the person spewing it) 14:31
tonyo irc used to have MUD type games in it too, or blackjack bots, it probably still does somewhere 14:48
though stuff like napster and limewire and whatever people use today probably killed the file dump side 14:49
RaycatWhoDat Morning. 14:58
I recall hearing whispers on the wind about macros coming to Raku. Did anything come of that? 14:59
[Coke] work in progress on adding RakuAST which will be the basis of any macro rewrite. 15:07
RaycatWhoDat Oh, neat. 15:12
Thanks for that
TheAthlete Uploaded file: uploads.kiwiirc.com/files/d42d603a...pasted.txt 16:08
Hello! How to implement an object pool for Promises. This implementation is not quite correct - only 3 URLs are downloaded and stopped. 16:09
my $*SCHEDULER = ThreadPoolScheduler.new(max_threads => 3);
sub MAIN($urls = 'urls.txt') {
  my @promises;
  for $urls.IO.lines -> $url {
    push @promises, start {
      run 'youtube-dl', '--no-progress', $url;
    }
  }
  say await Promise.allof(@promises).then({ so all(@promises>>.result) });
}
Hello! How to implement an object pool for Promises? This implementation is not quite correct - only 3 URLs are downloaded and stopped.
my $*SCHEDULER = ThreadPoolScheduler.new(max_threads => 3);
sub MAIN($urls = 'urls.txt') {
  my @promises;
  for $urls.IO.lines -> $url {
    push @promises, start {
      run 'youtube-dl', '--no-progress', $url;
    }
  }
  say await Promise.allof(@promises).then({ so all(@promises>>.result) });
}
moritz TheAthlete: I'd solve it without promises: my @result = $urls.IO.lines.race.map(-> $url { run 'youtube-dl', '--no-progress', $url }) 18:12
docs.raku.org/routine/race you can control parallelism there as well. Use hyper() instead of race() if the order of the result matters 18:14
melezhik I am trying to build github.com/Raku/doc on Alpine linux using SparkyCI and get this error - sparrowhub.io:2222/report/290 , not sure why, Nodejs, npm, perl and grafitz are installed , maybe something Raku/doc maintainers might be interested 18:32
melezhik doc say "cpanm --installdeps ." , maybe this is the reason? I miss this step 18:35
grondilu hey guys, I'm working on a module about Google's protobuffer. 18:43
I'm reading this : developers.google.com/protocol-buf...ng#varints
and there is something I don't understand : why the hell do they say they use the two's complement? From the example they give, I don't see them using any complement. 18:44
grondilu Anyone would like to look at it and tell me what I'm missing? 18:44
btw I know there is a raku module about protobuffers already, but from what I can tell, it only parses proto files, it doesn't generate code for actual serialization. 18:46
[Coke] that failure is on Raku::Pod::Render, which is maintained by finanalyst 19:40
I'd open an issue at github.com/finanalyst/raku-pod-render
melezhik . 20:06
Voldenet TheAthlete: The problem is caused by `run`, not the sheduler - thread pool scheduler is not simply a thread pool, but a scheduler - you can easily create a thread pool using Channel and Thread classes though 20:08
tellable6 Voldenet, I'll pass your message to TheAthlete
melezhik SmokeMachine I see last 3 Red builds have succeeded on SparkyCI, which is really cool, that SparkyCI handled that and did not shut down - ha-ha ))) 22:27
Uploaded file: uploads.kiwiirc.com/files/26164c71...3%20PM.png 22:28
so you've managed to fix PostgreSQL tests?
SmokeMachine melezhik: still working on that… 23:09
tellable6 SmokeMachine, I'll pass your message to melezhik