🦋 Welcome to the MAIN() IRC channel of the Raku Programming Language (raku.org). Log available at irclogs.raku.org/raku/live.html . If you're a beginner, you can also check out the #raku-beginner channel!
Set by lizmat on 6 September 2022.
Nemokosch Marcool04: the watch issue got resolved by reverting the problematic comment; to-be added to the next release 00:07
00:10 reportable6 left, reportable6 joined 00:42 euandreh left 00:44 sortiz left, euandreh joined 00:50 rir left 01:19 discord-raku-bot left, discord-raku-bot joined 01:55 squashable6 left 01:57 squashable6 joined 02:02 razetime joined 02:15 justPardoned left 02:16 justache joined 02:36 Kaipei left 02:48 euandreh left 02:50 euandreh joined, euandreh left 03:01 avuserow joined 03:15 Kernspin left, Kernspin joined 03:32 razetime left 03:44 jjatria left, jjatria joined
avuserow When I'm using nativecall to call a function that mallocs a char* (and define it in raku as `sub foo() returns Str is native("foo") {*}`), it seems this never gets freed by raku. Is there a way to tell raku to take ownership of this Str and free it when it is no longer needed by raku? 03:50
03:50 camelia left, jcallen left, jcallen joined 03:54 camelia joined 03:57 Kaiepi joined 03:58 guifa_ left, donpdonp|z left, moritz left, Sevalecan left, andreoss left 03:59 moritz joined, andreoss joined, donpdonp|z_ joined, guifa joined 04:00 Sevalecan joined 04:03 gfldex joined 04:04 Juerd joined, samebchase joined, PotatoGim_ joined 04:07 RakuIRCLogger left, RakuIRCLogger joined 04:16 Altreus left, leont left, rjbs left, kawaii_ left, tbrowder left, ugexe left, kawaii_ joined, leont joined, tbrowder joined 04:17 ugexe joined, rjbs joined, Altreus joined 04:26 justache left 04:29 justache joined 04:32 zostay left, leedo left, thowe left, samcv left, dg left, dutchie left, elcaro left, destroycomputers left, pierrot left, dpk left, dpk joined, elcaro joined, thowe joined, zostay joined 04:33 leedo joined 04:34 samcv joined, dg joined, pierrot joined, dutchie joined 04:35 destroycomputers joined, razetime joined
razetime accidents? 04:41
like, road accidents?
04:51 razetime left 05:08 razetime joined 05:09 Kaiepi left 05:11 Sauvin left, Bocaneri joined 05:12 Bocaneri is now known as Guest8611 05:13 rumgzy joined 05:15 justache left 05:16 Guest8611 left 05:17 justache joined 05:19 Kernspin left 05:21 Kernspin joined 06:01 donpdonp- joined 06:03 donpdonp|z_ left, andreoss left, andreoss joined 06:07 reportable6 left, reportable6 joined 06:11 razetime left 06:12 razetime joined 06:37 samcv left, samcv_ joined 06:38 destroycomputer- joined 06:39 destroycomputers left 06:55 razetime left 07:20 razetime joined 07:47 Abhoerschutz left, Abhoerschutz joined 08:07 andreoss left, andreoss` joined 08:16 greppable6 left, shareable6 left, unicodable6 left 08:17 linkable6 left, evalable6 left, reportable6 left, bloatable6 left, bisectable6 left, releasable6 left, benchable6 left, nativecallable6 left 08:18 squashable6 left, coverable6 left, statisfiable6 left, quotable6 left 08:19 notable6 left, committable6 left, tellable6 left, sourceable6 left 08:39 Sgeo left 08:41 samcv_ left 08:42 samcv joined 08:49 jjido joined 08:54 Kaiepi joined 09:03 razetime left 09:23 razetime joined 09:49 Kernspin_ joined 09:51 Abhoerschutz left 10:06 jjido left 10:12 sena_kun joined 10:45 samcv left, samcv joined
Nemokosch avuserow: I would be surprised but this is only my gut feeling 10:48
11:51 Abhoerschutz joined 11:53 Kernspin_ left 12:13 Altai-man joined 12:16 sena_kun left 12:47 Altai-man left 12:57 RakuIRCLogger left 12:58 RakuIRCLogger joined 12:59 jjido joined, rumgzy is now known as Sauvin
avuserow @Nemokosch: surprised if this is possible? 13:52
13:56 razetime left
avuserow taking a step back, I'm really just looking for memory management strategies with nativecall using CArray/Str which don't leak 14:02
14:05 razetime joined
El_Che good point 14:23
I understand the use case, memory safe languages giving that up for a library feels like a Faustian bargain :) 14:24
if the ecosystem is big enough, I try to avoid library with C code. 14:25
(not the case for raku, atm)
Nemokosch yes, I'd be surprised if this was possible
avuserow Yeah. This is my long-running hobby project of a music player, in which raku is fast enough as the web backend plus glue code. 14:26
El_Che nice 14:28
avuserow Though I'm speed constrained in some areas. For extracting metadata, if I convert from a CArray to a Blob[uint8] for some data, I go from ~1200 files per second to 24 per second. So I'm keeping that as a CArray and then using nativecall to write it to a file.
El_Che understandable
order of magnitude :) 14:29
avuserow I just can't afford to leak ~45kb memory per file across 27000 files
14:29 jjido left
El_Che you'd pay in io time 14:29
14:30 jjido joined
Nemokosch almost 2 orders of magnitude 14:31
I mean it's really mindblowing
avuserow I keep the data in a CArray, I can make multiple calls into C/C++ and it's only about 10% slower than doing it in a single C routine 14:34
El_Che that's good 14:35
avuserow if I make some helpers that take CArrays to e.g. do sha256 of the data, or write it to disk, I can still be fast enough while being fairly modular
El_Che nice design 14:36
14:36 coleman left, coleman joined
El_Che starting from real bottlenecks and not beind dogmatic about it 14:36
14:37 jjido left
avuserow this is effectively a version 2 of a project originally written in Perl 5. Raku is forcing me to do things like write efficient SQL queries rather than do a for loop with N select queries :) 14:38
El_Che oh, writing good queries is where the huge gain is in my experience, in all languages :) 14:39
avuserow one of these days I'll make this public but progress is slow due to dayjob, a toddler, and wrist pain. 14:40
El_Che even faster ones :)
avuserow I'm cheating in some places, using postgres to make some of the bigger json responses directly to avoid json serialization in raku
El_Che I have one app in production that had so so queries because the scope was small. Now it's used a lot with lots of new use cases, so I am working on the sql queries atm :)
I wanted to write that app in raku then, but we only had mysql/mariadb at work and no posgres 14:41
now we are introducing posgres as well, but it's still young architecture wise 14:42
14:42 coleman left, coleman joined
El_Che need some work to make the cluster rock stable 14:42
avuserow postgres has lots of goodies, especially if you need json 14:43
I think it also has some nice full text search that I want to play with
and for code re-use, there's also the CTEs (WITH statements) that's on my list to try 14:44
El_Che I try to keep my code db agnostic most of the time, though
but more often that not I end writing raw sqls
and that make it less portabl
avuserow kind of depends in my experience. raw SQL is superficially harder due to quoting. but even with an ORM or SQL builder, you can easily call functions that are non-portable 14:46
El_Che tru
Nemokosch anyway, I think it's fairly useful if you report back on what is way too slow in pure Raku
avuserow that's a big motivation of doing this project in raku. basically to see if it's usable (it is), and what that means (issues, shortcuts, etc) 14:49
this is fairly heavy on the glue code aspect though. I'm never planning to do metadata extraction or audio playing directly in Raku so those will always interface with C/C++ 14:50
do we have a JIT for ARM yet? I managed to get this running on a Raspberry Pi 4B so I'm pretty impressed with that aspect of our performance if that's without a JIT 14:53
El_Che no jit
Nemokosch Yeah audio playing is fair. I think we try to compete with languages like JS, Perl or Python performance-wise. Losing somewhat is okay but losing by miles is probably a "show stopper". And playing audio is definitely done by C++ modules on Node as well 14:55
(eww gyp) 14:56
avuserow at least we're fast enough to have a volume slider send websocket commands and change volume real-time over the network. it sounds simple but the latency budget is pretty low here 15:15
this is with my Net::Snapcast module for multiroom audio 15:16
15:16 razetime left
Anton Antonov weekly: rakuforprediction.wordpress.com/20...aku-files/ 15:23
15:25 razetime joined
Nemokosch not sure if that bot works from here ^^ 15:29
Anton Antonov <@297037173541175296> Thanks for the prompt ! 15:58
16:03 Nemokosch joined
Nemokosch weekly: rakuforprediction.wordpress.com/20...aku-files/ 16:04
Nemokosch um, no avail? 16:05
oh, the bot itself is offline 😆
perhaps there is some IRC issue indeed... 16:07
on Libera
Anton Antonov I am getting this error:
Nemokosch same with kiwiirc
Anton Antonov Ok, thanks for checking!
Ok, thanks for checking / verifying !
Nemokosch Pidgin works but yeah, the bots seem to be offline
16:07 Nemokosch left
Geth doc: usev6++ created pull request #4119:
Minor cleanup to compilation tutorial
16:39 bigfondue joined 17:06 Xliff joined
tbrowder m: my $f = "/tmp/t"; sub f(IO::Path:D $f) { slurp $f }; f($f); 17:16
camelia Type check failed in binding to parameter '$f'; expected IO::Path but got Str ("/tmp/t")
in sub f at <tmp> line 1
in block <unit> at <tmp> line 1
tbrowder that's what i expected and want, but i'm not seeing it in a module test, weird, ..., back to the bug hunt... 17:19
17:24 jjido joined, Sgeo joined 17:37 razetime left 18:11 sena_kun joined 18:21 Altai-man joined 18:24 sena_kun left
guifa huh 18:32
this is weird
so last night I did a test of DateTime::React to test with the timezone roll over
It seems every event only triggered once
and now that I'm testing, it seems that my supplies are just.... silently disappearing? 18:33
strangely though, if I have two separate react blocks, it runs no problem 18:44
18:58 Guest75 joined
thowe So, there's no Net::Server for Raku that I can find... What's the best way to fake it? Specifically looking to run as a server on OpenBSD. 19:05
19:11 bigfondue left 19:16 jjido left, bigfondue joined 19:19 jjido joined 19:24 Guest75 left 19:25 Sgeo_ joined 19:26 bigfondue left 19:28 Sgeo left 19:33 bigfondue joined
guifa AHA 19:50
so as much as supply { ……… emit ……… } is a nice looking structure
it's not a live supply 19:51
19:52 jjido left
Nemokosch thowe: what is Net::Server? 😄 20:11
20:12 jjido joined
thowe Nemokosch: it wraps your program in a framework to act as a server process on (at least) unix-like machines and handles all the various niceties of being such a thing. metacpan.org/dist/Net-Server/view/...Server.pod 20:31
Net::Daemon is a similar thing 20:33
for Perl 5
20:41 Altai-man left
Nemokosch What do you want to serve? 20:50
Anton Antonov I want to write / submit a package using the Web service DeepL (see deepl.com). What would be a good or proper name for that package? 1) "WebService::DeepL" , 2) "Lingua::Translation::DeepL::APL" ? 20:52
20:59 antononcube joined
antononcube I want to write / submit a package using the Web service DeepL (see deepl.com/). What would be a good or proper name for that package? 1) "WebService::DeepL" , 2) "Lingua::Translation::DeepL::APL" ? 20:59
Xliff guifa: It isn't? 21:12
japhb: Around?
guifa Xliff: it is't. It's an on-demand one
Anton Antonov I want to write / submit a package using the Web service DeepL (see deepl.com). What would be a good or proper name for that package? 1) "WebService::DeepL" , 2) "Lingua::Translation::DeepL::API" ? 21:13
Xliff Can't you do: my $s = do suppy { ... emit ... }; $s.Suppy.tap(...) ? 21:14
antononcube I meant "Lingua::Translation::DeepL::API" (not "Lingua::Translation::DeepL::APL".)
21:16 Nemokosch joined
Xliff Wow. That indeed does not work. 21:16
21:16 Nemokosch left
Xliff antononcube: WebService::DeepL is fine, but Lingua::Translatiion::DeepL is probably better 21:19
antononcube Xliff Ok -- thank you for your feedback! 21:21
21:36 antononcube left 21:40 reportable6 joined 21:41 benchable6 joined 21:42 shareable6 joined, quotable6 joined, nativecallable6 joined, linkable6 joined, releasable6 joined, unicodable6 joined, notable6 joined, coverable6 joined, bloatable6 joined, greppable6 joined, statisfiable6 joined 21:43 committable6 joined, evalable6 joined, squashable6 joined, tellable6 joined
Geth doc: 9a9359d5b6 | (Christian Bartolomäus)++ (committed using GitHub Web editor) | doc/Language/compilation.pod6
Minor cleanup to compilation tutorial (#4119)
linkable6 Link: docs.raku.org/language/compilation
21:45 jjido left 21:46 linkable6 left 21:47 linkable6 joined 22:04 kaskal- is now known as kaskal 22:43 bisectable6 joined 22:45 sourceable6 joined 23:10 epony left 23:58 justache left