Re: [cn-clojure:2334] {ANN} A clojure macro and ruby script to profile clojure program.

2013-06-08 Thread stream
弱弱的问一下,为什么解析不用clojure呢。 是因为基于JVM的clojure太重了,不方便命令行吗 On 2013-6-8, at 下午9:46, dennis zhuang wrote: > A macro named `p` to log data, and a ruby script to parse log file,and it > will give the statistics result of a clojure program: > > > Parsing log file test.log ... > Prowl profile results: >

请教一个问题

2013-06-12 Thread stream
Hi all 我在看 lein-ring插件源码时,发现很多 语法引用符号 ` 都用在defn里。 `(do ~(start-nrepl-expr project) ~(start-server-expr project)) (defn load-namespaces [& syms] `(require ~@(for [s syms :when s] `'~(if-let [ns (namespace s)] (symbol ns) s 我的直觉是这些最好是用在编译期的宏里。

ring 如何实现热加载代码?

2013-06-13 Thread stream
今天看了一下ring代码,想看一下,如何实现热加载clj代码。 我尝试 run-jetty :join true 导致server被阻塞,然后emacs nrepl 无法热加载代码。 改成 join false,jetty 进程不加入主进程里,才可以正常加载。 我翻查源码,没发现是如何分离server与逻辑代码,从而实现只热加载handler的。 哪位大神能科普一下呢,谢谢 -- -- You received this message because you are subscribed to the Google Groups "Clojure" group. To po

Re: why clojure.lang.Compiler.LOADER is null in clojure 1.5.1

2013-06-17 Thread Stream
在 2013年5月9日星期四UTC+8下午2时00分54秒,Stream写道: > > Hi all > > i wanna change the classloader of Clojure RT. in 1.5.1 > so , i try to > clojure.lang.Var.pushThreadBindings(clojure.lang.RT.map( > clojure.lang.Compiler.LOADER, cl) ); > > but throws exception that

How to get value which been created in java from cli file

2013-07-02 Thread stream
Hi all my english poor i hope someone could know what i said. i create Var in Java such as RT("mysapce" "xv" object); and then i load a clj file RT.loadResourceScript("xx.clj"); the question is how to get Value of xv in xx.clj and could reload it in nrepl. i try to do something like (use 'my

why clojure.lang.Compiler.LOADER is null in clojure 1.5.1

2013-05-09 Thread stream
Hi all i wanna change the classloader of Clojure RT. in 1.5.1 so , i try to clojure.lang.Var.pushThreadBindings(clojure.lang.RT.map( clojure.lang.Compiler.LOADER, cl) ); but throws exception that cojure.lang.Compiler.LOADER is null Caused by: java.lang.NullPointerException at c