[ClojureScript] Re: Metadata via defn

2015-05-28 Thread Mike Thompson
On Thursday, May 28, 2015 at 6:37:56 PM UTC+10, Ruslan Prokopchuk wrote: > fns are normal values, I guess you got strange glitch, try with the fresh > vm/repl: > > (def fff ^{:a 1} (fn [] 4)) > #<[object Object]> > => nil > > (meta fff) > => {:a 1} > > (meta ^{:a 1} (fn [] 4)) > => {:a 1} > M

Re: [ClojureScript] In Om, why does transact not update cursor value.

2015-05-28 Thread Gary Verhaegen
Try @cursor ? On Tuesday, 26 May 2015, John Chijioke Umeasiegbu wrote: > Hi David, > > Then the name should be more like om/cached-value or om/init-value. It's > very misleading as om/value. And I suggest there should be a name for > getting the current value as having to do (get-in @(om/state c

Re: [ClojureScript] sente - parameterising context root

2015-05-28 Thread Colin Yates
Ah this is on a windows boxen for clients. For our internal systems there are about 50 (J)VMs fronted by Apache. I never realised moving from Tomcat to http-kit and using web sockets was going to be so delightful in terms of client app development and speed and so nightmare-ish in terms of admin

Re: [ClojureScript] sente - parameterising context root

2015-05-28 Thread Colin Fleming
"sudo apt-get install nginx" should make that work for you :-) On 28 May 2015 at 20:17, Colin Yates wrote: > Thanks all, and yes, I guess the question is more general then sente. > > Next up, any ideas how to get apache 2.2 on debian to proxy web sockets > without recompiling apache ;). > > On 2

[ClojureScript] Re: Metadata via defn

2015-05-28 Thread Ruslan Prokopchuk
fns are normal values, I guess you got strange glitch, try with the fresh vm/repl: (def fff ^{:a 1} (fn [] 4)) #<[object Object]> => nil (meta fff) => {:a 1} (meta ^{:a 1} (fn [] 4)) => {:a 1} четверг, 28 мая 2015 г., 10:49:53 UTC+3 пользователь Mike Thompson написал: > On Thursday, May 28, 20

Re: [ClojureScript] sente - parameterising context root

2015-05-28 Thread Colin Yates
Thanks all, and yes, I guess the question is more general then sente. Next up, any ideas how to get apache 2.2 on debian to proxy web sockets without recompiling apache ;). > On 28 May 2015, at 08:20, Eduard Bondarenko wrote: > > I use chsk-url-fn to connect to different domain like this: > >

[ClojureScript] Re: Metadata via defn

2015-05-28 Thread Mike Thompson
On Thursday, May 28, 2015 at 5:39:54 PM UTC+10, Ruslan Prokopchuk wrote: Okay, thanks, that makes some sense. So, attaching metadata to the var rather than the value the var is bound to. Got it. But ... I then performed this experiment where I feel I am attaching metadata to the value ... (

[ClojureScript] Re: Metadata via defn

2015-05-28 Thread Ruslan Prokopchuk
`with-meta` is the thing which deals with value, you get "an object of the same type and value as obj, with map m as its metadata". But `defn`, which is essentially `(def ... (fn ...` creates a Var, and attaches metadata to that Var, not its value. четверг, 28 мая 2015 г., 10:30:14 UTC+3 пользо

[ClojureScript] Re: Metadata via defn

2015-05-28 Thread Mike Thompson
On Thursday, May 28, 2015 at 4:55:09 PM UTC+10, Ruslan Prokopchuk wrote: > (meta #'f) Hmm. I think there's something fundamental I'm not grasping here. But I'm struggling to ask the right question to get the ahhh moment. Perhaps this: why, in my original example code, does (meta f) return nil

Re: [ClojureScript] sente - parameterising context root

2015-05-28 Thread Eduard Bondarenko
I use chsk-url-fn to connect to different domain like this: ​;; create the Sente web socket connection stuff when we are loaded: (let [{:keys [chsk ch-recv send-fn state]} (sente/make-channel-socket! "/ws" ; Note the same path as before {:type :auto ; e/o #{:auto :ajax