This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-06-03
Channels
- # admin-announcements (2)
- # alda (4)
- # beginners (15)
- # boot (89)
- # cljs-dev (88)
- # cljsrn (75)
- # clojure (149)
- # clojure-belgium (16)
- # clojure-france (2)
- # clojure-greece (6)
- # clojure-russia (108)
- # clojure-spec (39)
- # clojure-taiwan (3)
- # clojure-uk (7)
- # clojurescript (70)
- # css (3)
- # cursive (17)
- # data-science (2)
- # datascript (7)
- # datomic (41)
- # dirac (3)
- # hoplon (12)
- # instaparse (1)
- # juxt (3)
- # lambdaisland (9)
- # mount (4)
- # off-topic (6)
- # om (71)
- # om-next (4)
- # onyx (22)
- # other-languages (56)
- # perun (15)
- # proton (6)
- # re-frame (32)
- # reagent (42)
- # specter (34)
- # spirituality-ethics (7)
- # tmp-json-parsing (5)
- # untangled (13)
- # vim (4)
- # yada (6)
@pat: where result
is bound to…? I thought you might have meant, as a callback inside cljs.eval(…
but that’s not it
Ought I use Clojure 1.9.x with ClojureScript "1.9.14"? I remember reading somewhere that the cljs major.minor versions ought to match Clojure's?
hi. has anyone shipped an npm module in cljs here? I have some cljs code I would like to use from other javascript libs (browser or node). My concern is primarily the cljs overhead.
I have trouble understanding how I would use Secretary to hook routing to a SPA. Does anyone have a good example?
i have looked at https://github.com/ptaoussanis/tower & https://github.com/ptaoussanis/tower, still have no idea
(or (first (.-languages js/window.navigator) (.-language js/window.navigator))
in favore IE, Safari etc
I'm struggling with aws lambda using cljs (trying to learn the ins and outs, so avoiding the popular frameworks atm). Lambdas are passed a callback function in javascript that I just can't seem to execute. When I print it, it's clearly a function, but when I call it, it's undefined. What would you test to drill in?
@fasiha: you don’t have to use Clojure 1.9, however if you don’t you won't get macro checking support (via clojure.spec)
Is there a reason requires like this don't compile?
(ns foo.bar.abc
(:require [foo.bar
[myns :as m]]))
@javazquez: Use js->clj
, then you can destructure it.
Just include the first arg to require in a vector or remove the vector straight:
(ns foo.bar.abc
(:require [foo.bar]
[myns :as m]))
(ns foo.bar.abc
(:require foo.bar
[myns :as m]))
lol cannot align 😄
@kenny: Thanks, that was the approach I was taking, was making sure I didn't miss an obvious choice 😳
@kennethkalmer: yes it is. every ns that you require must be inside its own vector
i.e. (:require [foo.bar] [other.ns])
instead of (:require [[foo.bar] [other.ns]])
wrong Kenny 🙂
I meant @kenny
@anmonteiro: Look at the example I linked in clojure docs. That works in Clojure. We are using it all over our code base but it does not work in cljs 😞
apologies, I didn’t look at the right example
for medium - larger projects seeing half the time reported by Figwheel to get the prompt
basically if you included transit-clj as a dependency in your project ClojureScript will write out analysis caches as .json instead of edn
Yes, Transit hauls. (An order-of-magnitude “hauls” for the very same use case of loading compiler analysis cache on mobile Replete. Transit effectively saved Replete from being an app that takes half a minute to launch.)
yeah I would have shipped this sooner but I didn’t have a good idea about doing this without requiring Transit as a hard dep or adding more configuration
(This was probably due to using JavaScriptCore’s JSON.parse
rather than edn parsing in ClojureScript.)
so the trick will be just to include transit-clj
?
awesome
We now have 3 such things. Transit, Clojure 1.9, and test.check
which will magically bring goodness simply if there. 🙂
can't wait for figwheel/improved error messages as well, testing the new repl against http://clojurescript.io
Between bumping the cljs version & depending on clj-transit, at least my figwheel compile times went from 11.5 seconds to 2.2 seconds. I can live with this 😄 🙌
@dnolen: yeah, I was just wondering if, for example, I'm using clj v1.8, should I also be using cljs v1.8.XX? is that line still maintained? or should I be on cljs v1.9.XX
right now ClojureScript declares a dependency on 1.8, but you can use 1.9 if you like and you’ll get more leverage out of clojure.spec
the only difference is that people think the naming convention of Clojure matters somehow
So, re-frame question. I just converted some working reagent stuff over to re-frame, and events are handled, components are rendered, etc. I'm using boot's reload task. Before switching to re-frame, everything would smoothly update in the browser page after a save. After, it's no longer working. I have to manually reload the page in the browser to get it to pick up and changes to the CLJS at all. Any ideas for what I've most likely missed?
wrote up some of my own thoughts on clojure.spec http://swannodette.github.io/2016/06/03/tools-for-thought