Re: Generating varying sized map using test.check

2015-07-25 Thread Gary Fredericks
It also might be helpful to know that there is already a subset generator available in this library . Gary On Saturday, July 25, 2015 at 6:54:59 PM UTC-5, Carlo wrote: > > Hey Mayank! > > What you've done here might appear to work, but it wi

Re: Generating varying sized map using test.check

2015-07-25 Thread Carlo Zancanaro
Hey Mayank! What you've done here might appear to work, but it will get you into trouble when test.check starts to shrink your inputs. When test.check runs your generators it relies you you using it as your only source of randomness, and so your use of `rand-int` will cause some problems. The tri

Re: What is the best way to pass log configs everywhere without a global var?

2015-07-25 Thread crocket
I have a feeling that there is a better way to pass log config as implicit argument or implicit context without a global var. Perhaps, I'm being unreasonable, considering that logging itself is not a pure operation that shouldn't do I/O. On Sunday, July 26, 2015 at 1:21:14 AM UTC+9, Shantanu Kumar

Re: Tool authors: ClojureScript support in tools.namespace?

2015-07-25 Thread Brian Marick
Midje Stuart Sierra wrote: 1. Do you need/want ClojureScript support? Eventually, but not soon. 2. What namespaces (repl, find, dir, file, parse) do you call in tools.namespace? repl, dir, track, reload 3. How would you like to distinguish between "get me Clojure sources" a

Generating varying sized map using test.check

2015-07-25 Thread Mayank Jain
Hi, I would like to generate variable sized map using test.check i.e. given any generator which generates a map, it should randomly select-keys from it. Here's what I've come up with so far: > (ns proj.util (:require [clojure.test.check.generators :as gen] [clojure.math.combinat

Re: pr-str and safe serialization

2015-07-25 Thread xavi
Hello, I also stumbled on this bug. Here's a simple example showing the problem... (def a (pr-str (map (fn [i] (println "hi") i) [1]))) After executing that code I was expecting the value of `a` to be `"(1)"`, but instead the actual value is `"(hi\n1)"`. Xavi On Thursday, June 25, 2015 at 2

Re: [ANN] Pink 0.2.0, Score 0.3.0

2015-07-25 Thread Steven Yi
Thanks Ruslan and best of luck in your musical work! On Sat, Jul 25, 2015 at 12:24 AM, Ruslan Prokopchuk wrote: > Steven, thank you for continuing to develop Pink & Score! I have some music > projects as my slowly-moving-forward-hobbies, and having pure java, no deps > like Supercollider, engine

Re: What is the best way to pass log configs everywhere without a global var?

2015-07-25 Thread Shantanu Kumar
Logging calls are far too frequent to practically pass config as argument everywhere, hence some kind of shared implicit context is required. Which logging libraries are you dealing with? If you use Timbre[1], you can pass config using dynamic vars or altering global state. If you use Logback[2]

Re: Tool authors: ClojureScript support in tools.namespace?

2015-07-25 Thread Stuart Sierra
On Sat, Jul 25, 2015 at 11:15 AM, Bozhidar Batsov wrote: > it'd be great if we could provide the same functionality for cljs. I'd like to say I know how to do that, but I just don't think it's possible right now. The way tools.namespace does reloading in Clojure(JVM) depends on implementation de

Re: Tool authors: ClojureScript support in tools.namespace?

2015-07-25 Thread Bozhidar Batsov
Stuart mentioned that equivalent tools already exist for cljs, but I'm not sure what he refers to. CIDER makes use of `c.t.n.repl/refresh` (its lower-level blocks to be precise) and it'd be great if we could provide the same functionality for cljs. On 25 July 2015 at 17:37, Dylan Butman wrote: >

Re: Tool authors: ClojureScript support in tools.namespace?

2015-07-25 Thread Stuart Sierra
On Sat, Jul 25, 2015 at 10:37 AM, Dylan Butman wrote: > Clojurescript support would be a fantastic improvement for reloading cljs > component systems. As I said, I am not planning a complete port of the reloading functionality of clojure.tools.namespace.repl to work in ClojureScript. The mechan

What is the best way to pass log configs everywhere without a global var?

2015-07-25 Thread crocket
Logging libraries seem to rely on a global config. This looks like a dangerous state that could blow up. I researched a little, and there seems to be reader monad and dependency injection, all of which feel awkard. Is there not a decent approach to passing log config without a global var? -- Y

Re: Tool authors: ClojureScript support in tools.namespace?

2015-07-25 Thread Dylan Butman
I use .repl constantly for namespace reloading. Clojurescript support would be a fantastic improvement for reloading cljs component systems. On Friday, July 24, 2015 at 5:14:04 PM UTC-4, Stuart Sierra wrote: > > Hello to anyone and everyone writing tools for working with Clojure and > ClojureScr

Re: Paper on Immutable Persistent Data Structures

2015-07-25 Thread Jean Niklas L'orange
On Tuesday, July 21, 2015 at 1:43:54 AM UTC+2, JvJ wrote: > > Does anyone know if there exists a paper/web page describing in detail how > each of Clojure's data structures are implemented? > I have a formal analysis and all the core algorithms related to the Persistent Vector in Chapter 2 of my

Re: Tool authors: ClojureScript support in tools.namespace?

2015-07-25 Thread Lars Andersen
refactor-nrepl, which is the brain behind refactoring libraries like clj-refactor and clj-light-refactor uses: 1. find/find-namespaces-in-jarfile 2. file/clojure-file? 3. find/find-clojure-sources-in-dir 4. parse/read-ns-decl And finally, dependency, file and track are used together to get a lis

Re: Tool authors: ClojureScript support in tools.namespace?

2015-07-25 Thread Daniel Compton
Kibit uses a vendored copy of file/clojure-file? and find/find-clojure-sources-in-dir, to support other possible Clojure extensions like cljx. Without the ability to add more extensions like cljx we couldn't switch back, however even if they were added, it's probably not worth adding the dep for tw