🦋 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.
guifa2 o/ 00:21
[Coke] \o 00:22
guifa2 Okay that was weird, computer totally died on me. 00:45
guifa2 Hm. How can one work with $¢? It's a dynamic var that's preset, BUT it seems to get set to Nil when it passes from one sub/method to another 02:06
m: sub foo { say $¢ }; $¢ = "bar"; foo 02:09
camelia Nil
tobs guifa2: there's a mention of it in the docs, from which I gather that it's only intended to be used inside regexes docs.raku.org/type/Match#index-entry-$%C2%A2 02:13
guifa2 tobs: I'm writing a regex engine for binary blobs, so trying to align as closely as I can with the stringy regex 02:14
$/ propogates correctly,but there's no way for me to set the $¢ so that, e.g., methods have access to it 02:15
tobs oh, then you know more than I do 02:16
timotimo guifa2: i do believe that the cursor and the match have been unified a year or so back, so you may not have to do anything to $¢ 02:25
timotimo oh, am i wrong? 02:26
guifa2 timotimo: I know in terms of the class they are the same, but my understanding is that the two are still functionally distinct (and I kinda feel like they should be) 02:27
m: "aaaa" ~~ /(. { say $/.from })+/
camelia 0
1
2
3
guifa2 each $/ is the current inner Match from the ( ... ) capture
m: "aaaa" ~~ /(. { say $¢.from })+/
camelia 0
0
0
0
guifa2 the $¢ refers to the outer Match only. 02:28
(one of those design decisions that actually feels pretty genius TBH, even if $¢ drives me crazy typing haha)
timotimo hm, TIL
do you write it with a compose sequence? 02:29
tobs over here it just happens to be altgr+c
guifa2 tobs: Yeah, I keep wanting to do opt-c, but on my keyboard it's opt-4 (and dollar is shift-4 so... meh lol) 02:30
timotimo vim lets you do ctrl-k Ct to get that letter 02:31
or :set digraph then you can C <backspace> t i think
timotimo actually you have to do t <BS> C to get it for some reason? 02:33
guifa2 I'll stick with opt-4 ha. I don't hardly use it but trying to match Raku's engine is quite a bit of work. Not in a bad way though, the design decisions are kind of genius 02:37
Geth whateverable: ad6c20cba1 | (Aleks-Daniel Jakimenko-Aleksejev)++ | lib/Whateverable/FootgunDB.pm6
Sort keys in footgun DBs
04:25
whateverable: 84a0260c8c | (Aleks-Daniel Jakimenko-Aleksejev)++ | xbin/build.p6
Make sure that origin is an actual origin

Instead of pointing to a local mirror. Some of these repos should be bare repositories or mirrors, but that's something to improve in the future (it works without any issues right now).
whateverable: 22afda26bc | (Aleks-Daniel Jakimenko-Aleksejev)++ | xt/committable.t
Unbitrot some tests

I don't know what this “Did you mean” test was supposed to do. The SHA it used to mention is completely different, I don't think this test is meaningful at all.
Geth whateverable: 77622ff888 | (Aleks-Daniel Jakimenko-Aleksejev)++ | 2 files
Make it possible to use branch names

