This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-11-19
Channels
- # announcements (5)
- # beginners (68)
- # boot (1)
- # cider (27)
- # clara (11)
- # cljdoc (10)
- # clojure (129)
- # clojure-europe (2)
- # clojure-italy (16)
- # clojure-nl (15)
- # clojure-spec (74)
- # clojure-uk (31)
- # clojurescript (62)
- # core-async (17)
- # cursive (28)
- # datomic (22)
- # duct (29)
- # emacs (10)
- # fulcro (65)
- # hoplon (2)
- # hyperfiddle (16)
- # instaparse (3)
- # kaocha (2)
- # lein-figwheel (3)
- # leiningen (1)
- # mount (1)
- # nrepl (21)
- # off-topic (23)
- # re-frame (59)
- # reitit (18)
- # ring-swagger (2)
- # shadow-cljs (2)
- # spacemacs (16)
- # timbre (2)
- # tools-deps (22)
Besides shelling out $800 for an mac mini, is there anyway to debug cljs running on safari on ipad ?
I haven’t used it yet but I’m curious to see how Browsertack might help with this kind of thing.
if I recall that was the whole point of getting Apple's WebKit building on Windows/Linux
Hi there. I'm wondering is it ok to ask newbie questions here, in slack channel, or there is a better place for such questions?
newbie questions are fine here, there is a #beginners channel for generic Clojure questions as those often apply to ClojureScript
@todo hrm maybe things have drifted since I last checked - it might be running OS X really is the only reliable way now
Is there a good example of setting up consistent testing between cljs and clj? I’m working on a library that’s based on work that’s a mixture of clj+cljs and I’d prefer to do as much as possible with code written in cljc, but setting up any kind of testing has been really frustrating. Currently a lot of it is hand testing in the repl, but that seems rather inadequate…
@folcon I’ve been doing this with speculative a lot. I’m not sure how much of it is similar to your use case.
@U04V15CAJ Do you have a link?
I meant, I wrote a lot of tests for clj + cljs in cljc in that lib. Maybe the examples are useful to you
Thanks, regarding examples, you mean this, or something else? https://github.com/slipset/speculative/blob/master/doc/test.md
e.g.: https://github.com/slipset/speculative/blob/master/test/speculative/core_test.cljc
is it possible to create an atom in one CLJS build and call add-watch
on it in another, separate CLJS build? my initial attempt seems to suggest “no”. I have api.cljs
with (defn ^:export watch [atom])
, and then in another file, I basically do (js/my_first_build.api.watch (atom {}))
this is throwing me an error, but I’m hoping I’m just holding it wrong, and that this is somehow possible
@christian767 no you should never load 2 different CLJS builds on the same page. they will not be compatible with each other (especially after :advanced
compilation)
@christian767 you can't have multiple builds as @thheller said
I’m curious: is this something that is inherently “impossible” to achieve, or has it just never been an issue?
it is not impossible just completely undesirable. both versions would load their own version of cljs.core
+ all the supporting libs
so just combining both builds into one (using :modules
maybe) will just be a better result overall
@christian767 effectively impossible yes
if we didn't do that you get a bunch of other undesirable properties - damaged REPL dev, incompatible instances, etc.
I was looking into developing a chrome devtools extension in cljs, and pass data to it from a cljs-app in the browser
@christian767 I was there: https://github.com/binaryage/dirac/blob/master/src/background/dirac/background/helpers.cljs#L151-L154
you must send serialized data for that anways as the extension runs in a different context. use transit
to transfer the data.
btw. I found channels pretty useful in that context, I have a channel on either side and small glue code which takes from one, serializes, calls other side, which deserialializes and puts on the other channel
when a cljs function is operating on a native JS object, is there any way to type hint what that is for IDEs like cursive..?
I'm working with the cljs-ajax library and a GET call to a back-end service that returns a document as a stream. In the header it returns the type of document, application/pdf, image/jpeg, etc.
In the GET call I can get the stream using: :read protocol/-body
or I can get the headers with :read protocol/-get-all-headers
, but I can't figure out how to get BOTH the headers and the stream in one call.
@joseph.hance? From the last time I was looking at cljs-ajax
I remember that :read
just called the function passed. So why not just pass a function that calls those two and perhaps returns a map or vector?
Hello all, how do I use js like this?
<Image
style={{
flex: 1,
alignSelf: 'stretch',
width: undefined,
height: undefined
}}
source={require('../../assets/images/onboarding-how-it-works.png')}
/>
-> undefined
?@folcon I switched to r0man's cljs-http library instead and that made this a lot easier. I suspect there is a way to do it with the cljs-ajax library but I couldn't figure it out.
Hey! I have implemented a simple library, consisting of one .cljs file, and a dependency on an npm package. I’m developing it with an additional ns for the “application code” with deps.edn
and figwheel-main. How would I go about packaging that up into a jar? Can I avoid using additional build tools such as cljs-build, shadow-cljs or leiningen?
@grav for the library itself you don't need to build anything but depending on how you load the npm module additional work needs to be done by the consumer of said library
shadow-cljs is currently the only option that does this automatically. others need additional setup
@dazld There isn’t right now (for Cursive, at least) but I’m thinking about some options.
@grav there some newer built-in support for that stuff, including for the two types of modules you're likely to run into from npm (CommonJS or ES modules) https://clojurescript.org/guides/javascript-modules#javascript-modules