Re: why is it so annoying to run clojure code

2016-06-14 Thread James Gatannah
I *totally* understand your (and pretty much every other responder's) frustration. You're approaching it wrong. Most python/ruby programmers get this wrong, also. It's OK. I did this wrong for *years* in lots of different languages. (I blame my C++ background for how long it's taking this to s

spec.gen for uri?

2016-06-14 Thread Erik Assum
Just saw a tweet from Stuart Halloway pointing to the function which generates ramsom uri's, https://github.com/clojure/clojure/commit/1109dd4eafd95c169add38dd0051be413d9e49d0 I would argue that this function does not generate random-enough values: 1) you only generate urls using the http-protoco

Re: clojure.spec(1.9.0-alpha6): Is this the expected return value from (s/gen (s/alt ...)) ?

2016-06-14 Thread Alex Miller
It is. By using s/alt, you are inherently matching a sequential collection. You probably want s/or in this case instead. On Tuesday, June 14, 2016 at 11:15:40 PM UTC-5, Joseph Wayne Norton wrote: > > Is this the expected return value? > > => (gen/sample (s/gen (s/alt :s string? :b boolean?))) >>

GMail code formatter

2016-06-14 Thread Colin Taylor
Even easier, just copy and paste from Cursive :) -- 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

clojure.spec(1.9.0-alpha6): Is this the expected return value from (s/gen (s/alt ...)) ?

2016-06-14 Thread Joseph Wayne Norton
Is this the expected return value? => (gen/sample (s/gen (s/alt :s string? :b boolean?))) > ([""] [true] [""] ["v6n"] [true] ["q7p7"] ["310"] [true] ["FSmdw"] > ["809Gvz5"]) I am not expecting a vector to wrap each of the sample return values. Best regards, Joe N. -- You received this messa

GMail code formatter

