This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-08-13
Channels
- # aws (5)
- # bangalore-clj (2)
- # beginners (74)
- # boot (2)
- # cider (12)
- # cljs-dev (5)
- # cljsjs (2)
- # cljsrn (7)
- # clojure (41)
- # clojure-boston (4)
- # clojure-brasil (3)
- # clojure-russia (12)
- # clojurescript (73)
- # cloverage (35)
- # datomic (7)
- # euroclojure (1)
- # hoplon (34)
- # immutant (1)
- # luminus (9)
- # onyx (7)
- # overtone (3)
- # parinfer (1)
- # proton (2)
- # re-frame (3)
- # reagent (5)
- # spacemacs (5)
- # testing (2)
- # untangled (3)
- # yada (3)
are there any community groups focused on cljs on node in the clojurians slack community?
Could ClojureScript ever support destructuring JavaScript objects? I can't help but think that I'd like to write:
(fn on-mouse-down [{:keys [client-x client-y]}]
(prn client-x client-y))
instead of the interop equivalent... does it make sense to want this?@timothypratley: if you really want it, you could write your own macro to do it. This is just a quick hack: https://gist.github.com/miikka/ed0106b8b8a99a710cd2dd65e02b0b34
Is there a way to minify cljsbuild even further? I got optimizations :advanced
and :pretty-print false
and still getting 800kb in total for a OM hello world example
Not sure how big the impact is but you can set goog.DEBUG to false via :closure-defines
@bur: also do gzip, usually that helps a lot
goog.DEBUG had a massive impact on our bundle size
as in -30% or so
gzipping is essential of course
add :closure-defines {'goog.DEBUG false}
to your cljs compiler options
as for gzip, teach your web server to gzip static resources, serve through a cdn, or use a gzipping ring middleware if you're using jetty etc
Hi guys! I have a question about cljs code as artifact. Let鈥檚 say I have react native app with cljs and I have parser in a different namespace. I want to move it in artifact and use from my react-native app and probably from os x app with javascript core. Is it possible?
@bur: probably also worth adding :elide-asserts true
Should save you a bit more
thanks @anmonteiro but i can't try that out because unfortunately my clojure application won't start and i cannot debug it
hrm, I meant :elide-asserts
is a CLJS compiler option
Hey - basic question re spec: Using latest clojurescript 1.9.198 and having read http://blog.fikesfarm.com/index.html I'm :require'ing [clojure.spec :as s] as described, but s/and still giving me a compile error - anything obvious I should check?
@pauldelany: probably a bug. I think I鈥檓 currently working on a patch to fix just that
could you see if that issue resonates with you?
@anmonteiro: thanks - unsure: my error is somewhat different but can't confirm not the same issue. Error I have is: clojure.lang.ExceptionInfo : failed compiling file:src/cljs/dailrecord/handlers.cljs clojure.lang.ExceptionInfo : nth not supported on this type: Symbol at line 10 src/cljs/dailrecord/handlers.cljs java.lang.UnsupportedOperationException : nth not supported on this type: Symbol Error on file src/cljs/dailrecord/handlers.cljs, line 10, column 1
caused by minimal case (from spec tutorial docs): (s/def ::big-even (s/and int? even? #(> % 1000)))
doesn鈥檛 sound related, no
I think my problem is something quite basic I'm overlooking - just getting into cljs and spec.
@pauldelany: going to need more information (s/def ::big-even (s/and int? even? #(> % 1000)))
works fine for me
@miikka ooo nice, thank you
@anmonteiro: did not help. still at 780kb for basic om hello world cljs 馃槶馃槶
@dnolen: - got to the bottom of it - my spec def was nested in a clairvoyant.core macro - moving the definition outside resolved.
@bur: have you got a specific target for when you host your finished app?
Sorry, I meant like heroku or another hosting service, or your own server running particular website hosting software.
https://blooming-sands-22561.herokuapp.com/ this is the app currently hosted on heroku
There should be something available to fit into your deployment steps - I think it's much more related to that then anything on the cljs side. I don't usually worry about it at all until I start having particular deployment and hosting needs, but if you know those up front that might help. If it's just a toy or learning app it really doesn't matter imo.
but I want to see what the impact of a sample cljs application will be in terms of size that needs to be transfered to the client
@bur: you should be able to just manually gzip your app then and not worry about middleware or anything else like that.
trying to debug this error now:
WARNING: uuid? already refers to: cljs.core/uuid? being replaced by: cognitect.transit/uuid? at line 342 resources/public/js/out/cognitect/transit.cljs
WARNING: ident? already refers to: cljs.core/ident? being replaced by: om.util/ident? at line 19 resources/public/js/out/om/util.cljc
my dependencies
[org.clojure/clojure "1.8.0"]
[compojure "1.5.1"]
[http-kit "2.2.0"]
[environ "1.1.0"]
[com.taoensso/carmine "2.14.0"]
[ring/ring-core "1.5.0"]
[ring/ring-devel "1.5.0"]
[ring/ring-jetty-adapter "1.5.0"]
[org.clojure/clojurescript "1.9.198"]
[org.omcljs/om "1.0.0-alpha34"]
I don鈥檛 think that鈥檚 an error, I鈥檝e been getting messages like that all day with everything working perfectly.
Is that the cause of the failure though?