Re: Clojure CDT up, cont, down, local-names throws arity errors after hitting breakpoint
I know. The church of emacs is becoming more compelling each day. As a convert from Vim, I have some baggage. I hope that won't be an issue. On Sat, Feb 11, 2012 at 10:50 AM, George Jahad cloj...@blackbirdsystems.net wrote: SeanC is referring to is the fact that swank-cdt now works seamlessly with clojure-jack-in, thanks to the efforts @tavisrudd and the indefatigable technomancy. On Feb 9, 9:18 am, Sean Corfield seancorfi...@gmail.com wrote: On Wed, Feb 8, 2012 at 10:16 PM, George Jahad cloj...@blackbirdsystems.net wrote: If you use Emacs and Swank-clojure, it is much easier to use swank-cdt, as your UI: http://georgejahad.com/clojure/swank-cdt.html I just want to chime in and say swank-clojure 1.4.0 has made this process so much simpler and it really is a pleasure to work with! I had a nasty bug in my code the other day and was able to track it down and fix in only about an hour and a half using CDT this way - I dread to think how long it would have taken with a less integrated tool chain setup... -- Sean A Corfield -- (904) 302-SEAN An Architect's View --http://corfield.org/ World Singles, LLC. --http://worldsingles.com/ Perfection is the enemy of the good. -- Gustave Flaubert, French realist novelist (1821-1880) -- 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 with your first post. 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 -- 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 with your first post. 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: clojure-opennlp
On Feb 11, 2012, at 7:20 AM, Jim foo.bar wrote: HI everyone, I was just wondering whether anyone has used the clojure-opennlp wrapper for multi-word named entity recognition (NER)? I am using it to train a drug finder from my private corpus and even though i get correct behavior when using the command line tool of apache openNLP when trying to use the API i only get single-words entities recognised!!! I've opened up a thread in the official mailing list because initially i thought there was a genuine problem with openNLP but since the command line tool does exactly what i want i'm starting to think that it might not be openNLP's fault but either in my code or in the clojure wrapper... I've followed both the official tutorials and the wrapper documentation and thus i am doing everything as instructed... I know the name finder expects tokenized sentences and i am indeed passing tokenized sentences like this: (defn find-names-model [text] (map #(drug-find (tokenize %)) (get-sentences text))) It is very strange because i am getting back Folic but not Folic acid regardless of using the exact same model i used with the command line tool... Any help will be greatly appreciated... Regards, Jim I have inquired on the OpenNLP mailing list about a way to train a tokenizer not to automatically split on spaces, if I hear back a way to do it I will add it to clojure-opennlp. - Lee -- 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 with your first post. 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
.class files constantly going stale?
I've noticed that when writing clojure code I constantly need to 'rm -rf classes' in my project, otherwise anything related to (defrecord) or (defprotocol) doesn't update. I've tried this on OSX Lion running both JDK 1.6 and 1.7. This isn't too hard to deal with in lein as I just run rm -rf classes lein run, but it makes slime/swank nearly unusable. Any ideas? -- 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 with your first post. 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: Hierarchical logs
I'm not sure I'm getting your data example (seems like there are some characters missing or out of place) but this might be what you're looking for: user= (def stuff [['(+ 1 (- 5 2)) nil] ['(- 5 2) nil] [3 true] [4 true]]) #'user/stuff user= (vec (for [m stuff] (vec (butlast m [[(+ 1 (- 5 2))] [(- 5 2)] [3] [4]] On Feb 11, 8:39 pm, jweiss jeffrey.m.we...@gmail.com wrote: I've been working on a tracing library, that works much like clojure.contrib.trace (based on it, actually). One sticky problem I've found is, hierarchical logs are really crappy to try to stream to a file. You can't just keep writing to the end of the file - new data needs to be inserted before existing end-tags. So what I'm doing is storing the data as a list, until I know the data is complete, and then i turn it back into a tree to write the file. However I can't think of a simple way to do it, even though it seems like a simple operation. I want to turn this list of pairs (first item is the fn call or return value, the second is a truthy value marking whether it's a call or return) '[[(+ 1 (- 5 2) nil] [(- 5 2) nil] [3 true] [4 true]] I want to turn that into [(+ 1 (- 5 2)) [(- 5 2) 3] 4] Is there a simple way to do this? -- 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 with your first post. 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
Stale .class files in protocols / records
I've noticed that code I change in defprotocol or defrecord does not get reflected unless I rm -rf classes. I've taken to 'rm -rf classes/myapp lein run' as the main way to run my code. Code outside defprotocol and defrecord gets reloaded just fine. I've tried this with JDK1.6 and 1.7 on OSX Lion, and it's bad on both. Does anyone know why this is? It makes SLIME in particular a pain. -- 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 with your first post. 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: How to convert string into sequence with replacing matched text.
Tassilo Thank you for sharering your solution. I've just solved this problem in ClojureScript as follows. (defn foobar [acc s] (if-let [[_ pre m post] (re-find #(.*?)(\d+)(.*) s)] (recur (conj acc pre [m]) post) (conj acc s))) (foobar [] hello 1 hello33) ;= [hello [1] hello [33] ] Thanks. 2012/2/13 Tassilo Horn tass...@member.fsf.org: Takahiro Hozumi fat...@googlemail.com writes: Hi! I want to make a sequence from string as follows. input: hello 1 world 2 output: (hello [1] world [2]) What is efficient way to achieve this in ClojureScript? This is a JVM Clojure solution. I'm not sure if ClojureScript has clojure.string, and probably the regex syntax differs a bit. But maybe it gives you an idea. user (defn foobar [s] (map #(if (re-matches #^\d+ %) [%] %) (clojure.string/split s #\p{Space}+))) #'user/foobar user (foobar hello 1 world 2) (hello [1] world [2]) Notice that `clojure.string/split' eats up the elements matching the split regex (i.e., the spaces). Not sure if that's a problem for you. Bye, Tassilo -- 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 with your first post. 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 -- 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 with your first post. 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: Stale .class files in protocols / records
I've noticed that code I change in defprotocol or defrecord does not get reflected unless I rm -rf classes. I've taken to 'rm -rf classes/myapp lein run' as the main way to run my code. Code outside defprotocol and defrecord gets reloaded just fine. I've tried this with JDK1.6 and 1.7 on OSX Lion, and it's bad on both. Does anyone know why this is? It makes SLIME in particular a pain. Because you (or a tool you are using) creates class files somewhere higher up on the classpath than Clojure's dynamic loading. Hopefully there is a different lein workflow that can avoid this. Stu Stuart Halloway Clojure/core http://clojure.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 with your first post. 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: Stale .class files in protocols / records
I have the same problem, and unfortunately I haven't found a better way to fix this apart from restarting the JVM. I start lein swank and connect to it using slime-connect from emacs, so it's not too painful, but still annoying. Maybe there is a way to force reloading without a restart, but I don't know how... On Feb 12, 6:00 pm, Andrew Cholakian andre...@gmail.com wrote: I've noticed that code I change in defprotocol or defrecord does not get reflected unless I rm -rf classes. I've taken to 'rm -rf classes/myapp lein run' as the main way to run my code. Code outside defprotocol and defrecord gets reloaded just fine. I've tried this with JDK1.6 and 1.7 on OSX Lion, and it's bad on both. Does anyone know why this is? It makes SLIME in particular a pain. -- 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 with your first post. 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
A Bug of map function?
= (eval `'~(map identity [1 2 3])) (1 2 3) = (eval `'~(map identity ())) CompilerException java.lang.UnsupportedOperationException: Unknown Collection type, compiling:(NO_SOURCE_PATH:135) = (eval `'~(map identity nil)) CompilerException java.lang.UnsupportedOperationException: Unknown Collection type, compiling:(NO_SOURCE_PATH:138) try the above in repl, clojure 1.3, why the exception occured? -- 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 with your first post. 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
[ANN] clj-http 0.3.2 released
Hi all, I'm pleased to announce the 0.3.2 release of clj-http. clj-http is an idiomatic clojure http client wrapping the apache client (like ring in reverse). You should be able to use it from Clojars[1] with the following: [clj-http 0.3.2] New features and bug-fixes (since 0.3.0): - added ablity to return the body as a stream with {:as :stream} - check for nil URLs when using client functions - added ability to specify maximum number of redirects - add :trace-redirects to the response map (a list of the redirection URLs) - allow GET requests with a :body set - allow strings or keywords for :scheme in requests - remove more reflection - allow per-request proxy settings in the option map Please give it a try and open any issues on the github repo[2] that you find. Check out the readme for the full information and usage. thanks, Lee Hinman [1]: http://clojars.org/clj-http [2]: https://github.com/dakrone/clj-http -- 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 with your first post. 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: Avoiding reflection in vector-of
For what it's worth, I eventually figured out a solution: use conj rather than applying the vector-of function itself. The following are all about the same speed and avoid the reflection calls: (apply conj (vector-of :long) (range 1000)) (apply conj (vector-of :int) (range 1000)) (apply conj (vector) (range 1000)) I'm not totally clear on why conj'ing works and applying vector-of itself does not, but I'm happy it's faster. On Jan 27, 4:17 pm, Bryce fiat.mo...@gmail.com wrote: Unfortunately with that change I still show ~90% of CPU time being spent in Reflector.getMethods(). On Jan 27, 11:59 am, Michael Wood esiot...@gmail.com wrote: On 25 January 2012 23:30, Bryce fiat.mo...@gmail.com wrote: [...] ;All of these spend most of their time in reflection (applyvector-of:int (range 1000)) (applyvector-of:int ^[J (range 1000)) (applyvector-of:int ^[J (long-array (range 1000))) (applyvector-of:int ^{:tag 'longs} (long-array (range 1000))) Just a guess. Have you tried the following? (applyvector-of:long ...) -- Michael Wood esiot...@gmail.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 with your first post. 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: Avoiding reflection in vector-of
I did not checked the source code but maybe conj has a vector specific implementation via protocols. Luc P. For what it's worth, I eventually figured out a solution: use conj rather than applying the vector-of function itself. The following are all about the same speed and avoid the reflection calls: (apply conj (vector-of :long) (range 1000)) (apply conj (vector-of :int) (range 1000)) (apply conj (vector) (range 1000)) I'm not totally clear on why conj'ing works and applying vector-of itself does not, but I'm happy it's faster. On Jan 27, 4:17 pm, Bryce fiat.mo...@gmail.com wrote: Unfortunately with that change I still show ~90% of CPU time being spent in Reflector.getMethods(). On Jan 27, 11:59 am, Michael Wood esiot...@gmail.com wrote: On 25 January 2012 23:30, Bryce fiat.mo...@gmail.com wrote: [...] ;All of these spend most of their time in reflection (applyvector-of:int (range 1000)) (applyvector-of:int ^[J (range 1000)) (applyvector-of:int ^[J (long-array (range 1000))) (applyvector-of:int ^{:tag 'longs} (long-array (range 1000))) Just a guess. Have you tried the following? (applyvector-of:long ...) -- Michael Wood esiot...@gmail.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 with your first post. 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 -- Softaddictslprefonta...@softaddicts.ca sent by ibisMail! -- 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 with your first post. 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: A Bug of map function?
If this is a bug, it's in eval, not in map. eval apparently just doesn't like to be handed lazy sequences, or something: repl-1= (eval `(quote ~(lazy-seq nil))) CompilerException java.lang.UnsupportedOperationException: Unknown Collection type, compiling:(NO_SOURCE_PATH:14) ;; just to demonstrate that these are the same value: repl-1= (= `(quote ~(lazy-seq nil)) repl-1=*`'~(map identity ())) true This looks like it's caused by https://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/Compiler.java#L2680 - it should probably be testing for ISeq, not IPersistentList. On Feb 13, 1:02 am, Eric Fong fangyi...@gmail.com wrote: = (eval `'~(map identity [1 2 3])) (1 2 3) = (eval `'~(map identity ())) CompilerException java.lang.UnsupportedOperationException: Unknown Collection type, compiling:(NO_SOURCE_PATH:135) = (eval `'~(map identity nil)) CompilerException java.lang.UnsupportedOperationException: Unknown Collection type, compiling:(NO_SOURCE_PATH:138) try the above in repl, clojure 1.3, why the exception occured? -- 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 with your first post. 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: Avoiding reflection in vector-of
Bryce which profiler are you using? just curious... On Mon, Feb 13, 2012 at 9:52 AM, Softaddicts lprefonta...@softaddicts.cawrote: I did not checked the source code but maybe conj has a vector specific implementation via protocols. Luc P. For what it's worth, I eventually figured out a solution: use conj rather than applying the vector-of function itself. The following are all about the same speed and avoid the reflection calls: (apply conj (vector-of :long) (range 1000)) (apply conj (vector-of :int) (range 1000)) (apply conj (vector) (range 1000)) I'm not totally clear on why conj'ing works and applying vector-of itself does not, but I'm happy it's faster. On Jan 27, 4:17 pm, Bryce fiat.mo...@gmail.com wrote: Unfortunately with that change I still show ~90% of CPU time being spent in Reflector.getMethods(). On Jan 27, 11:59 am, Michael Wood esiot...@gmail.com wrote: On 25 January 2012 23:30, Bryce fiat.mo...@gmail.com wrote: [...] ;All of these spend most of their time in reflection (applyvector-of:int (range 1000)) (applyvector-of:int ^[J (range 1000)) (applyvector-of:int ^[J (long-array (range 1000))) (applyvector-of:int ^{:tag 'longs} (long-array (range 1000))) Just a guess. Have you tried the following? (applyvector-of:long ...) -- Michael Wood esiot...@gmail.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 with your first post. 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 -- Softaddictslprefonta...@softaddicts.ca sent by ibisMail! -- 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 with your first post. 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 -- 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 with your first post. 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: Avoiding reflection in vector-of
vector-of is just implemented poorly - with more than four arguments it calls .cons on the vector it's building up. If the type were known and type-hinted this would be a slightly faster version of conj, but lacking the type-hint it's just a much, much slower version of conj. Adding ^Vec to line 491 of gvec.clj would probably fix it. On Feb 13, 9:02 am, Bryce fiat.mo...@gmail.com wrote: For what it's worth, I eventually figured out a solution: use conj rather than applying the vector-of function itself. The following are all about the same speed and avoid the reflection calls: (apply conj (vector-of :long) (range 1000)) (apply conj (vector-of :int) (range 1000)) (apply conj (vector) (range 1000)) I'm not totally clear on why conj'ing works and applying vector-of itself does not, but I'm happy it's faster. On Jan 27, 4:17 pm, Bryce fiat.mo...@gmail.com wrote: Unfortunately with that change I still show ~90% of CPU time being spent in Reflector.getMethods(). On Jan 27, 11:59 am, Michael Wood esiot...@gmail.com wrote: On 25 January 2012 23:30, Bryce fiat.mo...@gmail.com wrote: [...] ;All of these spend most of their time in reflection (applyvector-of:int (range 1000)) (applyvector-of:int ^[J (range 1000)) (applyvector-of:int ^[J (long-array (range 1000))) (applyvector-of:int ^{:tag 'longs} (long-array (range 1000))) Just a guess. Have you tried the following? (applyvector-of:long ...) -- Michael Wood esiot...@gmail.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 with your first post. 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
what stack traces include / exclude regarding monads
I've been experimenting with a state monad. Below is a list of what is included in my stack trace [+] and what isn't [-]. I've noticed that a call to a symbol that is bound to the result of a domonad (not sure if that's the right way to describe it) doesn't end up in my stack trace. I was planning on having a lot of things like that combined arbitrarily (see cc in the list below), but if they're not going to show up in stack traces (besides calls to m_bind -- which are not informative since they're always going to be on the same line), then that makes it tough to debug... Can I do something to cause my stack trace to include them somehow? Thanks in advance! [+] call to aa, an ordinary method whose body is (bb {}) shows up in the stack trace naturally. [-] bb is excluded from the stack trace. It is defined to be synonymous with symbol cc with (def bb cc). Of course, I don't expect this to be in the stack trace since it's not a method call. But I did include it as part of poking my stack trace. [-] cc is excluded from the stack trace. It is bound to the result of a state-m domonad: (def cc (domonad state-m My thinking (which appears to be incorrect) is that this definition of cc should be equivalent to (def cc some fn which takes a state and returns [value new-state]) which I thought would be like a defn and thus would show up in a stack trace when called. [+] dd is a monadic value that's used inside cc (inside the domonad part). So dd is a fn that takes a state and returns [value new-state]. dd shows up in the stack trace when called. [+] ee is an ordinary method called by dd. ee shows up in the stack trace. -- 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 with your first post. 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: what stack traces include / exclude regarding monads
Here's the code if the list in the original post was too cryptic. None of the items beginning with cc show up in the stack trace by name -- m_bind shows up instead. (defn ee [] (show-stack)) (def dd (fn [s] [ (show-stack) s])) (def cc2 (with-monad sim-m (domonad [_# dd] 4))) (def cc1 (with-monad sim-m (domonad [_# cc2] 5))) (def cc (with-monad sim-m (domonad [_# cc1] 6))) (def bb cc) (defn aa [] (bb {})) -- 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 with your first post. 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: Persistent collections and garbage collection
I watched Phil Bagwell's talk and found it very interesting, but I as far as I remember he doesn't discuss GC. Anyway, let's leave this as an open question, and I'd be interested in hearing from people who've memory-profiled their persistent collections. But I can understand from your answer that there are no serious problems when it comes to GC in Clojure apps, which is very good to know. -- 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 with your first post. 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: Clarification on ClojureScript libraries
Base, Sean, Several of us are actively working on getting some of these issues resolved. I have a patch that I am finishing up testing on this week that will allow libraries to specify externs, libs and foreign-libs inside the library. This should fix some of the upstream dependency issues like the extern issue you described. I haven't ran across the :use issue but will try to reproduce. I tend to use required so that doesn't surprise me too much. Depending on the version of ClojureScript you are running, you may, or may not, be able to pull externs and libs from the classpath. Luke pushed my patch for this into the main branch a couple of weeks ago. If you do have the most recent and still see an issue with externs not pulling from the classpath let me know. Its probably a bug in the code I added. CK On Feb 7, 1:11 pm, Sean Corfield seancorfi...@gmail.com wrote: On Tue, Feb 7, 2012 at 8:18 AM, Base basselh...@gmail.com wrote: For the former, it is easy enough to just add the reference to the project.clj and it automagically appears in the lib. Does the same hold true for Clojurescript libraries? I cannot seem to get this to work correctly and end up dropping the files in the directory defined in the :source-path in the project.clj. I just went thru this last night with Chris Granger's jayq wrapper for jQuery. I added a standard project.clj dependency on the library [jayq 0.1.0-SNAPSHOT] and lein deps brought it in as expected. Things worked fine in :whitespace and :simple mode (:optimizations) but broke in :advanced mode. The reason was that externs (declarations of library names) was not picked up from the classpath (yet). The fix was to run: jar xf lib/jayq-*.jar externs in my project to extract the externs folder (containing the jquery.js declarations) into the top-level of my project. Forcing a recompile of the cljs then solved the problem. Another problem I ran into initially was not specifying :output-dir in the compilation options. The compiler caches the source cljs and compiled js and when I updated the jayq library (to pick up a fix from Chris - thank you!), the old source was still being used. Once I specified :output-dir I could see the problem and removing the generated files (or using lein cljsbuild clean) emptied that cache and forcing a recompile picked up the new source from the jayq JAR. Oh, and my first problem was that with multiple :use clauses for different cljs files in my ns declaration, the compiler seemed to get confused about which namespace symbols lived in so it would produce example.core.$.call(...) instead of jayq.core.$.call(...) or example.core.by_id(...) instead of example.util.by_id(...). I finally gave up on :use'ing multiple cljs code packages. I've had similar problems with :require but can't track down the specific situation that works vs fails (yet). Small problems but frustratingly hard to debug because a) the compilation produces giant JS files in non-advanced mode and incomprehensible JS files in advanced mode and b) the g-Closure compiler is a big black box so it's really hard to tell what's going on. I also (sometimes) got an HTTP request for /deps.js which no one on IRC seemed to be able to explain (so I just created an empty deps.js file to shut it up). ClojureScript is very promising - and I much prefer writing Clojure to writing JS - but as soon as you stray from a specific published example or from the simplest possible thing that works, you can get into a landmine-filled world of frustration at the moment. Things are improving rapidly tho'... -- Sean A Corfield -- (904) 302-SEAN An Architect's View --http://corfield.org/ World Singles, LLC. --http://worldsingles.com/ Perfection is the enemy of the good. -- Gustave Flaubert, French realist novelist (1821-1880) -- 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 with your first post. 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: Clarification on ClojureScript libraries
I can confirm that externs are found on the classpath (including jars) in the latest versions of clojurescript. I use this. -- 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 with your first post. 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: Clarification on ClojureScript libraries
On Mon, Feb 13, 2012 at 4:53 PM, Dave Sann daves...@gmail.com wrote: I can confirm that externs are found on the classpath (including jars) in the latest versions of clojurescript. Likewise. I blogged Getting Started with ClojureScript and jQuery based on that. Having the externs automagically specified inside the library would save one more step which would be very nice! Thanx CK (and others) for the work you're all continuing to do on this! -- Sean A Corfield -- (904) 302-SEAN An Architect's View -- http://corfield.org/ World Singles, LLC. -- http://worldsingles.com/ Perfection is the enemy of the good. -- Gustave Flaubert, French realist novelist (1821-1880) -- 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 with your first post. 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 Summer of Code 2012 - any mentors?
More students +1 On Feb 9, 9:54 am, Baishampayan Ghose b.gh...@gmail.com wrote: Alexander, A discussion is currently ongoing in the Clojure Dev mailing list. We are still waiting for someone from Clojure/core to chime in. Regards, BG On Thu, Feb 9, 2012 at 8:53 PM, Alexander Yakushev yakushev.a...@gmail.com wrote: Hello, I am wondering if there is there anybody willing to take part in this year's GSoC as a mentor? I would be happy to contribute this summer's time to hacking Clojure and there are probably more students that would. Best regards, Alexander -- 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 with your first post. 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 -- Baishampayan Ghose b.ghose at gmail.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 with your first post. 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
Clojure/West unsession proposals
Hey all, If you're attending Clojure/West and would like to plan an informal gathering before/during/after the Overtone party on Friday night, please add your idea or support here: http://clojurewest.wikispaces.com/Unsessions As we get closer we can start figuring out times and rooms. Alex -- 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 with your first post. 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
[ANN] data.csv 0.1.1
Hi data.csv is a csv reader/writer for Clojure. I released version 0.1.1 today and it should arrive at maven central soon. New in this release is more control over how and when the writer will quote strings. Hopefully, all necessary information can be found on github[1] Jonas [1]: github.com/clojure/data.csv -- 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 with your first post. 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
{ANN} clojure-control 0.2.4 is out
Hi,all Clojure-control is a clojure DSL for system admin and deployment with many remote machines via ssh,and i have checked out a branch to make it work with clojure 1.3 now. At last, control 0.2.4 works well with clojure 1.3,and 0.2.3 works well with clojure 1.2: :dev-dependencies [[control 0.2.3]] ; clojure 1.2 :dev-dependencies [[control 0.2.4]] ; clojure 1.3 More information please visit the project home: https://github.com/killme2008/clojure-control -- 庄晓丹 Email:killme2...@gmail.com xzhu...@avos.com Site: http://fnil.net Twitter: @killme2008 -- 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 with your first post. 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