[ANN] differ v0.1.0, a tool for creating, and applying, diffs on clojure(script) datastructures

2014-11-17 Thread Robin Heggelund Hansen
https://github.com/Skinney/differ I needed a way to send diffs of data from a cljs web-app to a clj backend, and I found clojure.data/diff to be a pain to work with, so i created my own solution. It currently only supports maps (and nested maps...), but support for lists, vectors and sets is

Re: [ANN] differ v0.1.0, a tool for creating, and applying, diffs on clojure(script) datastructures

2014-11-17 Thread Atamert Ölçgen
Hi Robin, Thanks for adding a README. It might contain a couple of errors though. I can't make sense of this for example: (def person-map {:name Robin :age 25 :sex :male}) (def person-diff (differ/diff test-map {:name Robin Heggelund Hansen

Re: [ANN] differ v0.1.0, a tool for creating, and applying, diffs on clojure(script) datastructures

2014-11-17 Thread Robin Heggelund Hansen
Ahh, you're right, thats a typo and it should read person-map. {:sex 0} is a map of keys removed. The reason I'm not using a set here is because I need to know the type of the datastructure to diff, and because it needs to work for nesting. For instance, this should also work. (diff {:name

Re: [ANN] differ v0.1.0, a tool for creating, and applying, diffs on clojure(script) datastructures

2014-11-17 Thread Robin Heggelund Hansen
And no, the result shouldn't contain {:sex :female} because the :sex key is listed in the removals map, so it's correct that it's not included in the result. kl. 07:42:30 UTC+1 tirsdag 18. november 2014 skrev Atamert Ölçgen følgende: Hi Robin, Thanks for adding a README. It might contain a