<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:syn="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/">
  <channel rdf:about="http://blog.gmane.org/gmane.comp.java.clojure.user">
    <title>gmane.comp.java.clojure.user</title>
    <link>http://blog.gmane.org/gmane.comp.java.clojure.user</link>
    <description/>
    <syn:updatePeriod>hourly</syn:updatePeriod>
    <syn:updateFrequency>1</syn:updateFrequency>
    <syn:updateBase>1901-01-01T00:00+00:00</syn:updateBase>
    <items>
      <rdf:Seq>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.java.clojure.user/58767"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.java.clojure.user/58766"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.java.clojure.user/58765"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.java.clojure.user/58764"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.java.clojure.user/58763"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.java.clojure.user/58762"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.java.clojure.user/58761"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.java.clojure.user/58760"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.java.clojure.user/58759"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.java.clojure.user/58758"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.java.clojure.user/58757"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.java.clojure.user/58756"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.java.clojure.user/58755"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.java.clojure.user/58754"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.java.clojure.user/58753"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.java.clojure.user/58752"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.java.clojure.user/58751"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.java.clojure.user/58750"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.java.clojure.user/58749"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.java.clojure.user/58748"/>
      </rdf:Seq>
    </items>
    <image rdf:resource="http://gmane.org/img/gmane-25t.png"/>
    <textinput rdf:resource=""/>
  </channel>
  <image rdf:about="http://gmane.org/img/gmane-25t.png">
    <title>Gmane</title>
    <url>http://gmane.org/img/gmane-25t.png</url>
    <link>http://gmane.org</link>
  </image>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.java.clojure.user/58767">
    <title>Re: Unable to pass unboxed primitive to methods taking multiple numeric primitive types.</title>
    <link>http://permalink.gmane.org/gmane.comp.java.clojure.user/58767</link>
    <description>&lt;pre&gt;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=&amp;gt; (defn f [^java.awt.image.BufferedImage bi x] 
#'user/f
user=&amp;gt; 
~ $ 



On Wednesday, May 23, 2012 10:53:15 PM UTC-7, Cedric Greevey wrote:

&lt;/pre&gt;</description>
    <dc:creator>Armando Blancas</dc:creator>
    <dc:date>2012-05-24T14:34:58</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.java.clojure.user/58766">
    <title>Re: Clojure and the Anti-If Campaign</title>
    <link>http://permalink.gmane.org/gmane.comp.java.clojure.user/58766</link>
    <description>&lt;pre&gt;I really enjoyed that, thanks Dominikus :)

Ambrose

On Thu, May 24, 2012 at 5:57 PM, Dominikus &amp;lt;dominikus.herzberg&amp;lt; at &amp;gt;gmail.com&amp;gt;wrote:


&lt;/pre&gt;</description>
    <dc:creator>Ambrose Bonnaire-Sergeant</dc:creator>
    <dc:date>2012-05-24T14:18:23</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.java.clojure.user/58765">
    <title>maths, functions and solvers</title>
    <link>http://permalink.gmane.org/gmane.comp.java.clojure.user/58765</link>
    <description>&lt;pre&gt;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 function works well, using Apache Commons Math, but it 
expects a function of one argument.  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.  However approach is pretty 
messy as I need to define two functions for each maths function and list 
out the arguments twice.

Ideally I could pass the body of the maths function and a map of arguments 
directly to the solve function without having to define a function 
explicitly, and it would also work for multiple variables, but I might be 
asking a lot.

Here is what I have:-

(defn -cat
  "example math function"
  [{:keys [E A alpha t2 t1 W1 W2 g L T1 T2]}]
  (- (+ (* E A alpha (- t2 t1)) (/ (* (sq W1) (sq g) (sq L) E A) (* 24.0 
(sq T1))) T2) T1 (/ (* (sq W2) (sq g) (sq L) E A) (* 24.0 (sq T2)))))

(defn cat
  [m]
  (let [v (difference #{:E :A :alpha :t2 :t1 :W1 :W2 :g :L :T1 :T2}
                      (keys m))]
    (if-not (= (count v) 1)
      (exception "incorrect number of variables"))
    (fn [x] (-cat (assoc m (first v) x)))))

