Clojurians
#cljs-dev
<
2017-06-07
>

This page is not created by, affiliated with, or supported by Slack Technologies, Inc.

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

gfredericks02:06:28

@favila oh cool, thanks

roman01la12: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

roman01la12:06:56

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

roman01la13: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?

roman01la16:06:03

@dnolen sorry, this is not relevant anymore :slightly_smiling_face: