meander

All things about https://github.com/noprompt/meander Need help and no one responded? Feel free to ping @U5K8NTHEZ
noprompt 2020-12-17T00:46:11.092400Z

https://clojars.org/meander/epsilon/versions/0.0.588

noprompt 2020-12-17T00:46:28.092900Z

@mac You should be able to try out quoted patterns now.

noprompt 2020-12-17T00:47:27.094200Z

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

((mi/finder '[?x ?y] identity) [1 2]))
;; => {?x 1, ?y 2}

noprompt 2020-12-17T00:58:23.094700Z

Please report any issues you encounter.

borkdude 2020-12-17T08:26:54.095Z

@noprompt

$ cat /tmp/meander.clj
(ns private.tmp.meander)

(require '[babashka.deps :as deps])
(deps/add-deps '{:deps {meander/epsilon {:mvn/version "0.0.588"}}})
(require '[meander.epsilon.interpreter :as mi])
((mi/finder '[?x ?y] identity) [1 2])
$ bb /tmp/meander.clj
Downloading: meander/epsilon/0.0.588/epsilon-0.0.588.pom from clojars
Downloading: meander/epsilon/0.0.588/epsilon-0.0.588.jar from clojars
----- Error --------------------------------------------------------------------
Type:     java.lang.Exception
Message:  Could not find namespace: meander.epsilon.interpreter.
Location: /tmp/meander.clj:5:1

borkdude 2020-12-17T08:29:37.095500Z

Ah, the namespace segments should be reversed: meander.interpreter.epsilon

borkdude 2020-12-17T09:11:43.095800Z

@noprompt on clojure and bb I'm getting:

{:meander.interpreter.epsilon/cata #object[meander.interpreter.epsilon$match_system_factory$fn__3238$f__3241 0x4863c8ac "meander.interpreter.epsilon$match_system_factory$fn__3238$f__3241@4863c8ac"], ?x 1, ?y 2}

noprompt 2020-12-17T18:24:59.097200Z

@borkdude Yes. I elided that key in the other examples for demonstration purposes and probably should have added a ,,, or something to denote the presence of “other stuff”.

noprompt 2020-12-17T18:26:08.098900Z

The cata function is put in the map so that the cata pattern can work properly.

noprompt 2020-12-17T18:29:08.101800Z

I could have put it in meta data or something but the cost of calling with-meta in pretty much every in location where bindings are being manipulated is expensive.

noprompt 2020-12-17T18:30:11.102900Z

Another thing we can do is dissoc it, but that’s also extra work that doesn’t technically need to go down.

noprompt 2020-12-17T18:30:37.103500Z

For find style stuff, probably not a big deal, and it may not even be a big deal for search either.

borkdude 2020-12-17T18:37:10.105400Z

this is fine

noprompt 2020-12-17T18:42:19.106Z

I’m a big push over though. If it’s annoying people, I have no problem with blasting it from space.

jimmy 2020-12-17T21:04:00.106100Z

I'd say dissocing makes sense. It is just going to confuse people and probably not provide any value.