🦋 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.
00:16 tejr joined 00:34 buildable6 left 00:37 buildable6 joined 01:37 buildable6 left 01:40 buildable6 joined 02:40 buildable6 left 02:41 buildable6 joined 02:46 buildable6 left, buildable6 joined 03:22 dbonnafo joined 03:26 dbonnafo left 03:41 buildable6 left 03:43 buildable6 joined 03:47 buildable6 left, buildable6 joined 04:43 buildable6 left, CIAvash joined 04:46 buildable6 joined 05:46 buildable6 left 05:49 buildable6 joined 06:39 abraxxa joined 06:49 buildable6 left 06:52 buildable6 joined 06:56 buildable6 left 06:57 buildable6 joined 07:23 dbonnafo joined 07:27 dbonnafo left 07:40 sena_kun joined 07:52 buildable6 left 07:54 buildable6 joined 07:56 dakkar joined 08:04 lichtkind joined 08:09 Sgeo left
ab5tract_ Raku Advent Calendar (2009-2019) | Something cool about Raku (formerly known as Perl 6) every day of December until the 24th perl6advent.wordpress.com/ 08:38
It’s a bit of a shame that it’s not all in one place but I guess it makes some sense because of Perl 6 vs Raku 08:42
lizmat I looked to see if there was a remastered version already at github.com/Raku/CCR/tree/main, but alas 08:43
ab5tract_ I think this was the first programming advent calendar I ever encountered 08:44
They certainly have gotten much more popular since then 08:45
08:47 jpn joined 08:54 buildable6 left 08:55 buildable6 joined 09:02 jpn left
vendethiel Ah, thanks 09:13
2014… I’m feeling old 09:14
patrickb Hi! I'm looking for a way to turn an IO::Handle into an IO::Socket::Async. (I'm implementing FCGI. By spec STDIN is a socket that could either be a unix socket or a TCP socket.) 09:22
dakkar looks like… you can't 09:26
patrickb leont: You've recently done unix sockets (I'm using those, thanks!), can you give a pointer if and how I could construct such an IO::S::A?
dakkar I was expecting IO::Handle and IO::Socket to have a constructon that takes a file descriptor (we have `.native-descriptor` to get it), but I don't see it 09:27
leont Yeah, you can't turn sync into async and that annoys me too. 09:28
It was next on my todo list but haven't gotten around to it
dakkar not only that, you can't turn an already-opened fd (0, for example, in patrickb's case) into a IO::* object
patrickb OK. Thanks for the quick reply!+ Then this will stay a NYI for now. 09:29
leont Our async model is great, our async implementation is lacking severely 09:30
lizmat I think you technically can create an IO::Handle out of an opened fd 09:32
dakkar ooh? I've missed that 09:33
lizmat but it would need nqp trickery, setting the $!native-descriptor attribute directly?
dakkar aah, the $!PIO attribute
lizmat right that one :-)
dakkar and no, that's not what I would call "supported" 😜
leont In my particular use-case I need an async handle though 09:35
patrickb me too...
09:37 jpn joined
lizmat well, we could make it supported if my approach actually works ? 09:39
dakkar it *should* work, assuming the OS agrees with Raku about the state of the fd (O_NONBLOCK at the very least) 09:53
I don't know how much access nqp/libuv give to that level of detail 09:54
09:55 buildable6 left
lizmat neither 09:56
09:57 buildable6 joined 09:58 CIAvash left
El_Che hi 10:09
leont nqp doesn't, libuv does. 10:20
dakkar so there's hope ☺ 10:21
looking at the perl counterpart, metacpan.org/module/IO::Async::Handle/source it just trusts the fd given 10:23
so just setting $!PIO might be enough
worth a try!
dakkar does not try
10:57 buildable6 left 10:58 buildable6 joined 11:24 dbonnafo joined 11:28 dbonnafo left 11:41 teatwo joined 11:44 tea3po left
ab5tract_ lol 11:58
11:58 buildable6 left 11:59 buildable6 joined 12:29 abraxxa left, abraxxa1 joined 12:59 buildable6 left 13:02 buildable6 joined
lizmat And yet another Rakudo Weekly News hits the Net: rakudoweekly.blog/2023/10/23/2023-...leastober/ 13:09
13:39 jpn left 13:40 jpn joined
[Coke] raku.land/zef:guifa/Intl::Regex::CharClass - anyone know where the git repo for this is? 13:56
also, clicking on "Write me!" on that page is a 404
nemokosch yeah that's a funny one 13:57
my guess would be that it's the repo url in the META6 file :DD
[Coke] I didn't download it yet, but wouldn't raku.land already be parsing and showing that? 13:59
also, the author name doesn't match the zef:guifa, based on other zef:guifa repos 14:00
14:02 buildable6 left
[Coke] there isn't a git repo in the meta6 14:02
14:05 buildable6 joined 14:06 japhb left
[Coke] .seen alabamenhu 14:12
tellable6 [Coke], I haven't seen alabamenhu around
[Coke] .seen guifa
tellable6 [Coke], I saw guifa 2023-10-20T00:56:03Z in #raku: <guifa> o/
[Coke] .ask guifa is raku.land/zef:guifa/Intl::Regex::CharClass you?
tellable6 [Coke], I'll pass your message to guifa
14:16 japhb joined
nemokosch I downloaded it and I'm not sure what you meant 14:27
the author is zef:guifa, like with other dists 14:28
and it really contains "source-url": "Write me!",
14:30 dakkar left 14:35 dakkar joined 15:05 buildable6 left 15:06 buildable6 joined
[Coke] ahhhhhh. I didn't make that connection. 15:11
thank you.
Ugh. if a file doesn't exist in $*ARGFILES, it's throwing an adhoc error 15:14
I want to distinguish the error handling so I can say "the file you specified doesn't exist" vs. "the file you specified was empty", and the natural way for me is to catch the exceptions and report out. Now I probably have to manually walk the args and check for existence by hand. 15:16
... that's a job for future me. 15:17
15:25 dbonnafo joined 15:30 dbonnafo left
El_Che future you tried to warn you by travelling to the past, but created a paradox resulting in life never existed 15:32
16:06 buildable6 left 16:08 buildable6 joined 16:12 buildable6 left, buildable6 joined 16:16 buildable6 left 16:17 buildable6 joined
tbrowder__ .seen ugexe 16:37
tellable6 tbrowder__, I saw ugexe 2023-10-22T22:04:24Z in #raku: <ugexe> appveyor has like a gig less ram and one less core of the same speed of the gh action runner
tbrowder__ .tell ugexe the $?DISTRIBUTION.content is failing on an installed module. 16:38
tellable6 tbrowder__, I'll pass your message to ugexe
ugexe You should probably show code that shows that to be true 16:39
m: my $dist = $*REPO.resolve(CompUnit::DependencySpecification.new(:short-name<Test>)).distribution; say $dist.content("lib/Test.rakumod").slurp(:close) 16:41
camelia read bytes requires an object with REPR MVMOSHandle (got Scalar with REPR P6opaque)
in block <unit> at <tmp> line 1
ugexe m: my $dist = $*REPO.resolve(CompUnit::DependencySpecification.new(:short-name<Test>)).distribution; say $dist.content("lib/Test.rakumod").open.slurp(:close)
camelia use MONKEY-GUTS; # Allow NQP ops.

