Re: immutable quad tree

2011-04-20 Thread pepijn (aka fliebel)
I made on here, but removed it later, not sure if it's any good: https://github.com/pepijndevos/Begame/blob/d1bf8d687cda0a318cbce5f5ddac57b103c43d98/src/ant_mine/quadtree.clj On Apr 19, 8:09 pm, Timothy Pratley timothyprat...@gmail.com wrote: How would I represent a quad tree (or any spatial

Re: Future of clojure.contrib.core/-? macro

2011-04-20 Thread Ivan Koblik
Hello Konrad, Git workflow is a little bit different. You don't really need commit rights to contribute. I found a rather nice explanation of Git workflow here: http://www.eqqon.com/index.php/Collaborative_Github_Workflow Hope it helps. Cheers, Ivan. On 19 April 2011 16:40, Konrad Hinsen

Re: Clojure performance optimization

2011-04-20 Thread Michael Golovanov
Hi, Alan Thanx for your answer. I run Java and Clojure code in web IDE (two different online services) on the same input data sets. Java 0,07sec, Clojure 0,87 per execution. I know that is not correct method for performance measure and may be Clojure execution time include compile time. Do you

Re: Future of clojure.contrib.core/-? macro

2011-04-20 Thread Stuart Halloway
There are several new top-level projects at https://github.com/clojure to cover the various contrib libraries people have asked for. Mapping to old contrib names is shown at http://dev.clojure.org/display/design/Contrib+Library+Names. Stu -- You received this message because you are

Re: Clojure group in DFW area

2011-04-20 Thread Alex Robbins
Yeah, I'd be up for meeting sometime. However, right now I don't have a car available during the day. I work from home and my wife works outside the house, so we have been able to run on one car. It saves money, but makes lunch meetings difficult. If you don't mind driving up my way, Lone Star

Re: newbie question

2011-04-20 Thread lesni bleble
thanks all, now it's clear to me. On Apr 19, 10:39 pm, Mark Nutter manutte...@gmail.com wrote: Hmm, in your example you say you're code looks like (println hello) but in your description you say ((println hello)) Don't know if that's a just a typo or not, but if you actually did type in

Re: Clojure performance optimization

2011-04-20 Thread Peteris
The task seems to be a Google Code Jam problem (which must satisfy strict time requirements). I think Michael feels concerned that Clojure programs in general would run ten times slower than equivalent Java programs. -- Peteris Erins -- You received this message because you are subscribed to

Getting the all the key values from hashmaps inside a vector

2011-04-20 Thread Dave
Wracking my brain this afternoon trying to figure this one out. I'm fairly new to Clojure and Lisp in general. I have a data structure that is a vector of maps and I want to get all the values for a particular key out of all of the maps into another vector. For example, let's say this is the

Re: Getting the all the key values from hashmaps inside a vector

