🦋 Welcome to the MAIN() IRC channel of the Raku Programming Language (raku.org). 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 6 September 2022.
00:00 reportable6 left 00:01 reportable6 joined 00:26 derpydoo joined 00:59 Aozen left 01:02 Aozen joined 01:04 xinming left 01:06 xinming joined 01:10 GreaseMonkey left, greaser|q joined 01:12 tonyo left, tonyo joined 01:19 greaser|q left, greaser|q joined, greaser|q is now known as GreaseMonkey 01:29 razetime joined
lucs Given ⌊class Foo { method foo { "SNOO" }; method diehow { self.foo ~ $.foo } }⌉, how should I think about the difference between ⌊self.foo⌉ and ⌊$.foo⌉? 01:39
01:40 Aozen left 02:09 teatime left, teatime joined 02:10 oodani left 02:11 oodani joined
guifa_ self requires an instantiated value 02:33
basically, self is guaranteed to be a non-type object 02:34
02:36 deoac joined
perryprog For April Fools we should've said calling .WHAT on a string will now be an alias for .uc 02:38
guifa_ err actually it doesn't require an instantiated value. 02:47
nm
lucs Yeah, I just built this, I don't quite (at all actually understand the difference: 02:48
Yeah, I just built this, I don't quite (at all actually) understand the difference: 02:49
gist.github.com/lucs/259e6aad61651...95625c044d
guifa_ there's no difference in the calls themselves there 02:51
method foo { … } is really internally the equivalent of sub foo (::CLASS:_ \self:) { … } 02:52
when you call a method, the first argument is always set to the invocant 02:53
in your Foo, it's an instance of Foo. In your Niy, it's the type object 02:54
lucs Are self.foo and $.foo always interchangeable\
?
(in the same context)
Because hey, I'm lazy, I'll use $.foo all the time if I can ;) 02:55
guifa_ per the docs: `$.a will be equivalent to self.a.item or $(self.a)`
lucs I saw that, but they're talking about attributes I think, not necessarily methods. 02:56
guifa_ same logic applies 02:57
m: class Foo { method a { 1,2,3 }; method b { .say for self.a }; method c { .say for $.a } }; Foo.b; Foo.c;
camelia 1
2
3
(1 2 3)
lucs Aha, I see. 02:59
(with my eyes, that is -- I'll need to think a bit more :-) ) 03:00
03:10 rakuuser left 03:17 ProperNoun joined
lucs guifa_: Okay, got it. 03:19
Thanks for the explanation and the excellent example.
04:17 evalable6 left, linkable6 left 04:18 linkable6 joined 04:19 ProperNoun left, evalable6 joined 04:21 ProperNoun joined 04:35 derpydoo left 04:38 derpydoo joined 05:35 ProperNoun left
pelevesque So $.a is like self.a.item or $(self.a), but not like self.a The $ creates a kind of or literally a container? I get it with attributes, but for methods, does $.myMethod have advantages over self.myMethod? 05:40
06:00 reportable6 left 06:01 reportable6 joined 06:05 razetime left 06:41 lucs left 06:42 lucs joined 06:43 razetime joined 07:04 Sgeo left 07:18 merp left 07:34 razetime left
Nemokosch For what it's worth, $.a and self.a are always method calls 07:36
There is no public access to attributes 07:38
In the Rakudo sources, you can see that $.a is really just "gimme the result of the method call to a, in a container" 07:41
You could use @.a and you'd get the same result, with .list called on it 07:42
Or %.a and then .hash is applied 07:43
Even you do has $.foo, that sets up a (private) attribute $!foo and a (public) method foo that returns $!foo 07:45
S /Even/Every time
This is why you can do is rw stuff at a declaration like that: it is used for generating the method 😉 07:48
07:54 jpn joined 07:56 an3223_ joined 07:57 BabyLoveWoodrose joined, dakkar joined 07:58 Vyrus left 08:09 jpn left 08:11 jpn joined 09:11 nativecallable6 left, committable6 left, sourceable6 left, greppable6 left, bisectable6 left, squashable6 left, benchable6 left, releasable6 left 09:12 benchable6 joined, sourceable6 joined 09:13 greppable6 joined, nativecallable6 joined, squashable6 joined, committable6 joined 09:14 releasable6 joined, bisectable6 joined 09:26 derpydoo left
Geth ecosystem/main: 4134c9ac88 | (Elizabeth Mattijsen)++ | META.list
Remove Lingua::EN::Syllable

It now lives in the fez ecosystem
10:18
10:26 linkable6 left, evalable6 left 10:28 linkable6 joined 10:29 evalable6 joined 10:41 abhinav left 10:42 abhinav joined 11:18 derpydoo joined 11:20 Sauvin left, Bocaneri joined 11:21 Bocaneri is now known as Guest407 11:23 rumgzy joined 11:26 Guest407 left 11:28 jpn left
lizmat and yet another Rakudo Weekly News hits the Net: rakudoweekly.blog/2023/04/03/2023-14-fulldist/ 11:39
11:44 Xliff joined
Xliff \o 11:44
m: say "'Hello World'" ~~ / \" (.*?) \" | \' (.*?) \' /;
camelia ï½¢'Hello World'ï½£
0 => ï½¢Hello Worldï½£
Xliff m: my token in-quote { \" (.*?) \" | \' (.*?) \' }; say "'Hello World'" ~~ / <in-quote> /; 11:45
camelia Nil
Xliff Why first but not second?
m: my token inQuote { \" (.*?) \" | \' (.*?) \' }; say "'Hello World'" ~~ / <inQuote> /; 11:46
camelia Nil
Nemokosch tokens don't backtrack 11:53
m: my regex in-quote { " (.?) " | ' (.?) ' }; say "'Hello World'" ~~ / <in-quote> /;
Raku eval ï½¢'Hello World'ï½£ in-quote => ï½¢'Hello World'ï½£ 0 => ï½¢Hello Worldï½£
Nemokosch I guess it doubled down on '' when it matched the first apostrophe 11:55
12:00 reportable6 left
Xliff Nemokosch++: Thanks! 12:00
12:01 reportable6 joined
Nemokosch Mind you, I'd also like to know what "doesn't backtrack" means in practice 12:01
buuut it definitely makes the difference here 😅 12:02
12:10 an3223_ left
you know, something is odd about this. I'm using similar "grammars" (composed regexes, at least) all the time, with token 12:23
m: my token inQuote { \' (.*?) \' }; say "'Hello World'" ~~ / <inQuote> / 12:28
Raku eval Nil
Nemokosch so this doesn't match
m: my token inQuote { \' <(.*?)> \' }; say "'Hello World'" ~~ / <inQuote> /
Raku eval ï½¢'Hello World'ï½£ inQuote => ï½¢Hello Worldï½£
Nemokosch but this matches???
m: my token inQuote { \' .*? \' }; say "'Hello World'" ~~ / <inQuote> / 12:29
Raku eval ï½¢'Hello World'ï½£ inQuote => ï½¢'Hello World'ï½£
Nemokosch and this also does...
12:35 jpn joined 12:40 jpn left
Xliff Nemo: Matches, but looks like it doesn't capture. 12:42
No $0 12:43
669
Oops.
Nemokosch well, you can still get the whole content from $/
but it would be interesting to know why the capture group suddenly ruins the matching 12:44
anyway, I wrote this down at least, whether it's a bug or a feature 12:47
12:52 lizmat left, lizmat joined
Geth Raku-Steering-Council/main: 194563ac65 | (Salve J. Nilsen)++ (committed using GitHub Web editor) | minutes/nis2-cra-intro.pdf
Add slides for NIS2/CRA intro presentation

  - PDF slides for Salve's presentation on NIS2/CRA and community ramifications.
  - Feel free to reach out to Salve with questions.
13:09
Raku-Steering-Council/main: 33a56b3161 | (Salve J. Nilsen)++ (committed using GitHub Web editor) | minutes/20230401.md
Add link to Salve's NIS2/CRA presentation PDF
13:10
13:15 an3223_ joined 13:43 jpn joined 13:56 an3223_ left 13:57 an3223_ joined, jgaz joined 14:10 teatwo joined, Sgeo joined 14:13 teatwo left 14:14 teatwo joined, teatime left
Voldenet maybe it would be nice if readme.org was supported in raku.land raku.land/zef:andinus/Template::Nest::Fast 15:02
15:14 linkable6 left, evalable6 left 15:15 evalable6 joined 15:16 linkable6 joined
[Coke] Do we have some kind of org processor in the ecosystem 15:16
?
15:17 ProperNoun joined 15:19 ProperNoun left 15:21 ProperNoun joined 15:25 discord-raku-bot left 15:28 ProperNoun left 15:29 ProperNoun joined
[Coke] Voldenet: gitlab.com/raku-land/raku-land/-/issues/37 15:29
Voldenet so there is an issue, but there's no orgmode parser 15:37
[Coke] looks like they were going to just shell out to emacs. 15:44
15:44 Guest51 joined 15:46 deoac left 15:54 Xliff_ joined 15:57 Xliff left 15:58 nebuchadnezzar joined 15:59 rumgzy is now known as Sauvin, ProperNoun left 16:00 ProperNoun joined
lucs Reading the docs for type_captures (docs.raku.org/routine/type_captures.html), in the ⌊sub a(::T ::U $x) ⋯⌉ example, what is the point of the ::U? 16:08
16:13 jpn left 16:27 _Xliff joined 16:29 jpn joined, _Xliff left 16:30 Xliff_ left 16:37 dakkar left 16:48 buffet left 16:50 buffet joined
Voldenet m: sub a(::ANY ::THING $x) { (ANY, THING, $x).say }; say a(1) 16:56
camelia ((Int) (Int) 1)
True
Voldenet m: sub a(::ANY ::THING ::YOU ::WANT $x) { (ANY, THING, YOU, WANT, $x).say }; say a(1)
camelia ((Int) (Int) (Int) (Int) 1)
True
Voldenet I know what it does, but I don't know what's the point though 16:57
m: sub a(::first $x, first ::second $y, second $z) { (first, second, $x, $y, $z).say }; say a(1, 2, 3) 16:59
camelia ((Int) (Int) 1 2 3)
True
Voldenet maybe something like that makes sense
m: sub a(::first $x, first ::second $y, second $z) { (first, second, $x, $y, $z).say }; a(Any, 2, 3) 17:01
camelia ((Any) (Int) (Any) 2 3)
Voldenet Maybe it starts making a bit more sense now 17:02
17:06 xinming left 17:08 xinming joined
japhb Copying over from #raku-dev, since I realized some of the Mac folk may not be in that channel: 17:15
If anyone here is using a Mac, I would super-appreciate some screenshots of Mac terminal(s) running `terminal-quick-test` from github.com/japhb/Terminal-Tests (`zef install Terminal::Tests`)
I'm trying to get a rough idea of how terminal Unicode handling is working cross-platform.
So far I have gnome-terminal, gnome-terminal + GNU Screen, xterm with various configurations, and Windows Terminal under Windows 10 (though that one's slightly out of date; I've added to the test pattern since then).
FWIW, Windows Terminal under Windows 10 without enabling UTF-8 support is ... an interesting mess. Actually pretty decent with UTF-8 turned on properly (why in the world would this be off by default?!?)
17:29 jpn left
lucs Voldenet: Your last example, although somewhat contrived, appears legit, 17:48
but what I don't get is, given (::T ::U $x) for example, how can ::T and ::U ever be different, and if they can't, what's the point of the ::U?
17:51 jpn joined 17:53 sena_kun joined 18:00 reportable6 left 18:02 reportable6 joined
[Coke] japhb: dumped a bunch of sends to raku-dev 18:06
japhb Saw them, thank you! 18:11
18:18 jpn left 18:42 jpn joined
lucs (repeating from earlier:) Reading the docs for type_captures (docs.raku.org/routine/type_captures.html), in the ⌊sub a(::T ::U $x) ⋯⌉ example, what is the point of the ::U? 18:46
In the spirit of Cunningham's law, I believe I will edit the docs to remove the ::U in that example. 18:47
18:48 gcd joined
lizmat lucs++ 18:53
19:00 jpn left 19:16 jpn joined 19:22 jpn left 20:08 jpn joined 20:17 an3223_ left
coleman japhb: If you haven't already, you might make a Reddit post about this 20:24
(to solicit testing from Mac users)
japhb Oh right, I have a Reddit account, I totally forgot about that. 20:28
0.0.4's README now has the screenshots provided by [Coke]++ and lizmat++ 20:31
20:50 jpn left 21:02 jgaz left
japhb coleman: Took your advice: www.reddit.com/r/rakulang/comments..._patterns/ 21:06
21:07 tobs left
japhb Awww, Reddit doesn't do :emoji: codes? 21:07
21:18 tobs joined 21:33 an3223_ joined
[Coke] japhb: you might want to add the test version in the outputs. 21:39
japhb Well gee, that would be intelligent, wouldn't it? ;-) 21:58
21:59 nort joined
japhb thinks about where he wants to fit that in for screenshot-friendliness 21:59
22:04 sena_kun left 22:13 an3223_ left 22:45 derpydoo left 23:25 Sgeo_ joined 23:27 Sgeo left 23:44 Guest51 left