This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-08-09
Channels
- # admin-announcements (5)
- # architecture (8)
- # beginners (7)
- # boot (41)
- # braveandtrue (1)
- # cider (77)
- # clara (3)
- # cljs-dev (56)
- # cljsjs (7)
- # cljsrn (7)
- # clojure (44)
- # clojure-austin (3)
- # clojure-brasil (1)
- # clojure-hk (3)
- # clojure-russia (137)
- # clojure-spec (14)
- # clojure-uk (44)
- # clojurescript (33)
- # cloverage (3)
- # core-async (10)
- # css (1)
- # cursive (16)
- # datomic (116)
- # devcards (14)
- # emacs (1)
- # events (1)
- # funcool (2)
- # functionalprogramming (1)
- # hammock-driven-dev (1)
- # jobs-rus (124)
- # lein-figwheel (1)
- # leiningen (1)
- # liberator (4)
- # melbourne (3)
- # mount (73)
- # off-topic (3)
- # om (4)
- # om-next (15)
- # onyx (38)
- # other-languages (4)
- # perun (2)
- # proton (36)
- # protorepl (2)
- # random (1)
- # re-frame (56)
- # reagent (7)
- # specter (4)
- # testing (1)
- # untangled (13)
- # yada (18)
https://github.com/clojure/clojurescript/blob/master/src/main/cljs/cljs/js.cljs#L439
wondering if there’s a typo in that line
reloads reloads
-> reload reloads
@anmonteiro: hrm probably but I defer to @mfikes
@dnolen: should we hard error in CLJS or behave like Clojure in the following example?
boot.user=> (require '[clojure.set :rename {intersection foo}])
nil
boot.user=> (foo #{1 2} #{2 3})
clojure.lang.Compiler$CompilerException: java.lang.RuntimeException: Unable to resolve symbol: foo in this context, compiling:(/var/folders/d_/b1bghypn20lgq2b24v7396pr0000gn/T/boot.user50214679673122449.clj:1:1)
java.lang.RuntimeException: Unable to resolve symbol: foo in this context
case is rename a symbol that we don’t refer
seems like it's a no-op in Clojure
I’m leaning towards mimicking Clojure: if symbol is not referred, don’t rename. but don’t hard error
@anmonteiro: Seems like reloads reloads
is a fairly cut-n-dry typo—vintage 1 year. To be sure I built and ran all of Planck’s tests with the typo fixed and they pass.
@mfikes: sorry I don’t know what that means, not a native English speaker 🙂
does it mean innocuous?
Oh. “cut-n-dry” means… fairly easy to see that it is the case without much deep investigation.
yeah, that’s why it jumped to sight
But, yes, the typo is also innocuous in that it involves a truthy value that likely doesn’t have very bad consequences apart from perhaps reloading when not needed, I’d guess.
My take on your :rename
example, is that high-fidelity with Clojure is inherently good.
agreed
@anmonteiro: ns form problems are usually hard errors already
@dnolen: right, but shouldn’t we mirror Clojure in this particular case?
IMHO, it’s not wrong to (require '[clojure.set :rename {intersection foo}])
makes sense to be a NOP
@dnolen: gotcha, hard error it is then. Patch will be ready after this little change
@dnolen: just attached a new patch to http://dev.clojure.org/jira/browse/CLJS-1508
does this approach look better?
used the suggested keys :rename
and rename-macros
to store renames
@anmonteiro: it does look better, it does seem though we might want to think about macro inference here as well? (or does this patch already handle that?)
@dnolen: already handled
for JVM & Bootstrap 🙂
tests for each too
@dnolen: OK I’ll assign it to you then, thanks!
landed support for :rename
thanks to @anmonteiro https://github.com/clojure/clojurescript/commit/d388905d67d107e2afbc4d5d4be9f7f935063177
awesome!
@mfikes: appreciate you giving it a spin too in bootstrap. I think I covered it there but I'm not too familiar with cljs.js
@anmonteiro: Absolutely. Thanks for sorting through that feature!
It was a fun one
also added a new compiler option for newcomers, :browser-repl true
it’s mostly there to make the Quick Start simpler
@dnolen: what’s your opinion on this one? http://dev.clojure.org/jira/browse/CLJS-1474
I discussed it briefly with @mfikes about putting that under a flag so that e.g. spec can define def
I think the problem arised with bootstrap
@anmonteiro: not excited about a flag for this
I didn’t mean a compiler option
I agree. Just asking because of the feedback I got
maybe worth holding off on this one for a while
just today unaware of it, I got burnt by something similar 😉
wanted to name my macro set!
and use it in cljs code, it was puzzling why refer-macros
was ignoring me...
https://github.com/binaryage/cljs-zones/blob/master/src/lib/zones/core.clj#L119
@anmonteiro: The :rename
feature is working great for me downstream in Planck. Awesome! (I’ve updated Planck master to build with ClojureScript master.)
@mfikes: great news
Thanks for taking it for a spin so promptly :-)