This makes it possible to use branch names instead of SHAs. All bots now support it, and branch names will now be even suggested in “did you mean … ?” messages.
This commit includes some basic tests so it resolves #45.
04:39
whateverable: c2c72cdc36 | (Aleks-Daniel Jakimenko-Aleksejev)++ | META6.json
Bump version
05:13
Geth whateverable: db052579a5 | (Aleks-Daniel Jakimenko-Aleksejev)++ | xbin/build.p6
Fix repo origin in build.p6 (oops)
05:46
samcv I have updated the atom language-perl6 package to support .raku. Not yet complete, but the name of the package now has raku in it, and at least i added some of the filetypes 10:30
lizmat samcv++ 10:36
abraxxa samcv++ 10:50
a search for 'raku' now suggests language-perl6 10:52
can we rename the atom package completely to language-raku?
samcv abraxxa, maybe. I am not sure. Also I can't change the name of the script because other packages use that. I tried to turn "Perl 6" into "Raku/Perl 6" and github.com/rgbkrk/atom-script/ relies on that name, probably others. So there probably needs some research to find out what packages depend on "Perl 6" for script name, and source.perl6fe for scopeName. source.perl6fe is not user visible so less important to worry about (for now). But before 10:55
changing it over we need to find out which packages are depending on these
abraxxa is it easier to create a new package and deprecate the old one? 10:56
samcv well. that is a problem for poeple updating it. Then that is the same problem that the other packages are still not compatible with a new "language-raku" package 10:57
ok looks like we can do a package rename. So that's nice 10:58
I created an issue here: github.com/perl6/atom-language-perl6/issues/95 to put down all that needs to happen 11:04
abraxxa how can I run a program and continue the raku program flow without caring for exit codes, stdout, etc? 12:58
currently I call run('hamster-snap').so;
timotimo is it important that the program keeps running even when your raku program stops? 12:59
abraxxa yes 13:00
that's just a little script I call in my i3blocks config and this passes an env var to signal that it was clicked
timotimo for that you'll actually want a Thread that keeps the script alive when the program isn't finished when raku is
abraxxa I want to start hamster on click, but return the current working hours per day and week always
timotimo hamster!
abraxxa hamster 3 with Ubuntu 20.04 because it doesn't ship python 2 any more github.com/projecthamster/hamster 13:01
and this has no indicator support so far
at least the damn snap works
I just tried run('hamster-snap &').so; but that doesn't work 13:02
Proc::Async looks complicated too
ah, I guess I need shell for & 13:03
guifa2 jnthn: any idea/reason why $¢ gets reset on sub calls, despite being dynamic? 14:44
guifa2 m: sub foo ( say $¢ }; $¢ = "bar"; say $¢; foo 14:45
camelia 5===SORRY!5=== Error while compiling <tmp>
Invalid typename 'say' in parameter declaration.
at <tmp>:1
------> 3sub foo ( say7⏏5 $¢ }; $¢ = "bar"; say $¢; foo
guifa2 err
m: sub foo { say $¢ }; $¢ = "bar"; say $¢; foo
camelia bar
Nil
jnthn m: sub foo() { dd ::MY.keys } 14:48
camelia ( no output )
jnthn m: sub foo() { dd ::MY.keys }; foo
camelia ()
jnthn m: sub foo() { dd ::.keys }; foo
camelia ("\$¢", "\$!", "\$/", "\$*DISPATCHER", "\$_", "\$*NEXT-DISPATCHER").Seq
jnthn Apparently 'cus it declares a fresh one
I guess maybe all routines do
guifa2 $/ doesn't get the same reset, though 14:50
m: sub foo { say $/ }; $/ = "bar"; say $/; foo
camelia 5===SORRY!5=== Error while compiling <tmp>
Unsupported use of $/ variable; in Raku please use the filehandle's .nl-in attribute
at <tmp>:1
------> 3sub foo { say $/ }; $/7⏏5 = "bar"; say $/; foo
guifa2 ahm 14:51
m: sub foo { say $/ }; my $/ = "bar"; say $/; foo
camelia 5===SORRY!5=== Error while compiling <tmp>
Unsupported use of $/ variable; in Raku please use the filehandle's .nl-in attribute
at <tmp>:1
------> 3sub foo { say $/ }; my $/7⏏5 = "bar"; say $/; foo
guifa2 okay I swear this is working in my code lol
lizmat and another Rakudo Weekly News hits the Net: rakudoweekly.blog/2020/04/27/2020-...g-cleanup/ 15:02
guifa2 lizmat++ 15:04
guifa2 also, my blog post is coming, I promise :-). It's a DEEEEEEEP dive into regex, but as I'm updating my own code I'm constantly needing to tweak it. 15:07
lizmat yeah... I know the feeling, considering writing one about my ventures into ... 15:08
timotimo m: use MONKEY-TYPING; augment class Array { method CALL-ME($self where .elems == 2:) { self.[0]."{$self.[1]}"() } }; say ["hi", "uc"]() # PHP style unbound methods 15:37
camelia HI
MasterDuke lizmat: ha. i was wondering when you were going to finish your thought. only just now realized you literally meant `...` the sequence operator 15:42
guifa2 MasterDuke: I had to do a double take too :-) 15:43
melezhik Sparrowdo/Raku as an Ansible alternative - www.reddit.com/r/devops/comments/g...?context=3 15:51
Altreus What does 2020.17 refer to/ 15:56
[Coke] 17th week of the year, guessing 15:58
Altreus ah!
that seems to fit
[Coke] m: dd Date.new(2020,1,1) + 17*7 15:59
camelia Date.new(2020,4,29)
[Coke] ish.
guifa2 17th week of the year or 17th weekly. I'm not sure what lizmat would do if she were to skip a week (inconceivable!) 16:03
Altreus seppuku 16:05
that would bring dishonour
[Coke] If she needs to skip a week, it's ok. :) 16:09
guifa2 Oh absolutely. resting is never a bad thing 16:14
tadzik lizmat: link to "Good Mentors" looks broken :) 16:31
Altreus I hoped the absurdity of my comment gave away the insincerity of it :) 16:48
lizmat tadzik: should be fixed now, thanks! 16:49
tadzik yay :) 16:50
lizmat fwiw, I skipped a week last year :-) there was no 2019.53 16:55
guifa2 That's cheating to get out of producing an off-by-one error ;-) 16:57
[Coke] :)
lizmat hehe, actually there was no 2019.52 16:59
rakudoweekly.blog/2019/12/24/2019-...-holidays/
Geth whateverable: c19694c38f | (Aleks-Daniel Jakimenko-Aleksejev)++ | xbin/Shareable.p6
Remove use of $*CONFIG var

