Re: are non programmers the better programmers?

2012-01-17 Thread Baishampayan Ghose
On Wed, Jan 18, 2012 at 3:16 AM, James Reeves wrote: > To borrow from Stuart Halloway: simplicity ain't easy. +1. Simplicity comes with experience. Nevertheless, my entry - (defn odd-occurrences [coll] (for [[k v] (frequencies coll) :when (odd? v)] k)) Regards, BG -- Baishampayan

Re: Best IDE

2012-01-17 Thread Sean Corfield
On Tue, Jan 17, 2012 at 1:38 PM, Josef Frydl wrote: > Can you please recommend the Best IDE for Clojure? I have Eclipse > NetBeans and JetBrain already installed. Two possible answers: * use whichever IDE you're already most familiar with and install the appropriate Clojure plugin * use Emacs :)

Clojurescript One: distinguishing event sources / multiple widget instances

2012-01-17 Thread kovas boguta
Pretty basic question here. Suppose I want to have 2 copies of the form in the same application. How will the event handlers know which form the events are coming from, and which form needs to be modified in response to those events? More generally, what if I have N copies of some widget that al

Re: clojure.contrib.prxml broken in Clojure 1.3.0

2012-01-17 Thread Alan Malloy
It doesn't need CDATA - data.xml just automatically escapes XML special-characters if it sees them. On Jan 17, 4:12 pm, jweiss wrote: > By the way, the reason I stuck with prxml is its handling of CDATA, > which as far as I know, the newer lib doesn't do yet. > > On Jan 17, 8:10 am, cassiel wrot

Re: Lazy sequence transformation with item merge

2012-01-17 Thread Ulrich Küttler
Thank you for these solutions. You helped me a lot to get a tiny bit of clojure. This is indeed a different way to think about problems. At least it feels different to me. On Mon, Jan 16, 2012 at 11:49 PM, Meikel Brandmeyer wrote: > Hi, > > here another, slightly different, although in the core s

Re: lein-cljsbuild 0.0.1 released

2012-01-17 Thread Dave Sann
On Tuesday, 17 January 2012 20:35:17 UTC+11, Evan Mezeske wrote: > > > > > > 1. I am wary of the copying of cls -> cljs files in the src tree. Due to > > the (inevitable at some point) confusion over which code is authored as > > > I'd love to hear other ideas. > I have a version of cljs-wat

Re: Matrix Multiplication Woes

2012-01-17 Thread blcooley
On Jan 17, 5:43 pm, Sam Ritchie wrote: > Update -- I wrapped the JBLAS library and ended up with stellar > performance, about 3x faster than numpy. > > https://gist.github.com/264a2756fc657140fdb8 > You might not be interested at this point, but you can get better performance than using the Inc

Re: clojure.contrib.prxml broken in Clojure 1.3.0

2012-01-17 Thread jweiss
By the way, the reason I stuck with prxml is its handling of CDATA, which as far as I know, the newer lib doesn't do yet. On Jan 17, 8:10 am, cassiel wrote: > This is straight from the doc string: > > (with-out-str (p/prxml [:p {:class "greet"} [:i "Ladies & > gentlemen"]])) > > Works in Clojure

Re: clojure.contrib.prxml broken in Clojure 1.3.0

2012-01-17 Thread jweiss
I fixed up clojure.contrib.prxml to work with 1.3, at least it's working fine for me. You can get the jar from clojars with [weissjeffm/clojure.prxml "1.3.0-SNAPSHOT"] source is here: https://github.com/weissjeffm/clojure.prxml On Jan 17, 8:10 am, cassiel wrote: > This is straight from the do

Re: Matrix Multiplication Woes

2012-01-17 Thread Sam Ritchie
Update -- I wrapped the JBLAS library and ended up with stellar performance, about 3x faster than numpy. https://gist.github.com/264a2756fc657140fdb8 On Tue, Jan 17, 2012 at 10:37 AM, Sam Ritchie wrote: > Hey all, > > I'm running into some large performance differences with matrix > multiplicat

Re: Best IDE

