00:05
arkiuat left
00:18
arkiuat joined
00:23
arkiuat left
00:36
arkiuat joined
00:40
arkiuat left
00:53
arkiuat joined
|
|||
disbot4 | <.landyacht.> Is there a way to wait and see whether an IO::Socket::Async::ListenSocket opened successfully or not? An error comes in through the Supply which I see logged in the quit routine provided to .tap, but I'm having trouble figuring out what becomes of the socket object itself and how to "test" it synchronously... | 00:58 | |
<.landyacht.> e.g. my $socket = IO::Socket::Async.listen($host, $port).tap(...); if $socket.??? { ... } | 00:59 | ||
01:00
arkiuat left
01:15
arkiuat joined
01:19
arkiuat left
01:24
kylese left,
hulk joined
|
|||
Voldenet | "synchronously"? | 01:32 | |
don't think it'd work, because in the `.???` place socket's state is not yet known | 01:34 | ||
because async listen is enqueued to be handled later, that's async socket for yoU | 01:35 | ||
maybe IO::Socket::INET would work better in your case | 01:36 | ||
01:38
deoac joined
01:42
arkiuat joined
|
|||
Voldenet | m: my $s = IO::Socket::Async.listen("127.1", 80).tap( -> { .say }, done => { .say }, quit => { .say }); say $s.socket-host.cause | 01:44 | |
camelia | Failed to resolve host name '127.1' with family 0. Error: Address family for hostname not supported in block <unit> at <tmp> line 1 Can only call cause on a broken promise (status: Planned) in block <unit> at <tmp> line 1 |
||
Voldenet | m: my $s = IO::Socket::Async.listen("127.0.0.1", 80).tap( -> { .say }, done => { .say }, quit => { .say }); say $s.socket-host.cause | 01:45 | |
camelia | Failed to resolve host name '127.0.0.1' with family 0. Error: Address family for hostname not supported in block <unit> at <tmp> line 1 Can only call cause on a broken promise (status: Planned) in block <unit> at <tmp> line 1 |
||
Voldenet | meh, either way, you can see that the promise is not broken yet | ||
m: my $s = IO::Socket::Async.listen("127.0.0.1", 80).tap( -> { .say }, done => { .say }, quit => { .say }); sleep 1; say $s.socket-host.cause | |||
camelia | Failed to resolve host name '127.0.0.1' with family 0. Error: Address family for hostname not supported in block <unit> at <tmp> line 1 Can only call cause on a broken promise (status: Planned) in block <unit> at <tmp> line 1 |
||
Voldenet | m: my $s = IO::Socket::Async.listen("127.0.0.1", 80).tap( -> { .say }, done => { .say }, quit => { .say }); say await $s.socket-host # you can also do await on the socket, or use .then | 01:47 | |
camelia | (timeout)Failed to resolve host name '127.0.0.1' with family 0. Error: Address family for hostname not supported in block <unit> at <tmp> line 1 |
||
Voldenet | …yep, it's deadlocking | ||
01:48
arkiuat left
01:54
arkiuat joined
02:15
hulk left,
kylese joined
03:23
stanrifkin_ joined
03:26
stanrifkin left
|
|||
disbot4 | <.landyacht.> so basically I try to open a number of listeners, and this might fail because the host and port are user-configurable | 03:32 | |
<.landyacht.> and, later on, I want to close them all, but this locks up indefinitely if any of them died/quit | |||
<.landyacht.> so I'm looking for a way to filter out (ideally early on) any that failed, but the failure e.g. to bind to a low port number doesn't actually happen on .listen but comes through as the Supply dying | 03:33 | ||
<.landyacht.> I do still want the other asynchronous aspects here, namely being able to react to connections being made without blocking waiting for a connection, especially since I do have potentially more than one listener | 03:35 | ||
<.landyacht.> I see a way to make a janky workaround but I was hoping there was something a little better :^) | 03:36 | ||
Voldenet | eh, close indefinitely awaits because it has no native-descriptor ever | 04:04 | |
to be honest, I think that's a bug | 04:08 | ||
> github.com/rakudo/rakudo/blob/5e8d...kumod#L275 | 04:09 | ||
this happens on error | |||
but VMIO-tobe is not ever broken by exception, leading to this hang on close: > github.com/rakudo/rakudo/blob/5e8d...kumod#L290 | |||
$VMIO-vow should be handled in the same way $host-vow is handled | 04:11 | ||
this would make close error instead of hanging | |||
instead of `$s.close` you can workaround this by doing `{ CATCH { default { warn $_ }}; await $s.socket-host; $s.close };` | 04:14 | ||
ofc, double close still would hang | 04:17 | ||
because .socket-host returns proper result after closing the listener | |||
04:46
dg left
04:50
kylese left,
kylese joined
04:53
dg joined
06:02
deoac left
06:07
arkiuat left
06:21
arkiuat joined
06:25
arkiuat left
06:38
japhb left
06:40
japhb joined
06:53
arkiuat joined
06:58
arkiuat left
07:02
deoac joined
07:14
Sgeo left
07:27
arkiuat joined
07:29
kylese left
07:31
kylese joined
07:32
arkiuat left
07:49
arkiuat joined
07:53
arkiuat left
07:56
dakkar joined
08:03
wayland joined
08:06
arkiuat joined
08:18
arkiuat left,
wayland left
08:19
wayland joined,
deoac left
08:26
melezhik joined
08:29
wayland left,
wayland joined
08:31
arkiuat joined
08:35
arkiuat left
08:39
wayland left,
wayland joined
08:49
wayland left
08:50
wayland joined,
arkiuat joined
08:54
lichtkind joined,
arkiuat left
09:00
wayland left,
wayland joined
09:20
wayland left,
wayland joined
09:22
arkiuat joined
09:27
arkiuat left
09:45
wayland left
09:46
wayland joined
09:49
wayland left
09:51
arkiuat joined
09:55
arkiuat left
09:58
wayland76 joined
10:18
wayland76 left,
wayland76 joined
10:24
arkiuat joined
10:28
arkiuat left,
wayland76 left
10:29
wayland76 joined
10:39
wayland76 left,
wayland76 joined
10:45
apac joined
10:52
arkiuat joined
10:56
arkiuat left
11:04
wayland76 left,
wayland76 joined
11:09
wayland76 left
11:10
wayland76 joined
11:20
arkiuat joined
11:25
arkiuat left
11:30
wayland76 left,
wayland76 joined
11:45
wayland76 left
11:46
wayland76 joined
11:53
arkiuat joined
11:57
arkiuat left
12:20
arkiuat joined
12:24
arkiuat left
12:26
wayland76 left,
wayland76 joined
12:31
wayland76 left,
wayland76 joined
12:41
wayland76 left
12:42
wayland76 joined
12:54
arkiuat joined
|
|||
tbrowder | m: use Test; my $sa = Set("a"); my $sb = Set("b"); say ($sa (&) $b) | 13:24 | |
camelia | ===SORRY!=== Error while compiling <tmp> Variable '$b' is not declared. Perhaps you forgot a 'sub' if this was intended to be part of a signature? at <tmp>:1 ------> t("a"); my $sb = Set("b"); say ($sa (&) <HERE>$b) |
||
tbrowder | m: my $a = Set("a"): my $b = Set("b"); ($a (&) $b).say | 13:26 | |
camelia | ===SORRY!=== Error while compiling <tmp> Confused at <tmp>:1 ------> my $a = Set("a"):<HERE> my $b = Set("b"); ($a (&) $b).say expecting any of: colon pair |
||
13:27
wayland76 left,
wayland76 joined
|
|||
tbrowder | m: my $a = Set("a"); my $b = Set("b"); ($a (&) $b).say | 13:37 | |
camelia | Set() | ||
tbrowder | m: use Test; my $a = Set("a"); my $b = Set("b"); ($a (&) $b).say; comp-ok $a (&) $b, 'cmp', Set(); | 13:40 | |
camelia | ===SORRY!=== Error while compiling <tmp> Undeclared routine: comp-ok used at line 1. Did you mean 'cmp-ok'? |
||
tbrowder | m: use Test; my $a = Set("a"); my $b = Set("b"); ($a (&) $b).say; cmp-ok $a (&) $b, 'cmp', Set(); | ||
camelia | Set() Use of uninitialized value of type Set(Any) in string context. Methods .^name, .raku, .gist, or .say can be used to stringify it to something meaningful. in block at /home/camelia/rakudo-m-inst-1/share/perl6/core/sources/F96324C50ED9AD7… |
||
tbrowder | pardon errrs, but i'm trying to test that two sets don't overlap (i.e., no common members) and can't get the syntax right. | 13:43 | |
m: use Test; my $a = Set("a"); my $b = Set("b"); ($a (&) $b).say; cmp-ok $a (&) $b, 'cmp', Set(""); | |||
camelia | Set() not ok 1 - # Failed test at <tmp> line 1 # expected: Set.new("") # matcher: 'infix:<cmp>' # got: Set.new() |
||
tbrowder | woe is me, chatgpt has failed me again! | 13:44 | |
13:47
wayland76 left,
wayland76 joined
|
|||
dakkar | m: use Test; my $a=Set('a'); my $b=Set('b'); is-deeply ($a (&) $b), Set.new(); | 13:50 | |
camelia | ok 1 - | ||
dakkar | tbrowder: ☝ | ||
"is the intersection the same as an empty set" | 13:51 | ||
m: use Test; my $a=Set('a'); my $b=Set('b'); is-deeply ($a (&) $b), ∅; | |||
camelia | ok 1 - | ||
dakkar | also that | ||
m: use Test; my $a=Set('a'); my $b=Set('b'); is ($a (&) $b).elems, 0; | 13:52 | ||
camelia | ok 1 - | ||
13:52
wayland76 left
13:53
wayland76 joined
13:58
wayland76 left,
wayland76 joined
|
|||
tbrowder | dakkar: yes, the result should be the empty set. thanks! | 13:58 | |
chatgpt said i could use is-deeply, but there should be a way to do the same with another Test method. | 14:00 | ||
dakkar | is-deeply is designed to compare structures, so it's what I wolud definitely use for anything more complicated than a number or string | 14:02 | |
disbot4 | <nahita3882> nok $a ∩ $b | 14:05 | |
ab5tract | anyone using Linux with a HiDiPi screen? I was hoping things had gotten better since a few years ago but it's not immediately clear that they have... | 14:17 | |
14:18
wayland76 left,
wayland76 joined
|
|||
tbrowder | you're probably right, but i have had probs using is-deeply in the past. thank you my raku friend! | 14:29 | |
14:33
wayland76 left
14:34
wayland76 joined
14:39
wayland76 left,
wayland76 joined
|
|||
tbrowder | nahita: thnx | 14:53 | |
15:34
stanrifkin joined
|
|||
disbot4 | <bscan> I've been thinking about making some updates to the Raku Navigator (Language Server for Raku). Anyone have general feedback about it, or interested in helping with improvements? | 15:51 | |
[Coke] | is there a link to the project? | 15:52 | |
ab5tract | bscan: I'd like to help. if I can | 15:57 | |
disbot4 | <bscan> Yep. It's here: github.com/bscan/RakuNavigator And the vscode marketplace link: marketplace.visualstudio.com/items...-navigator It's currently the only Raku extension in the vscode marketplace (which also means the only extension for forks like Cursor and Windsurf). As a language server, it also works for other editors like neovim and emacs | 15:58 | |
ab5tract | bscan: I've often wondered whether using introspection on RakuAST would be helpful | ||
but I currently don't have an LSP set up because I'm always dogfooding the raku intellij plugin | 15:59 | ||
15:59
librasteve_ left,
wayland76 left,
wayland76 joined
|
|||
[Coke] | More support for vs code would be nice to have, but will only be a quality improvement for a small # of users at my $dayjob maybe. (not a huge priority) | 16:00 | |
ugexe | bscan: jump to definition and find references | 16:04 | |
disbot4 | <bscan> RakuAST could be helpful. It used to work by use QAST:from<NQP>; and then parsing and looping over statement lists with: for $parsed.hash.<statementlist>.hash.<statement>.list -> $k { I ended up removing all of that code because it wasn't very error-tolerant and didn't really give the things needed by a language server. | 16:05 | |
<bscan> jump to definition currently works for functions within the same file, variables, and for jumping to modules (see gif). It does not currently jump to imported functions though since it doesn't know where the functions came from. Find references would be a nice feature to add. | 16:13 | ||
<bscan> cdn.discordapp.com/attachments/633...5156b& | |||
ugexe | need to be able to jump to namespaces and methods | 16:20 | |
jumping to a function in the same file isn't exactly useful (no offense) | 16:21 | ||
fwiw i use raku navigator and vscode | 16:22 | ||
i also use perl navigator with vscode at work :P | |||
but the go language server and typescript language server vscode integration stuff i use at work is really on another level | 16:23 | ||
disbot4 | <bscan> Ha. Agreed. Jumping to different files is far more important. Jump to definition currently works on packages and methods in the same file, so at least the core parsing logic is available. Perl Navigator is much better at jumping to files. It compiles the current file and looks through the resulting symbol table to resolve the locations of imported functions and packages. | 16:25 | |
<bscan> Typescript is incredible from an LSP perspective. The language is really designed with LSP in mind. | 16:26 | ||
16:30
Guest21 joined
16:39
dakkar left
16:40
Guest21 left
17:56
melezhik left
18:08
librasteve_ joined
|
|||
librasteve_ | notable6: weekly | 18:09 | |
notable6 | librasteve_, 7 notes: gist.github.com/c8235b5cbbc16e7ad4...88854b6a7a | ||
tonyo | fez v100 is being uploaded. new installs of fez will default to that version. it has breaking changes in it. if you run into issues and _just need it to work right now_, then you can reinstall the older version of fez and that will continue to work | 18:13 | |
for another few months while i work through any problems people encounter | |||
lizmat | tonyo: does this affect App::Mi6 integration ? | 18:14 | |
tonyo | mi6 should likely pin to 55 until they update their upload call | ||
the backwards incompatible bit is that you upload the file directly now | 18:15 | ||
lizmat | skaji__ ^^ | ||
tonyo | the API files include an updated caller so it could* be a one liner depending on how you're using it | 18:16 | |
already installed and working versions will continue to work unless you upgrade fez locally | 18:18 | ||
librasteve_ | notable6: weekly reset | ||
notable6 | librasteve_, Moved existing notes to “weekly_2025-08-04T18:18:53Z” | ||
ugexe | it is probably important to look at how mi6 invokes fez. having two versions of fez installed won't help if it is invoking the fez binary and not using the modules directly | 18:21 | |
tonyo | if it's using the binary then its interface hasn't changed, just the underlying upload mechanism | 18:28 | |
but yes, need to know how mi6 uses fez to be sure. i'd presume it's using the ::API | 18:29 | ||
ugexe | my @cmd = $*EXECUTABLE, "-e", "use Fez::CLI", "--file=$tarball", "upload"; | ||
should be fine then | 18:30 | ||
tonyo | it may affect an IDE, i don't recall the name - which was the reason for making the ::API stuff | ||
18:42
arkiuat left
18:43
arkiuat joined
18:44
melezhik joined
|
|||
melezhik | . | 18:44 | |
18:48
arkiuat left
|
|||
librasteve_ | rakudoweekly.blog/2025/08/04/2025-...y-turtles/ | 18:49 | |
19:06
DavidSch joined
19:16
arkiuat joined
19:21
arkiuat left
19:36
arkiuat joined
19:54
arkiuat left
20:21
arkiuat joined
20:28
arkiuat left
20:31
silug4 joined,
silug left,
silug4 is now known as silug
20:45
arkiuat joined
20:51
arkiuat left
20:55
Aedil left
21:20
arkiuat joined
|
|||
disbot4 | <librasteve> sooo... does App::Rak extract data from html tables? | 21:22 | |
21:29
arkiuat left
21:36
melezhik left
21:41
arkiuat joined,
lichtkind left
21:45
arkiuat left
21:48
DavidSch left
21:49
DavidSch joined
|
|||
lizmat | librasteve you can specify html files with the --extensions=html but that's it: it will just consider the HTML file as text | 22:05 | |
if you have a module that parses HTML into some kind of object, you could use that inside rak if you want | |||
22:08
guifa joined
22:14
arkiuat joined
22:19
arkiuat left
|
|||
disbot4 | <librasteve> okaay ... tx! | 22:19 | |
<librasteve> off to rtfm | 22:21 | ||
22:27
Sgeo joined
22:30
deoac joined
22:42
arkiuat joined
22:51
apac left
23:07
wayland76 left
|
|||
disbot4 | <antononcube> hm... this can / should be a functionality of "Data::Translators". | 23:21 | |
<antononcube> Of course, LLMs extract that kind data too, if the HTML code is small enough. | 23:22 | ||
23:25
guifa left
23:46
arkiuat left
23:52
arkiuat joined
23:59
arkiuat left
|