Re: How to eval one "step" of a form?

2017-07-22 Thread Lincoln Bergeson
Thank you, that's very helpful. I'm wondering if you know of a ClojureScript debugging library (something on the level of xlib for php) that I can use to watch the evaluation of forms programmatically with breakpoints. I'm trying to develop a tool that runs a Clojure program by stepping throu

Re: Migrating nREPL out of Clojure Contrib

2017-07-22 Thread Colin Fleming
> > Are you saying the contrib process is deliberatly made to be difficult for > the community to contribute to it? No, not at all, just that it's deliberately designed to be exactly the way it is, so dedicating a lot of time to trying to change that is likely to be frustrating and fruitless. I

Re: Migrating nREPL out of Clojure Contrib

2017-07-22 Thread Didier
> The contrib process is in place because some want it that way - it's very > deliberately by design and AFAICT unlikely to change. Are you saying the contrib process is deliberatly made to be difficult for the community to contribute to it? If so, maybe if it had more obvious tenets, I find it

Re: Should the completion arity of a stateful transducer reset state?

2017-07-22 Thread David Bürgin
On 22/07/17 22:02, Timothy Baldridge wrote: > Once a transducer is completed it should never be called again. Thank you, Timothy, this was probably obvious but I don't remember reading it anywhere so this really helped. David -- You received this message because you are subscribed to the Google

Re: How is this code to create a stateful lazy sequence?

2017-07-22 Thread David Bürgin
Perhaps you want to study the implementation in Medley, those are always very good quality: https://github.com/weavejester/medley/blob/254989ed3de83c30ce0101d66c7ce1b6ee257b4d/src/medley/core.cljc#L173 David -- You received this message because you are subscribed to the Google Groups "Clojure"

Re: How is this code to create a stateful lazy sequence?

2017-07-22 Thread Timothy Baldridge
If we think about what we're doing here is a stateful filter, then maybe we could leverage a few more core Clojure functions: (defn distinct-by [f coll] (let [seen (atom #{})] (filter (fn [itm] (let [m (f itm)] (when-not (@seen m) (swap!

Re: Should the completion arity of a stateful transducer reset state?

2017-07-22 Thread Timothy Baldridge
Once a transducer is completed it should never be called again. This is why transduce takes both a transducer and a reducing function and combines them internally. The thought here is that it will be harder to shoot yourself in the foot by reusing a stateful reducing function if you don't have to c

Should the completion arity of a stateful transducer reset state?

2017-07-22 Thread David Bürgin
Hello all, I found an edge case where stateful transducers in core differ in whether they reset or clear state in the completion arity (partition-all) or don’t (take). Given the two transformed reducing functions (def conj-partitioning-all-3 ((partition-all 3) conj)) (def conj-taking-3 (

How is this code to create a stateful lazy sequence?

2017-07-22 Thread Rob Nikander
Hi, Here's a function and a simple use of it. It works, but the code may not be good Clojure. I'm wondering how it might be better. (defn distinct-by "Returns a sequence with no repeats of (f item). A set is built up internally as the sequence is consumed, so don't use it on an infinite

Re: Reducing Jar file size for AWS Lambda

2017-07-22 Thread Jose Trigueros
Hi Moe, Thanks for your suggestions, yes, I've been mostly practicing the first option suggested. docker-lambda is a good option as well. It does help that Lambda provides test messages, which is what I've been using to test locally. Seems like the best way to go about it is to test as much as

Re: [ANN] clojure.java.jdbc 0.7.0 Beta 2

2017-07-22 Thread Justin Smith
refer-clojure doesn't ever remove mappings, it only adds them The reason a refer-clojure clause in your ns form can prevent bindings is because your refer-clojure clause (which is likely more qualified than the default) overrides the args that ns would otherwise provide to refer-clojure. On Sat

Re: [ANN] clojure.java.jdbc 0.7.0 Beta 2

2017-07-22 Thread Phillip Lord
Apologies, didn't mean to follow that thread! Phillip Lord writes: > I am confused about how to exclude clojure.core from a namespace already > exists. That is, I have not just created the namespace, but it's been > given to me by a tool. > > Consider, for example: > > > > > lein repl > nREPL s

Re: [ANN] clojure.java.jdbc 0.7.0 Beta 2

2017-07-22 Thread Phillip Lord
I am confused about how to exclude clojure.core from a namespace already exists. That is, I have not just created the namespace, but it's been given to me by a tool. Consider, for example: lein repl nREPL server started on port 41054 on host 127.0.0.1 - nrepl://127.0.0.1:41054 REPL-y 0.3.7, n

Re: Migrating nREPL out of Clojure Contrib

2017-07-22 Thread Colin Fleming
> > I'd much rather see nREPL stay within contrib and the renewed effort, that > you propose, to go into ironing out kinks in the contrib process FWIW I don't think this is a realistic option, certainly not for anyone outside of Clojure core. The contrib process is in place because some want it t