Re: Clojure analysis

2009-12-17 Thread Laurent PETIT
Hello, 2009/12/17 Dmitry Kakurin dmitry.kaku...@gmail.com Judging by the article you've spent very little time learning Clojure and have managed to get every key point wrong: Clojure is a multi-paradigm language no it's not, and it's most certainty not an OOP language:

Re: Clojure analysis

2009-12-17 Thread Richard Newman
I just learned (the hard way, by being humble and asking :-) ) on #clojure that one does not say immutable collections but persistent collections, since persistent conveys a lot more information about what Rich has achieved than just saying immutable. Good explanation:

Re: Semantic Versioning

2009-12-17 Thread Laurent PETIT
Isn't this the ideal that clojure and libraries are almost more or less already following ? 2009/12/16 Nicolas Buduroi nbudu...@gmail.com Hi, on the CommonJS Google Group there was a discussion on semantic versioning, a formalization of the concept of properly using a common version number

Re: Semantic Versioning

2009-12-17 Thread Roman Roelofsen
Dealing with version numbers at build time is quite easy with tool like Maven. The important thing is that everyone agrees on the same version semantics (great summary [1]). Putting some more tooling around this should be a good idea, yes. However, the problem in Java is dealing with versions at

Re: Clojure analysis

2009-12-17 Thread Laurent PETIT
Thanks Richard for the good link. So to be even more precise, we can say that clojure's data structures are fully persistent since any older version of the datastructure can still serve as the basis to create new versions. 2009/12/17 Richard Newman holyg...@gmail.com I just learned (the hard

Re: Clojure analysis

2009-12-17 Thread Dmitry Kakurin
Please keep in mind that it is almost literally the speech that I give to my friends/colleagues when they ask me why am I so excited about Clojure. I did it many times now and I have quickly learned that saying persistent data structures gets misinterpreted by every single person as something you

Re: Clojure analysis

2009-12-17 Thread Laurent PETIT
That's quite true ! 2009/12/17 Dmitry Kakurin dmitry.kaku...@gmail.com Please keep in mind that it is almost literally the speech that I give to my friends/colleagues when they ask me why am I so excited about Clojure. I did it many times now and I have quickly learned that saying persistent

Re: How to fund open source Clojure development

2009-12-17 Thread Piyush Ranjan
e. Find a business for whom Clojure is a critical piece of technology. It is the easiest way to fund it. However AFAIK there is no big/profitable business depending on clojure solely...yet Everything else would eat into Rich's time and hence may not be such a good thing. -- You received

Re: Funding Clojure 2010

2009-12-17 Thread brian
I have looked at hundreds of languages and flavors more as a kind of hobby these days. I know these comments are getting a bit tedious by now, but what I think clojure needs is higher visibility. Right now only a handful of people know about it. The thought occurred to me

Re: How to modify the last few elements of a vector

2009-12-17 Thread Meikel Brandmeyer
Hi, On Dec 16, 10:36 pm, Graham Fawcett graham.fawc...@gmail.com wrote: Not sure it's better, but I find this more readable: (defn stack-apply [n f stack]   (if (zero? n)     stack     (conj (stack-apply (dec n) f (pop stack))           (f (last stack) Unrelated note: (last stack)

Re: How to modify the last few elements of a vector

2009-12-17 Thread Graham Fawcett
On Thu, Dec 17, 2009 at 2:04 AM, Meikel Brandmeyer m...@kotka.de wrote: Hi, On Dec 16, 10:36 pm, Graham Fawcett graham.fawc...@gmail.com wrote: Not sure it's better, but I find this more readable: (defn stack-apply [n f stack]   (if (zero? n)     stack     (conj (stack-apply (dec n) f

mapmap

2009-12-17 Thread C. Florian Ebeling
I was just wondering how a #'map for maps could be done most succinctly. Came up with this: (defn mapmap Map values of map m using function f. [f m] (reduce (fn [m [k v]] (assoc m k (f v))) {} m)) But there is probably a more straightforward way. What do you use? Florian --

