🦋 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.
00:01 grondilu joined
grondilu m: my Blob $ but role {} 00:02
camelia No such method 'mixin' for invocant of type
'Perl6::Metamodel::ParametricRoleGroupHOW'
in block <unit> at <tmp> line 1
grondilu can't I mix a role to a Blob?
m: my Str $ but role {}
camelia ( no output )
grondilu m: .talk() given my Str $ but role { method talk { say "hi"; } } 00:04
camelia hi
grondilu m: .talk() given my Blob $ but role { method talk { say "hi"; } }
camelia No such method 'mixin' for invocant of type
'Perl6::Metamodel::ParametricRoleGroupHOW'
in block <unit> at <tmp> line 1
grondilu m: my blob8 $x .= new: 5; say $x but role {} 00:06
camelia This REPR cannot change type
in block <unit> at <tmp> line 1
00:08 reportable6 left 00:09 reportable6 joined
Voldenet the `no such method mixin` is caused by trying to add mixin to a role 00:12
m: my Stringy $ but role {}
camelia No such method 'mixin' for invocant of type
'Perl6::Metamodel::ParametricRoleGroupHOW'
in block <unit> at <tmp> line 1
grondilu what about when I try with an actual instance, then? The 'REPR cannot change type' error above? 00:14
m: my blob8 $x .= new: 5; say $x.?WHAT 00:15
camelia ===SORRY!=== Error while compiling <tmp>
Cannot use .? on a non-identifier method call
at <tmp>:1
------> my blob8 $x .= new: 5; say $x.?WHAT⏏<EOL>
expecting any of:
method arguments
grondilu ah sorry
m: my blob8 $x .= new: 5; say $x.WHAT
camelia (Blob[uint8])
grondilu FYI I wanted to use a Blob as a crypto key so I wanted to add methods such as "sign", "verify" and so on. 00:17
Voldenet Blob is repr('VMArray') 00:18
m: class {}.new but role {}
camelia ( no output )
Voldenet m: class :: is repr('VMArray') {}.new but role {}
camelia This REPR cannot change type
in block <unit> at <tmp> line 1
grondilu ok. Is this specced or could it change in the future? 00:19
oh now I seem to recall that native types can not be mixed. I had seen that with native integers long ago. 00:21
00:21 Kaiepi left
grondilu I suppose the same is true with blobs. 00:21
Voldenet it appears that repr things can't be mixed in, but nothing in Blob says it can't
I'm speculating that it might be changed in the future for consistency 00:25
grondilu noted 00:26
Voldenet but it's my pure guess 00:28
based on how there's nothing regarding this in docs (in fact, only Buf and utf8 are repr('VMArray') according to docs) 00:37
grondilu yeah after all isn't Blob supposed to be to blob, buf and so on what Int is to native integers? The upper case marking the non-repr type or something? 00:46
m: my uint $
camelia ( no output )
grondilu m: my uint $ but role {}
camelia ( no output )
grondilu oh my bad, I thought that would fail 00:47
00:47 Kaiepi joined
grondilu so we can mix roles to natives after all 00:47
m: .talk() given my int $ = 57 but role { method talk { say "hi"; } } 00:48
camelia No such method 'talk' for invocant of type 'Int'. Did you mean any of
these: 'WALK', 'all', 'tail', 'take', 'tan', 'tanh', 'tclc'?
in block <unit> at <tmp> line 1
grondilu m: .talk() given my int $ but role { method talk { say "hi"; } }
camelia hi
grondilu m: .talk() given (my int $ = 57) but role { method talk { say "hi"; } }
camelia hi
grondilu m: say (my int $).WHAT 00:49
camelia (Int)
grondilu m: say (my int $ = pi).WHAT
camelia This type cannot unbox to a native integer: P6opaque, Num
in block <unit> at <tmp> line 1
grondilu m: say (my int $ = 3).WHAT 00:50
camelia (Int)
grondilu m: say (my int32 $ = 3).WHAT
camelia (Int)
grondilu meh 00:51
01:11 frost joined 01:16 guifa left
grondilu first draft at Ed25519 in raku : gist.github.com/grondilu/2b6f4f0ba...4ca0dfcc93 01:23
I will make a proper module availabe someday. 01:24
01:27 grondilu left 02:27 sourceable6 left, greppable6 left, committable6 left, unicodable6 left, benchable6 left, bisectable6 left, releasable6 left, statisfiable6 left, reportable6 left, quotable6 left, linkable6 left, coverable6 left, evalable6 left, notable6 left, bloatable6 left, shareable6 left, nativecallable6 left, releasable6 joined, benchable6 joined, nativecallable6 joined, quotable6 joined 02:28 evalable6 joined, greppable6 joined, sourceable6 joined, statisfiable6 joined, bisectable6 joined, coverable6 joined, notable6 joined, reportable6 joined 02:29 linkable6 joined, committable6 joined 02:30 shareable6 joined, bloatable6 joined, unicodable6 joined
SmokeMachine as I said yesterday, I'm adding something like subset to Red like the picture. But I really would like use real subset for that... any idea of how? Will I have to wait for RakuAST? usercontent.irccloud-cdn.com/file/.../image.png 02:43
03:30 evalable6 left, linkable6 left 03:32 linkable6 joined, evalable6 joined 04:03 zacts joined 04:05 guifa joined 04:29 zacts left
Xliff SmokeMachine: Why not "subset Admin where *.role eq 'admin'" ? 04:54
05:29 linkable6 left, evalable6 left 05:30 linkable6 joined 05:31 evalable6 joined 06:08 reportable6 left, reportable6 joined 07:08 benchable6 left, quotable6 left, releasable6 left, nativecallable6 left, shareable6 left, reportable6 left, evalable6 left, bloatable6 left, greppable6 left, linkable6 left, sourceable6 left, bisectable6 left, unicodable6 left, coverable6 left, committable6 left 07:09 greppable6 joined, linkable6 joined, shareable6 joined 07:10 bisectable6 joined, bloatable6 joined, reportable6 joined, benchable6 joined 07:11 sourceable6 joined, unicodable6 joined, nativecallable6 joined, committable6 joined, quotable6 joined, coverable6 joined, releasable6 joined 07:12 evalable6 joined 07:18 lichtkind joined 08:18 committable6 left, evalable6 left, coverable6 left, nativecallable6 left, benchable6 left, releasable6 left, quotable6 left, unicodable6 left, sourceable6 left, bisectable6 left, statisfiable6 left, bloatable6 left, linkable6 left, notable6 left, greppable6 left, reportable6 left, shareable6 left 08:19 benchable6 joined, greppable6 joined, shareable6 joined, quotable6 joined, notable6 joined 08:20 sourceable6 joined, committable6 joined, evalable6 joined, linkable6 joined, statisfiable6 joined, nativecallable6 joined, bisectable6 joined 08:21 coverable6 joined, unicodable6 joined, releasable6 joined, reportable6 joined 08:22 bloatable6 joined
SmokeMachine Xliff: that’s what I want, but that would only work for comparing that, and not for the .^all. I needed a custom SubsetHOW for that. Is there a way of using `subset Admin of User where *.role eq “admin”` to use a custom SubsetHOW? 08:24
It would be great if the refinee could say what SubsetHOW to use… 08:29
08:35 linkable6 left 08:37 andinus joined, andinus left 08:38 andinus joined, linkable6 joined 09:00 Sgeo left 10:00 linkable6 left, evalable6 left, Guest25 joined 10:01 Guest25 left, linkable6 joined, evalable6 joined 10:30 frost left 10:41 djerius left 10:42 djerius joined
nine grondilu: why not something like class CryptoKey { has blob8 !key handles <sign verify ...> ; }? 10:45
10:46 kj4tip left
nine grondiluÖ or rather class CryptoKey { has blob8 !key handles <whatever blob methods you want to support>; method sign(...) { ... }; method verify(...) { ... } }? 10:47
10:47 djerius left 11:22 crab46 joined
crab46 Hi 11:22
11:23 crab46 left
Nemokosch Suppers 11:57
SmokeMachine m: gist.github.com/FCO/89df04517cee86...25cc2e12ee 12:03
camelia ( no output )
SmokeMachine m: gist.github.com/FCO/89df04517cee86...25cc2e12ee 12:04
camelia ===SORRY!=== Error while compiling <tmp>
Could not find CustomSubset in:
inst#/home/camelia/.raku
inst#/home/camelia/rakudo-m-inst-1/share/perl6/site
inst#/home/camelia/rakudo-m-inst-1/share/perl6/vendor
inst#/home/came…
SmokeMachine this gist.github.com/FCO/89df04517cee86...25cc2e12ee is giving me `===SORRY!===\nRequired named parameter 'refinee' not passed` am I doing something wrong I testing using the default SubsetHOW, but my intent is to use a custom one. Both are giving me the same error 12:07
12:07 reportable6 left 12:09 melezhik joined, reportable6 joined, melezhik left
SmokeMachine my intent is to do something like this gist.github.com/FCO/415e4de3ac20fb...93af59a254 12:14
this already works: usercontent.irccloud-cdn.com/file/.../image.png 12:15
12:17 razetime joined 12:42 razetime left 12:43 razetime joined 12:45 euandreh left, euandreh joined 13:45 evalable6 left, linkable6 left 13:47 linkable6 joined 13:48 evalable6 joined 14:28 razetime left 14:44 melezhik joined 14:48 melezhik left 15:03 discord-raku-bot left 15:04 discord-raku-bot joined
Xliff gist.github.com/Xliff/25c4b333080e...1e5cb5bd2a 15:09
15:10 Some-body_ joined
p6steve Xliff: nice! btw I also have Lat & Long in Physics::Navigation ... would be happy to adjust so we play nice (I have been meaning to add support for Google Maps latlong too at some point 15:12
)
15:13 DarthGandalf left, Some-body_ is now known as DarthGandalf
Xliff p6steve: Well, near as I can tell it shouoldn't be too hard. 15:22
GWeather works in degrees.
But there are helper funcs in the lib to facilitate conversion to radians.
p6steve: Nice work on the Physics Modules, btw! 15:23
15:29 Guest5726 joined 15:30 Guest5726 is now known as bengur
bengur Hi, just so you know, I tried to install rakudo-star-2022.03 from source on a debian system and had to replace version numbers 2022.02 by 2022.03 in etc/fetch_core.txt or it would fail. 15:33
15:34 guifa left 15:38 bengur left 15:43 sena_kun left 15:44 sena_kun joined, Sgeo joined 15:47 ramiroencinas joined, ramiroencinas left 15:48 ramiroencinas joined
ramiroencinas Hi! In the grammars context I need to use a token to match a string with length lower or equal than 5 chars for example. If I use the quantifier ** like in `token tok { \w ** 5 };` and the input is 'aaaaaa' the match is true in the grammar. I need to specify the max chars to match in this token. Is possible? Thanks for the help! 15:57
SmokeMachine m: say $_ ~~ / \w ** 0..5 / for <<aaaaa aaaa aaa aa a "" aaaaaa>> 16:00
camelia 「aaaaa」
「aaaa」
「aaa」
「aa」
「a」
「」
「aaaaa」
SmokeMachine m: say $_ ~~ /^ \w ** 0..5 $/ for <<aaaaa aaaa aaa aa a "" aaaaaa>>
camelia 「aaaaa」
「aaaa」
「aaa」
「aa」
「a」
「」
Nil
ramiroencinas Thanks SmokeMachine, my token tok { ^ \w ** 1..5 $ }; works like a charm. 16:06
16:08 ramiroencinas left 16:14 DarthGandalf left 16:17 DarthGandalf joined 16:23 n1to joined, not-n1to joined 16:30 sena_kun left 16:31 sena_kun joined
p6steve Xliff: thanks - for me it was a fun way to ramp back up after 10 years afk! ... 16:31
lichtkind sorry for inconvenience i pushe wrong butten but deleted wrongly forked repo on raku modules
sorry for inconvenience i pushe wrong butten but deleted wrongly forked repo on raku modules 16:32
16:34 p6steve_ joined
lizmat lichtkind: which repo? 16:40
Xliff p6steve: Haha! True that. My p6-GLib suite is some 660k lines of Raku over 30-ish projects! 16:45
16:52 razetime joined 16:54 sena_kun left 16:55 sena_kun joined
lizmat Xliff: I did some work on optimizing grammar Actions yesterday: I'd appreciate if you could run a timing again and see if that made a difference. I hope to see 1-2% improvement 16:55
lichtkind lizmat: hai liz i becasme maintainer of the p5 module chart and i just wanted check who forked it and i misunderstood the display of the orgs im in with the ones who forked it so instead looking why raku modules org forked the p5 module i just created it, , but its deleted now 16:57
lizmat ah, ok...no worries then :-)
17:07 razetime left 17:21 n1to left, not-n1to left, n1to joined 18:07 reportable6 left 18:08 reportable6 joined
lucs Doing 「use IO::String; say IO::String.new.raku」, I get 「IO::String.new(nl-in => Any, nl-out => Any, nl-in => $["\n", "\r\n"], nl-out => "\n", …)」. 18:18
How is it that there are duplicate attributes? (nl-in and nl-out)?
lizmat feels like a problem in the implementation of IO::String.raku ? 18:20
lucs Could be I suppose, but how does one ever get that (duplicate attrs.)? 18:21
Oh, wait, you mean IO::String may have its own implementatin of raku()? 18:22
lizmat perhaps... yes 18:23
lucs Hmm...
Doesn't appear to, but it has 「class IO::String:ver… is IO::Handle { … }」, so maybe there... 18:25
thosAnyway, I just realized I was invoking one of its methods wrongly, so now my code is working, and figuring out those duplicates is not so interesting anymore :) 18:30
s/^thos//
"my code is working": famous last words :-( 18:46
gfldex my code is working¹ 18:47
¹) right now
:) 18:48
lucs Yeah, something like that ;)
19:02 sftp left 19:03 sftp joined, sena_kun left 19:04 sena_kun joined 19:11 Tirifto left 19:14 Tirifto joined 19:23 Tirifto left 19:24 Tirifto joined 19:32 neither joined
neither hi how can I match against any type a package provides: there are `Pack::Age::Cls`, `Pack::Age::Cls::Int32`, `Pack::Age::Cls::Int64`, `Pack::Age::Cls::Float32` etc. I try to check if `$var` is of any of these types? i.e., does it come from `Pack::Age::Cls` family 19:36
there is no inheritance relation going on by the way 19:37
moritz give them a common marker role, like Pack::Age::Cls::Type, and then check against that role 20:18
neither thanks but I don't control their code 20:23
20:32 evalable6 left, linkable6 left 20:33 linkable6 joined 20:34 [Coke]_ joined 20:35 evalable6 joined, [Coke] left 21:03 jjido joined 21:04 vrurg_ is now known as vrurg
moritz then any(type1, type2, type3, ...) 21:16
Geth problem-solving/docs-website: 8b951c04cb | (Daniel Sockwell)++ | solutions/documentation/new-documentation-frontends.md
Solution for Raku/doc/issues/1246