(solve (cat {:E 65000 :A 209.3 :alpha 0.000023 :t1 15 :t2 5 :W1 0.576 :W2 
0.576 :g 9.81 :L 45 :T1 1595})
         :start 1
         :min 0
         :max 100000
         :max-eval 1000)

and the solver code is on github:  
https://github.com/taprisiot/jlk.math/blob/master/src/jlk/math/optimization.clj


Now there has to be a better way of doing this but I'm stumped.  Any ideas?

As a side note, being able to define functions in infix would also be nice, 
but I don't feel up to creating a maths parser and dealing with ASTs, 
although I can visualise how I might manage the variables using this 
approach.

Thanks for any help!


- Lachlan

&lt;/pre&gt;</description>
    <dc:creator>jlk</dc:creator>
    <dc:date>2012-05-24T12:42:10</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.java.clojure.user/58764">
    <title>The http://clojure.org/libraries page</title>
    <link>http://permalink.gmane.org/gmane.comp.java.clojure.user/58764</link>
    <description>&lt;pre&gt;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] http://clojuresphere.herokuapp.com

Shantanu

&lt;/pre&gt;</description>
    <dc:creator>Shantanu Kumar</dc:creator>
    <dc:date>2012-05-24T12:40:16</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.java.clojure.user/58763">
    <title>Re: ANN Welle, a Clojure client for Riak with batteries included</title>
    <link>http://permalink.gmane.org/gmane.comp.java.clojure.user/58763</link>
    <description>&lt;pre&gt;Krukow:


They are similar in many ways. Welle uses implicit connection var while with Sumo you always have to pass it around.
Welle separates unrelated features between namespaces, Sumo uses sumo.client (if I remember correctly) for all kinds
of things.

Welle has several features Sumo does not:

* Links and lin walking support
* Serialization and deserialization to/from gzipped JSON
* core.cache implementation
* ring session store implementation
* Welle reuses more building blocks in the Riak Java client

I've talked to the Sumo author and the "batteries included client" approach is not what he wants Sumo to be.

And maybe the most important aspect, Welle also has many more tests, complete documentation guides and is used in real systems transferring many gigabytes of data per day. Sumo is a side project with very little documentation and
(if you ask me) pretty incomplete coverage.

That said, Welle's README mentions Sumo in the first paragraph so it's not like I am trying to claim that Sumo
is irrelevant.

MK


&lt;/pre&gt;</description>
    <dc:creator>Michael Klishin</dc:creator>
    <dc:date>2012-05-24T12:05:54</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.java.clojure.user/58762">
    <title>Re: Parallel doseq?</title>
    <link>http://permalink.gmane.org/gmane.comp.java.clojure.user/58762</link>
    <description>&lt;pre&gt;[snip]

I think you answered my question as well.  Thanks for the nice explanation!

-John

&lt;/pre&gt;</description>
    <dc:creator>John Szakmeister</dc:creator>
    <dc:date>2012-05-24T12:02:34</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.java.clojure.user/58761">
    <title>Re: Parallel doseq?</title>
    <link>http://permalink.gmane.org/gmane.comp.java.clojure.user/58761</link>
    <description>&lt;pre&gt;Unfortunately (pmap identity ...) won't do what you want. The only 
computation that will be parallelized is the call to identity.

To pmap, the for-expression is a black box - just a seq - it cannot reach 
into it and parallelize its insides. It can only consume it sequentially.

The meat of pmap is this: (map #(future (f %)) coll)
That must produce each element of coll (in this case, the for-loop), in 
order, *before* passing it to future.


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 news to me :)


- Chris Perkins
 
 

&lt;/pre&gt;</description>
    <dc:creator>Chris Perkins</dc:creator>
    <dc:date>2012-05-24T11:46:39</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.java.clojure.user/58760">
    <title>Re: Clojure and the Anti-If Campaign</title>
    <link>http://permalink.gmane.org/gmane.comp.java.clojure.user/58760</link>
    <description>&lt;pre&gt;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

