🦋 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 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 8 June 2022.
Geth ecosystem: eb38ec02d2 | (Richard Hainsworth)++ (committed using GitHub Web editor) | META.list
returning Collection-Raku-Documentation

There is a problem with fez uploading executables (issue # 61 there). Will migrate Collection-Raku-Documentation to fez when the issue is resolved
10:23
leont Apparently I have just today to come up with a presentation for rakucon, so I guess that's a no (unless people want a rant on all the things I don't like about Raku in 2022, but I doubt you want that negativity) 11:48
habere-et-disper How to declare a hash with its inverse? This seems verbose: 11:52
m: ('a'..'z', 0..25).flat Z=> (0..25, 'a'..'z').flat
camelia Potential difficulties:
Useless use of Z=> in sink context
at <tmp>:1
------> ('a'..'z', 0..25).flat ⏏Z=> (0..25, 'a'..'z').flat
tellable6 hey habere-et-disper, you have a message: gist.github.com/c1e697f057d819d215...6ed65d27c3
habere-et-disper Thank you @tellable6. I'm trying to get an exhaustive list of uncomposed operators to create test cases for typeface ligature support. 12:02
tellable6 habere-et-disper, It's my pleasure!
lucs Is there a way to have a foo() where foo($x) would return 'x', that is, the name of the variable? 13:22
lucs (Maybe with macros?) 13:33
lizmat m: sub a(\a) { dd a.VAR.name }; my $b = 42; a $b 14:12
camelia "\$b"
lizmat lucs ^^
m: sub a(\a) { dd a.VAR.name }; my $b = 42; a 666 14:18
camelia No such method 'name' for invocant of type 'Int'. Did you mean any of
these: 'Num', 'are', 'base', 'none', 'note', 'take'?
in sub a at <tmp> line 1
in block <unit> at <tmp> line 1
lizmat m: sub a(\a) { dd try a.VAR.name }; my $b = 42; a $b; a 666 14:19
camelia "\$b"
Nil
lucs lizmat: Thanks. (Damn, raku is fantastic.) 14:23
Nemokosch leont: I'd definitely be curious, lol
lizmat leont: please, do do a presentation! If you must, on the things that you don't like :-) 14:24
Anton Antonov @lizmat I think you answered a question I was planning to ask... 14:48
Nemokosch what question? 14:49
Anton Antonov <@297037173541175296> About a certain article I am working on. I will finish it (to a point) and then send you the link. 14:57
Nemokosch 🥳 14:58
guifa_ leont: sometimes what's not good can be just as enlightening as what's good 15:01
guifa_ I feel like there should be a less hacky way to get your own scope for a dynamic variable, but also keep the value it has if it's already been set 16:19
basically akin to lexical `temp`
Right now the only solution I have is my $*foo = CALLERS::<$*foo> // default-value; 16:20
lizmat m: my $*A = 42; sub a() { temp $*A; say $*A; $*A = 666; say $*A }; a 16:25
camelia 42
666
lizmat guifa_ ^^ why not use temp ?
guifa_ weird 16:26
I was getting an error saying no such in scope
oh wait
sub a() { temp $*A; say $*A; $*A = 666; say $*A }; my $*A = 42; a; say $*A
evalable6 42
666
42
guifa_ huh
did something change with dynamic handling? 16:27
m: sub a () { temp $*A; say $*A // 5 }; a
camelia Dynamic variable $*A not found
in sub a at <tmp> line 1
in block <unit> at <tmp> line 1
guifa_ ^^
lizmat m: say $*A 16:28
camelia Dynamic variable $*A not found
in block <unit> at <tmp> line 1
lizmat if there is none, you'll get a Failure
m: dd $*A
camelia Failure.new(exception => X::Dynamic::NotFound.new(name => "\$*A"), backtrace => Backtrace.new)
lizmat m: m: sub a () { temp $*A }; a 16:29
camelia Dynamic variable $*A not found
in sub a at <tmp> line 1
in block <unit> at <tmp> line 1
guifa_ I think it's because I often use the dynamics in an iffy/withy context
lizmat m: m: sub a () { temp $*A // 666 }; a
camelia Dynamic variable $*A not found
in sub a at <tmp> line 1
in block <unit> at <tmp> line 1
guifa_ so the failure works just as well as undefined/falsey
lizmat hmmm
m: m: sub a () { temp ($*A // 666) }; a
camelia Can only use 'temp' on a container
in sub a at <tmp> line 1
in block <unit> at <tmp> line 1
lizmat m: m: sub a () { with $*A { temp $*A } }; a 16:30
camelia ( no output )
guifa_ basically in my use case I've got my ECMA regex syntax 16:31
lizmat m: m: sub a () { temp $*A }; dd a
camelia Dynamic variable $*A not found
in sub a at <tmp> line 1
in block <unit> at <tmp> line 1
guifa_ but then need to handle some of the options
dynamics are just easier haha 16:32
lizmat I guess you need to make sure you have a $*A at the outermost scope to prevent the Failure of blowing up in temp
guifa_ the my $*A = CALLERS::<$*A>; actually works really well, it just feels...hacky 16:33
But I'm also just trying to finish making it work
You know me, when I get done, I'll refactor it about 2-3x including at least one total rewrite
And then when RakuAST comes along, I'll rinse and repeat hahaha 16:34
guifa_ definitely understands now why the regex options go in front, and not after, though. Allows for the regex to be created much more simply in a single pass 16:35
Nemokosch what is the prerequisite of successfully uploading a module to zef? 16:50
what happened to me is that I updated the code and sent fez upload, it said that I "did it", no email about failure or anything 16:51
but yeah, it wouldn't show up even after half a day, that's a little suspicious
I didn't commit and push to git though
could that have been the problem?
gfldex With fez you upload a tar-ball. If that is missing, you might have missed a vital step. Do you got a proper META6.json-file? 17:47
Nemokosch yes 17:48
[Coke] (alpha sort on docs table) bug, reported, already fixed in new UI coming "soon" 23:58