Why we cannot do this now?

2016-06-18 Thread Sungjin Chun
Yes, I want this kind of instant speed (I hope this kind of speed is 
possible in
emacs + side).

https://www.youtube.com/watch?v=D3gpQth8uTI=youtu.be

Have you seen this? Why we simply cannot do this?

-- 
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: Too over complicated

2016-06-18 Thread James Reeves
On 19 June 2016 at 00:07, Olek  wrote:
>
> Now lets talk about "difficulties" which I have found.
> For example when we talk about removing element from collection.
>
> Why there is no one operation which could behave the same for set, vector,
> list, string, and map? Let the community talk by themselves:
> http://stackoverflow.com/questions/28844647/why-are-disj-and-dissoc-distinct-functions-in-clojure
>

I guess the difference is intent, but you'd have to ask Rich.


> Why there is no one operation for checking if an element is in a
> collection/keys of map/string?
>
> http://stackoverflow.com/questions/3249334/test-whether-a-list-contains-a-specific-value-in-clojure
>

You can use "some" to achieve this effect for most collections. Maps are a
little tricky, because you could be checking for the existence of a key, a
value, or a key-value pair.

It might be nice to have an "includes?" function, though, particularly one
that was more efficient.


> There is no even simple method for saying that element is not a nil. This
> requires from me the (not (nil? %)) combo.
>

There is. "clojure.core/some?" is the same as #(not (nil? #)).

- James

-- 
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: Too over complicated

2016-06-18 Thread Matching Socks
The Clojure Cheatsheet can be very helpful if you are experiencing a shock 
of re-entry to clojure.core after a few years of relatively finite Javadoc 
pages of 10 methods per class.  It is fun to chuckle at Alan Perlis' 
aphorism about 100 functions vs 10 each for 10 classes, but when you swing 
open clojure.core and see what 100 functions looks like, it is a bit 
sobering at first.  Emerick, Carper & Grand's "Clojure Programming" does a 
particularly good job of making it all make sense.

I sure wouldn't mind if "contains?" threw.  Perhaps the coming clojure.spec 
instrumentation of clojure.core will address 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 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.


Too over complicated

2016-06-18 Thread Olek
Hi!

I've back to Clojure env. after 3 years of absence.

I have started to code in my best language ever and was hit by some 
difficulties with the simplest things on earth
I remember when I first dived into language and started coding in it. After 
4 months of heavy doc/forum/irc usage I was able to quickly express myself 
in the Clojure. All for then was for me clear, natural and easy.

Now after some long brake I'm back and now I can make some critics on the 
language sine I know what Clojure can offer me and I know what from concise 
dynamic language with abstraction in mind I should expect.

Now lets talk about "difficulties" which I have found.
For example when we talk about removing element from collection.

Why there is no one operation which could behave the same for set, vector, 
list, string, and map? Let the community talk by 
themselves: 
http://stackoverflow.com/questions/28844647/why-are-disj-and-dissoc-distinct-functions-in-clojure

Why there is no one operation for checking if an element is in a 
collection/keys of map/string?
http://stackoverflow.com/questions/3249334/test-whether-a-list-contains-a-specific-value-in-clojure

There is no even simple method for saying that element is not a nil. This 
requires from me the (not (nil? %)) combo.

Now how suppose the world should pray to Clojure when they are unable to 
accomplish these simplest ops?

Just add these simple functions to the core lib so the new comers won't 
whine on Clojure and when they get mature and more comfortable with Clojure 
they will just use the "core & idiomatic" set of functions.

-- 
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: Clojars will be partially down for maintenance this weekend

2016-06-18 Thread Colin Yates
+1 - one of the unsung heroes.