Re: Any interest in a Nova Clug?

2009-12-17 Thread cburroughs
Interested? Yes. But it is improbable that I could attend anything regularly that was not metro accessible. -- 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

Re: mapmap

2009-12-17 Thread Sean Devlin
1. I'd call it map-vals (as opposed to map-keys) 2. Slight change in the body (defn map-vals [f coll] (into {} (map (juxt key (comp f val)) coll)) There is talk of getting something like this into contrib. Stay tuned :) Sean On Dec 17, 9:37 am, C. Florian Ebeling florian.ebel...@gmail.com

Re: mapmap

2009-12-17 Thread Laurent PETIT
AFAIK, such a function is still not in clojure core because it's not clear to Rich whether f should have one argument (the value), or 2 arguments (key + value). Your version seems good, you can maybe improve it a little bit by using transients (not tested): (persistent! (reduce (fn [m [k v]]

Re: Any interest in a Nova Clug?

2009-12-17 Thread Mike Hogye
I'm interested, but may have a hard time making it consistently. I do have a coworker or two who might have both interest and availability. On Dec 16, 1:14 pm, Matt macourt...@gmail.com wrote: I'm looking into setting up a Northern Virginia Clojure User Group and would like to know who is

Re: Funding Clojure 2010

2009-12-17 Thread Wojciech Kaczmarek
Speaking of websites, if you're talking about Matz creation, please bear in mind it has had a less appealing website for almost 10 years... ;) So maybe let give Clojure a bit time. Of course many things Ruby community achieved are cool. Both Ruby and Rails have very good introductory tutorials

Re: mapmap

2009-12-17 Thread C. Florian Ebeling
AFAIK, such a function is still not in clojure core because it's not clear to Rich whether f should have one argument (the value), or 2 arguments (key + value). That is a good question. But I thought if the key makes a difference, then one could use standard map and rely on map's collection

Re: mapmap

2009-12-17 Thread Stuart Sierra
On Dec 17, 9:37 am, C. Florian Ebeling florian.ebel...@gmail.com wrote: (defn mapmap   Map values of map m using function f.   [f m]   (reduce (fn [m [k v]]             (assoc m k (f v))) {} m)) But there is probably a more straightforward way. What do you use? I do that exactly, but I

Is this the expected behavior related to agent options in action function?

2009-12-17 Thread Carlos Moscoso
Hi, I'm trying to access from within a action function, and with no success, the metadata associated with agent. My code: user (def agt (agent nil :meta {some data})) user (defn action [_] (:meta *agent*)) user (await (send agt action)) Wich results in: user @agt nil Instead of: user @agt

Re: Any interest in a Nova Clug?

2009-12-17 Thread Matt Revelle
I'm in and Reston would be great. On Dec 17, 9:50 am, Mike Hogye stacktra...@gmail.com wrote: I'm interested, but may have a hard time making it consistently. I do have a coworker or two who might have both interest and availability. On Dec 16, 1:14 pm, Matt macourt...@gmail.com wrote:

Re: mapmap

2009-12-17 Thread Christophe Grand
Hi Laurent, If you want to use transients, since the keyset is unchanged, it should perform slightly better when using (transient m) instead of (transient {}) as the seed to reduce. Christophe On Dec 17, 3:46 pm, Laurent PETIT laurent.pe...@gmail.com wrote: AFAIK, such a function is still not

Re: mapmap

2009-12-17 Thread Konrad Hinsen
On 17 Dec 2009, at 15:44, Sean Devlin wrote: 1. I'd call it map-vals (as opposed to map-keys) 2. Slight change in the body (defn map-vals [f coll] (into {} (map (juxt key (comp f val)) coll)) There is talk of getting something like this into contrib. Stay tuned :) There's already

Re: mapmap

