This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-01-26
Channels
- # aatree (6)
- # admin-announcements (2)
- # aws (1)
- # beginners (46)
- # boot (341)
- # braid-chat (3)
- # cider (20)
- # clara (1)
- # cljs-dev (3)
- # cljsjs (7)
- # cljsrn (73)
- # clojure (63)
- # clojure-art (4)
- # clojure-dev (3)
- # clojure-russia (83)
- # clojurescript (77)
- # core-async (12)
- # core-matrix (2)
- # cursive (9)
- # data-science (1)
- # datomic (14)
- # dirac (3)
- # emacs (9)
- # hoplon (3)
- # immutant (8)
- # ldnclj (80)
- # luminus (13)
- # mount (7)
- # off-topic (4)
- # om (288)
- # onyx (20)
- # overtone (5)
- # pedestal (10)
- # perun (3)
- # proton (103)
- # quil (1)
- # re-frame (3)
- # reagent (13)
- # ring-swagger (7)
- # yada (43)
I've been playing a little with planck these last couple of days, which has been quite fun, but there is one part of the story that I'm not totally comfortable with, and it's the dependency management.
AFAIK you need to use lein unless you want to do dependency management by hand, which means you need to have java installed.
@slipset: if you want to build an app or similar with clojurescript it will be hard to do so without Java and a build tool like Lein or Boot
@euandreh: most clojurescript people build stuff on top of react because it's a good fit for clojurescripts immutable data structures, because of that angular/ember and others are rather uncommon.
@euandreh: still probably there are people that have used cljs and angular, they're just not as many :)
Isn't it geared towards classes and typescript though? Using that with Clojurescript might be somewhat awkward.
@martinklepsch: yes, and I guess building a buildtool in Clojurescript is a Yak too big to shave
I think that's it - https://github.com/purnam/gyr
But I would rather suggest at trying reagent + re-frame + cljs-ajax for example. Or om.next if you're feeling like it's a fit for your needs (it's more complex, but for a good reason tho).
Hi. Is it possible to synchronize AJAX request with core.async
somehow (taking into account <!!
doesn't exist in CLJS)?
Synchronise in what way? You mean make a synchronous AJAX request that returns the value instead of calling a callback?
what’s the best way of handling arbitrary precision numbers between a cljs frontend and a clj backend?
Currently we use bignumber.js on the frontend for some calculations, and I need to pass those in some format to the backend
@grav: my reflex answer would be suggesting transit?
https://gitlab.com/jaen/clj-cljs-presentation/blob/master/src/presentation/common/utils/transit.cljc
But from another project, this looks a bit like this:
(def my-default-formats
[ajax/json-response-format
ajax/edn-response-format
#(ajax/transit-response-format {:handlers transit-utils/transit-read-handlers})
["text/plain" ajax/raw-response-format]
["text/html" ajax/raw-response-format]
ajax/raw-response-format])
(defn api-call [method uri opts]
(let [; ...
format {:format (ajax/transit-request-format {:handlers transit-utils/transit-write-handlers})
:response-format (ajax/detect-response-format {:response-format my-default-formats})}
api-opts (merge opts format)]
(match method
:get (ajax/GET uri api-opts)
:post (ajax/POST uri api-opts))))
OK, I just started playing with cljs and Om this afternoon for the first time, so please bear with me, but can anyone tell me why, in the tutorial I am following, that deleting from the DOM uses a core.async channel, but adding does not..?
Maybe, I don't use om, so I don't know how majority of om users call it. I just called it like that, because previous is a direct antonym of next.
My take on it is because triggering a deletion is done in an another component, but triggering an addition is done in the same component.
So you somehow have to notify this component about the deletion, hence the channel for deletions.
Also, I think there's an #C06DT2YSY channel, people there might have some more in-depth insight, as they are day-to-day users of om.
hi guys anyone using a an angular 2 with cljs? I have searched for a good wrapper found and used this https://github.com/dribnet/acute
I have a problem with ClojureScript Core-Async . This only happens in ClojureScript and not in Clojure. I have the following code:
(defn cc [x]
(go
(println "cc: " x)
x))
(defn foo [x]
(go
(when (and (= :ok (<! (cc x)))
(= :ok (<! (cc :ok))))
(print "after and"))))
(foo 1)
(foo :ok)
When calling (foo :ok)
, the result is as expected - the function cc
is called twice, and the console shows cc: :ok cc: :ok after and
.
But, when running (foo 1)
, the function cc
is also run twice and the console shows cc: 1 cc: :ok
. So, even though the first condition isn't fullfilled, the second one is still checked!Hi, question about figwheel: Can you track some .edn file change (map of string translations) and then reload .cljs file (one that compiles that map) that depend on the .edn file? Thanks.
Can someone help me with this issue? http://stackoverflow.com/questions/35013494/clojurescript-core-async-async-condition-inside-go
@ashercoren: it might just be a core.async bug in the ClojureScript part of the library
@martinklepsch: Yeah, I noticed that people used mainly React.
@jaen: I’m stuck with Angular, actually. I’m working in a team that’s using Ionic, and they have already considered React.
@euandreh: I see; why not stick with typescript or Dart which are officially supported then?
Yeah, I know it's probably not the answer you were expecting, but I didn't really see anything newer than gyr around
Though, I can understand that. The frameworkiness of Angular is probably off-putting when you use a language that prefers libraries.
Yeah, a friend has to write something in it and says something to the effect "feels better than Angular 1, though still prefer React".
If you want you could try using gyr/purnam, but I'm afraid it'll just be a varying degree of painful, so it'll probably be best, bit the bullet and decide on either of TypeScript or Dart.
Idiomatic is one thing, having optional typesystem is always cool. Though bivariant genercis are a bit surprising at first.
@dnolen: : That's also what I thought. Should I open a bug somewhere?
@ashercoren: bugs are filed in JIRA
are there any isomorphic clojurescript apps which are js on the frontend but actually closure on the backend (in essence run everything which has a jvm implementation natively on the jvm and run the rest embedded in a js (nashorn?) wrapper with some transparent interop between the two