Re: Clojure support for Visual Studio Code

2016-09-20 Thread Andrey Lisin
Hi Michael, 1. Showing a docstring on hover is a standard VSCode behavior. I don't think any extension should change it without a good reason. 2. I will investigate if it is possible to run repl from within VSCode. On the other hand, this behavior can be unexpected for some users. I believe, m

[ANN] New releases: Glow 0.1.4 and Ultra 0.5.0

2016-09-20 Thread W. David Jarvis
Fellow Clojurists - I'm happy to announce new releases of both Glow and Ultra. Glow is a library for syntax highlighting of Clojure source code. It uses ANTLR for parsing and lexing, which allows you to bypass concerns about accidentally evaluating the inpu

In clojure.spec, how to declare all valid keys in a map

2016-09-20 Thread David Goldfarb
In clojure.spec, how can I declare a map that accepts only certain keys? *{::a 1 ::b 2 ::BAD 3}* does conform to *(s/keys :req :req [::a ::b])*, but I want a spec that will be bothered by ::BAD or any other undeclared key. My use case: I am introducing spec to some legacy code, and I want to b

Re: In clojure.spec, how to declare all valid keys in a map

2016-09-20 Thread Beau Fabry
boot.user=> (s/def ::my-map (s/and (s/keys :req [::a ::b]) (s/map-of #{::a ::b} any?))) boot.user=> (s/explain ::my-map {::a 1 ::b 2 ::BAD 3}) In: [:boot.user/BAD 0] val: :boot.user/BAD fails spec: :boot.user/my-map at: [0] predicate: #{:boot.user/a :boot.user/b} Seems better On Tuesday, Septe

Re: In clojure.spec, how to declare all valid keys in a map

2016-09-20 Thread Alex Miller
For stuff like this s/merge is probably preferable to s/and (when combining map specs) - the difference being that merge does not flow conformed results, will combine all failures, and that gen can work better in some cases. (s/def ::a int?) (s/def ::b string?) ;; changed for this example (s/e

[ANN] beta.clojars.org: new Clojars infrastructure that needs testing

2016-09-20 Thread Daniel Compton
Hi folks We’re moving the Clojars infrastructure from Linode to the very kind folks at Rackspace. We’re getting close, and have a test server setup at beta.clojars.org. It has a copy of the live database as of a day ago, and is mirroring JARs from the live server. We’ve done testing of what we can

Re: core.async top use cases

2016-09-20 Thread William la Forge
My bad. I was thinking of atomic. Swap! doesn't work with side effects, but send does. On Tuesday, September 20, 2016 at 2:50:53 AM UTC-4, Matan Safriel wrote: > > Thanks but I'm not entirely sure about this. I could use agents for side > effects too, or at least I thought so. Care to further cl

Re: core.async top use cases

2016-09-20 Thread Beau Fabry
I'm no expert on this, but the Actor model and the CSP model seem to be two different ways to model a concurrent system. Clojure supports them both. Personally I find the CSP model a simpler and easier to understand one than Actors, and so pretty much default to it. You might find non-clojure r

Re: core.async top use cases

2016-09-20 Thread Matan Safriel
Actually, I am not sure clojure implements the actor model, which I can only construe as the Erlang actor model here. I am almost certain the core language explicitly does not: http://clojure.org/about/state It can be shoehorned somehow (see okku) but I would probably not venture saying clojure