Re: [ANN] Clojure 1.7.0-beta1 released

2015-04-25 Thread Geraldo Lopes de Souza
Thank you Mr. Alex Miller! Fancy printing of exceptions is working :) Geraldo On Friday, April 10, 2015 at 4:26:30 PM UTC-3, Alex Miller wrote: Clojure 1.7.0-beta1 is now available. Try it via - Download: https://repo1.maven.org/maven2/org/clojure/clojure/1.7.0-beta1/ - Leiningen:

any?

2015-04-25 Thread coltnz
Any reason why we don't have `any?`. Googled without much luck. Trivially done as `comp boolean some` not doubt, but I know I use it more than not-any at least. It's particularly useful as a composable `or`. -- You received this message because you are subscribed to the Google Groups Clojure

Re: any?

2015-04-25 Thread Timothy Baldridge
bleh, hit reply too fast. Or also returns the first true value, so (or false nil 42) returns 42. I guess I don't see when I'd use 'any?' On Sat, Apr 25, 2015 at 7:42 PM, Timothy Baldridge tbaldri...@gmail.com wrote: But it's not really like `or On Sat, Apr 25, 2015 at 7:32 PM, coltnz

Re: ANN: ClojureScript 0.0-3211

2015-04-25 Thread Allen Rohner
On Saturday, April 25, 2015 at 4:11:40 PM UTC-5, Allen Rohner wrote: On Saturday, April 25, 2015 at 12:02:08 PM UTC-5, Mike Fikes wrote: Hey Tony, try updating the version of Clojure in your project.clj to 1.7.0-beta1, which is used by 0.0-3211. (In short, reader/read was given a

Re: any?

2015-04-25 Thread Ambrose Bonnaire-Sergeant
Do you mean any? as in (defn any? [p c] (boolean (seq (filter? p c Thanks, Ambrose On Sat, Apr 25, 2015 at 9:43 PM, Timothy Baldridge tbaldri...@gmail.com wrote: bleh, hit reply too fast. Or also returns the first true value, so (or false nil 42) returns 42. I guess I don't see when

Re: ANN: ClojureScript 0.0-3211

2015-04-25 Thread David Nolen
You need to make sure some other dependency isn't pulling in a different version of tools.reader. David On Sat, Apr 25, 2015 at 11:11 PM, Allen Rohner aroh...@gmail.com wrote: On Saturday, April 25, 2015 at 12:02:08 PM UTC-5, Mike Fikes wrote: Hey Tony, try updating the version of Clojure

Re: ANN: ClojureScript 0.0-3211

2015-04-25 Thread Mike Fikes
Hey Tony, try updating the version of Clojure in your project.clj to 1.7.0-beta1, which is used by 0.0-3211. (In short, reader/read was given a second arity to allow options to be passed, thus supporting #? conditional reading.) -- You received this message because you are subscribed to the

Re: ANN: ClojureScript 0.0-3211

2015-04-25 Thread Allen Rohner
On Saturday, April 25, 2015 at 12:02:08 PM UTC-5, Mike Fikes wrote: Hey Tony, try updating the version of Clojure in your project.clj to 1.7.0-beta1, which is used by 0.0-3211. (In short, reader/read was given a second arity to allow options to be passed, thus supporting #? conditional

Re: any?

2015-04-25 Thread Timothy Baldridge
But it's not really like `or On Sat, Apr 25, 2015 at 7:32 PM, coltnz colin.tay...@gmail.com wrote: Any reason why we don't have `any?`. Googled without much luck. Trivially done as `comp boolean some` not doubt, but I know I use it more than not-any at least. It's particularly useful as a

Re: any?

2015-04-25 Thread Alex Miller
I think 'some' fills this role. Given truthy values, why do you need to use boolean with it? On Saturday, April 25, 2015 at 8:32:09 PM UTC-5, Colin Taylor wrote: Any reason why we don't have `any?`. Googled without much luck. Trivially done as `comp boolean some` not doubt, but I know I use

Re: any?

2015-04-25 Thread Devin Walters
I think Ambrose is getting at what the original poster is after. I've written this a number of times, but seem to recall doing something like `(def any? (complement not-any?))`, though I'd need to go back and look. `not-any?` is just `(comp not some)` under the covers, so I guess I'm not sure why

Re: Performance of defmulti in both ClojureScript and Clojure

2015-04-25 Thread Alex Miller
I should say all of that is for Clojure and likely bears no similarity to the nuances in ClojureScript. On Saturday, April 25, 2015 at 9:39:06 PM UTC-5, Alex Miller wrote: On Saturday, April 25, 2015 at 9:33:18 AM UTC-5, Timur wrote: Hi everyone, There are situations where I want to

Re: any?

2015-04-25 Thread Colin Taylor
So I was thinking of: user= (def any? (comp boolean some)) #'user/any? user= (any? true? [false true false]) true user= (any? even? [1 2 3]) true ; touch 3 user= (any? #(.exists %) [(file 1) (file 2) (file 3)]) true Some motivations - my main one is Java interop where use of non booleans would

Re: Performance of defmulti in both ClojureScript and Clojure

2015-04-25 Thread Alex Miller
On Saturday, April 25, 2015 at 9:33:18 AM UTC-5, Timur wrote: Hi everyone, There are situations where I want to dispatch functions using based on their certain properties. I can also use case statements instead but it looks more coupled and more change is required if I want to add new

Re: Meaning of part of the doc string for `ns-resolve`

2015-04-25 Thread Fluid Dynamics
On Saturday, April 25, 2015 at 1:47:27 AM UTC-4, Mike Rodriguez wrote: I agree about wanting to use the explicit argument name surrounded by markdown quotes in docs. I've definitely started adopting this practice and wish there were conventions around this sort of thing. Without it, doc

Re: Could type function (type X) print nothing?

2015-04-25 Thread 임정택
My god, you save me. Thanks! 2015년 4월 25일 토요일 오후 12시 48분 25초 UTC+9, James Reeves 님의 말: (str nil) = (type nil) = nil (str (type nil)) = Rather than use `str`, try using `pr-str` to get a more accurate representation of the data: (pr-str nil) = nil

Performance of defmulti in both ClojureScript and Clojure

2015-04-25 Thread Timur
Hi everyone, There are situations where I want to dispatch functions using based on their certain properties. I can also use case statements instead but it looks more coupled and more change is required if I want to add new types. What I want to ask is if I need to avoid using multi-methods

Re: Meaning of part of the doc string for `ns-resolve`

2015-04-25 Thread Mike Rodriguez
I have found long docs like that to be useful in some major top-level function if it has a large sort of input and configuration parameters to pass in. Markdown I believe means with back ticks around the symbol to make it stand out as an actual art name vs some other word in the sentence. I

Re: ANN: ClojureScript 0.0-3211

2015-04-25 Thread Tony Tam
Hi, I'm getting the following error when running cljsbuild with the latest clojurescript build (3211). Changing back to 3126 makes the build work. Haven't been able to pinpoint the source. clojure.lang.ArityException: Wrong number of args (2) passed to: reader/read at