#clojure logs

2008-05-09

10:17Chouserrhickey: still at Java One? Having fun?
10:18rhickeyyeah, good show. I wish Clojure was better known - lots of JRuby and Groovy talks - which means there is a good climate for alternative JVM languages like Clojure. Maybe next year we can participate in the shootout...
10:52Chousershootout? some kind of programming competition?
10:52akingChouser: http://blogs.sun.com/seapegasus/entry/groovy_jruby_jython_scala_who
10:52ChouserI had a lot of fun at timed programming competitions in college.
10:54akingResults were: "Finally, Rags announces the winner: JRuby! Groovy comes second, then Scala, and Jython"
10:57Chouserhm, all prepared ahead of time? Surely we could come up with good solutions for problems like those.
10:58asbjxrnIgnorant question: Is it possible to dynamically add new java libraries after clojure has started up? (Add a jar that is not in the original classpath)
11:00asbjxrnOr will I have to know the location all libraries I might possibly need before I start the JVM and add that to the classpath when starting it?
11:03ChouserYou can certainly load new .clj's, but I don't know about .jars
11:04ChouserAnd of course .clj's can create new classes.
11:08asbjxrnSure, I'm thinking of using third-party libraries. And for those of us who use emacs, which doesn't have a project management focus like netbeans/enclojure where one can add individual libraries to individual projects, dynamic loading of libraries would be nice.
11:10asbjxrnIt feels like dynamic loading is not possible with java's original focus as a compiler, and with the usual passing of classpath when starting the jvm
11:12ChouserIt looks like it should be possible...
11:13asbjxrnAlso, I'm a emacs guy, but would like to use the gui designer in netbeans I think. I'm not sure what the best approach is but I'm thinking that creating a library with the interfaces and using that is easier/neater than creating an app in netbeans that calls out to clojure.
11:20ChouserThis is way out of my depth, but it looks like the JVM can do it, but Clojure may not support it (yet).
11:21ChouserMy guess is you'd need runtime access to Clojure's ROOT_CLASSLOADER, which itself might need some extra methods. but I'm really not sure.
11:21asbjxrnNo worries. It's mostly idle speculation atm. Don't have that many projects lined up yet...
11:32rhickeyI think if I make the root classloader a url classloader then some dynamic jar loading may be possible.
11:32drewrWow, jRuby beat Scala?
11:32rhickeyCouser: yes, I'd love to see Clojure versions of the shootout problems
11:33leadnoseis there some difference between loading .jars and .classes? i've loaded classes on the fly (compiling them from source if needed) but don't know about .jars
11:33rhickeyScala didn't even have the web demo
11:33rhickeyEven though the presenter was a lift committer
11:33rhickeyJython barely had anything
11:33rhickeyOnly Groovy and JRuby were contenders
11:34drewrProps to Nutter, et al.
11:34rhickeyGroovy opted out of the 3rd round, while JRuby had a flashy Processing-based gui demo
11:34rhickeyOtherwise I think it would have been close
11:35drewrI can't wait to see how Clojure compares.
11:35rhickeyClojure doesn't have anything like Rails/Grails yet
11:35drewrOh, so the competition was only a webapp?
11:37rhickey3 rounds, first a swing twitter client, second a web interface to a MySql demo db, third round was show off what you can do...
11:37drewrI use the term "framework" loosely. I'm not a big fan.
11:38rhickeyI agree (re: framework), I'd rather see good components than one-stop shopping
11:39drewrAfter a few years of trying to make framework-driven development enhance my productivity, it only serves to drive me insane.
11:39drewrThe abstractions leak too badly.
11:39rhickeyI have the slides and will ask if I can disseminate the task descriptions
11:40drewrDjango's the most tolerable, but that's because it makes much more of a component approach than others.
11:41rhickeyA cl-who variant for Clojure would be nice
11:41rhickeyhttp://www.weitz.de/cl-who/
11:42rhickeyfor db, resultsets into maps is perfectly fine IMO
11:43meredyddHey. Is anyone here working on tab completion in the REPL?
11:43drewrmeredydd: It works with SLIME. :-)
11:43meredyddMmm....
11:43meredyddI've been poking around, wondering whether it's worthwhile doing it myself
11:44Chouserthe thing that produces the #clojure log web pages is written in Clojure and includes an s-expression-to-html function.
11:44meredyddHowever, "it's in Emacs" shouldn't surprise me at all.
11:45meredydddrewr: Hmm...are you saying "SLIME has it, and works with Clojure", or "SLIME does it, so it's been done, but not yet for Clojure"?
11:46drewrmeredydd: The former.
11:46meredyddNice - thanks.
11:47drewrAbout the only thing that doesn't work from SLIME that I miss is introspection.
11:51rhickeyChouser: does it support code replacement in the sexpr?
11:56meredydddrewr: Ah...it doesn't do that yet?
11:56meredyddThat's...mostly what I'd want to use it for :P
12:09lisppaste8Chouser pasted "dynamically add to classpath" at http://paste.lisp.org/display/60512
12:10ChouserI guess asbjxrn's gone, but there's his answer.
12:12Chouseror *an* answer, since it's a little ... unprofessional.
12:25Chouserrhickey: I use code inside the literal vectors and maps to build up the data I want (to then convert to HTML).
12:26ChouserAlso, I pasted this for dynamically adding to the classpath: http://paste.lisp.org/display/60512
13:09leadnosewow, clojure seems really, really neat
13:09leadnoseplayed with it for only about an hour and it feels so right :)
13:21cgrandchouser: nice hack
13:30Chouseryeah, I didn't even know you could change methods' accessibility like that.
15:48ozzileeHey all, just started playing with Clojure. Is there a way to see a function's docstring in the REPL?
15:48ozzileeHoly cats it's just (doc foo). That was silly.
15:49ozzileeIs there a way to see all of the metadata for a function, though?
15:57tw(meta (var x)) where x is the symbol having metadata.
15:59ozzileetw: Ah. Ok, time to look up what var means. Thanks.