unit module Test;
# Copyright (C) 2007 - 2022 The Perl Foundation.

# settable from outside
my int $raku_test_times =
?(%*ENV<RAKU_TEST_TIMES> // %*ENV<PERL6_TEST_TIMES>);
my int $die_on_fa…
ugexe seems like it works to me
tbrowder__ the module is in github and fez. i need to make 16:42
ugexe doesn't matter where it is
tbrowder__ a simple one for demo
ugexe oh you mean to show your code
show me the repo
i might not need a simple demo 16:43
tbrowder__ to see just the simplest code without the rest. i should have done that before i complained
repo is github/tbrowder/Mi6-Helper, branch new-ver 16:44
ugexe $?DISTRIBUTION.content(".github/workflows/linux.yml").open.slurp; 16:46
is that what you expect to work? because that file isn't part of the distribution
tbrowder__ yes
ugexe if its not in META6.json then you can't access it with .content (other than bin/ files, which get listed in META6.json upon install) 16:47
tbrowder__ ah, that's it, my bad. you are good
thanks a heap, i can fix it now
ugexe it might be possible to configure github actions to look in like resources/.github, and then you could put those files there instead 16:48
tbrowder__ i think i'll just dup the files for now 16:49
localize my problem
bye 16:50
17:01 dakkar left 17:08 buildable6 left 17:10 buildable6 joined 17:13 unicodable6 left, unicodable6 joined 17:15 buildable6 left, buildable6 joined 17:55 abraxxa1 left 18:10 buildable6 left 18:14 buildable6 joined 18:18 buildable6 left, buildable6 joined 19:14 buildable6 left 19:15 buildable6 joined 19:16 dbonnafo joined 19:21 dbonnafo left 19:23 jpn left
tbrowder__ ugexe: i need to change the docs entry on $?DISTRIBUTION.content since it is misleading. also, i'm not sure it should even be discussed since i see no practical use for it for a normal module author. i finally had to use %?RESOURCES{$file} to access files i needed after installation. 19:26
(and that worked great) 19:28
(and, contrary to previous discussions, i can confirm the resources files must be listed in the META6.json file) 19:31
ugexe if %?RESOURCES has access to a file that isn't in $?DISTRIBUTION then that is something broken with %?RESOURCES 19:39
I assure you that $?DISTRIBUTION.content does precisely what it is intended to do. %?RESOURCES not so much 19:40
i still haven't seen an example of what is not working that should actually work
19:42 jpn joined
ugexe for example if you install a distribution how could it possible access the relative path .github/? For one everything in that path is not getting installed, so for an installed distribution how could it possible use $?RESOURCES{".github/..."} and expect it to work? The only way to expect it to work is if you expect your current working directly to affect installed modules, which is a big security 19:43
issue itself
the docs state "is a relative path as it would be found in the metadata" 19:45
is .github/ in the meta data?
actually i think i'm partly confused; i was responding to "contrary to previous discussions" but it seems like it is in agreement with the previous discussion 19:49
given the distribution at your latest push, $?DISTRIBUTION.content("resources/linux.yml") is going to work 19:50
if it isn't working i suspect you have a typo or leaving off a path part or something else. but that bit of code will work
i also don't see any reason to not just use %?RESOURCES there though, so don't feel compelled to look into it 19:51
19:52 jpn left 20:15 buildable6 left 20:16 buildable6 joined 20:35 jpn joined 21:09 guifa joined 21:10 jpn left 21:16 buildable6 left 21:19 buildable6 joined
tbrowder__ no, i'm not using .github for access. i copied files to /resources. 21:54
then, when i tried to access then (after installation), i could not access them with $?DISTRIBUTION.CONTENT. 21:55
.content
but i could access them as %?RESOURCES{$filename}. 21:56
and re prev discussion, i think i said i could get access via RESOURCES without having them itemized in META, but that is false in my current testing 21:59
22:14 Sgeo joined 22:19 buildable6 left 22:21 buildable6 joined 22:28 sena_kun left 22:48 lichtkind left
guifa lizmat: I'm getting caught up right now on a bunch of stuff, saw that Postfix.new now takes a named argument. What other args does it take now? 23:00
tellable6 2023-10-23T14:12:46Z #raku <[Coke]> guifa is raku.land/zef:guifa/Intl::Regex::CharClass you?
guifa [Coke] yes. Unfortunately, it'll require a new CLDR version that I've been having trouble uploading 23:01
23:18 dbonnafo joined 23:22 buildable6 left, dbonnafo left 23:25 buildable6 joined 23:41 tea3po joined 23:44 teatwo left