Fork me on GitHub
#cljs-dev
<
2017-06-07
>
gfredericks00:06:27

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

gfredericks00:06:57

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

gfredericks01:06:04

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

gfredericks01:06:30

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?

dnolen16:06:30

@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 🙂