This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-07-10
Channels
- # announcements (28)
- # architecture (1)
- # babashka (4)
- # beginners (55)
- # biff (4)
- # calva (11)
- # clerk (1)
- # clj-http (2)
- # clj-kondo (1)
- # clojure (46)
- # clojure-austin (1)
- # clojure-europe (32)
- # clojure-nl (1)
- # clojure-norway (17)
- # clojure-uk (4)
- # clojurescript (5)
- # cursive (6)
- # datomic (2)
- # emacs (2)
- # events (1)
- # fulcro (33)
- # hoplon (4)
- # humbleui (30)
- # hyperfiddle (50)
- # jackdaw (2)
- # jobs (13)
- # joyride (8)
- # lsp (2)
- # malli (2)
- # off-topic (6)
- # re-frame (4)
- # remote-jobs (1)
- # rum (10)
- # shadow-cljs (10)
- # xtdb (7)
I'm running into this issue again, I'm looking into repro-ing it, but not there yet https://github.com/thheller/shadow-cljs/issues/1063
It turns out to be a different problem.
(def infix-operators #{"+" "+=" "-" "-=" "/" "*" "%" "=" "==" "===" "<" ">" "<=" ">=" "!="
"<<" ">>" "<<<" ">>>" "!==" "&" "|" "&&" "||" "not=" "instanceof"})
(contains? infix-operators (name expr))
returns false for some symbol =
but if I add a manual clause like:
(or (contains? infix-operators (name expr))
(= "=" (name expr)))
it does return true. Does this ring a bell perhaps thheller? (I haven't pinged you, to not wake you up during your evening, but perhaps you'll see this tomorrow).no clue. given that this is all strings I don't see how munging plays a role here. don't know what expr
is in this context. did you try printing infix-operators
just to verify it is what you think it is? not sure how the above would construct something incorrect but I don't know which context you are doing all this in 😛
I just tried it:
:infix-ops! #{">>" "&&" "!=" "=" "*" "%" "<=" "-=" "|" "/" "-" ">>>" "===" "not=" "!==" ">=" "&" "<" "<<" "+=" "instanceof" "<<<" "||" "==" "+" ">"}
I do notice that the hashes differ of those strings:
(prn :hash1 (hash (name expr)))
(prn :hash2 (hash (name '=)))
:hash1 2042120020
:hash2 -516731966
oh no sorry, they are both the same, I was looking at the result of unequal symbols.
:hash1 = -516731966
:hash2 = -516731966