This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2015-12-03
Channels
- # admin-announcements (8)
- # beginners (99)
- # boot (60)
- # cider (44)
- # cljs-dev (47)
- # cljsrn (68)
- # clojure (223)
- # clojure-art (1)
- # clojure-russia (190)
- # clojure-sg (9)
- # clojure-uk (2)
- # clojurecup (1)
- # clojurescript (59)
- # clojurex (3)
- # core-async (43)
- # core-typed (2)
- # cursive (18)
- # datavis (7)
- # datomic (16)
- # events (2)
- # funcool (3)
- # hoplon (3)
- # jobs (1)
- # lein-figwheel (10)
- # leiningen (6)
- # off-topic (1)
- # om (123)
- # onyx (57)
- # parinfer (16)
- # portland-or (2)
- # random (1)
- # re-frame (4)
- # reagent (7)
- # remote-jobs (1)
- # spacemacs (12)
Random development thought: it would be great to have a .cljc
target for :nodejs
Does anyone know what version of Google Closure ships with CLJS? Specifically, I'm looking to use goog.functions.debounce
(http://tinyurl.com/olmtmc3) and it's not being included in the compiled CLJS output
@chrisoakman: does that help? https://github.com/clojure/clojurescript/blob/master/project.clj#L14
@chrisoakman: also in the standard doc https://github.com/cljsinfo/cljs-api-docs/blob/catalog/INDEX.md
thanks @jaen - I guess that function just isn't present in that version of GClosure
@chrisoakman: we bundled Google Closure library on 10/16/2015, so latest releases should have that fn, it did when I checked at the REPL
thanks David
@mahinshaw: I’ll check that error, thanks.
In case you see more errors on JS Bin, you can report theme here https://github.com/roman01la/jsbin-cljs
@dnolen: @jstew yes, but for Firefox and Safari they are broken. Officially 😞 My Laptop is too slow for Chrome so I'm looking for alternatives.
That's a bummer. This is clojure, not clojurescript, but these work: https://github.com/functional-koans/clojure-koans Just clone the repo and lein koan run
There are subtle differences but I'm not sure that the koans go any further than the basics, so you may not run into any differences between clojure and clojurescript.
@jstew - are the clojure-koans same as http://www.4clojure.com/ ?
is there a way to get a namespace interns at runtime in cljs
? ns-interns
is a macro, ns-interns*
does not return meta: https://gist.github.com/tolitius/c17b2d4a98eabb591926 , this is not (yet?) ported to cljc: https://github.com/clojure/clojurescript/blob/master/src/main/clojure/cljs/analyzer/api.clj#L169
@dnolen: thank you. I thought maybe I would be able to eval
it with "cljs on cljs" evolution, but I understand, have not thought about advanced optimization. is there a way to get all vars regardless the namespace?
@tolitius: I can indeed do (-> ((ns-interns 'cljs.user) 'foo) meta)
successfully using bootstrapped ClojureScript, but this means no :advanced
@dnolen: thank you. @mfikes: thank you. yes, bootstrapped
was my next thought. although I understand :advanced
is out. I'd still like to dig in to it, to understand it a little better. in your gist, you are doing it within repl, which re evals the ns-interns
macro, i.e. same as: https://gist.github.com/tolitius/c17b2d4a98eabb591926#file-ns-interns-repl-cljs-L5, but you think it is also possible with "cljs on cljs"? I could not get to to eval with: https://github.com/swannodette/cljs-bootstrap (i.e. at runtime)
@tolitius: to be clear dropping :advanced
means you are OK with 300K gzipped artifact at a minimum. If that’s not a problem for your app - go for it.
@dnolen: after you mentioned :advanced
, I understand ns
this is not the way to solve it. but since I already spent some time on solving these puzzles, I'd like to just see it through
@tolitius: Yes, that was at a REPL, but it is essentially like taking the string I typed in, reading it into a form, and then calling cljs.js/eval
on that form.
@mfikes: I might be just at the beginning of my journey, but reading it into a form
was where I had to stop and think, since env/*compiler*
, where the analyzer gets a namespace, is not there at runtime
@tolitius: Welcome to the deep end, my friend Read this namespace: https://github.com/clojure/clojurescript/blob/master/src/main/cljs/cljs/js.cljs
@mfikes: ah.. great, thanks. reading it. where would this suppose to come from: https://github.com/clojure/clojurescript/blob/master/src/main/cljs/cljs/js.cljs#L769 (somewhere from cljs.compiler
)?
@tolitius You start with https://github.com/clojure/clojurescript/blob/master/src/main/cljs/cljs/js.cljs#L103
yep, I see the guy being bound: https://github.com/clojure/clojurescript/blob/master/src/main/cljs/cljs/js.cljs#L697
@tolitius: FWIW, Replumb is probably a fairly “clean” codebase implementing REPL functionality on top of cljs.js
, and is probably a good example of how some of the constructs are used. https://github.com/ScalaConsultants/replumb
I know you are not implementing a REPL, but it at least illustrates the concepts at play.
@tolitius: Cool. Feel free to ask questions. While, bootstrap is pretty new, lots of client codebases are successfully using it in pretty sophisticated ways at this point—pretty flawlessly
Hell all, a question: is cljs.test/function? valid in a deftest? I must be doing some dumb thing i cannot see it in my test namespace...
@dnolen oh that's why thanks, I really did not know