Re: [ANN] clojure-echonest-api

2012-05-24 Thread Ulises
> I am unsure about the atom of api-key, in theory i won't need to change my > api-key, but idk... You can get a lot of api-key gratis which are a little > limited or just one payed api-key that can do everything... My point was that once you've declared api-key {:dynamic true} (which by the way i

Re: [ANN] clojure-echonest-api

2012-05-24 Thread Simone Mosciatti
Yep, i changed it in futures... I am unsure about the atom of api-key, in theory i won't need to change my api-key, but idk... You can get a lot of api-key gratis which are a little limited or just one payed api-key that can do everything... Il giorno giovedì 24 maggio 2012 00:56:25 UTC-5, Ulis

Re: maths, functions and solvers

2012-05-24 Thread Zack Maril
Off topic: How hard would it be to build on core.logicto do math functions? -Zack On Thursday, May 24, 2012 9:30:12 PM UTC-2, Stephen Compall wrote: > > On May 24, 2012 8:42 AM, "jlk" wrote: > > However the only way I can think of converting the

Re: maths, functions and solvers

2012-05-24 Thread Stephen Compall
On May 24, 2012 8:42 AM, "jlk" wrote: > However the only way I can think of converting the argument list and the function into a function of one argument is with an intermediate function. Apply is the standard way to listify a function's arguments. Where f is a function taking n args, (partial a

Re: Clojure and the Anti-If Campaign

2012-05-24 Thread Raoul Duke
On Thu, May 24, 2012 at 2:41 PM, Mimmo Cosenza wrote: > forgot Copernicus vs Ptolemy. But its not without mental efforts to find the > right earth/sun to swap. I'll read your post in few minutes yeah, they were all still wrong about mercury, no? :-) -- You received this message because you

Re: Clojure and the Anti-If Campaign

2012-05-24 Thread Mimmo Cosenza
Whatever model I choose to understand a piece (big or small at your preferences) of the world, when I need more than few conceptual if, there is something wrong in my understanding of that piece. I never forgot Copernicus vs Ptolemy. But its not without mental efforts to find the right earth/su

Re: Unable to pass unboxed primitive to methods taking multiple numeric primitive types.

2012-05-24 Thread Armando Blancas
> > I saw that you wrote it in the style of a repl interaction, which > could have been pasted or could have been synthesized by hand. > > Aw! Dude, I'd never bullshit you like that. Honest. But I was sloppy and rude; sorry. -- You received this message because you are subscribed to the Goo

Re: Parallel doseq?

2012-05-24 Thread Cedric Greevey
Sorry. *Something* is apparently messing with my outbound messages. I'm not sure what, why, or how. Characters are moved or substituted at random times, sometimes with unfortunate results. Meanwhile, I had tried using pcalls as well but was getting spurious behavior. I wound up with: (defmacro pd

Re: Unable to pass unboxed primitive to methods taking multiple numeric primitive types.

2012-05-24 Thread Cedric Greevey
On Thu, May 24, 2012 at 10:34 AM, Armando Blancas wrote: > Didn't you see that I pasted my sample from the repl? I saw that you wrote it in the style of a repl interaction, which could have been pasted or could have been synthesized by hand. Given that in the former case it should have been easy

Re: Unable to pass unboxed primitive to methods taking multiple numeric primitive types.

2012-05-24 Thread Cedric Greevey
On Thu, May 24, 2012 at 6:16 AM, John Szakmeister wrote: > On Wed, May 23, 2012 at 7:58 PM, Cedric Greevey wrote: >> (defn f [^java.awt.image.BufferedImage bi x] >>  (.setSample (.getRaster bi) 0 0 0 (double x))) >> #> matching method found: setSample, compiling:(NO_SOURCE_PATH:1)> >> >> The only

Re: Clojure and the Anti-If Campaign

2012-05-24 Thread Raoul Duke
hi! On Thu, May 24, 2012 at 4:42 AM, Rostislav Svoboda wrote: > After seeing [1] from Rich Hickey I wondered what he means with > "replace if statements with polymorphic functions"? Why and how > exactly should I do it? Your blogpost opened my eyes. Thanks a lot > Dominikus interesting thread. a

Re: Parallel doseq?

2012-05-24 Thread Sean Corfield
On Thu, May 24, 2012 at 5:02 AM, John Szakmeister wrote: > On Thu, May 24, 2012 at 7:46 AM, Chris Perkins > wrote: > [snip] >> Also, pmap is not broken; the problem with the code you pasted is simply an >> errant closing paren. You had (do (doall (pmap ...) nil)), where you meant >> (do (doall (

Re: Do you leave a Swank / nREPL in your production servers?

2012-05-24 Thread Sean Corfield
On Thu, May 24, 2012 at 9:07 AM, blais wrote: > Is it common for people deploying Clojure servers in a production > environment to leave a swank or nrepl server running for making live bug > fixes? Do you guys do this?  Would you advise against it? We've recently added swank server to our product

Re: Do you leave a Swank / nREPL in your production servers?

2012-05-24 Thread Phil Hagelberg
On Thu, May 24, 2012 at 9:07 AM, blais wrote: > Is it common for people deploying Clojure servers in a production > environment to leave a swank or nrepl server running for making live bug > fixes? Do you guys do this?  Would you advise against it? I would recommend having it available for debugg

Re: Do you leave a Swank / nREPL in your production servers?

2012-05-24 Thread Jay Fields
Martin, We have a web-repl that we use for live code updates. Dangerous stuff, not for the faint of heart. On Thu, May 24, 2012 at 11:07 AM, blais wrote: > Hi, > Just curious... > Is it common for people deploying Clojure servers in a production > environment to leave a swank or nrepl server run

Do you leave a Swank / nREPL in your production servers?

2012-05-24 Thread blais
Hi, Just curious... Is it common for people deploying Clojure servers in a production environment to leave a swank or nrepl server running for making live bug fixes? Do you guys do this? Would you advise against it? Thanks, -- You received this message because you are subscribed to the Google

Re: Unable to pass unboxed primitive to methods taking multiple numeric primitive types.

2012-05-24 Thread Armando Blancas
Didn't you see that I pasted my sample from the repl? Here it goes again; pay attention: Last login: Thu May 24 07:21:38 on console ~ $ clj Clojure 1.4.0 user=> (defn f [^java.awt.image.BufferedImage bi x] > (.setData (.getRaster bi) 0 0 0 ^double x)) #'user/f user=> ~ $ On Wednesday, Ma

Re: Clojure and the Anti-If Campaign

2012-05-24 Thread Ambrose Bonnaire-Sergeant
I really enjoyed that, thanks Dominikus :) Ambrose On Thu, May 24, 2012 at 5:57 PM, Dominikus wrote: > Three weeks ago I stumbled across the Anti-If Campaign ( > http://www.antiifcampaign.com/). > > An instant later I realized that one could easily re-implement "if" in > Clojure with maps. More

maths, functions and solvers

2012-05-24 Thread jlk
Hello I've got a problem I'm stuck with and would value some extra input... Basically I'd like to be able to define a maths function with a large number of variables, then pass this and a map of arguments to a solve function which solves for whatever is not defined in the map. Now the solve fu

The http://clojure.org/libraries page

2012-05-24 Thread Shantanu Kumar
Hi, The http://clojure.org/libraries page does not seem to be very up to date. Would be be a good idea to put references to external links there that maintain lists of Clojure libraries? [1] http://www.clojure-toolbox.com/ [2] http://clojure-libraries.appspot.com/ [3] http://clojurewerkz.org [4]

Re: ANN Welle, a Clojure client for Riak with batteries included

2012-05-24 Thread Michael Klishin
Krukow: > I've been using sumo for some time, and that has been working out fine for > the simple use cases I have. > > Would you mind giving your opinion on how these libraries compare (tradeoffs) They are similar in many ways. Welle uses implicit connection var while with Sumo you always hav

Re: Parallel doseq?

2012-05-24 Thread John Szakmeister
On Thu, May 24, 2012 at 7:46 AM, Chris Perkins wrote: [snip] > Also, pmap is not broken; the problem with the code you pasted is simply an > errant closing paren. You had (do (doall (pmap ...) nil)), where you meant > (do (doall (pmap ...)) nil). Apparently doall has a two-arg version, which > is

Re: Parallel doseq?

2012-05-24 Thread Chris Perkins
On Thursday, May 24, 2012 3:17:56 AM UTC-4, Cedric Greevey wrote: > > On Thu, May 24, 2012 at 3:00 AM, Sean Corfield wrote: > > On Wed, May 23, 2012 at 11:37 PM, Cedric Greevey wrote: > >> Replacing (range 10) with (take 10 (iterate inc 0)) didn't change > >> anything. It's still not parallelizi

Re: Clojure and the Anti-If Campaign

2012-05-24 Thread Rostislav Svoboda
After seeing [1] from Rich Hickey I wondered what he means with "replace if statements with polymorphic functions"? Why and how exactly should I do it? Your blogpost opened my eyes. Thanks a lot Dominikus Bost [1] http://www.infoq.com/presentations/Simple-Made-Easy -- You received this message

Re: Parallel doseq?

2012-05-24 Thread John Szakmeister
On Thu, May 24, 2012 at 2:15 AM, Sean Corfield wrote: > First off, the code you posted can't actually be right: you have > (println n) but the for binding was for i. > > Second, given your macro, try (range 100) instead of (range 10) and > see what you get... Can you explain that a little more Se

Re: Unable to pass unboxed primitive to methods taking multiple numeric primitive types.

2012-05-24 Thread John Szakmeister
On Wed, May 23, 2012 at 7:58 PM, Cedric Greevey wrote: > (defn f [^java.awt.image.BufferedImage bi x] >  (.setSample (.getRaster bi) 0 0 0 (double x))) > # matching method found: setSample, compiling:(NO_SOURCE_PATH:1)> > > The only way I was able to find to fix this is > > (defn f [^java.awt.imag

Clojure and the Anti-If Campaign

2012-05-24 Thread Dominikus
Three weeks ago I stumbled across the Anti-If Campaign ( http://www.antiifcampaign.com/). An instant later I realized that one could easily re-implement "if" in Clojure with maps. More interestingly, polymorphic functions can be easily motivated with the help of maps. And this naturally leads to

Re: ANN Welle, a Clojure client for Riak with batteries included

2012-05-24 Thread Krukow
Thanks. I'm quite interested in this. I've been using sumo for some time, and that has been working out fine for the simple use cases I have. Would you mind giving your opinion on how these libraries compare (tradeoffs) On Wednesday, May 16, 2012 4:23:16 PM UTC+2, Michael Klishin wrote: > > I

Re: [ANN] Carmine, a new Redis client for Clojure

2012-05-24 Thread Peter Taoussanis
Thanks Baishampayan, appreciate it. Just shout if you run into any problems or have any requests! - Peter Taoussanis -- 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 n

Re: Parallel doseq?

2012-05-24 Thread Cedric Greevey
On Thu, May 24, 2012 at 3:00 AM, Sean Corfield wrote: > On Wed, May 23, 2012 at 11:37 PM, Cedric Greevey wrote: >> Replacing (range 10) with (take 10 (iterate inc 0)) didn't change >> anything. It's still not parallelizing. > > My point was that when you replace (range 10) with (range 100) in you

Re: Midje 1.4 released

2012-05-24 Thread CA
Yeah! On May 24, 12:29 am, Brian Marick wrote: > Midje is a test framework for Clojure. It supports top-down as well as > bottom-up testing, encourages readable tests, provides a smooth migration > path from clojure.test, and supports a balance between abstraction and > concreteness. > > Speci

Re: Parallel doseq?

2012-05-24 Thread Sean Corfield
On Wed, May 23, 2012 at 11:37 PM, Cedric Greevey wrote: > Replacing (range 10) with (take 10 (iterate inc 0)) didn't change > anything. It's still not parallelizing. My point was that when you replace (range 10) with (range 100) in your code, it prints numbers up to 31 and no more. You didn't try