how to do live reload in browser using CIDER+Ring+Jetty?
I have a question, but I have no idea if what I'm asking for is even possible.
In the ClojureScript world, there is fighweel that allows you to immediately see changes in the browser.
I'm busy with a server-side project (using Emacs+CIDER nREPL+ring+jetty), so no figwheel and I would like to achieve the following:
when I change an html-generating function, and use C-x C-e in Emacs to apply the changes, the CIDER repl knows about the update, but the browser doesn't know about it yet. I have to manually refresh every time.
Submitted February 23, 2018 at 08:42PM by kvtb
via reddit http://ift.tt/2CFjxgC
Clojurians, please share your knowledges with blogs
Submitted February 23, 2018 at 10:49AM by jiyinyiyong
via reddit http://ift.tt/2HGh0pV
Flare: Clojure Dynamic Neural Net Library
Submitted February 21, 2018 at 11:33PM by vonnik
via reddit http://ift.tt/2CxWV1j
[ANN] Programming Clojure, 3rd edition
Submitted February 21, 2018 at 11:12PM by alexdmiller
via reddit http://ift.tt/2GyzuY6
A debugging dashboard for re-frame
Submitted February 21, 2018 at 11:14AM by yogthos
via reddit http://ift.tt/2EVMCcU
Re-frame subscription question
What's the best way to write a re-frame subscription equivalent to this:
(let [a @(subscribe [::foo input-value]) b @(subscribe [::bar a])] (f a b))
The issue is that the
::bar subscription depends on the result of the
::foo subscription. In my actual use case, the first subscription tells me which event I'm currently looking at and the second subscription gets more info about that event. Worse, the second subscription is hitting my server, so I can't even sidestep the issue by using the entire app-db as my input signal.
My first thought was this:
(reg-sub ::my-sub (fn [[_ input-value]] (let [a-sub (subscribe [::foo input-value])] [a-sub (subscribe [::bar @a-sub])])) (fn [[a b]] (f a b)))
Unfortunately, the signal function is only ever applied once, so the
::bar sub doesn't update when the
::foo sub changes.
Instead, I'm currently using this:
(reg-sub ::my-sub (fn [[_ input-value]] (subscribe ::foo input-value)) (fn [a] (let [b (subscribe [::bar a])] (f a b))))
This works fine, but I feel like I'm not really getting much value out of the input-signals function. Also, the body of my subscription is no longer pure and so it is somewhat awkward to test. Finally, the
::bar subscription can't easily depend on
input-value, which can be somewhat annoying as well.
Submitted February 21, 2018 at 10:07AM by retief1
via reddit http://ift.tt/2EHbK7N
JUXT Blog: Overview of the nREPL
Submitted February 21, 2018 at 02:24AM by SevereOverfl0w
via reddit http://ift.tt/2BFd6NE