Re: ANN: ClojureScript 1.9.456, Externs Inference & Comprehensive JS Modules Support

2017-03-07 Thread Varga Radu
Also solved my problem by adding [com.google.guava/guava "21.0"] to my 
project.clj

On Thursday, 2 March 2017 13:45:29 UTC+1, Dirk Bergmann wrote:
>
> Had the same issue. Fixed it by upgrading guava dependency to 
> [com.google.guava/guava "21.0"]
>
> On Sunday, January 29, 2017 at 3:01:16 AM UTC+7, Francesco Bellomi wrote:
>>
>> Found, thanks! 
>>
>> Francesco
>
>

-- 
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.


Re: GSoC 2017 - KLIPSE

2017-03-07 Thread Yehonathan Sharvit
Hi Maitreya,

I'm Yehonathan - the author of Klipse.
I'd love to hear your ideas around Klipse and to be your mentor for GSoC 2017.

You can reach me at: vie...@gmail.com

-- 
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.


`extend-protocol` order

2017-03-07 Thread 'Tianxiang Xiong' via Clojure
Does `extend-protocol` guarantee order when used with subtypes? 

E.g. suppose class Foo implements interface IFoo. Then, extending both Foo 
and IFoo with protocol Bar:

(extend-protocol Bar
  Foo
  (do-bar []
"Foo-bar")

  IFoo
  (do-bar []
"IFoo-bar"))

Is calling `do-bar` on an object of type Foo guaranteed to give "Foo-bar" 
instead of "IFoo-bar"?



-- 
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.


Re: `extend-protocol` order

2017-03-07 Thread Alex Miller
Per the docs at https://clojure.org/reference/protocols, if more than one 
protocol extension applies and one is derived from the other then the 
derived one will be used. In other cases (like two independent interfaces), 
it is undefined and in my experience you will see different ones get 
applied between different runs of the JVM. The order the extensions are 
applied should not affect the first case.

Other options are to use multimethods (which do allow you to express order 
preferences) or to avoid ambiguous extensions through the use of 
conditionals either before the call or within the the most generic protocol 
extension.

Alex

On Tuesday, March 7, 2017 at 1:14:50 PM UTC-6, Tianxiang Xiong wrote:
>
> Does `extend-protocol` guarantee order when used with subtypes? 
>
> E.g. suppose class Foo implements interface IFoo. Then, extending both Foo 
> and IFoo with protocol Bar:
>
> (extend-protocol Bar
>   Foo
>   (do-bar []
> "Foo-bar")
>
>   IFoo
>   (do-bar []
> "IFoo-bar"))
>
> Is calling `do-bar` on an object of type Foo guaranteed to give "Foo-bar" 
> instead of "IFoo-bar"?
>
>
>
>

-- 
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.


Re: Application silently shuts down by itself after running for some hours

2017-03-07 Thread Kevin Corcoran
On Mon, Mar 6, 2017 at 11:56 PM, JokkeB  wrote:

> After adding this, I still can't see an exception before the app dies.
>

I've encountered this before when the Linux "OOM killer" kicks in, which is
especially likely if you are running your application on a
resource-constrained system (say, a VM with a low RAM allocation) or your
application is competing with other programs for memory.

-- 
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.


Re: `extend-protocol` order

2017-03-07 Thread 'Tianxiang Xiong' via Clojure
Thanks, that's vey helpful.

On Tuesday, 7 March 2017 11:35:12 UTC-8, Alex Miller wrote:
>
> Per the docs at https://clojure.org/reference/protocols, if more than one 
> protocol extension applies and one is derived from the other then the 
> derived one will be used. In other cases (like two independent interfaces), 
> it is undefined and in my experience you will see different ones get 
> applied between different runs of the JVM. The order the extensions are 
> applied should not affect the first case.
>
> Other options are to use multimethods (which do allow you to express order 
> preferences) or to avoid ambiguous extensions through the use of 
> conditionals either before the call or within the the most generic protocol 
> extension.
>
> Alex
>
> On Tuesday, March 7, 2017 at 1:14:50 PM UTC-6, Tianxiang Xiong wrote:
>>
>> Does `extend-protocol` guarantee order when used with subtypes? 
>>
>> E.g. suppose class Foo implements interface IFoo. Then, extending both 
>> Foo and IFoo with protocol Bar:
>>
>> (extend-protocol Bar
>>   Foo
>>   (do-bar []
>> "Foo-bar")
>>
>>   IFoo
>>   (do-bar []
>> "IFoo-bar"))
>>
>> Is calling `do-bar` on an object of type Foo guaranteed to give "Foo-bar" 
>> instead of "IFoo-bar"?
>>
>>
>>
>>

