🦋 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.
Voldenet There is something I don't get though 00:02
Voldenet m: my %a = :4both, :only-a; my %b = :8both, :only-b; say %a >>+>> %b; 00:02
camelia {both => 12, only-a => 1}
Voldenet only-a becomes "1" in this case, but it shouldn't get anything on the other side
m: my %a = :4both, :only-a; my %b = :8both, :only-b; sub hyper-right(%a, %b, &op) { %a.map({ .key => .key (elem) %b.keys ?? op(.value, %b{.key}) !! .value }).Hash; }; say hyper-right(%a, %b, * + *) 00:03
camelia {both => 12, only-a => True}
Voldenet I'd expect something like this 00:04
but what I got is this: 00:07
m: my %a = :4both, :only-a; my %b = :8both, :only-b; sub hyper-right(%a, %b, &op) { %a.map({ .key => op(.value, %b{.key}) }).Hash; }; say hyper-right(%a, %b, * + *);
camelia Use of uninitialized value of type Any in numeric context
{both => 12, only-a => 1}
in block at <tmp> line 1
Nemokosch yes, it kinda seems that it's a silenced addition 00:17
I tried to point this one out - the operator call happens even for the elements that aren't present on both sides 00:19
Tbh I'm not unhappy with this behavior, the docs kinda contradict though
Voldenet it's worrying to me that it seems like it's using `quietly` somewhere 00:21
m: my %a = :4both, :only-a; my %b = :8both, :only-b; say %a >>|>> %b;
camelia {both => any(4, 8), only-a => any(True, (Any))}
Voldenet not all operators and methods will expect this
m: my %a is default("a") = :4both, :only-a; my %b is default("b") = :8both, :only-b; say %a >>|>> %b 00:32
camelia {both => any(4, 8), only-a => any(True, b)}
Voldenet No idea if that should that behave like union 00:33
though I'm pretty sure that most things and methods won't work properly without both parameters 00:38
Geth rakudoc: mujo-hash++ created pull request #15:
Remove failing test
04:54
p6steve using Build.pm I got <<Died with the exception: Failed to spawn process Proc<6021553250912>: no such file or directory (error code -2)>> 10:19
the code is <<my $proc = Proc::Async.new: run <cargo build>;$proc.bind-stdout($*ERR);my $promise = $proc.start;await $promise;>> 10:21
wondering what the "file or dir" refers to ...? or any other hint for what is going on (maybe permissions?) please
lizmat p6steve: you're creating a Proc::Async object with the Promise returned by "run" ? 10:23
tellable6 lizmat, I'll pass your message to p6steve
p6steve lizmat: sorry that's over my head a bit 10:27
lizmat my $proc = Proc::Async.new: run <cargo build> 10:28
tellable6 2022-09-15T22:14:19Z #raku <melezhik> lizmat and finally this one - ci.sparrowhub.io
lizmat p6steve: that feels wrong: Proc::Async.new: run 10:29
tellable6 lizmat, I'll pass your message to p6steve
lizmat actually run returns a Proc object, not a Promise, my bad
Voldenet consider this: my $proc = Proc::Async.new: <cargo build>;$proc.bind-stdout($*ERR);my $promise = $proc.start;await $promise; 10:30
lizmat Voldenet: that feels more natural :-)
Voldenet `Proc<6021553250912>` is what result of run gets converted to… 10:31
p6steve well I want to go <<cargo build>> on the command line in the async process so that I can bind the STD-ERR
voldenet: yes that makes sense - I will try it - thanks!
voldenet: I tried your version and got a linking error ('cargo build' is making an so, 10:44
looked like that was going ok)
if I understand your advice is just to drop the 'run' and go with 'my $proc = Proc::Async.new: <cargo build>;' (otherwise same as my original code)?
Voldenet the task failed successfully 👌
yes, just drop that run, the result will get coerced into string and stop making sense 10:45
p6steve ha! a different failure is always progress! 10:46
oh look, I found this in the string error msg 'note: /usr/bin/ld: final link failed: No space left on device'
Voldenet no wonder, the name of the command says `cargo` after all ;) 10:47
p6steve ok will have to take a break ... but this looks promising 10:48
thanks!
[Coke] how to say "optional dependency" in META6.json? 12:05
tellable6 2022-09-16T22:45:33Z #raku <tbrowder> [Coke] ^^^
lizmat [Coke]: afaik, you can't 12:35
ugexe ^^
[Coke] ok. Makes some sense, as optional dependency is kind of an oxymoron. Just documented it instead. 12:38
Alzo, moved zef-deps to its own repo and just uploaded a pre-1.0 version with fez. 12:39
[Coke] notable6: github.com/coke/raku-zef-deps , maybe? 13:04
notable6 [Coke], I cannot recognize this command. See wiki for some examples: github.com/Raku/whateverable/wiki/Notable
[Coke] notable6: weekly github.com/coke/raku-zef-deps , maybe? 13:05
notable6 [Coke], Noted! (weekly)
lizmat [Coke]: just weekly: is enough 13:36
ugexe you can 14:23
{"any": ["Bar", ""]}
for an optional Bar dependency 14:24
ugexe it would still attempt to install Bar though, so it might not be optional in the sense you want 15:10
but you could have something like `perl:ver<...>:from<bin>` or some such that doesn't fail when it cant find a perl binary but wants to declare it 15:12
jaguart maybe an optional-dependency is like a recommends... 16:05
jaguart Do folks here keep POD and README.md in sync? Do you use a tool? 16:32
lizmat I use App::Mi6, which generates a README from the pod of a distribution 16:39
jaguart Ah ha - thanks - here I am starting to use mi6 and updating the README.md by hand :0 16:40
Nemokosch How does mi6 work? I honestly couldn't really figure it out what it does and how 16:41
only noticed that it reformats META6.json some way which is annoying
jaguart lol - but then so does the META6 class - though I know that work is afoot to make this JSON prettier :) 16:45
Nemokosch I don't know what the META6 class is 16:52
jdv iirc its kinda like distzilla from the perl world 16:56
tellable6 2022-08-30T19:09:02Z #raku <melezhik> jdv  looks like you need to upgrade glibc to make blin work , you can borrow my code - github.com/melezhik/sparrow-plugin.../task.bash
jdv .tell melezhik i tried a few ways and no joy 16:57
tellable6 jdv, I'll pass your message to melezhik
Nemokosch www.youtube.com/watch?v=b8bLIhN04eY I'm watching this video, maybe it helps things clear up 17:21
ugexe github.com/rakudo/rakudo/issues/4907 probably should block any release anyway 17:28
well, i guess we have a release with that issue anyway so i guess it doesnt technically have to block 17:29
but still, a pretty big regression since e.g. debian packagers can no longer package new distros
s/distros/distributions/
lizmat somehow that one escaped my attention: I'll have a stab at fixing that tomorrow, unless someone beats me to it 17:30
ugexe doh i was wrong, you cant use an empty string dependency with `any` 17:35
"depends" : [ "NativeCall:ver<6.c+>", {"name" : { "by-distro.name" : { "" : "" } } } ] 17:37
it would have to be like that
"by-distro.name" -> $*DISTRO.name, which doesn't match any of the entries inside the block (in this case ""), which chooses an empty string dependency 17:38
"depends" : [ "NativeCall:ver<6.c+>", {"name" : { "by-distro.name" : { "" : "Foo" } } } ] -- this would always install Foo for example
because $*DISTRO.name will never == "" 17:39
and you can use an empty sring for a dependency here because it might make sense to only install some dependency on Windows but not linux
all that being said, its not intended/designed to be used for optional depends. it just happens to be able to work as such 17:40
er, so to make an optional dependency that is never downloaded but shows up in depends 17:46
{"name" : { "by-distro.name" : { "xxx" : "Optional::Dependency" } } }
{"name" : { "by-distro.name" : { "xxx" : "Optional::Dependency", "":"" } } } 17:48
Nemokosch Thankfully mi6 itself seems to be maintained by mi6
that's instantly one up-to-date example 😄 17:48
Kaiepi notable6, gist.github.com/Kaiepi/3859a7a8032...9dd8300929 17:54
notable6 Kaiepi, I cannot recognize this command. See wiki for some examples: github.com/Raku/whateverable/wiki/Notable
Kaiepi notable6: weekly gist.github.com/Kaiepi/3859a7a8032...9dd8300929
notable6 Kaiepi, Noted! (weekly)
ad-absurdum I just updated to moar-2022.07, built zef, and installed Linenoise using rakubrew. I got a testing failure which didn't make a lot of sense to me. These seem to be the relevant lines: 19:26
===> Testing: Win32::Registry:ver<0.0.6>:auth<zef:sdondley> 19:27
[Win32::Registry] ===SORRY!=== Error while compiling /tmp/.zef/6d41b9c45ec18ae014e60587ea89c529f356c8f5.tar.gz/Win32-Registry-0.0.6/t/xt/Author-Tests.rakutest
===> Testing [FAIL]: Win32::Registry:ver<0.0.6>:auth<zef:sdondley>
Aborting due to test failure: Win32::Registry:ver<0.0.6>:auth<zef:sdondley> (use --force-test to override)
I did $ zef install Linenoise --force-test, and this seemed to work. I am on Linux, and I don't know why Testing::Win32 would be needed, but am I missing something here? 19:28
Oops, I meant, I don't know why Win32::Registry would be needed on my Linux system ;) 19:31
ugexe because the author of that distribution listed it as a dependency 19:32
ad-absurdum ugexe -- right, but is it needed for a Linux build? Is my build broken now? Is the installation process broken for Linenoise on Linux? 19:35
ugexe if the code does `use Win32::Registry` then yes its still needed, if not then no 19:36
i dont see Win32::Registry listed as a dependency of Linenoise 19:41
ad-absurdum ugexe -- when I ran zef install Linenoise it searched for dependencies and appeared to find them all before testing commenced. The final dependency was Win32::Registry: 19:45
===> Searching for missing dependencies: Win32::Registry
===> Building [OK] for Linenoise:ver<0.1.2>:auth<zef:raku-community-modules>
===> Testing: Win32::Registry:ver<0.0.6>:auth<zef:sdondley>
[Win32::Registry] ===SORRY!=== Error while compiling /tmp/.zef/6d41b9c45ec18ae014e60587ea89
ugexe thats weird 19:52
can you post the full output with `--debug`
ah the repo github.com/raku-community-modules/...META6.json isnt the same one on fez 19:57
ad-absurdum ugexe -- I can; I was thinking about opening a Github issue at raku-community-modules/Linenoise, or would it be better to open at ugexe/zef? Or would it be better just to post a link to output here?
ugexe zef depends Linenoise --debug indeed shows it as a depends
it would be a linenoise issue, but i dont know where the repo is
ad-absurdum ugexe -- you think that the issue originates at antirez/linenoise? 20:00
ugexe i see
it depends on LibraryMake, which depends on Shell::Command, which depends on File::Which, which depends on Win32::Registry 20:01
so you should open an issue on File::Which and tell them to declare a windows-only dependency like github.com/ugexe/zef/blob/main/t/d...st#L19-L29 20:02
`"depends" : [ {"name" : { "by-distro.name" : { "win32" : "Win32::Registry", "" : "" } } } ]` should probably look like that 20:04
ad-absurdum ugexe -- My Raku is remedial at best; to me it is an interesting language that I check in on from time to time. There was a merged pull request a couple of days ago that looks like it may be the culprit: github.com/azawawi/perl6-file-whic...f3d6fb6ae7 20:13
I'm not confident enough to try to create a new pull request on this, but if this looks like the issue I'll raise an issue there. 20:14
ugexe id make an issue on File::Which suggesting that Win32::Registry not be installed on non-windows systems, and then paste my example above 20:20
ad-absurdum ugexe -- It looks like someone opened an issue yesterday about this, but there wasn't much detail. I added a comment to that issue rather than raising a new one: github.com/azawawi/perl6-file-which/issues/21 20:31
Thanks for all of the help tracking this down ;)
ugexe -- Let me just add that one of the things that I have always liked about Raku is the community which has been built around it; keep fighting the good fight 20:50
ugexe github.com/azawawi/perl6-file-which/pull/22 should fix it 21:22
habere-et-disper The documentation say we can make multi-line comments using "Only the paired characters (), {}, [], and <> are valid for bounding comment blocks." 22:04
It appears we can use 「」 as well?
m: #`「 Comment 」
camelia ( no output )
[Coke] ugexe: thanks for the optional path - I think it makes sense to leave it off for now and make it obvious to the user they have to install it if they want the functionality it would provide. 23:13
ugexe: also, thanks for the Zef::Client suggestion, incorporated in 0.9.1 of zef-deps