This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-12-08
Channels
- # adventofcode (31)
- # beginners (97)
- # bigdata (2)
- # boot (276)
- # cider (17)
- # cljsrn (5)
- # clojure (150)
- # clojure-china (3)
- # clojure-conj (8)
- # clojure-greece (1)
- # clojure-india (1)
- # clojure-korea (1)
- # clojure-new-zealand (4)
- # clojure-russia (40)
- # clojure-spec (119)
- # clojure-uk (116)
- # clojurescript (87)
- # code-reviews (110)
- # core-async (4)
- # cursive (11)
- # datomic (26)
- # garden (4)
- # gorilla (7)
- # hoplon (82)
- # humor (1)
- # jobs (2)
- # jobs-discuss (10)
- # luminus (17)
- # onyx (60)
- # planck (2)
- # play-clj (2)
- # protorepl (70)
- # re-frame (121)
- # reagent (7)
- # ring-swagger (3)
- # rum (16)
- # test-check (16)
- # untangled (12)
- # yada (20)
how come (.toString (domi/text (x/xpath g “//title”)))
works but not (.toString (domi/text (x/xpath g “//script”)))
?
where domi is domina
and x is domina.xpath
What's the best way to benchmark some ClojureScript code?
Is there something like Criterium but for cljs?
There is a port of Criterium somewhere
@aengelberg there's also cljs.core/simple-benchmark
for more simplistic use cases
thanks yall
Doing some testing on the browser. Is there any way to pipe the output of (run-all-tests #”some-test-file-regex”)
to the repl?
I try add arguments (clj->js {…} )
to dateRangePicker function,but it’s not work , why ?
@stevechan try it without reagent first, then add the reagent/react magic
besiders why not use a datepicker intended for react? jquery plugins are likely to result in problems with react's dominance over the dom
another question if I may... Need sth like this (justified gallery thumbnails) http://miromannino.github.io/Justified-Gallery/
you’ll have to look around, but if you’re doing something that specific, might want to just stick with that jQuery plugin
Uncaught TypeError: (intermediate value)(intermediate value)(...).vh is not a function
@stevechan you need externs if you’re using 3rd party libraries that you didn’t get from CLJSJS (and even then you might since the externs might not be right)
@stevechan perhaps you want to grab its externs though, if the API hasn't changed: https://github.com/cljsjs/packages/blob/master/jquery-daterange-picker/resources/cljsjs/common/jquery-daterange-picker.ext.js
also consider submitting an updated version, I'm sure it would benefit everyone else using that package!
@dnolen , @anmonteiro I don’t konw how to write externs.js, my “src/externs/externs.js” is:
I linked the CLJSJS externs for the daterangepicker
package above
@stevechan FWIW there's an externs guide in the CLJSJS wiki: https://github.com/cljsjs/packages/wiki/Creating-Externs
thanks,I konwed , but i try failure , @anmonteiro
If i write externs.js like above, the cljs will skip all daterangepicker setting to compile .
@stevechan it’s probably simpler to just use jQuery from CLJSJS then you don’t need all that
@stevechan jQuery is a separate thing
@stevechan you're using a jQuery plugin. We have been assuming you already have jQuery on the page. Is that not the case?
then you need to make sure you also have externs for jQuery
I'm afraid I don't understand what you mean
@stevechan oh so you’re loading onto a page that has jQuery on it?
what I'm saying is: if you want to compile ClojureScript with advanced optimizations, you need to provide externs for jQuery
@anmonteiro but if the page already has jQuery then he’ll just want the externs
yes, it's all I'm saying
@stevechan which version of jQuery?
picking the 1.9 externs from the link David pasted should work
the “externs/jquery-1.9.js”
is form https://github.com/google/closure-compiler/blob/master/contrib/externs/jquery-1.9.js
@stevechan I suggest you compile with :pseudo-names true
to track down the issue in a stacktrace that preserves the original names
Thanks @dnolen , @anmonteiro 👍 👍 👍