-- 
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.


Re: Application silently shuts down by itself after running for some hours

2017-03-07 Thread piastkrakow
I asked the same question a year ago. The problem was that I was getting an 
OutOfMemoryError. This is an Error but it is not an Exception. If you catch 
all Exceptions, you will still not catch the OutOfMemoryError. You have to 
catch that too. 



On Tuesday, March 7, 2017 at 2:54:26 PM UTC-5, Kevin Corcoran wrote:
>
> On Mon, Mar 6, 2017 at 11:56 PM, JokkeB > 
> wrote:
>
>> After adding this, I still can't see an exception before the app dies.
>>
>
> I've encountered this before when the Linux "OOM killer" kicks in, which 
> is especially likely if you are running your application on a 
> resource-constrained system (say, a VM with a low RAM allocation) or your 
> application is competing with other programs for memory.
>
>

-- 
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.


Re: Application silently shuts down by itself after running for some hours

2017-03-07 Thread Alex Miller
If you are getting an OOME there are some JVM flags that can help dump an 
error file or heap dump, or run arbitrary commands when an error occurs:

-XX:ErrorFile=./hs_err_pid.log
-XX:+HeapDumpOnOutOfMemoryError 
-XX:HeapDumpPath=./java_pid.hprof
-XX:OnError=";"
-XX:OnOutOfMemoryError=";"

That might help you determine the cause if it is an error condition.

On Tuesday, March 7, 2017 at 3:25:52 PM UTC-6, piastkra...@gmail.com wrote:
>
> I asked the same question a year ago. The problem was that I was getting 
> an OutOfMemoryError. This is an Error but it is not an Exception. If you 
> catch all Exceptions, you will still not catch the OutOfMemoryError. You 
> have to catch that too. 
>
>
>
> On Tuesday, March 7, 2017 at 2:54:26 PM UTC-5, Kevin Corcoran wrote:
>>
>> On Mon, Mar 6, 2017 at 11:56 PM, JokkeB  wrote:
>>
>>> After adding this, I still can't see an exception before the app dies.
>>>
>>
>> I've encountered this before when the Linux "OOM killer" kicks in, which 
>> is especially likely if you are running your application on a 
>> resource-constrained system (say, a VM with a low RAM allocation) or your 
>> application is competing with other programs for memory.
>>
>>

-- 
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.


Re: Application silently shuts down by itself after running for some hours

2017-03-07 Thread Johannes Ahvenniemi
I'm under the impression that setDefaultExceptionHandler still catches OOM 
errors. Some googling suggests this too. If not, how should I try to catch it?

I am running the app on a virtual server with 512mb ram. free -m is showing 
30mb free. Lack of memory can be the issue. What would be the best way to 
confirm this if I'm not able to log the error?

Sent from my iPhone

> On 7 Mar 2017, at 23.25, piastkra...@gmail.com wrote:
> 
> I asked the same question a year ago. The problem was that I was getting an 
> OutOfMemoryError. This is an Error but it is not an Exception. If you catch 
> all Exceptions, you will still not catch the OutOfMemoryError. You have to 
> catch that too. 
> 
> 
> 
>> On Tuesday, March 7, 2017 at 2:54:26 PM UTC-5, Kevin Corcoran wrote:
>>> On Mon, Mar 6, 2017 at 11:56 PM, JokkeB  wrote:
>>> After adding this, I still can't see an exception before the app dies.
>> 
>> I've encountered this before when the Linux "OOM killer" kicks in, which is 
>> especially likely if you are running your application on a 
>> resource-constrained system (say, a VM with a low RAM allocation) or your 
>> application is competing with other programs for memory.
> 
> -- 
> 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 a topic in the Google 
> Groups "Clojure" group.
> To unsubscribe from this topic, visit 
> https://groups.google.com/d/topic/clojure/zhdcNMC7fQ8/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to 
> clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
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.


Re: Ensure more concurrency

2017-03-07 Thread lawrence . krubner


https://clojuredocs.org/clojure.core/ensure

Must be called in a transaction. Protects the ref from modification
by other transactions.  Returns the in-transaction-value of
ref. Allows for more concurrency than (ref-set ref @ref)



This can be read in two contradictory ways. Protecting a ref during a 
transaction sounds like it increases contention and slows the app down. 
"Allows for more concurrency" can be read as "Allows you to use a huge 
number of refs while still ensuring consistency." In other words, it sounds 
like it offers safety at the cost of speed. 




