🦋 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.
sienet_ja_LSD[m] how to fix You may need to configure one of the following backends, or install its underlying software - [psunzip] 12:51
alias psunzip='unzip' doesn't work
Voldenet sienet_ja_LSD[m]: psunzip is using powershell to unzip files 13:11
sienet_ja_LSD[m] aye but this is linux 13:12
Voldenet aye, it's only relevant if $*DISTRO.is-win
so, the question is why isn't `unzip` suggested here 13:13
sienet_ja_LSD[m] where is it required if I were to look up module sources?
Voldenet that defines unzip: github.com/ugexe/zef/blob/0e202f2/....json#L139 13:14
sienet_ja_LSD[m] I'm grepping and cannot find psunzip
Voldenet you should be able to also see psunzip here
sienet_ja_LSD[m] zef has been able to install all other modules just fine, but now it's suddenly wanting me to use powershell
Voldenet No, that message basically says 13:16
that nothing installed can extract given file
and reports that the only disabled backend is psunzip
sienet_ja_LSD[m] yes but which line in module sources is wanting to use it and not regular zip? 13:17
Voldenet the error is confusing
sienet_ja_LSD[m] I did edit the config.json but it has no effect, my zef is built with rakubrew 13:20
Voldenet github.com/ugexe/zef/blob/602c54/l...kumod#L113 13:25
so… apparently timeout is possible
Voldenet You should increase logging verbosity level of EXTRACT stage for better error 13:27
sienet_ja_LSD[m] nope, still same, fetching, extracting, Enabled extracting backends [git path tar p5tar unzip] don't understand <extracteddir> 13:31
Voldenet `extracteddir` sounds like a weird path to extract 13:32
sienet_ja_LSD[m] home/user/.zef/tmp/1655472145.15680.8563.048844792329/raku-Twitter 13:33
to be precise
Voldenet eh, I've tried using that package and it worked, guess that rules out broken package 13:38
well, it installed, not exactly worked 13:39
`Could not find Twitter::API in:`
sienet_ja_LSD[m] hmm ok
Voldenet > zef install –force –debug Twitter 13:42
> [Twitter] Extracting with plugin: Zef::Service::Shell::tar+{<anon|1>}
sienet_ja_LSD[m] aye the package itself works 13:44
Voldenet I'm betting that the file wasn't fetched right and tar fails for some reason 13:48
Guest3 Hello, world! I'm trying to use mqueue libc function through NativeCall. I have the following code: ix.io/40m7 14:04
It calls mq_getattr to put a message queue's attributes into the specified struct: `int mq_getattr(mqd_t mqdes, struct mq_attr *attr);`
I open a message queue, get its file descriptior, pass it to mq_getattr along with a `my Attributes $attributes` (Attributes is a `class Attributes is repr('CStruct')` with the proper fields)
But $attributes doesn't get changed. What am I doing wrong?
Voldenet you don't allocate attributes 14:11
Voldenet mq_open returns -1 because you provide no attributes as well 14:12
(nevermind, attr can be null) 14:14
Guest3: try this ix.io/40md 14:17
Guest3 Voldenet: Thanks, that works! Why aren't there any warnings/errors reporteD? 14:21
Voldenet Guest3: because that's how C works – you allocate the object and pass the pointer (also you don't need "Attributes is rw") 14:38
Voldenet I think mq_getattr not returning -1 on attr being null is weird 14:43
Guest3 Voldenet: the man page states that they use the defaults when attr is NULL 14:45
Voldenet for mq_open, yes, but mq_getattr… ¯\_(ツ)_/¯ 14:47
you may be interested in higher level wrapper, btw raku.land/cpan:JSTOWE/MQ::Posix
Geth Documentable/search-categories-streamlined: 1fe7cd1cbd | Altai-man++ | 3 files
Streamline search categories processing

  - For Index, just follow the simple "Take first meta as category"
   or report an error heuristic
  - For Primary, allow to overload header processor with something custom
   ($*HEADING-TO-ANCHOR-TRANSFORMER-ACTIONS)
  - Streamline Search generation: prefer primary pages over secondary ones,
   detect duplicate search anchors, be better at calculating categories
