🦋 Welcome to Raku! raku.org/ | evalbot usage: 'p6: say 3;' or /msg camelia p6: ... | irclog: colabti.org/irclogger/irclogger_log/raku
Set by ChanServ on 14 October 2019.
00:28 ggoebel_ left 00:32 BenGoldberg joined 01:06 BenGoldberg left 01:11 molaf left 01:20 eseyman left 01:24 molaf joined 01:31 eseyman joined 01:48 seanrobert joined, seanrobert left 01:49 seanrobert joined 02:04 Manifest0 left 02:06 Manifest0 joined 02:29 HarmtH_ joined 02:30 HarmtH left 02:44 seanrobert left 02:54 seanrobert joined 03:12 melezhik joined
melezhik .tell lizmat I like this "Alexey's corner" idea in the last RW ))) 03:12
tellable6 melezhik, I'll pass your message to lizmat 03:13
03:16 cpan-raku left, melezhik left, cpan-raku joined, cpan-raku left, cpan-raku joined 03:58 BenGoldberg joined 04:00 aindilis` joined 04:01 aindilis left 04:04 aindilis` left 04:17 mowcat left 04:29 guifa joined 04:32 BenGoldberg left, frost-lab joined, xelxebar left, xelxebar joined 04:37 frost-lab left
guifa So weird. I can sub EXPORT { ‘&foo’ => my token foo { … } } and the token is usable if I use Foo; inside of a grammar 04:40
But if I say “my method” instead of “my token”, it fails.
Nonetheless, with a regular class, “my method” works without problem
04:48 frost-lab joined 05:07 jmerelo joined
jmerelo m say &do.^name 05:12
05:12 RobRaku joined
jmerelo m: say &do.^name 05:12
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared routine:
do used at line 1. Did you mean 'so', 'dd'?
jmerelo m: say (&do).^name
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared routine:
do used at line 1. Did you mean 'dd', 'so'?
05:12 Doc_Holliwood joined
jmerelo m: say &do 05:12
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared routine:
do used at line 1. Did you mean 'dd', 'so'?
jmerelo m: say &if
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared routine:
if used at line 1
jmerelo say &say.^name 05:13
evalable6 Sub
jmerelo say &do.^name
m: say &do.^name
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared routine:
do used at line 1. Did you mean 'dd', 'so'?
jmerelo m: say &if.^name
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared routine:
if used at line 1
jmerelo m: say (do if True then 3).^name 05:19
camelia 5===SORRY!5=== Error while compiling <tmp>
Missing block
at <tmp>:1
------> 3say (do if True7⏏5 then 3).^name
expecting any of:
block or pointy block
infix
infix stopper
jmerelo m: say with do if True then 3 say .^name 05:20
camelia 5===SORRY!5=== Error while compiling <tmp>
Unsupported use of bare "say". In Raku please use: .say if you meant
to call it as a method on $_, or use an explicit invocant or argument,
or use &say to refer to the function as a noun.
at <tmp…
jmerelo m: my $statement = do if True then 3 ; say $statement.^name
camelia 5===SORRY!5=== Error while compiling <tmp>
Missing block
at <tmp>:1
------> 3my $statement = do if True7⏏5 then 3 ; say $statement.^name
expecting any of:
block or pointy block
infix
infix stopper
jmerelo m: my $statement = do if True 3 ; say $statement.^name 05:21
camelia 5===SORRY!5=== Error while compiling <tmp>
Missing block
at <tmp>:1
------> 3my $statement = do if True7⏏5 3 ; say $statement.^name
expecting any of:
block or pointy block
infix
infix stopper
jmerelo m: my $statement = do if True {3} ; say $statement.^name
camelia Int
jmerelo m: my &statement = do if True {3} ; say &statement.^name
camelia Type check failed in assignment to &statement; expected Callable but got Int (3)
in block <unit> at <tmp> line 1
jmerelo m: my &ifs = { if $_ then {34} else {43}}; ifs(True).say 05:26
camelia 5===SORRY!5=== Error while compiling <tmp>
Missing block
at <tmp>:1
------> 3my &ifs = { if $_7⏏5 then {34} else {43}}; ifs(True).say
expecting any of:
block or pointy block
infix
infix stopper
jmerelo m: my &ifs = { if $_ {34} else {43}}; ifs(True).say 05:27
camelia 34
05:29 skids left
jmerelo m: my &ifs = { if $_ {34} else {43}}; my $result = ifs(True).say; say $result 05:30
camelia 34
True
05:35 wamba joined
jmerelo m: my @fors = ($_ *2 ) for ^4; say @fors 05:42
camelia [6] 05:43
jmerelo m: my @fors = (($_ *2 ) for ^4); say @fors
camelia [0 2 4 6]
05:53 seanrobert left 05:56 aluaces left 05:59 bocaneri joined 06:07 bocaneri left 06:08 bocaneri joined
Geth doc: d9fef79582 | (JJ Merelo)++ | doc/Language/control.pod6
Minor fixes
06:08
linkable6 Link: docs.raku.org/language/control 06:09
06:18 Grrrr left, Grrrr joined 06:20 aluaces joined 06:28 kini left 06:36 kini joined 06:45 guifa_ joined 06:46 guifa left, guifa_ is now known as guifa 06:53 patrickb joined 07:10 Sgeo left 07:16 patrickb left 07:23 BenGoldberg joined 07:32 Doc_Holliwood left 07:34 dakkar joined 07:57 BenGoldberg left 07:59 leah2 left 08:00 guifa_ joined, guifa left, guifa_ is now known as guifa 08:05 perigrin left 08:06 perigrin joined 08:19 domidumont joined 08:22 pecastro joined 08:43 bbkr joined 08:45 bbkr left 08:55 RobRaku left 09:12 sena_kun joined, leah2 joined 09:24 ThaEwat left, CIAvash left, matiaslina left, AlexDaniel` left, unclechu left 09:25 kiti_nomad[m] left, JJAtria[m] left 09:30 matiaslina joined
lizmat clickbaits rakudoweekly.blog/2020/10/19/2020-42-recipes/ 09:33
tellable6 2020-10-20T03:13:00Z #raku <melezhik> lizmat I like this "Alexey's corner" idea in the last RW )))
09:37 ThaEwat joined, unclechu joined, kiti_nomad[m] joined, AlexDaniel` joined, CIAvash joined, JJAtria[m] joined
lizmat wonders how many people got the en.wikipedia.org/wiki/Alexis_Korner reference :-) 09:39
09:52 sno left 10:05 RobRaku joined 10:29 sno joined
cpan-raku New module released to CPAN! Math::Libgsl::LinearAlgebra (0.0.2) by 03FRITH 10:36
10:36 rindolf joined 10:48 BenGoldberg joined 11:03 [Sno] joined 11:04 sno left
jmerelo Just got my author copies of Raku Recipes. Here's the preface with ackowledgements www.flickr.com/photos/atalaya/5050...datetaken/ moritz++ (who not only introduced me to Apress, but was also reviewer), but also... xliff++, Altai-man++, and many others. 11:15
11:22 BenGoldberg left, vike left 11:25 RobRaku left
lizmat jmerelo++ 11:28
11:29 vike joined 11:56 perryprog left 11:57 perryprog joined 11:58 jmerelo left 12:05 frost-lab left 12:18 natrys joined 12:19 kylese joined 12:27 seanrobert joined 12:43 epony left 12:56 epony joined, epony left 12:57 epony joined 13:07 seanrobert left
[Coke] ugh. edit a wiki via local git checkout. push. out of date. rebase. push. out of date. rebase. push. out of date. 13:09
(it worked the next time. :)
moritz does it store the whole wiki in a git repo? 13:10
if so, every single page edit could lead to such a conflict. Not very scalable :D
[Coke] moritz: it's azure devops wiki. if you're editing via the front end, I imagine it's a little smarter. 13:11
moritz at $work we have a DNS server with some 7k zone files, each versioned with RCS 13:12
we tried to a switch to git, but there are simply too many changes to make that scale, given that git always records changes as changes to the whole repo, not per file 13:13
13:14 squashable6 left, [Sno] left 13:15 squashable6 joined
[Coke] nifty. 13:17
13:17 jmerelo joined 13:20 moony left 13:26 epony left 13:30 domidumont left 13:50 [Sno] joined 13:51 Sgeo joined 13:52 epony joined 14:01 domidumont joined 14:03 Doc_Holliwood joined, aluaces left 14:07 domidumont left
xinming m: sub t ($x) { $x.say }; class A { has &.code; method ok () { &!code("ok") }; method nok() { $.code("nok") } }; my $t = A.new(:code(&t)); $t.ok; $t.nok 14:08
camelia ok
Too many positionals passed; expected 1 argument but got 2
in method code at <tmp> line 1
in method nok at <tmp> line 1
in block <unit> at <tmp> line 1
tellable6 2020-10-18T13:08:16Z #raku <tbrowder> xinming have you tried %?RESOURCES.keys to see whats there? do you have anything in your resources dir? is resources mentioned in Meta file (not sure if that’s required)?
2020-10-18T14:02:44Z #raku <tbrowder> xinming see module RakuAdvent::Wordpress for an example of using %?RESOURCES
xinming tbrowder: Thanks, will check it out
In this example, $!code("ok") work as expected, But why not the $.code("nok")? 14:09
m: sub t ($x) { $x.say }; class A { has &.code; method ok () { &!code("ok") }; method nok() { &.code("nok") } }; my $t = A.new(:code(&t)); $t.ok; $t.nok
camelia ok
Too many positionals passed; expected 1 argument but got 2
in method code at <tmp> line 1
in method nok at <tmp> line 1
in block <unit> at <tmp> line 1
xinming Shouldn't the &.code("nok") be the same as $!code("ok"), and not passing the self? 14:10
14:11 domidumont joined
xinming I think the reason &.code("nok") doesn't work is because, it's doing something like, $(&!code)(self, "nok") not expected $($!code)("nok") ?? 14:11
lizmat m: class A { has &.a }; dd A.new(a => * + *).a()(42,666) # you need extra parens 14:13
camelia 708
lizmat m: class A { has &.a }; dd A.new(a => * + *).a(42,666) 14:14
camelia Too many positionals passed; expected 1 argument but got 3
in method a at <tmp> line 1
in block <unit> at <tmp> line 1
lizmat xinming: is that where you're getting at ?
14:14 BenGoldberg joined, aluaces joined, cpage_ joined 14:17 cpage left, cpage_ is now known as cpage
xinming lizmat: Thanks, Seems, still needs more understanding of the $.accessor 14:17
I thought $.accessor is something like, $(self.accessor) 14:18
$(self.accessor)("arg")
14:28 domidumont left 14:29 domidumont joined 14:40 domidumont left 14:47 BenGoldberg left
rir How to avoid this downward invasion: 'role Export { method get-exportee-type { ... } }'? 14:47
moritz rir: I don't quite understand the question, can you please elaborate? 14:51
Altreus a role for each type?
14:51 skids joined
lizmat xinming: I think you understand the accessor correctly 14:52
the accessor for &.a *does* just return the code object 14:53
rir A supporting get-exportee-... method seems needed to support the role's deferred method. I'd like a mixin that doesn't require the under class to be instrumented.
lizmat but if you say A.a, you are calling the *accessor* that does not take any arguments 14:54
guifa jmerelo: I can haz signed copy? :-)
Altreus rir: are you saying that you don't want consuming classes to be required to implement get-exportee-type?
as in forced to
lizmat that is why you need to do A.new(a => *+*).a() first to get the code object, and then pass (42.,666) to that code object
rir Altreus: Yes.
guifa slips jmerelo an extra duro y un culĂ­n de sidra asturiano fresco 14:55
Altreus rir: well that's what ... means
rir: don't put ... and then you simply have an empty default implementation
these are the only options :) 14:56
rir Altreus: Yes, but I need the class of the consuming object in the role consumed.
Altreus I believe that can be expressed as ::?CLASS
Where this does and doesn't work, I am uncertain
rir That is a var I haven't tried. I'll check it out and report shortly. 14:57
tobs m: role Export { method get-exportee-type { ::?CLASS } }; class A does Export {}; say A.new.get-exportee-type
camelia (A)
Altreus I guess I *can* retain information!
tobs (I thought for sure this would say "Export" because I assumed ::?CLASS to be more lexical, but it's ::?CLASS after all and not ::?ROLE) 14:58
but good for you :-)
Altreus and you called it on A, not Export
m: role Export { method get-exportee-type { ::?ROLE } }; class A does Export {}; say A.new.get-exportee-type
camelia (Export)
Altreus hmm 14:59
m: class A { method a { ::?ROLE } }; say A.new.a
camelia 5===SORRY!5=== Error while compiling <tmp>
No such symbol '::?ROLE'
at <tmp>:1
------> 3class A { method a { ::?ROLE7⏏5 } }; say A.new.a
Altreus aha
tobs since get-exportee-type is a method, I think you could also refer to self.WHAT inside of its implementation in the role and get the type of invocant dynamically 15:00
15:09 domidumont joined
guifa Is there anyway to use a method to create a Match object that doesn’t destroy the caller’s $¢? Apparently I’m doing something wrong and I’ve tracked it down to that 15:16
rir Thanks tobs, Altreus. 15:17
15:18 RobRaku joined
jmerelo guifa hey. I guess you can. But you want me to mail it direct? Or you want me to store it for you for the next time we meet? 15:18
rir In a more purely curious vein: Why is ' in identifiers? And does anyone use it in them?
jmerelo I'm mailing one just today to tbrowder, so if it's the first, tell me now! 15:19
guifa jmerelo: eh, I’d prefer the latter but given the virus I’m not holding out any hope of getting to the peninsula in the near future :-(
jmerelo rir: it's just cool. I seem to remember there was an explanation for it by Larry Wall somewhere. It's consistent with... something
rypervenche rir: I imagine it would be useful to show possession, so probably not super useful until you need it. Then it makes it a bit clearer what it means. 15:20
guifa so I’ll need to go with the first. PM or e-mail me where I can pay you and I’ll do that right away
jmerelo guifa: yep, that's the thing. Nor in-person Perl/Raku events. So best to nail it now. Email me your mail address
guifa I know I’ve used a ‘ in an identifier before and was happy for it, but I can’t remember what it was exactly 15:21
15:21 moony joined
guifa Beyond English’s possession, both - and ‘ are used a lot in other languages, so it makes sense to include them if we’re also doing all the diacritics as valid identifiers too 15:23
my $to-bind; my $p’arreyar; 15:24
rir I don't object re: '. I just haven't seen it in code yet. 15:30
jmerelo m: my $se-h'acabat = True
camelia ( no output )
rir Oops, I forgot that I had a motive beyond curiosity. Is there an Identifer parser module? 15:32
guifa You’d need to coopt the Raku grammar — modules can change the definition at runtime :-) 15:33
MasterDuke the Test-Helper module in roast has things like `doesn't-warn`
maybe Perl6::Parser has something 15:34
guifa but the definition of an identifier is the following:
token identifier { <.ident> [ <.apostrophe> <.ident> ]* }
15:34 domidumont left
guifa ident is available to garden variety regexen, and apostrophe is just <[‘\-]> 15:35
rir I will bow to greater wisdom, guifa, but that isn't a full and extended (versioned?) id definition is it? 15:36
Geth ecosystem: hythm7++ created pull request #556:
Re-add Pakku to the Ecosystem
15:38
guifa rir: that’s defined in the grammar as a name, which is defined as [<identifier> <morename>* | <morename>+]
rir guifa: Thanks, I'll look at that. With a good spot to start, maybe I'll find it more enlightning. 15:43
Geth ecosystem: 7024dcdcca | (Haytham Elganiny)++ | META.list
Re-add Pakku to the Ecosystem
15:45
ecosystem: 2192ce090b | (Aleks-Daniel Jakimenko-Aleksejev)++ (committed using GitHub Web editor) | META.list
Merge pull request #556 from hythm7/master