&lt;/pre&gt;</description>
    <dc:creator>Rostislav Svoboda</dc:creator>
    <dc:date>2012-05-24T11:42:18</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.java.clojure.user/58759">
    <title>Re: Parallel doseq?</title>
    <link>http://permalink.gmane.org/gmane.comp.java.clojure.user/58759</link>
    <description>&lt;pre&gt;
Can you explain that a little more Sean?  I know of some issues with
chunked sequences, but I expected this to work as well with the doall
in there.

Thanks!

-John

&lt;/pre&gt;</description>
    <dc:creator>John Szakmeister</dc:creator>
    <dc:date>2012-05-24T10:23:32</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.java.clojure.user/58758">
    <title>Re: Unable to pass unboxed primitive to methods taking multiple numeric primitive types.</title>
    <link>http://permalink.gmane.org/gmane.comp.java.clojure.user/58758</link>
    <description>&lt;pre&gt;
I'm entirely not sure what's going on, but this seems to be good in the repl:

    (defn f [^java.awt.image.BufferedImage bi x]
        (.setSample (.getRaster bi) (int 0) (int 0) (int 0) ^double x))

I tried creating an object and running it through the function as well
with no warnings.

&lt;/pre&gt;</description>
    <dc:creator>John Szakmeister</dc:creator>
    <dc:date>2012-05-24T10:16:41</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.java.clojure.user/58757">
    <title>Clojure and the Anti-If Campaign</title>
    <link>http://permalink.gmane.org/gmane.comp.java.clojure.user/58757</link>
    <description>&lt;pre&gt;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 multimethods.

If you like, enjoy reading my blogpost on "The root of polymorphism: The 
Anti-If Campaign". It might be an interesting read for Clojure enthusiasts.

http://denkspuren.blogspot.de/2012/05/root-of-polymorphism-anti-if-campaign.html
 

Cheers,

Dominikus


&lt;/pre&gt;</description>
    <dc:creator>Dominikus</dc:creator>
    <dc:date>2012-05-24T09:57:47</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.java.clojure.user/58756">
    <title>Re: ANN Welle, a Clojure client for Riak with batteries included</title>
    <link>http://permalink.gmane.org/gmane.comp.java.clojure.user/58756</link>
    <description>&lt;pre&gt;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:

&lt;/pre&gt;</description>
    <dc:creator>Krukow</dc:creator>
    <dc:date>2012-05-24T09:45:45</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.java.clojure.user/58755">
    <title>Re: [ANN] Carmine, a new Redis client for Clojure</title>
    <link>http://permalink.gmane.org/gmane.comp.java.clojure.user/58755</link>
    <description>&lt;pre&gt;Thanks Baishampayan, appreciate it.

Just shout if you run into any problems or have any requests!

- Peter Taoussanis

&lt;/pre&gt;</description>
    <dc:creator>Peter Taoussanis</dc:creator>
    <dc:date>2012-05-24T07:38:39</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.java.clojure.user/58754">
    <title>Re: Parallel doseq?</title>
    <link>http://permalink.gmane.org/gmane.comp.java.clojure.user/58754</link>
    <description>&lt;pre&gt;
Sounds like pmap is *really* broken. (doall (pmap identity x)) should
realize every element of x, surely, just like (doall x)?

In any event I have a working workaround now, one that uses an
explicit thread pool. It's ugly but it works.

&lt;/pre&gt;</description>
    <dc:creator>Cedric Greevey</dc:creator>
    <dc:date>2012-05-24T07:17:56</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.java.clojure.user/58753">
    <title>Re: Midje 1.4 released</title>
    <link>http://permalink.gmane.org/gmane.comp.java.clojure.user/58753</link>
    <description>&lt;pre&gt;Yeah!

On May 24, 12:29 am, Brian Marick &amp;lt;mar...&amp;lt; at &amp;gt;exampler.com&amp;gt; wrote:

&lt;/pre&gt;</description>
    <dc:creator>CA</dc:creator>
    <dc:date>2012-05-24T07:10:57</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.java.clojure.user/58752">
    <title>Re: Parallel doseq?</title>
    <link>http://permalink.gmane.org/gmane.comp.java.clojure.user/58752</link>
    <description>&lt;pre&gt;
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 that, I
presume?
&lt;/pre&gt;</description>
    <dc:creator>Sean Corfield</dc:creator>
    <dc:date>2012-05-24T07:00:24</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.java.clojure.user/58751">
    <title>Re: Parallel doseq?</title>
    <link>http://permalink.gmane.org/gmane.comp.java.clojure.user/58751</link>
    <description>&lt;pre&gt;Replacing (range 10) with (take 10 (iterate inc 0)) didn't change
anything. It's still not parallelizing.

I need it to parallelize even for low-length sequences because the
individual elements may be expensive and there may be few of them.

&lt;/pre&gt;</description>
    <dc:creator>Cedric Greevey</dc:creator>
    <dc:date>2012-05-24T06:37:16</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.java.clojure.user/58750">
    <title>Re: Parallel doseq?</title>
    <link>http://permalink.gmane.org/gmane.comp.java.clojure.user/58750</link>
    <description>&lt;pre&gt;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...

On Wed, May 23, 2012 at 10:56 PM, Cedric Greevey &amp;lt;cgreevey&amp;lt; at &amp;gt;gmail.com&amp;gt; wrote:

&lt;/pre&gt;</description>
    <dc:creator>Sean Corfield</dc:creator>
    <dc:date>2012-05-24T06:15:13</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.java.clojure.user/58749">
    <title>Re: [ANN] clojure-echonest-api</title>
    <link>http://permalink.gmane.org/gmane.comp.java.clojure.user/58749</link>
    <description>&lt;pre&gt;
I would think so. AFAIK, the advice has always been "if you need to do
some computation on another thread don't (ab)use agents, use futures".

Additionally, you have[1]:

(def #^{:dynamic true} *api-key* (atom "N6E4NIOVYMTHNDM8J"))

unless you're planning on setting the key to different values in
different threads (unlikely?) you don't need to use an atom there.

All I've said above could be completely wrong so be warned :)

U

[1] https://github.com/siscia/echonest-clojure-api/blob/master/src/echonest_api/with-doc-core.clj#L16

&lt;/pre&gt;</description>
    <dc:creator>Ulises</dc:creator>
    <dc:date>2012-05-24T05:56:25</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.java.clojure.user/58748">
    <title>Parallel doseq?</title>
    <link>http://permalink.gmane.org/gmane.comp.java.clojure.user/58748</link>
    <description>&lt;pre&gt;For some reason, this doesn't actually seem to be executing in parallel:

(defmacro pdoseq
  "Bindings as for for, but parallel execution as per pmap, pcalls,
pvalues; returns
   nil."
  [seq-exprs &amp;amp; body]
  `(do
     (doall
       (pmap identity
             (for ~seq-exprs (do ~&amp;lt; at &amp;gt;body)))
     nil)))

user=&amp;gt; (pdoseq [i (range 10)] (println n))
0
1
2
3
4
5
6
7
8
9

Never any interleaving of output and if I give it a big CPU-bound job
to do for each integer it only saturates one core.

I thought it might be a chunked-seq issue, but:

user=&amp;gt; (chunked-seq? (range 10))
false

&lt;/pre&gt;</description>
    <dc:creator>Cedric Greevey</dc:creator>
    <dc:date>2012-05-24T05:56:26</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.java.clojure.user/58747">
    <title>Re: Unable to pass unboxed primitive to methods taking multiple numeric primitive types.</title>
    <link>http://permalink.gmane.org/gmane.comp.java.clojure.user/58747</link>
    <description>&lt;pre&gt;
Didn't have a repl handy? It's quick to check that it produces:

Reflection warning, NO_SOURCE_PATH:2 - call to setData can't be resolved.

&lt;/pre&gt;</description>
    <dc:creator>Cedric Greevey</dc:creator>
    <dc:date>2012-05-24T05:53:15</dc:date>
  </item>
  <textinput rdf:about="http://search.gmane.org/?group=$group=gmane.comp.java.clojure.user">
    <title>Search Engine</title>
    <description>Search the mailing list at Gmane</description>
    <name>query</name>
    <link>http://search.gmane.org/?group=$group=gmane.comp.java.clojure.user</link>
  </textinput>
</rdf:RDF>

