#clojure log - May 09 2008

The Joy of Clojure
Main Clojure site
Google Group
List of all logged dates

10:17 Chouser: rhickey: still at Java One? Having fun?

10:18 rhickey: yeah, 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:52 Chouser: shootout? some kind of programming competition?

10:52 aking: Chouser: http://blogs.sun.com/seapegasus/entry/groovy_jruby_jython_scala_who

10:52 Chouser: I had a lot of fun at timed programming competitions in college.

10:54 aking: Results were: "Finally, Rags announces the winner: JRuby! Groovy comes second, then Scala, and Jython"

10:57 Chouser: hm, all prepared ahead of time? Surely we could come up with good solutions for problems like those.

10:58 asbjxrn: Ignorant 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:00 Or 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:03 Chouser: You can certainly load new .clj's, but I don't know about .jars

11:04 And of course .clj's can create new classes.

11:08 asbjxrn: Sure, 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:10 It 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:12 Chouser: It looks like it should be possible...

11:13 asbjxrn: Also, 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:20 Chouser: This is way out of my depth, but it looks like the JVM can do it, but Clojure may not support it (yet).

11:21 My 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:21 asbjxrn: No worries. It's mostly idle speculation atm. Don't have that many projects lined up yet...

11:32 rhickey: I think if I make the root classloader a url classloader then some dynamic jar loading may be possible.

11:32 drewr: Wow, jRuby beat Scala?

11:32 rhickey: Couser: yes, I'd love to see Clojure versions of the shootout problems

11:33 leadnose: is 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:33 rhickey: Scala didn't even have the web demo

11:33 Even though the presenter was a lift committer

11:33 Jython barely had anything

11:33 Only Groovy and JRuby were contenders

11:34 drewr: Props to Nutter, et al.

11:34 rhickey: Groovy opted out of the 3rd round, while JRuby had a flashy Processing-based gui demo

11:34 Otherwise I think it would have been close

11:35 drewr: I can't wait to see how Clojure compares.

11:35 rhickey: Clojure doesn't have anything like Rails/Grails yet

11:35 drewr: Oh, so the competition was only a webapp?

11:37 * drewr has been pondering a Clojure framework

11:37 rhickey: 3 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:37 drewr: I use the term "framework" loosely. I'm not a big fan.

11:38 rhickey: I agree (re: framework), I'd rather see good components than one-stop shopping

11:39 * rhickey hates ORM

11:39 drewr: After a few years of trying to make framework-driven development enhance my productivity, it only serves to drive me insane.

11:39 The abstractions leak too badly.

11:39 rhickey: I have the slides and will ask if I can disseminate the task descriptions

11:40 drewr: Django's the most tolerable, but that's because it makes much more of a component approach than others.

11:41 rhickey: A cl-who variant for Clojure would be nice

11:41 http://www.weitz.de/cl-who/

11:42 for db, resultsets into maps is perfectly fine IMO

11:43 meredydd: Hey. Is anyone here working on tab completion in the REPL?

11:43 drewr: meredydd: It works with SLIME. :-)

11:43 meredydd: Mmm....

11:43 I've been poking around, wondering whether it's worthwhile doing it myself

11:44 Chouser: the thing that produces the #clojure log web pages is written in Clojure and includes an s-expression-to-html function.

11:44 meredydd: However, "it's in Emacs" shouldn't surprise me at all.

11:45 drewr: 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:46 drewr: meredydd: The former.

11:46 meredydd: Nice - thanks.

11:47 drewr: About the only thing that doesn't work from SLIME that I miss is introspection.

11:51 rhickey: Chouser: does it support code replacement in the sexpr?

11:56 meredydd: drewr: Ah...it doesn't do that yet?

11:56 That's...mostly what I'd want to use it for :P

12:09 lisppaste8: Chouser pasted "dynamically add to classpath" at http://paste.lisp.org/display/60512

12:10 Chouser: I guess asbjxrn's gone, but there's his answer.

12:12 or *an* answer, since it's a little ... unprofessional.

12:25 rhickey: I use code inside the literal vectors and maps to build up the data I want (to then convert to HTML).

12:26 Also, I pasted this for dynamically adding to the classpath: http://paste.lisp.org/display/60512

13:09 leadnose: wow, clojure seems really, really neat

13:09 played with it for only about an hour and it feels so right :)

13:21 cgrand: chouser: nice hack

13:30 Chouser: yeah, I didn't even know you could change methods' accessibility like that.

15:48 ozzilee: Hey all, just started playing with Clojure. Is there a way to see a function's docstring in the REPL?

15:48 Holy cats it's just (doc foo). That was silly.

15:49 Is there a way to see all of the metadata for a function, though?

15:57 tw: (meta (var x)) where x is the symbol having metadata.

15:59 ozzilee: tw: Ah. Ok, time to look up what var means. Thanks.

Logging service provided by n01se.net