Hi,

I ended up using https://github.com/technomancy/robert-hooke -- like this:

,,,(:require [clojure.tools.nrepl :refer :all])

(defn remote-eval [conn code]
  (let [{:keys [value err]} (-> (client conn 1000)
                                        (message {:op :eval
                                                  :code code})
                                        (combine-responses))]
    (if err (throw (RuntimeException. err))
        (read-string (last value)))))

(defn remote-wrapper [conn-fn v]
  (fn [_ & args]
    (remote-eval
     (conn-fn)
     (format "(apply %s/%s [%s])"
             (-> v meta :ns) (-> v meta :name)
             (apply pr-str args)))))

(defn -main [& args]
  (let [conn-fn ,,,]
    (hooke/add-hook #'a-fn
                    (remote-wrapper conn-fn #'a-fn))
    (hooke/add-hook #'b-fn
                    (remote-wrapper conn-fn #'b-fn))
,,,


Cheers Henrik

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to