Re: In cljs a/go expands into clojure.core.async/go instead of cljs.core.async.macros/go

2017-10-27 Thread Vitalie Spinu
>> On Fri, Oct 27 2017 04:11, Lubomir Konstantinov wrote: > Here is what I do in a case close to yours: > (defn- cljs-env? [...] > (let [is (if (cljs-env? &env) 'cljs.test/is 'clojure.test/is)] [...] This just cannot be right. If every developer would need to recur to such tricks in order to

In cljs a/go expands into clojure.core.async/go instead of cljs.core.async.macros/go

2017-10-26 Thread Vitalie Spinu
Hi, I am having hard time writing a macro in cljc which uses core.async/go macro. Minimal project that illustrates the problem is here . In a nutshell: core.clj: (ns cljproj.core (:require #?(:clj [clojure.core.async :refer

Re: How to spec meta?

2017-10-24 Thread Vitalie Spinu
>> On Tue, Oct 24 2017 06:12, Alex Miller wrote: > (s/def ::o #(s/valid? ::meta-spec (meta %))) > should work. > On Saturday, October 21, 2017 at 3:57:20 PM UTC-5, Vitalie Spinu wrote: >> >> >> Hi, >> >> If my meta spec looks like >> >>

How to spec meta?

2017-10-21 Thread Vitalie Spinu
Hi, If my meta spec looks like (s/def ::meta-spec (s/keys :req [::xyz])) how do I define a spec for objects whose meta conforms to `::meta-spec`? Thanks! -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to cl

Re: core.async/close! locks on chans with pending transforms

2017-07-04 Thread Vitalie Spinu
>> On Mon, Jul 03 2017 21:18, Timothy Baldridge wrote: > This means, if you want to execute take correctly you must ensure that only > one thread executes the take instance at one time, since channels already > operate via a channel-level lock, it makes sense to run the transducer > inside the ch

Re: core.async/close! locks on chans with pending transforms

2017-07-03 Thread Vitalie Spinu
On Monday, 3 July 2017 22:48:40 UTC+2, red...@gmail.com wrote: > > > Discussion of locks aside, doing blocking operations like io or >!! or basically anything that looks like it blocks and isn't >! or is a very bad idea in a transducer on a channel. You will (eventually) > block the threadpo

Re: core.async/close! locks on chans with pending transforms

2017-07-03 Thread Vitalie Spinu
> the side-effect of this means that no other operation (puts, takes or closes) Is there a deeper reason for this beside the ease of implementation? If chan is buffered I still fail to see why should close and take block. -- You received this message because you are subscribed to the Googl

Re: Simultaneous development of a clojure project and an internal util library

2017-07-03 Thread Vitalie Spinu
Leningen has checkout dependencies for this purpose: https://github.com/technomancy/leiningen/blob/master/doc/TUTORIAL.md#checkout-dependencies Vitalie -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to cloju

core.async/close! locks on chans with pending transforms

2017-07-03 Thread Vitalie Spinu
Hi, Async/close! causes deadlocks if its reducer is stalled (e.g. waits for an event from another chan). Consider: (let [d (chan) s (chan 1 (map (fn [v] (println "this:" v) (println "from d:" (! s 1)) (Thread/sleep 100) (pri