Re: any? in clojure 1.9.0 alpha

2016-11-08 Thread Colin Yates
The ship has indeed sailed. However, it is exactly these moments when software starts to degrade - there are many examples of crufty software crippled by legacy decisions. I would much rather have ruthless application of 'good' engineering, deprecating where necessary than continue to pay the cost

Re: Java like static typing for Clojure?

2016-11-08 Thread Mikera
In my moments of insanity / hammock time I've toyed with making a typed variant of Clojure. Somewhat inspired by core.typed, but I feel that to be effective a type system needs to be deeply integrated with the compiler and standard library, not just a standalone tool. Types would themselves be

[beginner] idiomatic way to parse lazy sequence

2016-11-08 Thread anurag peshne
Hello, I'm new to Clojure and new here (if I'm missing something please point me to it) I'm trying to parse a lazy sequence of strings. After parsing, I'll create key value pair which needs to be added to either one of the two maps. I'm coming from Python background and having a tough time to ge

Re: [beginner] idiomatic way to parse lazy sequence

2016-11-08 Thread Bobby Eickhoff
Here are a few thoughts. This algorithm sounds like a fold, i.e. a reduction. You're iterating over a sequence while accumulating into a collection. A collection of collections, in this case. You're starting value for the fold might be this: {:first {}, :second {}} You're reducing function

Re: any? in clojure 1.9.0 alpha

2016-11-08 Thread Alex Miller
On Tuesday, November 8, 2016 at 1:23:29 AM UTC-6, Devin Walters (devn) wrote: > > Perhaps there'll be some liberties taken in 2.0? > Highly unlikely. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googl

Re: any? in clojure 1.9.0 alpha

2016-11-08 Thread Alex Miller
On Tuesday, November 8, 2016 at 2:28:54 AM UTC-6, Colin Yates wrote: > > The ship has indeed sailed. However, it is exactly these moments when > software starts to degrade - there are many examples of crufty > software crippled by legacy decisions. > I completely disagree with this idea, partic

Re: Clarification on # as valid symbol character

2016-11-08 Thread Steven Yi
Hi Ikuru, I'm afraid that section of the site doesn't really clear it up for me. There's a difference between when # is found as the initial character of the next item to read and when it's in the middle or end (i.e., auto-gensyms). (It's okay though; I'll reply further in my reply to Alex's

Re: clojure.spec - seeking a working example of stest/instrument with the :replace option

2016-11-08 Thread Alex Miller
The issue is in the call to instrument: (stest/instrument `ranged-rand {:replace {`ranged-rand ::ranged-const}}) The :replace map is "a map from var-name symbols to replacement fns". Here, you are passing a spec name, rather than a function. So you want something like this instead: (stest/in

Voting

2016-11-08 Thread Alex Miller
In the spirit of the US election today, I thought I would mention voting on Clojure tickets. Clojure manages bugs and enhancement requests in JIRA . Anyone can create a JIRA account and vote on open

Re: any? in clojure 1.9.0 alpha

2016-11-08 Thread Colin Yates
you mean Java with the 'billion dollar mistake' known as null? The Java which has just completed changed its Date and Time API _for the better_? Or maybe you are referring to JavaScript with its insane scoping rules? Maybe Ruby with its ridiculously wide scoping rules? And I am pretty sure Java has

Re: clojure.spec - seeking a working example of stest/instrument with the :replace option

2016-11-08 Thread Joseph Wayne Norton
Alex - Perfect. Thank you for the clarification. I wasn’t sure from the documentation. Specs for functions in spec would be really helpful. Thank you very much. > On Nov 8, 2016, at 08:59, Alex Miller wrote: > > The issue is in the call to instrument: > > (stest/instrument `ranged-rand

Re: any? in clojure 1.9.0 alpha

2016-11-08 Thread Alex Miller
On Tuesday, November 8, 2016 at 9:34:53 AM UTC-6, Colin Yates wrote: > > you mean Java with the 'billion dollar mistake' known as null? Yep, that one, which millions of programmers use every day. > The Java which has just completed changed its Date and Time API _for the > better_? They d

Re: Clarification on # as valid symbol character

2016-11-08 Thread Steven Yi
Hi Alex, Thanks for the reply, that was how I understood the intention of that text as well. It is ambiguous though, considering the discussion of auto-gensyms later in the page mentions: "If a symbol is non-namespace-qualified and ends with '#', it is resolved to a generated symbol with the

Re: Voting

2016-11-08 Thread Fergal Byrne
Thanks Alex for bringing this up. You guys (quite transparently) have a way of dealing with issues/updates/contribs/discussions which is a little controversial compared with others', and many of us see both sides of that choice. So it's definitely good to see that votes count, and even more to let

Re: any? in clojure 1.9.0 alpha

2016-11-08 Thread Colin Yates
> Back at ya. I respect your opinion - I just see things differently. I think that is the perfect way to end this conversation :-). On 8 November 2016 at 16:17, Alex Miller wrote: > > On Tuesday, November 8, 2016 at 9:34:53 AM UTC-6, Colin Yates wrote: >> >> you mean Java with the 'billion dollar

Re: Clarification on # as valid symbol character

2016-11-08 Thread Andy Fingerhut
Steven: Regarding Alex Miller's "Voting" message of today, you could consider voting on this related ticket if you are so inclined: http://dev.clojure.org/jira/browse/CLJ-1527 I just realized that having a warning in a lint tool like Eastwood for using characters other than those explicitly endor

Re: Clarification on # as valid symbol character

2016-11-08 Thread Steven Yi
Hi Andy, Thanks for this, I hadn't realized there was a ticket and prior discussion. I've voted on the ticket and will add a mention of '#' and this thread to the ticket. All best, steven On Tuesday, November 8, 2016 at 11:31:03 AM UTC-5, Andy Fingerhut wrote: > > Steven: > > Regarding Alex M

clojure.spec.gen: Negative testing

2016-11-08 Thread matthew
I want to do generative testing with clojure.spec, specifically both positive and negative tests. Is clojure.spec intended to be used in this way? Suppose I have this function which accepts external input from the user: (defn handle-action [[action payload]] (case action :create (do-creat