clojure-numerics / expresso

Clojure library for symbolic computation
312 stars 20 forks source link

Clojure 1.8.0 compatability #25

Closed danielbraun closed 7 years ago

danielbraun commented 7 years ago

I would really like to use this project under the current Clojure version, but the tests don't pass. There's the StringReader arity error which is solved by using instaparse 1.3.6, but then the tests go into an infinite loop.

Any headway on this? Has anyone made it work?

danielbraun commented 7 years ago

Failure example:

(solve 'x (ex (= (+ 1 x) 3)))
IllegalArgumentException Don't know how to create ISeq from: clojure.core.logic.LVar  clojure.lang.RT.seqFrom (RT.java:528)

After some digging, I'm seeing that numeric.expresso.solve/solve-polynomial instead of receiving the actual values it expects (symbol and a list describing the equation), it receives <lvar:?v> <lvar:?x> as parameters.

I tried using the patch described in http://dev.clojure.org/jira/browse/LOGIC-169, but it didn't solve it.

danielbraun commented 7 years ago

The mentioned patch has solved it - it didn't work at first, but after running lean clean it works. I'll send a PR.