🦋 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:13 jpn joined 00:18 jpn left 01:16 kylese left 01:17 kylese joined 01:57 jpn joined 02:03 jpn left 02:15 kylese left, kylese joined 02:21 sjn left 02:26 wayland left, wayland joined 03:26 stanrifkin_ joined 03:29 stanrifkin left 03:46 jpn joined 03:51 jpn left 03:57 Guest43 joined 03:58 Guest43 left
wayland Is it possible to dynamically load all modules starting with eg. FourM::Commands::* and then import the MAIN sub from all those modules? 04:05
Alternamely, is it possible to dynamically "use" a library stored in a variable, possibly by using a BEGIN block? 04:16
04:30 kylese left 04:32 kylese joined 04:39 Aedil joined 05:01 jpn joined 05:06 jpn left 05:30 kylese left 05:32 kylese joined 05:49 stanrifkin_ left 06:15 jpn joined 06:16 lichtkind joined 06:20 jpn left 07:06 yeahitsme joined 07:16 guifa left 07:36 jpn joined 07:40 tejr left 07:42 jpn left 07:58 tejr joined
ab5tract wayland: you can introspect the Commands package for the modules it contains, then a `@modules.map: { "use $^module".EVAL }` 08:11
should do it
Ah, sorry, no the EVAL won't do it 08:15
08:21 jpn joined
ab5tract This is a bit of a tricky one, because the package needs to be known at compile time. 08:22
m: constant $m = "Test"; use CORE::($m); ok "ok"
camelia ===SORRY!===
Name CORE::($m) is not compile-time known, and can not serve as a
ab5tract and even when we give some compile-time certainty to `$m` via constant, it seems the compiler isn't able to appreciate this attribute 08:23
08:26 jpn left 08:40 stanrifkin joined 09:09 synthmeat left, synthmeat joined
wayland Yeah, I'd figured it'd be something like that. I wanted to keep the power of MAIN in the modules, but I don't think it's possible. 09:30
09:33 wayland left 09:43 wayland76 joined 09:45 wayland76 left, wayland joined 09:48 Sgeo left
wayland I have a hash where the keys are glob, regex, and match-test. Any reason the following gives "Expected 3 arguments but got 2"? for @test-data>>.<glob regex match-test> -> $source, $regex, $match-test { 09:53
The hashes are inside @test-data 09:54
Needed parentheses around the params: for @test-data>>.<glob regex match-test> -> ($source, $regex, $match-test) { 10:00
(ie. I just answered my own question :) 10:01
10:01 jpn joined
wayland Hi all. New module (not indexed yet. github.com/wayland/Glob-Grammar 10:38
.weekly github.com/wayland/Glob-Grammar 10:39
weekly: github.com/wayland/Glob-Grammar
notable6 wayland, Noted! (weekly)
11:07 derpydoo left 11:13 Aedil left 11:26 Aedil joined 11:37 jpn left 12:03 apac joined
ugexe You can only load MAIN from one module 12:32
You can’t have two modules with a different MAIN and then load them both into the same file to get both cli commands for the same program 12:33
12:41 wayland left 12:42 wayland joined
wayland ugexe: And that's exactly what I was trying to do (with multi MAIN) :) 12:45
Anyway, I'm resigned to the idea that I'm going to have to write a replacement for the MAIN functionality that allows these kinds of things. 12:46
12:51 wayland left, wayland joined 12:52 jpn joined
antononcube @SmokeMachine I heard about A2A (agent to agent) and MCP (model context protocol), but did not read their specs. Mostly, because they seem "moving targets." But maybe I have to get familiar with them. 13:12
Honestly, though, I do not want to. All the LLM-over-web providers change their APIs and corresponding documentation too often.
As for MCP implementation in Raku bringing interest to Raku -- we can hope, but I doubt it. Both A2A and MCP are widely discussed and backed by Google. Most like all popular programming languages do will have MCP packages. 13:16
tbrowder i just filed a doc issue with the dies-ok {} problem solved by @ugexe. to wit: having a handle to "run" on an external program will cause a failure of the test.
i have not checked roast yet for any test of that situation. is it a bug? can it be fixed? can it be handled gracefully? i don't know and got very tired of messing with it. 13:19
the doc issue shows a very simple example of the problem and solution for a user. 13:22
i would appreciate other eyes on it to make sure it can be duplicated by others 13:23
jdv idk if ai makes sense as a major selling point or killer featureish type deal for raku
what's the connection? feels like fad chasing to me. 13:24
antononcube Of course, it makes sense to use LLMs with Raku -- Raku is very good at interactively processing text in various ways. (I.e. LLM hallucinations.) 13:27
13:28 apac left
jdv so is perl:) 13:30
what is raku better at than perl or others, that's more my idea. 13:31
antononcube Sure. Perl looks disgusting, though. 13:32
At least to me, after using Raku for awhile. 13:33
jdv unfortunately its taking way longer, garner way less help, and has aquired some complexities and inconsistencies over time:( 13:34
antononcube Again, about using LLMs -- the only out of the box advantage of Raku is its text processing abilities via a terse syntax / language constructs. 13:35
jdv yup
and yet most of the ai world uses python as far as i know:) 13:36
antononcube Otherwise, LLM usage has to be facilitated in a few principal ways. In Raku or any other programming language.
13:37 guifa joined
Sure. Python being a "stupid" language is big selling point. And recent LLMs produce working Python code reliably. 13:38
jdv i do like your modules. they power the ai part of a tiny toy bot i wrote
antononcube Great! Is that bot published? 13:41
wayland Another question: How can I do something like: for @strings -> $string { @regexes.push: rx/$string/ } 13:55
Ie. I've got a list of strings which are basically regexes, and I want to convert into actual regexes. But when I do the above, and then later print @regexes, they're still referring to $string even though it's not in context any more, and so they fail. 13:56
14:04 wayland-mobile joined
ugexe m: say rx/{say 42}/ 14:09
camelia rx/{say 42}/
ugexe m: say m/{say 42}/
camelia Use of uninitialized value of type Any in string context.
Methods .^name, .raku, .gist, or .say can be used to stringify it to something meaningful.
42
「」
in block <unit> at <tmp> line 1
ugexe yeah i dunno why rx interpolation appears to be different than e.g. m//
14:20 wayland left 14:21 wayland76 joined 14:22 wayland76 left 14:23 wayland76 joined, wayland76 left 14:24 wayland76 joined
ugexe m: my @regexes; my @strings = <abc def>; for @strings -> $string { @regexes.push: qq|rx/<{$string}>/|.EVAL }; say @regexes 14:24
camelia [rx/<abc>/ rx/<def>/]
ugexe not ideal though
14:27 wayland76 left 14:28 wayland76 joined, wayland76 left, wayland76 joined 14:31 jpn left 14:32 wayland76 left, wayland joined 14:35 wayland left, wayland joined 14:40 wayland left, wayland76 joined 14:45 wayland76 left, wayland joined 14:52 wayland left, wayland joined
antononcube @jdv I planning to make an "over the web" chatbot and / or LLM RAG service soon. So, any "prior art" in Raku is of interest to me. 15:12
15:22 MoC joined 15:27 MoC left
patrickb antononcube: Would you be willing to help out with a well LLM suited task? I'd like to have the IRC logs filtered to extract a list of rants/wishes for change of nine that he wrote about during the RakuAST grant. 15:46
In the end that list should go to github.com/Raku/problem-solving/issues/472 15:47
antononcube @patrickb I am working on something very similar right now -- making an "EconomicsAI" that extract "rants" of a few economists from different interviews. 16:13
16:14 wayland-mobile left
I was thinking that a more useful exercise for the Raku community is to do that over documentation. But, of course, IRC logs is just fine. 16:14
* ...using IRC logs instead of documentation.
My biggest impediment is getting meangful records from the IRC -- plain text, and records. 16:19
A few years ago I tried that with Raku using XML / HTML packages, but I gave up and used Mathematica instead. 16:21
[Coke] Moarvm release is done if anyone wants to make sure it looks OK 16:22
basically: Does the tarball look OK and extract without errors) 16:23
16:55 donaldh left 16:59 jpn joined 17:11 jpn left 17:12 jpn joined
SmokeMachine I think the MCP project could help on that… 17:19
librasteve i, for one, am grateful for those who are adding LLM chops to raku (liking llm-dwim atm) ... why? well (i) raku is obviously a way better tool than Python (too awkward with strings) and perl (well, lets face it perl is legacy), (ii) raku needs to have good LLM tools to be competitive with eg Python and (iii) I am gonna need some LLM stuff sooner or later (eg LLM aspects to HARC Stack) 17:21
as the LLM hype fades, the most interesting area will be where proper code and LLM dovetail - somewhere in the region of raku Grammars / Slangs 17:23
17:28 sjn joined 17:32 wayland left, wayland joined 17:34 wayland left, wayland76 joined 17:36 wayland76 left, wayland76 joined 17:42 El_Che left 17:43 wayland76 left, wayland76 joined 17:44 El_Che joined
[Coke] nqp release done - the 'github-release' section in the release guide indicates that if the script fails you can do it by hand - I think it's never worked for me, time to fix the script or rip out the instructions to use it 18:29
doesn't look like it's working on rakudo, either. 18:30
jdv never worked for me 18:36
human-upload is the last i use
[Coke] ... then let's remove that and replace it with the manual instructions, or fix it. 18:42
I think all the releases are done.
El_Che, patrickb: source release is done. 18:43
Please ping me with any issues found, thanks.
patrickb Cool, thank you! I'm pretty low on computer time the next few days, but I hope to be able to squeeze the release in somewhere. 18:45
[Coke] patrickb++ 18:46
18:49 Sgeo joined 18:51 Aedil left 19:00 donaldh joined 19:17 MoC joined
lizmat weekly: redlib.zaggy.nl/r/ProgrammerHumor/...o/#mnvidpo 19:17
notable6 lizmat, Noted! (weekly)
19:22 jpn left 20:12 yeahitsme left
jdv people who can't regex shouldn't be programming 20:59
its not that hard:)
22:26 wayland joined, wayland76 left