Re: basic question on structuring refs

2009-04-01 Thread Timothy Pratley
Hi Korny, That is a very interesting question to me, specifically this part: how do I stop parallel changes to two unrelated structures in the world from causing transaction retries? Actually I don't think you can ever rule out retries if you are using a ref (or atom) and more than one

Re: Possible Solution for Left-Right Precedence and More when using Multimethods? (was re: oo)

2009-04-01 Thread Konrad Hinsen
On 31.03.2009, at 21:48, Konrad Hinsen wrote: On 31.03.2009, at 18:50, Mark Engelberg wrote: On Tue, Mar 31, 2009 at 9:45 AM, Konrad Hinsen konrad.hin...@laposte.net wrote: I think this should be sufficient to cover all cases you mentioned, but of course it needs to be tried in practice.

Re: basic question on structuring refs

2009-04-01 Thread Christophe Grand
Hello Korny, I share your questioning. On 1 avr, 06:57, Korny Sietsma ko...@sietsma.com wrote: (A) one ref for the whole world - in which case how do I stop parallel changes to two unrelated structures in the world from causing transaction retries? In this case, I wonder whether to extend

Advanced Practical Recursion in Lisp 1.0

2009-04-01 Thread David Sletten
Just last week I finally got my Advanced Practical Recursion in Lisp 1.0 kit from Y-Combinator Technologies, Inc. (not Paul Graham's company). They have this amazing product that I think we can use in Clojure. I'm not supposed to share the source code, but I can trust you folks right?

Re: Setting up Clojure on OS X

2009-04-01 Thread Mark Reid
Just a quick note to say that I've added notes about the TextMate Clojure bundle to my tutorial. I've also put a concise version of the guide up on GitHub: http://github.com/mreid/clojure-framework/tree/master Regards, Mark. -- http://mark.reid.name

Re: basic question on structuring refs

2009-04-01 Thread Adrian Cuthbertson
I came across a thread from Jul '08 which seems to be the definitive on handling side-effects within transactions - http://groups.google.co.za/group/clojure/browse_thread/thread/d645d77a8b51f01/667e833c1ea381d7 Adrian. On Wed, Apr 1, 2009 at 9:24 AM, Timothy Pratley timothyprat...@gmail.com

Re: Clojure Users Group - Denmark

2009-04-01 Thread Krukow
On Mar 31, 11:33 pm, Attila Babo babo.onl...@gmail.com wrote: Hey, here is another clojure user from Copenhagen. I'm a Hungarian but living here so please count me in! Cool. I guess I will be arranging our first meeting at JAOO. Keep an eye on the site for other dcug news. -- Karl

Re: Advanced Practical Recursion in Lisp 1.0

2009-04-01 Thread Paul Stadig
On Wed, Apr 1, 2009 at 6:00 AM, David Sletten da...@bosatsu.net wrote: [snip] Here's 'length' again: (((fn [m] ((fn [future] (m (fn [arg] ((future future) arg (fn [future] (m (fn [arg] ((future future) arg )) (fn [rec] (fn

Re: basic question on structuring refs

2009-04-01 Thread Rich Hickey
On Apr 1, 5:46 am, Christophe Grand christo...@cgrand.net wrote: Hello Korny, I share your questioning. On 1 avr, 06:57, Korny Sietsma ko...@sietsma.com wrote: (A) one ref for the whole world - in which case how do I stop parallel changes to two unrelated structures in the world from

Re: Clojure Users Group - Denmark

2009-04-01 Thread gammelgedden
Another Danish user here, I am in Copenhagen. I can only support the initiative but i dont think it will be possible to put so much effort into it. I am mostly a casual user, using clojure for ad hoc processing / conversion of various text file formats (like edifact, swift, xml ..) in

Re: basic question on structuring refs

2009-04-01 Thread Krukow
On Apr 1, 6:57 am, Korny Sietsma ko...@sietsma.com wrote: I have a world that is a list of structures The world itself will change occasionally - i.e. I'll add or remove structures from the overall list, and I'll regularly be reading the whole list. (C) both of the above - a ref for the

Re: Advanced Practical Recursion in Lisp 1.0

2009-04-01 Thread Remco van 't Veer
On Wed, Apr 1, 2009 at 12:00 PM, David Sletten da...@bosatsu.net wrote: [snip] I'm going to move forward with the negotiations, but I need to know if you, the Clojure community, are on board here. Ultimately the decision is going to come down to whether or not you find the APRiL 1.0

Re: - vs. comp

2009-04-01 Thread Laurent PETIT
While we speak about function composition (or not), you can also use the partial function creator to obtain point-free (no need for anonymous function with formal argument declaration or use) code: And with the use of comp, you could define the function without even explicitly naming any formal

Re: - vs. comp

2009-04-01 Thread Rayne
comp seems more appropriate here. On Mar 31, 11:52 pm, kkw kevin.k@gmail.com wrote: Hi folks,     I have some code where I wanted to: - take a list of stuff (which includes another list inside) - use 'seq-utils/flatten' to flatten the list - use 'interpose' to add comma-delimiting

Interaction of macros and special forms

2009-04-01 Thread Kevin Van Horn
I've been going through Stuart Halloway's book, _Programming Clojure_, and thinking about his deftarget macro has brought up some questions as to how macros and special forms interact in clojure. The deftarget macro needs to produce a def form that has metadata on its first argument,

Re: Possible Solution for Left-Right Precedence and More when using Multimethods? (was re: oo)

2009-04-01 Thread Konrad Hinsen
On Apr 1, 2009, at 14:47, Rich Hickey wrote: I've added get-method (SVN 1338). Great, thanks! Note how you can name methods for diagnostic purposes. This doesn't introduce names into the namespace, just puts a name on the fn object. It's also useful for recursive calls, if you are sure you

Re: A clojure server

2009-04-01 Thread Victor Rodriguez
On Wed, Apr 1, 2009 at 8:28 AM, christ...@mvonessen.de christ...@mvonessen.de wrote: Hi, I wanted to use clojure for some scripting-like tasks (mostly experimenting with clojure's abilities). You might be interested in taking a look at nailgun:

Re: Interaction of macros and special forms

2009-04-01 Thread Konrad Hinsen
On Apr 1, 2009, at 16:28, Kevin Van Horn wrote: But (def (wmd x {:a 1}) 37) gives me an error: Second argument to def must be a Symbol. This confuses me. Doesn't macro expansion happen entirely before evaluation? So before the def special form is evaluated, (wmd x {:a 1}) should

Re: Advanced Practical Recursion in Lisp 1.0

2009-04-01 Thread revoltingdevelopment
I like it, though I would prefer the more concise function y (lower case). --~--~-~--~~~---~--~~ 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 To unsubscribe

Re: I need help tracking down a performance problem.

2009-04-01 Thread Vincent Foley
No change. I think made a small script that spends a large amount of time in java.lang.reflect.Array.setInt too: (set! *warn-on-reflection* true) (time (dotimes [_ 1] (let [#^ints arr (int-array 200)] (dotimes [i 200] (aset-int arr i i) So maybe I should try to see what

Re: A clojure server

2009-04-01 Thread christian
On Wed, Apr 01, 2009 at 10:42:02AM -0400, Victor Rodriguez wrote: On Wed, Apr 1, 2009 at 8:28 AM, christ...@mvonessen.de christ...@mvonessen.de wrote: Hi, I wanted to use clojure for some scripting-like tasks (mostly experimenting with clojure's abilities). You might be

Re: A clojure server

2009-04-01 Thread Konrad Hinsen
On Apr 1, 2009, at 16:42, Victor Rodriguez wrote: You might be interested in taking a look at nailgun: http://www.martiansoftware.com/nailgun/index.html. I had tried nailgun a while ago, and still use it from time to time, but I found that for code development it has a significant

Re: Possible Solution for Left-Right Precedence and More when using Multimethods? (was re: oo)

2009-04-01 Thread David Nolen
Very cool. On Wed, Apr 1, 2009 at 8:47 AM, Rich Hickey richhic...@gmail.com wrote: I've added get-method (SVN 1338). (derive ::Circle ::Shape) (derive ::Rect ::Shape) (defmulti area :Shape) ;note - you can name methods (defmethod area ::Shape area-shape [x] nil) (get-method area

test-is now supports TAP

2009-04-01 Thread Stuart Sierra
Not an April Fool's joke! New lib clojure.contrib.test-is.tap adds Test Anything Protocol (TAP) support to test-is. Use it like this: ;; (use 'clojure.contrib.test-is) ;; (use 'clojure.contrib.test-is.tap) ;; ;; (with-tap-output ;;(run-tests 'my.cool.library)) Warning: this doesn't

speed question

2009-04-01 Thread Dmitri
I've been playing around with rendering a mandelbrot set, and using pure java it renders about 2 seconds on my machine, however it runs about 10 times as slow in clojure, I was curious if I'm doing anything obviously wrong, or if it's just life :) I do run it with the -server flag, which does

Re: bound?

2009-04-01 Thread mikel
On Mar 26, 6:24 pm, mikel mev...@mac.com wrote: How would you write bound? (defmacro bound? [nm [the-ns]] `(let [nm-nsname# (namespace '~nm) the-ns# (if nm-nsname# (find-ns (symbol nm-nsname#)) (or ~the-ns ~clojure.core/*ns*)) nm#

Re: speed question

2009-04-01 Thread Dmitri
I actually tried forcing the type hints and didn't really see a noticeable improvement, just made the code hard to read for the most part. On Apr 1, 9:57 pm, CuppoJava patrickli_2...@hotmail.com wrote: From a quick glance, I think the lack of type hints is what's slowing down your Clojure

Ironicly Maven2 is the lightest I could come up with

2009-04-01 Thread dysinger
...for easy dependency management and no-compile project setup. https://github.com/dysinger/clojure-pom/tree Using maven only for the dependency management and to create a custom repl script allows me to still use emacs/slime for dynamic development of clojure code. My motivation is 3 fold: 1)