meander

wilkerlucio 2021-12-05T00:23:30.078600Z

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 ๐Ÿ˜›

wilkerlucio 2021-12-05T17:38:41.079700Z

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

wilkerlucio 2021-12-05T17:38:47.079900Z

am I missing something?

borkdude 2021-12-05T21:15:25.080100Z

@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])))

borkdude 2021-12-05T21:15:54.080300Z

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

borkdude 2021-12-05T21:17:01.080500Z

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

borkdude 2021-12-05T21:18:58.080900Z

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

noprompt 2021-12-06T01:07:22.081100Z

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
borkdude 2021-12-05T06:51:47.079300Z

There is the meander interpreter namespace which works with bb

๐Ÿ‘€ 1
noprompt 2021-12-10T21:50:57.083600Z

I havenโ€™t forgotten about this.

noprompt 2021-12-10T21:51:20.083800Z

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

wilkerlucio 2021-12-11T00:07:08.084500Z

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

wilkerlucio 2021-12-11T00:07:56.085300Z

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

wilkerlucio 2021-12-06T13:48:49.081600Z

friendly reminder as requested ๐Ÿ™‚

borkdude 2021-12-06T15:03:26.081800Z

@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

wilkerlucio 2021-12-06T15:06:42.082200Z

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

noprompt 2021-12-14T18:27:35.091300Z

@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.

wilkerlucio 2021-12-14T18:52:52.091500Z

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