This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-04-20
Channels
- # beginners (35)
- # boot (81)
- # braveandtrue (7)
- # cider (74)
- # cljs-dev (52)
- # cljsrn (5)
- # clojure (114)
- # clojure-austin (1)
- # clojure-belgium (3)
- # clojure-brasil (8)
- # clojure-czech (7)
- # clojure-greece (18)
- # clojure-ireland (1)
- # clojure-russia (67)
- # clojure-uk (11)
- # clojurescript (52)
- # core-async (5)
- # core-matrix (3)
- # cursive (13)
- # data-science (3)
- # datomic (8)
- # emacs (80)
- # events (2)
- # hoplon (8)
- # immutant (7)
- # jobs-discuss (3)
- # juxt (25)
- # ldnproclodo (21)
- # leiningen (27)
- # mount (24)
- # off-topic (6)
- # om (23)
- # onyx (48)
- # parinfer (1)
- # proton (4)
- # re-frame (41)
- # reagent (9)
- # spacemacs (8)
- # untangled (122)
@dnolen: Hello David, would you accept a patch that makes (.for js/Symbol "react.element")
printable in ClojureScript? At the moment this raises the follwoing exception: #object[TypeError TypeError: Cannot convert a Symbol value to a string]
React uses (.for js/Symbol "react.element")
in it's nodes. They have a $$typeof
property on their node that is an instance of js/Symbol.
FWIW, I’ve seen this too. React Symbols can’t be printed with println
. js/console.log
works fine (as expected)
@dnolen: goog/typeOf
returns “symbol”
extending the js/Symbol with the printer protocol didn't work for me, so I tried hooking into pr-writer-impl
yeah I have no idea - I would look around to see what people might be doing in JS land around Symbol shims
@dnolen: Could you give any hints on where to look at for http://dev.clojure.org/jira/browse/CLJS-1620 ?
I’d like to invest into this issue, but can not figure out where to start.
@roman01la: look at the munging stuff in compiler.cljc, you’ll see that it uses a js-reserved set
the compiler binds all the compiler options to a dynamic var - this is what you may need to check in cljs.compiler/munge
if threading the options through is too invasive
ok, thanks!
http://dev.clojure.org/jira/browse/CLJS-1626 (cljs.test for bootstrap) is now working. A gist showing running the compiler tests the normal way and via bootstrapped ClojureScript in Node: https://gist.github.com/mfikes/b0f28f2bd6442e79d072d30baf68a6a9
Looking for some feedback on http://dev.clojure.org/jira/browse/CLJS-1628
@dnolen: http://dev.clojure.org/jira/browse/CLJS-1626 (cljs.test for bootstrap) would involve changing a couple files from .clj
to .cljc
. Is your preference to have the renames done first? (To make it easier to see the subsequent diffs.) (I don’t mind either way, just want to do what’s easiest for review in the end.)
OK, a candidate patch for http://dev.clojure.org/jira/browse/CLJS-1626 is in the ticket. Pretty exciting change If you are into bootstrap, please give this one a spin to see if it works for you.
@dnolen: I was also looking at the patch, I think that the check for “function” is against the constructor
while the check for “symbol” against the instance
I’m just left wondering if for strings using identical?
or =
is interchangeable
@anmonteiro: ah k, still @r0man seems undesirable from shim perspective unless you’ve confirmed shims do the right thing with goog.typeOf