Playing with some problems of 4clojure, I wanted to make a map which, for
each empty collection, returns a keyword. But it seems that it is
impossible to have both an empty list and an empty vector in the same map.
user=> {() :list}
{() :list}
user=> {() :list [] :vector}
IllegalArgumentExceptio
Another interesting fact is that:
Clojure 1.2.1
user=> {'(1) :list [1] :vector}
java.lang.IllegalArgumentException: Duplicate key: (1) (NO_SOURCE_FILE:0)
Clojure 1.3.0
user=> {'(1) :list [1] :vector}
{(1) :vector}
Clojure 1.4.0-beta1
user=> {'(1) :list [1] :vector}
{(1) :vector}
...but I don't
More examples in clojure 1.3.0:
user=> {[1 2 3] :vector '(1 2 3) :list}
{[1 2 3] :list}
but
user=> #{[1 2 3] (1 2 3)}
IllegalArgumentException Duplicate key: (1 2 3)
clojure.lang.PersistentHashSet.createWithCheck (PersistentHashSet.java:68)
... anyone has an explanation?
Juan Manuel
On Tue
"Marshall T. Vandegrift" writes:
> So, is this entirely expected behavior? Or am I missing something
> which would make initializing the defining namespace happen as part of
> a static initializer for the AOTed `deftype` class?
To answer my own question, the Clojure wiki page on the 1.2-introdu
You might find this useful for examples:
http://david-mcneil.com/post/765563763/enhanced-clojure-records
On Monday, April 2, 2012 8:51:23 AM UTC-5, Joachim De Beule wrote:
>
> Hi All,
>
> I need to define a number of similar records, so I wanted to write a macro
> for that, but I do not know ho
On Apr 3, 12:55 am, Jimmy wrote:
> Hi all,
>
> The REST endpoint I need to call requires multiple boundaries in the
> POST request. Does any one know how to do this in clj-http? Lets say
> my header had the following boundary
>
> Content-Type "multipart/form-data; boundary=the_message_boundar
Maybe the reason is the STM.
If I rmember it correctly, then agents and refs are controlled by
Clojures STM mechanic. Eventuelly the us of map increase the work for
the STM and so it needs more time to schedule all the agent calls and
this result in a higher memory usage.
When you use pmap th
Hmmminteresting thoughts...
I was under the impression that that agents are asynchronous and thus
do not depend on the STM , which is only for co-ordinated change! There
is a dedicated Thread pool where agents are assigned separate threads
for their work.You seem to suggest otherwise...I
Might be.
I have spent the last week to write some profiling code for the
algorithm, which also calculates the memory usage.
I wanted to try it out with the original code with different number of
dimiciles and with the pmap code.
But with the STM it is only a guess. I must reread the chapter
A short side note.
I looked into "The Joy of Clojure" and there is a nice diagram on page
251 about the difference if you use send and send-off to send actions to
an agent.
The intersting on send is, that the agent queues the send actions if you
use send. If you use send-off the agent does not
The intersting on send is, that the agent queues the send actions if
you use send. If you use send-off the agent does not stores the action
into a queue.
Yet the code uses "send" predominantly...
On 03/04/12 18:39, Marcus Lindner wrote:
Could be, that in the case of pmap a similiar effect ta
Yep. Your're right.
Am 03.04.2012 20:04, schrieb Jim - FooBar();:
The intersting on send is, that the agent queues the send actions if
you use send. If you use send-off the agent does not stores the
action into a queue.
Yet the code uses "send" predominantly...
On 03/04/12 18:39, Marcus Li
I've been looking for an answer for my problem on this group in vain. Found
something that resolves part of the problem. I want to make a struct map
like thi s
(def events-for-mashup
(let [title "Events mashup" event-data (vector create-map-of-events)]
(struct event-map title event-data)
On Tue, Apr 3, 2012 at 8:15 PM, Vesna Petkovic wrote:
>
> (def events-for-mashup
> (let [title "Events mashup" event-data (vector create-map-of-events)]
> (struct event-map title event-data)))
>
It looks like you forgot to call your create-map-of-events function, try:
(def events-for-mashup
Yes, you're right... it works now
thanks
On Tuesday, April 3, 2012 8:26:06 PM UTC+2, mtyaka wrote:
>
> On Tue, Apr 3, 2012 at 8:15 PM, Vesna Petkovic wrote:
>>
>> (def events-for-mashup
>> (let [title "Events mashup" event-data (vector create-map-of-events)]
>> (struct event-map titl
I am wondering if anybody in (or near) Rochester, NY would be interested in
forming a Clojure Group? I would like to think that there's more than just
me hacking on Clojure in the area!
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this g
Hi Lee,
Thanks for the suggestion, will try that approach.
regards,
Jimmy
On Tuesday, April 3, 2012 4:30:10 PM UTC+1, Lee Hinman wrote:
>
> On Apr 3, 12:55 am, Jimmy wrote:
> > Hi all,
> >
> > The REST endpoint I need to call requires multiple boundaries in the
> > POST request. Does any o
Hi all,
If anyone was unaware, Dave Ray, author of the Seesaw Clojure library will
be speaking at the inaugural Great Lakes Functional Programming Conference
in Ann Arbor, MI on May 5. We're very pleased that Dave will be discussing
Clojure development with us.
More information here:
http://
I needed something quick like Korma for my .NET work, so I ported it to
ClojureCLR. The code is here: https://github.com/aaronc/Korma.net. So far
only MySql is supported.
Right now, there is nothing like leiningen for .NET so no build and
distribution yet. Also, most of the code for the JVM
Hi,
sorry to be late to the party...
Please let me try to answer some of your questions in one post.
1. The main purpose for the code was to show how many threads could work on
one shared data-structure and how the introduction of concurrent
programming can change the algorithms: in this case
Wow that is indeed very clear and informative...Thanks a lot!
I could not agree more! I was struggling to understand the 'meaning' of
the algorithm and what it was trying to demonstrate...as Stefan said,
one would expect the most expensive bit in any evolutionary computation
to be the fitness/
Hi Jeremy,
There's a RocLisp group that meets once in a while (next meeting TBD).
We've been focussing on Clojure so far.
http://roclisp.org/
https://github.com/roclisp
Twitter: @roclisp
I myself am pretty nuts about Clojure. Looking forward to meeting and
hacking with you,
Justin
@jkkramer
I think quoting plays a part here:
Clojure 1.3.0
user=> {(list 1 2 3) :list [1 2 3] :vec}
IllegalArgumentException Duplicate key: (1 2 3)
clojure.lang.PersistentArrayMap.createWithCheck (PersistentArrayMap.java:70)
Stuart
On 3 April 2012 22:41, JuanManuel Gimeno Illa wrote:
> More examples in
Awesome! Thanks Justin. I'll introduce myself on the list. I look forward
to meeting you and the rest.
On Tue, Apr 3, 2012 at 6:49 PM, Justin Kramer wrote:
> Hi Jeremy,
>
> There's a RocLisp group that meets once in a while (next meeting TBD).
> We've been focussing on Clojure so far.
>
> http:/
Also... http://clojure-libraries.appspot.com
On 24 March 2012 23:45, Rostislav Svoboda wrote:
> A nice list of tools and libraries I stumbled upon. Enjoy!
>
> http://www.clojure-toolbox.com/
>
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To
Hi everybody
Everything was working great and just today, while trying to make a simple
"lein new foobar" I got this error:
Exception in thread "main" java.lang.IllegalAccessError: render does not
exist (default.clj:1)
at clojure.lang.Compiler.eval(Compiler.java:5440)
at clojure.lang.Compiler.eva
Hi everybody
Everything was working great and just today, while trying to make a simple
"lein new foobar" I got this error:
Exception in thread "main" java.lang.IllegalAccessError: render does not
exist (default.clj:1)
at clojure.lang.Compiler.eval(Compiler.java:5440)
at clojure.lang.Compiler.eva
On Tue, Apr 3, 2012 at 11:39 PM, uMany wrote:
> Hi everybody
> Everything was working great and just today, while trying to make a simple
> "lein new foobar" I got this error:
> Exception in thread "main" java.lang.IllegalAccessError: render does not
> exist (default.clj:1)
The JVM is loading an
Thanks for the answer.
I wondered too why the GA took so long to solve this small problem.
I tried send for the grimreaper, but this does not solve the population
increase problem. On a test run the population even increses much
faster, wehen I used only send.
But I must say I liked the idea
On Wed, Apr 4, 2012 at 5:50 AM, Cedric Greevey wrote:
> So, the version of some dependency of another dependency is wrong,
> most likely -- for instance, if your project.clj calls for a 1.3
> contrib library and Clojure 1.2, or something like that.
I'm unsure if it's the real issue, but just rec
30 matches
Mail list logo