Re: I can not find any function that might give rise tothisStackOverflow error

2017-04-03 Thread piastkrakow
seems to limit loops a great deal. > > You just need to ensure you are building the sequences in an eager manner, > rather than a lazy manner. > > > > Sean Corfield -- (970) FOR-SEAN -- (904) 302-SEAN > An Architect's View -- http://corfield.org/ > > "If you'r

Re: I can not find any function that might give rise tothisStackOverflow error

2017-04-03 Thread Sean Corfield
piast...@gmail.com Sent: Saturday, April 1, 2017 9:56 PM To: Clojure Subject: Re: I can not find any function that might give rise tothisStackOverflow error > Because when you recur in your loop, you’re passing in lazy sequences, so > those > are essentially building up a giant

Re: I can not find any function that might give rise tothisStackOverflow error

2017-04-03 Thread piastkrakow
mail.com > *Sent: *Saturday, April 1, 2017 9:56 PM > *To: *Clojure > *Subject: *Re: I can not find any function that might give rise > tothisStackOverflow error > > > > > > Because when you recur in your loop, you’re passing in lazy sequences, > so thos

RE: I can not find any function that might give rise tothisStackOverflow error

2017-04-01 Thread Sean Corfield
s View -- http://corfield.org/ "If you're not annoying somebody, you're not really alive." -- Margaret Atwood From: piastkra...@gmail.com Sent: Saturday, April 1, 2017 9:56 PM To: Clojure Subject: Re: I can not find any function that might give rise tothisStackOverflow error > Bec

Re: I can not find any function that might give rise to thisStackOverflow error

2017-04-01 Thread piastkrakow
t...@gmail.com > *Sent: *Saturday, April 1, 2017 6:52 PM > *To: *Clojure > *Subject: *Re: I can not find any function that might give rise to > thisStackOverflow error > > > > > Crazy! I re-wrote the (loop) to use (reduce) instead and now everything > works: >

RE: I can not find any function that might give rise to thisStackOverflow error

