newbie question: splitting up source files

2010-02-05 Thread Mike Jarmy
I'm writing a clojure program which is getting sort of large, so I'd like to split it up into separate source files. However, I'm having trouble figuring out how to tell the files about each other's existence. I'd like all the source files to be in the same namespace. Can someone straighten me o

Re: newbie question: splitting up source files

2010-02-05 Thread Mike Jarmy
winXP, java 1.6 On Fri, Feb 5, 2010 at 3:31 PM, Sean Devlin wrote: > What development environment are you using? > > On Feb 5, 1:57 pm, Mike Jarmy wrote: >> I'm writing a clojure program which is getting sort of large, so I'd >> like to split it up into separ

Re: newbie question: splitting up source files

2010-02-05 Thread Mike Jarmy
you classpath.  If you're just getting started, I'd suggest using > Netbeans/Enclojure, as it handles the classpath stuff for you, and you > can focus on learning Clojure. > > On Feb 5, 3:41 pm, Mike Jarmy wrote: >> winXP, java 1.6 >> >> On Fri, Feb 5, 2010 at

Re: newbie question: splitting up source files

2010-02-05 Thread Mike Jarmy
That yields ".;lib/clojure.jar", just as we'd expect. I also tried, "java -cp foo.clj;foo-util.clj;lib/clojure.jar clojure.main foo.clj", but that gave the same error. All of these classpaths work when I comment out the calls to "(require 'foo-util)" and "(frob)" -- which you would expect, since

Re: newbie question: splitting up source files

2010-02-05 Thread Mike Jarmy
) >  (frob)) > > (main) > > ;; foo-util.clj > (in-ns 'foo) > > (defn frob [] >  (print "hello from frob\n")) > > - Greg > > On Feb 5, 2010, at 4:38 PM, Mike Jarmy wrote: > >> That yields ".;lib/clojure.jar", just as we'd

Re: newbie question: splitting up source files

2010-02-05 Thread Mike Jarmy
7;foo) (load "foo-util") (defn aaa [arg] (print (format "hello from aaa: %s\n" arg)) (util "FOO-A")) ;; foo-util.clj (in-ns 'foo) (defn util [arg] (print (format "hello from util: %s\n" arg))) On Fri, Feb 5, 2010 at 5:26 PM, Mike Jarmy wr

Re: newbie question: splitting up source files

2010-02-05 Thread Mike Jarmy
@Richard: Yes, I think that makes sense. I am running into dependency problems when I try to split up the namespace -- my split-up files have a hard time refering to each other. So I think that file-per-namespace is the answer. @Sean: yes I will probably compile the app to a jar at some point. T

compiled namespaces referencing each other

2010-02-05 Thread Mike Jarmy
I've followed the directions at http://java.ociweb.com/mark/clojure/article.html#Compiling to compile a simple clojure app. In my base directory, I have a dir called classes, and another called src. I am attempting to follow Richard Newman's advice in the thread called "newbie question: splitting

Re: compiled namespaces referencing each other

2010-02-06 Thread Mike Jarmy
OK, thanks guys On Sat, Feb 6, 2010 at 12:04 AM, ataggart wrote: > Circular references mean your namespace design is broken. > > -- > 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