On 18 June 2016 at 20:50, Andrey Antukh  wrote:
> Completely agree! Many thanks for your work!
>
> On Sat, Jun 18, 2016 at 10:49 PM, Howard Lewis Ship 
> wrote:
>>
>> It unfortunately goes unsaid, so I'll say it: thanks for working hard on
>> Clojars, and for doing a great job on communicating important status, such
>> as this downtime, to a community that is so reliant on your efforts.
>>
>> On Sun, Jun 12, 2016 at 6:07 PM, Toby Crawley  wrote:
>>>
>>> Clojars is back up; we ran in to an issue with the update, so had to
>>> roll it back. Once we fix the issue, we'll schedule another
>>> maintenance window.
>>>
>>> Please file an issue[1] if you experience any problems.
>>>
>>> - Toby
>>>
>>> [1]: https://github.com/clojars/clojars-web/issues
>>>
>>> On Fri, Jun 10, 2016 at 4:01 PM, Toby Crawley  wrote:
>>> > At 2016-06-13 00:00:00 UTC[1], we'll be taking down the Clojars web
>>> > interface to do database maintenance and deploy some
>>> > features/fixes. The biggest change in this deploy will be the
>>> > introduction of sending a copy of deployed artifacts to Rackspace
>>> > CloudFiles to allow us to serve the repository from a more robust
>>> > location in the near future.
>>> >
>>> > We've scheduled an hour for the work, but it should take less. During
>>> > that time, the web interface, search api, and ability to deploy will
>>> > be unavailable, but the repository will still be readable, so projects
>>> > will still be able to build.
>>> >
>>> > To see the status of the work, watch our status page[2] or follow
>>> > @clojars on twitter[3].
>>> >
>>> > [1]: for your local time, see
>>> > https://www.timeanddate.com/worldclock/fixedtime.html?iso=20160613T00
>>> > [2]: http://status.clojars.org
>>> > [3]: https://twitter.com/clojars
>>>
>>> --
>>> 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.
>>
>>
>>
>>
>> --
>> Howard M. Lewis Ship
>>
>> Senior Mobile Developer at Walmart Labs
>>
>> Creator of Apache Tapestry
>>
>> (971) 678-5210
>> http://howardlewisship.com
>> @hlship
>>
>> --
>> 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.
>
>
>
>
> --
> Andrey Antukh - Андрей Антух - 
> http://www.niwi.nz
> https://github.com/niwinz
>
> --
> 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 

Re: Clojars will be partially down for maintenance this weekend

2016-06-18 Thread Andrey Antukh
Completely agree! Many thanks for your work!

On Sat, Jun 18, 2016 at 10:49 PM, Howard Lewis Ship 
wrote:

> It unfortunately goes unsaid, so I'll say it: thanks for working hard on
> Clojars, and for doing a great job on communicating important status, such
> as this downtime, to a community that is so reliant on your efforts.
>
> On Sun, Jun 12, 2016 at 6:07 PM, Toby Crawley  wrote:
>
>> Clojars is back up; we ran in to an issue with the update, so had to
>> roll it back. Once we fix the issue, we'll schedule another
>> maintenance window.
>>
>> Please file an issue[1] if you experience any problems.
>>
>> - Toby
>>
>> [1]: https://github.com/clojars/clojars-web/issues
>>
>> On Fri, Jun 10, 2016 at 4:01 PM, Toby Crawley  wrote:
>> > At 2016-06-13 00:00:00 UTC[1], we'll be taking down the Clojars web
>> > interface to do database maintenance and deploy some
>> > features/fixes. The biggest change in this deploy will be the
>> > introduction of sending a copy of deployed artifacts to Rackspace
>> > CloudFiles to allow us to serve the repository from a more robust
>> > location in the near future.
>> >
>> > We've scheduled an hour for the work, but it should take less. During
>> > that time, the web interface, search api, and ability to deploy will
>> > be unavailable, but the repository will still be readable, so projects
>> > will still be able to build.
>> >
>> > To see the status of the work, watch our status page[2] or follow
>> > @clojars on twitter[3].
>> >
>> > [1]: for your local time, see
>> > https://www.timeanddate.com/worldclock/fixedtime.html?iso=20160613T00
>> > [2]: http://status.clojars.org
>> > [3]: https://twitter.com/clojars
>>
>> --
>> 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.
>>
>
>
>
> --
> Howard M. Lewis Ship
>
> Senior Mobile Developer at Walmart Labs
>
> Creator of Apache Tapestry
>
> (971) 678-5210
> http://howardlewisship.com
> @hlship
>
> --
> 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.
>



