Re: Troll in our midst - please ignore them

2009-06-28 Thread Alex Combas
On Sun, Jun 28, 2009 at 10:21 PM, CuppoJava wrote: > > Thank you Denfer, > That's a very interesting trick. I'm sure it'll be handy to me in the > future. I really never considered trolls a possibility on this forum. > It seems if that sort of thing interests you, there's much easier and > satisfy

Re: Troll in our midst - please ignore them

2009-06-28 Thread CuppoJava
Thank you Denfer, That's a very interesting trick. I'm sure it'll be handy to me in the future. I really never considered trolls a possibility on this forum. It seems if that sort of thing interests you, there's much easier and satisfying prey elsewhere. -Patrick --~--~-~--~~

Article on Dispatch

2009-06-28 Thread Daniel Jomphe
I think the following article I wrote may help properly understanding dispatch. I submit here for your pleasure/review. First paragraph: "I believe multiple dispatch is known to be hard to understand. When I first read about it, for some reason, it took me quite a lot of thinking before I really

Re: Troll in our midst - please ignore them

2009-06-28 Thread Giancarlo Angulo
I didn't know this! thanks! = ANGOL = -|-^...@^_^, =|+^_^X++~_~,@- "The only thing worse than a hopeless romantic is a hopeful one" Magbasa bago Mamuna. Mag-isip bago mambatikos Without Truth there is no Justice, Without Justice, there is Tyranny Semper fi Proof of Desire

Re: Troll in our midst - please ignore them

2009-06-28 Thread Daniel Renfer
On Sun, Jun 28, 2009 at 4:51 PM, CuppoJava wrote: > > Hi Rich, > I'm very impressed by the effort you put in to moderating and > supporting the community, on top of your work on Clojure. I did notice > that Wrexsoul, Four, and Handkea's posts were tending to the annoying, > but I didn't think to a

Re: ClassNotFoundException turn up randomly at compilation

2009-06-28 Thread C. Florian Ebeling
>> I randomly get ClassNotFoundExceptions when I try to compile a file. >> This is a paste from the repl: >> >> Clojure 1.0.0- >> user=> (compile 'app.hello) >> java.lang.RuntimeException: java.lang.ClassNotFoundException: >> app.hello$exec__4 (NO_SOURCE_FILE:0) >> user=> (compile 'app.hello) >> a

Re: How to shorten clojure.lang.* classes

2009-06-28 Thread samppi
Wonderful. Thanks for the answers. On Jun 28, 12:39 pm, "Stephen C. Gilardi" wrote: > On Jun 28, 2009, at 3:03 PM, samppi wrote: > > > I use Clojure's classes a lot in my multimethods. Is there any way to > > abbreviate them; that is, is there a method to refer to > > clojure.lang.APersistentLis

Re: Troll in our midst - please ignore them

2009-06-28 Thread CuppoJava
Hi Rich, I'm very impressed by the effort you put in to moderating and supporting the community, on top of your work on Clojure. I did notice that Wrexsoul, Four, and Handkea's posts were tending to the annoying, but I didn't think to attribute them as being the same person. Do you have a way of c

Re: ClassNotFoundException with def

2009-06-28 Thread hoeck
Hi Daniel, add-classpath should only be used to add a clojure library on the fly within a repl session. If you encounter any problems with your code using add-classpath, you should use the normal way of adding it to jvm's startup classpath instead. (The reason is that add-classpath works only for

Re: Troll in our midst - please ignore them

2009-06-28 Thread Alex Combas
Hi Rich, Does this mean you're going to be moderating every post, or just posts from new accounts? Either way, perhaps you could start looking around for a couple of people who would do this job of moderating for you because I'm sure I'm not alone in thinking that your time would be best used else

Re: How to shorten clojure.lang.* classes

