wow! that is 10 times easier than I expected...I guess I'll have to
ditch the socket-based approach...
thanks Martin :)
Jim
On 05/03/13 15:22, Weber, Martin S wrote:
$ lein new replbuiltin && cd replbuiltin
$ sed -Ee 's,.0",.0"][org.clojure/tools.nrepl "0.2.2",' < project.clj > p
&& mv -f p project.clj
$ lein deps
$ cat <<EOF > src/replbuiltin/core.clj
(ns replbuiltin.core
(:use [clojure.tools.nrepl.server :only [start-server stop-server]]))
(defn foo [x] x)
(defn -main
"I'm showing FooBar how to embed an nrepl!"
[& _]
(let [repl-server (start-server :port 42042)]
(Thread/sleep 60000)))
EOF
$ lein run -m replbuiltin.core &
$ lein repl :connect 42042
user=> (in-ns 'replbuiltin.core)
replbuiltin.core=> (foo 42)
42
--
--
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/groups/opt_out.