16:37
Documentable/search-categories-streamlined: b3c851fb08 | Altai-man++ | 5 files
Update tests to match new implementation
Documentable/search-categories-streamlined: 628020621e | Altai-man++ | 6 files
Refine treating of ref categories

  - Revert a number of surplus changes
  - Tweak logic of URLs for references (@JJ++)
  - Add more coverage
  - Make the code a bit more robust against broken syntax references
  - Factor out, cleanup some code
This is a tradeoff between changing numerous things and changing the bare minimum to make things work according to the new spec.
[Coke] sena_kun++ 16:53
sena_kun took a whole day, but yay, progress. I guess next goes live updating and smaller tweaks 16:54
SmokeMachine .tell kawaii it seems mint (github.com/shuppet/raku-mint) is breaking with the last Red's version (github.com/FCO/Red/runs/6898580191...tep:6:40). I just want to know if I have break it. Sorry for interrupting. 18:44
tellable6 SmokeMachine, I'll pass your message to kawaii
Guest3 I'm just tinkering with Raku, trying to see if I can change the compilation errors' message. I thought I could augment X::Comp's .gist method, but it throws X::Syntax::Augment::Illegal: Cannot augment X::Comp because it is closed. Why? What does it mean to be closed? 20:40
[Coke] closed is used only in that error message, but if you dig through the rakudo source, you can see that the exception that has that message is throw if the metadata about that object disallows augmenting... X::Comp is a role, not a class, and you can't augment it. 22:00
m: dd so X::Comp.HOW.archetypes.augmentable
camelia Bool::False
[Coke] m: dd so Int.HOW.archetypes.augmentable
camelia Bool::True
[Coke] while it doesn't mention closed, docs.raku.org/syntax/augment does mention "existing classes and grammars" 22:01
Guest3 Why can't we augment roles? 22:02
[Coke] m: dd X::Comp.HOW; dd X::Comp.HOW.archtetypes;
camelia Perl6::Metamodel::ParametricRoleGroupHOW.new
No such method 'archtetypes' for invocant of type
'Perl6::Metamodel::ParametricRoleGroupHOW'
in block <unit> at <tmp> line 1
[Coke] The unhelpful answer is that it was designed that way. Not sure why.
Guest3 I understand that the code doesn't allow so; but from a practical point of view, why was it done thatway?
[Coke] m: dd X::Comp.HOW; dd X::Comp.HOW.archetypes;
camelia Perl6::Metamodel::ParametricRoleGroupHOW.new
(Perl6::Metamodel::Archetypes without .raku or .perl method)
[Coke] m: dd X::Comp.HOW; dd X::Comp.HOW.archetypes.raku; 22:03
camelia Perl6::Metamodel::ParametricRoleGroupHOW.new
No such method 'raku' for invocant of type
'Perl6::Metamodel::Archetypes'
in block <unit> at <tmp> line 1
[Coke] (that's getting into guts, there, not surprising)
Guest3 m: say X::Comp.HOW.archetypes.^methods
camelia (nominal nominalizable inheritable inheritalizable composable composalizable generic parametric coercive definite augmentable CREATE bless BUILDALL new defined ACCEPTS NOT-ACCEPTS isa)
Guest3 Roles not being augmentable means that if I want to change the compilation errors' message I gotta augment dozens of classes... 22:05
Guest3 Actually, it looks like I can't augment methods that aren't multi methods initially. That means that some errors like X::Syntax::Confused that only have a single `method message` can't be replaced... 22:54
[Coke] m: dd <Class Coercion ConcreteRole CurriedRole Definite Enum Generic Grammar Module Native NativeRef Package ParametricRoleGroup ParametricRole Subset>.map({::Metamodel::($_ ~ "HOW")}).grep({$_.new.archetypes.augmentable}) 23:21
camelia (Perl6::Metamodel::ClassHOW, Perl6::Metamodel::EnumHOW, Perl6::Metamodel::GrammarHOW).Seq
[Coke] (sorry was actually working on that for a bit. :) 23:22