Re: clojure.spec gen-testing VS NaN

2018-03-07 Thread 'Dirk Wetzel' via Clojure
By definition NaN never equals any other number, including NaN itself, so isn't it a perfectly valid scenario to generate double NaNs? (Note: I've not used spec yet, so correct me if I'm completely off track) Am Montag, 7. November 2016 23:07:14 UTC+1 schrieb Alex Miller: > > I think it would be

Re: clojure.spec gen-testing VS NaN

2018-03-06 Thread Wes Morgan
Yes it did: https://dev.clojure.org/jira/browse/CLJ-2054 On Tuesday, March 6, 2018 at 12:15:26 PM UTC-7, Wes Morgan wrote: > > Did this ticket get created? > > On Monday, November 7, 2016 at 3:26:15 PM UTC-7, Jim foo.bar wrote: >> >> Alright cool, I'll do that tomorrow :) >> >> Thanks, >> >> Dimi

Re: clojure.spec gen-testing VS NaN

2018-03-06 Thread Wes Morgan
Did this ticket get created? On Monday, November 7, 2016 at 3:26:15 PM UTC-7, Jim foo.bar wrote: > > Alright cool, I'll do that tomorrow :) > > Thanks, > > Dimitris > > On 07/11/16 22:07, Alex Miller wrote: > > I think it would be reasonable to log a jira enhancement request for the > spec any?

Re: clojure.spec gen-testing VS NaN

2016-11-07 Thread dimitris
Alright cool, I'll do that tomorrow :) Thanks, Dimitris On 07/11/16 22:07, Alex Miller wrote: I think it would be reasonable to log a jira enhancement request for the spec any? generator to avoid generating double NaNs. On Monday, November 7, 2016 at 12:30:24 PM UTC-6, Jim foo.bar wrote:

Re: clojure.spec gen-testing VS NaN

2016-11-07 Thread Alex Miller
I think it would be reasonable to log a jira enhancement request for the spec any? generator to avoid generating double NaNs. On Monday, November 7, 2016 at 12:30:24 PM UTC-6, Jim foo.bar wrote: > > Hi Alex, > > Oh yeah I've seen `s/double-in` but as you point out that doesn't help me > if I wa

Re: clojure.spec gen-testing VS NaN

2016-11-07 Thread dimitris
Hi Alex, Oh yeah I've seen `s/double-in` but as you point out that doesn't help me if I want to :ret spec a function with similar semantics as remove (a fn that transforms a seq given a predicate), which I find a very common indeed. I'm only starting playing with clojure.spec (in fact i've on

Re: clojure.spec gen-testing VS NaN

2016-11-07 Thread Alex Miller
Please also take a look at s/double-in, which allows you to exclude NaN (and Infinity/-Infinity) as valid values. (I realize this does not address the any? question, but that seems like a rarer issue to me than cases where I'm explicitly spec'ing a double but don't want to allow NaN.) On Monda