This channel is intended for people just starting with the Raku Programming Language (raku.org). Logs are available at irclogs.raku.org/raku-beginner/live.html
Set by lizmat on 8 June 2022.
01:02 hudo left 01:03 hudo joined, hudo left 01:04 hudo joined 01:09 Manifest0 left 03:57 deadmarshal_ left 04:34 topnep left 04:35 topnep joined 05:28 deadmarshal_ joined 06:39 topnep left 06:40 topnep joined 06:41 deadmarshal_ left 08:15 deadmarshal_ joined 08:44 topnep left, topnep joined 09:11 dakkar joined 09:39 gfldex left 09:40 gfldex joined 10:48 topnep left 10:50 topnep joined 11:16 lizmat left, lizmat_ left, lizmat joined 11:58 Manifest0 joined 12:54 topnep left 12:55 topnep joined
antononcube Google's Gemini gives (immediately) good results for "raku LLMs": 13:59
cdn.discordapp.com/attachments/768...4a0e0&
Not that great on "raku number theory" -- results are too generic. 14:01
14:59 topnep left 15:03 topnep joined 15:15 librasteve_ joined
librasteve i use ChatGPT a fair bit, but find that it often mixes perl / python code and hallucinates ... what is your preferred LLM for raku code support? 15:29
antononcube Both ChatGPT and Gemini work well with the prompt "CodeWriterX". 15:36
I have the corresponding LLM-persona specified / initialized in my Raku-chatbook initialization files. 15:37
That is equivalent to have the magic cell: #% chat raku prompt, model=gpt-4o, max-tokens=4096 @CodeWriterX|Raku 15:39
And then using that persona like so: #% chat raku Give an example of application of a list regexes for a given string and print out the corresponding results. 15:42
YMMV, of course. But it that prompt / persona produces very good results when it comes to translations from other languages, short examples of usage queries, or very long/complicated queries. 15:44
librasteve thanks! 16:02
17:07 topnep left 17:08 topnep joined 17:38 dakkar left 18:18 msiism joined
msiism I'm going thorugh the Course of Raku and have noticed something about the solutions for execises provided in there. 18:21
It seems that, most of the time, these solutions show the most "pragmatic" way to solve a problem in Raku and I wonder whether that is the best idea. 18:22
Here's an example: course.raku.org/essentials/associa.../solution/
Personally, I would go for an if-else inside the loop because that is more "transparent" and universal. 18:24
I'd say that this would also be more appropriate for an introduction to the language. 18:26
The best would probably be to provide a "generic"/"stupid" but correct solution and then also show Raku's shortcut to that solution. 18:28
A few years of shell scripting have taught me that writing out an actual structure instead of using operator-based one-liners to keep things short is often better in the long run. 18:31
19:12 topnep left 19:13 topnep joined
lizmat msiism: are you referring to the use of // ? 19:45
msiism Yes. 19:52
lizmat that is a *very* common idiom in Raku. as well as Perl 19:54
it basically is the same as || but for the left-hand side check on definedness, rather than truthiness 19:55
msiism Yeah, that's handy, for sure.
lizmat and as it's a course in Raku, not general programming techniques, it feels to me that it's pragmatic to show that syntax :-)
msiism Yeah, it should defintiely be shown. Maybe this is just a case of personal preference then. I'll have to look at other examples again. 19:56
lizmat perhaps it could use some explanation that foo // bar is basically short for: foo.defined ?? foo !! bar
msiism Yeah, that would be nice. 19:57
lizmat just as || is short for foo.Bool ?? foo !! bar
msiism I just realized that I tend to solve most of the exercises in less clever way than the author and then it keep that way. :) 20:00
s/it keep/keep it/ 20:01
lizmat that's ok :-) 20:28
21:16 topnep left 21:17 topnep joined 22:35 msiism left 23:21 topnep left 23:24 topnep joined