Re: [ANN] Clojure 1.9.0-alpha4

2016-06-03 Thread Atamert Ölçgen
On Sat, Jun 4, 2016 at 9:28 AM, <676c7...@gmail.com> wrote: > This isn’t only an optimisation but also a change in behaviour, isn’t > it? > > Clojure 1.9.0-alpha3: > > user=> (let [[x & xs] #{1 2 3}] x) > UnsupportedOperationException nth not supported on this type: > PersistentHashSet clojure.la

Re: [ANN] Clojure 1.9.0-alpha4

2016-06-03 Thread 676c7473
This isn’t only an optimisation but also a change in behaviour, isn’t it? Clojure 1.9.0-alpha3: user=> (let [[x & xs] #{1 2 3}] x) UnsupportedOperationException nth not supported on this type: PersistentHashSet clojure.lang.RT.nthFrom (RT.java:948) Clojure 1.9.0-alpha4: user=> (let [[x & xs]

Re: Get the name of parameters in a function

2016-06-03 Thread Atamert Ölçgen
On Sat, Jun 4, 2016 at 1:45 AM, James Reeves wrote: > You can do it with a macro. > > - James > > On 3 June 2016 at 22:22, Steven Zhou wrote: > >> Is it possible to write down a function do the following? >> >> (defn foo >> [input] >> >> ) >> >> (def x "Hello") >> (def y "Clojure")

Re: lazy-seq and somewhat greedy apply

2016-06-03 Thread Jason Wolfe
In case it's useful, here is a fully lazy variant of 'apply concat': https://github.com/plumatic/plumbing/blob/master/src/plumbing/core.cljx#L179 -Jason On Friday, June 3, 2016 at 2:26:43 AM UTC+8, Andy L wrote: > > Hi, > > I have a riddle I am not sure how to solve: > ``` > user=> (defn just-a-

Re: Get the name of parameters in a function

2016-06-03 Thread James Reeves
You can do it with a macro. - James On 3 June 2016 at 22:22, Steven Zhou wrote: > Is it possible to write down a function do the following? > > (defn foo > [input] > > ) > > (def x "Hello") > (def y "Clojure") > > (foo [x y]) > => {:x "Hello" :y "Clojure"} > > > Regards, > -Steven

Get the name of parameters in a function

2016-06-03 Thread Steven Zhou
Is it possible to write down a function do the following? (defn foo [input] ) (def x "Hello") (def y "Clojure") (foo [x y]) => {:x "Hello" :y "Clojure"} Regards, -Steven -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to thi

ANN: ClojureScript 1.9.36 - cljs.spec fixes & performance enhancements

2016-06-03 Thread David Nolen
ClojureScript, the Clojure compiler that emits JavaScript source code. README and source code: https://github.com/clojure/clojurescript Leiningen dependency information: [org.clojure/clojurescript "1.9.36"] This release fixes a cljs.spec bug around instrumented multi-arity fns. It also incl

Re: [ANN] Flake 0.4.0: Decentralized, k-ordered unique ID generator

2016-06-03 Thread Max Countryman
Hi again, I just released flake 0.4.1, containing a bugfix where `timer/read-timestamp` would throw an uncaught exception when the provided path did not exist. Thanks, Max > On Jun 2, 2016, at 18:03, Max Countryman wrote: > > Hi, > > I’m happy to announce a new release of Flake, the decent

Re: [ANN] Flake 0.4.0: Decentralized, k-ordered unique ID generator

2016-06-03 Thread Max Countryman
Hi Mark, I haven’t done any benchmarking comparing Flakes to UUIDs. However the primary benefit of flake IDs, over a traditional UUID, e.g. UUID-1, is flakes do not require coordination (i.e. to avoid clock-skew and duplicate IDs), provide k-ordering (UUID-1’s bit ordering breaks this), and use

Re: test.check for-all reuses generated values?

2016-06-03 Thread Tom
On Thursday, June 2, 2016 at 8:57:24 PM UTC-5, Gary Fredericks wrote: > > The generator should definitely always generate unique values (though only > because gen/uuid does that), though as you say shrinking is different > case that would be problematic for what you're doing. When you say "I do