🦋 Welcome to the IRC channel of the core developers of the Raku Programming Language (raku.org #rakulang). This channel is logged for the purpose of history keeping about its development | evalbot usage: 'm: say 3;' or /msg camelia m: ... | Logs available at irclogs.raku.org/raku-dev/live.html | For MoarVM see #moarvm Set by lizmat on 8 June 2022. |
|||
07:46
[Coke] left
07:48
[Coke] joined
|
|||
ab5tract | so I'm still struggling to make sense of utilizing %?RESOURCES in a test context | 09:34 | |
is there any way to ask a package for it's resources? | |||
or a dist, or ... ? | |||
[Coke] | You have to have a method in your package that returns it. | 14:29 | |
15:39
AlexDaniel joined
|
|||
AlexDaniel | jdv: “why does tellable disappear?” – I don't know :) | 15:41 | |
there used to be issues with IRC::Client stability, I don't know if that got fixed somehow | 15:42 | ||
[Coke]: “any need to cleanup old whateverable gists?” – I don't know, github certainly didn't tell me that I should, and it has been 9 years. | 15:45 | ||
[Coke]: “Question on raku/ecosystem-unbitrot - says tickets are closed automatically, how? Why a GPL license?” – I'm pretty sure it happens if you run this script: github.com/Raku/ecosystem-unbitrot...-issues.p6 | 15:47 | ||
clearly nobody is running it nowadays so I'd expect issues to not be closed automatically :) I was running the script during the event | |||
if the license is limiting you, I allow you to use code written by me in that repo for any purpose, and you can relicense as you see fit. I can also push a commit with a different license if you need it | 15:49 | ||
as to why I use GPL license for most of my repos, well, it's a standard choice for a software project… I remember perl projects using something odd, maybe I should've used that | 15:52 | ||
16:46
lizmat joined
|
|||
ab5tract | [Coke]: Thanks! much appreciated | 16:56 | |
It both makes sense and is kind of an anti-pattern at the same time | 16:57 | ||
Why wouldn't we just add such a method to Package in the first place? | |||
18:15
lizmat left
18:35
AlexDaniel left
18:48
lizmat joined
18:49
lizmat left,
lizmat joined
|
|||
lizmat | . | 19:00 | |
nine | ab5tract: to which package? There may not even be one. Or there may be multiple. It's much more a property of the comp unit | 19:26 | |
19:40
guifa joined
|
|||
ab5tract | nine: I meant adding it to the Package "class", or to the metamodel that defines it, or whatever | 19:43 | |
Any::Package.^resources | |||
but I guess $*REPO.^resources would be even better | 19:44 | ||
19:59
lizmat left,
lizmat_ joined
|
|||
ab5tract | ah, intriguing... CompUnit::Repository does seem to provide a `resource` method. However, the implementation I'm looking at appears to be entirely path-based, which is a bit surprising | 20:13 | |
nine | ab5tract: point is, a lib/Foo.rakumod may just be "export sub foo() { %?RESOURCES }". There may not be any package to add it to | 20:31 | |
20:31
lizmat_ left
|
|||
nine | Even an empty file would be a valid Foo.rakumod | 20:31 | |
20:32
lizmat joined
|
|||
ab5tract | right, you've already got me on board that this belongs better in the comp unit | 20:32 | |
(this theoretical thing) | |||
For me it feels a lot less clean to manually expose %?RESOURCES than to have a standard, built in mexchanism to do so | 20:33 | ||
but to quote a guy, "I'll not die on that hill" ;) | |||
nine | CompUnit may be the right place | 20:40 | |
20:41
finanalyst joined
|
|||
[Coke] | raku 2025.04 - raku | egrep -v '1|3' | 20:45 | |
^^ this hangs. hit ^C - "uncaught exception" - but it doesn't quite, can hit ^C repeateadly | 20:46 | ||
ab5tract | it makes a lot more sense than package, that's for sure | ||
[Coke] | ^\ does kill it | ||
ab5tract | R#5875 is driving me crazy | 20:47 | |
linkable6 | R#5875 [open]: github.com/rakudo/rakudo/issues/5875 [good first issue][enumerations][objects] Success in enum resolution during &MAIN invocation depends on declaration scope of the enum. | ||
ab5tract | might have to nuke that "good first issue" tag, as I'm completely baffled | ||
m: m: package CoinFlip { enum coin is export <heads tail> }; import CoinFlip; dd ::(heads); | 20:48 | ||
camelia | coin::heads | ||
ab5tract | so it sees the enum via ::() | ||
[Coke] | I have almost never found a correct "good first issue" tag on any raku repo. :) | 20:49 | |
ab5tract | indeed.. but some find my wishful thinking endearing :) | ||
so when the `thevalue` sub is run while processing MAIN, ::(heads) returns Nil | |||
m: m: package CoinFlip { enum coin is export <heads tail> }; import CoinFlip; dd GLOBAL::(heads); | 20:50 | ||
camelia | Failure.new(exception => X::NoSuchSymbol.new(symbol => "GLOBAL::heads")) | ||
ab5tract | m: enum coin <heads tail>; dd GLOBAL::(heads); | 20:51 | |
camelia | coin::heads | ||
ab5tract | so when the enum is not imported but declared inline, it shows up in GLOBAL::() and ::() (do we call this latter one the lexotic lookup?) | 20:52 | |
I don't care as much about GLOBAL, but this discrepancy in ::() is batty | 20:53 | ||
20:54
lizmat left,
MasterDuke joined
20:56
lizmat joined
21:03
finanalyst left
|
|||
ab5tract | Are GLOBAL::(), CORE::(), and ::() all there is? | 21:10 | |
or are there other all-caps whatever-these-are? (couldn't find any docs) | |||
MasterDuke | SETTING:: also | 21:11 | |
ab5tract | ok interesting. is that for the stuff tht lives in lib/ | 21:14 | |
because I only ever hear setting in combination with core setting :) | |||
I was hoping for a CALLER::() | |||
MasterDuke | yeah, i think that exists also | 21:15 | |
ab5tract | hmm | ||
yeah it didnt explode | |||
unfortunately: | |||
m: sub b(\a) { CALLER::(a) }; module M { enum F <q r s>; our sub m { b(q) } }; M::m() | |||
camelia | No such symbol 'CALLER::q' in sub b at <tmp> line 1 in sub m at <tmp> line 1 in block <unit> at <tmp> line 1 |
||
ab5tract | m: sub b(\a) { CALLER::(a) }; module M { enum F <q r s>; our sub m { b(F::q) } }; M::m() | 21:16 | |
camelia | No such symbol 'CALLER::q' in sub b at <tmp> line 1 in sub m at <tmp> line 1 in block <unit> at <tmp> line 1 |
||
ab5tract | maybe it's specific to the block scope in m | ||
m: sub b(\a) { CALLER::(a) }; module M { our sub m { enum F <q r s>; b(F::q) } }; M::m() | |||
camelia | Cannot access 'q' through CALLER, because it is not declared as dynamic in sub b at <tmp> line 1 in sub m at <tmp> line 1 in block <unit> at <tmp> line 1 |
||
ab5tract | m: sub b(\a) { CALLER::(a) }; module M { our sub m { our enum F <q r s>; b(F::q) } }; M::m() | 21:17 | |
camelia | Cannot access 'q' through CALLER, because it is not declared as dynamic in sub b at <tmp> line 1 in sub m at <tmp> line 1 in block <unit> at <tmp> line 1 |
||
ab5tract | "declared as dynamic" <---- the third surprise of the evening. I think I better make it the last one for tonight | ||
MasterDuke | also LEXICAL:: and UNIT:: | 21:18 | |
ab5tract | thanks [Coke] nine MasterDuke | ||
MasterDuke: is LEXICAL:: different from ::() | |||
MasterDuke | dunno | ||
ab5tract | :) | ||
ok | |||
added a doc ticket | 21:24 | ||
m: package CoinFlip { enum coin is export <heads tail> }; dd GLOBAL::(CoinFlip); dd ::(CoinFlip) | 21:36 | ||
camelia | Use of uninitialized value of type CoinFlip in string context. Methods .^name, .raku, .gist, or .say can be used to stringify it to something meaningful. in block <unit> at <tmp> line 1 Failure.new(exception => X::NoSuchSymbol.new(symbol => "G… |
||
ab5tract | ah, that's about stringy-ness | 21:37 | |
m: package CoinFlip { enum coin is export <heads tail> }; dd GLOBAL::("CoinFlip"); dd ::("CoinFlip") | 21:38 | ||
camelia | CoinFlip CoinFlip |
||
22:06
lizmat left
22:09
MasterDuke left
|
|||
jdv | .tell alexdaniel wut? idk. | 22:21 | |
tellable6 | jdv, I'll pass your message to AlexDaniel |