slow repl startup because of package finding

2012-11-02 Thread Satoru Logic
Hi, all. Every time I type `*lein repl*`, several line of log get printed out: Could not find artifact org.clojure:clojure:pom:1.+ in central (http://repo1.maven.org/maven2) Could not find artifact org.clojure:clojure:pom:1.+ in clojars (https://clojars.org/repo/) Could not find artifact

Re: slow repl startup because of package finding

2012-11-02 Thread Meikel Brandmeyer (kotarak)
Hi, Am Freitag, 2. November 2012 08:23:00 UTC+1 schrieb Satoru Logic: Hi, all. Every time I type `*lein repl*`, several line of log get printed out: Could not find artifact org.clojure:clojure:pom:1.+ in central ( http://repo1.maven.org/maven2) Could not find artifact

Re: slow repl startup because of package finding

2012-11-02 Thread Chris Ford
Are you using Seesaw 1.4.1? I just upgraded to 1.4.2, which fixed the same issue with Overtone. In general, Phil Hagelberg advised me it's a result of a bad dependency somewhere. I found that this error meant that I couldn't run my project without network connectivity (unless I did lein -o).

Re: slow repl startup because of package finding

2012-11-02 Thread Satoru Logic
My ~/.lein/profiles.clj contains one line only: {:user {:plugins [[lein-minnow 0.1.4]]}} Is it the case that this plugin requiring something that can't be find? On Friday, November 2, 2012 3:26:34 PM UTC+8, Meikel Brandmeyer (kotarak) wrote: Hi, Am Freitag, 2. November 2012 08:23:00

Re: slow repl startup because of package finding

2012-11-02 Thread Meikel Brandmeyer (kotarak)
Hi, Am Freitag, 2. November 2012 08:50:09 UTC+1 schrieb Satoru Logic: My ~/.lein/profiles.clj contains one line only: {:user {:plugins [[lein-minnow 0.1.4]]}} Is it the case that this plugin requiring something that can't be find? Minnow uses seesaw 1.3.0 which depends on j18n 1.0.0.

Re: slow repl startup because of package finding

2012-11-02 Thread Satoru Logic
On Friday, November 2, 2012 4:23:01 PM UTC+8, Meikel Brandmeyer (kotarak) wrote: Hi, Am Freitag, 2. November 2012 08:50:09 UTC+1 schrieb Satoru Logic: My ~/.lein/profiles.clj contains one line only: {:user {:plugins [[lein-minnow 0.1.4]]}} Is it the case that this plugin requiring

What's the difference between `seq` and `lazy-seq`?

2012-11-02 Thread Satoru Logic
Hi, all. I read the following description of `sequence` in the book Clojure Programming: * Obtaining the length of a seq carries a cost. * The contents of sequences may be computed lazily and actually realized only when the value involved are accessed. So a sequence is something lazy,

Registering a Java class as a call back in a Clojure client

2012-11-02 Thread frito
Hi, I am trying to mimic this in Clojure: myClient.registerNotificationHandler(correlationID, this); where this has the signature: public class MyClass implements IA, IC, INotificationHandler and the register method signature is: public IClientNotificationHandler

Re: Registering a Java class as a call back in a Clojure client

2012-11-02 Thread Meikel Brandmeyer (kotarak)
Hi, you have to pass an instance of INotificationHandler, not the class itself. (.registerNotificationHandler myClient 123 (MyClass.)) or with proxy (let [handler (proxy [INotificationHandler] [] (handle [notification] here))] (.registerNotificationHandler myClient 123

Re: Registering a Java class as a call back in a Clojure client

2012-11-02 Thread frito
Thank you - I was just coming back here to withdraw my question having realised my error - of course this refers to the instance not the type Thanks to all who have considered this. On Friday, 2 November 2012 12:46:46 UTC, Meikel Brandmeyer (kotarak) wrote: Hi, you have to pass an instance

Re: What's the difference between `seq` and `lazy-seq`?

2012-11-02 Thread Christophe Grand
Hi, A sequence may be (and commonly is) lazy. Sequences on collections, strings, arrays are not lazy. Nor are those built with cons. Some sequences even have a fast (O(1)) count (eg lists, sequences on strings...) However you sould assume the worst case which is a traversal of the whole sequences

Re: What's the difference between `seq` and `lazy-seq`?

2012-11-02 Thread Satoru Logic
On Friday, November 2, 2012 9:57:17 PM UTC+8, Christophe Grand wrote: Hi, A sequence may be (and commonly is) lazy. Sequences on collections, strings, arrays are not lazy. Nor are those built with cons. So `(seq range(5))` is not lazy, and its contents (0 1 2 3 4) are evaluated as

Re: What's the difference between `seq` and `lazy-seq`?

2012-11-02 Thread Andy Fingerhut
lazy-seq is used, typically within functions, to create a lazy sequence. seq is used wherever you want to take a collection or a sequence, and traverse through its contents. It takes the collection or sequence and returns an object, called a seq, that you can call first or next/rest on. seq

Re: ANN Typed Clojure 0.1.1

2012-11-02 Thread David Nolen
Typed Clojure Hackathon at the Conj?! ;) David On Fri, Nov 2, 2012 at 12:43 PM, Ambrose Bonnaire-Sergeant abonnaireserge...@gmail.com wrote: Also, if you'd like to contribute to Typed Clojure, there are a lot of small, fun jobs around.

Re: ANN Typed Clojure 0.1.1

2012-11-02 Thread Ambrose Bonnaire-Sergeant
One thing we could definitely knock out is annotating as much of clojure.core and clojure.lang.* as Typed Clojure can currently support. Ambrose On Sat, Nov 3, 2012 at 12:53 AM, David Nolen dnolen.li...@gmail.com wrote: Typed Clojure Hackathon at the Conj?! ;) David On Fri, Nov 2, 2012 at

Easy way to implement IFn in java?

2012-11-02 Thread JvJ
I'm writing a Java interface to some Clojure code, and some of the code needs functions as parameters. I'd like to be able create objects from anonymous inner classes. Something like this: func = new IFn(){ public Object invoke(obj1,...){ //code in here } }; I'd like to be

Re: Easy way to implement IFn in java?

2012-11-02 Thread AtKaaZ
looks like you can use AFn() in your example ie. static IFn assoc = new AFn(){ @Override public Object invoke(Object m, Object k, Object v) { return RT.assoc(m, k, v); } }; (code from clojure.lang.Var.assoc) On Sat, Nov 3, 2012 at 12:51 AM, JvJ kfjwhee...@gmail.com wrote:

Problem installing Noir with Lein

2012-11-02 Thread Satoru Logic
Hi, all. I am trying to install Noir following instructions on http://www.webnoir.org/. With the latest lein I installed, `lein plugin install lein-noir 1.2.1` simply won't work. So I add a line of requirement into `~/.lein/profiles.clj`: [lein-noir 1.2.1] Then I follow the Noir

Re: Problem installing Noir with Lein

2012-11-02 Thread Sean Corfield
On Fri, Nov 2, 2012 at 8:15 PM, Satoru Logic satorulo...@gmail.com wrote: So I add a line of requirement into `~/.lein/profiles.clj`: [lein-noir 1.2.1] You should not need that. I just tried on my system, which has no ~/.lein/profiles.clj file. I did: lein new noir my-website (note

Re: Problem installing Noir with Lein

2012-11-02 Thread Satoru Logic
On Saturday, November 3, 2012 12:07:02 PM UTC+8, Sean Corfield wrote: On Fri, Nov 2, 2012 at 8:15 PM, Satoru Logic sator...@gmail.comjavascript: wrote: So I add a line of requirement into `~/.lein/profiles.clj`: [lein-noir 1.2.1] You should not need that. Thanks. I