2011-04-20 Thread Baishampayan Ghose
On Wed, Apr 20, 2011 at 4:24 AM, Dave kincaid.d...@gmail.com wrote: The only way I could think of to do it is (for [i (range (count(myvec)))] ((nth myvec i) key1)) Is there an easier way? It seems like there must be. There is! (in fact there could be many ways) (vec (map #(% key1) myvec))

Re: Future of clojure.contrib.core/-? macro

2011-04-20 Thread Chas Emerick
I'll bring over c.c.strint. - Chas On Apr 20, 2011, at 7:58 AM, Stuart Halloway wrote: There are several new top-level projects at https://github.com/clojure to cover the various contrib libraries people have asked for. Mapping to old contrib names is shown at

Re: Who's using Clojure?

2011-04-20 Thread Justin Balthrop
We're using Clojure for our graph and search services at http://geni.com -- 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: Getting the all the key values from hashmaps inside a vector

2011-04-20 Thread Ulises
If your keys were keywords, e.g. :key1, you could simply map them as they are also functions: (map :key1 ({:key1 value1} ...) U -- 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

Re: Clojure performance optimization

2011-04-20 Thread Michael Golovanov
Hi, Peter Yes, you are right. This is a synthetic test task from service like Google Code Jam which must satisfy strict time requrements. And i am trying to learn Clojure by this way. I see Clojure vs Java performance tests. Clojure is fast and have many features that simplify developing

Re: Clojure performance optimization

2011-04-20 Thread Aaron Cohen
On Wed, Apr 20, 2011 at 11:21 AM, Michael Golovanov mike.golova...@gmail.com wrote: My question is how to find performance bottlenecks in Clojure applications. Second question is about my code. Where are the problem? May be this is 1. Incorrect execution time measuring procedure 2. Bad

Re: Clojure performance optimization

2011-04-20 Thread Laurent PETIT
Hello, Try with this, which is closer to the java version: ; in a file scan/core.clj (ns scan.core (:import java.util.Scanner) (:gen-class)) (defn -main [] (let [sc (Scanner. System/in)] (loop [num (int (.nextInt sc))] (when-not (= 42 num) (println num) (recur

Re: Clojure performance optimization

2011-04-20 Thread Laurent PETIT
You might be interested in micro-code-revue (not arguing about the design, but simpler details) as well: (apply f [x]) can be replaced by (f x) (not= x nil) can be (almost) replaced by x if you know x cannot be the value 'false' (sufficient in your case) (. scanner nextInt) is a somewhat

Re: Who's using Clojure?

2011-04-20 Thread fyuryu
Citigroup is using Clojure. In serious projects, not as perl replacement on some developer's machine. I'm not at liberty to share more details. -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to

Re: Shebang support for cljr

2011-04-20 Thread David Jacobs
What's the status on this? One of the reasons I don't use Clojure everyday, much as I like it, is that I want it to integrate seamlessly with Unix for scripting. David -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email

Re: Shebang support for cljr

2011-04-20 Thread Mike Meyer
On Wed, 20 Apr 2011 10:16:05 -0700 (PDT) David Jacobs develo...@allthingsprogress.com wrote: What's the status on this? One of the reasons I don't use Clojure everyday, much as I like it, is that I want it to integrate seamlessly with Unix for scripting. Um, I've been using it with shebang

Re: Shebang support for cljr

2011-04-20 Thread Ambrose Bonnaire-Sergeant
Hi David, Jark can do this http://icylisper.in/jark/scripting.html http://icylisper.in/jark/scripting.html(Jark also uses cljr under the hood coincidentally) Ambrose On Thu, Apr 21, 2011 at 1:16 AM, David Jacobs develo...@allthingsprogress.com wrote: What's the status on this? One of the

Re: Shebang support for cljr

2011-04-20 Thread Ambrose Bonnaire-Sergeant
On Thu, Apr 21, 2011 at 1:28 AM, Mike Meyer m...@mired.org wrote: On Wed, 20 Apr 2011 10:16:05 -0700 (PDT) David Jacobs develo...@allthingsprogress.com wrote: What's the status on this? One of the reasons I don't use Clojure everyday, much as I like it, is that I want it to integrate

Re: Shebang support for cljr

2011-04-20 Thread David Jacobs
Thanks, Jark looks awesome for this. Things like this should be more discoverable. I googled shebang clojure for 10 minutes before posting here and didn't come up with anything. On Wed, Apr 20, 2011 at 1:30 PM, Ambrose Bonnaire-Sergeant abonnaireserge...@gmail.com wrote: On Thu, Apr 21, 2011 at

Re: Shebang support for cljr

2011-04-20 Thread Mike Meyer
On Thu, 21 Apr 2011 01:30:25 +0800 Ambrose Bonnaire-Sergeant abonnaireserge...@gmail.com wrote: On Thu, Apr 21, 2011 at 1:28 AM, Mike Meyer m...@mired.org wrote: Performance pretty much sucks - starting the jvm is just slow. You can solve that with nailgun (or something similar), which will

Re: Clojure performance optimization

2011-04-20 Thread Michael Golovanov
Ok. Problem solved. Online service that i am using show sum of compile and execution time. Simple empty function definition without any calls show 0,8 sec time consuption. Therefore Clojure code is fast as Java. I am appreciate for your help and coding tips. Thank yoy -- You received this

Re: Shebang support for cljr

2011-04-20 Thread Ben Mabey
Thanks for sharing Jark, I hadn't seen it. Cake[1] also has this functionality so you can use the following shebang line: |#!/usr/bin/env cake | Like Jark, Cake manages the persistent JVMs for you. I don't know enough about either project to know what the key differences between the two

Re: Shebang support for cljr

2011-04-20 Thread Jeffrey Schwab
On Wednesday, April 20, 2011 1:28:38 PM UTC-4, Mike Meyer wrote: On Wed, 20 Apr 2011 10:16:05 -0700 (PDT) David Jacobs deve...@allthingsprogress.com wrote: What's the status on this? One of the reasons I don't use Clojure everyday, much as I like it, is that I want it to integrate

Re: Shebang support for cljr

2011-04-20 Thread David Jacobs
You also have to remember that relative paths (including file names passed to your script) will be interpreted relative to the Nailgun server, not the user's working directory. That sounds like a major bug that can (and should) easily be corrected. -- You received this message because you

Re: immutable quad tree

2011-04-20 Thread Timothy Pratley
Thanks :) On Wed, Apr 20, 2011 at 1:32 AM, pepijn (aka fliebel) pepijnde...@gmail.com wrote: I made on here, but removed it later, not sure if it's any good: https://github.com/pepijndevos/Begame/blob/d1bf8d687cda0a318cbce5f5ddac57b103c43d98/src/ant_mine/quadtree.clj On Apr 19, 8:09 pm,

Re: Shebang support for cljr

2011-04-20 Thread Jeffrey Schwab
How would you correct it in thread-safe manner? AFAIK, the JVM's notion of current working directory is a single, global value. There are other subtle issues, as well, e.g., anybody who can connect to your nailgun server can cause arbitrary code to be executed in your name. One of the more

Re: Clojure performance optimization

2011-04-20 Thread Andy Fingerhut
There is a significant time required to run Hello, world on a JVM, significantly more so than the corresponding C program on the same machine, due to all kinds of initialization to start up the JVM, even if the compile time is negligible. There is additional initialization time when you start

ANN: SoyMacchiato - JDK7 for OS X

2011-04-20 Thread Paul deGrandis
Hi All, I've been doing some experimentation with Clojure on various setups of Java/JDK 1.7, including the DaVinci Machine enhancements. In the process I distilled the build process to a few scripts and pre- compiled some binaries for others. To download the binaries or compile a custom JVM

Re: Shebang support for cljr

2011-04-20 Thread icylisper
Yup - it uses nailgun (though apparently nrepl is also available). Seems like it improves nailgun for clojure users, but hides features that would be useful if you're using other JVM-based languages with it - which is why it requires the double-script dance even though nailgun doesn't.