This channel is intended for users of App::Rak raku.land/zef:lizmat/App::Rak
Set by lizmat on 27 September 2022.
00:20 Geth left 00:21 Geth joined
SmokeMachine I've seen on mastodon someone making a perl grepip that could search for ips on files using a given ip mask. Would something like that be interesting to rak? 13:02
lizmat wouldn't that be something like '{ matches-ip($_, mask) }' and some module that would provide the matches-ip mask ? 13:06
*sub 13:14
I guess something could be built in, but someone would need to write the logic first. And I assume we also want IPv6, right?
SmokeMachine I suppose so 13:21
maybe this? raku.land/zef:vrurg/IP::Addr 13:26
lizmat could you please make an issue for that in the App::Rak repo? so it doesn't fall through thecracks 13:37
13:58 Geth left, Geth joined
SmokeMachine sure! another thing: it seems the link for the log is not on the channels's topic... should it be there? 16:51
16:52 ChanServ sets mode: +o lizmat
lizmat This channel is intended for users of App::Rak raku.land/zef:lizmat/App::Rak . This channel is being logged, see irclogs.raku.org/raku-rak/live.html 16:53
lizmat SmokeMachine++ fixed 16:53
SmokeMachine thanks!
16:54 ChanServ sets mode: -o lizmat
SmokeMachine github.com/lizmat/rak/issues/3 16:56
lizmat: I'm sorry for my terrible memory, but have I ever suggested to search for AST patterns on raku code files? 16:58
lizmat not sure what you mean, could you give an example?
SmokeMachine sure: lets say I want to find everywhere where I have called the method `bla` passing the named parameters `:$ble`. It could exist a way to pattern match the AST generated for multiple code files and search for that. I started playing with AST pattern matching some time ago (I'm not suggesting using it, just an example) github.com/FCO/RakuAST-Matcher Something like what treesiter does for editors... 17:02
lizmat aaah.. so basically $file.IO.slurp.AST and then search the AST for the given condition 17:03
SmokeMachine yes... but some good way to match it... :) 17:04
lizmat hmmmm the needle could be code that translates into an AST, right? 17:06
yes, please, also an issue, please :-) 17:07
SmokeMachine That was my try on that repo... but, for example, on my example (call of method `bla` passing the named parameter `:ble`), it should be a way to accept `$a.bla: :ble`, or `$b.bla: "something", :42ble` or `Class.bla: :ble[], |c` 17:10
lizmat yeah... and the problem is that :foo :foo(True) are codegenned differently 17:11
foo => True is also different
SmokeMachine the way I was trying to do that would be passing: `ANUTHING.bla: :bla(ANITHING), ANYARGUMENTS` but I'm not sure if that's possible 17:12
lizmat so it won't be just a matter of matching classes
but some more heuristics would be neede
d
SmokeMachine yes... that's why it's hard... but I think to that be useful, that's would be required...
lizmat completely agree on the usefulness :-)
SmokeMachine but do you think that's something that would be good to Rak? 17:14
lizmat yes, it would 17:15
SmokeMachine if that's implemented, we could also implement a search for AST on every module... :) 17:16
I mean a site
lizmat rak will never be able to beat rg on performance, but it should be able to do on unique features! :-)
SmokeMachine github.com/lizmat/rak/issues/4 17:20
and maybe if it uses treesiter it could do the same for many languages as well (that's something I'not aware it any grep-like is able to do) 17:22
sorry, just fixing: `ANYTHING.bla: :bla(ANYTHING), ANYARGUMENTS` 17:24