00:11 arkiuat joined 00:16 arkiuat left 00:44 arkiuat joined 00:48 arkiuat left 01:06 kjp joined 01:11 arkiuat joined 01:16 arkiuat left 01:31 arkiuat joined 01:36 arkiuat left 01:46 sibl joined 01:55 arkiuat joined 03:16 kjp left, kjp joined 03:21 sibl left 03:37 sibl joined 03:38 arkiuat left 03:40 arkiuat joined 03:42 sibl left 03:46 sibl joined 04:00 sibl left 04:02 sibl joined 05:07 disbot12 left 05:08 disbot13 joined 09:09 dakkar joined 09:43 arkiuat left
simon_sibl How should I do to have the "Client on $caddr is gone" when a client shut down the connection ? and also how can I make sure the socket is listening before the "Listening on tcp:///..." (a addr already in use could happen) ? glot.io/snippets/hfheilp6bn 10:09
10:15 sibl left
nemokosch for "how to make sure the socket is listening" - I suppose you could fall back to port 0 and let the OS choose one 12:18
12:24 sibl joined
simon_sibl I mean, the point is that the user can give a cli argument to choose their port 🥹 12:25
12:25 sibl left
nemokosch I mean, if the port is already in use, I don't think there is anything else you could do in any other software 12:26
you either tell them to choose something else, or gracefully choose one for them
12:27 sibl joined
simon_sibl I meant, I want to write "Listening on..." only after I am sure the socket is listening 12:27
for now its not the case
it's async 12:28
nemokosch honestly I have no idea how these things are scheduled but either way you could add an exception handler because I cannot see one 12:32
it's a bit baffling that I also cannot find anything in the docs about the client having any control over the socket's lifetime 12:39
I think the long example at the top (the hello world http server) is the closest we can get docs.raku.org/type/IO/Socket/Async 12:42
here, it's the exhaustion of incoming lines - I think a Supply can be handled more generally 12:43
docs.raku.org/type/Supply#method_on-close 12:44
> When using a react or supply block, using the CLOSE phaser is usually a better choice. Well, it would be nice to see an actual example, wouldn't it 😅 12:45
for the "listening on", I'm tempted to say don't use the react block for setting the listener up; I think there was a Promise interface 12:47
hm, not exactly, it's a Supply - but the idea is the same 12:48
okay, so by trial and error, it seems that you cannot detect this separately from all the other errors that might happen during listening 12:57
12:58 sibl left 12:59 sibl joined
well, that's not ideal 12:59
okay, I have an idea 13:02
oh, it's called &tap 13:06
13:07 Nemokosch joined
Nemokosch I wonder if it runs here 13:07
m: my $server = IO::Socket::Async.listen('0.0.0.0', 8080); $server.tap(-> $conn {}, tap => { say "HURRA" }, quit => { .&dd }) 13:08
camelia HURRA
X::AdHoc.new(payload => "Failed to resolve host name '0.0.0.0' with family 0.\nError: Address family for hostname not supported")
Nemokosch to my taste, the tap shouldn't have run if there was an obvious error during setup...
13:09 Nemokosch left
nemokosch alright, I give up 13:09
to get the exception is easy, to get the moment when the tap was SUCCESSFULLY created, I have run out of ideas 13:11
simon_sibl well, cool xD I guess I will just let it that way xD just weird if the program says "Listening on" and right after exception because it cant listen 13:15
nemokosch for the "client disconnected", I'd hope you have something to try this out with, and then just place a LAST (and also a QUIT, just in case) phaser inside the whenever $conn.Supply block 13:18
and see if that works because I think it should
13:24 sibl left 14:06 Nemokosch joined
frostcod hello, does anyone know how to show svg in Raku Jupyter? 14:06
cdn.discordapp.com/attachments/768...818c6& 14:07
14:07 Nemokosch left
output nothing 14:08
nemokosch @antononcube is our last hope 14:10
frostcod actually I'm playing antononcube's packages which are so nice 14:12
but in many jupyter notebook examples he gives, the picture shows well but on my side no pictures exits 😭 14:13
antononcube @frost Just add the corresponding magic cell specs at the top, first line of the cell. In this case -- assuming you have dot / neato installed -- you should get an image by putting #%html at the top of the cell 14:18
Here is an example 14:20
cdn.discordapp.com/attachments/768...3e1c5&
Another way to get graphs displayed is to use the package "JavaScripdt::D3" -- that does not require dot to be installed (but it is less robust.) 14:21
frostcod Thanks! I think it will help a lot, and I will try it 14:23
antononcube Are you specifically interested graph (i.e. network) visualization, or math/scientific plots in general? 14:24
frostcod yeah, both I want to use these package to plot my data 14:27
which is very cool 14:28
antononcube There are two general packages: "JavaScripdt::D3" and "JavaScripdt::Google::Charts". 14:29
frostcod I installed, and I'm looking up your notebook about number theory, which is a good example 14:31
antononcube In Jupyter notebookes, the first one, "JavaScripdt::D3", currently only works in (Jupyter) VS Code and the classical Jupyter notebooks.
That notebook use "JavaScripdt::D3". 14:32
How do you run the Jupyter notebooks? In a browser, JupyterLab, or some IDE?
frostcod cdn.discordapp.com/attachments/768...ebbbf&
wow
good start
yes, in vscode's jupyter 14:33
I also install graphviz, and I think it is what i missed before 14:34
antononcube Are you using "Jupyter::Kernel" or "Jupyter::Chatbook" / 14:36
frostcod Jupyter::Chatbook 14:37
antononcube Ok. Then you can use the file ~/.config/raku-chatbook/init.raku to pre-load session packages. 14:40
frostcod After installing graphviz, it works well, thank you antononcude!
cdn.discordapp.com/attachments/768...7f863&
antononcube Have fun! 14:41
The current Raku-graphics challenges I have are to figure out: - Animating a list of graphics - Simple graphics dashboards (say, with sliders) - How to do 3D plots 14:43
frostcod These are indeed real challenges, and you’ve already taken a very important step. I really appreciate your contributions. 14:46
antononcube Thank you! 14:47
frostcod I'm also very interested in cryptography, and I might contribute some crypto modules to Raku in the future. 14:48
antononcube It would be interesting to see how useful "Math::NumberTheory" is for that. I strongly suspect that its factor-integer, prime, and is-prime are too slow. 14:56
I think Raku can be made to be one of the best languages to explore Number theory with. 14:58
frostcod Sure i will 15:00
antononcube Great~ (Back to LLM whispering and carroting...) 15:03
lizmat why is the disbot changing its name all of the time? 15:46
anyways, adapted the IRC logs renderer to assume anything starting with "disbot1" is in fact the discord bot 15:58
17:26 human_blip left 17:28 human_blip joined 17:40 dakkar left 19:01 arkiuat joined 20:57 librasteve_ joined 23:07 librasteve_ left