This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-11-24
Channels
- # arachne (1)
- # bangalore-clj (11)
- # beginners (177)
- # boot (63)
- # business (1)
- # cljsjs (21)
- # cljsrn (3)
- # clojars (4)
- # clojure (116)
- # clojure-art (4)
- # clojure-belgium (3)
- # clojure-india (1)
- # clojure-italy (6)
- # clojure-russia (14)
- # clojure-spec (8)
- # clojure-uk (67)
- # clojurescript (51)
- # community-development (5)
- # cursive (13)
- # datascript (14)
- # datomic (29)
- # devcards (3)
- # emacs (3)
- # events (3)
- # funcool (4)
- # hoplon (29)
- # mount (6)
- # om (34)
- # om-next (5)
- # onyx (16)
- # perun (8)
- # planck (22)
- # re-frame (13)
- # reagent (5)
- # ring-swagger (21)
- # rum (3)
- # spacemacs (3)
- # specter (1)
- # untangled (39)
Can anyone gives me the simplest approach to cache busting for a cljs reagent app? Is this library the answer? https://github.com/burhanloey/cljs-simple-cache-buster, our index.html (where the app hooks onto) is created by hiccup so not sure how that would interact with this lib. Thanks in advance 馃檪
@mbutler i've used https://github.com/pointslope/boot-fingerprint in the past - https://github.com/AdamFrey/boot-asset-fingerprint seems pretty much the same but more current
@mbutler With Hiccup, by far the simplest way is to just append hash in the Hiccup code: (page/include-js (str "js/main.js?v=" (hash/memo-resource-hash "js/main.js")))
where memo-resource-hash
reads the resource from classpath and calculates hash using commons codec
No reason to use a build tool for this
Here is the implementation for resource-hash
: https://github.com/metosin/metosin-common/blob/master/src/clj/metosin/ring/util/hash.clj
@juhoteperi Thanks, I鈥檒l take a look
Hi, does anyone have a favorite library for making html canvas animations? I've been looking at https://github.com/rm-hull/monet and https://github.com/quil/quil
anyone ever used d3 v4
with c3js
?
i鈥檓 having trouble with the externs, pretty much
the current cljsjs
is v4. but, c3js
depends on v3
i鈥檝e tried manually adding a generate v3
extern, but it did not work
@curlyfry I've used monet a little, it's not bad, kinda limited. Quil is nice is you're already familiar with Processing. You might want to check out the libraries at http://thi.ng
@deas without any more information: yes
@anmonteiro Don't want to bug you guys with the details. Just wondering if that could be normal.
well you didn't say what optimization level you're compiling with, how many dependencies / namespaces
so all I can say is yes, I've seen builds take longer
@deas just passing through, but if ClojureScript builds are taking a while have a look at https://github.com/clojure/clojurescript/wiki/Compiler-Options#parallel-build. It made a significant difference to my build time
@anmonteiro Quite a lot of deps. Resulting file is 2780k.
right, maybe :parallel-build
can help, but I'd say that's not where you're spending most time
if it's advanced compilation, you'll be spending the most time in the Closure Compiler pass
the next version of ClojureScript will include more detailed information about how much time it's spent compiling each namespace. cf: https://github.com/clojure/clojurescript/commit/6602f769ed4d52fd67577aacaf9cfe6db05b8ef3
Already got parallel-build true
set. Again thanks. Just wanted to make sure it is normal. 馃檪
@deas btw if you're looking to shave some KBs off your build there's probably more you can do
namely, setting :elide-asserts true
and using a closure-define to set goog.DEBUG
to false
(if you're not doing it already)
@anmonteiro had goog.DEBUG
,trying timing stats and :elide-asserts
.
@rauh probably not, as it returns a function
but I don't think it matters in practice
probably each generated function arity should be hinted instead, but I'm not sure
I get: terms[0]=foo&terms[1]=bar
, but this is not something compojure-api understands
@borkdude which style to you expect?
@mikebelanger Thanks!
you may be able to do that by passing [["terms" "foo"] ["terms "bar"]] instead of a map
always a good choice
GET only begets pain
Weird question. Does anyone know of a library to do selmer-style templating for serving static content compiled with CLJS as a frontend-only SPA? I'm thinking of McGyvering something together involving selmer + hickory in a macro to grab json data and templates & spit out hiccup at the compilation stage, to pass to reagent or something. But if someone else has already written a library to do that kind of stunt less ridiculously... :-)
hearing no answers, the mcgyvering proceeds apace. 馃檪 https://github.com/paultopia/jsonmacrodemo
Can anyone think of any reason that this is a stupid thing to do, for static content? my intuition is that it would just make static pages serve blazingly fast...
@borkdude you can fix the very weird behavior of cljs ajax by adding this the option: :interceptors [(ajax/ProcessGet. ajax/params-to-str-alt)]
where the ajax import is [ajax.core :as ajax]
This would make it: terms[]=foo&terms[]=bar