Re: clojure.spec.test/instrument causes clojure.spec/exercise-fn to use generators which fail the args spec!?

2016-10-19 Thread Beau Fabry
You have two possible branches for your ::fizbuzz arguments, a one-arity and a 3-arity. The 1-arity branch allows for the value 1, which when passed to the function fizzbuzz recursively calls the function fizzbuzz with the arguments (3 5 1) is not a valid set of values for ::fizzbuzz and so rais

clojure.spec.test/instrument causes clojure.spec/exercise-fn to use generators which fail the args spec!?

2016-10-19 Thread J.-F. Rompre
I am trying to learn clojure.spec and tried my hand at a spec for a fizzbuzz function. For some strange reason, generators created for it fail the same spec during clojure.spec/exercise-fn ! Stranger, this happens only if the same function is first instrumented using clojure.spec.stest/instrum

[ANN] Milestones, the smart project planning assistant, is now online with NLP and GANTT!

2016-10-19 Thread Rafik NACCACHE
Hey everybody, Milestones, the smart project planning assistant, just got 0.3.0 with Natural Language Processing and GANTT! Please have a look on it here: http://turbopape.github.io/milestones/ Cheers ! -- You received this message because you are subscribed to the Google Groups "Clojure" group.

Re: protocols and namespaces confusion (with an example from core.matrix)

2016-10-19 Thread Gregg Reynolds
On Wed, Oct 19, 2016 at 5:00 PM, Paul Gowder wrote: > Thanks Gregg and Alex! I didn't realize that protocols (or the black > magic interfacing of core.matrix) were that fancy. Definitely going into > my "code to really dig into" list. > > It's remotely possible that you might find the following

Re: protocols and namespaces confusion (with an example from core.matrix)

2016-10-19 Thread Paul Gowder
Thanks Gregg and Alex! I didn't realize that protocols (or the black magic interfacing of core.matrix) were that fancy. Definitely going into my "code to really dig into" list. Cheers, -Paul -- You received this message because you are subscribed to the Google Groups "Clojure" group. To pos

Re: protocols and namespaces confusion (with an example from core.matrix)

2016-10-19 Thread Alex Miller
On Wednesday, October 19, 2016 at 7:23:21 AM UTC-5, Paul Gowder wrote: > > Hi folks, > > I have a kinda basic question (I think?) that I should really know the > answer to after writing Clojure for like 8 months, but don't. It's about > requiring namespaces with protocol definitions in them b

Re: ANN: ClojureScript 1.9.293

2016-10-19 Thread Rangel Spasov
Works on our Cljs + React Native + om.next iOS app - thanks everyone involved! P.S. For anyone using Om.next: make sure to bump to "1.0.0-alpha47". On Wednesday, October 19, 2016 at 11:30:01 AM UTC-7, David Nolen wrote: > > ClojureScript, the Clojure compiler that emits JavaScript source code.

Re: protocols and namespaces confusion (with an example from core.matrix)

2016-10-19 Thread Gregg Reynolds
On Oct 19, 2016 7:23 AM, "Paul Gowder" wrote: > > Hi folks, > > I have a kinda basic question (I think?) that I should really know the answer to after writing Clojure for like 8 months, but don't. It's about requiring namespaces with protocol definitions in them but not the actual implementations

Re: clojure.spec: Relationships Between Specs

2016-10-19 Thread Mark Bastian
Very cool. Thanks! -- 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,

Re: clojure.spec: Relationships Between Specs

