antononcube weekly: rakuforprediction.wordpress.com/20...s-of-2025/ 03:16
notable6 antononcube, Noted! (weekly)
antononcube Please, pay no attention to the Wolfram|Alpha image. (That is entirely WordPress doing, BTW...) 03:17
TBH, I did not want to do that blog post. It is/was posted too late, i.e. after the New Year. And doing it felt more of a compulsion at some point. 12:39
guifa Is there any way to obscure submatches but still be able to process them during match? 15:28
something like
my $match = 'a' ~ / <alpha> { say $<alpha> } /; say $match<alpha> # no such key 15:29
antononcube Shouldn't just // work? 16:02
timo you want ~~ instead of ~ as well, or you'll just match against $_ instead of "a" 16:38
ab5tract m: say "foo"; 17:28
camelia foo
ab5tract m: dd my $ret = say "foo";
camelia foo
$ret = Bool::True
ab5tract say $<alpha> is going to have the value of Bool::True
or rather, the block containing `say $<alpha` will produce Bool::True 17:29
meltingwax nice post! brings me back to taking number theory in college 17:40
antononcube @meltingwax Thanks! 17:45
timo guifa: depends on what the code around it looks like, you may be able to use a non-capturing submatch that has the code that does the processing inside of it? 17:46
antononcube Number Theory is my "unshared love" -- I spent lots of time trying to figure out why, what, and how without much success.
guifa timo: I could but it feels wasteful to do it twice 18:01
antononcube @meltingwax I was aware of "Math::Sequences" existence, but I thought it "just" had sequences. I did not know or remembered that it had number theoretic functions. (totient, sigma, etc.) 18:03
timo guifa: since i don't know your exact needs, i'm not sure what to suggest. you can have a `:my $before; <?{ $before = $/.from; True }> <.alpha> <?{ bla bla }>` though i'm not sure if .from is correct there 18:10
guifa I'm basically doing my standard overkill down the rabbit hol 18:12
"Oh, we just added multicast? We need a way to get network interfaces. Well, that means parsing ifconfig. Well, wouldn't that be easier if we had an IPv4 and IPv6 and MAC address tokens?" 18:13
(there's also a further "Sure, but at that point we should probs have a standard class for them too"
"standard" = go to in module space 18:14
There's an IP::Parse but it kind of combines several pieces of the puzzle and not quite as modular as I'd like 18:15