🦋 Welcome to the former MAIN() IRC channel of the Raku Programming Language (raku.org). This channel has moved to Libera (irc.libera.chat #raku)
Set by lizmat on 23 May 2021.
[Coke] Wonder how many times I will be bitten by "random commands via run() don't output utf8" 13:22
(Easy enough for me to write a wrapper here, which I think I will do; have an arg that indicates output is expected to be utf8-clean, otherwise use utf8-c8 under the covers.) 13:24
[Coke] I don't think Raku is doing anything wrong here, just a trap of my own devising I keep falling into. :) 13:59
Altreus guifa: I'd expect "class" to imply instantiable and thus to override the trait of the role 14:15
if it were another role, then yeah I'd expect it also to be uninstantiable
jdv [Coke]: what is the symptom? 14:33
[Coke] raku explodes because I tried to put non-utf8 output in a string. 14:38
so typically: I'll do work on a small sample size that is utf8-ok. then I run it on everything, hit the one piece of data that isn't, and the script explodes. 14:39
jdv at least its not silent 14:44
wonder if it'd be valuable to have some way to detect that, warn, and auto re-decode or something 14:45
[Coke] ... I also finally got bit by assuming the CSV data I was generating didn't need to use Text::CSV :) (someone had a branch name with a comma in it!) 15:29
Altreus naming-it-like-this,-to-see-if-it-breaks-anyone 16:29
feature/
moritz recommends single quotes in branch names, just to annoy everyone 16:41
Altreus yes I like this 16:43
feature/i\'m-trying,-ok\?
[Coke] is there a way to ask git what the default branch is, or is that something you need the hosting service to verify? 16:57
I have a dump of master vs. main for a bunch of git repos, but am wondering if a git command line can find the answer.
tonyo [Coke]: git remote show origin | sed -n '/HEAD branch/s/.*: //p' 16:59
[Coke] tonyo++ 17:01
Altreus assuming origin is on default-branch
tonyo yes 17:03
if you only have one remote set up then you can use substitution too: git remote show $(git remote show) | sed -n '/HEAD branch/s/.*: //p'
i imagine it's fairly uncommon to have multiple remotes
Altreus ~ 17:07
I often have at least one other because I don't trust github to do PRs properly
origin is, however, usually the right one to use 17:08
[Coke] in this case, it's all a single remote, I've a list of repos, clone them just so I can work with a local copy. 17:12
tonyo Altreus: do you ever have a different default branch on them? 17:17
Altreus fair point, no 17:18
tonyo i suppose piping that interpolated git remote show |head -n 1 would be safer
[Coke] yay, now UPS is not only here, but in use. 17:53
melezhik .tell patrickb: I am looking at github.com/rakudo/rakudo/blob/mast...lines.yml, are you satisfied with this approach? I mean somehow we could start using sparrow instead of having scattered scripts gets called from the pipeline. if the goes grows it could helps to have more maintainable solution 19:31
tellable6 melezhik, I'll pass your message to patrickb
melezhik .tell patrickb: I am just no sure what kind of challenges you might have right now, but I see this as following - gist.github.com/melezhik/f3afb994c...f43ad4465e , so to move all the complexity from azure devops pipelines to docker jobs with sparrow 19:40
tellable6 melezhik, I'll pass your message to patrickb
melezhik .tell patrickb: just a thoughts ... )) 19:40
tellable6 melezhik, I'll pass your message to patrickb
melezhik .tell patrickb: just from my experience of coding ci/cd with azure devops pipelines and all yaml based tool, in the long run I keep them as simple as possible moving all the logic into low level libraries, avoiding and emperical constructions, like conditions in the high level. See for example how Sparrow could take care of distro dependent 19:46
scenarios - github.com/melezhik/Sparrow6/blob/...le-os-list github.com/melezhik/sparrow-plugin...e/hook.pl6
tellable6 melezhik, I'll pass your message to patrickb
melezhik .tell patrickb: avoiding AND emperical constructions -> avoiding ANY emperical constructions 19:47
tellable6 melezhik, I'll pass your message to patrickb
Xliff \o 22:47
Does Raku still NOT support passing CStructs to C-routines by value?
IIRC, currently NativeCall only passes structs by reference. I was wondering if that had changed. 22:48
moon-child Xliff: yes, it is not supported 22:59
that's a dyncall limitation 23:00
abis make passing structs by value a complete pain