Re: [Bug?] Spec: spec/? not working?

2016-07-21 Thread Torsten Anders
Thanks a lot for testing that. I am also using the same 1.9.0 Alpha 10, should have said so. I found the error, which was in my code. Best, Torsten On Thursday, 21 July 2016 01:25:51 UTC+1, Sean Corfield wrote: > > Your code works for me as expected on 1.9.0 Alpha 10. What version are you >

Re: Amazonica and S3

2016-07-21 Thread Gareth Rogers
Thanks that's helpful. I must have been too frustrated by the end of the day and didn't Google that one! Reading the trace output for the tag setting I believe the original code I wrote is producing an empty TagSet which is what the API considers malformed. Looks like a element is required: h

Re: Enhance spec/double-in to handle open and half-open intervals?

2016-07-21 Thread Steve Miner
With a little help from Java, you can make equivalent open intervals for the desired bounds. For example, (s/and (s/double-in :min 0.0 :max 1.0) #(not= 0.0 %)) should be the same as (s/double-in :min Double/MIN_VALUE :max 1.0) Also, you can use java.lang.Math/nextUp and nextAfter to get a

Re: Amazonica and S3

2016-07-21 Thread Gareth Rogers
I've created this issue https://github.com/mcohen01/amazonica/issues/230 for the set-bucket-notification-configuration as I believe there is a problem with the use of that function. Having looked at the trace out from set-bucket-notification-configuration I'm convinced I can get set-bucket-tagg

Re: Enhance spec/double-in to handle open and half-open intervals?

2016-07-21 Thread Alex Miller
You can already get open intervals by just omitting :min or :max. On Thursday, July 21, 2016 at 8:50:21 AM UTC-5, miner wrote: > > With a little help from Java, you can make equivalent open intervals for > the desired bounds. For example, > > (s/and (s/double-in :min 0.0 :max 1.0) #(not= 0.0

Re: Enhance spec/double-in to handle open and half-open intervals?

2016-07-21 Thread Mars0i
On Thursday, July 21, 2016 at 9:51:02 AM UTC-5, Alex Miller wrote: > > You can already get open intervals by just omitting :min or :max. > I think my terminology may have created some confusion; I probably shouldn't have used open/closed. I meant "open interval" in the sense that an open interv

Re: Enhance spec/double-in to handle open and half-open intervals?

2016-07-21 Thread Steve Miner
> (s/and (s/double-in :min 0.0 :max 1.0) #(not= 0.0 %)) > > should be the same as > > (s/double-in :min Double/MIN_VALUE :max 1.0) I should have mentioned that Double/MIN_VALUE is the smallest positive double (just greater than 0.0), not a large negative value. It’s easy to get confused

Re: Enhance spec/double-in to handle open and half-open intervals?

2016-07-21 Thread Mars0i
On Thursday, July 21, 2016 at 8:50:21 AM UTC-5, miner wrote: > > With a little help from Java, you can make equivalent open intervals for > the desired bounds. For example, > > Also, you can use java.lang.Math/nextUp and nextAfter to get adjacent > doubles for your bounds. > > (java.lang.Math/

meaning of spec/and ?

2016-07-21 Thread Mars0i
With Clojure 1.9.0-alpha10: *user=> (s/def ::interval-with-cloj-and #(and (> % 0.0) (< % 1.0)))user=> (s/def ::interval-with-spec-and #(s/and (> % 0.0) (< % 1.0)))user=> (s/valid? ::interval-with-cloj-and 1.0)false*That's what I expected. *user=> (s/valid? ::interval-with-spec-and 1.0

Re: [Review] Slow server, not maxing out CPU

2016-07-21 Thread Вук Мировић
On Thursday, July 21, 2016 at 6:15:46 AM UTC+2, James Reeves wrote: > > On 21 July 2016 at 05:05, Ashish Negi > > wrote: > >> with core async `go` you can not do blocking IO or any time consuming >> work. >> `go` uses fixed threadpool (no of cpus + 2 or something). >> and in your async-handler

Re: meaning of spec/and ?

2016-07-21 Thread Steve Miner
It looks like you’ve got your #s misplaced. I think you want something like this: (s/and #(> % 0.0) #(< % 1.0)) Of course, the first predicate expression could be replaced by `pos?`. The `s/and` returns a single spec that combines multiple specs. Of course, `clojure.core/and` is basically th

Re: meaning of spec/and ?

2016-07-21 Thread Mars0i
Ahh... I realized my mistake very soon after I posted the question, and deleted it. You must have caught it before it went away. Your explanation is helpful, though. Thanks. On Thursday, July 21, 2016 at 1:30:56 PM UTC-5, miner wrote: > > It looks like you’ve got your #s misplaced. I think

Re: meaning of spec/and ?

2016-07-21 Thread adrian . medina
Just for future reference this is a mailing list and not a traditional forum, so after you post something here it will email everyone subscribed. On Thursday, July 21, 2016 at 6:24:28 PM UTC-4, Mars0i wrote: > > Ahh... I realized my mistake very soon after I posted the question, and > deleted

Re: meaning of spec/and ?

2016-07-21 Thread Sean Corfield
And deleting a post from the Google Groups interface still leaves everyone else’s replies – and in this case Steve’s first reply to your included your original post anyway… https://groups.google.com/forum/?hl=en#!topic/clojure/MxJOgQJPGN8 Sean Corfield -- (970) FOR-SEAN -- (904) 302-SEAN

async-webinar vs. lein-cljsbuild vs nooby

2016-07-21 Thread hiskennyness
This cemo of channels in a web client works great. https://github.com/cognitect/async-webinar/blob/master/project.clj It uses plugin: [lein-cljsbuild "1.0.4-SNAPSHOT"] While trying to extend the webinar with my Cells library https://github.com/kennytilton/rube (which loads nicely from clo

ANN: One-Time 0.1.0 [One Time Password (TOTP and HOTP) library for Clojure]

2016-07-21 Thread Suvash Thapaliya
One-Time is a Clojure library for generating one time passwords (HOTP & TOTP) as per RFC 4226 and RFC 6238. TOTP/HOTP is widely used for Multi-Factor Authentication. Leiningen dependency: [one-time "0.1.0"] This is the first release of the library. https://github.com/suvash/one-time - The l

Re: meaning of spec/and ?

2016-07-21 Thread Mars0i
On Thursday, July 21, 2016 at 5:34:37 PM UTC-5, adrian...@mail.yu.edu wrote: > > Just for future reference this is a mailing list and not a traditional > forum, so after you post something here it will email everyone subscribed. > Thanks Adrian. I actually didn't realize that. -- You receive

Re: Amazonica and S3

2016-07-21 Thread Andrea Richiardi
I am glad you solved and raised the issue so that we can track that! -- 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

fspec requires dependency on test.check

2016-07-21 Thread Joe Selman
I have a simple lein project on clojure 1.9.0-alpha10 with no other dependencies. Trying to use fspec and explain yields an error: (require '[clojure.spec :as s]) > => nil > (s/def ::my-spec (s/fspec :args string? :ret string?)) > => :user/my-spec > (s/explain ::my-spec (fn [_] "foo")) > FileNotF

Re: fspec requires dependency on test.check

2016-07-21 Thread Alex Miller
Hi Joe, This is an area of ongoing work and the following ticket captures this issue as well: http://dev.clojure.org/jira/browse/CLJ-1936 (and duped http://dev.clojure.org/jira/browse/CLJ-1976) Spec by itself should not require a test.check dependency. Alex On Thursday, July 21, 2016 at 11:

Re: fspec requires dependency on test.check

2016-07-21 Thread Joe Selman
Great, thanks! On Thursday, July 21, 2016 at 10:02:51 PM UTC-7, Alex Miller wrote: > > Hi Joe, > > This is an area of ongoing work and the following ticket captures this > issue as well: > > http://dev.clojure.org/jira/browse/CLJ-1936 (and duped > http://dev.clojure.org/jira/browse/CLJ-1976) > >