Re: Cyclic namespace dependencies!

2016-12-31 Thread squeegee
On Friday, December 30, 2016 at 8:59:46 PM UTC-5, puzzler wrote: > > On Fri, Dec 30, 2016 at 4:55 PM, Timothy Baldridge > wrote: > >> I can see that, and even spec has this use case. In Spec it's solved by >> having both A and B in one namespace and using declare to forward-declare >> the cons

Re: clojure.spec bug?

2016-12-31 Thread Steve Miner
> On Dec 30, 2016, at 9:42 AM, John Schmidt wrote: > > (s/def ::game1 #(satisfies? Game %)) > (s/def ::game2 (partial satisfies? Game)) > > (s/explain ::game2 (spec-test.foo/->Foo)) > val: #spec_test.foo.Foo{} fails spec: :spec-test.core/game2 predicate: > (partial satisfies? Game) < W

Re: Cyclic namespace dependencies!

2016-12-31 Thread Timothy Baldridge
Be really careful with Potemkin. I've had a lot of build issues (especially around AOT) with that library. I'll try to put this as kindly as I can...it's a bit of a hack that leverages some undocumented aspects of the Clojure API. As such it's been the source of some really weird compile errors tha

Re: clojure.spec bug?

2016-12-31 Thread Alex Miller
You can file a jira on this. On Saturday, December 31, 2016 at 10:16:00 AM UTC-6, miner wrote: > > > On Dec 30, 2016, at 9:42 AM, John Schmidt > wrote: > > (s/def ::game1 #(satisfies? Game %)) > (s/def ::game2 (partial satisfies? Game)) > > > (s/explain ::game2 (spec-test.foo/->Foo)) > val: #spe

Re: Order preservation and duplicate removal policy in `distinct`

2016-12-31 Thread Alex Miller
Replying to many things in this thread at once here... Re lazy sequences, I think you can take it as implicit and rely on the input seq order is retained (same as other sequence functions). Re duplicates, the current implementation retains the first element, but as mentioned this is not stated

Re: maven-shade-plugin issues with Clojure core (or any clj) AOT compilation

2016-12-31 Thread Alex Miller
This seems like a pretty straightforward bug with maven-shade-plugin not preserving information that it should, so it seems like it should be fixed there. On Wednesday, December 28, 2016 at 7:06:11 AM UTC-6, Mike Rodriguez wrote: > > Background: > > This problem is specific to building jars that

Re: foo.spec?

2016-12-31 Thread Alex Miller
There's a Javascript port - https://github.com/prayerslayer/js.spec On Thursday, December 29, 2016 at 12:17:47 PM UTC-6, Rich Morin wrote: > > Does anyone know of efforts to port clojure.spec to other languages? I > thought I had seen someone mention versions for Haskell and Scala, but I > can'

Re: Cyclic namespace dependencies!

2016-12-31 Thread Colin Fleming
As a counterpoint to this, note that ClojureScript does the same thing (for different reasons, but the same mechanism): https://github.com/clojure/clojurescript/blob/master/src/main/clojure/cljs/core.cljc#L91-L101 On 1 January 2017 at 05:24, Timothy Baldridge wrote: > Be really careful with Po

Re: Cyclic namespace dependencies!

2016-12-31 Thread William la Forge
I think Timothy Baldridge had a great answer. For example, I often have records which use each other's constructors. But you can put your factoy methods in a map of dependencies. I generally have a build function which takes a hash map as an argument, associates the various data and functions t

Re: [ANN] Instaparse 1.4.5

2016-12-31 Thread Jeaye
Mark, Thanks for the 1.4.5 fixes; defparser is now working properly with clojure.java.io/resources and :auto-whitespace in my compiler. :) On Fri, Dec 30, 2016 at 04:02:02PM -0800, Mark Engelberg wrote: > Instaparse is a library for generating parsers from context-free grammars. > https://github