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: Strange behavior with clojure.java.io/copy

2019-08-25 Thread 'Dirk Wetzel' via Clojure
As alpeware already said, *.read* will not return [1024, 0, 1024, 201, -1] because it will not return a zero unless *buffer-size* is zero. This bit of the Java-Doc: If the length of b is zero, then no bytes are read and 0 is returned; So if the check is changed to (<= 0 size), passing a *buffer

Re: Strange behavior with clojure.java.io/copy

2019-08-27 Thread &#x27;Dirk Wetzel&#x27; via Clojure
for some >> reason that the implementation guaranteed this. (I have not looked at the >> implementation to know either way.) >> >> Andy >> >> On Sun, Aug 25, 2019 at 9:21 PM 'Dirk Wetzel' via Clojure < >> clo...@googlegroups.com > wrote: >> &g

Why is `(get-in m ks)` not implemented as `(get-in m ks nil)`?

2019-12-11 Thread &#x27;Dirk Wetzel&#x27; via Clojure
Hey everyone! :) I was recently looking at the source for *get-in* to check if it would exit early as soon as a key was not present in the nested maps. The source for quick reference: (defn get-in "Returns the value in a nested associative structure, where ks is a sequence of keys. Returns n

Re: Why is `(get-in m ks)` not implemented as `(get-in m ks nil)`?

2019-12-12 Thread &#x27;Dirk Wetzel&#x27; via Clojure
I had actually included a suggestion for a predefined sentinel like this in an earlier draft of my post. I scrapped that bit though, because I could not measure any consistent performance benefit on my machine, aside from not allocating a new Object each time. Am Donnerstag, 12. Dezember 2019 1