Re: Please try the alphas and betas!

2011-11-02 Thread John Szakmeister
On Mon, Oct 31, 2011 at 4:25 PM, Sean Corfield wrote: > On Mon, Oct 31, 2011 at 8:06 AM, Timothy Baldridge > wrote: >> I'd like to second what Bill said...I don't really have the time to >> setup a clojure build process to test out the 1.4 Alphas/Betas, but if >> there was a way for me to get to

Re: Thoughts on a polyglot app server?

2011-11-02 Thread Meikel Brandmeyer
Maybe this? http://immutant.org/news/2011/11/01/announcing/ Am 01.11.2011 um 21:48 schrieb Jason Toy: > Any more plans or ideas on this? -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com No

Re: ANN: metrics-clojure 0.1.0

2011-11-02 Thread Matthew Gilliard
Ah - we'll certainly be using this soon - thanks! mg On Tue, Nov 1, 2011 at 4:32 PM, Steve Losh wrote: > Last night I released an initial version of metrics-clojure, which is a thin > Clojure wrapper around Coda Hale's awesome metrics[1] library: > > http://github.com/sjl/metrics-clojure > http

Re: Datestreams

2011-11-02 Thread Alan Malloy
The call to (set day-nums) should really be pulled out of the inner function to avoid rebuilding the set over and over: (defn day-of-week-stream [& day-nums] (let [day-set (set day-nums)] (filter #(day-set (.. % dayOfWeek get)) (today+all-future- dates On Nov 1, 10:57 pm, Baishampayan G

-> vs ->> and names vs anonymous function

2011-11-02 Thread Dennis Haupt
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 hi there, i stumbled over two odd things 1) -> and ->> have the same source code. why is that? 2) why can't i use "(-> "hi" #(println %))" directly? why do i have to put my function into a symbol first? is there a way to avoid this? (let [dummy #(pri

Re: -> vs ->> and names vs anonymous function

2011-11-02 Thread Jonas
On Wednesday, November 2, 2011 11:37:32 AM UTC+2, HamsterofDeath wrote: > > hi there, > > i stumbled over two odd things > 1) -> and ->> have the same source code. why is that? > Similar, but not the same [1]: (~(first form) ~x ~@(next form)) vs. (~(first form) ~@(next form) ~x) > 2) why can't

Re: -> vs ->> and names vs anonymous function

2011-11-02 Thread Baishampayan Ghose
> i stumbled over two odd things > 1) -> and ->> have the same source code. why is that? The source code is _not_ the same for the two macros you mentioned. I will leave it to you to spot the differences ;-) > 2) why can't i use "(-> "hi" #(println %))" directly? why do i have to > put my functio

Re: Lazy behavior

2011-11-02 Thread Nicolas
Hi, I'am not really sure on your explanation here. For me if the processor, JVM or clojure compiler cannot prove it doesn't change the semantics, the optimization will not be applyed. readLine behing a java method call, it can perform any operations and thus clojure compiler will not change the e

Re: -> vs ->> and names vs anonymous function

2011-11-02 Thread Matt Hoyt
First question answer: The code isn't the same.  The ~x is the first argument for -> and is the last argument for ->>.  So if you do a long chain of expression the first argument is passed into the return value into the next function with -> and ->> pass that value as the last parameter. Secon

Re: -> vs ->> and names vs anonymous function

2011-11-02 Thread Brian Mosley
On Wed, Nov 2, 2011 at 5:37 AM, Dennis Haupt wrote: > i stumbled over two odd things > 1) -> and ->> have the same source code. why is that? -> and ->> are macros that have similar purposes. "->" inserts the previous form as the first argument to the function, "->>" inserts it as the last. > 2)

Re: -> vs ->> and names vs anonymous function

2011-11-02 Thread Stefan Kamphausen
Hi, while all the other answers already offered explanations and solutions I feel like I should add, that macros like -> and ->> work on the source-code. So using -> does not mean 'pass the first thing as an argument to the function call in the second thing', it means 'take the first thing an