2016-10-19 Thread Alex Miller
Sorry, should have been :req, not ::req in there. :) It generates too: user=> (gen/sample (s/gen ::xrange)) (#:user{:x0 0, :x1 1} #:user{:x0 1, :x1 5} #:user{:x0 0, :x1 1} #:user{:x0 0, :x1 1} #:user{:x0 2, :x1 9} #:user{:x0 0, :x1 13} #:user{:x0 0, :x1 6} #:user{:x0 1, :x1 62} #:user{:x0 2, :x

Re: clojure.spec: Relationships Between Specs

2016-10-19 Thread Alex Miller
s/and will flow the conformed result to the next predicate so something like this should work: (s/def ::xrange (s/and (s/keys ::req [::x0 ::x1]) (fn [{:keys [::x0 ::x1]}] (< x0 x1 On Wednesday, October 19, 2016 at 12:27:04 PM UTC-5, Mark Bastian wrote: > > Is it possible to

ANN: ClojureScript 1.9.293

2016-10-19 Thread David Nolen
ClojureScript, the Clojure compiler that emits JavaScript source code. README and source code: https://github.com/clojure/clojurescript Leiningen dependency information: [org.clojure/clojurescript "1.9.293"] This release fixes a major issue with transit analysis caching where files were leaked.

clojure.spec: Relationships Between Specs

2016-10-19 Thread Mark Bastian
Is it possible to specify relationships between spec values. For example: (s/def ::x0 (int-in 0 100)) (s/def ::x1 (int-in 0 100)) ;I now want to say something along the lines of (note that the :where is totally made up - just conveying the intent): (s/def ::xrange (s/keys ::req [::x0 ::x1 :where

interop method confusion?

2016-10-19 Thread hiskennyness
This code excerpt (most significantly the createProducer call) works swimmingly: (defn t-prod [ct] > (with-open [client (PulsarClient/create "http://localhost:8080";)] > (pln :client (bean client)) > (with-open [prod (.createProducer client > "persistent://sample/standalone/ns1/ktopic"

Re: [ANN] Nightlight, an embedded editor for Clojure

2016-10-19 Thread Zach Oakes
I forgot all about the dependency issue, sorry about that. I just released 1.0.1 which removes that dependency so hopefully it should work without requiring that workaround. On Wednesday, October 19, 2016 at 9:46:39 AM UTC-4, ma...@pickaplay.net wrote: > > Although, I am using boot and not lein

[ANN] lein-docker-compose - inject docker-compose port mappings into environ's `env`

2016-10-19 Thread Russell
Hi, we've just released the first version of a small leiningen plugin that makes using docker-compose with your Clojure projects easier. lein-docker-compose discovers the port mappings created by docker-compose and injects them into environ.core/env. Code is here: https://github.com/HealthUnlo

Re: [ANN] Nightlight, an embedded editor for Clojure

2016-10-19 Thread marc
Although, I am using boot and not lein, I added this dependency to my project: [org.flatland/useful "0.11.5"]. After this, nightlight works as it should. On Sunday, October 9, 2016 at 2:33:31 PM UTC-4, Zach Oakes wrote: > > I'll look into it. It looks like it's probably a dependency conflict.

protocols and namespaces confusion (with an example from core.matrix)

2016-10-19 Thread Paul Gowder
Hi folks, I have a kinda basic question (I think?) that I should really know the answer to after writing Clojure for like 8 months, but don't. It's about requiring namespaces with protocol definitions in them but not the actual implementations of those protocols, and how it works. tl/dr: i

ANN: IN/Clojure 2016 - India's first Clojure conference

2016-10-19 Thread Baishampayan Ghose
Hello Clojurists, I am delighted to announce IN/Clojure, India's first and only Clojure conference. It will be a one day, single track conference with interesting Clojure talks as well as ample opportunity to interact with fellow Clojurians from India and abroad. The conference is aimed at Cloju

Re: Possible ClojureScript compiler issue...

2016-10-19 Thread John Szakmeister
Fantastic! Thank you! -John On Tue, Oct 18, 2016 at 11:49 PM, David Nolen wrote: > This issue is fixed in master now thanks to Thomas Heller. The performance > hit is negligible. > > Thank you for the report. > > David > > On Tue, Oct 18, 2016 at 3:45 PM, John Szakmeister > wrote: >> >> On Tue