2009-06-28 Thread Krešimir Šojat
They are standard java classes, so you should use import: (import '(clojure.lang APersistentList)) (defmethod my-method APersistentList [& _] ...) On 28 lip, 21:03, samppi wrote: > I use Clojure's classes a lot in my multimethods. Is there any way to > abbreviate them; that is, is there a meth

Re: How to shorten clojure.lang.* classes

2009-06-28 Thread Stephen C. Gilardi
On Jun 28, 2009, at 3:03 PM, samppi wrote: I use Clojure's classes a lot in my multimethods. Is there any way to abbreviate them; that is, is there a method to refer to clojure.lang.APersistentList as APersistentList? I've tried (use 'clojure.lang) and (require ['clojure.lang :as 'c]), but neit

Re: (for [binds] body) violates convention for non-conditional binding forms

2009-06-28 Thread Meikel Brandmeyer
Hi, Am 28.06.2009 um 18:06 schrieb Handkea fumosa: Well, that error bit me when I was doing some debugging, which involved precisely putting a "println" into a "for" block. The results were being consumed more or less immediately. The net effect was to waste a little bit of my time. For such

How to shorten clojure.lang.* classes

2009-06-28 Thread samppi
I use Clojure's classes a lot in my multimethods. Is there any way to abbreviate them; that is, is there a method to refer to clojure.lang.APersistentList as APersistentList? I've tried (use 'clojure.lang) and (require ['clojure.lang :as 'c]), but neither seem to work. --~--~-~--~~

Troll in our midst - please ignore them

2009-06-28 Thread Rich Hickey
It has become obvious to me we now have a troll in our midst, known first as Wrexsoul, then Four of Seventeen, and now Handkea fumosa. In spite of their desire for anonymity, their posts identify them for us: Posting too often At too great a length, often histrionically and provocatively With gr

Re: What are people using Clojure for?

2009-06-28 Thread Michael Böckling
Hi Howard, I'd be interested to know what you think of Enlive (http:// wiki.github.com/cgrand/enlive/). On first sight it looks like pure genius, and the philosophy reminds me of Tapestry5. T5 nicely decouples Java user code from the framework by using IoC, callbacks, naming conventions and avoid

Re: Bug: (list? (cons 4 '(1 2 3))) returns false!

2009-06-28 Thread Handkea fumosa
On Jun 28, 12:14 pm, Richard Newman wrote: > >>> It's list? that isn't. > > >> That's not strictly true > > > Are you calling me a liar? > > Not a liar; just misinformed I don't agree. --~--~-~--~~~---~--~~ You received this message because you are subscribed to t

Re: Bug: (list? (cons 4 '(1 2 3))) returns false!

2009-06-28 Thread Richard Newman
>>> It's list? that isn't. >> >> That's not strictly true > > Are you calling me a liar? Not a liar; just misinformed, as I hope I demonstrated by citing the docs. I don't see any value in continuing this thread of the discussion, but I wanted to clear that up. > If you don't think list? sho

Re: (for [binds] body) violates convention for non-conditional binding forms

2009-06-28 Thread Handkea fumosa
On Jun 28, 11:03 am, Rich Hickey wrote: > Now that doseq has similar capabilities, I think the situation you've > put forth (side effects and keeping lazy result) will be an extreme > minority case, and am inclined to think it would be better to require > and see the 'do' so you know something fu

Re: ClassCastException - maybe a bug

2009-06-28 Thread Stephen C. Gilardi
On Jun 28, 2009, at 11:48 AM, Handkea fumosa wrote: On Jun 28, 11:27 am, Rich Hickey wrote: Deducing it doesn't contain 5 because it was passed a key incomparable to some other key seems like a stretch to me, and bug-hiding. Clojure is relatively free of exception catching in normal flow

Re: Bug: (list? (cons 4 '(1 2 3))) returns false!

2009-06-28 Thread Handkea fumosa
On Jun 28, 11:21 am, Rich Hickey wrote: > This too is a bit much. The OP wasn't trying to use cons as a pair, > just expecting list? to be more similar to listp. It's a reasonable > mistake, please be gentle. If you're referring to me, I don't agree that it is a mistake to expect that there'd be

Re: Bug: (list? (cons 4 '(1 2 3))) returns false!

2009-06-28 Thread Rich Hickey
On Jun 28, 11:52 am, Handkea fumosa wrote: > On Jun 28, 1:49 am, Richard Newman wrote: > > > >> cons is acting according to its documentation. > > > > It's list? that isn't. > > > That's not strictly true > > Are you calling me a liar? > > > Is there a reason why you are testing for listiness

Re: Bug: (list? (cons 4 '(1 2 3))) returns false!

2009-06-28 Thread Handkea fumosa
On Jun 28, 1:49 am, Richard Newman wrote: > >> cons is acting according to its documentation. > > > It's list? that isn't. > > That's not strictly true Are you calling me a liar? > Is there a reason why you are testing for listiness rather than for   > some other property, like Sequential? It's

Re: ClassCastException - maybe a bug

2009-06-28 Thread Handkea fumosa
On Jun 28, 11:27 am, Rich Hickey wrote: > Deducing it doesn't contain 5 because it was passed a key incomparable > to some other key seems like a stretch to me, and bug-hiding. > > Clojure is relatively free of exception catching in normal flow of > control, and I'm disinclined to start here. I

Re: Buggy behavior of recur with primitives

2009-06-28 Thread Handkea fumosa
On Jun 28, 2:47 am, Meikel Brandmeyer wrote: > Hi, > > Am 28.06.2009 um 07:53 schrieb Handkea fumosa: > > > The recur arg in question is  (+ (* G__12815 G__12815) (* G__12817 > > G__12816 G__12816) G__12819) all of whose operands are doubles. > > > This seems buggy. > > Yes, that seems ominous. I

Re: Buggy behavior of recur with primitives

2009-06-28 Thread Rich Hickey
On Sun, Jun 28, 2009 at 8:35 AM, Jarkko Oranen wrote: > > On Jun 28, 8:53 am, Handkea fumosa wrote: >> (defn foo [z-r z-i c-r c-i bailout max-iters] >>   (let [G__12819 (double c-r) >>         G__12820 (double c-i) >>         G__12817 (double -1) >>         G__12818 (double 2) >>         mi (int

Re: ClassCastException - maybe a bug

2009-06-28 Thread Rich Hickey
On Sat, Jun 27, 2009 at 4:30 PM, Handkea fumosa wrote: > > On Jun 27, 11:32 am, Meikel Brandmeyer wrote: >> Am 26.06.2009 um 23:44 schrieb Michael Spiegel: >> > =>(def foo (sorted-set "bob" "alice" "michael")) >> > => (contains? foo 5) >> > java.lang.ClassCastException: java.lang.String cannot be

Re: Bug: (list? (cons 4 '(1 2 3))) returns false!

2009-06-28 Thread Rich Hickey
On Sun, Jun 28, 2009 at 2:26 AM, Meikel Brandmeyer wrote: > Hi, > > Am 28.06.2009 um 07:45 schrieb Handkea fumosa: > >> It's list? that isn't. > > No. list? is not broken. Every list is a seq, but not > every seq is a list. > > Consider: (cons 0 (iterate inc 1)) > > This is no list! It's a sequenc

Re: (for [binds] body) violates convention for non-conditional binding forms

2009-06-28 Thread Rich Hickey
On Sun, Jun 28, 2009 at 12:19 AM, Handkea fumosa wrote: > > user=> (doall >  (for [x (range 2) y (range 2)] >    (println x "@" y) >    (* x y))) > > Expected: > > 0 @ 0 > 0 @ 1 > 1 @ 0 > 1 @ 1 > (0 0 0 1) > > Got: > > # of args passed to: core$for (NO_SOURCE_FILE:220)> > > Wrapping the body in an

ClassNotFoundException with def

2009-06-28 Thread Daniel Borchmann
Hello all, I have some trouble understanding the following setting: Given a Java class JavaStuff.java in /home/me the following occurs on my system: Clojure 1.0.0- user=> (add-classpath "file:///home/me/") nil user=> (. Class (forName "JavaStuff")) JavaStuff user=> (def JavaStuff-cla

Re: ClassNotFoundException turn up randomly at compilation

2009-06-28 Thread Michael Wood
2009/6/26 C. Florian Ebeling : > > Hi, > > I randomly get ClassNotFoundExceptions when I try to compile a file. > This is a paste from the repl: > > Clojure 1.0.0- > user=> (compile 'app.hello) > java.lang.RuntimeException: java.lang.ClassNotFoundException: > app.hello$exec__4 (NO_SOURCE_FILE:0) >

Re: Buggy behavior of recur with primitives

2009-06-28 Thread Jarkko Oranen
On Jun 28, 8:53 am, Handkea fumosa wrote: > (defn foo [z-r z-i c-r c-i bailout max-iters] >   (let [G__12819 (double c-r) >         G__12820 (double c-i) >         G__12817 (double -1) >         G__12818 (double 2) >         mi (int max-iters) >         b (double (* bailout bailout))] >     (loop

Re: java.ext.dirs problem

2009-06-28 Thread Laurent PETIT
2009/6/28 Christophe Grand : > Hi all, > > On Sun, Jun 28, 2009 at 1:37 AM, Laurent PETIT > wrote: >> >> >> That's certainly why you're having problems when you mess up the >> >> dependencies in places where there is a hierarchy of classloaders >> >> involved : clojure-contrib was loaded with the

Re: java.ext.dirs problem

2009-06-28 Thread Christophe Grand
Hi all, On Sun, Jun 28, 2009 at 1:37 AM, Laurent PETIT wrote: > >> That's certainly why you're having problems when you mess up the > >> dependencies in places where there is a hierarchy of classloaders > >> involved : clojure-contrib was loaded with the "main classloader" > >> along with java co

Re: ClassCastException - maybe a bug

2009-06-28 Thread Laurent PETIT
Hi, I can understand both points of vue, since the documentation is not explicit about the possibility to return an error ? "(contains? coll key) Returns true if key is present in the given collection, otherwise returns false. Note that for numerically indexed collections like vectors and Java ar