This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2015-12-19
Channels
- # admin-announcements (27)
- # beginners (12)
- # boot (168)
- # cider (4)
- # clojure (27)
- # clojure-art (3)
- # clojure-austria (1)
- # clojure-russia (10)
- # clojurescript (50)
- # datomic (10)
- # editors (2)
- # hoplon (51)
- # ldnclj (26)
- # liberator (1)
- # off-topic (7)
- # om (23)
- # parinfer (6)
- # proton (7)
- # reagent (17)
- # yada (1)
is organizing closurescript namescapes like this idiomatic? https://github.com/madvas/fractalify/blob/081fcc12081e978a3b183f5f5d9ea2d71204225f/src/cljs/fractalify/main/view.cljs#L4-L8
the function we want to use here is fractalify.components.dialog/dialog
the naming is too long.
is there a way to reduce it to fractalify.components/dialog
but keep the dialog
function in its own file?
I cannot reproduce https://github.com/clojure/clojurescript/wiki/Dependencies#bundling-foreign-javascript-code with Clojurescript version 1.7.170. Is it still valid?
@mike: You can use :refer
to require specific vars: [fractalify.components.dialog :refer [dialog]]
@mike: well, I'm not sure how idiomatic it is, but I do name things like that - I want to have things in separate namespaces, but don't want to refer to long names, so I use :as
to alias the namespace.
It might be slightly verbose, but it's just an import you do once (and your editor/IDE might also be able to do them for you)
@mike: No, see http://clojurescriptmadeeasy.com/blog/when-do-i-use-require-vs-import.html.
@jindrichm: yes it works
@dnolen: I followed the Quick start and the mentioned documentation of 'Bundling "Foreign" JavaScript Code', but when I launch browser REPL and run (require '[yq])
, then it cannot be found: clojure.lang.ExceptionInfo: No such namespace: yq, could not locate yq.cljs, yq.cljc, or Closure namespace "yq" {:tag :cljs/analysis-error}
@jindrichm: I cannot help you with your specific problem
@jindrichm: compiler options are always provided in the same way
@jindrichm: the exception is trying to give you more information
@jindrichm: also you said “browser REPL"
so you will need to duplicate whatever compiler options you are using when constructing the REPL
@dnolen: Do I need to provide the :foreign-libs
option to cljs.repl/repl
too? (Ah, you just answered that...)
@dnolen: How do I pass compiler options to cljs.repl/repl
? (doc cljs.repl/repl)
is empty.
@jindrichm: this is implied in the Quick Start
Do you have to place externs file on the class path (or :source-paths
if using cljsbuild)?
I can't seem to evaluate let
bindings inside of a #js {}
expression... is this expected behaviour?
I get a compiler warning
WARNING: Use of undeclared Var sme.handlers/message at line 16 src/sme/handlers.cljs
This is the code:
(go
(let [status (<! ch)
message (case status
:up-to-date "Up to date."
:updated "Updated.")
response #js {"message" message}] ;; line 16
(js/console.log message) ;; line 17
(.json res response)))
@pat: how would you use it here? I'm not quite sure what it does, after reading the docs
My brain is mushy so may be wrong, but i think core async has idioma for doing case like stuff
Dirac is shaping up nicely, see the “Scope” panel: https://dl.dropboxusercontent.com/u/559047/dirac-source-panel-enhancements.png https://github.com/binaryage/dirac#features
right now, it is just extracting a nice prefix and adding an index number, but for eval’ing cljs in the context of debugger I want to have some nice solution, so that you can mention variable names you see in the scope panel and they would reference real generated names
I think there will be clash with active repl namespace anyways, while in debugger, local names have to be referenced as js/name from cljs
@darwin: dirac looks great 👍