Re: -> vs ->> and names vs anonymous function

2011-11-02 Thread Dennis Haupt
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 thx *note: use macroexpand next time* Am 02.11.2011 10:58, schrieb Jonas: > > > On Wednesday, November 2, 2011 11:37:32 AM UTC+2, HamsterofDeath > wrote: > > hi there, > > i stumbled over two odd things 1) -> and ->> have the same source > code. w

Re: -> vs ->> and names vs anonymous function

2011-11-02 Thread Dennis Haupt
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 so -> and ->> behave the same as long as my functions only take one parameter? Am 02.11.2011 10:58, schrieb Matt Hoyt: > First question answer: > > The code isn't the same. The ~x is the first argument for -> and > is the last argument for ->>. So

Re: -> vs ->> and names vs anonymous function

2011-11-02 Thread Brian Mosley
On Wed, Nov 2, 2011 at 6:12 AM, Dennis Haupt wrote: > so -> and ->> behave the same as long as my functions only take one > parameter? They do if you avoid inline function definitions. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this

primitive type hints do not work when destructuring

2011-11-02 Thread Sergey Didenko
Seems like a bug: The following compiles: (let [[^Double x ^Double y] [0.1 0.2]] (+ x y)) This does not: (let [[^double x ^double y] [0.1 0.2]] (+ x y)) "Unable to resolve classname: double" -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post

Re: primitive type hints do not work when destructuring

2011-11-02 Thread Sergey Didenko
tested under Clojure 1.3 -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this g

Re: primitive type hints do not work when destructuring

2011-11-02 Thread bsmith.occs
On Nov 2, 11:40 am, Sergey Didenko wrote: > Seems like a bug: > > The following compiles: > > (let [[^Double x ^Double y] [0.1 0.2]] (+ x y)) > > This does not: > > (let [[^double x ^double y] [0.1 0.2]] (+ x y)) > > "Unable to resolve classname: double" This is CLJ-852. Applying the patch posted

Re: ANN: core.logic 0.6.5 release

2011-11-02 Thread David Nolen
They are still there just renamed so as not to conflict with clojure.core: -reify, -inc On Wednesday, November 2, 2011, Ambrose Bonnaire-Sergeant < abonnaireserge...@gmail.com> wrote: > What happened to reify and inc? > > Ambrose > > On Wed, Nov 2, 2011 at 12:10 PM, David Nolen wrote: >> >> Just

Re: Lazy behavior

2011-11-02 Thread David Powell
> What would be the best (idiomatic and efficiant) solution then? > - wrap my file under a lazy sequence, call take & drop recursively > with recur > - just call readLine method directly when I need more lines and > process them. > Hi, Have a look at the functions: line-seq and clojure.java.io/r

Re: Please try the alphas and betas!

2011-11-02 Thread Stuart Halloway
>>> I'd like to second what Bill said...I don't really have the time to >>> setup a clojure build process to test out the 1.4 Alphas/Betas, but if >>> there was a way for me to get to it via lein...I would just target 1.4 >>> for all my day-to-day development. >> >> This should work: >> >> :repo

Re: Dynamic test creation?