It is just $CONFIG now.
17:05
Geth whateverable: aaae90891b | (Aleks-Daniel Jakimenko-Aleksejev)++ | xbin/build.p6
Fix build.p6 (oops)
17:11
Geth ecosystem: eccb34b1db | (Alexey Melezhik)++ (committed using GitHub Web editor) | META.list
Module moved to CPAN
17:39
cpan-raku New module released to CPAN! Sparrowdo::Goss (0.0.2) by 03MELEZHIK 17:47
cpan-raku New module released to CPAN! Sparrowdo::Goss (0.0.3) by 03MELEZHIK 18:34
abraxxa lizmat: why do you use 'their' and 'they' (plural) when speaking of someone in Raku weekly? 18:50
guifa2 abraxxa: yay for English gender neutral pronouns :-) 18:56
abraxxa plural? that sounds schizophrenic to me as non-native speaker... 19:03
Grinnz abraxxa: it is not ideal, but the only other option is "it" which is not used to describe people, so "them/they" is becoming more accepted as a singular gender neutral 19:06
abraxxa I hate the whole discussion and don't want to participate! 19:07
Grinnz you asked :P 19:07
abraxxa yes, thanks 19:08
I'm a white male and I have to live with it 19:09
guifa2 abraxxa: a singular gender-neutral they has existed in English for centuries. Unfortunately, most English classes tend to teach it as wrong or don't mention it at all, which complicates the situation 19:10
guifa2 but if makes you feel any better, I find it impossible to interpret "you" as plural 19:11
guifa2 So whenever anyone gives a speech saying that "you" need to do something, I always take it personally. Because for a group, the only optoin is "y'all" 19:12
Grinnz guifa2: and then there's people that use y'all as singular :)
guifa2 Grinnz: that's an urban (emphasis on urban lol) myth though :-) we tend to use it a lot when addressing a single person when we mean that person plus, for instance, the place they work at ("do y'all have X in stock?") 19:16
Grinnz well, wikipedia at least suggests it's more than a myth, but certainly not widespread 19:17
cpan-raku New module released to CPAN! Gnome::Glib (0.17.2) by 03MARTIMM 19:20
New module released to CPAN! Gnome::N (0.17.5) by 03MARTIMM
jjatria If I have the name of a method in a variable $foo, how can I call the method by that name in a class? I mean what in Perl would have been `$foo = 'method_name'; $obj->$foo` 20:34
jnthn $obj."$foo"() 20:39
jjatria Thanks! 20:42
Ajiejaiqu Dear chatters, please remove yourselves from the #freenode channel if you are currently in there. We are working to combat bot spam, and if the users can remove themselves from that channel so that only bots remain, we can more easily execute our cleanup. Thanks! - freenode staff P.S. Fuck you. 21:14
blitie Dear chatters, please remove yourselves from the #freenode channel if you are currently in there. We are working to combat bot spam, and if the users can remove themselves from that channel so that only bots remain, we can more easily execute our cleanup. Thanks! - freenode staff P.S. Fuck you. 21:15
Difl Dear chatters, please remove yourselves from the #freenode channel if you are currently in there. We are working to combat bot spam, and if the users can remove themselves from that channel so that only bots remain, we can more easily execute our cleanup. Thanks! - freenode staff P.S. Fuck you. 21:16
[Coke] wow, super convincing! 21:39
tadzik imagine doing something like this and being proud of yourself
[Coke] @mst, I assume you're on that.
Sigyn ** Warning: if there is any bot in #raku which should be exempted from Sigyn, contact staffers before it gets caught ** 21:40
mst [Coke]: she might eat a bot or three 21:40
but she's been happily munching on these fuckers everywhere else
[Coke]: also, shit, sorry, I'd made sure she was in as many places as possible but forgot here :( 21:41
[Coke] I assume we can resurrect our bots later if needed.
mst++ much less spam these days than before.
mst I'd forgotten that while to *us* this channel was a 'rename' she didn't know that 21:42
[Coke] mst - no worries, man. 21:43
mst also if sigyn munches a bot, if an op messages her with 'unkline <nick>' within ~30min she'll fix it 21:44
otherwise I'll go bug people
jjatria Does Raku do lazy attributes? As in, attributes that have a default but that don't actually get initialised until needed? 22:14
I tried a well-meaning `has $.foo is lazy = ...` but the compiler got mad at me
jnthn There's nothing in the core language for that at the moment; there may be modules 22:15
m: class C { has $.foo is lazy = 100 }
camelia 5===SORRY!5=== Error while compiling <tmp>
Can't use unknown trait 'is' -> 'lazy' in an attribute declaration.
at <tmp>:1
expecting any of:
rw
readonly
box_target
leading_docs
trailing_do…
jnthn That doesn't look mad, just says it's an unknown trait.
(Which it is.)
Did you get something else? 22:16
lizmat jjatria: perhaps modules.raku.org/dist/Object::Delayed could be of use ? 22:17
MasterDuke modules.raku.org/dist/Attribute::L...pan:JSTOWE or modules.raku.org/dist/AttrX::Lazy:...rre-vigier maybe
jjatria jnthn: No, that's what I got too... right before my WiFi decided it had had enough and dropped out -_- 22:28
jjatria lizmat: Ah, I have vague memories of having seen that before. Yeah, that looks handy, I'll take it for a spin :) 22:28