Re: Google App Engine - best workflow
Thanks for your suggestions! I think decompiling and altering the class is probably a little bit beyond my skill level. At first I tried to start a swank server from my servlet, but that failed because GAE doesn't allow you to open sockets. By decompiling and disabling that, I could probably work around it, but that sounds like it could be quite difficult and I wouldn't actually know where to start :-) I think I'll go with David's suggestion for now. Since GAE (or at least the dev server) is based on Jetty as well, that should work out pretty well. On May 14, 4:21 am, Victor Rodriguez vict...@gmail.com wrote: On Wed, May 13, 2009 at 5:35 PM, Kees-Jochem Wehrmeijer henc...@gmail.com wrote: Hi everybody, I started playing with Clojure on Google App Engine. By following the experiences of others (http://elhumidor.blogspot.com/2009/04/clojure- on-google-appengine.html andhttp://www.fatvat.co.uk/2009/05/clojure-on-google-app-engine.html mostly) I was able to get something running quite quickly. However, something that annoys me is that I have to recompile every time I make a change. I'm still learning Clojure (and Emacs) but I'd already gotten quite used to using the REPL. So I was wondering if anybody else already had some experience with using Clojure on GAE and what your workflow looks like. If you feel like it, you can try to decompile the class that installs the security manager in Google's SDK and change it so that you start a REPL from the development server. I have got as far as starting the REPL, but I have yet to find the time to use this setup, so there might be other showstoppers. Cheers, Victor Rodriguez. cheers, Kees --~--~-~--~~~---~--~~ 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 To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~--~~~~--~~--~--~---
Re: Concerns About Pushing Clojure 1.0.0 to Maven Central Repo?
thank you for your clarifaction! I'll prepare the bundle then. -Stefan Rich Hickey richhic...@gmail.com writes: On Tue, May 12, 2009 at 5:36 PM, Laurent PETIT laurent.pe...@gmail.com wrote: Hello, It seems that it's really a matter of convention, I don't see any technical problem of having a groupId of org.clojure and an artifactId of clojure. Please let me try to summarize this never ending discussion: Currently the master build script is ant's build.xml. It generates clojure.jar (*) Currently the maven pom.xml defines a groupId : org.clojure an artifactId : clojure-lang * The groupId is ok since the website site of clojure is indeed clojure.org * The artifactId is ko since it implies the creation of jars such as clojure-lang.jar (*) Changing one or the other is just a matter of a one liner (or so) patch to make both compliant and save lots of brain overhead for all newcomers (and also members of the list if the newcomers come and ask the same question again and again). Rich, please have the final word: * is it ok to live with different jar names No, I don't see why they should be different. * if no, do we change pom.xml to name the artifactId clojure instead of clojure-lang, or do we change the build.xml to generate clojure-lang.jar instead of clojure.jar Clojure is called Clojure, not clojure-lang. I'd like to the jar to be called clojure. I don't want to change build.xml. Rich 2009/5/12 Howard Lewis Ship hls...@gmail.com It's the answer to why the main artifact is called clojure-lang not just clojure. It's do differentiate Rich's framework, clojure-lang, from the Contrib librarys (clojure-contrib) even though they are both in the same Maven group. On Sun, May 10, 2009 at 8:36 AM, Phil Hagelberg p...@hagelb.org wrote: Howard Lewis Ship hls...@gmail.com writes: clojure-lang because there will be a clojure-contrib artifact for the same group. And this is ... a bad thing? I'm lost. -Phil -- Howard M. Lewis Ship Creator of Apache Tapestry Director of Open Source Technology at Formos --~--~-~--~~~---~--~~ 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 To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~--~~~~--~~--~--~---
completion with slime
Hi all, Been discovering clojure, and I have a working slime up and running, which is great. One thing I have not managed to get working is the completion. Actually, I have just discovered the problem, so I think I will share it for anyone else this problem. I have this set: (setq slime-complete-symbol-function 'slime-fuzzy-complete-symbol) which is the cause of the problem. Doing this, has solved the problem: (setq slime-complete-symbol-function 'slime-simple-complete-symbol) I have a feeling that using the slime-fancy module might set this automatically. I have glanced through the swank-clojure code but cannot find where the defslimefn handling this is. When I have a closer look, and have some vague idea of what I am doing in clojure, I would love to implement this, as it is really handy. Any hits would be appreciated. ;) Thanks for clojure, really enjoying it so far, and thanks for the slime integration. Rohan --~--~-~--~~~---~--~~ 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 To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~--~~~~--~~--~--~---
new Clojure presentation
I gave a talk on Clojure at the St. Louis Java User Group last night. You can find a description of the talk and the slides at http://java.ociweb.com/javasig/knowledgebase/2009-05/index.html. See the link at the bottom of the page. Feedback is welcomed! -- R. Mark Volkmann Object Computing, Inc. --~--~-~--~~~---~--~~ 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 To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~--~~~~--~~--~--~---
Re: Google App Engine - best workflow
On Fri, May 15, 2009 at 6:02 AM, Kees-Jochem Wehrmeijer henc...@gmail.com wrote: beyond my skill level. At first I tried to start a swank server from my servlet, but that failed because GAE doesn't allow you to open sockets. By decompiling and disabling that, I could probably work This still wouldn't give you a REPL running in the dev server, but for messing around with datastore stuff interactively you can call appengine-clj.test-utils/ds-setup [1] from a REPL which will create an in-memory datastore. I've used this with vimclojure with some success. (Occasionally it will tell me I don't have an app registered for the current thread, and I have to call ds-setup again. I assume this has to do with something multi-threaded happening in the nailgun server vimclojure uses, but I haven't delved into it.) -hume. [1] http://github.com/duelinmarkers/appengine-clj/blob/master/src/appengine_clj/test_utils.clj#L9 -- http://elhumidor.blogspot.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 To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~--~~~~--~~--~--~---
Enclojure problem
Hi everyone, Trying to set up a new project using enclojure. I created the new project, then put a new .clj file in Project Sources. In that file, I typed: (defn main [] (print hi)) ...which works in a REPL. But when I try to build the project, I get a big old stack trace (http://paste.lisp.org/display/80295 if you're interested). Suggestions? --~--~-~--~~~---~--~~ 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 To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~--~~~~--~~--~--~---
Speed up network transfers?
Hi there, I'm working on a project that involves transferring large files over the network (100+MB) and wondering what would work better. I'm newer to Java than I am to lisp, so I've just grabbed the most obvious things from the API that I thought could possibly work: (ns misc-ports (:import (java.io BufferedReader InputStreamReader BufferedOutputStream PrintWriter FileInputStream BufferedOutputStream FileOutputStream) (java.net Socket ServerSocket))) (defn net-to-file Listen on a port, when accepted dump data to named incoming file. [port filename] (with-open [sock (.accept (ServerSocket. port)) ins (BufferedReader. (InputStreamReader. (.getInputStream sock))) outf (FileOutputStream. filename)] (loop [c (.read ins)] (when-not (== -1 c) (.write outf c) (recur (.read ins)) (defn file-to-net Take the name of a file and a waiting ip and port, send named file on socket. [filename ipaddr port] (with-open [sock (Socket. ipaddr port) outs (BufferedOutputStream. (.getOutputStream sock)) ins (FileInputStream. filename)] (loop [c (.read ins)] (when-not (== -1 c) (.write outs c) (recur (.read ins)) But it turns out that this is rather slow. What would be some methods to speed this up? Thanks! -- Chris --~--~-~--~~~---~--~~ 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 To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~--~~~~--~~--~--~---
Re: Speed up network transfers?
It looks like you're reading one byte at a time. Why not create a buffer and read up to 1024 bytes at a time? (defn write-file [ins outs] (let [buffer (make-array Byte/TYPE 1024)] (loop [len (.read ins buffer)] (if (not (neg? len)) (do (.write outs buffer 0 len) (recur (.read ins buffer) (if ins (.close ins)) (if outs (.close outs On Fri, May 15, 2009 at 11:10 AM, Christopher Wilson christopher.j.wil...@gmail.com wrote: Hi there, I'm working on a project that involves transferring large files over the network (100+MB) and wondering what would work better. I'm newer to Java than I am to lisp, so I've just grabbed the most obvious things from the API that I thought could possibly work: (ns misc-ports (:import (java.io BufferedReader InputStreamReader BufferedOutputStream PrintWriter FileInputStream BufferedOutputStream FileOutputStream) (java.net Socket ServerSocket))) (defn net-to-file Listen on a port, when accepted dump data to named incoming file. [port filename] (with-open [sock (.accept (ServerSocket. port)) ins (BufferedReader. (InputStreamReader. (.getInputStream sock))) outf (FileOutputStream. filename)] (loop [c (.read ins)] (when-not (== -1 c) (.write outf c) (recur (.read ins)) (defn file-to-net Take the name of a file and a waiting ip and port, send named file on socket. [filename ipaddr port] (with-open [sock (Socket. ipaddr port) outs (BufferedOutputStream. (.getOutputStream sock)) ins (FileInputStream. filename)] (loop [c (.read ins)] (when-not (== -1 c) (.write outs c) (recur (.read ins)) But it turns out that this is rather slow. What would be some methods to speed this up? Thanks! -- Chris --~--~-~--~~~---~--~~ 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 To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~--~~~~--~~--~--~---
Re: Speed up network transfers?
On May 15, 2009, at 11:10 AM, Christopher Wilson wrote: But it turns out that this is rather slow. What would be some methods to speed this up? Consider using the new I/O API's in java.nio.* From http://java.sun.com/j2se/1.5.0/docs/guide/nio : The new I/O (NIO) APIs introduced in v 1.4 provide new features and improved performance in the areas of buffer management, scalable network and file I/O, character-set support, and regular-expression matching. The NIO APIs supplement the I/O facilities in the java.io package. --Steve smime.p7s Description: S/MIME cryptographic signature
Re: Speed up network transfers?
But it turns out that this is rather slow. What would be some methods to speed this up? You could also wrap your input and output stream's with java.util.zip.GZIPInputStream and GZIPOutputStream to compress/decompress the data either side. They allow you to specify buffer sizes, so you could experiment to find optimum buffer sizes. Check out the java.util.zip package in the javadocs. Rgds, Adrian. On Fri, May 15, 2009 at 5:10 PM, Christopher Wilson christopher.j.wil...@gmail.com wrote: Hi there, I'm working on a project that involves transferring large files over the network (100+MB) and wondering what would work better. I'm newer to Java than I am to lisp, so I've just grabbed the most obvious things from the API that I thought could possibly work: (ns misc-ports (:import (java.io BufferedReader InputStreamReader BufferedOutputStream PrintWriter FileInputStream BufferedOutputStream FileOutputStream) (java.net Socket ServerSocket))) (defn net-to-file Listen on a port, when accepted dump data to named incoming file. [port filename] (with-open [sock (.accept (ServerSocket. port)) ins (BufferedReader. (InputStreamReader. (.getInputStream sock))) outf (FileOutputStream. filename)] (loop [c (.read ins)] (when-not (== -1 c) (.write outf c) (recur (.read ins)) (defn file-to-net Take the name of a file and a waiting ip and port, send named file on socket. [filename ipaddr port] (with-open [sock (Socket. ipaddr port) outs (BufferedOutputStream. (.getOutputStream sock)) ins (FileInputStream. filename)] (loop [c (.read ins)] (when-not (== -1 c) (.write outs c) (recur (.read ins)) But it turns out that this is rather slow. What would be some methods to speed this up? Thanks! -- Chris --~--~-~--~~~---~--~~ 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 To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~--~~~~--~~--~--~---
Re: Feedback on new persistentmatrix datatype
On Sat, May 9, 2009 at 7:09 PM, aperotte apero...@gmail.com wrote: It shouldn't be a problem to maintain immutability and also perform a cross/cartesian product. I'm not sure I understand the problem. It was a pretty bad example... what I meant was, in scientific computing, people often have to take a deep breath and mutate because of speed or memory limitations. It would be nice to be able to 'unlock' the immutability somehow if you really need to. Anand --~--~-~--~~~---~--~~ 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 To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~--~~~~--~~--~--~---
Re: new Clojure presentation
I thumbed through the slideshow. I'm going to keep a copy on hand as it's a very nice reference for things I tend to look up. The collection summary was especially helpful. I didn't know about efficiency considerations regarding inserting items into lists and vectors, and I'll be making use of that in the future. Thanks, Travis On May 15, 9:17 am, Mark Volkmann r.mark.volkm...@gmail.com wrote: I gave a talk on Clojure at the St. Louis Java User Group last night. You can find a description of the talk and the slides athttp://java.ociweb.com/javasig/knowledgebase/2009-05/index.html. See the link at the bottom of the page. Feedback is welcomed! -- R. Mark Volkmann Object Computing, Inc. --~--~-~--~~~---~--~~ 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 To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~--~~~~--~~--~--~---
Re: new Clojure presentation
A born Teacher! Emeka --~--~-~--~~~---~--~~ 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 To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~--~~~~--~~--~--~---
Re: 3D Grapher in Clojure
Nice! I had to learn a bit about jogl to get it to work - had to add - Djava.library.path={path to my jogl lib directory} to my shell script. The following is in model.clj: (defn update [ref val] (when (not (= @ref val)) (dosync (ref-set ref val I believe this is not right: the deref of ref should be inside the dosync. Although this may not matter for your application, this same pattern applied elsewhere could be trouble, since there's no guarantee that ref won't change between the deref and the dosync. Also, since ref is a core function, it's less confusing to give it another name, and you need to rename if you ever want to use the core ref function inside your function. --~--~-~--~~~---~--~~ 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 To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~--~~~~--~~--~--~---
list vs vector
What are the use case scenarios where one is preferable to the other in clojure ? It looks to me like vectors almost completely overtake lists for all purposes. --~--~-~--~~~---~--~~ 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 To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~--~~~~--~~--~--~---
Re: list vs vector
I'm no expert, but I think this explain some: Clojure's conj function is like Lisp's cons, but does the right thing, depending on the data type. It is fast to add something to the front of the list, and slower to add something to the end. Vectors are the opposite, you can add to the end fast, slower to add to the front. This isn't specific to Clojure, it's just the way those data structures work in any language. So conj adds the item to the front if it is conjing on a list, to the end if is conjing on a vector. This is part of how clojure provides a unified method of handling different type of data structures, which are collectively called sequences in Clojure. Excerpted from here: http://groups.google.com/group/novalanguages/browse_thread/thread/bcb78a59382227e0 It's also worth noting that lists are the canonical datatype in Lisp, so they're probably kept around for that reason as well. Travis Clojure's conj function is like Lisp's cons, but does the right thing, depending on the data type. It is fast to add something to the front of the list, and slower to add something to the end. Vectors are the opposite, you can add to the end fast, slower to add to the front. This isn't specific to Clojure, it's just the way those data structures work in any language. So conj adds the item to the front if it is conjing on a list, to the end if is conjing on a vector. This is part of how clojure provides a unified method of handling different type of data structures, which are collectively called sequences in Clojure. On May 15, 3:36 pm, Vagif Verdi vagif.ve...@gmail.com wrote: What are the use case scenarios where one is preferable to the other in clojure ? It looks to me like vectors almost completely overtake lists for all purposes. --~--~-~--~~~---~--~~ 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 To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~--~~~~--~~--~--~---
Re: list vs vector
And here are some numbers from my machine: (def my-list (list 'a 'b 'c 'd 'e 'f 'g 'h 'i 'j)) (def my-vector ['a 'b 'c 'd 'e 'f 'g 'h 'i 'j]) ; ~44ms (time (dotimes [x 100] (conj my-list 'k))) ; ~26ms (time (dotimes [x 100] (pop my-list))) ; ~100ms (time (dotimes [x 100] (conj my-vector 'k))) ; ~100ms (time (dotimes [x 100] (pop my-vector))) Clojure makes it very easy to see what's going on, the REPL is your friend ;) On Fri, May 15, 2009 at 4:07 PM, tmountain tinymount...@gmail.com wrote: I'm no expert, but I think this explain some: Clojure's conj function is like Lisp's cons, but does the right thing, depending on the data type. It is fast to add something to the front of the list, and slower to add something to the end. Vectors are the opposite, you can add to the end fast, slower to add to the front. This isn't specific to Clojure, it's just the way those data structures work in any language. So conj adds the item to the front if it is conjing on a list, to the end if is conjing on a vector. This is part of how clojure provides a unified method of handling different type of data structures, which are collectively called sequences in Clojure. Excerpted from here: http://groups.google.com/group/novalanguages/browse_thread/thread/bcb78a59382227e0 It's also worth noting that lists are the canonical datatype in Lisp, so they're probably kept around for that reason as well. Travis Clojure's conj function is like Lisp's cons, but does the right thing, depending on the data type. It is fast to add something to the front of the list, and slower to add something to the end. Vectors are the opposite, you can add to the end fast, slower to add to the front. This isn't specific to Clojure, it's just the way those data structures work in any language. So conj adds the item to the front if it is conjing on a list, to the end if is conjing on a vector. This is part of how clojure provides a unified method of handling different type of data structures, which are collectively called sequences in Clojure. On May 15, 3:36 pm, Vagif Verdi vagif.ve...@gmail.com wrote: What are the use case scenarios where one is preferable to the other in clojure ? It looks to me like vectors almost completely overtake lists for all purposes. --~--~-~--~~~---~--~~ 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 To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~--~~~~--~~--~--~---
Re: list vs vector
On May 15, 2009, at 3:36 PM, Vagif Verdi wrote: It looks to me like vectors almost completely overtake lists for all purposes. I think that's a fair statement. Lists are still: - key as the data structure that represents a call (to a function, macro, or special form) - useful for cases where you want to add/remove something to/from the beginning of a collection efficiently - more efficient than vectors (to a degree that may or may not matter) for use as a stack via conj and pop [1] Regarding quoted lists, Rich had this to say [2]: Or better yet, just use a vector, please. It's more idiomatic Clojure (doseq [word [one two three]] (println word)) Quoted lists are an ugly part of Lisps that can be avoided in Clojure. I don't see a lot of use for them other than in macros and other code-producing code. Another nice benefit of Clojure's efficient vectors over lists is that functions that produce a collection of results can produce and store them in order without needing to reverse the result just before returning. Reversing is a common operation in some other Lisps and a rare one in Clojure. --Steve [1] From David's reply in this thread. [2] http://groups.google.com/group/clojure/msg/1fb853de29dc1bd7 smime.p7s Description: S/MIME cryptographic signature
Re: Google App Engine - best workflow
I'm not a java security manager expert, but I've been playing with this a bit. Could you not do it the other way round? Start a REPL and run the server in the REPL, instead of starting a server and trying to run a REPL in the server? I got as far as setting up the classpath and doing: (com.google.appengine.tools.development.DevAppServerMain/main (into-array [war])) But of course I get an exception when it tries to install its security manager. Is it possible to create a java policy file that would allow it to succeed? Paul On Wed, May 13, 2009 at 11:21 PM, Victor Rodriguez vict...@gmail.comwrote: On Wed, May 13, 2009 at 5:35 PM, Kees-Jochem Wehrmeijer henc...@gmail.com wrote: Hi everybody, I started playing with Clojure on Google App Engine. By following the experiences of others (http://elhumidor.blogspot.com/2009/04/clojure- on-google-appengine.html and http://www.fatvat.co.uk/2009/05/clojure-on-google-app-engine.html mostly) I was able to get something running quite quickly. However, something that annoys me is that I have to recompile every time I make a change. I'm still learning Clojure (and Emacs) but I'd already gotten quite used to using the REPL. So I was wondering if anybody else already had some experience with using Clojure on GAE and what your workflow looks like. If you feel like it, you can try to decompile the class that installs the security manager in Google's SDK and change it so that you start a REPL from the development server. I have got as far as starting the REPL, but I have yet to find the time to use this setup, so there might be other showstoppers. Cheers, Victor Rodriguez. cheers, Kees --~--~-~--~~~---~--~~ 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 To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~--~~~~--~~--~--~---
Re: OutOfMemoryError with clojure.contrib.sql and large result sets
On May 14, 2009, at 7:54 PM, Stephen C. Gilardi wrote: On May 14, 2009, at 7:13 PM, Ian Eure wrote: I'm trying to process mid/large result sets with Clojure, and not having any success. (ns foo (:require [clojure.contrib.sql :as sql])) (def *db* {:classname com.mysql.jdbc.Driver :subprotocol mysql :subname //DSN :user read :password swordfish}) (sql/with-connection *db* (sql/with-query-results rs [SELECT * FROM Foo;] (prn Done))) When I run this at the REPL, it dies with: java.lang.OutOfMemoryError: Java heap space (NO_SOURCE_FILE:0) I would expect the code above to use minimal memory, at most a tiny fraction of what it would take to cache all the results. I tried a similar experiment with Derby (based on the code in clojure.contrib.sql.test). I used visualvm to profile the memory usage of the read and in my experiment, the results fit the expectation. I recommend you take a look at your setup using visualvm or yourkit or the like. You'll be able to get more visibility into what kinds of objects are taking up so much memory in your case. I'm not having any luck at all. I tried visualvm, but it seems that it doesn't support memory profiling unless you're running JDK 6. I switched my default version (I'm on OS X here), and visualvm refuses to start: 2009-05-15 14:03:15.495 java[41205:10b] Apple AWT Startup Exception : *** -[NSCFArray insertObject:atIndex:]: attempt to insert nil 2009-05-15 14:03:15.496 java[41205:10b] Apple AWT Restarting Native Event Thread I'm a Clojure newb, and I know even less about Java. What now, run it on Debian? - Ian --~--~-~--~~~---~--~~ 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 To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~--~~~~--~~--~--~---
Re: OutOfMemoryError with clojure.contrib.sql and large result sets
On May 15, 2009, at 6:14 PM, Ian Eure wrote: I'm not having any luck at all. I tried visualvm, but it seems that it doesn't support memory profiling unless you're running JDK 6. I switched my default version (I'm on OS X here), and visualvm refuses to start: 2009-05-15 14:03:15.495 java[41205:10b] Apple AWT Startup Exception : *** -[NSCFArray insertObject:atIndex:]: attempt to insert nil 2009-05-15 14:03:15.496 java[41205:10b] Apple AWT Restarting Native Event Thread I'm a Clojure newb, and I know even less about Java. What now, run it on Debian? I'm running Leopard (10.5.7) with Java 6. I set my default Java to Java SE 6 64-bit for both Applications and Applets using /Applications/Utilities/Java/Java Preferences. Is this the Java version you have: % java -version java version 1.6.0_07 Java(TM) SE Runtime Environment (build 1.6.0_07-b06-153) Java HotSpot(TM) 64-Bit Server VM (build 1.6.0_07-b06-57, mixed mode) I got my visualvm from https://visualvm.dev.java.net/download.html Version 1.1.1. I just launched it again here and it worked. I also took a look at this issue with YourKit today. They have a free 15-day evaluation license available. http://www.yourkit.com/download/ --Steve smime.p7s Description: S/MIME cryptographic signature
Classpath problem with r1369 ?
I've been using clojure for a while at this point, and the approach I've settled on launches clojure using -cp clojure.jar, and then my user.clj file contains code that loads a bunch of thing into my classpath. After updating to r1369, which made some changes to classloaders that I don't claim to understand, this approach does not seem to work anymore, and even from a simple repl I'm not able to use add-classpath to any noticeable effect. Is this a bug, or is there some other way to use add-classpath in order to achieve the result I want ? Thanks! --~--~-~--~~~---~--~~ 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 To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~--~~~~--~~--~--~---
Re: new Clojure presentation
the link at the bottom of the page. Feedback is welcomed! Really excellent Mark! --~--~-~--~~~---~--~~ 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 To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~--~~~~--~~--~--~---