🦋 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.
wayland .tell [Coke] I think a LLM could be good for generating "Starting point documentation" that needs to be revised by a human. I think it'd speed the process up. 01:01
tellable6 wayland, I'll pass your message to [Coke]
wayland .tell antononcube I'm wondering whether a LLM couldn't be integrated into the zef/fez system that would attempt to improve the documentation of Raku modules (by generating something and adding a PR). 01:03
tellable6 wayland, I'll pass your message to antononcube
[Coke] . 01:05
wayland Hi all! In regards to raku.land/zef:tony-o/fez should "upload" and "review" be under "Module management"? 05:18
To answer my own question, it's documented better in Github. 05:20
Or at least, differently documented. 05:35
wayland Another question -- is there something like .gitignore but for fez? I'd like it to ignore eg. the .idea directory. 06:01
lizmat afaik fez follows .gitignore? 08:51
wayland76 lizmat: So it does! Thanks! 09:18
Is there a way to make map do "is copy" on its parameter? I'm attempting to do s/// on the elements of an array, and I'm getting immutability errors. 10:13
ab5tract wayland76: aren't you then looking for `is raw`, so that the s/// operates on the element and not the parameter? 10:16
either way, pointy block sigs should support either 10:17
wayland76 Oh! I forgot pointy blocks. Thanks! I knew there had to be an easy way.
ab5tract m: m: my @a = 1,2,3; @a.map: -> $e is raw { $e++ }; dd :@a 10:18
camelia :a([2, 3, 4])
ab5tract note that the `is raw` approach is a violation of (my approach to) `map`
wayland76 m: my @a = 1,2,3; my @b = @a.map: -> $_ is raw { $_++ }; dd :@b 10:21
camelia :b([1, 2, 3])
wayland76 m: my @a = 1,2,3; my @b = @a.map: -> $_ is copy { $_++ }; dd :@b
camelia :b([1, 2, 3])
wayland76 m: my @a = <a b c>; my @b = @a.map: -> $_ is copy { s/b/d/ }; dd @b 10:22
camelia [Any, Match.new(:orig("b"), :from(0), :pos(1)), Any]
wayland76 m: my @a = <a b c>; my @b = @a.map: -> $_ is copy { s/b/d/ }; dd :@b 10:23
camelia :b([Any, Match.new(:orig("b"), :from(0), :pos(1)), Any])
ab5tract m: my @a = 1,2,3; my @b = @a.map: -> $_ is raw { ++$_ }; dd :@b
camelia :b([2, 3, 4]) 10:24
wayland76 m: my @a = <a b c>; my %b = @a.map: -> $_ is copy { s/b/d/; $_ => 1 }; dd %b
camelia {:a(1), :c(1), :d(1)}
wayland76 There we go, one success to you with "is raw", and one to me with "is copy" :)
ab5tract `is copy` is definitely the better fit for map, imo. my general rule for when to map vs when to for / loop is whether I'm altering the elements in any way 10:26
wayland76 Interesting rule! I'll keep it in mind, but as a sometime Unix admin, sometimes I just like a nice data flow pipeline on one line :) 10:38
ab5tract wayland76: one genuinely cool feature of Java these days is a `forEach` method on Collections. that way I can keep my maps side effect free (at least as far as the input list is concerned) and also the return tyoe is void so there's no ignored output from the `forEach` operation 10:46
once `augment` becomes powerful enough to affect descendant classes, `each` might be a fun user space module... or maybe I'll see how easy it is to submit as a PIR to core setting 10:48
wayland76 Oh, nice.
ab5tract also, did you see codesection's presentation last December on feed operators? it opened my eyes a bit to how intuitive they can be when doing those one line data flows 10:51
wayland76 I don't think so. 10:52
ab5tract m: <a b c> ==> map -> $_ is copy { s/b/d/; $_ => 1 } ==> dd() 10:53
camelia (:a(1), :d(1), :c(1)).Seq
wayland76 Oh, nice! More like Unix pipes :)
ab5tract yeah, and point-free for the most part 10:54
www.youtube.com/watch?v=f-PxEhjGkjc 10:55
wayland76 Thanks! 10:56
ab5tract "Write clearer code by putting it in order"
enjoy :D
wayland76 I remember reading up on pointfree programming one time ( en.wikipedia.org/wiki/Tacit_programming )and being really confused, and then getting to the Unix pipeline, and going, oh, yeah, of course. Have you seen n8n? 10:57
ab5tract n8n? nope 10:59
wayland76 It's only semi-open-source, ( github.com/n8n-io/n8n?tab=License-...ile#readme and n8n.io/ ) but it lets you hook together a bunch of blocks that process the data in a pipeline-ish sort of way, but pipelines are 1 dimensional, and n8n is 2D. Vaguely like Nodered if you've seen that. 11:02
To me, the best thing about n8n is actually that, when you have a block that's code, rather than one of the predefined one, it shows you the input JSON on the left of the screen, your code in the middle, and, when you click the button, it shows the output JSON on the right.
It's main purpose IMO is to receive JSON from webhooks, transform it into other JSON, and then send it to other webhooks. Kinda like Zapier. 11:03
My ideal tool would be a combo of Raku, n8n, Spreadsheets+SQL, XMLT, and maybe also Directus. 11:04
Geth ¦ problem-solving: ab5tract assigned to samcv Issue `uniprop` and friends are buggy, inconsistent, and potentially replaceable github.com/Raku/problem-solving/issues/437 11:30
ab5tract wayland76: interesting! I'll definitely take a look 11:31
wayland76 Sorry, XSLT, not XMLT
ab5tract: Link for Directus: directus.io/ 11:32
For those interested, I've released the first version of my TOP module. At the moment, about all you can do is make tables in memory and/or Postgres, and access values in them by row/column. So nothing special yet, but gotta start somewhere. 12:05
ab5tract Has anyone managed to compile Comma as either a plugin or standalone IDE? Just trying to make sure I'm not duplicating hardship in figuring this out 12:23
antononcube @wayland76 In my opinion, LLMs are too unreliable and slow to be included in “infrastructural” tools like “fez”. I would rather have a command like llm-code-review that might make suggestions or generate additional documentation. 12:57
tellable6 2024-08-31T01:03:12Z #raku <wayland> antononcube I'm wondering whether a LLM couldn't be integrated into the zef/fez system that would attempt to improve the documentation of Raku modules (by generating something and adding a PR).
antononcube These kind of CLI tools can take additional tuning values from certain “ini files.” 12:58
For example, “LLM::DWIM” does that. 12:59
@ab5tract and @wayland76 Here, or in the channels “#raku” and “#raku-beginner” we occasionally discuss “monadic programming” or “pipeline programming.” 13:01
They correspond to the feed operators in Raku. That style is widely adopted by data scientists / analysts that use R. I set it also in JavaScript packages like “D3.js”. 13:03
BTW, in my upcoming book "Software Design Methods with Wolfram Language", which I have committed to finish by mid October, I have a separate book-part (two chapters) on "monadic programming." 13:47
I use monad-like pipelines a lot -- as much as I can in Raku, BTW -- but do think too much "noise" is made about monads. (How great they are, etc.) 13:49
ab5tract cute that Comma plugin setup relies on .cmd files 15:33
librasteve ab5stract: I 100% support any effort to keep Comma up to date - tbh I think we are at a fork in the road. I anticipate that maintaining both (i) the full Comma and (ii) the IntelliJ Comma Plugin is likely to be too much effort. In both cases, dropping too far behind the latest IntelliJ build is problematic - (i) and none of the plugins you need will install since we are out of date and (ii) the Comma plugin will not install since we 15:52
are out of date. Much as I enjoy immersive (i), I think that route (ii) is more compatible with most workflows. For example using Python / Jupyter / Rust and Raku, so I would vote to prioritize (ii).
ugexe i imagine the full comma is based or largely generated from the plugin. isn't the "full editor" generated from intellij as well? 15:56
librasteve That said, I see that others were starting to work on raku TreeSitter and/or LSP. Sad as I would be to see Comma die, I note that there is now TreeSitter/LSP support in IntelliJ github.com/redhat-developer/lsp4ij and wonder if it would be better for the raku community to focus our limited tuits on that route since it also can cover VSCode (and vim / emacs?).
ugexe: certainly the full CommaIDE is a custom UI also built on IntelliJ 15:57
ab5tract the awesome work lizmat++ has put into RakuAST highlighting should make all those efforts quite a bit easier
and perhaps even the comma work besides
I'm focusing right now on the plugin 15:58
but afaict it's really more or less just a different (Windows batch) .cmd file between the two
librasteve ok
ab5tract both require a full checkout of intellij-community
librasteve you're the boss 15:59
ab5tract librasteve: I wouldn't say that
librasteve (ie the person who invests the hours is the boss)
ab5tract I have just gotten used to IntelliJ as a platform and Comma as a tool
librasteve oh must be lizmat then
ab5tract lol 16:00
I'm really not sure what you are saying here... AFAIK I'm the only person who has tried to compile Comma as a plugin since it became abandonware 16:01
librasteve yeah - I am pretty invested in CommaIDE for pure raku projects 16:01
ab5tract lizmat has poured a lot of efforts into RakuAST highlighting
but I know she doesn't care for Comma outside of it's relevance to the community 16:02
librasteve I am not sure what I am saying either ...
[Coke] raku.land a little slow to respond right now
antononcube @ab5tract I recently added to the package "ML::NLPTempateEngine" the CLI concretize. But just for you I can aslo add concr3tize. 16:27
ab5tract :)
antononcube BTW, concretize often produces monadic pipelines. 16:28
librasteve ab5tract: i am probably not much help on the bug fixing side for CommaIDE builds ... but let me know if I can help with any grunt work ... for example maybe you need to walk up every major release incrementally detecting issues as you go ... then if there is a simple set of instructions / script I can turn the handle to save some time for you maybe (and for me to come up to speed a bit and maybe get more self sufficient) 17:08
ab5tract librasteve: I definitely appreciate that, thank you 17:13
vendethiel ab5tract: I spent some time trying to fix Comma too 17:22
ab5tract vendethial: even you are now only available through a propietary bridge? :( 17:39
how far did you manage? 17:40
vendethiel I am what? 19:53
ab5tract you are on Discord, not IRC 19:55
just depressing to see even further exodus
I'm more interested in what you managed wrt comma though 19:57
librasteve tries irc 21:18
vendethiel It’s 2024, IRC can mooch it 21:19
I’ve spent enough thrre
I can log back on on freenode^W libera if necessary
librasteve_ i’ve looked at clouds from both sides now 21:23
antononcube Which one is cloudier? 22:09