recursive specs

2016-06-09 Thread Frederic Peschanski
Hi there, I have been playing a little bit with clojure.spec and I find it a very nice addition to the core language. One thing I am particularly interested in is the spec of recursive structures, but I noticed there is no dedicated support for these (especially mutually recursive structures).

Re: recursive specs

2016-06-09 Thread Christophe Grand
Hi Frédéric, On Thu, Jun 9, 2016 at 2:21 PM, Frederic Peschanski < frederic.peschanski.w...@gmail.com> wrote: > ;; == > (:require [clojure.spec :as s])) > (s/def ::zero #{:zero}) > (s/def ::one #{:one}) > (s/def ::succ #{:succ}) > (s/def ::odd nil) > (s/def ::even (s/or :zero ::zero

Re: [ANN] Clojure 1.9.0-alpha5

2016-06-09 Thread Alex Miller
I think it's quite likely that you have multiple copies of tools.analyzer (and possibly other libs) on your classpath. Can you take a look at your deps and see if that might be the case? A particular thing to watch for is if any dep is AOT compiled and transitively pulled in a dependency lib so

Re: [ANN] Clojure 1.9.0-alpha5

2016-06-09 Thread Alex Miller
The use of named? inside spec will be replaced with ident?. On Wednesday, June 8, 2016 at 3:13:12 PM UTC-5, Devin Walters (devn) wrote: > > Any chance of `named?` making the cut in 1.9? I see it's used in the > implementation of clojure.spec. > > -- You received this message because you are sub

Re: [ANN] Clojure 1.9.0-alpha5

2016-06-09 Thread Alex Miller
Whoops. That is an oversight. On Wednesday, June 8, 2016 at 11:34:13 AM UTC-5, David Powell wrote: > > > Do uri? and bytes? really have generator support implemented? I couldn't > seem to get that to work. > > -- You received this message because you are subscribed to the Google Groups "Clojur

Re: [ANN] Clojure 1.9.0-alpha5

2016-06-09 Thread Alex Miller
On Wednesday, June 8, 2016 at 3:23:51 AM UTC-5, Mamun wrote: > > Excellent set of new predicates. What about date predicate? > > It would be nice if there are also date predicate as an example in bellow > > date? > Use clojure.core/inst? > date-past? > date-future? > You can use the new cl

Re: [ANN] Clojure 1.9.0-alpha5

2016-06-09 Thread Nicola Mometto
I commented about this in the #clojure-dev slack channel, I believe http://dev.clojure.org/jira/browse/CLJ-1874 to be the cause of this issue > On 9 Jun 2016, at 14:32, Alex Miller wrote: > > I think it's quite likely that you have multiple copies of tools.analyzer > (and possibly other libs)

Re: [ANN] Clojure 1.9.0-alpha5

2016-06-09 Thread Fluid Dynamics
On Thursday, June 9, 2016 at 9:32:51 AM UTC-4, Alex Miller wrote: > > I think it's quite likely that you have multiple copies of tools.analyzer > (and possibly other libs) on your classpath. Can you take a look at your > deps and see if that might be the case? > > A particular thing to watch for

Re: [ANN] Clojure 1.9.0-alpha5

2016-06-09 Thread Herwig Hochleitner
2016-06-09 15:32 GMT+02:00 Alex Miller : > > "lein deps :tree" is a good place to start, but it doesn't tell you what's > actually inside the jars. There used to be a Maven plugin that would track > down multiple class definitions across the dependency classpath, can't > remember what it was calle

Re: How to Keep Clojure Server From Quitting

2016-06-09 Thread Nate Young
oh, perfect. aleph.netty/wait-for-close looks like exactly the kind of thing I wanted. thanks! Andrea Richiardi wrote: I do the following in my code (where system/http is a mount var, the eval result of start-server): (ns ... (:require [aleph.netty :as netty]) (defn -main [& args] (mount/sta

Re: recursive specs

2016-06-09 Thread Frederic Peschanski
Le jeudi 9 juin 2016 15:30:08 UTC+2, Christophe Grand a écrit : > > Hi Frédéric, > > > First question : is there a better way to define a set of mutually > recursive specs ? > > No it's ok but you can remove (s/def ::odd nil). > > Oh yes you're right ... thanks > Christophe > > -- > On Cloju

What is replacement to maven-assembly-plugin in boot-clj environment?

2016-06-09 Thread Jacek Grzebyta
I need to build more complex package using boot-cl. I have cited my request put on the StackOverflow: Copy of What is replacement to maven-assembly-plugin in boot-clj environment? I created a project which (semi-) finally gives jar file. The file is f

why is it so annoying to run clojure code

2016-06-09 Thread Jiacai Liu
I started learning clojure recently, and I am annoyed at the way to run it (aka. lein run). why clojure script can't be run like python,ruby or scala, like python .py -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email

Re: why is it so annoying to run clojure code

2016-06-09 Thread Shantanu Kumar
Consider http://inlein.org/ or https://github.com/kumarshantanu/lein-exec HTH Shantanu On Thursday, 9 June 2016 21:38:39 UTC+5:30, Jiacai Liu wrote: > > I started learning clojure recently, and I am annoyed at the way to run > it (aka. lein run). why clojure script can't be run like python,rub

Re: why is it so annoying to run clojure code

2016-06-09 Thread Herwig Hochleitner
Leiningen is a tool external to clojure, that has project automation in mind. The equivalent to `python script.py` would be `java -jar clojure.jar -i script.clj`. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clo

Re: why is it so annoying to run clojure code

2016-06-09 Thread James Reeves
You can run Clojure directly, but often you don't just need Clojure, but other libraries as well. The "lein run" command not only runs your code, it also handles downloading any dependencies your code might have. In Ruby terms, Leiningen is the equivalent of ruby + rbenv + bundler + rake. I'm less

Re: why is it so annoying to run clojure code

2016-06-09 Thread Gary Trakhman
Why hasn't anyone mentioned Boot, which provides shebang-style execution and deps for you? https://github.com/boot-clj/boot/wiki/Scripts On Thu, Jun 9, 2016 at 12:48 PM James Reeves wrote: > You can run Clojure directly, but often you don't just need Clojure, but > other libraries as well. The "

Re: [ANN] Clojure 1.9.0-alpha5

2016-06-09 Thread Sean Corfield
On 6/9/16, 6:39 AM, "Nicola Mometto" wrote: > I commented about this in the #clojure-dev slack channel, I believe > http://dev.clojure.org/jira/browse/CLJ-1874 to be the cause of this issue Interesting. I didn’t have any AOT-compiled code in my situation as far as I know, but I do know I have mu

Re: why is it so annoying to run clojure code

2016-06-09 Thread Miguel Ping
I highly recommend you to learn some kind of interactive tool for clojure, such as emacs+cider. I wrote a mini tutorial about it: http://mping.github.io/2015/11/17/clojure-emacs-cider.html On Thursday, June 9, 2016 at 5:08:39 PM UTC+1, Jiacai Liu wrote: > > I started learning clojure recently,

Re: why is it so annoying to run clojure code

2016-06-09 Thread Plínio Balduino
Thanks for the tutorial On Thu, Jun 9, 2016 at 2:36 PM, Miguel Ping wrote: > I highly recommend you to learn some kind of interactive tool for clojure, > such as emacs+cider. > > I wrote a mini tutorial about it: > http://mping.github.io/2015/11/17/clojure-emacs-cider.html > > On Thursday, June

Re: What is replacement to maven-assembly-plugin in boot-clj environment?

2016-06-09 Thread Gregg Reynolds
try the boot channel on clojurians on slack. very responsive. On Jun 9, 2016 10:46 AM, "Jacek Grzebyta" wrote: > I need to build more complex package using boot-cl. I have cited my > request put on the StackOverflow: > > Copy of What is replacement to maven-assembly-plugin in boot-clj > environm

[ANN] pedestal-api 0.2.0 release - Swagger for pedestal

2016-06-09 Thread Oliver Hine
Hi everyone, After the release of pedestal 0.5.0 I have updated pedestal-api to make it compatible with the breaking changes. Also in this release: - Better content negotiation - Support for query parameters that are all optional

Re: [ANN] pedestal-api 0.2.0 release - Swagger for pedestal

2016-06-09 Thread Paul deGrandis
Congrats! -- 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 emai

Re: [ANN] pedestal-api 0.2.0 release - Swagger for pedestal

2016-06-09 Thread Oliver Hine
Cheers Paul, for pedestal and your help! On Thursday, 9 June 2016 20:18:01 UTC+1, Paul deGrandis wrote: > > Congrats! > -- 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

Re: why is it so annoying to run clojure code

2016-06-09 Thread hiskennyness
On Thursday, June 9, 2016 at 12:08:39 PM UTC-4, Jiacai Liu wrote: > > I started learning clojure recently, and I am annoyed at the way to run > it (aka. lein run). why clojure script can't be run like python,ruby or > scala, like python .py > Having just gotten into Clojure, I have the same p

Re: [ANN] Clojure 1.9.0-alpha5

2016-06-09 Thread Rangel Spasov
Add the latest tools.analyzer as a dependency solved the problem. [org.clojure/tools.analyzer "0.6.9"] Thanks guys! On Thursday, June 9, 2016 at 6:40:12 AM UTC-7, Nicola Mometto wrote: > > I commented about this in the #clojure-dev slack channel, I believe > http://dev.clojure.org/jira/browse/