🦋 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. |
|||
00:00
reportable6 left
00:02
reportable6 joined
|
|||
ab5tract | .seen nxadm | 00:02 | |
tellable6 | ab5tract, I haven't seen nxadm around, did you mean nadim? | ||
tellable6_ | ab5tract, I haven't seen nxadm around, did you mean nadim? | ||
MasterDuke | isn't that El_Che? | 00:04 | |
ab5tract | ah, could be | 00:05 | |
.tell El_Che is there any way I could contribute arm64 editions of rakudo-pkg? | 00:06 | ||
tellable6 | ab5tract, I'll pass your message to El_Che | ||
tellable6_ | ab5tract, Sorry kid, that's not my department. | ||
ab5tract | tellable6_: love you babe | ||
tellable6 | ab5tract, I haven't seen love around, did you mean olve? | ||
tellable6_ | ab5tract, I haven't seen love around, did you mean olve? | ||
MasterDuke | heh. i think lizmat kicked the _ version from #raku-dev, don't know who can do that here/now | 00:08 | |
oh, they all have _ versions right now | |||
00:27
ACfromTX joined
01:08
xelxebar left
01:09
xelxebar joined
01:15
hulk joined,
kylese left
02:15
hulk left,
kylese joined
02:29
jpn joined
02:30
kylese left
02:34
jpn left
02:35
kylese joined
|
|||
xinming | when we use rakubrew to upgrade the raku version, What is the best way to re-install all modules in old raku installation? | 02:36 | |
MasterDuke | you shouldn't *need* to | 02:41 | |
xinming | MasterDuke: ?? | 02:43 | |
MasterDuke | installed modules should just continue to work | ||
xinming | When I upgrade the raku version, the old script doesn't run at all? | ||
hmm, I'll try again | |||
MasterDuke: Here, after I switch the raku version, and run script which needs JSON::Fast, It seems I need to reinstall the JSON::Fast | 02:48 | ||
MasterDuke | i'm pretty sure that's not supposed to happen. but i don't use rakubrew, so can't say for sure with it. might be worth filing an issue for rakubrew | 02:50 | |
xinming | MasterDuke: Alright, Yea, i think it's rakubrew's issue | ||
stackoverflow.com/questions/645866...g-rakubrew <--- got one sollution from here, But need to confirm this is the only way, Or there maybe other better ways to do things | 02:51 | ||
03:37
jpn joined
03:42
jpn left
06:00
reportable6 left
06:01
reportable6 joined
06:40
Sgeo left
07:31
jpn joined
07:36
jpn left
08:02
sena_kun joined
08:24
jpn joined
08:46
sena_kun left
08:52
jpn left
|
|||
ab5tract | hm, despite this fix (github.com/Raku/ake/commit/8490d63...2c1d0d10), I got an test error due to PERL6LIB being set while handrolling a Blin docker image last night.. | 10:00 | |
installing it locally worked just fine | |||
:( | |||
lizmat | perhaps RAKUDO_NO_DEPRECATIONS=1 could help? | 10:06 | |
ab5tract | ah, good idea.. I went a bit hamfisted and specified `--force-test`, but that option is way better | 10:07 | |
still, it's definitely a bit confusing.. the version specified is 0.1.2 and the auth is zef:raku-community-modules | 10:09 | ||
10:18
eseyman left
10:49
jpn joined
10:54
jpn left
|
|||
ab5tract | lizmat++, that worked out perfectly | 11:13 | |
lizmat | :-) | 11:14 | |
11:15
bdju left
|
|||
tbrowder | hi, how can i apply a subset type on a named arg in a sub without requiring it to be defined? i'll try to do a simple demo here. | 11:26 | |
m: subset X of Str where { $_ = "x"}; sub f($a, X :$b) {}; f(4); | 11:29 | ||
camelia | assign requires a concrete object (got a Str type object instead) in block <unit> at <tmp> line 1 |
||
lizmat | s/=/eq/ ?? | 11:30 | |
tbrowder | m: sub f($a, :$b) {}; f(4); | 11:31 | |
camelia | ( no output ) | ||
patrickb | In typical setups modules are not shared between versions in rakubrew. | 11:33 | |
tbrowder | actually the where block was too simple. i have to go but the real question is: is it possible to constrain a named but optional param? | 11:34 | |
patrickb | That's dependent on where zef installs the modules. By default they are put in the repos in the respective rakudo installations. Thus they are not shared. | ||
To make them available across installations one needs to install them into a shared repo. Typically into the home folder. (.zef/ ?) | 11:35 | ||
lizmat | m: sub a(Str:D :$foo) { }; a :foo(42) | 11:36 | |
camelia | Type check failed in binding to parameter '$foo'; expected Str but got Int (42) in sub a at <tmp> line 1 in block <unit> at <tmp> line 1 |
||
patrickb | That can be done by adapting the zef config, or implicitly, by making the repos in the rakudo installations read only. | ||
lizmat | tbrowder: the answer is: yes? | ||
ab5tract | patrickb: Maybe a nice feature to add to rakubrew would be to optionally note existing installed packages and then install them into the new version | 11:49 | |
I’ve run into the same scenario as tbrowder, subset types turn optional nameds into required nameds | 11:52 | ||
tbrowder: just add a truthiness check to the where clause | 11:56 | ||
m: subset S where { !$_ || $_ > 0 }; sub s(S :$s) { dd $s }; s(:s(45)); s(); | |||
camelia | 45 Any |
||
12:00
reportable6 left
|
|||
ab5tract | or add a compatible default value (could be a sentinel) | 12:00 | |
m: subset S where { $_ > 0 }; sub s(S :$s = 42) { dd $s }; s(:s(45)); s(); | |||
camelia | 45 42 |
||
12:02
reportable6 joined
|
|||
tbrowder | ah, i think i have solution: make the default values be zero: | 12:10 | |
m: subset X of Any where { $_ ~~ / 0 | a | b /}; sub f($a, :b(0)) { say $a} ; f(1) | 12:13 | ||
camelia | ===SORRY!=== Error while compiling <tmp> Malformed parameter at <tmp>:1 ------> re { $_ ~~ / 0 | a | b /}; sub f($a, :b(⏏50)) { say $a} ; f(1) |
||
tbrowder | oops, forgot sub f($a, X :b(0)){} | 12:15 | |
m: subset X of Any where { $_ ~~ 0 |a|b}; sub f($a, X :b(0)) { say $a}; f(1) | 12:17 | ||
camelia | ===SORRY!=== Error while compiling <tmp> Invalid typename 'b' in parameter declaration. at <tmp>:1 ------> y where { $_ ~~ 0 |a|b}; sub f($a, X :b(⏏50)) { say $a}; f(1) |
||
tbrowder | m: subset X of Any where {$_ ~~ /0 |a/}; sub f($a, X :$b = 0) {say $a}; f(1) | 12:20 | |
camelia | 1 | ||
tbrowder | eureka! | ||
ab5tract | did you miss when I suggested this before? :) | ||
tbrowder | did not see it | 12:21 | |
ab5tract | you can also do `where { !$_ || ... }` | ||
though a better check would be `$_ ~~ Any:U || ...` | 12:22 | ||
tbrowder | thnx! | ||
bye | 12:23 | ||
ab5tract | ciao o/ | ||
is there something like `callsame` but for invoking the next where clause (if any)? something like `subset Maybe where { $_ ~~ Any:U || nextconstraint }` might be nice to have, though it's just a random idea that popped up from this discussion so I'm not sure how feasible / sensible it might be | 12:35 | ||
right now you can just `||` two subsets from with a third subset, so I guess it's really not unlocking anything particularly useful and probably would generally result in confusing subset hierarchies | 12:41 | ||
librasteve | i run rakubrew and a new rakudo version also means a reinstall of all modules for me - i would love to hear if there’s a command / option to preserve the modules repo? | 13:20 | |
zen install App::Crag is a simple way to bring in all the pieces of Physics::Measure etc | 13:24 | ||
.oO | 13:26 | ||
hmm - I could make a personal uber module with all my faves as META6 dependencies and then go zef install github.com/librasteve/my-uber.git | 13:29 | ||
14:06
sena_kun joined
|
|||
ugexe | you could run `zef list --installed site vendor 2> /dev/null` to get a list of all the non-core modules installed, which can be fed to zef install | 14:08 | |
ab5tract | ugexe++ | 14:21 | |
now we just need to roll that into a `rakubrew` flag | |||
ugexe | m: for <site vendor> -> $repo-name { say $_ for CompUnit::RepositoryRegistry.repository-for-name($repo-name).installed().map({ CompUnit::Repository::Distribution.new($_).Str }) } | 14:33 | |
camelia | ( no output ) | ||
ugexe | that also works | ||
xinming | ugexe++ | 15:24 | |
15:25
bdju joined
|
|||
librasteve | something needs to persist over the rakubrew switch, this incantation is close (but it failedwhen I tried it) | 15:46 | |
zef list --installed site vendor 2> /dev/null > scum/zefs.txt rakubrew switch moar-2024.04 cat scum/zefs.txt | xargs zef install % | 15:47 | ||
patrickb | I'm a bit hesitant to turn that into a rakubrew function. Is this a problem rakubrew should solve? Related idea: Changing where modules are getting installed. I don't like rakubrew changing the zef config permanently. ugexe, what do you think? | 15:48 | |
librasteve | probably should write as a perl script (at last, a use for perl) | ||
I think ugexe comment in the SO question pertinent, there are no guarantees that zef internals will remain consistent from one version to another | 15:50 | ||
so the only official way needs to be a list, switch, reinstall - that seems at the meta level for rakubrew (also the current way means that all my modules are tested on the new version on the new zef install | 15:52 | ||
) | |||
ab5tract | patrickb: it’s managing your Raku and zef installations… it seems like straightforward feature flag to me 🤷 | 15:56 | |
ugexe | changing where modules get installed (i.e. a non-site or vendor repo) means CompUnit::Repository::Staging doesn't get used, and hence installing would precomp twice | 16:06 | |
as to the question of is rakubrew should support it - i'd probably look at other existing *brew programs and see which ones also do that | 16:08 | ||
for example | |||
one might install a module that isnt in the ecosystem - for example they install from a local path | 16:09 | ||
i'm not sure how "reinstall" can work for that | |||
i think the advanced of users having to take a separate step to do it manually with zef is that they can probably reason about how to fix it | 16:11 | ||
16:11
jpn joined
|
|||
ugexe | you can pass zef flags like --exclude=..., or just modify the list generated from the first step | 16:12 | |
ab5tract | That’s a good point. One easy option would be just emitting a list of what couldn’t be installed, assuming one “missing” package doesn’t stop the overall install invocation | 16:18 | |
16:20
jpn left
|
|||
ugexe | for the scenario where it is exactly one module that isn't a dependency of anything else yeah passing zef --force-resolve might be fine. but i would assume the more common case is that missing package is a dependency of other things, and those things of other things. So it not only has to skip multiple packages (even though only one is missing), it has to communicate all of that to the user while | 16:27 | |
also communicate the parts that succeeded, and probably also have an option for users to disable that (since some users might not want their repo to be in such a state). there is a lot of nuance like that which makes it difficult to express without a fair bit of verbosity | |||
ab5tract | fair enough. it's important to clarify that I am not suggesting making this a `rakubrew` default. I'm suggesting it as an option | 16:30 | |
tbrowder | abstract: yr solution i think is more than i need for my use case. i’ll point you to it later after i get that working. after i posted the msg you responded to i left before i noticed yrs. | 16:47 | |
ref yr solution for constraints on named params… | 16:49 | ||
ab5tract | tbrowder: there were several workinig example solutions and one more or less wild idea. which are you referring to? :) | 16:50 | |
I think you are talking about the wild idea (`nextconstraint`)? | 16:51 | ||
ugexe | i think my ideal verbose solution would be something like `rakubrew --use=moar-2024.01 exec zef list --installed | rakubrew --use=moar-2024.02 zef install -`, i.e. make rakubrew able to run a single command as a specific raku (one for getting the list from, one for installing to), and then adding something to zef for reading from stdin | 16:54 | |
17:16
jpn joined
17:29
jpn left
17:50
jpn joined
17:55
jpn left
18:00
reportable6 left
18:02
reportable6 joined
18:30
jpn joined
18:46
jpn left
18:56
Sgeo joined
|
|||
librasteve | chatGPT says this: Each Python version managed by pyenv is isolated from the others, meaning that they have their own separate set of installed modules and packages. When you install a new version of Python using pyenv, it's like installing a fresh copy of Python with no additional modules or packages. You'll need to install any modules or packages you need separately for each version of Python you have installed. | 19:53 | |
20:20
jpn joined
20:25
jpn left
20:55
teatime left,
teatime joined
21:16
jpn joined
21:34
jpn left
|
|||
ab5tract | ugexe: any idea what can cause this issue with `Whateverable`? gist.github.com/ab5tract/9e894ef17...4e7ff56423 | 21:37 | |
`Whateverable::Building` is listed as provided in `META6.json` but isn't findable .. but other modules provided by `Whateverable` are | 21:38 | ||
22:18
jpn joined
22:48
linkable6_ left,
jpn left
22:49
linkable6_ joined
|
|||
[Coke] | did yuo install it? | 23:37 | |
if not you need a -I. | 23:38 | ||
(are you sure others arwn't installed, e.g.) | |||
ab5tract | As me | 23:42 | |
As mentioned, other modules provided by the distribution are available | 23:43 | ||
ugexe | zef locate Whateverable::Building | 23:57 | |
does that find it? | |||
I can’t think of how that could happen beyond installing some older version that doesn’t have it (if even exist) | 23:58 | ||
23:59
sena_kun left
|