[ANN] Directory of Clojure Consultants

2017-05-18 Thread Robert Herrmann


I recently started a directory for clojure consultants,

http://clojureconsultants.org

The idea being if you are looking for work, or for help for your team - the 
site should help you locate enthusiastic help!

Cheers
-bob
 

-- 
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Looking for help creating this function/macro

2017-05-18 Thread david swift
Hey Guys, 

I am looking for help creating a particular function/macro, right now I've 
no experience using macro's and I'm under the impression it might be the 
right solution to my problem, that produces a spec output but a very 
specific spec output. My goal here is to reduce the constant repeating of 
the same spec over and over with only the tag portion being the part that 
changes.

this is a little helper function I've been using to reduce repeating
(defn- tag [tag] (s/and keyword? #{tag}))

this is the core of what I need help with, this is currently what I have 
and find it not to work, even in macro form but that's most likely down to 
my poor knowledge of macro's.
(defn html-spec-creator [html-tag] 
   (s/def html-tag 
 (s/or 
 :map (st-ds/spec html-tag {:tag (tag html-tag)})
 :vector (s/cat :tag (tag html-tag)


(html-spec-creator ::a)

the intended output of the above is to produce the following
(s/def ::a (s/or :map (st-ds/spec ::a {:tag (tag :a)}) :vector (s/cat :tag (tag 
:a

-- 
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Looking for help creating this function/macro

2017-05-18 Thread david swift
I forgot to mention I am using the following 
library https://github.com/metosin/spec-tools; where you see (st-ds/spec) 
calls is the use of that library.

On Thursday, 18 May 2017 17:21:45 UTC+1, david swift wrote:
>
> Hey Guys, 
>
> I am looking for help creating a particular function/macro, right now I've 
> no experience using macro's and I'm under the impression it might be the 
> right solution to my problem, that produces a spec output but a very 
> specific spec output. My goal here is to reduce the constant repeating of 
> the same spec over and over with only the tag portion being the part that 
> changes.
>
> this is a little helper function I've been using to reduce repeating
> (defn- tag [tag] (s/and keyword? #{tag}))
>
> this is the core of what I need help with, this is currently what I have 
> and find it not to work, even in macro form but that's most likely down to 
> my poor knowledge of macro's.
> (defn html-spec-creator [html-tag] 
>(s/def html-tag 
>  (s/or 
>  :map (st-ds/spec html-tag {:tag (tag html-tag)})
>  :vector (s/cat :tag (tag html-tag)
>
>
> (html-spec-creator ::a)
>
> the intended output of the above is to produce the following
> (s/def ::a (s/or :map (st-ds/spec ::a {:tag (tag :a)}) :vector (s/cat :tag 
> (tag :a
>
>

-- 
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [clojure.spec/form] Need for evaluated subspecs

2017-05-18 Thread Alex Miller


On Wednesday, May 17, 2017 at 3:02:17 PM UTC-5, 
marian.hor...@vacuumlabs.com wrote:
>
> Hi,
>
> I am writing a function that transforms Specs to another formats (similar 
> to the JSON Schema). Assuming from this post 
> ,
>  
> I am not the only one. There is no surprise that I am using 
> clojure.spec/form. Unfortunately I am not fully satisfied with its 
> output. To illustrate the problem let's suppose that my transformer will be 
> used by a third person who like to write its own spec-generating helpers:
>
> (require '[clojure.spec.alpha :as spec])
>
> (spec/def ::forgivable-keyword (spec/conformer (fn [x] (cond (keyword? x) x
>  (string? x) 
> (keyword x)
>  true 
> ::spec/invalid
>
> (defn kw-enum [& enum-values] (spec/and ::forgivable-keyword (apply 
> hash-set enum-values)))
>
>
s/and (and all of the spec forms) are macros to facilitate capturing the 
spec form for use in s/form and error reporting.

In this case, (apply hash-set enum-values) is not either a predicate or a 
set and thus is not a valid spec to use in s/and. 

I presume what you're looking for is the ability to dynamically create 
specs - for this, please consider using either eval or a macro.

 

> Cool! Let's look how can my transformer cope with it!
>
> (spec/form (kw-enum :a :b :c))
> ; (clojure.spec.alpha/and 
> :my-ns/forgivable-keyword (clojure.core/apply clojure.core/hash-set 
> enum-values))
>
> Ouch! Have I just seen a local symbol in the form? I am sorry third 
> person, I won't be able to transform the output of your spec-generating 
> functions. Unless they are macros:
>
> (defmacro kw-enum [& enum-values] `(spec/and ::forgivable-keyword ~(apply 
> hash-set enum-values)))
>
> (spec/form (kw-enum :a :b :c))
> ; (clojure.spec.alpha/and :my-ns/forgivable-keyword #{:c :b :a})
>
> This approach looks better. How does it work in combination with other 
> specs?
>
> (spec/form (spec/nilable (kw-enum :a :b :c)))
> ; (clojure.spec.alpha/nilable (my-ns/kw-enum :a :b :c))
>
> There we are. A third-person's function is in the form. We could use eval to 
> resolve it, but do we want to? 
>

Sure. It resolved to a spec last time, why not this time? OR, why do you 
need to resolve it at all? (this to some degree depends on the use case)
 

> It has been already evaluated once. What if there are some side effects?
>

Then I'd say you already have more important problems.
 

> Practically, one has no option to write spec-generating function and 
> maintain usability of the spec/form at the same time. Therefore one of 
> four situations must have happened. Either I got something wrong, Specs are 
> not meant to be introspected, Specs are not meant to be generated or 
> spec/form is badly designed. Which one is it?
>

Seems to me like you can generate and introspect this fine. I think that if 
you are introspecting spec forms, you will encounter resolved symbols 
referring to functions. How you approach the use of those depends on your 
context.

Another option still coming (work in progress) is to use specs on spec 
forms (CLJ-2112) to create conformed spec data, then s/unform back to a 
spec form. 
 

>
> (In the case of the fourth one I have some suggestions, but lets keep them 
> for later conversation)
>
> Thanks for your time
>
> Marian
>

-- 
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Looking for help creating this function/macro

2017-05-18 Thread James Reeves
I'd first factor out all the parts you can into a function. So for instance:

(defn html-spec [html-tag]
  (s/or :map(st-ds/spec html-tag {:tag (tag html-tag)})
:vector (s/cat :tag (tag html-tag

This will allow you to write:

(s/def ::a (html-spec ::a))

I'd be inclined to leave it there, but if you really want to use a macro,
we could write:

(defmacro def-html-spec [html-tag]
  `(s/def ~html-tag (html-spec ~html-tag)))

Notice that the macro starts with "def". This is a good indicator for
anyone using it that this is a macro that defines something.

On 18 May 2017 at 17:23, david swift  wrote:

> I forgot to mention I am using the following library https://github.com/
> metosin/spec-tools; where you see (st-ds/spec) calls is the use of that
> library.
>
>
> On Thursday, 18 May 2017 17:21:45 UTC+1, david swift wrote:
>>
>> Hey Guys,
>>
>> I am looking for help creating a particular function/macro, right now
>> I've no experience using macro's and I'm under the impression it might be
>> the right solution to my problem, that produces a spec output but a very
>> specific spec output. My goal here is to reduce the constant repeating of
>> the same spec over and over with only the tag portion being the part that
>> changes.
>>
>> this is a little helper function I've been using to reduce repeating
>> (defn- tag [tag] (s/and keyword? #{tag}))
>>
>> this is the core of what I need help with, this is currently what I have
>> and find it not to work, even in macro form but that's most likely down to
>> my poor knowledge of macro's.
>> (defn html-spec-creator [html-tag]
>>(s/def html-tag
>>  (s/or
>>  :map (st-ds/spec html-tag {:tag (tag html-tag)})
>>  :vector (s/cat :tag (tag html-tag)
>>
>>
>> (html-spec-creator ::a)
>>
>> the intended output of the above is to produce the following
>> (s/def ::a (s/or :map (st-ds/spec ::a {:tag (tag :a)}) :vector (s/cat :tag
>> (tag :a
>>
>> --
> 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, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
James Reeves
booleanknot.com

-- 
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Looking for help creating this function/macro

2017-05-18 Thread david swift
Thanks James gonna try it out now

On Thursday, 18 May 2017 17:46:02 UTC+1, James Reeves wrote:
>
> I'd first factor out all the parts you can into a function. So for 
> instance:
>
> (defn html-spec [html-tag]
>   (s/or :map(st-ds/spec html-tag {:tag (tag html-tag)})
> :vector (s/cat :tag (tag html-tag
>
> This will allow you to write:
>
> (s/def ::a (html-spec ::a))
>
> I'd be inclined to leave it there, but if you really want to use a macro, 
> we could write:
>
> (defmacro def-html-spec [html-tag]
>   `(s/def ~html-tag (html-spec ~html-tag)))
>
> Notice that the macro starts with "def". This is a good indicator for 
> anyone using it that this is a macro that defines something.
>
> On 18 May 2017 at 17:23, david swift > 
> wrote:
>
>> I forgot to mention I am using the following library 
>> https://github.com/metosin/spec-tools; where you see (st-ds/spec) calls 
>> is the use of that library.
>>
>>
>> On Thursday, 18 May 2017 17:21:45 UTC+1, david swift wrote:
>>>
>>> Hey Guys, 
>>>
>>> I am looking for help creating a particular function/macro, right now 
>>> I've no experience using macro's and I'm under the impression it might be 
>>> the right solution to my problem, that produces a spec output but a very 
>>> specific spec output. My goal here is to reduce the constant repeating of 
>>> the same spec over and over with only the tag portion being the part that 
>>> changes.
>>>
>>> this is a little helper function I've been using to reduce repeating
>>> (defn- tag [tag] (s/and keyword? #{tag}))
>>>
>>> this is the core of what I need help with, this is currently what I have 
>>> and find it not to work, even in macro form but that's most likely down to 
>>> my poor knowledge of macro's.
>>> (defn html-spec-creator [html-tag] 
>>>(s/def html-tag 
>>>  (s/or 
>>>  :map (st-ds/spec html-tag {:tag (tag html-tag)})
>>>  :vector (s/cat :tag (tag html-tag)
>>>
>>>
>>> (html-spec-creator ::a)
>>>
>>> the intended output of the above is to produce the following
>>> (s/def ::a (s/or :map (st-ds/spec ::a {:tag (tag :a)}) :vector (s/cat :tag 
>>> (tag :a
>>>
>>> -- 
>> You received this message because you are subscribed to the Google
>> Groups "Clojure" group.
>> To post to this group, send email to clo...@googlegroups.com 
>> 
>> Note that posts from new members are moderated - please be patient with 
>> your first post.
>> To unsubscribe from this group, send email to
>> clojure+u...@googlegroups.com 
>> For more options, visit this group at
>> http://groups.google.com/group/clojure?hl=en
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "Clojure" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to clojure+u...@googlegroups.com .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> -- 
> James Reeves
> booleanknot.com
>

-- 
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [clojure.spec/form] Need for evaluated subspecs

2017-05-18 Thread Leon Grapenthin
I also have this problem. 

1. If I create a dynamic spec constructor per defmacro and invoke it, it's 
s/form gives the primitive specs form - because spec doesn't provide me 
with a way to facilitate specs that capture their form.

2. If I apply that invocation to another primitive spec, s/form of that 
just contains the macro invocation form.

If this is intentional, I'd also like to know the underlying design rule 
(not the reasons why that is so in the current implementation): Why should 
this result in two different forms for one and the same spec to deal with, 
instead of one.

The reason to create "dynamic" spec constructors is usually to avoid 
boilerplate when writing specs. Unless I'm missing what I shouldn't do, I'd 
prefer to have direct support for that spares me having to deal with two 
forms.

Kind regards,
 Leon.

On Thursday, May 18, 2017 at 6:35:46 PM UTC+2, Alex Miller wrote:
>
>
>
> On Wednesday, May 17, 2017 at 3:02:17 PM UTC-5, marian...@vacuumlabs.com 
>  wrote:
>>
>> Hi,
>>
>> I am writing a function that transforms Specs to another formats (similar 
>> to the JSON Schema). Assuming from this post 
>> ,
>>  
>> I am not the only one. There is no surprise that I am using 
>> clojure.spec/form. Unfortunately I am not fully satisfied with its 
>> output. To illustrate the problem let's suppose that my transformer will be 
>> used by a third person who like to write its own spec-generating helpers:
>>
>> (require '[clojure.spec.alpha :as spec])
>>
>> (spec/def ::forgivable-keyword (spec/conformer (fn [x] (cond (keyword? x) 
>> x
>>  (string? x) 
>> (keyword x)
>>  true 
>> ::spec/invalid
>>
>> (defn kw-enum [& enum-values] (spec/and ::forgivable-keyword (apply 
>> hash-set enum-values)))
>>
>>
> s/and (and all of the spec forms) are macros to facilitate capturing the 
> spec form for use in s/form and error reporting.
>
> In this case, (apply hash-set enum-values) is not either a predicate or a 
> set and thus is not a valid spec to use in s/and. 
>
> I presume what you're looking for is the ability to dynamically create 
> specs - for this, please consider using either eval or a macro.
>
>  
>
>> Cool! Let's look how can my transformer cope with it!
>>
>> (spec/form (kw-enum :a :b :c))
>> ; (clojure.spec.alpha/and 
>> :my-ns/forgivable-keyword (clojure.core/apply clojure.core/hash-set 
>> enum-values))
>>
>> Ouch! Have I just seen a local symbol in the form? I am sorry third 
>> person, I won't be able to transform the output of your spec-generating 
>> functions. Unless they are macros:
>>
>> (defmacro kw-enum [& enum-values] `(spec/and ::forgivable-keyword ~(apply 
>> hash-set enum-values)))
>>
>> (spec/form (kw-enum :a :b :c))
>> ; (clojure.spec.alpha/and :my-ns/forgivable-keyword #{:c :b :a})
>>
>> This approach looks better. How does it work in combination with other 
>> specs?
>>
>> (spec/form (spec/nilable (kw-enum :a :b :c)))
>> ; (clojure.spec.alpha/nilable (my-ns/kw-enum :a :b :c))
>>
>> There we are. A third-person's function is in the form. We could use eval to 
>> resolve it, but do we want to? 
>>
>
> Sure. It resolved to a spec last time, why not this time? OR, why do you 
> need to resolve it at all? (this to some degree depends on the use case)
>  
>
>> It has been already evaluated once. What if there are some side effects?
>>
>
> Then I'd say you already have more important problems.
>  
>
>> Practically, one has no option to write spec-generating function and 
>> maintain usability of the spec/form at the same time. Therefore one of 
>> four situations must have happened. Either I got something wrong, Specs are 
>> not meant to be introspected, Specs are not meant to be generated or 
>> spec/form is badly designed. Which one is it?
>>
>
> Seems to me like you can generate and introspect this fine. I think that 
> if you are introspecting spec forms, you will encounter resolved symbols 
> referring to functions. How you approach the use of those depends on your 
> context.
>
> Another option still coming (work in progress) is to use specs on spec 
> forms (CLJ-2112) to create conformed spec data, then s/unform back to a 
> spec form. 
>  
>
>>
>> (In the case of the fourth one I have some suggestions, but lets keep 
>> them for later conversation)
>>
>> Thanks for your time
>>
>> Marian
>>
>

-- 
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to

[spec] Instrumentation for protocol methods?

2017-05-18 Thread Yuri Govorushchenko
Hello,

I wonder, will it be possible to add specs to defprotocols? I use protocols 
a lot and it would be very handy to be able to instrument protocol methods. 
It is something Plumatic Schema cannot do at the 
moment: https://github.com/plumatic/schema/issues/117

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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [spec] Instrumentation for protocol methods?

2017-05-18 Thread Alex Miller
For the forseeable future, no.

On Thursday, May 18, 2017 at 2:28:25 PM UTC-5, Yuri Govorushchenko wrote:
>
> Hello,
>
> I wonder, will it be possible to add specs to defprotocols? I use 
> protocols a lot and it would be very handy to be able to instrument 
> protocol methods. It is something Plumatic Schema cannot do at the moment: 
> https://github.com/plumatic/schema/issues/117 
> 
>
> 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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [clojure.spec/form] Need for evaluated subspecs

2017-05-18 Thread Alex Miller


On Thursday, May 18, 2017 at 12:37:26 PM UTC-5, Leon Grapenthin wrote:
>
> I also have this problem. 
>
> 1. If I create a dynamic spec constructor per defmacro and invoke it, it's 
> s/form gives the primitive specs form - because spec doesn't provide me 
> with a way to facilitate specs that capture their form.
>

The idea of providing custom form serialization support is one I have spent 
quite a bit of time looking at (in particular wrt s/&, s/keys*, and the 
range specs, but in practice the same problem is being worked around in the 
coll specs, etc). I've done spikes on three possible directions for this 
and I can't say any of them is an unambiguous win so it's going to require 
some Rich time at some point to make further decisions. In some ways it's 
an analogous problem to how custom gens are implemented.
 

> 2. If I apply that invocation to another primitive spec, s/form of that 
> just contains the macro invocation form.
>
> If this is intentional, I'd also like to know the underlying design rule 
> (not the reasons why that is so in the current implementation): Why should 
> this result in two different forms for one and the same spec to deal with, 
> instead of one.
>

The principle is to capture the spec form at the time of construction for 
the purposes of a) reporting and b) serialization via s/form. That seems 
satisfied in both cases. 
 

> The reason to create "dynamic" spec constructors is usually to avoid 
> boilerplate when writing specs. Unless I'm missing what I shouldn't do, I'd 
> prefer to have direct support for that spares me having to deal with two 
> forms.
>

In what way are you "dealing with" two forms? Why is that a problem?
 

>
> Kind regards,
>  Leon.
>
> On Thursday, May 18, 2017 at 6:35:46 PM UTC+2, Alex Miller wrote:
>>
>>
>>
>> On Wednesday, May 17, 2017 at 3:02:17 PM UTC-5, marian...@vacuumlabs.com 
>> wrote:
>>>
>>> Hi,
>>>
>>> I am writing a function that transforms Specs to another formats 
>>> (similar to the JSON Schema). Assuming from this post 
>>> ,
>>>  
>>> I am not the only one. There is no surprise that I am using 
>>> clojure.spec/form. Unfortunately I am not fully satisfied with its 
>>> output. To illustrate the problem let's suppose that my transformer will be 
>>> used by a third person who like to write its own spec-generating helpers:
>>>
>>> (require '[clojure.spec.alpha :as spec])
>>>
>>> (spec/def ::forgivable-keyword (spec/conformer (fn [x] (cond (keyword? 
>>> x) x
>>>  (string? x) 
>>> (keyword x)
>>>  true 
>>> ::spec/invalid
>>>
>>> (defn kw-enum [& enum-values] (spec/and ::forgivable-keyword (apply 
>>> hash-set enum-values)))
>>>
>>>
>> s/and (and all of the spec forms) are macros to facilitate capturing the 
>> spec form for use in s/form and error reporting.
>>
>> In this case, (apply hash-set enum-values) is not either a predicate or a 
>> set and thus is not a valid spec to use in s/and. 
>>
>> I presume what you're looking for is the ability to dynamically create 
>> specs - for this, please consider using either eval or a macro.
>>
>>  
>>
>>> Cool! Let's look how can my transformer cope with it!
>>>
>>> (spec/form (kw-enum :a :b :c))
>>> ; (clojure.spec.alpha/and 
>>> :my-ns/forgivable-keyword (clojure.core/apply clojure.core/hash-set 
>>> enum-values))
>>>
>>> Ouch! Have I just seen a local symbol in the form? I am sorry third 
>>> person, I won't be able to transform the output of your spec-generating 
>>> functions. Unless they are macros:
>>>
>>> (defmacro 
>>> kw-enum [& enum-values] `(spec/and ::forgivable-keyword ~(apply 
>>> hash-set enum-values)))
>>>
>>> (spec/form (kw-enum :a :b :c))
>>> ; (clojure.spec.alpha/and :my-ns/forgivable-keyword #{:c :b :a})
>>>
>>> This approach looks better. How does it work in combination with other 
>>> specs?
>>>
>>> (spec/form (spec/nilable (kw-enum :a :b :c)))
>>> ; (clojure.spec.alpha/nilable (my-ns/kw-enum :a :b :c))
>>>
>>> There we are. A third-person's function is in the form. We could use 
>>> eval to resolve it, but do we want to? 
>>>
>>
>> Sure. It resolved to a spec last time, why not this time? OR, why do you 
>> need to resolve it at all? (this to some degree depends on the use case)
>>  
>>
>>> It has been already evaluated once. What if there are some side effects?
>>>
>>
>> Then I'd say you already have more important problems.
>>  
>>
>>> Practically, one has no option to write spec-generating function and 
>>> maintain usability of the spec/form at the same time. Therefore one of 
>>> four situations must have happened. Either I got something wrong, Specs are 
>>> not meant to be introspected, Specs are not meant to be generated or 
>>> spec/form is badly designed. Which one is it?
>>>
>>
>> Seems to me like you can generate and introspect this fine. I thi

Immediate Sr Engg Contract - Clojure Developer

2017-05-18 Thread chad . kapadia
Hi ,

I am looking for a Sr Engg with deep Clojure skills for a 2-3 month 
contract. Java will be a big plus.

We are in SOMA, 3 blocks from the Ferry building.

Thank you

-- 
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


slackpocalypse?

2017-05-18 Thread Gregg Reynolds
is it just me? i've been unable to connect to clojurians (by cellphone) for
about 30 minutes, but i can connect to other slack groups.

have we hit
https://github.com/clojurians/clojurians-chat/wiki/Slackpocalypse?  we're
almost to 10K subscribers.

g

-- 
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: slackpocalypse?

2017-05-18 Thread Kenny Williams
I am not able to connect via the web UI or Slack app either.

On Thursday, May 18, 2017 at 1:15:17 PM UTC-7, Gregg Reynolds wrote:
>
> is it just me? i've been unable to connect to clojurians (by cellphone) 
> for about 30 minutes, but i can connect to other slack groups.
>
> have we hit 
> https://github.com/clojurians/clojurians-chat/wiki/Slackpocalypse?  we're 
> almost to 10K subscribers.
>
> g
>
>
>

-- 
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: slackpocalypse?

2017-05-18 Thread Jason Stewart
I'm experiencing the same thing, while I am able to connect with my other
slack teams.

On Thu, May 18, 2017 at 4:17 PM, Kenny Williams 
wrote:

> I am not able to connect via the web UI or Slack app either.
>
>
> On Thursday, May 18, 2017 at 1:15:17 PM UTC-7, Gregg Reynolds wrote:
>>
>> is it just me? i've been unable to connect to clojurians (by cellphone)
>> for about 30 minutes, but i can connect to other slack groups.
>>
>> have we hit https://github.com/clojurians/clojurians-chat/wiki/
>> Slackpocalypse?  we're almost to 10K subscribers.
>>
>> g
>>
>>
>> --
> 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, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: slackpocalypse?

2017-05-18 Thread Gregg Reynolds
On May 18, 2017 3:17 PM, "Kenny Williams"  wrote:

I am not able to connect via the web UI or Slack app either.


slack = bitkeeper?  i wonder if linus torvalds is busy.


On Thursday, May 18, 2017 at 1:15:17 PM UTC-7, Gregg Reynolds wrote:
>
> is it just me? i've been unable to connect to clojurians (by cellphone)
> for about 30 minutes, but i can connect to other slack groups.
>
> have we hit https://github.com/clojurians/clojurians-chat/wiki/
> Slackpocalypse?  we're almost to 10K subscribers.
>
> g
>
>
> --
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

-- 
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: slackpocalypse?

2017-05-18 Thread Gregg Reynolds
On May 18, 2017 3:32 PM, "Jason Stewart"  wrote:

I'm experiencing the same thing, while I am able to connect with my other
slack teams.


this is not looking good.  https://davechen.net/2017/01/slack-user-limit/


On Thu, May 18, 2017 at 4:17 PM, Kenny Williams 
wrote:

> I am not able to connect via the web UI or Slack app either.
>
>
> On Thursday, May 18, 2017 at 1:15:17 PM UTC-7, Gregg Reynolds wrote:
>>
>> is it just me? i've been unable to connect to clojurians (by cellphone)
>> for about 30 minutes, but i can connect to other slack groups.
>>
>> have we hit https://github.com/clojurians/clojurians-chat/wiki/Slack
>> pocalypse?  we're almost to 10K subscribers.
>>
>> g
>>
>>
>> --
> 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, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

-- 
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: slackpocalypse?

2017-05-18 Thread Dragan Djuric
It works for me as always.

On Thursday, May 18, 2017 at 10:34:33 PM UTC+2, Gregg Reynolds wrote:
>
>
>
> On May 18, 2017 3:32 PM, "Jason Stewart"  > wrote:
>
> I'm experiencing the same thing, while I am able to connect with my other 
> slack teams.
>
>
> this is not looking good.  https://davechen.net/2017/01/slack-user-limit/
>
>
> On Thu, May 18, 2017 at 4:17 PM, Kenny Williams  > wrote:
>
>> I am not able to connect via the web UI or Slack app either.
>>
>>
>> On Thursday, May 18, 2017 at 1:15:17 PM UTC-7, Gregg Reynolds wrote:
>>>
>>> is it just me? i've been unable to connect to clojurians (by cellphone) 
>>> for about 30 minutes, but i can connect to other slack groups.
>>>
>>> have we hit 
>>> https://github.com/clojurians/clojurians-chat/wiki/Slackpocalypse? 
>>>  we're almost to 10K subscribers.
>>>
>>> g
>>>
>>>
>>> -- 
>> You received this message because you are subscribed to the Google
>> Groups "Clojure" group.
>> To post to this group, send email to clo...@googlegroups.com 
>> 
>> Note that posts from new members are moderated - please be patient with 
>> your first post.
>> To unsubscribe from this group, send email to
>> clojure+u...@googlegroups.com 
>> For more options, visit this group at
>> http://groups.google.com/group/clojure?hl=en
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "Clojure" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to clojure+u...@googlegroups.com .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
> -- 
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clo...@googlegroups.com 
> Note that posts from new members are moderated - please be patient with 
> your first post.
> To unsubscribe from this group, send email to
> clojure+u...@googlegroups.com 
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> --- 
> You received this message because you are subscribed to the Google Groups 
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to clojure+u...@googlegroups.com .
> For more options, visit https://groups.google.com/d/optout.
>
>
>

-- 
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: slackpocalypse?

2017-05-18 Thread Timothy Baldridge
It's not working for me. I'm in the US, connecting via Chrome.

On Thu, May 18, 2017 at 2:40 PM, Dragan Djuric  wrote:

> It works for me as always.
>
> On Thursday, May 18, 2017 at 10:34:33 PM UTC+2, Gregg Reynolds wrote:
>>
>>
>>
>> On May 18, 2017 3:32 PM, "Jason Stewart"  wrote:
>>
>> I'm experiencing the same thing, while I am able to connect with my other
>> slack teams.
>>
>>
>> this is not looking good.  https://davechen.net/2017/01/slack-user-limit/
>>
>>
>> On Thu, May 18, 2017 at 4:17 PM, Kenny Williams 
>> wrote:
>>
>>> I am not able to connect via the web UI or Slack app either.
>>>
>>>
>>> On Thursday, May 18, 2017 at 1:15:17 PM UTC-7, Gregg Reynolds wrote:

 is it just me? i've been unable to connect to clojurians (by cellphone)
 for about 30 minutes, but i can connect to other slack groups.

 have we hit https://github.com/clojurians/clojurians-chat/wiki/
 Slackpocalypse?  we're almost to 10K subscribers.

 g


 --
>>> You received this message because you are subscribed to the Google
>>> Groups "Clojure" group.
>>> To post to this group, send email to clo...@googlegroups.com
>>> Note that posts from new members are moderated - please be patient with
>>> your first post.
>>> To unsubscribe from this group, send email to
>>> clojure+u...@googlegroups.com
>>> For more options, visit this group at
>>> http://groups.google.com/group/clojure?hl=en
>>> ---
>>> You received this message because you are subscribed to the Google
>>> Groups "Clojure" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to clojure+u...@googlegroups.com.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Clojure" group.
>> To post to this group, send email to clo...@googlegroups.com
>> Note that posts from new members are moderated - please be patient with
>> your first post.
>> To unsubscribe from this group, send email to
>> clojure+u...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/clojure?hl=en
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "Clojure" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to clojure+u...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
>>
>> --
> 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, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
“One of the main causes of the fall of the Roman Empire was that–lacking
zero–they had no way to indicate successful termination of their C
programs.”
(Robert Firth)

-- 
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: slackpocalypse?

2017-05-18 Thread Gregg Reynolds
On May 18, 2017 3:40 PM, "Dragan Djuric"  wrote:

It works for me as always.


hmm, maybe it's a hiccup.  where are you located, if you don't mind my
asking.


On Thursday, May 18, 2017 at 10:34:33 PM UTC+2, Gregg Reynolds wrote:
>
>
>
> On May 18, 2017 3:32 PM, "Jason Stewart"  wrote:
>
> I'm experiencing the same thing, while I am able to connect with my other
> slack teams.
>
>
> this is not looking good.  https://davechen.net/2017/01/slack-user-limit/
>
>
> On Thu, May 18, 2017 at 4:17 PM, Kenny Williams 
> wrote:
>
>> I am not able to connect via the web UI or Slack app either.
>>
>>
>> On Thursday, May 18, 2017 at 1:15:17 PM UTC-7, Gregg Reynolds wrote:
>>>
>>> is it just me? i've been unable to connect to clojurians (by cellphone)
>>> for about 30 minutes, but i can connect to other slack groups.
>>>
>>> have we hit https://github.com/clojurians/clojurians-chat/wiki/
>>> Slackpocalypse?  we're almost to 10K subscribers.
>>>
>>> g
>>>
>>>
>>> --
>> You received this message because you are subscribed to the Google
>> Groups "Clojure" group.
>> To post to this group, send email to clo...@googlegroups.com
>>
>> Note that posts from new members are moderated - please be patient with
>> your first post.
>> To unsubscribe from this group, send email to
>> clojure+u...@googlegroups.com
>>
>> For more options, visit this group at
>> http://groups.google.com/group/clojure?hl=en
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "Clojure" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to clojure+u...@googlegroups.com.
>>
>> For more options, visit https://groups.google.com/d/optout.
>>
>
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clo...@googlegroups.com
>
> Note that posts from new members are moderated - please be patient with
> your first post.
> To unsubscribe from this group, send email to
> clojure+u...@googlegroups.com
>
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+u...@googlegroups.com.
>
> For more options, visit https://groups.google.com/d/optout.
>
>
> --
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

-- 
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: slackpocalypse?

2017-05-18 Thread Dragan Djuric
Southeast Europe.

On Thu, May 18, 2017 at 10:45 PM Gregg Reynolds  wrote:

>
>
> On May 18, 2017 3:40 PM, "Dragan Djuric"  wrote:
>
> It works for me as always.
>
>
> hmm, maybe it's a hiccup.  where are you located, if you don't mind my
> asking.
>
>
> On Thursday, May 18, 2017 at 10:34:33 PM UTC+2, Gregg Reynolds wrote:
>>
>>
>>
>> On May 18, 2017 3:32 PM, "Jason Stewart"  wrote:
>>
>> I'm experiencing the same thing, while I am able to connect with my other
>> slack teams.
>>
>>
>> this is not looking good.  https://davechen.net/2017/01/slack-user-limit/
>>
>>
>> On Thu, May 18, 2017 at 4:17 PM, Kenny Williams 
>> wrote:
>>
>>> I am not able to connect via the web UI or Slack app either.
>>>
>>>
>>> On Thursday, May 18, 2017 at 1:15:17 PM UTC-7, Gregg Reynolds wrote:

 is it just me? i've been unable to connect to clojurians (by cellphone)
 for about 30 minutes, but i can connect to other slack groups.

 have we hit
 https://github.com/clojurians/clojurians-chat/wiki/Slackpocalypse?
  we're almost to 10K subscribers.

 g


 --
>>> You received this message because you are subscribed to the Google
>>> Groups "Clojure" group.
>>> To post to this group, send email to clo...@googlegroups.com
>>>
>>> Note that posts from new members are moderated - please be patient with
>>> your first post.
>>> To unsubscribe from this group, send email to
>>> clojure+u...@googlegroups.com
>>>
>>> For more options, visit this group at
>>> http://groups.google.com/group/clojure?hl=en
>>> ---
>>> You received this message because you are subscribed to the Google
>>> Groups "Clojure" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to clojure+u...@googlegroups.com.
>>>
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Clojure" group.
>> To post to this group, send email to clo...@googlegroups.com
>>
>> Note that posts from new members are moderated - please be patient with
>> your first post.
>> To unsubscribe from this group, send email to
>> clojure+u...@googlegroups.com
>>
>> For more options, visit this group at
>> http://groups.google.com/group/clojure?hl=en
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "Clojure" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to clojure+u...@googlegroups.com.
>>
>> For more options, visit https://groups.google.com/d/optout.
>>
>>
>> --
> 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, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
>
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
>
>
> For more options, visit https://groups.google.com/d/optout.
>
> --
> 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, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to a topic in the
> Google Groups "Clojure" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/clojure/83gTh5FV8bM/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: slackpocalypse?

2017-05-18 Thread Gregg Reynolds
looks like access is restored, for me at least.  still, slack is making me
a little nervous. and that's in addition to the 10K msg limit, which is a
pain.  anybody know antything about ryver? https://ryver.com/ryver-vs-slack/

On May 18, 2017 3:15 PM, "Gregg Reynolds"  wrote:

> is it just me? i've been unable to connect to clojurians (by cellphone)
> for about 30 minutes, but i can connect to other slack groups.
>
> have we hit https://github.com/clojurians/clojurians-chat/
> wiki/Slackpocalypse?  we're almost to 10K subscribers.
>
> g
>
>
>

-- 
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: slackpocalypse?

2017-05-18 Thread Timothy Baldridge
You know, there's this awesome bit of tech called IRC...someone should
check that out.

On Thu, May 18, 2017 at 3:31 PM, Gregg Reynolds  wrote:

> looks like access is restored, for me at least.  still, slack is making me
> a little nervous. and that's in addition to the 10K msg limit, which is a
> pain.  anybody know antything about ryver? https://ryver.com/
> ryver-vs-slack/
>
> On May 18, 2017 3:15 PM, "Gregg Reynolds"  wrote:
>
>> is it just me? i've been unable to connect to clojurians (by cellphone)
>> for about 30 minutes, but i can connect to other slack groups.
>>
>> have we hit https://github.com/clojurians/clojurians-chat/wiki/
>> Slackpocalypse?  we're almost to 10K subscribers.
>>
>> g
>>
>>
>> --
> 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, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
“One of the main causes of the fall of the Roman Empire was that–lacking
zero–they had no way to indicate successful termination of their C
programs.”
(Robert Firth)

-- 
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: slackpocalypse?

2017-05-18 Thread Gregg Reynolds
On May 18, 2017 5:06 PM, "Timothy Baldridge"  wrote:

You know, there's this awesome bit of tech called IRC...someone should
check that out.


that is so 90s!


On Thu, May 18, 2017 at 3:31 PM, Gregg Reynolds  wrote:

> looks like access is restored, for me at least.  still, slack is making me
> a little nervous. and that's in addition to the 10K msg limit, which is a
> pain.  anybody know antything about ryver? https://ryver.com/ryver
> -vs-slack/
>
> On May 18, 2017 3:15 PM, "Gregg Reynolds"  wrote:
>
>> is it just me? i've been unable to connect to clojurians (by cellphone)
>> for about 30 minutes, but i can connect to other slack groups.
>>
>> have we hit https://github.com/clojurians/clojurians-chat/wiki/Slack
>> pocalypse?  we're almost to 10K subscribers.
>>
>> g
>>
>>
>> --
> 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, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
“One of the main causes of the fall of the Roman Empire was that–lacking
zero–they had no way to indicate successful termination of their C
programs.”
(Robert Firth)

-- 
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

-- 
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: slackpocalypse?

2017-05-18 Thread Gregg Reynolds
On May 18, 2017 5:06 PM, "Timothy Baldridge"  wrote:

You know, there's this awesome bit of tech called IRC...someone should
check that out.


there's also this "email" thing people are talking about, but i don't
really understand it.  a series of tubes of some kind, i gather.

-- 
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Understanding `clojure.core.reducers/rfn`

2017-05-18 Thread Tianxiang Xiong
In `clojure.core.reducers`, `map` 

 
is implemented as:

(defcurried map
  "Applies f to every value in the reduction of coll. Foldable."
  {:added "1.5"}
  [f coll]
  (folder coll
   (fn [f1]
 (rfn [f1 k]
  ([ret k v]
 (f1 ret (f k v)))

I don't understand the purpose of `rfn`, and there are others confused 
about it as well .

>From what I can see, `rfn` takes a reducing function `f1` and returns a 
reducing function with 3 arities. For example, macroexpanding

(rfn [f1 k]
 ([ret k v]
  (f1 ret (f k v

gives 

(fn
  ([] (f1))
  ([ret v] (f1 ret (f v)))
  ([ret k v] (f1 ret (f k v

When is the 3-arity form used? An example would be helpful.

-- 
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Understanding `clojure.core.reducers/rfn`

2017-05-18 Thread Alex Miller
The 3 arity is used when reducing over a map, like reduce-kv. Reducers do this 
automatically which varies from the core reduce.

-- 
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Spec: Nested Cat Calls

2017-05-18 Thread Alexander Sedgwick
That worked - thank you!

On Tuesday, May 16, 2017 at 11:38:08 PM UTC-5, Alex Miller wrote:
>
> The problem here is that s/or is NOT a regex op and introduces a new level 
> of spec nesting. Try using s/alt (which IS a regex op) instead.
>
>
> On Tuesday, May 16, 2017 at 11:34:10 PM UTC-5, Alexander Sedgwick wrote:
>>
>> I'm looking to better understand how nested cats work (now that just 
>> sounds funny).
>>
>> I've found that sometimes spec/cat will generate a nested list:
>>
>> ```clojure
>> (gen/sample (s/gen (s/cat :start #{\a}
>>   :content (s/cat :nothing (s/? 
>> #{\^})
>> :fruit (s/or 
>> :apples (s/+ (s/cat :skin #{\s}
>>   
>>  :flesh #{\f}
>>   
>>  :core #{\c}))
>>   
>>  :bananas (s/+ #{\b})))
>>:end #{\z})) 5)
>> ```
>> -> ((\a \^ (\s \f \c) \z) ... (\a \^ (\b \b) \z))
>>
>> Given the sample output we can assume this validate call will be false 
>> (provided flat list):
>>
>> ```clojure
>> (s/valid? (s/cat :start #{\a}
>>:content (s/cat :nothing (s/? #{\^})
>>  :fruit (s/or :apples (s/+ 
>> (s/cat :skin #{\s}
>>   
>>   :flesh #{\f}
>>   
>>   :core #{\c}))
>> :bananas (s/+ 
>> #{\b})))
>>:end #{\z}) [\a \^ \s \f \c \z])
>> ```
>> -> false
>>
>> I thought the s/spec function would need to be used to define nested 
>> structures (s/spec (s/cat ...)).
>>
>> Is this expected behavior or is there a better approach for working with 
>> flat lists?
>>
>> 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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Understanding `clojure.core.reducers/rfn`

2017-05-18 Thread Tianxiang Xiong
Would that ever be the case for `r/map`? Or does it only apply to certain 
other reducers?

On Thursday, May 18, 2017 at 4:11:39 PM UTC-7, Alex Miller wrote:
>
> The 3 arity is used when reducing over a map, like reduce-kv. Reducers do 
> this automatically which varies from the core reduce.

-- 
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Cases of `RT/canSeq`

2017-05-18 Thread Tianxiang Xiong
But if something is `ISeq`, it's `Seqable`, so checking for `Seqable` alone 
should be sufficient. 

Am I missing something here? Is there a performance performance benefit of 
checking for `ISeq` *and* `Seqable` that I'm not aware of?

On Wednesday, May 3, 2017 at 2:19:42 AM UTC-7, Mikera wrote:
>
> Clearly not necessary from a functional perspective.
>
> However I believe the ordering of these tests will affect JVM 
> optimisations. You want to test the common/fast cases first. And the JVM 
> does some clever things with caching most recently used lookups, which will 
> again behave differently if you test things in different orders.
>
> Benchmarking on realistic workloads would typically be required to 
> determine the optimal order.
>
> FWIW I find it odd that the null check is third. This is extremely fast 
> (certainly faster than instance checks) and is a very common case given the 
> amount of nil usage in idiomatic Clojure code (as an empty seq), so I would 
> probably put it first.
>
> On Wednesday, 3 May 2017 11:59:29 UTC+8, Tianxiang Xiong wrote:
>>
>> Why does `clojure.lang.RT/canSeq` need to check both `ISeq` _and_ 
>> `Seqable` when `ISeq <- IPersistentCollection <- Seqable`?
>>
>> static public boolean canSeq(Object coll){
>> return coll instanceof ISeq
>> || coll instanceof Seqable
>> || coll == null
>> || coll instanceof Iterable
>> || coll.getClass().isArray()
>> || coll instanceof CharSequence
>> || coll instanceof Map;
>> }
>>
>>

-- 
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: slackpocalypse? (Alternatives to Slack like Matrix.org)

2017-05-18 Thread Paul Fernhout
Here is an essay I wrote in January 2016 against using Slack for FOSS
(which cites that Ryver page): 
http://pdfernhout.net/reasons-not-to-use-slack-for-free-software-development.html

The biggest practical issue (ignoring philosophical ones or theoretical
ones) is probably "Slack is focused on teams, not communities".

The essay mentions some FOSS alternatives including Mattermost (which
can import Slack history) and Matrix.org (which is decentralized). 

Perhaps someone knows if there is already a Clojure/ClojureScript
frontend to Matrix.org? :-)

--Paul Fernhout (pdfernhout.net)
"The biggest challenge of the 21st century is the irony of technologies
of abundance in the hands of those still thinking in terms of scarcity."

On 18.05.2017 17:31, Gregg Reynolds wrote:

> looks like access is restored, for me at least.  still, slack is making me a 
> little nervous. and that's in addition to the 10K msg limit, which is a pain. 
>  anybody know antything about ryver? https://ryver.com/ryver-vs-slack/ 
> 
> On May 18, 2017 3:15 PM, "Gregg Reynolds"  wrote:
> 
>> is it just me? i've been unable to connect to clojurians (by cellphone) for 
>> about 30 minutes, but i can connect to other slack groups. 
>> 
>> have we hit 
>> https://github.com/clojurians/clojurians-chat/wiki/Slackpocalypse [1]?  
>> we're almost to 10K subscribers. 
>> 
>> g
 

Links:
--
[1] https://github.com/clojurians/clojurians-chat/wiki/Slackpocalypse

-- 
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Understanding `clojure.core.reducers/rfn`

2017-05-18 Thread Alex Miller
Reducers combine functionally, so they all have to support it to create any 
composite reducer that contains map.

On Thursday, May 18, 2017 at 10:11:23 PM UTC-5, Tianxiang Xiong wrote:
>
> Would that ever be the case for `r/map`? Or does it only apply to certain 
> other reducers?
>
> On Thursday, May 18, 2017 at 4:11:39 PM UTC-7, Alex Miller wrote:
>>
>> The 3 arity is used when reducing over a map, like reduce-kv. Reducers do 
>> this automatically which varies from the core reduce.
>
>

-- 
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Understanding `clojure.core.reducers/rfn`

2017-05-18 Thread Tianxiang Xiong
I think this is one of those cases where I need to see an example to 
understand.

>From what I can tell, the `(fn [f1] (rfn ...))` argument to `folder` is a 
reducing-function-transformer--i.e. transducer, except there are some 
differences in things like order of application in composition. I *don't* see 
this 3-arity case for the transducer version of `clojure.core/map`.

In my mind, the following are equivalent

(r/reducer [1 2 3] (map f))

(r/map f [1 2 3])

So the following should be equivalent:

;; Reducer
(fn [f1]
  (rfn [f1 k]
   ([ret k v]
(f1 ret (f k v)

;; macroexpands to
(fn [f1]
  (fn
([] (f1))
([ret v] (f1 ret (f v)))
([ret k v] (f1 ret (f k v)

;; and should be equivalent to the transducer (map f):
(fn [rf]
  (fn
([] (rf))
([result] (rf result))
([result input]
 (rf result (f input)))
([result input & inputs]
 (rf result (apply f input inputs)


Yet they are clearly *not* the same: there is nothing in the transducer 
about `[ret k v]`. So I must be missing something fundamental about the 
relationship between reducers and transducers.


On Thursday, May 18, 2017 at 9:34:54 PM UTC-7, Alex Miller wrote:
>
> Reducers combine functionally, so they all have to support it to create 
> any composite reducer that contains map.
>
> On Thursday, May 18, 2017 at 10:11:23 PM UTC-5, Tianxiang Xiong wrote:
>>
>> Would that ever be the case for `r/map`? Or does it only apply to certain 
>> other reducers?
>>
>> On Thursday, May 18, 2017 at 4:11:39 PM UTC-7, Alex Miller wrote:
>>>
>>> The 3 arity is used when reducing over a map, like reduce-kv. Reducers 
>>> do this automatically which varies from the core reduce.
>>
>>

-- 
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.