-- 
Andrey Antukh - Андрей Антух - 
http://www.niwi.nz
https://github.com/niwinz

-- 
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: Clojars will be partially down for maintenance this weekend

2016-06-18 Thread Howard Lewis Ship
It unfortunately goes unsaid, so I'll say it: thanks for working hard on
Clojars, and for doing a great job on communicating important status, such
as this downtime, to a community that is so reliant on your efforts.

On Sun, Jun 12, 2016 at 6:07 PM, Toby Crawley  wrote:

> Clojars is back up; we ran in to an issue with the update, so had to
> roll it back. Once we fix the issue, we'll schedule another
> maintenance window.
>
> Please file an issue[1] if you experience any problems.
>
> - Toby
>
> [1]: https://github.com/clojars/clojars-web/issues
>
> On Fri, Jun 10, 2016 at 4:01 PM, Toby Crawley  wrote:
> > At 2016-06-13 00:00:00 UTC[1], we'll be taking down the Clojars web
> > interface to do database maintenance and deploy some
> > features/fixes. The biggest change in this deploy will be the
> > introduction of sending a copy of deployed artifacts to Rackspace
> > CloudFiles to allow us to serve the repository from a more robust
> > location in the near future.
> >
> > We've scheduled an hour for the work, but it should take less. During
> > that time, the web interface, search api, and ability to deploy will
> > be unavailable, but the repository will still be readable, so projects
> > will still be able to build.
> >
> > To see the status of the work, watch our status page[2] or follow
> > @clojars on twitter[3].
> >
> > [1]: for your local time, see
> > https://www.timeanddate.com/worldclock/fixedtime.html?iso=20160613T00
> > [2]: http://status.clojars.org
> > [3]: https://twitter.com/clojars
>
> --
> 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.
>



-- 
Howard M. Lewis Ship

Senior Mobile Developer at Walmart Labs

Creator of Apache Tapestry

(971) 678-5210
http://howardlewisship.com
@hlship

-- 
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 of conform of spec

2016-06-18 Thread Leon Grapenthin
Yes I have tried that. As soon as you use things like `or` or `alt` it 
becomes quite the tedious manual effort and you don't get away with s/keys 
anymore.

On Saturday, June 18, 2016 at 8:35:20 PM UTC+2, Josh Tilles wrote:
>
> Have you considered choosing labels that are themselves qualified 
> keywords with registered specs? That might feel like a workaround, but 
> I think it could get you most of what you’re looking for.
>
> For example:
>
> ```
> (s/def ::even-spec even?)
> ;= :user/even-spec
> (s/def ::odd-spec odd?)
> ;= :user/odd-spec
> (s/def ::label-even (s/spec ::even-spec))
> ;= :user/label-even
> (s/def ::label-odd (s/spec ::odd-spec))
> ;= :user/label-odd
> (s/conform (s/cat ::label-even ::even-spec, ::label-odd ::odd-spec) [2 3])
> ;= {:user/label-even 2, :user/label-odd 3}
> (s/conform (s/cat ::label-odd ::even-spec) [2])
> ;= {:user/label-odd 2}
> (s/valid? (s/keys) *1)
> ;= false
> (s/explain (s/keys) *2)
> ; In: [:user/label-odd] val: 2 fails spec: :user/label-odd at: 
> [:user/label-odd] predicate: odd?
> ;= nil
> ```
>
>
> On Saturday, June 18, 2016, Leon Grapenthin  > wrote:
>
>> Assume I parse with conform. 
>>
>> Then I have functions that operate on the value returned by conform. I 
>> want to spec them.
>>
>> But I can't get a spec for the value returned by conform (so that I can 
>> spec said functions) automatically.
>>
>> Imagine `(s/conform-spec ::my-spec)` would return the spec of the result 
>> of calling (s/confom ::my-spec foo)
>>
>> So it would probably be valuable if a spec could give a spec of what its 
>> conform* returns`
>>
>> -- 
>> 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: Spec of conform of spec

2016-06-18 Thread Josh Tilles
I just realized that in my example, I probably should have used
`s/get-spec` instead of `s/spec` when defining the labels. Oh well.

On Saturday, June 18, 2016, Josh Tilles  wrote:

> Have you considered choosing labels that are themselves qualified
> keywords with registered specs? That might feel like a workaround, but
> I think it could get you most of what you’re looking for.
>
> For example:
>
> ```
> (s/def ::even-spec even?)
> ;= :user/even-spec
> (s/def ::odd-spec odd?)
> ;= :user/odd-spec
> (s/def ::label-even (s/spec ::even-spec))
> ;= :user/label-even
> (s/def ::label-odd (s/spec ::odd-spec))
> ;= :user/label-odd
> (s/conform (s/cat ::label-even ::even-spec, ::label-odd ::odd-spec) [2 3])
> ;= {:user/label-even 2, :user/label-odd 3}
> (s/conform (s/cat ::label-odd ::even-spec) [2])
> ;= {:user/label-odd 2}
> (s/valid? (s/keys) *1)
> ;= false
> (s/explain (s/keys) *2)
> ; In: [:user/label-odd] val: 2 fails spec: :user/label-odd at:
> [:user/label-odd] predicate: odd?
> ;= nil
> ```
>
>
> On Saturday, June 18, 2016, Leon Grapenthin  > wrote:
>
>> Assume I parse with conform.
>>
>> Then I have functions that operate on the value returned by conform. I
>> want to spec them.
>>
>> But I can't get a spec for the value returned by conform (so that I can
>> spec said functions) automatically.
>>
>> Imagine `(s/conform-spec ::my-spec)` would return the spec of the result
>> of calling (s/confom ::my-spec foo)
>>
>> So it would probably be valuable if a spec could give a spec of what its
>> conform* returns`
>>
>> --
>> 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: Spec of conform of spec

