🦋 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.
jjatria Stringification of a named capture 00:06
guifa2 For the key part, it's overkill (hash keys stringify by default) but for the value, you generally you want a Str and not a Match 00:10
Actually, RaycatWhoDat thanks for making me think about that stuff a bit harder. Just realized I can simplify one of my module's export code by a lot ^_^ 00:13
00:22 RaycatWhoDat left 00:35 RaycatWhoDat joined 00:40 Kaiepi joined 00:42 RaycatWhoDat left 00:45 pecastro left 00:50 aindilis left, aindilis joined, aindilis left 00:51 aindilis joined 00:59 lucasb left 01:07 RaycatWhoDat joined
tony-o JJAtria[m]: it doesn't affect anything 01:10
01:11 RaycatWhoDat left
tony-o it was changed because of the disabling of that eco was really weird to read `zef is updating zef at 360.zef...` 01:11
s/disabling/updating/ 01:12
01:19 RaycatWhoDat joined 01:21 gnufr33dom left 01:26 gnufr33dom joined 01:38 RaycatWhoDat left, gnufr33dom left 01:47 gnufr33dom joined 02:04 aindilis left 02:06 RaycatWhoDat joined 02:09 RaycatWhoDat left, RaycatWhoDat joined 02:14 RaycatWhoDat left, RaycatWhoDat joined 02:17 RaycatWhoDat left, RaycatWhoDat joined 02:22 RaycatWhoDat left 02:24 kvw_5 joined 02:25 RaycatWhoDat joined 02:27 kvw_5_ left 02:30 RaycatWhoDat left 02:32 gnufr33dom left 02:35 gnufr33dom joined 02:36 dmc7z joined 02:42 RaycatWhoDat joined 02:43 dmc7z left, dmc7z joined 02:45 RaycatWhoDat left, RaycatWhoDat joined 02:53 RaycatWhoDat left 02:57 RaycatWhoDat joined 03:02 RaycatWhoDat left, krkini is now known as kini 03:11 gnufr33dom left 03:25 dmc7z left 03:27 Black_Ribbon left 03:50 rba left, rba joined 03:58 brtastic joined 04:07 pilne left 04:21 rindolf joined 04:26 __jrjsmrtn__ joined 04:29 _jrjsmrtn left 05:03 parabolize left 05:04 aindilis joined 05:08 jmcgnh left 05:14 jmcgnh joined 05:23 [Coke] left 05:26 [Coke] joined, [Coke] left, [Coke] joined 05:32 wamba joined
spacebat2 Hi, I'm playing at the raku repl and have defined a class, now when I try to redefine the class I get an error "Redeclaration of symbol" 06:00
is there a way to undeclare, clear, unintern, or maybe just reopen the class so I can change the members? 06:01
guifa2 What are you trying to change about the class? Classes are mostly set in stone once they've been composed 06:04
(mostly because there are ways just intentionally not pretty)
spacebat2 just seeing how classes work
so I make a class, try it out, now I want the class to be something else
I guess I'm used to common lisp where you can unintern a symbol that names a class 06:06
or perl5 where you can mess with a package on the fly
what's a not pretty way? 06:09
guifa2 use MONKEY-TYPING; augment class Foo { … } 
spacebat2 cute
that's like reopening the class?
db48x +1 for redefining classes in CL
guifa2 although that's a bit imperfect, because supersede is the one that lets you actually override 06:10
I don't know of a way to remove a method, for instance — the HOW only has methods for adding methods 06:12
db48x is the set of quoting characters that Raku allows documented somewhere? 06:14
the best I've found so far is a unit test with a decent list, but it's not entirely complete
guifa2 db48x: I'm assuming you're referring to github.com/Raku/roast/blob/aa4994a....t#L49-L65 ? 06:15
db48x guifa2: the very same! 06:17
guifa2 if you use Q, I'm fairly certain it's an open list based on Unicode. For the shorthand (e.g. just saying 'foo' as opposed to Q:foo:), I believe it's just the Asian bracket-style and Northern European apostrophe-ish (with the German „ ” equivalent to “ ”) 06:20
angular quote styles do lists 06:21
db48x yes, I'm lumping regexes and lists in with the quoting here 06:23
what I have so far is that they can be any characters in the P (punctuation) category (aside from the special case for parens) 06:24
and then everything in the Pi and Ps categories matches up with some character from the Pf and Pe categories, respectively
aside from the low quotation marks you mentioned, which match up with the high quotation marks from the "wrong" category 06:25
the only other exception that I know of are angle brackets, which are in the Sm category
guifa2 it's basically anything that can't be used as a valid identifier 06:28
m: say Q⚑hi⚑ 06:29
evalable6 hi
db48x ah
06:32 evalable6 left, linkable6 left, linkable6 joined 06:33 evalable6 joined 06:36 jmerelo joined 06:49 jmcgnh left
guifa2 jmerelo: final version has been uploaded ^_^ 06:51
and I maybe give a call out to you re documenting code
06:56 jmcgnh joined, defaultxr left, Maylay left 06:57 defaultxr joined
jmerelo guifa2: great! 06:58
guifa2: what do you need?
06:59 Maylay joined 07:00 ufobat joined 07:03 andinus joined, wamba left 07:28 sjm_uk joined 07:34 sno left 07:35 Garbanzo left 07:56 abraxxa left 07:58 abraxxa joined 08:00 wamba joined 08:01 domidumont joined 08:03 abraxxa left 08:06 abraxxa joined 08:35 brtastic left 08:36 gnufr33dom joined 08:42 MasterDuke joined 08:50 dakkar joined 09:00 Scimon joined 09:03 Sgeo left 09:06 pecastro joined 09:43 asymptotically left, asymptotically joined 10:13 sno joined 10:22 moony left 10:39 moony joined
lizmat clickbaits rakudoweekly.blog/2021/01/25/2021-...reporting/ 10:48
10:50 aluaces left 11:07 MasterDuke left, wamba left 11:09 MasterDuke joined 11:19 kiti_nomad[m] left, ThaEwat left, unclechu left, CIAvash left, Tirifto[m] left, AlexDaniel` left 11:20 MitarashiDango[m left, JJAtria[m] left, matiaslina left 11:25 gnufr33dom left 11:28 CIAvash joined
Scimon lizmat: Weekly looking good :) Some great stuff in there 11:34
11:35 ThaEwat joined, Tirifto[m] joined, unclechu joined, AlexDaniel` joined, MitarashiDango[m joined, matiaslina joined, JJAtria[m] joined, kiti_nomad[m] joined 11:48 aluaces joined 12:52 Voldenet left 12:54 Voldenet joined, Voldenet left, Voldenet joined 13:17 brtastic joined 13:45 mowcat joined 13:53 lucasb joined 13:58 finsternis left 14:15 gnufr33dom joined 14:41 linkable6 left 14:43 linkable6 joined 15:14 parabolize joined 15:30 aindilis left 15:40 gnufr33dom left 15:41 Sgeo joined 15:48 gnufr33dom joined 16:00 dakkar left 16:01 dakkar joined 16:06 MasterDuke left, MasterDuke joined 16:10 gnufr33dom left 16:21 gnufr33dom joined 16:37 Garbanzo joined 16:38 gnufr33dom left 16:41 b2gills left, gnufr33dom joined 16:43 shlomif joined 16:51 rindolf left 16:52 donaldh joined, shlomif is now known as rindolf 16:55 gnufr33dom left 17:02 sxmx left 17:07 sxmx joined 17:10 Scimon left 17:23 sxmx left 17:24 donaldh left 17:33 dakkar left 17:37 aindilis joined 17:41 Possum left 17:42 Possum joined 18:03 MasterDuke left 18:06 domidumont left 18:08 ufobat left 18:16 Garbanzo left 18:29 clarjon1 left 18:56 jmerelo left 19:15 sxmx joined
raku-bridge <勉人> how can i get a variable to work in an enumerated character class in a regex? i want to do s/a(<-[a]>+?.)m/z$0m/ on alabama to give alzbaqa, but i need to use variables, so that the regex looks like: s/$letter(<-[$letter]>+?.)m/z$0m/ but this doesnt work. how can i put a variable within the <-[]> ? 19:19
19:57 donaldh joined 19:58 sjm_uk left
donaldh I've got an annoying habit of writing buggy code when I use sets. So I blogged about it: donaldh.wtf/2021/01/if-sets-would-dwim/ 19:58
20:04 MasterDuke joined 20:10 aborazmeh joined, aborazmeh left, aborazmeh joined 20:15 ChoppedBacon left
guifa2 勉人: you can't, because <[$letter]> is the set <$ l e t r>. You could do some match introspection to do that, though. 20:16
raku-bridge <勉人> whats match introspection?
20:17 ChoppedBacon joined
guifa2 putting in a code block, and checking out $/. For example 20:17
m: "alabama" ~~ m/ a(.)a(.)a(.)a { say $0 ~ $2 } /; 20:18
evalable6 lm
MasterDuke or EVAL the regex 20:19
guifa2 MasterDuke: yeah, if the inputs are guaranteed to be alphanums. Gets nastier if you need to escaping 20:20
20:20 aborazmeh left 20:23 Garbanzo joined 20:25 aborazmeh joined, aborazmeh left, aborazmeh joined
raku-bridge <勉人> i just got it! i did s/$from0(<{"<-["~$from0~"]>"}>+?.)m/z$0m/ and it works like this (by surrounding the whole thing as a string) 20:27
20:29 b2gills joined 20:37 stoned75 joined 20:40 aborazmeh left 20:41 MasterDuke left 20:42 MasterDuke joined 20:47 ilogger2 joined 20:54 ilogger2_ joined 21:16 oddp joined
tony-o how does that behave if $from0 contains a ']' 21:17
raku-bridge <勉人> asking the real questions here
tony-o just fine, it seems
spacebat2 BTW what is <-[]> in a raku regex? 21:50
guifa2 it's the same as [-…] in other regex flavors (a negative character class) 21:51
spacebat2 you mean [^...]? 21:52
guifa2 err yeah
been a while since I've done regex in other languages ^_^
spacebat2 right, and <> are for grouping, like () were
guifa2 It's cool though in that you can do <:Lu-[A..Z]+[BF]> to do any upper case letter, excluding A..Z, but also including BF 21:55
so the -/+ on the outside of the brackets has value 21:56
spacebat2 I see, looks like they chain 22:06
22:47 leont joined 22:57 oddp left 23:11 dustinm` joined 23:17 oddp joined 23:21 mendel joined 23:35 oddp left