Re: [ClojureScript] Consequences of not closing channels in browser?

2014-08-30 Thread Dhruv Bhatia
On Sunday, 13 July 2014 01:46:41 UTC+10, Daniel Kersten wrote: Channels are cheap, but unless they get garbage collected (and I assume not closing them will prevent this), they will still take up some resources. Related and important is that you shut down any go blocks that you create in

[ClojureScript] Re: accessing cljs code from inside a macro

2014-08-30 Thread Joel Holdbrooks
On Monday, August 25, 2014 1:15:51 PM UTC-7, Yehonathan Sharvit wrote: I would like to write a macro that calls a cljs function. The problem is that the macro is defined inside a clj file and when I require the namespace that contains the cljs code I receive the following compilation error:

[ClojureScript] Hickory + Sablono + Om: double escaped html entities

2014-08-30 Thread Joseph Fahey
Hi, I'm using Sablono and Hickory in an Om app where I insert a lot of existing html stored on the server, which is why I started using Sablono rather than Om's dom. My problem is that gt; and lt; are bleeding through to the browser. Here is a typical use (with the following in :require)

Re: [ClojureScript] Hickory + Sablono + Om: double escaped html entities

2014-08-30 Thread Daniel Kersten
You can set HTML directly like this: (om.dom/div #js {:dangerouslySetInnerHTML #js {:__html bBold!/b} nil) See https://github.com/swannodette/om/wiki/Documentation#props for details. On 30 August 2014 22:11, Joseph Fahey fahey.jos...@gmail.com wrote: Hi, I'm using Sablono and Hickory in

Re: [ClojureScript] Consequences of not closing channels in browser?

2014-08-30 Thread Daniel Kersten
Something like this: (defn component [data owner] (reify om/IInitState (init-state [_] (let [chan (chan)] {:chan chan :kill (chan) :pub (pub chan first)})) om/IWillMount (will-mount [_] (let [pub (om/get-state owner :pub) chan

Re: [ClojureScript] Consequences of not closing channels in browser?

2014-08-30 Thread Dhruv Bhatia
Thanks a lot. I managed to create a solution which doesn't require a separate kill-channel. It seems to be side-effect free and cleans up as expected, though I'm still quite new to Clojurescript and core.async so I may be wrong! ; UTIL.CLJS ; PUB/SUB SETUP ; create a global events-ch channel