Clojure infrastructure update

2016-11-18 Thread Alex Miller
I have been working with our hosting provider (thanks Contegix!) to upgrade the hosts underneath *dev.clojure.org * (JIRA and confluence) and *build.clojure.org * (Hudson). The new hosts are much more recent versions of the OS and seem to be faster.

Re: Design pattern question: how to decouple data layer from application layer in Luminus service?

2016-11-18 Thread Gary Trakhman
It's dirty and not thread-safe, but you can always replace any clojure function (caveat: that's not direct-linked (only clojure.core 1.8+)) temporarily during testing with with-redefs. Instead of mocking out the functions, you might consider mocking out the database, or the data inside the databas

Design pattern question: how to decouple data layer from application layer in Luminus service?

2016-11-18 Thread Travis Daudelin
Hello everyone! I am investigating Clojure and, more specifically, Luminus , for a new service my organization will be building soon. My team and I are really excited by the prospect of trying out something new. There is a lot that I like about Luminus' design, but

Re: Validate different maps that have the same keys in the same namespace

2016-11-18 Thread Alex Miller
On Friday, November 18, 2016 at 7:55:31 AM UTC-6, damien.rago...@gmail.com wrote: > > Got it. > > Thanks for the answers. > > I still feel that the global registry for specs is weird. It seems so easy > to have namespaced keyword conflicts coming from various namespaces, > specially in big pro

Re: Is there any way to pass clojure spec conform value to next spec?

2016-11-18 Thread Alex Miller
You need to use s/and, not and. On Friday, November 18, 2016 at 10:13:50 AM UTC-6, Mamun wrote: > > HI All > > Take an example in bellow > > (defn x-int? [x] > (cond > (integer? x) x > (string? x) (try > (Integer/parseInt x) > (catch Exception e >

Is there any way to pass clojure spec conform value to next spec?

2016-11-18 Thread Mamun
HI All Take an example in bellow (defn x-int? [x] (cond (integer? x) x (string? x) (try (Integer/parseInt x) (catch Exception e :clojure.spec/invalid)) :else :clojure.spec/invalid)) (s/explain (and (s/conformer x-int?) (s/i

Re: Validate different maps that have the same keys in the same namespace

2016-11-18 Thread damien . ragoucy
Got it. Thanks for the answers. I still feel that the global registry for specs is weird. It seems so easy to have namespaced keyword conflicts coming from various namespaces, specially in big projects where people don't know well each other's work. It is quite different from the regular Cloju

Re: [ANN] (:brno clojure) - new Clojure focused meetup group in Brno, Czech Republic

2016-11-18 Thread Karel Miarka
The location has changed. We are going to meet in a pub: Restaurace Zlatý Grál , Křenová 66, Brno On Friday, November 4, 2016 at 4:57:26 PM UTC+1, Karel Miarka wrote: > > Hi, > > if you are interested, feel free to joi