2009-12-17 Thread Erik Price
On Thu, Dec 17, 2009 at 12:16 PM, Konrad Hinsen konrad.hin...@fastmail.net wrote: On 17 Dec 2009, at 15:44, Sean Devlin wrote: (defn map-vals [f coll]  (into {} (map (juxt key (comp f val)) coll)) vs: (defmethod fmap clojure.lang.IPersistentMap   [f m]   (into (empty m) (for [[k v] m]

Re: Help recreating OS X Leiningen 1.0 +Swank bug

2009-12-17 Thread Steve Purcell
I came across this problem too, and David's patch helps, to a certain extent. Additionally, without David's patch, the src and test directories of the current project don't get added to the classpath one sees from inside swank. (All the jars upon which leiningen depends *are* in the classpath,

Re: Clojure analysis

2009-12-17 Thread Santhosh G R
You warn that you learn languages just for the fun of it. I would be curious to know how much time you spent learning Clojure... I have been working with Scheme for the past 5 years. Yep, I don't have 20+ years in development; neither 12+ months in Clojure. My learning of Clojure has been for

Re: Clojure analysis

2009-12-17 Thread Santhosh G R
Judging by the article you've spent very little time learning Clojure and have managed to get every key point wrong: Clojure is a multi-paradigm language no it's not, and it's most certainty not an OOP language:http://clojure.org/rationale I hear about this everywhere. Is Clojure not a

Re: Clojure analysis

2009-12-17 Thread Santhosh G R
Thanks Dmitry and Richard. In all the replies I found yours to be the most humble. Even though my analysis says otherwise, I am doing the elevator pitch for Clojure wherever I work. Of course, in an enterprise (where I work), nobody is going to buy it; but in my own world I use Clojure more than

Re: mapmap

2009-12-17 Thread Sean Devlin
Konrad, I am working on a different proposal on the dev list: http://groups.google.com/group/clojure-dev/browse_thread/thread/9a518c853bfbba8b# This is a more in depth version of these functions for maps. I'd love to have you contribute to the discussion here. Sean On Dec 17, 12:16 pm, Konrad

Re: mapmap

2009-12-17 Thread Sean Devlin
Depends if you need a closure. There are times I do 2D mappings, and I have to write something like (map (partail map #(do-work %)) coll). Or I have to compose my mapping operations. for is awesome when you need some of the other built-ins, like :while Sean On Dec 17, 12:39 pm, Erik Price

Re: mapmap

2009-12-17 Thread Laurent PETIT
Good to know, thank you ! 2009/12/17 Christophe Grand christo...@cgrand.net Hi Laurent, If you want to use transients, since the keyset is unchanged, it should perform slightly better when using (transient m) instead of (transient {}) as the seed to reduce. Christophe On Dec 17, 3:46

Re: Clojure analysis

2009-12-17 Thread Martin Coxall
On 17 Dec 2009, at 10:04, Dmitry Kakurin wrote: Please keep in mind that it is almost literally the speech that I give to my friends/colleagues when they ask me why am I so excited about Clojure. I did it many times now and I have quickly learned that saying persistent data structures gets

Clojure 1.1 release candidate 1

2009-12-17 Thread Rich Hickey
There is now a release candidate for Clojure 1.1: http://clojure.googlecode.com/files/clojure-1.1.0-rc1.zip and also a new 1.1.x branch in git corresponding to the release. Please try these out ASAP and provide feedback here. Thanks much! Rich -- You received this message because you are

Re: Any interest in a Nova Clug?

2009-12-17 Thread tcg
I'm interested. On Dec 16, 1:14 pm, Matt macourt...@gmail.com wrote: I'm looking into setting up a Northern Virginia Clojure User Group and would like to know who is interested. I know there is a DC clojure study group, but it seems to not be as active recently. DC is also hard for me to get

Re: Clojure analysis

2009-12-17 Thread Rich Hickey
On Dec 17, 2:16 pm, Martin Coxall pseudo.m...@me.com wrote: On 17 Dec 2009, at 10:04, Dmitry Kakurin wrote: Please keep in mind that it is almost literally the speech that I give to my friends/colleagues when they ask me why am I so excited about Clojure. I did it many times now and I

Re: Is this the expected behavior related to agent options in action function?

2009-12-17 Thread luskwater
Try removing the colon from your :meta call in the action, so you don't invoke a map fetch, but call the #'meta function. user (defn action2 [_] (meta *agent*)) ; call meta, not :meta user (await (send agt action2)) user @agt {some data} On Dec 17, 10:35 am, Carlos Moscoso moscoso@gmail.com

Re: Semantic Versioning

2009-12-17 Thread Nicolas Buduroi
On Dec 17, 3:11 am, Laurent PETIT laurent.pe...@gmail.com wrote: Isn't this the ideal that clojure and libraries are almost more or less already following ? Yes it is, but that's because the maintainers are very disciplined and professional people. Not everybody follow this scheme properly and

Re: Semantic Versioning

2009-12-17 Thread Nicolas Buduroi
On Dec 17, 3:13 am, Roman Roelofsen roman.roelof...@googlemail.com wrote: Dealing with version numbers at build time is quite easy with tool like Maven. The important thing is that everyone agrees on the same version semantics (great summary [1]). Putting some more tooling around this should

Re: Clojure analysis

2009-12-17 Thread Alex Osborne
Santhosh G R kusim...@gmail.com writes: Clojure is a multi-paradigm language no it's not, and it's most certainty not an OOP language:http://clojure.org/rationale I hear about this everywhere. Is Clojure not a multi-paradigm language because that is the rationale for the language? For me

Deprecate replicate?

2009-12-17 Thread Sean Devlin
Hey everyone, I just noticed that replicate's functionality is now duplicated by repeat. Should this function be deprecated? Sean -- 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

Re: Clojure analysis

2009-12-17 Thread ajay gopalakrishnan
I was about to point out this reference, but realized Rich has already already given a nice explanation. Good to know that this newbie (myself) is on the right track! On Thu, Dec 17, 2009 at 3:24 PM, Rich Hickey richhic...@gmail.com wrote: On Dec 17, 2:16 pm, Martin Coxall pseudo.m...@me.com

Re: Any interest in a Nova Clug?

2009-12-17 Thread ajay gopalakrishnan
Seems like a wrong place to ask, but is there a Seattle Clojure Group too? Where can I find this info? Thanks, Ajay On Thu, Dec 17, 2009 at 3:22 PM, tcg tomgu...@gmail.com wrote: I'm interested. On Dec 16, 1:14 pm, Matt macourt...@gmail.com wrote: I'm looking into setting up a Northern

Re: mapmap

2009-12-17 Thread Avital Oliver
Erik, My experience is that you should only use filter/map if you either have a pre-existing function or you want to use a _very_ short closure (using #()). For any other case the code becomes unmanageable and then I feel that using for is the wiser choice. I hope that they are just as

Re: Is this the expected behavior related to agent options in action function?

2009-12-17 Thread Carlos Moscoso
Just a follow up, Chris House pointed me out on twitter that the correct would be to use (meta *agent*) instead of (:meta *agent*). On Dec 17, 1:35 pm, Carlos Moscoso moscoso@gmail.com wrote: Hi, I'm trying to access from within a action function, and with no success, the metadata

Re: Trying to rewrite a loop as map/reduce

2009-12-17 Thread Meikel Brandmeyer
Hi, Am 16.12.2009 um 17:26 schrieb Meikel Brandmeyer: Well. It was claimed it is cleaner... Just asking... I wrote down my thoughts in a small blog post: http://tr.im/HW5P Sincerely Meikel -- You received this message because you are subscribed to the Google Groups Clojure group. To post to

Re: Clojure analysis

2009-12-17 Thread Mike Meyer
On Thu, 17 Dec 2009 10:26:03 -0800 (PST) Santhosh G R kusim...@gmail.com wrote: You warn that you learn languages just for the fun of it. I would be curious to know how much time you spent learning Clojure... I have been working with Scheme for the past 5 years. I think this is a critical

Re: Deprecate replicate?

2009-12-17 Thread Shawn Hoover
On Thu, Dec 17, 2009 at 7:50 PM, Sean Devlin francoisdev...@gmail.comwrote: Hey everyone, I just noticed that replicate's functionality is now duplicated by repeat. Should this function be deprecated? Sean This was discussed before [1] as part of another issue [2], but I don't know what

Re: mapmap

2009-12-17 Thread Alex Osborne
Avital Oliver avi...@thewe.net writes: My experience is that you should only use filter/map if you either have a pre-existing function or you want to use a _very_ short closure (using #()). For any other case the code becomes unmanageable and then I feel that using for is the wiser choice.

Re: Trying to rewrite a loop as map/reduce

2009-12-17 Thread Joseph Smith
What are you using to generate the pretty rainbow perens on your website? --- Joseph Smith j...@uwcreations.com (402)601-5443 On Dec 17, 2009, at 5:25 PM, Meikel Brandmeyer wrote: Hi, Am 16.12.2009 um 17:26 schrieb Meikel Brandmeyer: Well. It was claimed it is cleaner... Just

Re: Clojure analysis

2009-12-17 Thread Eric Lavigne
Given that list of languages, I'd suggest taking a look at Eiffel. ... It's the source of the function pre/post condition facilities that Clojure has. I did not know that Clojure functions supported Eiffel-style pre/post conditions. Where can I read more about this? -- You received this

Re: Clojure analysis

2009-12-17 Thread Sean Devlin
It's new in 1.1. Go here: http://clojure.org/special_forms#toc7 And read the Since 1.1 section. On Dec 17, 11:58 pm, Eric Lavigne lavigne.e...@gmail.com wrote: Given that list of languages, I'd suggest taking a look at Eiffel. ... It's the source of the function pre/post condition

Re: Clojure analysis

2009-12-17 Thread Eric Lavigne
I was still using 1.0. This is a good incentive to upgrade :-) On Fri, Dec 18, 2009 at 12:22 AM, Sean Devlin francoisdev...@gmail.com wrote: It's new in 1.1.  Go here: http://clojure.org/special_forms#toc7 And read the Since 1.1 section. On Dec 17, 11:58 pm, Eric Lavigne

Re: Clojure analysis

2009-12-17 Thread Luc Préfontaine
Mike, I think that the whole issue about Lisp creates a big cloud about Clojure. Choosing a Lisp like syntax for a new language is a good choice because of the expressiveness, it requires less code lines, yields a better design, easier to test, ... That's a choice between a number of options. If

new fn: juxt - Theory application

2009-12-17 Thread Sean Devlin
Hello everyone, Today I'd like to shed some light on a new funciton in 1.1, juxt. In order to understand juxt(apose), I'd like to first talk about comp (ose). Comp can be defined in terms of reduce like so: (defn my-comp [ fns] (fn [args] (reduce (fn[accum f](f accum)) (conj

Re: Help recreating OS X Leiningen 1.0 +Swank bug

2009-12-17 Thread mac
I've looked into it a little and this is probably a solvable problem. Since my native code patch needs fork as well I will try an idea I have later today. /mac On Dec 17, 7:02 pm, Steve Purcell st...@sanityinc.com wrote: I came across this problem too, and David's patch helps, to a certain

Re: Clojure analysis

2009-12-17 Thread Dmitry Kakurin
On Dec 17, 10:42 am, Santhosh G R kusim...@gmail.com wrote: Again the same statement about being humble :-( The humble comment relates to the title of your article. Lookup (and contrast) words analysis and opinion in your favorite dictionary. Were your post named My opinion about Clojure I would