Re: best practices for small RAM usage

2012-10-04 Thread nicolas.o...@gmail.com
You have 2 distinct problems: - allocating many short-lived objects. It can affect performance but does not matter for long-term memory occupation - keeping too many things in memory. Then you have to resolve an algorithmic question, quite independent of the technology you use. On Wed, Oct 3,

Re: performance in versions = 1.4.0

2012-10-04 Thread Karsten Schmidt
Okay, after several hours of more testing profiling it seems the culprit is the implementation of (nth) - and IMHO this is quite a biggie: (use 'macrochrono.core) ; only used for bench macro below (def t [[0 0] [100 0] [100 100] [[0 0] 1 100]]) (defn foo [[a b c [[dx dy] r x2]] [px py]]

Re: best practices for small RAM usage

2012-10-04 Thread Niels van Klaveren
You might want to use the -XX:+UseCompressedOops JVM option to compress the JVM object pointer size in 64 bits. On Wednesday, October 3, 2012 9:17:21 PM UTC+2, Thomas wrote: try and use a 32bit JVM. I found that a 64bit JVM uses almost twice as much memory. YMMV Thomas -- You received

Re: interleave

2012-10-04 Thread Stathis Sideris
Maybe performance is the reason: (time (dotimes [_ 100] (apply mapcat list [[1 2 3] [7 7 7]]))) Elapsed time: 1853.904337 msecs (time (dotimes [_ 100] (interleave [1 2 3] [7 7 7]))) Elapsed time: 81.000798 msecs On Wednesday, 3 October 2012 19:21:37 UTC+1, Marc Dzaebel wrote: Thanks

Re: performance in versions = 1.4.0

2012-10-04 Thread Ben Smith-Mannschott
nth only promises O(n) performance for all things sequential. However, the implementation on master in RT.java appears to special case indexed and random-access collections for faster access, so I'm not sure why you're seeing such a difference. You could try using get in place of nth, though from

Re: Starting a new ClojureScript project, where to start?

2012-10-04 Thread Robert Stuttaford
You might find this quick-start I put together handy: https://github.com/robert-stuttaford/demo-enfocus-pubsub-remote/ On Friday, September 28, 2012 8:30:12 PM UTC+2, Daniel Glauser wrote: Hi folks, Where would you point someone if they wanted guidance starting a new ClojureScript project?

Re: interleave

2012-10-04 Thread Mayank Jain
On Thu, Oct 4, 2012 at 4:28 PM, Stathis Sideris side...@gmail.com wrote: Maybe performance is the reason: (time (dotimes [_ 100] (apply mapcat list [[1 2 3] [7 7 7]]))) Elapsed time: 1853.904337 msecs (time (dotimes [_ 100] (interleave [1 2 3] [7 7 7]))) Elapsed time: 81.000798

Re: interleave

2012-10-04 Thread Meikel Brandmeyer (kotarak)
Hi, you should probably add some dorun somewhere. Kind regards Meikel -- 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

Re: interleave

2012-10-04 Thread Stathis Sideris
You are right, but still: (time (dotimes [_ 100] (dorun (apply mapcat list [[1 2 3] [7 7 7]] Elapsed time: 4177.113292 msecs (time (dotimes [_ 100] (dorun (interleave [1 2 3] [7 7 7] Elapsed time: 1156.658738 msecs :-) Stathis On Thursday, 4 October 2012 14:46:09 UTC+1,

ANN Langohr documentation site

2012-10-04 Thread Michael Klishin
Langohr is a Clojure RabbitMQ client that embraces the AMQP 0.9.1 model. Langohr is not a new project and not quite ready for 1.0 yet but it is past most of breaking API changes and the bulk of the docs is now available at http://clojurerabbitmq.info. A slightly longer announcement:

optimized clojurescript-js file throws exception but debug version does not?

2012-10-04 Thread Andrew
Please see https://github.com/achengs/subpar/issues/1 which links to two demo pages. One page uses the debug (non-optimized non-munged) js version and seems to work fine. The other uses the optimized version and throws an exception. Details are in the github issues page and on the demo pages

Re: optimized clojurescript-js file throws exception but debug version does not?

2012-10-04 Thread David Nolen
On Thu, Oct 4, 2012 at 12:40 PM, Andrew ache...@gmail.com wrote: Please see https://github.com/achengs/subpar/issues/1 which links to two demo pages. One page uses the debug (non-optimized non-munged) js version and seems to work fine. The other uses the optimized version and throws an

Noir.response and custom java object

2012-10-04 Thread arekanderu
Hello, I am not sure if i am supposed to ask a noir-related question in the group but the noir issues at github https://github.com/bitwalker/noir is closed so i thought someone here might know. I am trying to use a custom

Re: Noir.response and custom java object

2012-10-04 Thread gaz jones
It seems to be using cheshire under the covers, did you add an encoder for your class? e.g: (add-encoder java.awt.Color (fn [c jsonGenerator] (.writeString jsonGenerator (str c On Thu, Oct 4, 2012 at 12:04 PM, arekanderu arekand...@gmail.com wrote: Hello, I am not sure if i am

Re: Noir.response and custom java object

2012-10-04 Thread arekanderu
Hi Gaz That's exactly the part that I can't figure out. Where exactly am I supposed to do that? Inside the clj where I am going to use noir.response? My apologies if my question seems silly but I am a bit brain-blocked with this. On Thursday, October 4, 2012 8:26:29 PM UTC+3, Gaz wrote: It

Re: Noir.response and custom java object

2012-10-04 Thread arekanderu
In fact, on the latest commit, response.cljhttps://github.com/bitwalker/noir/blob/master/src/noir/response.cljdoes not seem to use chesire.custom anymore even though this commithttps://github.com/bitwalker/noir/commit/6408d7028cae00937588b599b7c3305bb48e32fdindicates otherwise. On Thursday,

Re: Noir.response and custom java object

2012-10-04 Thread arekanderu
OK, the problem is that the custom encoders isn't merged with the master tree yet so, you need to download this branchhttps://github.com/bitwalker/noir/tree/custom-json-encoding, run *lein jar *at the root directory of the project and then use that jar file in your project dependencies. I did

Re: Parallella - The new era of computing?

2012-10-04 Thread Brent Millare
If/when it comes out, it sounds like it will be most easily accessible via OpenCL. The architecture sounds similar to cell, have a standard processor the OS runs on, then run super computing jobs on all the worker processors. I'd say the best bet we have to getting clojure in those environments

Re: Noir.response and custom java object

2012-10-04 Thread arekanderu
After adding the dependencies of noir to my own project.clj, everything worked fine :) I hope that noir developers will make it a bit easier soon... On Thursday, October 4, 2012 9:26:56 PM UTC+3, arekanderu wrote: OK, the problem is that the custom encoders isn't merged with the master tree

Re: Parallella - The new era of computing?

2012-10-04 Thread Timothy Baldridge
The worst part of these sort of designs is the memory limitations. For instance, modern GPUs can read from GPU memory at about 80GB/sec. However that's only in some very specific cases. That is, if you have 1024 stream processors they all must be reading memory in the same pattern. They all can't

Re: Regarding Starting Clojure

2012-10-04 Thread Michael Fogus
Here's one approach: Make a github of the code and content that runs the site. People fork and make pull requests. You talked me into it. https://github.com/fogus/www-readevalprintlove-org -- You received this message because you are subscribed to the Google Groups Clojure group. To post to

Re: Parallella - The new era of computing?

2012-10-04 Thread Brent Millare
I wouldn't completely discount them yet. First, while absolute performance is probably less than i7 in most benchmarks, their main performance metric is GFLOPS/watt, not just pure GFLOPS. When you start to include the overhead of managing a large system, which includes UPS, heat, and power

Re: Regarding Starting Clojure

2012-10-04 Thread Brent Millare
lol, That is really awesome! I'm going to have to really read through the sources now. On Thursday, October 4, 2012 3:28:41 PM UTC-4, Fogus wrote: Here's one approach: Make a github of the code and content that runs the site. People fork and make pull requests. You talked me into it.

Re: Regarding Starting Clojure

2012-10-04 Thread Grant Rettke
I loved Mathematica's documentation that had lovingly maintained by... in the sidebar or something to that effect. It was really apparent that the maintainer did lovingly maintain it. Can't seem to find it at the moment though. On Thu, Oct 4, 2012 at 2:49 PM, Brent Millare brent.mill...@gmail.com

ANN: a Clojure docs site, and github organization

2012-10-04 Thread John Gabriele
Hi all, I seem to have found myself writing some Clojure docs again. They are currently hosted at https://github.com/clojuredocs/cds , and are *currently* on display at http://www.unexpected-vortices.com/clojure/cds/index.html . Though, there are plans in the works to render the docs using the

Re: ANN: a Clojure docs site, and github organization

2012-10-04 Thread Paul deGrandis
This is great to see. Along side efforts like Fogus' REPL love - http://readevalprintlove.fogus.me/ - we're well on our way fixing the documentation problems in our community. I could definitely see something like this migrating into docs.clojure.org once it reached maturity. Huge thanks to

Re: ANN: a Clojure docs site, and github organization

2012-10-04 Thread Laurent PETIT
2012/10/4 Paul deGrandis paul.degran...@gmail.com This is great to see. Along side efforts like Fogus' REPL love - http://readevalprintlove.fogus.me/ - we're well on our way fixing the documentation problems in our community. I could definitely see something like this migrating into

Re: ANN: a Clojure docs site, and github organization

2012-10-04 Thread Bronsa
Starting two different projects at the same time with almost the same purpose seems a waste of efforts... Wouldn't it be better for readevalprintlove and clojuredocs to join forces from the beginning? 2012/10/4 Laurent PETIT laurent.pe...@gmail.com 2012/10/4 Paul deGrandis

Re: Question about sets

2012-10-04 Thread Andy Fingerhut
I just wanted to mention to those interested in the issues raised by this thread that a patch for CLJ-1065 was committed to Clojure master today, and is part of release clojure-1.5.0-alpha5: http://dev.clojure.org/jira/browse/CLJ-1065 All of the set and map constructor functions now explicitly

Re: ANN: a Clojure docs site, and github organization

2012-10-04 Thread Michael Klishin
2012/10/5 Bronsa brobro...@gmail.com Wouldn't it be better for readevalprintlove and clojuredocs to join forces from the beginning? It's not clear what readevalprintlove wants to be. clojuredocs has been discussed for a while by some people who care about Clojure documentation. There are

Re: Regarding Starting Clojure

2012-10-04 Thread Mayank Jain
On Fri, Oct 5, 2012 at 12:58 AM, Michael Fogus mefo...@gmail.com wrote: Here's one approach: Make a github of the code and content that runs the site. People fork and make pull requests. You talked me into it. https://github.com/fogus/www-readevalprintlove-org Awesome! So beautiful! I

Re: ANN: a Clojure docs site, and github organization

2012-10-04 Thread Paul deGrandis
Sorry, I couldn't resist the temptation to remind you of this: http://www.ted.com/talks/derek_sivers_keep_your_goals_to_yourself.html DOh! (and this is one of my favorite TED talks!) Indeed, I didn't mean to state what was going to done before it was done - just that I was happy to see

Re: Regarding Starting Clojure

2012-10-04 Thread nchurch
Thanks guys! (And also to the other announcement.) On Oct 4, 2:07 pm, Mayank Jain firesof...@gmail.com wrote: On Fri, Oct 5, 2012 at 12:58 AM, Michael Fogus mefo...@gmail.com wrote: Here's one approach: Make a github of the code and content that runs the site. People fork and make pull

Re: interleave

2012-10-04 Thread Marc Dzaebel
At the end, the problem is apply (apply + '(1 2 3 4 5 6 7 8 9 10)) is ~60 times slower than (+ 1 2 3 4 5 6 7 8 9 10) -- 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

Re: ANN: a Clojure docs site, and github organization

2012-10-04 Thread Michael Fogus
readevalprintlove looks like a fancy playground so far. You say that as if it's a bad thing. I'm of the opinion that these kinds of efforts should have a low barrier to contribution and be fun. It's difficult to motivate people to perform a thankless task, so it should seem like play as much as

Re: ANN: a Clojure docs site, and github organization

2012-10-04 Thread Michael Fogus
Starting two different projects at the same time with almost the same purpose seems a waste of efforts... Wouldn't it be better for readevalprintlove and clojuredocs to join forces from the beginning? All information should be freely available, so the sharing aspect is present from the start.

Re: ANN: a Clojure docs site, and github organization

2012-10-04 Thread David Nolen
On Thu, Oct 4, 2012 at 7:48 PM, Michael Fogus mefo...@gmail.com wrote: readevalprintlove looks like a fancy playground so far. You say that as if it's a bad thing. I'm of the opinion that these kinds of efforts should have a low barrier to contribution and be fun. It's difficult to

== is not transitive?

2012-10-04 Thread Ben Wolfson
user [(== 0 0.0) (== 0.0 0.0M) (== 0.0M 0)] [true true false] user [(== 0 0.0 0.0M) (== 0 0.0M 0.0) (== 0.0 0 0.0M) (== 0.0 0.0M 0) (== 0.0M 0.0 0) (== 0.0M 0 0.0)] [true false false false true false] -- Ben Wolfson Human kind has used its intelligence to vary the flavour of drinks, which may be

Re: Core.logic performance of looping over a list with tabling

2012-10-04 Thread David Nolen
On Mon, Oct 1, 2012 at 9:13 AM, Reinout Stevens reste...@vub.ac.be wrote: Hi, I quickly changed the code so that the graph structure no longer contains the list of nodes, and the same behaviour still persists. For the actual implementation I have changed it to a function that returns a list

Re: Core.logic performance of looping over a list with tabling

2012-10-04 Thread David Nolen
On Thu, Oct 4, 2012 at 8:46 PM, David Nolen dnolen.li...@gmail.com wrote: On Mon, Oct 1, 2012 at 9:13 AM, Reinout Stevens reste...@vub.ac.bewrote: Hi, I quickly changed the code so that the graph structure no longer contains the list of nodes, and the same behaviour still persists. For the

Re: ANN: a Clojure docs site, and github organization

2012-10-04 Thread Grant Rettke
On Thu, Oct 4, 2012 at 6:48 PM, Michael Fogus mefo...@gmail.com wrote: readevalprintlove looks like a fancy playground so far. You say that as if it's a bad thing. I'm of the opinion that these kinds of efforts should have a low barrier to contribution and be fun. It's difficult to motivate

Does anybody hate xml property lists?

2012-10-04 Thread JvJ
I recently began work on a cross-platform game in cocos2d-x with a friend. I am working on windows in visual studio and he is working on mac in xcode. As you can imagine, it's a problem. One of the problems is that xcode uses the xml property list (plist) format to store a lot of data, and

Re: == is not transitive?

2012-10-04 Thread JvJ
The only reason for this that I can think of is incomplete rules for casting numbers. On Thursday, 4 October 2012 20:39:05 UTC-4, Ben wrote: user [(== 0 0.0) (== 0.0 0.0M) (== 0.0M 0)] [true true false] user [(== 0 0.0 0.0M) (== 0 0.0M 0.0) (== 0.0 0 0.0M) (== 0.0 0.0M 0) (== 0.0M 0.0 0)

ANN: core.logic Go solver

2012-10-04 Thread nchurch
Here's a Go solver code: https://github.com/nchurch/go/blob/master/src/go/core.clj README: https://github.com/nchurch/go It's a really fun use of core.logic: you can test for pieces being alive or dead; you can also generate all the boards that make a given piece alive or dead. See the

mapv-in or map-in?

2012-10-04 Thread nchurch
I ended up needing the following utility, modified from the Clojure source: (defn mapv-in maps f over a nested vector structure ([f coll] (let [f #(if (coll? %)(mapv-in f %)(f %))] (- (reduce (fn [v o] (conj! v (f o))) (transient []) coll) persistent! I wrote just as