Fork me on GitHub
#meander
<
2020-11-16
>
rfhayashi17:11:53

Does meander work with babashka? Has anyone tried?

👍 3
Jimmy Miller17:11:02

I haven't tried personally.

borkdude18:11:14

@U0HLDF4PL I think I ran into something, but I can't remember what from the top of my head. I do know that this one works: https://github.com/xapix-io/matchete It's a bit of a more basic meander with emphasis on fns instead of macros

noprompt18:11:30

> emphasis on fns instead of macros This is only temporary as I mentioned. 🙂

borkdude18:11:57

Ah right, this was the first thing I ran into:

user=> (require '[meander.epsilon])
Could not resolve symbol: clojure.lang.Compiler/demunge [at clojure/spec/alpha.clj:128:16]
user=>

noprompt18:11:58

@U04V15CAJ If you remember what it was do post an issue.

noprompt18:11:19

Gah, spec! 😭

borkdude18:11:22

hmm, meander loads spec ?

noprompt18:11:58

Yes, in a couple namespaces, however, those namespaces don’t use it so we can stop doing that.

borkdude18:11:24

user=> (binding [clojure.core/*loading-verbosely* true] (require '[meander.epsilon]))
(clojure.core/load "/meander/epsilon")
(clojure.core/load "/clojure/core")
(clojure.core/in-ns 'meander.epsilon)
(clojure.core/alias 'clj 'clojure.core)
(clojure.core/load "/meander/match/epsilon")
(clojure.core/in-ns 'meander.match.epsilon)
(clojure.core/alias 'clojure 'clojure.core)
(clojure.core/in-ns 'meander.match.epsilon)
(clojure.core/alias 'pprint 'clojure.pprint)
(clojure.core/load "/clojure/set")
(clojure.core/in-ns 'meander.match.epsilon)
(clojure.core/alias 'set 'clojure.set)
(clojure.core/in-ns 'meander.match.epsilon)
(clojure.core/alias 's 'clojure.spec.alpha)

noprompt18:11:12

Alrighty, I’m on it.

borkdude18:11:50

This one's also causing trouble: https://github.com/noprompt/meander/blob/a96e3766a0b342f60952acf1c732a82b831b82fc/src/meander/substitute/syntax/epsilon.cljc#L7 (core.specs.alpha) I do intend to support spec in babashka at one point, but not with the .alpha suffix

noprompt18:11:12

I’m going to fully move the fdefs etc to separate namespaces and drop the requires.

noprompt18:11:43

This actually one, for the most part, nice property of specs global, public registry approach.

borkdude18:11:59

@U06MDAPTP The next issue: Unable to resolve classname: clojure.lang.Var [at meander/util/epsilon.cljc] I think this: https://github.com/noprompt/meander/blob/a96e3766a0b342f60952acf1c732a82b831b82fc/src/meander/util/epsilon.cljc#L585 can be written as (:ns (meta var))

noprompt21:11:55

@U04V15CAJ Thanks again! I’m nearly done with the spec surgery.