01:36 Chanakan joined 07:08 Chanakan left 07:59 dakkar joined
webstrand Does raku have any way to specify dependencies inline? I'd like to use it for writing scripts, but having a META6.json sidecar is not idea. 14:46
the ideal would be to allow the script to automatically resolve, download, and unpack its own dependencies at start, but I don't know of any language that can do that 14:47
lizmat would inline specification of a META6.json has be workable ? 14:52
webstrand it looks like the meta6 could be passed to a use statement which does the work of building the repo, I think the compile phase can add additional search directories? 14:54
antononcube @webstrand I think this is exactly what Raku is doing. (Meaning, I most likely misunderstood what you wrote...)
@webstrand Sorry, I got it now... 14:55
webstrand well for instance, I have a raw raku install, I can't just use JSON::Fast because it doesn't exist
making a whole folder per script to hold its sidecars and dependencies isn't friendly to writing scripts
antononcube Hmm... it is like closure for packages, wher the "closure space" is the ecosystem. 14:56
lizmat fwiw, to get the best performance, it's a Raku custom to put most of the logic in modules (which get pre-compiled) and have a script be a (very) simple frontend 14:57
afk&
antononcube @webstrand I think CommaIDE has functionalities related to what you want. It seems to be aware of the ecosystem packages. Or at least the ones installed. In that way CommaIDE can make suggestions about missing dependencies and referencies. 15:22
@ab5tract Does CommaIDE know all ecosystem packages or "just" the ones installed locally? 15:23
webstrand that's just a text editor right, not a library? I don't think that's what I'm looking for, for instance if I copy the script to another server, I'd have to manually resolve the dependencies 15:28
antononcube @webstrand Correct, it is an IDE / editor. As I stated, it has related functionalities. I am not sure how easy it is extract and port them into a Raku package. (Or whatever else programming languae standalone package.) 15:31
ab5tract I’m polishing up some finishing details related to dependency management via zef but Comma already downloads the ecosystem (minus cpan, todo: make this configurable)
webstrand yeah I think zef has an api I can call from a script. I'll have to see if I can do everything in the compile-phase 15:32
antononcube @ab5ract But that ecosystem download is Java (i.e. not in Raku), right? 15:36
webstrand Actually how do I even install zef. Should it have come with rakudo? I'm using the opensuse package, is the package is just incomplete/incorrect? 15:55
librasteve @webstrand what version of raku do you have (raku --version) 15:57
what OS are you on? 15:58
(oh opensuse == suse ... durrr)
it can be that the linux apt package managers are quite out of date -- personally I use rakubrew.org 15:59
(mac and linux)
rakudo now includes zef for a long time
ab5tract Nice 16:00
librasteve otherwise you can easily install from github.com/ugexe/zef 16:01
lizmat git clone github.com/ugexe/zef 16:12
cd zef
raku -I. bin/zef install .
it installs itself that way
webstrand I saw that, and I can do that. But is there a way to install it globally? I think just running it with sudo will result it in being installed under /root not globally 16:15
there doesn't seem to be a clear "install this globally" flag 16:16
antononcube @webstrand You can install zef always, as a first preliminary step in your scripts. 16:17
webstrand --install-to seems to be the right solution. Reinstalling every time would be brutally finicky, I'd have to put shell commands at the top of every script 16:25
Should I install to site or vendor 🤔 16:28
lizmat site I'd say
16:34 dakkar left
holmdunc I know of JavaScript (Deno), Ruby (bunder/inline), Python (PEP723 + uv or pipx) which can do that. It is indeed a cool feature for a single-file script to be able to automatically bootstrap its third-party dependencies if needed 16:50
lizmat and yet another Rakudo Weekly News hits the Net: rakudoweekly.blog/2024/10/21/2024-...ent-alert/ 16:55
webstrand It seems like I could just implement a CompUnit::Repository put it at the end of the repo chain and if a module isn't found and it's fully specified like use JSON::Fast:ver<0.19>:auth<cpan:TIMOTIMO> I could have it install that module? 17:43
I'm not sure if there's a unique-er identifier than a distribution with :ver and :auth
rcmlz :api<1> can be used in the specification too 17:49
as far as I understand :ver<> is morr like in Pythons requirement.txt where everything is nailed specificly. Perhaps if module developers use api more someone would get the improvements whithout risking breaking code. 17:52
lizmat webstrand yes you could 17:53
afk&
20:11 Heptite joined 20:12 Heptite left 20:14 Heptite joined
librasteve @webstrand - you can be quite targeted with ver<...> see docs.raku.org/type/Version 20:50
20:52 swaggboi left
webstrand yep I just wanted to make sure that was the most specific, so that I could only install distributions with equivalent specificity to META6.json rules 20:59
21:05 swaggboi joined 21:10 human-blip left 23:10 Heptite left
aruniecrisps @librasteve i just looked at your post on Definitely, and I was wondering if we can't figure out do notation in Rakku 23:59