#clojure logs

2008-06-14

02:51asbjxrnI got the latest svn version of clojure, and now I can't start the repl? Exception in thread "main" java.lang.NoSuchMethodError: clojure.lang.RT.cons(Ljava/lang/Object;Lclojure/lang/ISeq;)Lclojure/lang/ISeq;
02:52asbjxrnI basically did a svn update, mvn install, java -cp clojure-lang-1.0-SNAPSHOT.jar clojure.lang.Repl
02:55hoeckasbjxrn: maybe you need to clean first
02:56asbjxrnThat is "mvn clean" ?
02:56hoecki dont know, i'm using ant, but i just deleted the 'classes' folder
02:57asbjxrnIt did something at least. I'm just using mvn because it was described in one getting started doc I read when I started out with clojure.
02:58asbjxrnSeems to have done the trick.
02:58asbjxrnThanks.
02:58hoeckbut when 'mvn install' works, 'mvn clean' should work to, sounds all like 'make'
02:58hoeckfine
02:59hoeck:)
10:26asbjxrnThe current lib.clj in Contrib seem to require that a lib is contained in one file, anyone working on a more sophisticated package/library system?
10:49Chouseryou plan to have multiple .clj files contributing to the same namespace?
10:49asbjxrnMaybe, yes. If you have a library of some size, it could get messy to have it all in one big file I thought.
10:51ChouserI haven't done anything large enough in Clojure yet to worry about that.
10:51asbjxrnOf course, Rick has 2597 lines in boot.clj, which may set some sort of precedence... :)
10:54asbjxrnI don't really have plans for anything real big now, but I would imagine people at some point might start building large libraries.
11:30Lau_of_DKHey Chouser
12:22Lau_of_DKrhickey, is there a curses lib available for Clojure atm ?
12:27rhickeyLau_of_DK: not for Clojure specifically, but maybe for Java
12:29Lau_of_DKk, I'll look into it
12:58Lau_of_DKThe only option seems to be a project on SourceForge - Generally do I just add these .jar files to my /project/directory and then I can import - or is there a better way of handling it ?
13:16dudleyfLau_of_DK: You need to add them to your classpath
13:18dudleyfAnd if there's native JNI code, you need to add that to the Java library path
13:22dudleyfLau_of_DK: There's a script to help with that for clojure at http://github.com/dudleyf/clojure-bin
13:50Lau_of_DKdudleyf, good stuff, thanks :)
13:52Lau_of_DKBut why is this stuff on its own github - I had the impression that all such additions, would be collected in the Clojure-Contrib ?
13:54dudleyfLau_of_DK: Github was the easiest place for me
13:56dudleyfAnd I don't have a commit bit to clojure-contrib ;-)
13:58Lau_of_DKOkay my friend :)
14:12Lau_of_DKdudleyf, if I dont specify the classpath when I execute the program, do you know what it defaults to ?
14:14dudleyfIf CLOJURE_CLASSPATH isn't set, it defaults to "$CLOJURE_HOME/clojure.jar:."
14:15Lau_of_DKIm not sure I follow - if I "echo $CLOJURE_CLASSPATH" or "$CLOJURE_HOME", it doesnt look like theyre set at all
14:15dudleyfIf the script is in a bin/ directory inside your clojure distribution, it'll figure out CLOJURE_HOME automatically
14:16dudleyfotherwise you need to set CLOJURE_HOME to the root of the Clojure distribution
14:16Lau_of_DKYou want me to make .../clojure/bin? Because I only have /src and /target atm
14:17dudleyfYep
14:17Lau_of_DKDoes this approach make deployment more complex, or is there a simple way to distribute?
14:18dudleyfWell, the idea is that eventually this script or something like it will be part of the Clojure distribution
14:19dudleyfSo that everyone won't have to distribute their own startup script with every application
14:19Lau_of_DKOk - But just to put it in the simplest possible terms - I need to distribute a standard clojure.clj file, which depends on 1 custom .jar file - Can I just place them in the same directory?
14:23dudleyfYou'll need to add the jar file to the classpath somehow
14:24dudleyfHow are you launching Clojure to run your .clj file?
14:24Lau_of_DKjava -cp clojure.jar clojure.lang.Script c.clj
14:25dudleyfThen you can just do:
14:25dudleyfjava -cp clojure.jar:custom.jar clojure.lang.Script c.clj
14:33Lau_of_DKok - and how would executing your script look compared to that?
14:37dudleyfassuming it was living in CLOJURE_HOME/bin, and that directory was in the path
14:37dudleyfclojure -cp custom.jar c.clj
14:38dudleyfOr, you could set CLOJURE_LIB to some directory, stick custom.jar in that directory, and just run
14:38dudleyfclojure c.clj
14:39Lau_of_DKalright - simplicity's the word
14:46ChouserIs (def) atomic and threadsafe?
14:49Lau_of_DKInteresting questions
14:49Lau_of_DK-s
14:52ChouserI think it has to be, but I'm not sure I've ever heard Rich say that it is.
14:53Lau_of_DKYea I think it is
14:53Lau_of_DK(which probably means that it isnt)
14:59ChouserMy ability to read Compiler.java is very limited, but it looks to me like it's doing some checks and then some more work, which is the classic non-atomic pattern.
15:00Chouserand no locking that I can see, so not thread-safe.
15:00Lau_of_DKBut what parts of a def could change, without it being a new def?
15:01ChouserI just want to know if two threads tried to do a (def foo ...) at the same time, is there any chance of ending up in a broken state, or if whichever goes last would get a clean win.
15:02Lau_of_DKrhickey, whats the verdict?
15:03Chouserhm, the code I'm looking at is during compilation perhaps? Var's bindRoot is synchronized, so maybe that's good enough.
15:45Lau_of_DKMaybe its faster just to try and create some race conditions and see what happends :)
16:44Chouser:-)
17:05Lau_of_DKChouser, ignore this question, dont even read it: Any other emacs users here, that loose code-hints after CcCc'ing a process in the REPL?
18:46regularfry'Ning all... Anyone using clojure+slime+emacs 22.1 on Windows?