On Monday, March 6, 2017 at 6:06:46 AM UTC-5, bertschi wrote:
>
> For a lecture I have implemented the write-skew example from Mark 
> Volkmann's article:
>
> (defn write-skew []
>   (let [cats (ref 1)
> dogs (ref 1)
>
> john (future
>(dosync
>  (when (< (+ @cats @dogs) 3)
>(alter cats inc
> mary (future
>(dosync
>  (when (< (+ @cats @dogs) 3)
>(alter dogs inc]
> (do @john @mary)
> (dosync
>  (> (+ @cats @dogs) 3
>
> (defn write-skew-demo []
>   (let [count-write-skews (atom 0)]
> (doseq [_ (range 25)]
>   (when (write-skew)
> (swap! count-write-skews inc)))
> @count-write-skews))
>
> (write-skew-demo)
>
> When I try to fix this program using ensure, i.e. using (ensure dogs) in 
> john and (ensure cats) in mary, I find that it sometimes runs very slow.
>
> From the docs it says "Allows for more concurrency than (ref-set ref 
> @ref)". I would read that as "runs at least as fast as (ref-set ref @ref)", 
> but using (ref-set dogs @dogs) instead of (ensure dogs) and the same with 
> cats, does not exhibit these occasional runtime spikes.
>
> Am I misunderstanding something or is it a bug in ensure?
>
>
> Nils
>

-- 
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.


Re: Application silently shuts down by itself after running for some hours

2017-03-07 Thread lawrence . krubner
To catch OutOfMemoryError s: 

catch(OutOfMemoryError e)




On Tuesday, March 7, 2017 at 5:18:44 PM UTC-5, JokkeB wrote:
>
> I'm under the impression that setDefaultExceptionHandler still catches OOM 
> errors. Some googling suggests this too. If not, how should I try to catch 
> it?
>
> I am running the app on a virtual server with 512mb ram. free -m is 
> showing 30mb free. Lack of memory can be the issue. What would be the best 
> way to confirm this if I'm not able to log the error?
>
> Sent from my iPhone
>
> On 7 Mar 2017, at 23.25, piast...@gmail.com  wrote:
>
> I asked the same question a year ago. The problem was that I was getting 
> an OutOfMemoryError. This is an Error but it is not an Exception. If you 
> catch all Exceptions, you will still not catch the OutOfMemoryError. You 
> have to catch that too. 
>
>
>
> On Tuesday, March 7, 2017 at 2:54:26 PM UTC-5, Kevin Corcoran wrote:
>>
>> On Mon, Mar 6, 2017 at 11:56 PM, JokkeB  wrote:
>>
>>> After adding this, I still can't see an exception before the app dies.
>>>
>>
>> I've encountered this before when the Linux "OOM killer" kicks in, which 
>> is especially likely if you are running your application on a 
>> resource-constrained system (say, a VM with a low RAM allocation) or your 
>> application is competing with other programs for memory.
>>
>> -- 
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clo...@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+u...@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 a topic in the 
> Google Groups "Clojure" group.
> To unsubscribe from this topic, visit 
> https://groups.google.com/d/topic/clojure/zhdcNMC7fQ8/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to 
> clojure+u...@googlegroups.com .
> For more options, visit https://groups.google.com/d/optout.
>
>

-- 
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.


Re: Application silently shuts down by itself after running for some hours

2017-03-07 Thread Mark Nutter
I see this thread is going on for a while, and I'll say up front that I
don't have any helpful insights. I did see an interesting talk at
Abstractions, though, about how to use dtrace to get to the bottom of weird
problems like this. The video for that event doesn't seem to be online
anywhere, but the speaker gave a similar talk at !!Con, and that one is
online. If you're still having issues you might want to check this out, in
case it gives you an extra tool to use for tracking this down.

https://www.youtube.com/watch?v=1OMX69KOhGg

Good luck.


On Fri, Mar 3, 2017 at 10:57 AM, JokkeB  wrote:

> I have an application which I run with "lein run". The main looks
> something like this
>
> (defn -main []
>  (log/info "start")
>  (log/info "channel returned" (async/ ) (websocket-server 9122
>  (log/info "quit"))
>
> start-server returns a channel created with async/reduce which shouldn't
> ever produce a value. I see the "start" logged, the application runs for a
> day or two (not sure if the time is always the same) and then it closes
> without any errors or without logging "channel returned" or "quit".
>
> If there is an error in my code and the program quits I should see the
> "quit" message. If there is a memory leak or something I would assume I'd
> get an error message. Has anyone experienced anything similar?
>
> Could the reason be running it with lein (I haven't tried a jar)? If so,
> why?
>
> --
> 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.
>

-- 
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.


why doesn't java.lang.ArithmeticException have Exception as a parent?

2017-03-07 Thread piastkrakow
This gives me nil:

(try (/ 4 0) (catch Exception e (println (parents e

This too:

(try (/ 4 0) (catch Exception e (println (ancestors e

This too:

(try (/ 4 0) (catch ArithmeticException e (println (ancestors e

How is this possible? Shouldn't Exception be an ancestor? 

Or, more generally, shouldn't something be a parent? 



-- 
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.


Re: why doesn't java.lang.ArithmeticException have Exception as a parent?

2017-03-07 Thread Gary Trakhman
Turns out ancestors works on the class, not the instance:
> (ancestors ArithmeticException)
#{java.lang.Throwable java.io.Serializable java.lang.Exception
java.lang.RuntimeException java.lang.Object}

> (ancestors (new ArithmeticException))
nil


On Tue, Mar 7, 2017 at 7:05 PM  wrote:

> This gives me nil:
>
> (try (/ 4 0) (catch Exception e (println (parents e
>
> This too:
>
> (try (/ 4 0) (catch Exception e (println (ancestors e
>
> This too:
>
> (try (/ 4 0) (catch ArithmeticException e (println (ancestors e
>
> How is this possible? Shouldn't Exception be an ancestor?
>
> Or, more generally, shouldn't something be a parent?
>
>
>
> --
> 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.
>

-- 
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.


Re: why doesn't java.lang.ArithmeticException have Exception as a parent?

2017-03-07 Thread piastkrakow
Thanks for that. I couldn't figure this one out. But using your suggestion, 
I finally get what I expected: 

(try (/ 4 0) (catch ArithmeticException e (println (ancestors (type e)
#{java.lang.Exception java.lang.Throwable java.lang.RuntimeException 
java.lang.Object java.io.Serializable}



On Tuesday, March 7, 2017 at 7:15:07 PM UTC-5, Gary Trakhman wrote:
>
> Turns out ancestors works on the class, not the instance:
> > (ancestors ArithmeticException)
> #{java.lang.Throwable java.io.Serializable java.lang.Exception 
> java.lang.RuntimeException java.lang.Object}
>
> > (ancestors (new ArithmeticException))
> nil
>
>
> On Tue, Mar 7, 2017 at 7:05 PM > wrote:
>
>> This gives me nil:
>>
>> (try (/ 4 0) (catch Exception e (println (parents e
>>
>> This too:
>>
>> (try (/ 4 0) (catch Exception e (println (ancestors e
>>
>> This too:
>>
>> (try (/ 4 0) (catch ArithmeticException e (println (ancestors e
>>
>> How is this possible? Shouldn't Exception be an ancestor? 
>>
>> Or, more generally, shouldn't something be a parent? 
>>
>>
>>
>> -- 
>> You received this message because you are subscribed to the Google
>> Groups "Clojure" group.
>> To post to this group, send email to clo...@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+u...@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+u...@googlegroups.com .
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
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.


Re: ANN: ClojureScript 1.9.456, Externs Inference & Comprehensive JS Modules Support

2017-03-07 Thread Paul Gowder
Yeah, this is a recurrent problem---as far as I can determine, several database 
libraries (at least) have a dependency a layer or two down on an old version of 
guava; the latest closure compiler seems to be depending on the most recent 
guava. See eg this issue (which ai've been meaning to pr...) 
https://github.com/clojurewerkz/support/issues/4

-- 
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.


clj-bigml

2017-03-07 Thread Myriam Abramson

Is this project still maintained? Does anyone want to fork it to bring
it up-to-date? 

Thanks for any info.
-- 
   myriam

-- 
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.


Leiningen, AOT compilation, and classloaders

2017-03-07 Thread 'Tianxiang Xiong' via Clojure
I recently ran into an issue with AOT compilation that I'd like to 
understand better. A minimal working example (MWE) can be found here 
. 

Basically, using `:aot :all` in `project.clj` with `lein trampoline test` 
results in different classloaders for class `Foo`.  

Classloader for lein_trampoline_aot.core.Foo:  
#object[clojure.lang.DynamicClassLoader 
0x4982cc36 clojure.lang.DynamicClassLoader@4982cc36]
Classloader for (->Foo):  #object[sun.misc.Launcher$AppClassLoader 
0x55f96302 sun.misc.Launcher$AppClassLoader@55f96302]

While the same classloaders are used with `lein test`:

Class loader for lein_trampoline_aot.core.Foo:  
#object[sun.misc.Launcher$AppClassLoader 
0x55f96302 sun.misc.Launcher$AppClassLoader@55f96302]
Classloader for (->Foo):  #object[sun.misc.Launcher$AppClassLoader 
0x55f96302 sun.misc.Launcher$AppClassLoader@55f96302]

When is one classloader used instead of another, and why do `lein 
trampoline test` and `lein test` behave differently with `:aot :all`?

-- 
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.