🦋 Welcome to the MAIN() IRC channel of the Raku Programming Language (raku.org). This channel is logged for the purpose of keeping a history about its development | evalbot usage: 'm: say 3;' or /msg camelia m: ... | Log inspection is getting closer to beta. If you're a beginner, you can also check out the #raku-beginner channel!
Set by lizmat on 25 August 2021.
mcmillhj What is the proper way to have a class method accept an instance of the same class for some comparison operation? I tried like this but am getting an error: 03:28
topaz.github.io/paste/#XQAAAQDuAAA...7f/+/2hVA=
nvm .. I am being an idiot. This approach works fine I was just missing the proper sigil. 03:31
guifa mcmillhj: you can also use ::?CLASS, which will always match your class (even if you change its name later). Neat little trick 06:00
SmokeMachine .tell mcmillhj it seems you’ve just missed the sigil… (glot.io/snippets/g5scg1bf5l) 08:50
tellable6 SmokeMachine, I'll pass your message to mcmillhj
El_Che .tell melezhik bintray sunsetted their repo infrastructure so I moved to cloudsmith with the added bonus it also has alpine repos 09:35
tellable6 El_Che, I'll pass your message to melezhik
El_Che it may be an statistical coincidence but on the many builds I ran on arm64 while figuring things out, I didn't get flapper tests. It seems flapping may be an arm64 thing (jit?) 09:39
El_Che dams, my first failed arm64 test :) t/02-rakudo/repl.t 12:03
lizmat El_Che: looks like t/02-rakudo/repl.t is a flapper, it just failed for me on HEAD on MacOS 13:58
was the error: 13:59
Non-zero exit status: 255
Parse errors: Bad plan. You planned 47 tests but ran 11.
?
El_Che yeah, I had that one as well 14:04
Tirifto Hello! Would anyone happen to know what ‘return_value + exit_handler case NYI’ might mean? (I guess ‘NYI’ could be ‘Not Yet Implemented’, but then I’m not sure what exactly is lacking implementation.) 16:09
It’s an error message returned by Rakudo.
lizmat Tirifto: that seems like a pretty exotic error message: how did you get it ? 16:11
Tirifto lizmat: I wrote a simple static site generator in Raku. There, I have a custom subroutine for reporting progress (it only says messages). The program used to work fine, until now I just slightly changed how the subroutine works and added a few calls to it, which gave me this error message. The change involves a dynamic variable and changing its value with ‘temp’. 16:17
lizmat Tirifto: without a golf / gist of the program, there's not a lot one can say about that 16:21
Tirifto lizmat: Sorry, what do you mean by ‘golf’ and ‘gist’? Raku has ‘gist’, but I guess you’re asking for the source code or some representation thereof? (I should be able to share in a bit.) 16:25
lizmat in this context, "golf" refers to a piece of code that can be run to show the problem 16:26
in this context, "gist" means a URL to a place on the Interwebs where that code can be seen / copied
if you have a Github account, gist.github.com would be the easiest way to make a gist 16:27
Tirifto lizmat: I see, thank you for the explanation! So far I have only been able to reproduce the error by running my program (or the tests thereof), but I’ll see if I can isolate it in shorter, single-file code. I don’t use GitHub, but I suppose any plaintext sharing service might work fine? 16:31
lizmat yeah, as long as you can paste a URL here :-) 16:33
Tirifto Aha! I overlooked a line in my code; now I know more precisely what causes the issue, but it still seems odd, so I’ll be pasting shortly. :-) 16:42
lizmat oki! 16:45
holyghost Tirifto, maybe upload your code too 16:47
nm
s/nm/never mind me/ 16:49
Geth ecosystem: sdondley++ created pull request #601:
rm Mac::Applications::List from p6c
16:54
Tirifto lizmat: tirifto.xwx.moe/d/raku-bug-2022-01-04-temp.txt 16:55
Geth ecosystem: b57386d26b | (Steve Dondley)++ (committed using GitHub Web editor) | META.list
rm Mac::Applications::List from p6c (#601)
cono is there anyway to get `assuming` function for %h{SOMETHING} ? 16:56
lizmat Tirifto: OOC, which version of Rakudo are you using ? 16:58
lizmat cannot reproduce any issue with that gist 16:59
cono I was expecting that %h{*} will generate to me similar thing to `* + 2`, whatevercode which I can use in reduce operator
Tirifto lizmat: Welcome to Rakudo™ v2021.12. Implementing the Raku® Programming Language v6.d. Built on MoarVM version 2021.12.
lizmat hmmm... 17:00
Tirifto: are you trying to limit the scope of the change to $*dynamic ? 17:01
if that is so, using 'my' would be better 17:02
Tirifto Generally it seems that when I set a temp variable in a block and put a ‘when’ block in there, the ‘when’ block errs. 17:03
lizmat: That is my goal and using ‘my’ seems to work fine, thank you. :-) 17:04
lizmat yeah. maybe we should make using temp on dynvars illegal 17:05
dinner&
Tirifto lizmat.have: $good-meal;
Tirifto Well, now I know not to use ‘temp’ with dynamic variables, but I wonder why. What makes ‘my’ a better choice both technically and conceptually? 17:09
(If there’s a simple answer to that question. :P)
El_Che doesn't dynamic variables break the scope? 17:11
cono m: sub print-home { %*ENV<HOME>.say }; { temp %*ENV<HOME> = "/home/Tirifto"; print-home }; print-home 17:14
camelia /home/Tirifto
/home/camelia
cono i was thinking that temp's only use case is - dynamic variables 17:15
m: my %*ENV<HOME> = "/home/my"; %*ENV<HOME>.say 17:16
camelia ===SORRY!=== Error while compiling <tmp>
Shaped variable declarations not yet implemented. Sorry.
at <tmp>:1
------> my %*ENV<HOME>⏏ = "/home/my"; %*ENV<HOME>.say
Tirifto El_Che: My understanding is that whenever a function looks for the value of a dynamic variable, it should do so in the context of its call. So it does, or maybe rather uses a different one. `o` 17:22
El_Che indeed the caller instead of the outer scope
lizmat a dynamic variable is basically a lexical variable that is "visible" from its inner scopes 17:39
m: sub a() { my $*A = 42; b }; sub b() { dd $*A }; a 17:41
camelia Int $*A = 42
lizmat m: sub a() { my $*A = 42; b }; sub b() { dd $*A }; b
camelia Failure.new(exception => X::Dynamic::NotFound.new(name => "\$*A"), backtrace => Backtrace.new)
lizmat the "system" dynamic variables also have a fallback in PROCESS::, the outer outer lexical scope 17:42
whenever you look up a dynamic variable, it checks the lexpads of all the frames in the callstack
and picks the first one it finds
it gets slightly more complicated with start blocks, but that's the idea 17:43
holyghost &afk 17:58
Nemokosch more like afk& aint it 18:17
El_Che afk&&shutUp :) 19:18
[Coke] hopes everyone's new year is going well so far 21:34
Geth doc: sdondley++ created pull request #4008:
update information about methods for distributing modules
21:58