🦋 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:12
derpydoo joined,
lichtkind left
00:47
MoC left
01:15
kylese left,
kylese joined
02:15
kylese left,
kylese joined
02:23
guifa left
03:06
Sgeo left
03:08
Sgeo joined
03:09
Aedil joined
03:25
stanrifkin_ joined
03:28
stanrifkin left
|
|||
wayland | .tell ugexe Thanks for the regex tip! I started trying EVAL, but didn't get it working, and assumed there was an easier way. | 04:06 | |
tellable6 | wayland, I'll pass your message to ugexe | ||
wayland | I also send kudos to the LLM people, because someday I'd like to make a too that's like nn8n/nodered, but with LLM, and maybe using tickets as well. | 04:09 | |
jdv: I'm the regex expert where I work, and I'm not on either of the Developer teams :p (I'm DevOps) | 04:11 | ||
04:30
kylese left
04:32
kylese joined
04:50
guifa joined
05:30
kylese left,
kylese joined
05:39
yeahitsme joined
05:57
guifa left
06:09
merp left
06:27
merp joined
07:19
jpn joined
07:23
bartolin left
07:24
jpn left
08:03
jpn joined
08:08
jpn left
|
|||
wayland | m: sub te($x, $y is copy = Nil) { say $y.raku ; say "$x, $y"; }; te(1) | 08:11 | |
camelia | Any Use of uninitialized value element of type Any in string context. Methods .^name, .raku, .gist, or .say can be used to stringify it to something meaningful. 1, in sub te at <tmp> line 1 |
||
wayland | Why is $y printing out as "Any", rather than Nil? | 08:12 | |
Voldenet | >When assigned to a container, the Nil value (but not any subclass of Nil) will attempt to revert the container to its default value; if no such default is declared, Raku assumes Any. | 08:18 | |
(from docs.raku.org/type/Nil ) | |||
one way to fix it would be | 08:19 | ||
m: sub te($x, $y is raw is copy = Nil) { say $y.raku ; say "$x, $y"; }; te(1) | 08:20 | ||
camelia | Nil Use of Nil in string context 1, in sub te at <tmp> line 1 |
||
Voldenet | but I'm not sure "is raw is copy" makes sense | 08:21 | |
08:29
merp left
|
|||
Voldenet | to be honest, Nil is overall a bit alien - I remember one convo about it (and its relation to "Failure" type) and it made me convinced that it's difficult to reason about | 08:40 | |
08:40
merp joined
|
|||
Voldenet | m: sub huh() returns Int:D { Nil }; my $x = huh(); my Int:D $y = $x | 08:41 | |
camelia | Type check failed in assignment to $y; expected Int:D but got Any (Any) in block <unit> at <tmp> line 1 |
||
Voldenet | sure, it makes sense once you know how it's there for Failure handling | 08:44 | |
09:04
jpn joined
09:09
jpn left
09:52
lichtkind joined
09:53
jpn joined
10:09
jpn left,
derpydoo left
10:25
jpn joined
10:26
Sgeo left
11:02
JimmyZhuo joined
|
|||
wayland | Thanks! Yeah, it looks like it's a bit odd. I ended up just checking for definedness, which solved my problem :) | 11:12 | |
11:20
JimmyZhuo left
|
|||
librasteve | o/ | 11:24 | |
i could use some help, please | |||
I am trying post -> { form-data -> ::?CLASS $form { ... and get the error The form-data block parameter is of type ::?CLASS, which does not do the Cro::WebApp::Form role | 11:25 | ||
the post block is in a role and I want to make the class that does the role ("Contact") be applied as the form-data block param type | 11:26 | ||
if I go note ::?CLASS.^name; just before it says "Contact" so I guess I am close, but how to state it as a type on the param...??? | 11:28 | ||
the docs is here cro.raku.org/docs/reference/cro-we...The_routes if that helps | 11:29 | ||
11:30
jpn left
|
|||
wayland | librasteve: I'm sure there's a reason, but why are you not just going post -> { form-data -> Contact $form { ... | 11:39 | |
Or, on the assumption that Contact does Cro::WebApp::Form, maybe post -> { form-data -> Cro::WebApp::Form $form { ... | 11:40 | ||
librasteve | yeah … good question … i want to tuck away the route setup in a role rather than make every form class do it every time | 12:31 | |
i suspect that raku can do that but i can’t work out the incantation | 12:32 | ||
12:54
tejr left
12:59
tejr joined
|
|||
ab5tract | librasteve: I wonder if the experimental version of macros would be able to handle that | 13:31 | |
librasteve | okay … but this guy ::?CLASS is already there so i hope that I can just use it as a type constraint … maybe as a type capture?? | 13:37 | |
13:43
guifa joined
|
|||
ab5tract | m: class C { method c(::?CLASS $c) { "CcC" } }; say C.new.c(C.new) | 13:53 | |
camelia | CcC | ||
ab5tract | m: class C { method c(::?CLASS $c) { "CcC" } }; say C.new.c("oops") | ||
camelia | Type check failed in binding to parameter '$c'; expected C but got Str ("oops") in method c at <tmp> line 1 in block <unit> at <tmp> line 1 |
||
ab5tract | m: role C { method c(::?CLASS $c) { ::?CLASS } }; class D does C {}; say D.new.c(D.new) | 13:54 | |
camelia | (D) | ||
ab5tract | librasteve: so what's missing? :) | ||
ah, I do see that there are issues when using ::?CLASS as a constraint on pointy blocks in the role :( | 14:11 | ||
m: role R { method r { -> ::?CLASS $c { say $c } }; class C does R { method gist { "onward!" } }; C.new.r(C.new) | |||
camelia | ===SORRY!=== Error while compiling <tmp> Cannot declare our-scoped class inside of a role (the scope inside of a role is generic, so there is no unambiguous package to install the symbol in) at <tmp>:1 ------> ::?CLASS $c { say $c } }; class… |
||
14:15
tejr left
|
|||
ab5tract | let's see if we can create a capture and use that instead | 14:22 | |
14:25
tejr joined
14:43
Aedil left
|
|||
librasteve | sorry - long holiday lunch ;-) | 14:50 | |
El_Che | lo | 14:51 | |
tellable6 | 2025-04-15T19:08:33Z #raku <melezhik> El_Che: - could you please follow up on that irclogs.raku.org/raku/2025-04-14.html#17:31 ? thanks! | ||
librasteve | ab5tract: yes - likely that's the problem | 14:52 | |
El_Che | I will build the packages now | 14:56 | |
ab5tract | librasteve: turns out I had a missing brackeet :/ | 15:06 | |
m: role R { method r { -> ::?CLASS $c { say $c } } }; class C does R { method gist { "onward!" } }; C.new.r()(C.new) | |||
camelia | onward! | ||
ab5tract | so it does look to work out ok | ||
m: role R { method r { -> ::?CLASS $c { say $c } } }; class C does R { method gist { "onward!" } }; C.new.r()("fail") | |||
camelia | Type check failed in binding to parameter '$c'; expected C but got Str ("fail") in block at <tmp> line 1 in block <unit> at <tmp> line 1 |
||
librasteve | ok ... i'll check | 15:07 | |
15:23
guifa left
15:24
jpn joined
|
|||
El_Che | 2025.04 introduced changes that hit alpine: 3rdparty/mimalloc/src/prim/unix/prim.c:34:12: fatal error: linux/prctl.h: No such file or directory | 15:32 | |
15:35
Aedil joined
|
|||
jdv | what does it mean? | 15:35 | |
El_Che | that alpine need extra header packages to build | ||
that it does not need with 2025.03 | |||
looking at this to figure out which: pkgs.alpinelinux.org/contents?file...&arch= | 15:36 | ||
jdv | github.com/microsoft/mimalloc/issues/1056 ? | 15:37 | |
El_Che | I added the linux-header package, let's see if it finds the headers and continues | 15:40 | |
I just build 2025.03 and that's why I notices the difference right away | 15:41 | ||
nope | 15:42 | ||
/usr/include/sys/prctl.h:88:8: error: redefinition of 'struct prctl_mm_map' | 15:43 | ||
so they do clash | |||
can we rollback the minimalloc version? | 15:45 | ||
jdv | if we just wait it might be fixed by next release:) | 15:57 | |
El_Che | github.com/MoarVM/MoarVM/commit/03...1563f824ef | ||
jdv | idk if its worth a point release - that'd be [Coke]'s call i guess | ||
El_Che | minimalloc is explicitly bumped | 15:58 | |
in 2025.04 | |||
I think linux edge is wat most people on container use, I think a dotrelease with a rollback may be a good idea | |||
jdv | what's linux edge? | 15:59 | |
El_Che | sorry | ||
alpine | |||
jdv | [Coke]: ^ | ||
El_Che | edge is their dev release, but not related :) | ||
all alpines break | |||
jdv | but they can still use 2025.03, no? | ||
El_Che | sure | 16:00 | |
jdv | or do they auto upgrade their "edge" or whatever apk repo stuff? | ||
El_Che | I don't think 2025.04 is in any repo yet | 16:01 | |
pkgs.alpinelinux.org/packages?name...aintainer= | |||
I was wrong it is in edge | |||
16:13
[Coke] left
|
|||
El_Che | I can try to downgrade mimalloc on moarvm while building, but it's better to have the release manager have a look so I don't break other stuff by downgrading | 16:24 | |
mimalloc was bumped from 2.1.7 to 2.2.3 | 16:26 | ||
16:51
lichtkind left
16:57
lichtkind joined
17:40
jpn left
17:59
jpn joined
18:08
[Coke] joined
|
|||
[Coke] | Hi, back. | 18:09 | |
How did we miss that this was a problem pre-release? | |||
Shouldn't one of our CI paths have hit it? | 18:10 | ||
followup in -dev | 18:11 | ||
18:23
Guest5764 left,
jpn left
|
|||
[Coke] | I created a 2025.04.1 branch on MoarVM if someone can do the rollback and test that it's working for el_che's OS. | 18:25 | |
18:26
wayland76 joined
18:27
wayland left
18:47
Sgeo joined
|
|||
melezhik. | . | 19:14 | |
19:17
yeahitsme left
19:40
Aedil left
|
|||
antononcube | In one of Jonathan Worthington's presentations I heard the statement: Cro is a system for effectively building distributed systems. | 20:00 | |
I assume Cro's primary type of a distributed system is a web application. Are there examples of using Cro for building other types? | 20:03 | ||
I am trying to figure out can LLM services be utilized in more direct or easier manner using Cro's module/classes. | 20:05 | ||
Meaning, it would be possible or make sense to have classes like Cro::LLMApp and Cro::LLMSocket that are descendants of Cro::WebApp and Cro::WebSocket respectively. | 20:08 | ||
20:11
guifa joined
|
|||
Voldenet | it's even said on homepage of cro | 20:16 | |
>Cro is a set of libraries for building reactive distributed systems, | |||
and ZeroMQ support sort of hints at what's possible alread | 20:17 | ||
antononcube | Ok. Are there any concrete examples or plans for Cro-creations that are not web apps? | 20:28 | |
Voldenet | however I'm not sure it can be fully described as framework for distributed systems – it has no basic things like leader election, heartbeats, concept of nodes or sharding | ||
antononcube | 💡 Thanks! I was hoping to hear observations or directions like this. | 20:29 | |
Voldenet | sure, it's possible to roll your own cluster singleton, but it might be difficult to practically implement reliably | 20:30 | |
librasteve | i’m more positive about cro as a distributed system toolkit … remember the name is my Cro xxx ie micro services … but sure it is not a framework with the stuff that voldenet mentions | 20:32 | |
it does provide tools to wire up multiple instances on different machines with channels connecting them and supports various protocols | 20:33 | ||
that said i am basing what i say on reading the docs … have not tried it and i’m not aware of any actual systems that use this | 20:34 | ||
antononcube | Hmm... that is good to know at seems lower level from what I have in mind. It might be useful I try oranize LLM computations on, say, my own hardware. | 20:38 | |
I will be more specific. Currently the Raku LLM funcitonalities are very convenient for making (sequential) computational pipelines. Those pipelines correspond to (simple) "path graphs." I am considering making general graphs at the nodes of which different LLM- or deterministic computations happen. The computations are assumed asynchronous, hence different graph paths can taken at different execution times. | 20:40 | ||
20:42
guifa left
|
|||
Voldenet | Channel and Supply can do a lot of work here | 20:44 | |
and cro can turn them into network processing tools | |||
20:45
guifa joined
|
|||
librasteve | this is pretty much all that is documented cro.raku.org/docs/cro-yml#Links … possibly you can map your graph onto these links / endpoints … then it is possible iirc to connect raku channels / supplies from one node to another | 20:46 | |
but please take this with a rock of salt … i’m just guessing | |||
antononcube | I think now that if I use Channel and Supply, then Cro is not that needed. I can just use the LLM functions implemented in Raku. | 20:49 | |
Voldenet | indeed, only when you need to use N machines or processes it starts making sense | ||
antononcube | A certain proof of concept using Channel, Supply, at nodes of graph structures might be a cool thing to do regardless. | 20:51 | |
20:52
jpn joined
|
|||
librasteve | sounds interesting | 20:52 | |
timo | El_Che: are you available to test if using the moarvm branch mimalloc_alpine_fix_for_2025.04_release works fine? | 20:56 | |
21:51
jpn left
|
|||
wayland76 | antononcube: Your LLM comments remind me of my plan to build a nodered/n8n workalike in raku. If you haven't looked at them, have a look :) | 22:07 | |
Note: Feel free to take the idea and run with it | 22:08 | ||
(just let me know if you do) | 22:09 | ||
antononcube | @wayland76 Ok. Where, what link? | 22:17 | |
wayland76 | The idea isn't written except in the #raku logs, and a failed attempt that wouldn't be useful. Nodered: nodered.org/ N8n: n8n.io/ | 22:29 | |
NodeRed is the free one, but there are a few ideas worth taking from n8n as well. If you want an outline of my ideas, let me know, and I'll put something in a gist. | 22:30 | ||
I'm not sure that LLM is involved in either, but the idea of hooking Cro to a set of Channels/Supplies is what I was thinking of. | 22:33 | ||
My point was that such a system would be useful in LLM work. | 22:35 | ||
Like my TOP ideas, I haven't done enough work on them for the ideas to be useful to others :) | 22:36 | ||
weekly: github.com/wayland/Class-Loader-Dynamic | 23:47 | ||
notable6 | wayland76, Noted! (weekly) |