tbrowder scullocs: i think i remember learning to call th 01:07
*the part without the extension when i was introduve
*introduced to the Dec OS in 1987. 01:09
or the Cyber OS or the Sun OS a bit later. a long time ago you couldnt 01:10
*couldn't always use "special" chars in a basename 01:11
maybe it was the old DOS 8.3 thing... 01:12
i dunno, but i like it, and lizmat made it happen! 💗 01:14
lucs tbrowder: Ah. I don't remember seeing that name back in the day, but glad we adopted it. 01:18
tbrowder yeah, but to be honest, i may have made it up, the old days were a bit wild westish (going back to 1961, my first intro to digital computers) 02:06
librasteve o/ 07:20
lizmat: is there any interest in the IntelliJ OSS project licence (you mentioned that this was on agenda for yesterday's meeting)?
lizmat yes, we will apply for one 11:02
tbrowder yay! 11:09
lizmat weekly: dev.to/lizmat/towards-more-coverage-fne 11:35
notable6 lizmat, Noted! (weekly)
timo does the "fne" in the URL mean anything?
lizmat no, it's a random thing dev.to adds afaik to make the URLs less generatable ? 11:37
timo OK
lizmat afk& 11:43
timo nice. lizmat++ 11:45
timo do we already have anything that can take a raku regex and "explain what it does" so to say? 13:15
"regexplainer" :D
antononcube Yes, via LLMs. 13:35
A more dedicated LLM prompt can be developed, instead of just "plain" explanation requests. This would be nice to test with experts. 13:37
timo ok. i'm looking for something more procedural though
antononcube Sure, then we can use LLM to make that procedural explainer.
timo not interested in that either 13:39
ab5tract timo: I would expect RakuAST could provide a useful starting point
timo yep, that's what i'm starting with 13:40
antononcube But, if LLMs can make the explaining tool, why not use it?
I have too many "little" LLM projects like this, BTW. And I want to do other things than LLM-tooling.
timo to me, LLMs are like asbestos. i will not put it into the walls of houses i build, no matter how well it prevents fires 13:41
antononcube This kind of luddite attitude toward LLMs is common. 13:42
timo luddites were based btw 13:43
antononcube To some extend, that is why I deal with LLMs a lot, because I do not trust them.
Basically, before 4/2023 if anyone use "artificial intelligence" in Data Science (DS) or Machine Learning (ML) professional conversations I would immediately start doubting their knowledge or expertiese in DS and ML. 13:45
But, now I do thing the phrase "artificial intelligence" has concrete and "provable" meaning. 13:46
timo yeah, "when it makes us more than five billion USD per year" then it's artificially intelligent
antononcube Hm... yes, but it is not simple. I thought -- and still - do AI is a brilliant phrase to extract money from USAs millitary complex. 13:48
timo let's not fill up #raku with AI discussion 13:49
antononcube The thing is the whatever passed for "AI" in the 80's and 90's provided certain logistics algorithms that the USA military used to save billions in the 1st Iraq of war (of USA.)
Hmm... why not? Nobody is using Raku. And one way to get interest into Raku is via LLMs. (Facilitation, demos, etc.) 13:51
timo i'm not saying you can't keep doing your thing. i just don't feel like discussing AI here with you at this moment 13:55
antononcube Ok. 13:57
timo i understood correctly that you don't have something with LLMs yet that specifically tries to explain raku regexes? possibly only something that explains raku code more generally? 13:58
antononcube The latter. But it is not that hard to do the following: 1) Make a small prompt that explains Raku regexes based upon, say, "CodeWriterX" 2) Make a larger prompt with the whole page "Regexes" at docs.raku.org 3) Use LLMs to facilitate the writing of Raku program that does regex explanations 14:00
Actually, the 3rd option is kind "open" to the taste of the programmer using it. The first 2 are really straightforward. 14:01
I will post an example later... 14:02
timo I'd expect that adding a dump of the node tree of RakuAST to the prompt would make it significantly more likely for the LLM to get things right, since it doesn't have to process the syntax of the regex language in order for the correct result 14:04
antononcube As in all statistical method -- adding determinism makes them (much) better. 14:06
timo i'm not sure i'd call that "adding determinism" though 14:07
let me give you a starting point. gimme like five minutes or ten 14:09
antononcube Yeah, it is more a of structure...
Here is an example using the first option I mentioned above: 14:10
cdn.discordapp.com/attachments/633...76274&
Maybe, it is too simple, but I took a "random real life" regex from here: dev.to/taw/100-languages-speedrun-...sions-4p8n 14:11
timo for the "regexplainer" i would also want to have something showing how the resulting match object structure comes into existence. the code writer X prompt is probably not the right tool for that? or maybe if the prompt asks for "store interesting parts of the resulting match object in local variables with fitting names" or something like that? 14:21
antononcube "something showing how the resulting match object structure comes into existence." -- for this, I think, the LLMs would be best prompted with examples. 14:22
And, yeah, "CodeWriterX" is too simple. 14:23
Let's try the last suggestion...
Here is the result with an addition to the request, not the prompt: 14:26
cdn.discordapp.com/attachments/633...ee571&
timo try this: raku -e 'use experimental :rakuast; slurp().AST.visit-dfs(-> $node { if $node ~~ RakuAST::Regex { say "The regex source code:\n$node.origin.Str.indent(4)\n\nThe abstract syntax tree:\n$node.dump()"; exit 0 }; True})'
it takes some raku code on standard input and dumps the tree
but you can easily rewrite it to go into your chatbook
antononcube Ok.
timo in order to see if it's actually useful, the regexes will have to be a bit more spicy than that 14:27
antononcube BTW, the package "LLM::DWIM" helps making CLI tools out of LLM personas. (Specified via TOML.)
timo but try also with the example code that Todd had on the mailing list: $_ ~~ m:g/ <?before ^ | download > .*? <?before \> | \h+ > /
antononcube @timo Yeah, of course. I would not trust such an LLM tool without some vetting by experts. 14:28
timo (have to replace the $something variable with $_ because that's defined, otherwise the RakuAST parser will complain)
antononcube The "Todd regex" does not work for me. I get the error: > > # Store interesting parts in local variables > my $start = @matches[0].from; # Starting position of the first match > my $end = @matches[*-1].to; # Ending position of the last match > my $text = @matches».Str.join(''); # Concatenated matched text 14:51
patrickb On the idea of a regexplainer: It should be doable to not only have a regexplainer, but a rakusplainer via RakuAST, right? 14:53
whatsthis.raku.org
:-P
So many things to do, so little time...
antononcube Yeah, a particular type solution is sought after 14:59
timo for a rakusplainer via RakuAST we could have a look at what .DEPARSE spits out for code with tricky constructs perhaps? but i think deparse might be built to be as close as possible to the original 15:02
antononcube I was thinking yesterday about the many ways I can use deparsing. For example, to have symbolic-like behavior of certain numerical functions. 15:06
timo for that you likely want .AST rather than .DEPARSE, since DEPARSE gives you source code back out as a string?
antononcube For example, in numerical integration very often (most of the time) variable transformations are applied to the integrand before the actual integration. Instead of making compositions of functions -- fine idea, per se -- I can modify the integrand function directly with the variable transformations. 15:13
In general, the substitution of both strings and RakuAST tree structures is possible. I can see why the latter is much more robust and "right." I was thinking that if I have deparse function I can manipulate text before RakuAST becomes main stream. 15:17
TBH, after working with the JavaScript-graphics-code generating packages I am too comfortable with the idea of text templates manipulation, which is very likely an antipattern. 15:19
timo using an AST gives you a set of guarantees and safety rails 15:21
antononcube Yeah, I can see that.
So, the "deparse thoughts" were just about a possible crutch. Also, most likely, because is a possible technique in R. 15:22
.seen lizmat 17:01
tellable6 antononcube, I saw lizmat 2025-01-12T11:43:43Z in #raku: <lizmat> afk&
antononcube @lizmat Still AFK? 🙂
msiism [Coke]: Re: github.com/Raku/problem-solving/pull/460 I'd think "escape sequence" would be an appropriate name. 18:29
You could also say "symbol" or "code", I guess.
Okay, just realized you're saying "sequence" now. Yeah, that'll work as well, I guess. 18:32
librasteve lizmat: ++ on intellij - tx! 18:36
timo no way to put a \t character? or do you put an actual tab character in the string for that purpose? 18:48
yeah that's probably it 18:53
msiism timo: You mean the prompt? 18:55
timo yeah. you use \t in it to get at strftime formatting 18:57
msiism Yeah. Unix shells also don't seem to care much about conflicting with ANSI C escape sequences. 19:01
You could probably also use the Unicode escape code for Tab. 19:02
msiism Depends on how the prompt string is parsed. 19:03
Or maybe `\\t`? 19:04
msiism I don't have [Coke]'s latest version running here and my C skills are about zero, so just throwing out ideas. 19:07
timo you tend to have to use sprintf in the shell to put escape sequences "into action" 19:09
msiism Not sure I get what you mean by that. 19:11
tbrowder late to the game ref raku LLM, how about a new #raku-LLM or AI 19:13
librasteve afaiui, LLMs are a combination of core code written in NVIDIA CUDA and scripting languages (Go|Python) that run librareis such as PyTorch to configure and kick off the underlying core code 19:16
so, I guess there is a possible project to port PyTorch or similar to Raku - however, I think that there is a lot of corporate sponsorship (resources) invested in the (eg) Python LLM toolchain - orders of magnitude above the raku folks resource constraints 19:18
short term, seems like Anton is on the right path to invest time & effort in raku as a prompt management tool (at which it is very good imo) 19:22
I suggest you try the raku LLM modules to get a sense for what is possible - I have been using Antons Jupyter::Chatbook recently which gives me LLM access in my IDe 19:23
timo i think you might have misread the question? 19:31
[Coke] if \t becomes tab, what to rename existing \t to?
timo well, i assume \t becomes tab (on the way into rakudo, so rakudo won't see the backslash or the t) and \\t is for strftime (because it needs to get past the shell syntax) 19:32
[Coke] msiism: it's written in Raku, not C.
timo: ah, yes, relying on the shell is just fine. :) 19:33
msiism Oh… need to take a closer look. o_0
[Coke] github.com/rakudo/rakudo/blob/coke...#L411-L475 and print self.interactive_prompt($previous-evals.elems); 19:34
er, github.com/rakudo/rakudo/blob/coke...kumod#L484
timo you would expect the core is written in c with a name like that but no! 19:36
msiism I mean I thought about whether it would be possible not to collide with the ANSI escape sequences at all. But then, Unix shells didn't seem to care much, so I stopped thinking about it. 19:40
timo for the purposes of this, we'll be contending with multiple layers of quoting and syntax that the user is supposed to get their stuff pushed through 19:42
lizmat antononcube back at the keyboard again 20:34
patrickb ugexe: I just stumbled over github.com/ugexe/zef/blob/main/lib...akumod#L71 not entirely sure if it's a bug or not, but the curl looks out of place. 21:12
timo i think that's just to check if running "wget" will get you "weird powershell wget" or "actual real wget"? 21:15
hm. no, you may be exactly right 21:16
github.com/ugexe/zef/commit/c52ad4...eeec31d4db this is where it was introduced
patrickb ugexe: I currently try to create a minimal tool to generate a local ecosystem from a list of dist repos. It currently mushes together all the META6.json files into a big array, writes that out into a eco.json and adds an ecosystem entry to the zef config. 21:28
Only now I realized that I'm not providing the information of how to obtain each of the distributions (i.e. the `path` key is missing in each entry in my eco.json). 21:29
This might be a show stopper.
ugexe: Do you see a way to make this work without starting up a webserver? Could I mis-use the LocalCache Repository impl? 21:30
antononcube @lizmat I want to factor out my recent commit to "Math::Sequences" for two reasons: (1) I don't think I put it in the correct file the new functions real-digits and phi-number-system, and (2) I plan to have those functions in "Math::NumberTheory". 21:42
Also, I want to use "Math::Sequences" and "Math::NumberTheory" together in a session. There would be name clashes. 21:43
lizmat antononcube am about to go afk again 21:44
please make an issue in Math::Sequences for this, so it doesn't fall through the cracks
afk&
antononcube ok 21:50