2011-11-02 Thread Nate Young
On 11/01/2011 03:05 PM, AndyK wrote: > How would (run-tests 'my-namespace) know to run all those dynamic > tests? I thought that it parsed the namespace for 'my-namespace when > you call it. Or is it that the call to defcsvtests sets off a chain of > macro resolutions before run-tests can even do i

Re: Please try the alphas and betas!

2011-11-02 Thread Hubert Iwaniuk
http://bit.ly/clojure-releases Stuart Halloway wrote: I'd like to second what Bill said...I don't really have the time to setup a clojure build process to test out the 1.4 Alphas/Betas, but if there was a way for me to get to it via lein...I would just target 1.4 for all my day-to-day developmen

Re: Datestreams

2011-11-02 Thread Benny Tsai
Quite right. Thank you for the reminder. On Wednesday, November 2, 2011 2:51:06 AM UTC-6, Alan Malloy wrote: > > The call to (set day-nums) should really be pulled out of the inner > function to avoid rebuilding the set over and over: > > (defn day-of-week-stream [& day-nums] > (let [day-set

Re: Please try the alphas and betas!

2011-11-02 Thread Chas Emerick
> Is there a way to peg a particular snapshot? If we find that > something breaks, we'd want to roll back to a previous version until > the problem is fixed. It looks like the maven metadata only has the > latest snapshot recorded (I may be wrong... I'm certainly not a Maven > guru). > > -John

Re: Homoiconicity in clojure (macro power)

2011-11-02 Thread Jeff Heon
This is the explanation that really made it click for me: The nature of Lisp http://www.defmacro.org/ramblings/lisp.html -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts fro

ANN: Clojure/West - a new Clojure conference March 16-17th in San Jose

2011-11-02 Thread Alex Miller
It is with great pleasure that I am announcing a new west coast Clojure conference: Clojure/West (more: http://clojurewest.org, http://twitter.com/clojurewest). The announcement is here: http://clojurewest.org/news/2011/11/2/clojurewest-is-launched.html. The first Clojure/West will occur March 16

Re: ANN: Clojure/West - a new Clojure conference March 16-17th in San Jose

2011-11-02 Thread Baishampayan Ghose
> It is with great pleasure that I am announcing a new west coast > Clojure conference: Clojure/West (more: http://clojurewest.org, > http://twitter.com/clojurewest).  The announcement is here: > http://clojurewest.org/news/2011/11/2/clojurewest-is-launched.html. Moar Clojure, woohoo! Regards, BG

Re: Datestreams

2011-11-02 Thread Alex Baranosky
I went with interleave because it meant I could easily recompose the singular day streams I already have... as well as other similar streams for generating days of the month and a couple others. I have no concern about the performance. On Nov 2, 2011 9:50 AM, "Benny Tsai" wrote: > Quite right.

Re: ANN: Clojure/West - a new Clojure conference March 16-17th in San Jose

2011-11-02 Thread Devin Walters
Alex, This is great to hear. Thanks so much for all of your contributions to this community. I watched the Sussman talk last night on InfoQ and was reminded of how fantastic StrangeLoop 2011 was. I'm happy to hear you're heading this up. Hope to see all of you there. On Wednesday, November 2

Re: ANN: metrics-clojure 0.1.0

2011-11-02 Thread Devin Walters
Fantastic. I took a look at doing this after Coda presented it. Looking forward to using it. Thank you. On Tuesday, November 1, 2011 at 11:32 AM, Steve Losh wrote: > Last night I released an initial version of metrics-clojure, which is a thin > Clojure wrapper around Coda Hale's awesome metric

ANN: Korma - a SQL DSL for Clojure

2011-11-02 Thread Chris Granger
Hey Folks, I'm officially releasing Korma 0.2.0 today with a wonderful new project site: http://sqlkorma.com ;) HackerNews thread here: http://news.ycombinator.com/item?id=3188609 Cheers, Chris. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To po

ANN clojure.java.jdbc 0.1.1

2011-11-02 Thread Sean Corfield
Should hit Maven Central "soon". Changes in 0.1.1: * Fix JDBC-21 by adding support for db-spec as URI (Phil Hagelberg). * Fix JDBC-22 by deducing driver class name from subprotocol (Phil Hagelberg). * Add Postgres dependency so tests can be automated (Phil Hagelberg). * Add ability to specify tes

Re: ANN: Korma - a SQL DSL for Clojure

2011-11-02 Thread Craig
Hi Chris, Nice website :-) The HN thread mentions ClojureQL. Does it have limitations that made it unsuitable for you? Or were you keen to roll your own? -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@g

Re: ANN: Korma - a SQL DSL for Clojure

2011-11-02 Thread Timothy Baldridge
The site layout is great, and it looks like a awesome library. But all that is dwarfed by the color selection...let's put this nicely...it's physically painful to look at the Korma site with the current color scheme. Besides that, it looks great. Timothy On Wed, Nov 2, 2011 at 3:28 PM, Craig wro

Re: ANN: Korma - a SQL DSL for Clojure

2011-11-02 Thread Daniel Pittman
On Wed, Nov 2, 2011 at 12:49, Chris Granger wrote: > I'm officially releasing Korma 0.2.0 today with a wonderful new > project site: http://sqlkorma.com ;) That looks pretty awesome. I do have one question: arrays. Specifically, do you have any plans to support SQL ARRAY columns as part of this

Re: ANN: Clojure/West - a new Clojure conference March 16-17th in San Jose

2011-11-02 Thread Alex Baranosky
Oh my, that's very exciting. On Nov 2, 2011 12:39 PM, "Devin Walters" wrote: > Alex, > > This is great to hear. Thanks so much for all of your contributions to > this community. I watched the Sussman talk last night on InfoQ and was > reminded of how fantastic StrangeLoop 2011 was. I'm happy to h

Re: ANN: Korma - a SQL DSL for Clojure

2011-11-02 Thread Carin Meier
I really like the color pallette :) -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe

Re: Homoiconicity in clojure (macro power)

2011-11-02 Thread Lee Spector
On Oct 31, 2011, at 5:40 AM, vikbehal wrote: > I am from java Background. We say Homoiconicity in Clojure (Lisp). > Code is data and data is code. I read various blogs on it, still not > clear, Can you give me some example? FWIW I think that homoiconicity can be useful in a variety of circumstan

Any reason interleave needs 2 or more collections?

2011-11-02 Thread Alex Baranosky
Something interesting I've noticed: I've recently realized I could simplify some application code of mine by using interleave. I immediately noticed that in the spot I was using it I would never be sure to have 2+ streams (from here

Re: Any reason interleave needs 2 or more collections?

2011-11-02 Thread Sean Corfield
I seem to recall seeing a ticket opened in JIRA for this recently with a patch so maybe it'll get incorporated. On Wed, Nov 2, 2011 at 6:28 PM, Alex Baranosky wrote: > Something interesting I've noticed: > > I've recently realized I could simplify some application code of mine by > using interlea

Re: Any reason interleave needs 2 or more collections?

2011-11-02 Thread Alan Malloy
http://groups.google.com/group/clojure-dev/browse_thread/thread/b81c6c8621629960/b73ed6ba28b60781 http://www.google.com/url?sa=D&q=http://dev.clojure.org/jira/browse/CLJ-863&usg=AFQjCNGcl4S8hvppsmfP8mtjo1W2y5wgfA On Nov 2, 6:28 pm, Alex Baranosky wrote: > Something interesting I've noticed: > >

Re: Any reason interleave needs 2 or more collections?

2011-11-02 Thread Alan Malloy
That's what I get for copy/pasting a link from Google Groups. The real URL for the JIRA ticket is http://dev.clojure.org/jira/browse/CLJ-863 if you'd rather avoid the pointless redirect. On Nov 2, 7:02 pm, Alan Malloy wrote: > http://groups.google.com/group/clojure-dev/browse_thread/thread/b81c6.

Re: Any reason interleave needs 2 or more collections?

2011-11-02 Thread Alex Baranosky
What a coincidence. My instinct would be to make (interleave) return an empty seq, instead of nil. I wonder the trade-offs between the two? On Wed, Nov 2, 2011 at 10:02 PM, Alan Malloy wrote: > > http://groups.google.com/group/clojure-dev/browse_thread/thread/b81c6c8621629960/b73ed6ba28b60781 >

Re: ANN: Korma - a SQL DSL for Clojure

2011-11-02 Thread Chris Granger
Color is always a touchy and very subjective realm. :) In terms of "why not ClojureQL?" I'll quote my response from HN: The issue I had with ClojureQL is that it seems like the wrong abstraction to me. Myself and others I've talked to have found ourselves fighting with how it tries to model data