Ok, thanks for the answer.

I actually have Leiningen installed, and I've just done a "lein
update" - it's now on 1.2.0 as it says. Is this actually "clojure
1.2.0", or just a stand-alone leiningen version?

But I'm in the progress of just learning, so I don't want to have
projects (yet). Because of that I installed clojure-1.1.jar (and
clojure-contrib) manually, and found a "clj" shell script to run. I
updated it to support clojure 1.1, and now when I want a REPL I type
"clj". When I want to run a script file, I type "clj
scriptfilename.clj".

It's very simple, and pretty much resembles what I know from languages
such as ruby (irb).

Is there any way to use leiningen in this way - using it just for REPL
and running test-scripts with simple command lines, not having to
create projects (yet)?

Thanks in advance!
_henrik



On Aug 17, 3:46 pm, Nicolas Oury <nicolas.o...@gmail.com> wrote:
> defprotocol is a new feature of Clojure 1.2.
> A fantastic RC3 of this fantastic software is available.
>
> A good way to get it is to use the amazing Leiningen.
>
>
>
> On Tue, Aug 17, 2010 at 7:17 AM, Henrik Mohr <lupos...@gmail.com> wrote:
> > Hi there!
>
> > I'm a completely new newbie in the clojure sphere - old dog in Java
> > and a handful of other languages.
> > But Clojure is my first (new) functional language, and I'm very
> > excited about it - complements on your word Rich et. al.! :-)
>
> > To learn clojure I've started with the (beta) book "Seven Languages in
> > Seven Weeks" by Bruce Tate (pragprog.com) - great book by the way.
> > He's got a section called "defrecord and protocols" where he's got
> > this example:
>
> > (ns tate.compass)
> > (defprotocol Compass (direction [c]) (left [c]) (right [c]))
>
> > The problem for me is this: When I run the code I get this error
> > message from the "REPL":
> > java.lang.Exception: Unable to resolve symbol: defprotocol in this
> > context (NO_SOURCE_FILE:4)
>
> > I'm using the stable version of clojure 1.1 and clojure contrib 1.1.
> > I'm on OSX 10.6.4 and Apple JDK 1.6.0_20-b02-279-10M3065.
>
> > Please help! I'm stuck, and I don't want to procede (for too long)
> > until I figure out why I get this error ;)
>
> > Thanks in advance.
>
> > Kind regards,
> > Henrik Mohr
>
> > --
> > 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

Reply via email to