[OT] Re: Unable to use contrib

2009-10-07 Thread Baishampayan Ghose
Abhishek Reddy wrote: > The semicolon character opens a single-line comment in Clojure (as is > traditional in lisp languages). It's like // in Java. Off topic: Abhishek, so have you switched from CL to Clojure now? ;) Anyway, have loads of fun. I am. Regards, BG -- Baishampayan Ghose oCric

Re: Unable to use contrib

2009-10-07 Thread Abhishek Reddy
The semicolon character opens a single-line comment in Clojure (as is traditional in lisp languages). It's like // in Java. On Wed, Oct 7, 2009 at 11:08 PM, vishy wrote: > > thanks for the comprehensive answer,clarified everything :) > But, why ;; at the end? > > On Oct 7, 11:17 am, Abhishek R

Re: Unable to use contrib

2009-10-07 Thread vishy
thanks for the comprehensive answer,clarified everything :) But, why ;; at the end? On Oct 7, 11:17 am, Abhishek Reddy wrote: > On Wed, Oct 7, 2009 at 5:57 PM, Mark Reid wrote: > > I'm not sure if this is the "best" approach but I found that if you > > >    (use 'clojure.contrib.math) > > > ins

Re: Unable to use contrib

2009-10-07 Thread Wei Yuan Cai
Hello, Try (clojure.contrib.math/lcm 4 5) Regards Wei Weiyuan wrote On 07-Oct-2009, at 12:36 PM, vishy wrote: > > Hi, > > I am on windows machine. I am using these commands to startup clojure, > but not able to use functions from contrib library. > > java -cp clojure.jar;clojure-contrib.jar

Re: Unable to use contrib

2009-10-06 Thread Abhishek Reddy
On Wed, Oct 7, 2009 at 5:57 PM, Mark Reid wrote: > I'm not sure if this is the "best" approach but I found that if you > >(use 'clojure.contrib.math) > > instead of require, it should work. > In practice, an unqualified 'use' form can be bad style, because your code will contain symbols whos

Re: Unable to use contrib

2009-10-06 Thread Mark Reid
Hi, I ran into a similar problem myself recently. I'm not sure if this is the "best" approach but I found that if you (use 'clojure.contrib.math) instead of require, it should work. Regards, Mark. On Oct 7, 2:50 pm, vishy wrote: > Hi, > > I am on windows machine. I am using these comma

Re: Unable to use contrib

2009-10-06 Thread Alex Osborne
vishy wrote: > user=> (require 'clojure.contrib.math) > nil > user=> (lcm 4 5) > java.lang.Exception: Unable to resolve symbol: lcm in this context > (NO_SOURCE_FILE:2) The problem is that "require" only loads the math library, it doesn't "refer" to it. This means that you have to qualify lcm w

Unable to use contrib

2009-10-06 Thread vishy
Hi, I am on windows machine. I am using these commands to startup clojure, but not able to use functions from contrib library. java -cp clojure.jar;clojure-contrib.jar clojure.lang.Repl Clojure 1.0.0- user=> (require 'clojure.contrib.math) nil user=> (lcm 4 5) java.lang.Exception: Unable to reso