Re: core.async/thread failing silently

2013-12-08 Thread Colin Jones
I've run this a bunch of times (in BOTH `lein repl` and `java -cp [...] clojure.main`), and have observed both this code printing the OOM exception, and it being silent as you observed. The difference in trials *seems* to be that if I skip the intermediate steps, going straight for the big one

Re: core.async/thread failing silently

2013-12-08 Thread Paul Butcher
On 8 Dec 2013, at 14:21, Alex Miller wrote: > If you're starting with lein repl then I would expect errors to be printed at > the console - that's the actual process running the code. It's also possible > that the thread's untaught exception handler doesn't print. I know that the > expectation

Re: core.async/thread failing silently

2013-12-08 Thread Alex Miller
If you're starting with lein repl then I would expect errors to be printed at the console - that's the actual process running the code. It's also possible that the thread's untaught exception handler doesn't print. I know that the expectation for async go blocks is that you should catch and hand

Re: core.async/thread failing silently

2013-12-08 Thread Paul Butcher
On 8 Dec 2013, at 05:04, Alex Miller wrote: > Errors are most likely occurring on a thread different than main. Assuming > you're using nrepl, have you looked at the nrepl-error buffer? Thanks. I wasn't aware of nrepl-error. Some quick googling has turned up a few articles about how to see nre

Re: core.async/thread failing silently

2013-12-07 Thread Alex Miller
Errors are most likely occurring on a thread different than main. Assuming you're using nrepl, have you looked at the nrepl-error buffer? On Saturday, December 7, 2013 7:27:35 PM UTC-6, Paul Butcher wrote: > > Consider the following function that adds two numbers exceptionally > inefficiently b

core.async/thread failing silently

2013-12-07 Thread Paul Butcher
Consider the following function that adds two numbers exceptionally inefficiently by creating lots of threads: user=> (require '[clojure.core.async :refer [thread (defn thread-add [x y] #_=> (thread #_=> (if (zero? y) #_=> x #_=> (let [t (thread-add (inc x) (dec y))]