2012-01-17 Thread Laurent PETIT
I can tell you some facts about Counterclockwise (the Eclipse plugin) without going (hopefully) too subjective (I'm it's main developer, ya' know...): - version 0.5.0 has been downloaded more than 4,000 times - it is being actively developed (next release 0.6.0 to be sent out the door by this or n

Re: are non programmers the better programmers?

2012-01-17 Thread James Reeves
On 17 January 2012 22:10, Dennis Haupt wrote: > in the end, the program must work down to the lowest level and there > cannot be unanswered questions. but take a look at the 3 solutions given > until now. in 2 cases, all i read is "do this, then that, i don't care > how". in the third, a hashset w

Re: are non programmers the better programmers?

2012-01-17 Thread Dennis Haupt
Am 17.01.2012 23:08, schrieb daly: > On Tue, 2012-01-17 at 21:46 +0100, Dennis Haupt wrote: >> after the "wtf"s have worn off a bit, go on reading. >> imagine a simple problem: you have a collection of numbers and you have >> to write a function which collects all the numbers that are contained >>

Re: Lazy sequence transformation with item merge

2012-01-17 Thread Cedric Greevey
On Tue, Jan 17, 2012 at 12:20 AM, Brandon Harvey wrote: > Sorry to be naive, but can I ask why you folks are not using recur? Because we're using lazy-seq instead, which ends up having a similar effect to trampoline (the "recursion" actually winds up as a succession of calls to the function insid

Re: are non programmers the better programmers?

2012-01-17 Thread daly
On Tue, 2012-01-17 at 23:10 +0100, Dennis Haupt wrote: > Am 17.01.2012 22:46, schrieb James Reeves: > > On 17 January 2012 20:46, Dennis Haupt wrote: > >> i've noticed this since i started to work as a programmer 10 years ago. > >> programmers in general are supposed to be good at finding simple >

Re: Clojure doesn't find java class

2012-01-17 Thread Mark Rathwell
1. Does the mahout-collections jar contain compiled classes? Or only java source? 2. Is the mahout-collections jar making it to the lib directory when you run `lein deps`? On Mon, Jan 16, 2012 at 7:24 PM, joachim wrote: > Hello all, > > I am trying to use the mahout math sparse vector implement

Re: are non programmers the better programmers?

2012-01-17 Thread Dennis Haupt
Am 17.01.2012 22:46, schrieb James Reeves: > On 17 January 2012 20:46, Dennis Haupt wrote: >> i've noticed this since i started to work as a programmer 10 years ago. >> programmers in general are supposed to be good at finding simple >> solutions, but my experience is: they are not. on the contrar

Re: are non programmers the better programmers?

2012-01-17 Thread daly
On Tue, 2012-01-17 at 21:46 +0100, Dennis Haupt wrote: > after the "wtf"s have worn off a bit, go on reading. > imagine a simple problem: you have a collection of numbers and you have > to write a function which collects all the numbers that are contained > uneven times. for example, for a collecti

Re: Could be my favourite improvement in 1.4

2012-01-17 Thread Justin Steward
On Tue, Jan 17, 2012 at 5:19 AM, Tavis Rudd wrote: > {"v":, 1234} Except that's not valid JSON, so it's still not a simple cut and paste solution. I personally think that confusing a colon with whitespace under any circumstances is an unnecessary confusion leading to unnecessary errors. ~Justin

Clojure doesn't find java class

2012-01-17 Thread joachim
Hello all, I am trying to use the mahout math sparse vector implementation (see http://search-lucene.com/jd/mahout/math/org/apache/mahout/math/RandomAccessSparseVector.html and http://svn.apache.org/viewvc/mahout/trunk/math/src/main/java/org/apache/mahout/math/RandomAccessSparseVector.java?view=m

Re: Lazy sequence transformation with item merge

2012-01-17 Thread Brandon Harvey
Sorry to be naive, but can I ask why you folks are not using recur? -- 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 y

Re: lein-cljsbuild 0.0.1 released

2012-01-17 Thread Evan Mezeske
On Jan 16, 5:09 pm, Dave Sann wrote: > This looks interesting. > > I have a couple of comments and questions: > > 1. I am wary of the copying of cls -> cljs files in the src tree. Due to > the (inevitable at some point) confusion over which code is authored as > cljs and which copied. I really thi

Re: strange problem

2012-01-17 Thread joachim
Thanks a lot Andy! I am using your function now to catch "bad" cases and it works. Not really a solution as I said, but I am very happy that at least I can continue now with this problem out of sight :-) Actually, from reading your response I did think of what would be even better, namely a funct

Re: are non programmers the better programmers?

2012-01-17 Thread Dennis Peterson
"There are two ways of constructing a software design. One way is to make it so simple that there are obviously no deficiencies. And the other way is to make it so complicated that there are no obvious deficiencies."— C.A.R. Hoare. On Tue, Jan 17, 2012 at 3:46 PM, Dennis Haupt wrote: > after

Re: are non programmers the better programmers?

2012-01-17 Thread Paul L. Snyder
On Tue, 17 Jan 2012, Cedric Greevey wrote: > On Tue, Jan 17, 2012 at 3:46 PM, Dennis Haupt > wrote: > > after the "wtf"s have worn off a bit, go on reading. > > imagine a simple problem: you have a collection of numbers and you have > > to write a function which collects all the numbers that are

Best IDE

2012-01-17 Thread Josef Frydl
Can you please recommend the Best IDE for Clojure? I have Eclipse NetBeans and JetBrain already installed. -- 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 a

Re: are non programmers the better programmers?

2012-01-17 Thread Dennis Haupt
Am 17.01.2012 22:17, schrieb Cedric Greevey: > On Tue, Jan 17, 2012 at 3:46 PM, Dennis Haupt > wrote: >> after the "wtf"s have worn off a bit, go on reading. >> imagine a simple problem: you have a collection of numbers and you have >> to write a function which collects all the numbers that are c

Re: are non programmers the better programmers?

2012-01-17 Thread James Reeves
On 17 January 2012 20:46, Dennis Haupt wrote: > i've noticed this since i started to work as a programmer 10 years ago. > programmers in general are supposed to be good at finding simple > solutions, but my experience is: they are not. on the contrary, many > suffer from their individual tunnel vi

Re: are non programmers the better programmers?

2012-01-17 Thread Cedric Greevey
On Tue, Jan 17, 2012 at 3:46 PM, Dennis Haupt wrote: > after the "wtf"s have worn off a bit, go on reading. > imagine a simple problem: you have a collection of numbers and you have > to write a function which collects all the numbers that are contained > uneven times. for example, for a collectio

are non programmers the better programmers?

2012-01-17 Thread Dennis Haupt
after the "wtf"s have worn off a bit, go on reading. imagine a simple problem: you have a collection of numbers and you have to write a function which collects all the numbers that are contained uneven times. for example, for a collection (1,2,3,2,3,4) the correct result is (1,4) ask a child: "you

Re: clojure.contrib.prxml broken in Clojure 1.3.0

2012-01-17 Thread Vinzent
Hiccup ? -- 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

Leiningen user survey

2012-01-17 Thread Phil Hagelberg
Hello Clojure users! I'm conducting a survey of Leiningen usage in order to make better-informed decisions during the development of Leiningen 2. If you could take a moment to answer a few questions it would be very helpful. It shouldn't take more than a couple minutes: http://lein-survey.heroku

Matrix Multiplication Woes

2012-01-17 Thread Sam Ritchie
Hey all, I'm running into some large performance differences with matrix multiplication between Python's Numpy and Clojure -- so big that I'm almost certainly doing something very wrong. Numpy seems to be able to multiply a 1,000,000x23 matrix by its transpose in under a second, while the equivale

Re: strange problem

2012-01-17 Thread Andy Fingerhut
On Tue, Jan 17, 2012 at 4:35 AM, Rasmus Svensson wrote: > You can use this as a temporary workaround: > >(require '[clojure.string :as str]) > >(defn strip-supplementary [s] > (str/replace s #"[^\u-\u]+" "(removed supplementary > characters)")) > >(strip-supplementary "The

Re: ANN: Hubris 0.1.0 released

2012-01-17 Thread Marc Limotte
Nice contribution, Sanel. The hbase ruby shell was in need of a alternative, and Clojure's DSL capabilities will be of great use. On Tue, Jan 17, 2012 at 10:44 AM, Sanel Zukan wrote: > Hi all, > > I'm pleased to announce initial release of Hubris, HBase alternative > shell[1]. > > The main aim

ANN: Hubris 0.1.0 released

2012-01-17 Thread Sanel Zukan
Hi all, I'm pleased to announce initial release of Hubris, HBase alternative shell[1]. The main aim of hubris is to address hbase shell weakness, providing solid ground for writing extensions using simple DSL and extending shell features in directions other than HBase authors intended. Clojure u

Re: Controlling the test environment

2012-01-17 Thread Brian Marick
On Jan 15, 2012, at 5:18 PM, Matt Stump wrote: > Ideally I would like to do something like the following: for production and > development, if an environment variable is set connect to the database server > at the specified URL, if not then fall back to localhost. For test start up > an embed

Re: lein-cljsbuild 0.0.1 released

2012-01-17 Thread Shantanu Kumar
> 1. I am wary of the copying of cls -> cljs files in the src tree. Due to > the (inevitable at some point) confusion over which code is authored as > cljs and which copied. I really think that these need to be kept separate > (somehow). I think one clean solution may be to: 1. Split the common pa

Re: strange problem

2012-01-17 Thread Rasmus Svensson
Den 16 januari 2012 16:58 skrev joachim : > However, when I try the same in an emacs repl, I get  "Lisp connection > closed unexpectedly: connection broken by remote peer". I have no idea > what is going on or how to deal with this problem. Sometimes during > development I like to print the strings

Re: clojure.contrib.prxml broken in Clojure 1.3.0

2012-01-17 Thread cassiel
Ah: found this thread: https://groups.google.com/forum/#!topic/clojure-dev/IGD6Ziqt-QY So: would still be very obliged for a link to an XML-generating package working under 1.3.0. (I don't need to parse.) -- You received this message because you are subscribed to the Google Groups "Clojure" gro

Re: nrepl client test suite?

2012-01-17 Thread Martin DeMello
Thanks for the heads-up. nREPL.next does seem like a great idea, I'll take a look at the proposal and get back to you. martin On Mon, Jan 16, 2012 at 9:00 PM, Chas Emerick wrote: > Martin, > > nREPL has a decent set of tests (in https://github.com/clojure/tools.nrepl), > though I'm not sure of

clojure.contrib.prxml broken in Clojure 1.3.0

2012-01-17 Thread cassiel
This is straight from the doc string: (with-out-str (p/prxml [:p {:class "greet"} [:i "Ladies & gentlemen"]])) Works in Clojure 1.2.1: (:ok "\"Ladies & gentlemen\"") (that's pasted from the slime event buffer, hence the superfluous armour.) Fails in Clojure 1.3.0: clojure.lang.Numbers.lt(II)Z