Re: Dart

2012-08-24 Thread Alexey Petrushin
Dart is deadborn, it would be a waste of energy. -- 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

Re: real-world usage of reducers?

2012-08-24 Thread nicolas.o...@gmail.com
More optimsation ideas: (defn next-level [b dir] (r/map #(Move-Board. % (core/try-move %)) (core/team-moves @curr-game b dir))) ;;curr-game is a promise (definline team-moves [game b dir] `(let [team# (gather-team ~b ~dir) tmvs# (r/mapcat (fn [p#] (r/map

calling record ctor from within the record definition fails?

2012-08-24 Thread Jim - FooBar();
Hi all, It seems that trying to instantiate a new record via its own methods fails!!! example: (defrecord Foo [a b c] Bar (update-position [this np] (Foo. a np c))) No matching ctor found ! There must be a way to do this without going round and round in functions... Jim -- You received

Re: calling record ctor from within the record definition fails?

2012-08-24 Thread Ambrose Bonnaire-Sergeant
Hmm I can't see to reproduce. ambrose@ambrose-VirtualBox:~$ lein repl nREPL server started on port 33367 REPL-y 0.1.0-beta10 Clojure 1.4.0 user= (defprotocol Bar (update-position [this np])) Bar user= (defrecord Foo [a b c] #_= Bar #_= (update-position [this np] (Foo. a np

Re: calling record ctor from within the record definition fails?

2012-08-24 Thread Jim - FooBar();
On 24/08/12 11:32, Jim - FooBar(); wrote: Hi all, It seems that trying to instantiate a new record via its own methods fails!!! example: (defrecord Foo [a b c] Bar (update-position [this np] (Foo. a np c))) No matching ctor found ! There must be a way to do this without going round and

Re: calling record ctor from within the record definition fails?

2012-08-24 Thread Jim - FooBar();
yes sorry, I was missing an argument!!! Jim On 24/08/12 11:43, Ambrose Bonnaire-Sergeant wrote: Hmm I can't see to reproduce. ambrose@ambrose-VirtualBox:~$ lein repl nREPL server started on port 33367 REPL-y 0.1.0-beta10 Clojure 1.4.0 user= (defprotocol Bar (update-position [this np])) Bar

Re: calling record ctor from within the record definition fails?

2012-08-24 Thread Baishampayan Ghose
On Fri, Aug 24, 2012 at 4:02 PM, Jim - FooBar(); jimpil1...@gmail.com wrote: It seems that trying to instantiate a new record via its own methods fails!!! example: (defrecord Foo [a b c] Bar (update-position [this np] (Foo. a np c))) No matching ctor found ! There must be a way to do

Performance of concatenating two vectors

2012-08-24 Thread nicolas.o...@gmail.com
Dear all, After reading this: http://infoscience.epfl.ch/record/169879/files/RMTrees.pdf I was wondering what was the current performance characteristics of the different ways to concatenate arrays in clojure? Best regards, Nicolas. -- You received this message because you are subscribed to

Re: deployment

2012-08-24 Thread David Della Costa
Hi George, It's been a few months since I was researching it but I did a similar investigation. I'm a web developer, with a bit (but not significant) Java experience, but mostly coming from the Ruby/Python world. So I think we are probably coming from similar places. What I ended up feeling

Re: real-world usage of reducers?

2012-08-24 Thread Jim - FooBar();
I finally managed to reach level 3 in 12-13 sec (as opposed to 83)...at the moment, for level 3 there are only 4 sec separating the 2 real fns from the dummy ones that return immediately! This is very good news indeed... as for level 4, it still takes long (just over 9 min) but at least, not

Re: Performance of concatenating two vectors

2012-08-24 Thread Stuart Sierra
I haven't read the paper, but Clojure's PersistentVector doesn't really have a concatenate operation. The `concat` function creates a lazy sequence. The closest to vector concatenation is probably `into`, which is implemented in terms of `reduce`. -S -- You received this message because you

[emacs over ssh limitations]

2012-08-24 Thread Denis Labaye
Hi, I've just seen the presentation by Phil Hagelberg on swarm coding (http://www.infoq.com/presentations/Swarm-Coding). Great presentation, very inspiring, we will definitively do swarm coding here in the Clojure Paris (France) User Group. In the talk Phil explains why emacs-slime over ssh do

Re: deployment

2012-08-24 Thread Dave Della Costa
Oh, and I should add that I didn't know about Pallet (http://palletops.com/) until your post (thanks!). As you described, seems like an easy way to deploy to cloud services. Very slick, at least on paper. Sounds cool, I'll check it out. Cheers, Dave (12/08/24 20:03), David Della Costa

Re: profiler help...

2012-08-24 Thread nicolas.o...@gmail.com
(and creates vectors via (into [] (r/map ))) Depending of your method of scoring, you could try to do it just with a reducer. (Without creating a vector with it). If your code does not spend its time in GC (can be seen in the first pane), CPU sampling might be a better place to look. --

Re: profiler help...

2012-08-24 Thread Jim - FooBar();
On 24/08/12 16:41, nicolas.o...@gmail.com wrote: (and creates vectors via (into [] (r/map ))) Depending of your method of scoring, you could try to do it just with a reducer. (Without creating a vector with it). but i am doing it with a reducer (the mapping) , however after that i

Re: [emacs over ssh limitations]

2012-08-24 Thread Phil Hagelberg
On Fri, Aug 24, 2012 at 6:16 AM, Denis Labaye denis.lab...@gmail.com wrote: I've just seen the presentation by Phil Hagelberg on swarm coding (http://www.infoq.com/presentations/Swarm-Coding). Great presentation, very inspiring, we will definitively do swarm coding here in the Clojure Paris

Re: profiler help...

2012-08-24 Thread nicolas.o...@gmail.com
(defn score-by-count ^long [b dir] (let [ hm (into [] (core/gather-team b dir)) aw (into [] (core/gather-team b (unchecked-negate dir)))] (unchecked-subtract (count hm) (count aw (defn counting-accumulator [acc _] (inc acc)) (defn score-by-count ^long [b

Re: profiler help...

2012-08-24 Thread Jim - FooBar();
On 24/08/12 18:24, nicolas.o...@gmail.com wrote: (defn score-by-count ^long [b dir] (let [ hm (into [] (core/gather-team b dir)) aw (into [] (core/gather-team b (unchecked-negate dir)))] (unchecked-subtract (count hm) (count aw (defn counting-accumulator

ANN Monger 1.2.0 RC1

2012-08-24 Thread Michael Klishin
Monger is an idiomatic Clojure MongoDB driver http://clojuremongodb.infofor a more civilized age. It has batteries included, offers powerful expressive query DSL, strives to support every MongoDB 2.0+ feature and has sane defaults. Monger 1.2 focus is on a number of small improvements and making

Origin of tools.cli optional

2012-08-24 Thread octopusgrabbus
Given the following code (defn parse-opts Using the newer cli library, parses command line args. [args] (cli args (optional [--in-file-name .csv input file :default resultset.csv] identity) (optional [--out-file-name .csv pipe delimited output file :default accumail_out.unl]

Joxa (Re: Clojure on an Erlang-vm-os on Xen?)

2012-08-24 Thread Frank Siebenlist
Just got this link http://joxa.org; about a new lisp-like language thru prismatic: quote Joxa is a small semantically clean, functional lisp. It is a general-purpose language encouraging interactive development and a functional programming style. Joxa runs on the Erlang Virtual Machine. Like

Re: Rich's The Value of Values and REST

2012-08-24 Thread Rostislav Svoboda
I just enjoy the speeches better by standing back a little bit. Actually I'm quite annoyed that Rich doesn't say anything about how important is to be able to forget facts, irreversibly filter things out and reinvent the wheel again. Imagine a huge database full of facts you're simply not

Re: Rich's The Value of Values and REST

2012-08-24 Thread Craig Brozefsky
Rostislav Svoboda rostislav.svob...@gmail.com writes: I just enjoy the speeches better by standing back a little bit. Actually I'm quite annoyed that Rich doesn't say anything about how important is to be able to forget facts, irreversibly filter things out and reinvent the wheel again.

Re: Origin of tools.cli optional

2012-08-24 Thread gaz jones
The library was originally based on Clargon (a library I wrote) which had the interface you are describing (optional and required functions). Various changes were made after getting feedback on the clojure-dev mailing list, which you can read about here if you're interested:

[ANN] Leiningen 2.0.0-preview9 released

2012-08-24 Thread Phil Hagelberg
I'm happy to announce the release of Leiningen version 2.0.0-preview9. This release fixes a serious bug where profiles wouldn't be applied correctly in the trampoline task as well making auto-loaded hooks and middleware more consistent. It also introduces an experimental new flag

Re: The Value of Values

2012-08-24 Thread Rostislav Svoboda
See the thread The Value of Values started by Conrad Barski -- 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

Re: deployment

2012-08-24 Thread George Oliver
On Friday, August 24, 2012 4:03:32 AM UTC-7, David Della Costa wrote: What I ended up feeling like was, these are the options more or less: Thanks David, this plus your github link is a great write-up and exactly what I was hoping to find by posting to the list. Regarding #3, if you're