Re: [ANN] 'Elements of Clojure' is complete

2018-12-03 Thread John Schmidt
I have been holding off bying this until it was done, but now it's time to get comfy and dive in, exciting! Thanks for all the inspiring talks and great Clojure libraries throughout the years, they've made me a better programmer in general and a better Clojure programmer in particular. On Mond

Re: [ANN] 1.10.0-beta5

2018-11-06 Thread John Schmidt
Wow, that's a nice example, makes it clear that it brings something new to the table! On Tuesday, November 6, 2018 at 4:50:55 PM UTC+1, Alex Miller wrote: > > > On Tuesday, November 6, 2018 at 9:25:31 AM UTC-6, John Schmidt wrote: >> >> Nice to see continued progress on

Re: [ANN] 1.10.0-beta5

2018-11-06 Thread John Schmidt
Nice to see continued progress on Clojure 1.10! It is not clear to me what metadata extension provides that is not already possible with direct definitions or external extensions. Some additional background or a small motivating example would be much appreciated in clearing up the confusion! O

Re: Clojure.spec, maps, restrict valid keywords, easier way?

2017-02-03 Thread John Schmidt
I suggest something like (defn fetch-encrypted [] (fetch-important-data {:encrypt true})) + unit tests On Friday, February 3, 2017 at 2:56:34 AM UTC+1, Michael Gardner wrote: > > What would be the Right Way to deal with typos like (fetch-important-data > {:encypt true}), where the :encrypt key i

Re: clojure.spec bug?

2017-01-02 Thread John Schmidt
No worries! Big thanks for digging into this, I saw your update on the JIRA as well and it certainly seems like you've found the likely culprit. On Monday, January 2, 2017 at 4:47:53 PM UTC+1, miner wrote: > > > On Jan 1, 2017, at 7:13 PM, John Schmidt > wrote: > >

Re: [ANN] clj-cbor - Concise Binary Object Representation

2017-01-02 Thread John Schmidt
Looks neat! What would you say are the pros and cons of CBOR compared to Fressian , which seems to have similar goals? On Thursday, December 29, 2016 at 5:34:36 AM UTC+1, Gregory Look wrote: > > mvxcvi/clj-cbor is a nati

Re: Recursive specs & forward declarations

2017-01-02 Thread John Schmidt
(there are no preds!). Because the maps are > using required keys, it has to try to create them. > > > On Sunday, January 1, 2017 at 9:04:20 PM UTC-6, John Schmidt wrote: >> >> I just ran in to a similar issue: >> >> - >> >

Re: Recursive specs & forward declarations

2017-01-01 Thread John Schmidt
I just ran in to a similar issue: - (require '[clojure.spec :as s]) (s/def ::a (s/keys :req [::b])) (s/fdef ::a-fn :args (s/cat :arg ::a) :ret ::a) (s/def ::b (s/keys :req [::a-fn])) ;; All of these fail even with s/*recursion-limit* bound to 1. (s/exercise ::

Re: clojure.spec bug?

2017-01-01 Thread John Schmidt
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

Re: clojure.spec bug?

2016-12-30 Thread John Schmidt
ttp://corfield.org/ > > "If you're not annoying somebody, you're not really alive." > -- Margaret Atwood > > > > On 12/30/16, 6:42 AM, "John Schmidt" on behalf of john.sc...@gmail.com > wrote: > > > > Hello folks! > > &g

clojure.spec bug?

2016-12-30 Thread John Schmidt
Hello folks! I have the following two clj files (I've tried to come up with a minimal example): core.clj -- (ns spec-test.core (:require [clojure.spec :as s])) (defprotocol Game (move [game])) (s/def ::game1 #(satisfies? Game %)) (s/def ::game2 (partial satisfies? Game)) foo