🦋 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.
tbrowder .tell [Coke] the module that failed was ver 0.17.1 of Digest. The module I was installing was PDF::Document. Note Digest just put out a fix in ve 0.18.0 01:13
tellable6 tbrowder, I'll pass your message to [Coke]
tbrowder it looks like the module calling Digest explicitly called ver 0.17.1. I 'm trying to let that author know of the problem 01:15
tellable6 2022-09-13T23:36:28Z #raku <[Coke]> tbrowder github.com/coke/scripts/blob/master/zef-deps gives, e.g.: gist.github.com/coke/5420a56d04a92...9b1a17f22f
habere-et-dispet I was surprised that this didn't work: 08:14
m: $foo .= substr: 1 if .chars == 3
camelia ===SORRY!=== Error while compiling <tmp>
Variable '$foo' is not declared. Perhaps you forgot a 'sub' if this
was intended to be part of a signature?
at <tmp>:1
------> <BOL>⏏$foo .= substr: 1 if .chars == 3
habere-et-dispet You can make it so with:
m: $foo .= substr: 1 if .chars == 3 given $foo
camelia ===SORRY!=== Error while compiling <tmp>
Variable '$foo' is not declared. Perhaps you forgot a 'sub' if this
was intended to be part of a signature?
at <tmp>:1
------> <BOL>⏏$foo .= substr: 1 if .chars == 3 given $
habere-et-dispet Which seems redundant?
m:  my $foo = 123; $foo .= substr: 1 if .chars == 3; 08:16
versus
camelia No such method 'chars' for invocant of type 'Any'. Did you mean
'chrs'?
in block <unit> at <tmp> line 1
habere-et-dispet m: my $foo = 123; $foo .= substr: 1 if .chars == 3 given $foo;
camelia ( no output )
tonyo m: my$f = 123; $f .=substr(1) if $f.chars==3; 11:59
camelia ( no output )
tonyo m: my $f = 123; $f .=substr:1 if $f.chars==3; 12:01
camelia ===SORRY!=== Error while compiling <tmp>
Confused
at <tmp>:1
------> my $f = 123; $f .=substr:⏏51 if $f.chars==3;
expecting any of:
colon pair
12:01
tonyo The colon makes it ambiguous 12:01
tonyo Yours has a different error message because $_ is Any when it gets there 12:02
Nahita they have a different error message (and at a different time) because you have no space after `:`, they do... i think 12:04
tonyo Oops 12:10
m: my $f = 123; $f .=substr: 1 if $f.chars==3;
camelia ( no output )
tonyo it should work with that
the error is still because `if .chars` rather than `if $foo.chars`
Nahita yes; but `my $foo = 123; $foo .= substr:1 if .chars == 3;` will fail at compile time 12:12
and their question was "why `$f` is not topicalized in `.substr` for me" i think
tonyo how'd you get that from `I was surprised that this didn't work:`? it does work if you tell it what you want to call .chars on 12:36
Kaiepi bisectable6, my $s = "chopped\n"; $s.chop: 1; print $s 12:56
bisectable6 Kaiepi, Will bisect the whole range automagically because no endpoints were provided, hang tight
Kaiepi, ¦6c (65 commits): «chopped␤» 12:57
Kaiepi, Nothing to bisect!
Nahita tonyo: they expected $_ to refer $foo so `.chars` works as they expect; you can see their subsequent message with `given $foo`. At this point, it is best if they answer or not it seems; sorry for the clutter. 14:00
tonyo oh, that should work too with the right syntax 15:09
m: my $foo = 123; .=substr: 1 if .chars == 3 given $foo;
camelia ( no output )
tonyo m: my $foo = 123; .=substr: 1 and .say if .chars == 3 given $foo; 15:10
camelia 23
[Coke] what is best practice on declaring "Test" as a dependency in the ecosystem? 15:48
tellable6 2022-09-14T01:13:44Z #raku <tbrowder> [Coke] the module that failed was ver 0.17.1 of Digest. The module I was installing was PDF::Document. Note Digest just put out a fix in ve 0.18.0
[Coke] Test is required to be available as part of the spec, yes? 15:53
moritz yes 16:04
[Coke] is there a way to get zef to use "recent" results of 'zef info' so it doesn't have to go out to the ecosystem (with a warning that it might be out of date, etc.)
[Coke] my current use case: running this dep checker script over and over. :) 16:05
[Coke] script updated to race results where possible, and omit printing duplicates of the hierarchy that were already printed (e.g. multiple modules depend on the same module which has its own hierarchy) 16:14
github.com/coke/scripts/blob/master/zef-deps
lizmat: looks like the defaults for race on this mac are not in || 16:16
had to specifically say :batch(4) to get it to do multiples
gist.github.com/coke/5420a56d04a92...9b1a17f22f shows the current shortened output for tbrowder's PDF::Document question 16:20
lizmat [Coke]: am not sure what the problem is? If you don't specify batch, it should be 64 afaik 16:21
[Coke] and it appears to be 1 16:22
no batching.
it basically makes it one-at-a-time unless I specifically add a :batch
this on the m2 16:23
(would it be helpful if this script also showed if a thing was installed?) 16:24
lizmat github.com/rakudo/rakudo/blob/mast...le.pm6#L60 16:26
not sure how that can become 1 :-(
[Coke] I'm not seeing a literal one, but it's clearly only running one a time. re-checking... 16:28
tonyo is this for precomp-ing? 16:29
[Coke] if you run that script as is with "PDF::Document", you can see that afted the first line, several are printed at once. if you update the .race(...) call to just .race.map, I see it running one at a time. 16:30
github.com/coke/scripts/blob/master/zef-deps - there's no precomp here.
lizmat: setting "degree" doesn't seem to impact things, but setting batch shows it kicking off that many at a time. 16:31
lizmat weird
[Coke] mm 16:32
[Coke] I think my .race idiom there launching proc::async is correct... not everything is batchable since we're getting n deps each time we check, and after a while it's probably just one chain we're chasing getting 1 or 2 at a time. 16:35
(but for pdf::document, we do a single run, then get like 10 deps, so those should definitely have multiples running) 16:38
OH
the problem isn't that 1 is too low, it's that 64 is too high! 16:39
so it's doing 64 of them in one batch... which means they're single threaded in that batch.
[Coke] nevermind, working as intended. 16:40
lizmat++ forcing me to think it out 16:42
lizmat you're welcome... :-)
[Coke] since my items are slow, I want batch size of 1, basically. 16:43
fixed, pushed, added the check mark to show installed modules. 16:45
tonyo [Coke]: i had code at one point that did that for precomp-ing. we didn't use it because at the time you couldn't precomp independently modules simultaneously without some strange effects anyway but i think it still exists out there somewhere 17:35
(which is why i wondered if it you were precomp-ing and not just dependency wrangling)
[Coke] nope, just running zef a bunch of times to get the lists 17:36
tonyo github.com/tony-o/p6-Uxmal 17:37
if you aggregate the metas into a giant json array you can use this for various activities
this blog post from nearly a -0BC shows what the dot graph looks like deathbykeystroke.com/articles/2018...ndeer.html 17:39
[Coke] tonyo: so I could add a -flag or something that invoked your code and got the graphviz data? 18:03
tonyo yea 18:04
[Coke] tonyo++ 18:13
I don't see how to tie my use case in there. 18:19
make my own %tree and generate-dot ? 18:20
the tree looks VERY complicated if I do a depends-tree on 3 deps.
generate-dot does do the right thing with it, though. 18:21
ah. don't generate the tree by hand, generate the list-of-metas.
[Coke] tonyo: done: gist.github.com/coke/28d0fcb7bbdf2...04555c6e8a 18:57
that from ./zef-deps --graph App::Cal
I would like to make the Uxmal dep optional, but for now it's mandatory even if you're not using --graph 18:58
tonyo++
tonyo looks great 19:05
what are you working on? 19:12
i'm not sure if uxmal is in the world or not, that was a while ago. so long ago my nice sweater from that PTS is no longer legible and has holes in it 19:13
[Coke] tonyo: tbrowder was asking how to see dependencies, we only had "the hard way" to use zef manually, so I automated it. 19:18
github.com/coke/scripts/blob/master/zef-deps 19:19
gist.githubusercontent.com/coke/28...IROWBA.png - PDF::Document 19:21
whee.
tonyo ahh nice 19:24
heh, that one is wild
what is it for zef?
also, do you need me to publish uxmal somewhere? 19:26
[Coke] I just did a zef install Uxmal and it worked. 19:29
so you already did at some point, I guess?
zef itself is just Nativecall and Test, I think 19:30
tonyo ope, you're right 19:32
tonyo wondering how easy it'd be to write a slang to make something like Option[X],Result[X,Y] work with a `?.` operator in raku. not convinced it'd even need to be a slang 20:40
oops, wrong channel 20:41
melezhik o/ 20:44
finally fixed broken archlinux bootstrap in sparrowdo ... if someone needs to automate things in archlinx they might use sparrowdo for that ... 20:45
El_Che tonyo: is the other channel #ruby? :P
tonyo it'd be haskell but no, just a channel i idle in with a friend from childhood 20:48
someone sent me the pseudo functional thing from ruby, not sure i'd touch that with your computer
:)
stevied looking at metacpan.org/pod/Paws 21:00
tonyo m: role option { has $!v; has $!s = False; submethod BUILD(:$!v, :$!s) {}; method is-some { $!s } }; sub Some($t) { option.new(:$t, :s(True)); }; sub None { option.new(:s(False)); }; sub infix:<.?>(option:D \a, Callable $b) { if a.is-some { $b.(a); }; }; Some("hi") .? &say; None() .? &say; 21:01
camelia option.new
tonyo i guess without a grammar, yea, but it's ugly
stevied I gotta assume one guy isn't writing and updating that massive amount of code and the code is generated from AWS api documentation 21:02
melezhik .tell El_Che would you be interested to do something with rakusta - github.com/melezhik/rakusta ? 23:01
tellable6 melezhik, I'll pass your message to El_Che
melezhik .tel El_Che I managed to build for archlinux - sparrowhub.io:4000/report/rakudo-build/5367 23:10