help needed to use reducers and monoid

2012-08-18 Thread Jim - FooBar();
Hi all, so I was playing with the reducers library today and I think I've identified the critical spot where my code can be parallelized. after all i am building a tree and i am using a map that nests. According to all the posts this is ideal situation for reducing...anyway, assuming I'm corr

Re: Countdown numbers game in clojure.core.logic

2012-08-18 Thread David Nolen
On Sat, Aug 18, 2012 at 10:36 AM, David Powell wrote: > > I just had a go of solving the Numbers Game from the UK gameshow Countdown > [1] in clojure.core.logic. > > https://gist.github.com/3374505 > > It works, but it is a bit slow. > > Anybody got any ideas on better approaches? > > [1] http://e

Re: doubt about clojure.test output

2012-08-18 Thread Haim Ashkenazi
Hi Vencent, On Sat, Aug 18, 2012 at 3:49 PM, Vincent wrote: > Dear , > > I am using clojure.test for test > > in one 'deftest , i had used 3 'is function to assert > and in another 'deftest , i had used 5 'is function to assert > > It ran all test with sucess , but output is > > Ran 4 test

Re: doubt about clojure.test output

2012-08-18 Thread Moritz Ulrich
Is one of the asserts in some kind of loop or recursion? On Sat, Aug 18, 2012 at 2:49 PM, Vincent wrote: > Dear , > > I am using clojure.test for test > > in one 'deftest , i had used 3 'is function to assert > and in another 'deftest , i had used 5 'is function to assert > > It ran all tes

Re: genuine help needed to speed up minimax algorithm!

2012-08-18 Thread Jim - FooBar();
JESUS CHRIST! What the hell just happened? I used clojure 1.5 alpha 3 that has the new reducers and now i get back the same result in 3 seconds HOW ON EARTH IS THAT POSSIBLE? I mean i've watched the videos but i would never expect so much performance increase!!! what is happening? Is my alg

Re: genuine help needed to speed up minimax algorithm!

2012-08-18 Thread Jim - FooBar();
On 18/08/12 13:57, Michael Gardner wrote: Until the reducers library is ready, you could try something like this (no guarantees that this is an optimal implementation!): (defn with-thread-pool* [num-threads f] (let [pool (java.util.concurrent.Executors/newFixedThreadPool num-threads)]

Re: deployment

2012-08-18 Thread Joshua Ballanco
On Fri, Aug 17, 2012 at 05:29:50PM -0700, George Oliver wrote: > hi, > > I'm a Clojure beginner working on a web project and starting to think about > deployment. Currently I host my project in a local VM and have a small VPS > for public testing. Looking down the road I'd like a more flexible

Re: doubt about clojure.test output

2012-08-18 Thread Chris Ford
Would you be able to post some code demonstrating what you have observed, perhaps reduced to the minimal case? Cheers, Chris On 18 August 2012 13:49, Vincent wrote: > Dear , > > I am using clojure.test for test > > in one 'deftest , i had used 3 'is function to assert > and in another 'de

Countdown numbers game in clojure.core.logic

2012-08-18 Thread David Powell
I just had a go of solving the Numbers Game from the UK gameshow Countdown [1] in clojure.core.logic. https://gist.github.com/3374505 It works, but it is a bit slow. Anybody got any ideas on better approaches? [1] http://en.wikipedia.org/wiki/Countdown_(game_show)#Numbers_round -- Dave -- Y

Re: genuine help needed to speed up minimax algorithm!

2012-08-18 Thread Michael Gardner
On Aug 18, 2012, at 7:27 AM, Jim - FooBar(); wrote: > As far as pmap goes, I originally thought of starting a new future for each > starting branch but that is what pmap does essentially, so it looked very > handy at first... Yes, pmap is essentially a trap in that it looks like the perfect too

doubt about clojure.test output

2012-08-18 Thread Vincent
Dear , I am using clojure.test for test in one 'deftest , i had used 3 'is function to assert and in another 'deftest , i had used 5 'is function to assert It ran all test with sucess , but output is Ran 4 tests containing 12 assertions How come 12 ? thanks in advance Vincent -- Yo

Re: genuine help needed to speed up minimax algorithm!

2012-08-18 Thread Jim - FooBar();
On 18/08/12 13:13, Michael Gardner wrote: If you haven't already, start by eliminating reflection warnings[1]. As for pmap, it's unfortunately useless. You could roll your own using e.g. Java's thread pools, or you could wait for the new reducers library[2]. Reducers should offer not only usef

Re: genuine help needed to speed up minimax algorithm!

2012-08-18 Thread Michael Gardner
If you haven't already, start by eliminating reflection warnings[1]. As for pmap, it's unfortunately useless. You could roll your own using e.g. Java's thread pools, or you could wait for the new reducers library[2]. Reducers should offer not only useful parallelism, but also better performance