Re-add Pakku to the Ecosystem
tobs rir: I remember seeing it here github.com/Raku/whateverable/blob/...e.pm6#L114
Altreus can't help but notice guifa's apostrophe is a real apostrophe as well 15:46
tobs what I like most about it being allowed in identifiers, though, is that this feature does not interfere with using ' as a prefix or postfix operator :-)
guifa rir: <ident>, fwiw, is defined as /<:L+[_]> <:L+:Nd+[‘+]>*/ 15:47
err
I mean /<:L+[_]> <:L+:Nd+[_]>*/ 15:48
basically, alphabetic followed by alphanumeric and always allowing for an underscore
[Coke] gist.github.com/coke/59b4024c1a033...775a4d68e7 15:52
guifa [Coke] XD 15:53
[Coke] (er, important bun-based update to App::Uni) 15:54
jmerelo m: say Foo::Bar:ver<0> == Foo::Bar:ver<foo> 16:00
camelia 5===SORRY!5=== Error while compiling <tmp>
Preceding context expects a term, but found infix == instead.
at <tmp>:1
------> 3say Foo::Bar:ver<0> ==7⏏5 Foo::Bar:ver<foo>
jmerelo m: say Foo::Bar:ver<0> ~~ Foo::Bar:ver<foo>
camelia 5===SORRY!5=== Error while compiling <tmp>
Expected a term, but found either infix ~~ or redundant prefix ~
(to suppress this message, please use a space like ~ ~)
at <tmp>:1
------> 3say Foo::Bar:ver<0> ~~7⏏5 Foo::Bar:ver<foo>
rir guifa: Got it. That is in the docs as a 'Ordinary Identifier'. I got a wee bit out of the grammar. I go now to try to grow more. 16:01
guifa Might take a look a bit at the Grammar.pm6 in the Rakudo source. Everything is there except for the definition of <ident>, which is basically what I showed above 16:02
jmerelo guifa: maybe in nqp? 16:07
jmerelo plugs new Raku book! Raku recipes is out! www.apress.com/gp/book/9781484262573
guifa jmerelo: likely. I need to go back at some poitn and review all of it for binex/objex 16:12
16:19 sena_kun left 16:20 sena_kun joined
tbrowder m: say 'Foo::Bar:ver<0>' cmp 'Foo::Bar:ver<foo>' 16:20
camelia Less
tbrowder m: say 'Foo::Bar:ver<0>' 16:21
camelia Foo::Bar:ver<0>
tbrowder m: say Foo::Bar:ver<0>
camelia Could not find symbol '&Bar:ver<0>' in 'Foo'
in block <unit> at <tmp> line 1
16:41 dakkar left 17:02 approaching236 joined
cpan-raku New module released to CPAN! hide-methods (0.0.1) by 03ELIZABETH 17:09
guifa Apparently Match.pos == -3 is defined as a failed match 17:10
Are there any other special Match positional values?
17:16 approaching236 left
guifa grammar A { token a { a }; token TOP { <a> }; say &a } 17:23
m: grammar A { token a { a }; token TOP { <a> }; say &a }
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared routine:
a used at line 1
guifa I thought tokens were routines? 17:24
m: grammar A { token a { a }; token TOP { <a> }; say A.^find_method('a') } 17:25
camelia token a { a }
cpan-raku New module released to CPAN! hide-methods (0.0.2) by 03ELIZABETH
guifa Slow down lizmat, at that pace this evening we’ll be at 4.1.2 ;-) 17:26
17:26 Doc_Holliwood left
lizmat yeah... forgot to add some pod... 17:26
I'm done with it now, for the foreseeable future 17:27
it was just some hacking around to see how for I'd get without using nqp :-)
guifa I’m doing a module right now that sounds like it will be similar 17:33
trying to make a longest/shortest alternation token 17:34
There are a few things I’d love to do to make it more powerful but might not be possible without really digging deep in the innards
17:34 Doc_Holliwood joined 17:39 BenGoldberg joined 17:47 jmerelo left, andrzejku joined 17:57 xinming left, BenGoldberg left, BenGoldberg joined, xinming joined 18:06 BenGoldberg left, Ben_Goldberg joined, Ben_Goldberg is now known as BenGoldberg 18:10 kylese left 18:12 BenGoldberg left 18:21 patrickb joined 18:23 bocaneri left 18:34 mowcat joined 18:37 wamba left 18:52 moony left 18:56 wamba joined
[Coke] anyone using mi6 to generate releases of raku modules? 18:58
wondering if github.com/skaji/mi6/issues/113 is biting anyone else 18:59
timotimo i release json::fast with mi6 19:02
19:06 moony joined, leah2 left 19:09 natrys left 19:12 sena_kun left 19:14 pecastro left
[Coke] It looks like it's using the wrong lib to run the tests. 19:16
(maybe I've got a weird setup)
timotimo you don't have a RAKULIB or so in your env? 19:27
[Coke] if I'm running something directly I put it on the command lin 19:28
*e
given that mi6 wants everything in LIB, I'd expect it to handle that itself where needed. guess not?
[Coke] updates github.com/coke/raku-unicode-mangler with more stupid stuff. 19:29
19:32 jmerelo joined 19:40 jmerelo left 19:44 rindolf left 19:46 andrzejku left 19:47 wamba left 19:48 andrzejku joined
Doc_Holliwood when you move your mouse from the upper left of your screens to the lower right, do you have to move your wrist? 19:51
bending does not count as movement, i mean changing the location on the desk 19:52
lizmat stopped using a mouse because of the onset of RSI 19:54
lizmat uses a trackpad for more than 18 years now
El_Che I use a trackball home and at work 19:55
(which nowadays are the sane place) 19:56
MasterDuke no
19:58 leah2 joined
El_Che I only use a right hand mouse for gaming 19:58
sometimes I use a mouse with my left hand 19:59
Doc_Holliwood i have a colleague who has his mouse set so that the corners of the mousepad and the corners of the screen match up
El_Che maybe with those huge apple ones
Doc_Holliwood i found that super weird, that must put so much strain on the arm
lizmat fwiw, I have acceleration and double-click speed all set to max 20:00
which means I only need a very small part of the touchpad to move the mouse all round the screen
Doc_Holliwood same
El_Che the fun of a track ball is that you can roll the ball to get fast somewhere
Doc_Holliwood can you play with a trackball? like aiming? 20:01
El_Che yes, you can, but I have a xbox controller for the computer 20:02
better than mouse :)
Doc_Holliwood heretic!
El_Che for AOE trackball is ok, but often I use a mouse there
(I literally play something every months, so no RSI risk there)
I have this one at home: :hierarchy: - "%{tier}" - "%{environment}" - common 20:03
oops
www.logitech.com/en-us/products/mi...tml?crid=7
that one :)
[Coke] misses the trackball he had in the... 90s? 20:07
El_Che I am a pretty fly for a 90s guy
:)
I think the one I use at work dates fron late that period 20:09
it's a cabled one
it even had a usb to serial-nouse-port converter
codesections I've never done anything with fancy mouses/trackballs. I did just get a new keyboard -- which I'm loving even though it means I (temporarily) can't type even half-decently
El_Che codesections: I moved from azerty to qwerty, I type funny stuff all the time 20:10
www.ebay.com/p/1301857966 <-- the one I use at work
200$ + $76 additional costs on ebay
cracy people
z
[Coke] heh. that logitech wheel looks VERY familiar. :) 20:14
El_Che [Coke]: all the cool kids had them
for some definition of cool :)
the trackman wheel is indesctructible
it still works while I already killed an Logitech M570 20:15
20:15 |Sno| joined
El_Che the double click of death 20:15
www.amazon.com/Logitech%C2%AE-Cord...B001ASC9BY 400$ 20:16
ok, there is a market of old nostalgic rich people :)
20:18 [Sno] left 20:24 kybr left 20:33 Black_Ribbon joined 20:39 bdju left 20:49 bdju joined 20:57 patrickb left 21:04 BenGoldberg joined 21:10 andrzejku left 21:29 BenGoldberg left, Ben_Goldberg joined, Ben_Goldberg is now known as BenGoldberg 21:38 BenGoldberg left 21:40 aindilis joined 22:40 linkable6 left, evalable6 left 22:41 linkable6 joined 22:43 evalable6 joined 22:44 mowcat left 22:56 cpan-raku left, cpan-raku joined, cpan-raku left, cpan-raku joined 22:58 __jrjsmrtn__ joined 22:59 _jrjsmrtn left 23:33 nebuchadnezzar left 23:34 nebuchadnezzar joined 23:55 BenGoldberg joined 23:59 netrino joined