Hello,

As you see, java.io.File. construct takes path argument but it is the
first line of code and I don't know how *file* gets value of current
directory.


#!/usr/bin/env clj

(add-classpath (str "file://" (.getParent (java.io.File. *file*))
"/"))

(ns mire
  (:use [mire commands player rooms])
  (:use [clojure.contrib server-socket duck-streams]))
....

thanks,
sun






On Jan 28, 8:05 pm, wubbie <sunj...@gmail.com> wrote:
> Hi,
>
> I see
> (add-classpath (str "file://" (.getParent (java.io.File. *file*))
> "/"))
> in mire.clj.
> What value of *file* is it? I failed to see *file* is assigned at all.
>
> -thanks
> sun
>
> On Jan 27, 1:16 pm, Phil Hagelberg <p...@hagelb.org> wrote:
>
> > Keith Bennett <keithrbenn...@gmail.com> writes:
> > > I'm trying to wrap my head around Clojure's concurrency.  I'm new to
> > > Lisp-like languages, and the examples that I've found are a bit
> > > complex.
>
> > > Can anyone point me to simple examples of how concurrency works in
> > > Clojure?  (Not just one-liners, but examples that actually modify
> > > values from multiple threads, and hopefully print out some helpful
> > > information?
>
> > Sure; I created a program called Mire to play with this.
>
> > It's a multiplayer text adventure that uses refs to handle concurrent
> > access to things like who is in which rooms and who can pick up which
> > items. Since it's just dealing with text, it's still a very simple
> > codebase (around 200 lines). I think it should be pretty understandable.
>
> >https://github.com/technomancy/mire/tree
>
> > It's not thoroughly documented, but if you find anything particularly
> > confusing after reading and trying it out, feel free to ask about it.
> > The bulk of the functionality is in commands.clj, with some boring
> > server bits in mire.clj.
>
> > It may not be the most idiomatic code as I haven't read that much
> > Clojure code from other projects, so I'd be happy to get any suggestions
> > on how to improve that.
>
> > -Phil
>
>
--~--~---------~--~----~------------~-------~--~----~
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
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