If its left argument is nil, intersection throws a NPE (Clojure rev. 1235):
user= (set/intersection nil #{1})
java.lang.NullPointerException (NO_SOURCE_FILE:0)
user= (.printStackTrace *e)
java.lang.NullPointerException (NO_SOURCE_FILE:0)
at clojure.lang.Compiler.eval(Compiler.java:4186)
Currently agent errors are only reported when the agent is derefenced
or further actions are dispatched to the agent. It would be great if
one can get immediate notification of agent errors maybe through a
callback.
Thanks,
nt
--~--~-~--~~~---~--~~
You received
On Wed, 2008-10-29 at 23:44 -0700, mb wrote:
But proxy-super to the rescue: You may try the following snippet
for the write method:
Nice. Never heard of proxy-super before. Would be nice to mention it on
the Java interop page and not only on the API page.
(write
([x]
Consider the following code which attempts to redefine clojure/*out*:
(ns test
(:refer-clojure))
(def output System/out)
(def output-stream
(let [buffer (new java.io.ByteArrayOutputStream)]
(proxy [java.io.OutputStream] []
(flush []
(.append output (.toString buffer
On Fri, 2008-10-10 at 12:46 -0700, Mike Hinchey wrote:
It's usually advised to avoid eval.
Many thanks Mike. I would like to avoid eval, but I am too stupid.
However I would love to find out how to do it. If you could give me
hunch I would be more than happy.
See dothread-keeping in
I still try to find a way to make threads inherit thread-local
bindings established via binding in the parent thread. I searched for
a function to get the thread bindings but couldn't find one. Did I
miss anything? So I added getThreadBindings() to Var.java:
diff --git
On Thu, 2008-10-09 at 22:06 +0200, ntupel wrote:
After further investigation and experimentation with macros I finally
managed to trigger a NullpointerException:
user= (defmacro on-thread [env exp] `(doto (new Thread #(binding ~env
(~exp))) (start)))
Ignore me. That's like doing ((prn 42
On Wed, 2008-09-10 at 16:47 +1100, Brett Morgan wrote:
On Wed, Sep 10, 2008 at 4:38 PM, ntupel [EMAIL PROTECTED] wrote:
On Tue, 2008-09-09 at 23:57 +1000, Brett Morgan wrote:
On Tue, Sep 9, 2008 at 10:31 PM, [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:
On Sep 9, 11:26 am, Brett
On Tue, 2008-09-09 at 07:26 -0700, Rich Hickey wrote:
Certainly there are areas where there could be more explicit messages,
but the detection and reporting of errors has a cost (in time,
sometimes runtime, effort, code size and complexity) and I don't want
to incur that cost unless it is
On Tue, 2008-09-09 at 23:57 +1000, Brett Morgan wrote:
On Tue, Sep 9, 2008 at 10:31 PM, [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:
On Sep 9, 11:26 am, Brett Morgan [EMAIL PROTECTED] wrote:
For C, protection against circular dependencies is on the head of the
programmer, in the form of
10 matches
Mail list logo