2017-04-01 Thread Sean Corfield
l.com Sent: Saturday, April 1, 2017 6:52 PM To: Clojure Subject: Re: I can not find any function that might give rise to thisStackOverflow error Crazy! I re-wrote the (loop) to use (reduce) instead and now everything works: (defn loop-over-scores   [set-of-scores]   "2017-03-08 -- called

Re: I can not find any function that might give rise to this StackOverflow error

2017-04-01 Thread Luke Burton
I'm away from a Clojure REPL to poke at this but I think trapping this in a debugger would trivially reveal the source of recursion. Set a breakpoint at the start of the loop and step through. If using Cursive / IntelliJ set a breakpoint to detect StackOverflow and inspect the call stack. >

Re: I can not find any function that might give rise to this StackOverflow error

2017-04-01 Thread piastkrakow
Crazy! I re-wrote the (loop) to use (reduce) instead and now everything works: (defn loop-over-scores [set-of-scores] "2017-03-08 -- called from start.clj" (reduce ;; 2017-04-01 -- we assume vector-with-path-score looks like this: ;; [[:positive :true 0.88 19 60 10 12 3 1 3 1 2

Re: I can not find any function that might give rise to this StackOverflow error

2017-04-01 Thread piastkrakow
Well, I am out of ideas. Let's assume I'll re-write this some other way. What would be better than using (loop)? What would be less likely to cause StackOverflow, or at least reveal why I'm seeing it. On Saturday, April 1, 2017 at 6:23:29 PM UTC-4, piast...@gmail.com wrote: > > > I have a

Re: I can not find any function that might give rise to this StackOverflow error

2017-04-01 Thread piastkrakow
So for instances, starting with an object that has about 32,000 lines that need to be looped over, the code gets this far: in loop-over-scores again 2375 It prints that out and then throws StackOverflow error. But I don't see anything in there that would exhaust the stack. These functions

I can not find any function that might give rise to this StackOverflow error

2017-04-01 Thread piastkrakow
I have a function that will run repeatedly, so I use the at-at library to call it: https://github.com/overtone/at-at I don't think this is the problem. Sad to say, the Error is catching a StackOverflow, which I'm having trouble finding. I don't see a place where I call a function

Re: No any? function

2011-06-15 Thread de1976
? p coll) Returns *true* if (pred x) is logical true for any x in coll,  else *false*. Since *nil* and *false* are both falsy, some can be used as a predicate that is truthy when it finds truthy result, otherwise falsy. This is exactly the behavior expected from an any? function. some

No any? function

2011-06-14 Thread de1976
Hello everyone. In looking through the API documentation, I've noticed that there is a not-any? function available, but there is no corresponding inverse any? function that I can find. There are, however, every? and not-every? functions available. The closest I could find was some, but wouldn't

Re: No any? function

2011-06-14 Thread Ambrose Bonnaire-Sergeant
for any x in coll, else *false*. Since *nil* and *false* are both falsy, some can be used as a predicate that is truthy when it finds truthy result, otherwise falsy. This is exactly the behavior expected from an any? function. some is a poster boy for Clojure's well thought out truthyness system

Re: No any? function

2011-06-14 Thread Kevin Baribeau
*nil* and *false* are both falsy, some can be used as a predicate that is truthy when it finds truthy result, otherwise falsy. This is exactly the behavior expected from an any? function. some is a poster boy for Clojure's well thought out truthyness system, this is a great example of the types

Re: No any? function

2011-06-14 Thread Ambrose Bonnaire-Sergeant
can be used as a predicate that is truthy when it finds truthy result, otherwise falsy. This is exactly the behavior expected from an any? function. some is a poster boy for Clojure's well thought out truthyness system, this is a great example of the types of general functions it allows

Re: No any? function

2011-06-14 Thread Kevin Baribeau
that is truthy when it finds truthy result, otherwise falsy. This is exactly the behavior expected from an any? function. some is a poster boy for Clojure's well thought out truthyness system, this is a great example of the types of general functions it allows. Perhaps a pointer to some should be added

Re: No any? function

2011-06-14 Thread Ken Wesson
On Tue, Jun 14, 2011 at 12:29 PM, Ambrose Bonnaire-Sergeant abonnaireserge...@gmail.com wrote: some is a poster boy for Clojure's well thought out truthyness system, this is a great example of the types of general functions it allows. Notably, with a map as first argument it returns the first

Re: No any? function

2011-06-14 Thread CuppoJava
There is one use of any? over some which hasn't been mentioned: checking whether a list contains a nil. ie. (when (any? nil? xs) (do stuff)) vs. (when (some nil? xs) (do stuff)) -Patrick On Jun 14, 9:00 pm, Ken Wesson kwess...@gmail.com wrote: On Tue, Jun 14, 2011 at 12:29 PM, Ambrose

Re: No any? function

2011-06-14 Thread Ambrose Bonnaire-Sergeant
On Wed, Jun 15, 2011 at 9:14 AM, CuppoJava patrickli_2...@hotmail.comwrote: There is one use of any? over some which hasn't been mentioned: checking whether a list contains a nil. ie. (when (any? nil? xs) (do stuff)) vs. (when (some nil? xs) (do stuff)) Actually, this case works with

Re: No any? function

2011-06-14 Thread Ambrose Bonnaire-Sergeant
the behavior expected from an any? function. some is a poster boy for Clojure's well thought out truthyness system, this is a great example of the types of general functions it allows. Perhaps a pointer to some should be added in the docstring of not-any?. Although a quick look at the source

Re: any? function

2008-10-05 Thread Chouser
On Sun, Oct 5, 2008 at 2:55 PM, Vincent Foley [EMAIL PROTECTED] wrote: I was surprised to see that Clojure doesn't have an any? function. I saw every?, not-every? and not-any? but no any?. Is there a reason for this? user= (doc some) - clojure/some ([pred coll