meander 2021-12-05

hello, is there any idea in the horizon for when meander might work on Babashka? I ask because its very often that I would like to leverage meander in some BB script, but end up having to choose for the meander convenience or the babashka startup time, always a hard choice ๐Ÿ˜›

just looking at it, but seems to be quite limited, not sure if I'm looking it in the wrong way, but I often use the deep search operator (`$`) for example, and it doesn't seem to be available there

am I missing something?

@wilkerlucio I'm sometimes using a meander test script with babashka to measure performance:

(ns private.tmp.meander)

(require '[babashka.deps :as deps])
(deps/add-deps '{:deps
                 {meander/epsilon {:mvn/version "0.0.588"}}})


(time (require '[meander.interpreter.epsilon :as mi]))

(time (prn (select-keys ((mi/finder '[?x ?y] identity) [1 2]) '[?x ?y])))

I'm not very well up to date on this API to be honest. Perhaps @noprompt is :)

$ bb tmp/meander.clj
:foo
:bar
"Elapsed time: 96.066405 msecs"
:end

$ bb tmp/meander.clj
"Elapsed time: 98.478887 msecs"
{?x 1, ?y 2}
"Elapsed time: 1.565369 msecs"

I was working on it and then, like anything else, I got distracted and forgot about it. There's an outstanding PR and I can't remember what else there is to do on there. Remind me to look at this tomorrow and I'll see what else there is to do to merge that PR.

๐Ÿคฉ 1

There is the meander interpreter namespace which works with bb

๐Ÿ‘€ 1

I havenโ€™t forgotten about this.

Iโ€™ve been pretty busy with work this week.

no worries man, busy lifes, it happens when it can happen :)

thanks for looking for time to check it ๐Ÿ™

friendly reminder as requested ๐Ÿ™‚

@wilkerlucio forgot to mention, there is also this "simpler" pattern matching lib which works with bb https://github.com/babashka/babashka/blob/master/doc/projects.md#matchete

thanks man, sadly machete doesn't cover the kinds of cases that I use Meander for =/

@wilkerlucio Iโ€™m probably not going to be able to look at that ticket for a bit. There is an outstanding PR for bb support that was never completed. What I would suggest, if youโ€™re open to it, would be to look at that ticket and try to put together a new PR with the most recent code.

no worries, thanks, can't promise but I'll try to have a look at it ๐Ÿ‘