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.
00:02 guifa_ left 00:41 razetime joined 00:53 ab5tract left 01:12 ab5tract joined 01:20 razetime left 02:25 ab5tract left 07:53 dakkar joined 08:16 tea3po joined 08:20 teatwo left 09:41 NemokoschKiwi joined 10:00 NemokoschKiwi left 12:59 habere-et-disper joined 13:07 habere-et-disper left 14:31 voidzero joined
voidzero What's a good book on Raku? Not a total Perl beginner, but still a newbie somewhat. 14:32
librasteve personally I like think raku (althought this teats you like a beginner to all programming, it is easy to speed read and get a very well organised into the main features imo) 14:33
greenteapress.com/wp/think-perl-6/ 14:34
^^ freudian slip?
otherwise, the docs.raku.org pages have sectional intro material 14:36
so after reading raku 101, then just read the tutorials that take your fancy 14:37
docs.raku.org/language/classtut, docs.raku.org/language/grammar_tutorial, docs.raku.org/language/list, docs.raku.org/language/hashmap, docs.raku.org/language/control 14:39
^ maybe these 14:40
voidzero great, librasteve thanks! 14:48
rcmlz I originally got interested in Raku because of concurrency: docs.raku.org/language/concurrency, also good to know (to avoid reinventing the wheel) what is already build in Arrays/List docs.raku.org/type/List plus hyper/race from docs.raku.org/type/Iterable
antononcube @voidzero In case your prefer recipe or case studies books: 1. "Raku Fundamentals: A Primer with Examples, Projects, and Case Studies", www.amazon.com/Raku-Fundamentals-E...1484261089 2."Raku Recipes: A Problem-Solution Approach", www.amazon.com/Raku-Recipes-Proble...1484262573 15:24
voidzero I enjoy the 'Learning Perl (8th edition)' and 'Intermediate Perl' books a lot 15:28
doing the exercises is very useful 15:29
antononcube @voidzero If you want to "graduate" from using 3d or 4th generation programming languages into 21st century AI-infused programming experience, then read: 1. "Workflows with LLM functions", rakuforprediction.wordpress.com/20...functions/ and 2. "Number guessing games: PaLM vs ChatGPT", 15:31
rakuforprediction.wordpress.com/20...s-chatgpt/
voidzero I'm not sure I'm ready for that yet LOL 15:32
hey what's your discord link so I can just join that
antononcube @voidzero I am not sure what is "a Discord link"? Of Raku's discussion group at Discord? 15:34
voidzero yes, please :) I assume that there are more channels than just the two I'm in via LibreIRC
antononcube This should work: discord.com/invite/VzYpdQ6 . See here: raku.org/community/ . 15:35
realvoidzero Much better, thanks 15:38
15:38 voidzero left 15:39 razetime joined 15:41 razetime left
nemokosch Lol 15:42
The legend has manifested
antononcube Whose / what legend? 15:46
15:51 ab5tract joined
nemokosch the dragon's legend 16:04
16:33 dakkar left 20:15 teatwo joined 20:16 teatwo left, teatwo joined 20:18 tea3po left
jgaz Is there a streightforward way to compare an smaller array against a larger array and get the offset of any match? That is @small would be a part of @large having the exact same elements in the exact same sequence but at some unknown index? 21:11
ab5tract jgaz: good question. unfortunately nothing comes to mind besides doing it in a "traditional" algorithm 21:18
though I imagine someone smarter than me could come up with some way to do it via stringification and regexes 21:19
21:21 Tirifto left, camelia left, Tirifto joined
jgaz ab5tract, thanks. 21:21
21:27 camelia joined
ab5tract m: my @a = 1, 3, 5; my @b = 1, 8, 9, 0, 1, 3, 5, 6; my $offset; for @b.kv -> $i, $v { next unless $v == @a[0] || all(@b[$i + 0..^(+@a)] == @a); $offset = $i }; say $offset 21:29
camelia? 21:30
anyway, the above seems to work jgaz ^^
actually can get rid of the first part of the unless
scratch that... 21:31
you need the first part too :)
m: say "hello"
jgaz Let me play with it and see if it works for me. 21:32
ab5tract not sure what's gone wrong with our butterfly :(
I've violated my own principle for using unless here, though (that is, never use unless with more than a single condition) 21:34
camelia 4 21:38
hello
ab5tract o/ camelia! :)
m: my @a = 1, 3, 5; my @b = 1, 3, 6, 0, 1, 3, 5, 8; my $offset; for @b.kv -> $i, $v { next unless $v == @a[0] || all(@b[$i + 0..^(+@a)] == @a); $offset = $i }; say $offset 21:41
camelia 4
ab5tract doh
m: my @a = 1, 3, 5; my @b = 1, 3, 6, 0, 1, 3, 5, 8, 9; my $offset; for @b.kv -> $i, $v { if $v == @a[0] && all(@b[$i + 0..^(+@a)]) == @a { $offset = $i; } }; say $offset 21:42
camelia 4
ab5tract ^^ jgaz, a less confusing edition, perhaps. note that if you want it to only pick up the first existence of @a in @b, you will want to add a last in that if block 21:43
wambash m:my @a := 1, 3, 5; my @b := 1, 8, 9, 0, 1, 3, 5, 6;@b.rotor( +@a => -(@a-1) ).grep( * eqv @a, :k).say 21:47
Raku eval (4)
ab5tract wambash: nice one! 21:49
nemokosch "create a sequence of shifting windows in @b that have the size of @a, and look up the index where the window matches @a exactly"
possibly multiple indices 21:50
I figured it might be a bit dense to read if you are unfamiliar with the principle ^^
@wambash what are you using Raku for, if I may? 21:52
wambash mainly for fun, lately I'm using Raku at university for some scripts for (static) malware analysis using fuzzy sets. 22:05
ab5tract wambash: that sounds like some interesting work 22:06
Marcel249 Hi everyone, I am obsessed writing code in Raku, it's such a cool language. Why can't I find a good Raku Wallpaper?
ab5tract Marcel249: hmmm, we don't seem to have one of those, do we 22:09
nemokosch are you a professor? 22:10
ab5tract Marcel249: somewhere there should be a camelia in SVG that you could use to create one 22:17
wambash senior lecturer 22:19
nemokosch will do šŸ¤  22:25