2016-06-14 Thread Alan Thompson
Just discovered a cool Chrome extension so that you can get proper syntax highlighting when pasting code into your email. It turns plain-old code into something nice to read: *Plain:* (defn truthy? "Returns true if arg is logical true (neither nil nor false); otherwise returns false." [arg]

Re: clojure.spec regression bug for 1.9.0-alpha6

2016-06-14 Thread Alex Miller
As noted in the alpha change list, this was an intentional change in what instrument does. Instrument is intended to be used to verify that other callers have invoked a function correctly. Checking that the function works (by verifying that :ret and :fn return valid results) should be done using

clojure.spec regression bug for 1.9.0-alpha6

2016-06-14 Thread Alan Thompson
Hi - Just noticed that the :ret function in fdef seems to be ignored in 1.9.0-alpha6: user=> (require '[clojure.spec :as s]) user=> (defn dummy [x] (if x "yes" "no")) user=> (s/fdef dummy #_=> :args (s/cat :x integer?) #_=> :ret integer?) user=> (s/instrument #'dummy) user=> (dummy 3) (pr

Re: [ANN] defn podcast ep.3 : A tour of REPLs feat. Mike Fikes :)

2016-06-14 Thread Jason Gilman
Thanks for starting a new Clojure podcast! It's nice to see that the active count of Clojure podcasts has grown to 2. I had one small note about the Atom REPL you mentioned around 43 minutes in. You called it the "Atom Ink" REPL on the podcast. The REPL for Atom is called Proto REPL

Re: Qualified keys, Clojure records, Spec

2016-06-14 Thread Mike Rodriguez
Thanks for the response and giving me some understanding in the thought process behind this! I'm happy that Spec is still offering support for unqualifed keys to fit use-cases like this in records. I do think it would be cool to see something come out of the "implicit" namespace already associ

Re: [ANN] New clojure.org!

2016-06-14 Thread Alex Miller
Shoot, that was not the link I meant. I meant: http://clojure.org/community/contributing_site On Tuesday, June 14, 2016 at 4:33:14 PM UTC-5, Alex Miller wrote: > > Well there's a whole page about it at the link mentioned in the message > below - https://github.com/clojure/clojure-site > > I also

Re: [ANN] cljsee 0.1.0

2016-06-14 Thread Daniel Compton
Awesome work Alex. If you wanted, you could add a PR to update http://clojure.org/guides/reader_conditionals#_backwards_compatibility with your plugin? On Wed, Jun 15, 2016 at 1:24 AM Herwig Hochleitner wrote: > +1 thanks for releasing that. > > I've been thinking about doing this also as a mave

Re: [ANN] New clojure.org!

2016-06-14 Thread Alex Miller
Well there's a whole page about it at the link mentioned in the message below - https://github.com/clojure/clojure-site I also have an outstanding ticket to add a link from every page to the source file in the footer. I think that will be sufficient. On Tuesday, June 14, 2016 at 4:24:59 PM UT

Re: [ANN] New clojure.org!

2016-06-14 Thread Alan Thompson
Alex - I could not find a link to the Clojure.org github project on the clojure.org site. Should one be added under "Contributing" somewhere? Alan On Thursday, January 14, 2016 at 7:45:06 AM UTC-8, Alex Miller wrote: > > The new http://clojure.org is alive! > > Most of the content on the site is

[ANN] Clojure 1.9.0-alpha6

2016-06-14 Thread Alex Miller
Clojure 1.9.0-alpha6 is now available. Try it via - Download: https://repo1.maven.org/maven2/org/clojure/clojure/1.9.0-alpha6 - Leiningen: [org.clojure/clojure "1.9.0-alpha6"] 1.9.0-alpha6 includes the following changes since 1.9.0-alpha5: - & regex op now fails fast when regex passes but preds

Re: [ANN] cljsee 0.1.0

2016-06-14 Thread Herwig Hochleitner
+1 thanks for releasing that. I've been thinking about doing this also as a maven plugin. That might help finally getting .cljc accepted in contrib projects. ​ -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to cloju

Re: instrumenting clojure.core

2016-06-14 Thread Leon Grapenthin
Thanks Alex, I was experimenting along similar lines. It might work since the lazy seq is not realized at this point and :f might not have been called. Otherwise the last clause would always hold true or never be called (due to earlier ArityException). It covers more of a test for map itself (h

Re: Automatically upversioning a project in continuous integration?

2016-06-14 Thread 'Simon Brooke' via Clojure
Many thanks, googling 'leiningen release tasks' has certainly found me interesting things to read and digest. On Tuesday, 14 June 2016 12:35:57 UTC+1, Alex Miller wrote: > > > > On Tuesday, June 14, 2016 at 5:21:04 AM UTC-5, Simon Brooke wrote: >> >> Apologies if this is a FAQ, I have done a numb

Re: instrumenting clojure.core

2016-06-14 Thread Francesco Bellomi
I think map is a good example where the different arities have very different semantics, and maybe it would be practical to specify a separate spec for each arity. In the unified spec, both :args and :ret have to resort to (more or less explicit) unions in order to express the sum of the separa

Re: Automatically upversioning a project in continuous integration?

2016-06-14 Thread Alex Miller
On Tuesday, June 14, 2016 at 5:21:04 AM UTC-5, Simon Brooke wrote: > > Apologies if this is a FAQ, I have done a number of searches and not found > anything. > > I see that the Clojure project's internal Hudson CI server does automatic > upversioning on release builds (see documentation here >

Re: instrumenting clojure.core

2016-06-14 Thread Alex Miller
I was suggesting that you could do something like this (although I'm pretty sure this doesn't work right now): (s/fdef map :args (s/cat :f (s/fspec :args (s/+ ::s/any)) :colls (s/* seqable?)) :ret (s/or :seq seqable? :transducer ifn?) :fn #(if (zero? (count (-> % :args :colls

Automatically upversioning a project in continuous integration?

2016-06-14 Thread 'Simon Brooke' via Clojure
Apologies if this is a FAQ, I have done a number of searches and not found anything. I see that the Clojure project's internal Hudson CI server does automatic upversioning on release builds (see documentation here ). It doesn't, ho

[ANN] defn podcast ep.3 : A tour of REPLs feat. Mike Fikes :)

2016-06-14 Thread Vijay Kiran
Hello Everyone! We published the third episode of defn yesterday in which we take a tour of REPLs in Clojure Land. We are very grateful to Mike Fikes (Planck/Replete/Ambly fame) - who joined us on the podcast to share his experience. We would love to hear your fee