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.
nijmegenzuigt hey now, I read the comments on that PR 😠 hehe 06:34
rcmlz @nijmegenzuigt for me the advantage of using the „module approch“ (simplified by e.g. MI6) and maintining a META6.json is: installation with zef is possible and this means that all your dependencies are installed automatically. These days starting a Python project without a requirements.txt straight from the beginning is also not very sustainable. 06:58
nijmegenzuigt I wonder how many languages require you to pass other files as arguments into the compiler just so you can use external functions/classes what have you 07:03
rather than a simple import where it looks the same dir before it goes on a list of priorities
Raku docs delve quick into the many different ways, mainly Nim nor Hare (or Pascal) make it this complicated. the PR may call Raku lightweight for this sort of thing but scripting languages tend to make things easier; not more PITA 07:05
the way Raku does modules is very esoteric; delving into zef and such should not be a requirement 07:07
requiring me to set up other files (and even changing their file extension, which is also something UNIX systems dont care about) when I want to sort code feels kind of weird; you'd except a rakumod file maybe in a folder that outlines the raku files but that is a first impression thing 07:10
07:26 avuserow_ left 07:27 avuserow_ joined
nahita3882 > require you to pass other files as arguments hmm, it doesn't require you to pass other files but the directories they are contained, you meant that? indeed "." is not by default in the search path, most probably for security reasons 07:29
passing -I. to the raku executable is one option, another is use lib "."; in your driver code
another is RAKULIB environment variable; if you put "." there, you get, e.g., the Python's behaviour 07:30
nijmegenzuigt that last one seems iffy but I never write Python thankfully... Nim can make Python modules so I avoid that minefield 😛 07:32
nahita3882 :\ 07:33
librasteve I think we all agree that the actual feature of raku to do lightweight use of code in other files as set out in my minimal example is good. I think that we need to have this minimal example set out in the beginner 101 examples part of the docs. There is also (in raku.guide) a good beginner oriented section on how to install existing packages with zef. 12:58
I contend (also in my comments in the PR) that (i) creating and distributing modules is NOT a beginner topic (even with Mi6 to help) and (ii) there is some confusion in the docs that needs a refactor at some point - but that this "perfect" should not stop the "good" of making the PR change. 13:01
nijmegenzuigt my original confusion stems from the fact that merely wanting to separate a class in another file requires me to delve into the (unit) module system whereas with other languages other modules/units don't come with the inherent implication that it's meant to be redistributable. You'd do that on the compilation step to create a shared object or binary etc. Raku docs straight up just assumes "you want to 13:35
distritube this and heres how to install it" and I feel this is abrasive for a beginner (as you said so I'll leave it here.) Thanks for the PR 🙂
librasteve yeah - obviously the docs would lead you to that conclusion - sorry about that - I hope that we can improve them over time 13:39
lizmat perhaps EVALFILE should be more emphasized in that respect? docs.raku.org/type/independent-rou...b_EVALFILE
antononcube @lizmat Yeah I was thinking about EVALFILE why last time I was not that "happy" using it. 13:40
lizmat well, for one, there would be no precompilation, so for large files this would get noticeable 13:41
librasteve hmmm EVALFILE seems like something we should hide under a rock
lizmat but would it have helped the op ? 13:42
librasteve don't wanna put words in Arend's mouth,but if you think that RAKULIB is "iffy" then maybe EVALFILE is errr EVIL 13:43
antononcube I just wanted to get a script with some frequently used LLM configurations -- each of them relatively small & simple. But I had a dozen of them, so it was inconvenient to type them it or copy-and-paste them every time I make a new notebook. (Or chatbook.) So, I used a simple ".raku" file first, and as @Arend I wanted to just ingest it.
Ultimately made a package.
nijmegenzuigt well, setting env vars per project basis is not desirable
lizmat wonders whether nijmegenzuigt is from Arnhem 13:44
nijmegenzuigt they got me 13:45
lizmat well, with a nick like that
antononcube I thought it was "pijamas" in Dutch. 13:46
lizmat being married to someone from Nijmegen, the nick is pretty suspect :-)
nijmegenzuigt my girlfriend moved to Nijmegen, really had to wonder myself if she is worth that much trouble; but she makes Nijmegen tolerable so I guess she's a keeper 13:47
lizmat does she know what your nick is here ? 13:49
antononcube @lizmat For some, Raku and love do not mix. 13:50
I do not tell my family about my Raku communications. 13:51
nijmegenzuigt when I met her she said she was from Rozendaal (what I heard) but after a bit she meant Roosendaal (Brabant) so she's willingly calls ehrself a Burgundian, dinner table, restaurants where you eat something before you actually eat the thing you came for, the dish after that etc
so she's well aware of my opinion of Nijmegen 13:52
haha
lizmat funny, I grew up in Roosendaal :-)
nijmegenzuigt Burgundians and their 3 hour food rituals man
wouldnt catch me calling myself such 13:53
lizmat it gets longer in Limburg :-)
nijmegenzuigt Venlo is alright but lower than that and someone like me risks being called Hollander or Prussian when I tell them where I am from originally haha, although it's been a decade or two since I've further strayed south of the Rhine 😉 14:07
probably not a thing anymore these days
lizmat not with younger people, no :-) 14:08
nijmegenzuigt Zevenaarders do have a reputation and I uphold that reputation quite proudly
lizmat well, with seven Earths, you'd have quite a reputation indeed :-) 14:15
nijmegenzuigt quite the meerkol aren't you 🙂 14:21
lizmat I don't try to imitate, I just pun a lot 14:23
14:26 soverysour joined, soverysour left, soverysour joined 14:34 soverysour left
librasteve fwiw I took a look at nim-lang.org and wondered how the iterator / yield showcase example would look in raku gist.github.com/librasteve/ad653f0...879e0f93f6 14:51
gfldex @librasteve why not use gather/take? Raku iterators are kinda internalish and I would not promote them, unless given a very good reason to do so. 14:55
librasteve m: [3, 6, 9, 12, 15, 18].grep(not * %% 2).say 15:01
Raku eval (3 9 15)
librasteve gfldex: good question - I wanted to try out making a raku Iterator since I had never learned that - but as you point out timtowdi and sure raku has more natural ways to do that 15:02
lizmat gather / take is a cool way to create a Seq 15:04
gfldex I found that it's quite easy to translate a gather/take with exactly one take to an iterator quite easy. If things get complicated, iterators stop being fun swiftly.
lizmat but if you're looking for performance, a proper iterator will beat that easily, because of the context switching overhead of "take"
(as "take" throws an exception) 15:05
antononcube @lizmat I might have to evaluate from that perspective some of the "Graph" algorithms. 15:10
15:16 soverysour joined 15:19 Chanakan left 15:21 soverysour left 15:24 soverysour joined
Does sort modify the array it is called in place. (I think not, but I cannot find something stating that in the documentation.) 15:31
Agh, of course, simple experiment confirmed it does not... 15:33
But, is that true for, say, Perl 5?
gfldex @antononcube see: github.com/rakudo/rakudo/blob/main...umod#L1373 The use of self!deep-clone indicates copy-then-sort. 15:34
lizmat fwiw, all sorting is in place, but usually on a clone of the original 15:44
antononcube Good to know! 16:21
16:28 soverysour left 16:47 soverysour joined 17:10 swaggboi left 17:21 swaggboi joined 18:15 soverysour left
vendethiel Sounds like an average french meal :-P 21:41