2016-06-18 Thread Josh Tilles
Have you considered choosing labels that are themselves qualified
keywords with registered specs? That might feel like a workaround, but
I think it could get you most of what you’re looking for.

For example:

```
(s/def ::even-spec even?)
;= :user/even-spec
(s/def ::odd-spec odd?)
;= :user/odd-spec
(s/def ::label-even (s/spec ::even-spec))
;= :user/label-even
(s/def ::label-odd (s/spec ::odd-spec))
;= :user/label-odd
(s/conform (s/cat ::label-even ::even-spec, ::label-odd ::odd-spec) [2 3])
;= {:user/label-even 2, :user/label-odd 3}
(s/conform (s/cat ::label-odd ::even-spec) [2])
;= {:user/label-odd 2}
(s/valid? (s/keys) *1)
;= false
(s/explain (s/keys) *2)
; In: [:user/label-odd] val: 2 fails spec: :user/label-odd at:
[:user/label-odd] predicate: odd?
;= nil
```


On Saturday, June 18, 2016, Leon Grapenthin 
wrote:

> Assume I parse with conform.
>
> Then I have functions that operate on the value returned by conform. I
> want to spec them.
>
> But I can't get a spec for the value returned by conform (so that I can
> spec said functions) automatically.
>
> Imagine `(s/conform-spec ::my-spec)` would return the spec of the result
> of calling (s/confom ::my-spec foo)
>
> So it would probably be valuable if a spec could give a spec of what its
> conform* returns`
>
> --
> 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: Spec of conform of spec

2016-06-18 Thread Leon Grapenthin
I am not sure whether I understand what you mean. 

Behavior of conform for predicates is to return its return value if it is 
logically true, ::s/invalid otherwise. Thus the predicate itself is the 
spec to its conform*.

s/conformer is only limiting as much as it is to unform, a user would have 
to provide a spec for conforms result as well as he has to provide an 
unform-fn if he wants unforming.

If each spec implemented a conform-spec* method, a spec could very well 
provide a spec of it's conform.

On Saturday, June 18, 2016 at 5:03:33 PM UTC+2, Alex Miller wrote:
>
> Given that conform takes an arbitrary (opaque) function, I don't think 
> that's generically possible.
>
>
> On Saturday, June 18, 2016 at 7:37:33 AM UTC-5, Leon Grapenthin wrote:
>>
>> Assume I parse with conform. 
>>
>> Then I have functions that operate on the value returned by conform. I 
>> want to spec them.
>>
>> But I can't get a spec for the value returned by conform (so that I can 
>> spec said functions) automatically.
>>
>> Imagine `(s/conform-spec ::my-spec)` would return the spec of the result 
>> of calling (s/confom ::my-spec foo)
>>
>> So it would probably be valuable if a spec could give a spec of what its 
>> conform* returns`
>>
>>

