Fork me on GitHub
#meander
<
2021-12-05
>
wilkerlucio00:12:30

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 😛

borkdude06:12:47

There is the meander interpreter namespace which works with bb

👀 1
wilkerlucio17:12:41

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

wilkerlucio17:12:47

am I missing something?

borkdude21:12:25

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

borkdude21:12:54

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

borkdude21:12:01

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

borkdude21:12:58

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

noprompt01:12:22

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
wilkerlucio13:12:49

friendly reminder as requested 🙂

borkdude15:12:26

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

wilkerlucio15:12:42

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

noprompt21:12:57

I haven’t forgotten about this.

noprompt21:12:20

I’ve been pretty busy with work this week.

wilkerlucio00:12:08

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

wilkerlucio00:12:56

thanks for looking for time to check it 🙏

noprompt18:12:35

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

wilkerlucio18:12:52

no worries, thanks, can't promise but I'll try to have a look at it 👍