This PR proposes a solution to Raku/doc/issues/1246. (I now realize that issue was in the doc repo rather than the problem-solving one and thus _technically_ I should open an issue in this repo and discuss the matter here before opening a PR. Since that issue has been active for 5 years and has generated the a similar discussion as it would have as ... (12 more lines)
problem-solving: codesections++ created pull request #320:
Solution for Raku/doc/issues/1246
21:19
21:21 lichtkind left
Geth problem-solving/docs-website: 2147c097b0 | (Daniel Sockwell)++ | solutions/documentation/new-documentation-frontends.md
fix typo
21:27
21:28 [Coke]_ is now known as [Coke] 21:55 jjido left 21:59 jgaz joined 22:07 jjido joined 22:27 aru left 22:44 grondilu joined
grondilu Isn't there such a thing as a parametrized module? I've tried with a role but failed : 22:44
m: role Foo[$foo] { sub talk is export { say "$foo" } }; import Foo["hi"]; talk 22:45
camelia ===SORRY!=== Error while compiling <tmp>
Undeclared routine:
talk used at line 1
grondilu m: module Foo { sub talk is export { say "hi" } }; import Foo; talk 22:46
camelia hi
22:48 jjido left 22:51 n1to left 23:26 jgaz left 23:39 neither left 23:40 tejr left