-- 
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 of conform of spec

2016-06-18 Thread Alex Miller
Given that conform takes an arbitrary (opaque) function, I don't think 
that's generically possible.


On Saturday, June 18, 2016 at 7:37:33 AM UTC-5, Leon Grapenthin wrote:
>
> Assume I parse with conform. 
>
> Then I have functions that operate on the value returned by conform. I 
> want to spec them.
>
> But I can't get a spec for the value returned by conform (so that I can 
> spec said functions) automatically.
>
> Imagine `(s/conform-spec ::my-spec)` would return the spec of the result 
> of calling (s/confom ::my-spec foo)
>
> So it would probably be valuable if a spec could give a spec of what its 
> conform* returns`
>
>

-- 
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.


Spec of conform of spec

2016-06-18 Thread Leon Grapenthin
Assume I parse with conform. 

Then I have functions that operate on the value returned by conform. I want 
to spec them.

But I can't get a spec for the value returned by conform (so that I can 
spec said functions) automatically.

Imagine `(s/conform-spec ::my-spec)` would return the spec of the result of 
calling (s/confom ::my-spec foo)

So it would probably be valuable if a spec could give a spec of what its 
conform* returns`

-- 
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.


qooxdoo mobile + ClojureScript Rizing

2016-06-18 Thread hiskennyness
Parts 1 & 2 of a three-part series introducing Qxia, a framework for 
programming qooxdoo mobile 
 via ClojureScript (with 
dataflow/reactive Cells beneath your wings):

   1. 
   https://github.com/kennytilton/rube/wiki/Program-your-phone-in-five-minutes
   2. 
   
https://github.com/kennytilton/rube/wiki/Your-first-Qxia-mobile-app,-from-scratch
   
No one but me (many times) has been through them, so please forgive (and 
report) issues/problems/confusions. 

You can just do #2 and get the barest minimum running on your device. (The 
walkthrus are about Cordova/Android, but I wager a PhoneGap and or iOS pro 
will be able to follow (and I plan to tackle at least the iOS bit after the 
third installment in which the built app has a bit more beef to it)).

Ciao, hk



-- 
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 - dynamic specs

2016-06-18 Thread Brian Platz

On Friday, June 17, 2016 at 4:04:31 PM UTC-4, Alex Miller wrote:
>
>
>
> On Friday, June 17, 2016 at 2:46:37 PM UTC-5, Brian Platz wrote:
>>
>>
>> I'd like to be able to use clojure.spec for input validation where the 
>> specs are stored in a database using a data structure to represent them.
>>
>
> Why don't you represent them as code loaded by different applications? 
> s/form is designed to give you a wire-portable definition of a spec.
>

Nice feature, thank you for pointing it out.
 

>  
>
>> The following ideas could make this much simpler:
>> - Allow s/keys to accept a spec to use with each key (i.e. the same 
>> format used by s/or).
>>
>
> The independence of attribute specs is a fundamental tenet of spec and 
> this will not be changed.
>

The use of the registry and independence of it I think is great, and the 
two need not confict. I'd primarily use the registry for my applications, 
but testing inputs dynamically lacks support around maps with the exception 
of map-of. 

Right now the only reasonable solution I see is to write my own s/keys-like 
predicate. The request was to allow maps to be tested with a generated spec 
in the same way every other Clojure data structure can be (sans-registry) 
as it seems missing, but not challenge the registry concept and its value.
 

>  
>
>> - Allow a *spec-registry* binding, enabling the use of multiple registries
>>
>
> The notion of multiple registries is something that's been raised, but 
> Rich will have to be the one to comment on that.
>

This could also solve my particular use-case, and I'm sure has some other 
uses.

Thank you for the response.

-- 
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.