Fork me on GitHub

(re-matches #"2|20" "20") => nil is this expected?


the docstring for re-matches is actually consistent with this, but it seems quite unideal to me


I can imagine perhaps there isn't a better way to do re-matches


but it can be quite surprising to see it act differently from the jvm version

Roman Liutikov12:06:37

looks like hashing a form that contains numbers returns different value in Clojure and ClojureScript cljs (hash [1]) ;; -1939225835 clj (hash [1]) ;; -1381383523

Roman Liutikov12:06:56

Is it due to the fact that all numbers are floats in JavaScript?

Roman Liutikov13:06:37

What would be an alternative to get a serializable value out of data structure in both cljs and clj?


@roman01la it’s not clear what you are asking. That sounds like EDN and/or Transit?

Roman Liutikov16:06:03

@dnolen sorry, this is not relevant anymore 🙂