🦋 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.
vrurg Xliff, japhb: as promised: vrurg.github.io/2021/10/05/Merging...bols-Issue 03:07
tellable6 2021-10-05T09:27:03Z #moarvm <jnthnwrthngtn> vrurg It's about separate compilation; the compilation of a module should start with an empty GLOBAL and accumulate the things that are `use`d by it.
moon-child is it possible to add candidates to multis in other modules? 03:18
moon-child m1.rakumod: unit module m1; our proto f(|) {*}; multi f(Int) { say 'int' } 03:18
moon-child m.raku: use m1; multi m1::f(Num) { say 'num' }; m1::f 5e0 03:18
currently errors
japhb Very interesting, vrurg, thank you! I think I may have worked around this in MUGS kindof by accident, but it does explain some weirdness that I see when I'm moving packages around. 05:54
Xliff m: $*PERL.compiler.version.say 07:19
camelia v2021.09.238.gec.65.ffc.8.d
nine moon-child: with what error? 07:33
moon-child: usually you'd export those multis (and the proto) 07:34
moon-child nine: I should clarify, 'm1::f 5e0' errors, claiming there is no matching candidate
'multi m1::f(Num)...' does not error
CIAvash moon-child: I wanted to do something similar in the same unit, but it didn't work, the only option I found is `.wrap`: `&m1::f.wrap: sub (|c) { given c { when :(Num) { say 'num' }; default { callsame } } }` 08:26
Geth ¦ examples: Altai-man self-unassigned Change extensions to .p6 github.com/Raku/examples/issues/57 11:45
ggoebel Any pointers on how one specifies a dependency on a Perl5 module in the META6.json? 13:38
nine ggoebel: :from<Perl5> 13:40
or in the long hash form: 'from': 'Perl5'
ggoebel so... "depends": ["Spreadsheet::ParseXLSX:from<Perl5>"] ...? 13:42
nine yes
it's poasible that only one form is implemented. can't check now as I'm only on a phone 13:45
ggoebel that is strangely consistent :-) didn't expect that to work. will give it a try 13:46
hmm... zef install Inline::Perl5
===> Searching for: Inline::Perl5
===> Searching for missing dependencies: perl:from<native>
No such method 'as' for invocant of type 'Any'
nine I really need to remove that dependency as distros don't pit libperl.so in the library path 13:47
it's safe to ignore the error via zef command line switch
ggoebel thx
zef --force install Inline::Perl5 gives the same output. i.e. never gets to ===> Installing 13:50
getting further with zef --/depends --/test --force install Inline::Perl5 13:51
installed :-) 13:52
immediate hi, why is the new operator not taking precedence: 14:34
m: sub infix:<^> is equiv(&infix:<**>) { $^a ** $^b }; say 5 * 4 ^ 3 14:35
camelia 8000
immediate expecting 320
moritz_ m: say 4 ^ 3 14:36
camelia one(4, 3)
moritz_ immediate: the problem is that there already *is* an infix:<^>, and raku cannot retroactively change the precedence of an operator 14:37
one could argue that this should raise an error though
(I believe I have argued that in the past)
immediate oh, sorry, thanks...
lizmat m: sub infix:<^>(\a,\b) is equiv(&infix:<**>) { "foo" } # immediate 14:40
camelia ( no output )
lizmat m: sub infix:<^>(\a,\b) is equiv(&infix:<**>) { "foo" }; say 4 ^ 5 14:41
camelia foo
Petr Nice day )) Anybody can help me? Can i convert html to docx &
lizmat immediate: the problem is that your candidate did not have 2 params
immediate lizmat: didn't it? With $^a and $^b? 14:42
and it gave a result 8000 back as (5 * 4) ^ 3
Petr I cant find any solution for this... 14:43
[Coke] Petr: I don't think raku has any interop with the latest office standard. You might find a solution in perl (that you could then use from Raku) 14:44
If it's a one off.. you should be able to cut and paste it in.)
Petr What about ODT? 14:45
MasterDuke i think tbrowder was working on some modules for office docs
and i think jnthn made a module to work with xls 14:46
lizmat immediate: ah, yes... :-) 14:47
m: sub infix:<^> is equiv(&infix:<**>) { $^a, $^b; "foo" }; say 4^5
camelia foo
lizmat so, I'm not sure why that didn't work for you, immediate 14:48
[Coke] stackoverflow.com/questions/422609...62#4227062 - a python example of using the word itself to do the conversion.
Petr thanks
lizmat aaah... it's about precedence
lizmat goes back to working on the weekly :-)
Petr i hate python ))) 14:49
what about jvm support& 14:50
lizmat there is a JVM backend, but it misses some features 14:51
most notably NFG
ggoebel is this still a good place to ask questions about using comma? 15:22
immediate thanks liz\mat 15:25
sena_kun ggoebel, two its devs are currently here, so yes, pretty much. 15:26
Tirifto Hello! Is there a way to re-dispatch a method call to a role that the given class does? The method resolution order only includes parent classes, but not roles, so stuff like ‘callsame’ doesn’t work. Is anything like it available for roles, too? 16:20
(I guess I could inherit from the role instead, but that feels a bit hacky.) 16:21
MasterDuke maybe explicitly calling `RoleName::method-name()`
Tirifto Ohh, ‘::’, I didn’t realise that was a thing that would work here! 16:24
Or maybe it wouldn’t. :P | Could not find symbol '&remove' in 'Container' 16:28
melezhik . 16:29
Tirifto Ahh, yes, I had to do ‘self.RoleName::method-name()’. Thank you, melezhik and MasterDuke! 16:34
melezhik I've added "recently upvoted" page to mybfio - feel free to add any interesting Raku projects and upvote them ( one can also write a review if the wish ) - mybf.io/?filter=top 17:12
lizmat And yet another Rakudo Weekly News hits the Net: rakudoweekly.blog/2021/10/06/2021-40-its-here/ 17:37
Juerd Yay! 22:48
Petr hi all) i cant find info about selenium web driver 23:52
Raku is used in production today? Sorry for stupid question )) 23:57