#clojure logs

2008-04-02

12:02Chouserrhickey: I added my first file to clojure-contrib. Before I announce it in the group, did you want to peek at it at all?
12:03rhickeysure, one sec
12:03Chouserno rush.
12:05rhickeyneat - want to put a CPL.TXT in the directory?
12:06Chousersure
12:06rhickeythanks
12:06Chouserdone
12:07rhickeygreat! when I get time I'll put the ants and the spell demos in there
12:07Chousersufficiently idomatic? Worth having it in contrib at all?
12:08rhickeysure
12:08Chouseroh, ok -- perhaps I'll hold off mentioning it in the group until you've add more stuff?
12:09rhickeyno, go ahead - the things I have are already available
12:11rhickeynew glitch-free audio of the concurrency talk is up, for those that haven't yet suffered through the first version :)
12:12ChouserI got a call last night from a friend who, after listening to the talk and writing some clojure code, just wanted to call and "gush about Clojure".
12:13rhickeyfun
12:13Chouseryep, that was the general conclusion. Writing Clojure code is fun.
12:14rhickeyI had to write Clojure in order to keep programming fun for myself
12:20cgrandHi! I've got a bug: (macroexpand '(and 2)) throws an exception
12:20cgrand(expanded form is not checked to be a seq before the recursive call)
13:31Chouserany reason the symbol lists passed to refer are lists instead of vectors?
13:36rhickeyChouser: I don't think they have to be lists
13:37rhickeyquoted vectors seem weird to me
13:45rhickeycgrand: fixed, thanks
13:47cgrandthanks! any reason for macroexpand not using recur?
13:48rhickeyno, probably left over from when it was a macro
13:48rhickeyhopefully no one will blow stack with macroexpand :)
13:49cgrandI did (macros are new to me...)
13:49cgrand:-P
13:50Chouseroh. yeah. How was I thinking that vectors were quoted already? Well, nevermind then.
13:50rhickeycgrand: would have been an infinite loop otherwise
13:51rhickeyChouser: that's the trick, they are not quoted, they are evaluated
13:51rhickeybut you want the symbols, not their values
13:52Chouserright. right. I mean I clearly am using them correctly in several places, but somehow slipped a gear just now.
13:53Chouser[...] is like (list ...) not like '(...)
13:53rhickeyright
13:53Chouserand '[...] would seem, as you said, weird.
13:54rhickey'(a b c) for a list of symbols is an idiom
13:54Chouserhave you looked at webjure much?
13:55rhickeynot since it first came out
13:55rhickeynow you can do most of that in Clojure itself, given proxy
13:55ChouserIt's got a syntax for inlining html, which I didn't know when I wrote my own. So now I'm comparing...
13:57rhickeysee also: http://www.cl-user.net/asp/tags/11047
13:57Chouserit uses backquoted lists, ~, and ~@, while I just used nested vectors. I'm having a hard time seeing which is better.
13:58Chouserdoes webjure's use of backquotes somehow move some of the work to compile time and result in better runtime performance?
13:59rhickeyI'd like to see html gen, servlets, and url dispatch as separate libs
13:59Chousermy html gen is tiny
13:59ChouserOne 15 line function
14:00rhickeymacros are all compile time, syntax quote doesn't have particularly small output, non-optimized at present
14:00ChouserIt doesn't have any special support for javascript or CSS, which might be nice. Those might double it or so.
14:01Chouserok. I guess I need to look closer at what "defh" does, but it seems to me it's still got to insert values into that tree at runtime, and translate the tree to HTML after that, so I don't see that it can be doing a whole lot at compile time.
14:11ChouserI wonder if it's using `() just so that you can expand lists in-place using ~@
15:42abrooksChouser,rhickey: Should "coll?" (in zip-filter.clj) be added to boot.clj?
15:44rhickeyprobably, plus a few other of the tag interfaces, Sequential, Reversible etc
15:45rhickeyall should have predicates
16:58ChouserI don't know much about Java web servers and servlets. It looks like a web server expects to find a .class file for each servlet?
16:58ChouserThat seems like a poor fit for Clojure.
17:00Chouserwebjure seems to solve this by providing a single servlet and .class file itself, and then starting up clojure within itself, and loading .clj files from there.
17:20rhickeyChouser: yes, but I'm not sure it does the minimum in Java, maybe it does...
17:23ChouserIs it even possible to generate a class file from clojure code?
17:24rhickeynot right now, possibly never
17:24Chouserok that's what I thought. Not something I really want.
17:24Chouser...except that it seems to be required for Java Servlets, although I don't really want those either.
17:25rhickeyI like servlets, I think it will be good for Clojure to do web apps that way
17:25Chouseroh
17:26rhickeythey take care of the boilerplate, no?
17:26rhickeylots of server choices
17:26Chouserthere are lots of ways to take care of the boilerplate
17:27ChouserI have very little experience with servlets, so you should put too much weight on my opinion.
17:27Chouserrequiring a .class file to load them seems a little awkward, even if it wasn't for the mismatch with Clojure.
17:28rhickeythat's a one-time stub
17:28ChouserThere are lots of server apps that do servlets, but there are lots of low-cost hosting services which do not.
17:28rhickeyI think that will change now that Java is open source, not sure how long it will take
17:29ChouserHm. Ok.
17:30ChouserWell, it may be beside the point. If there's something that provides the interface between the Java Servlet environment and the Clojure environment (like webjure does), that interface can be documented and provided by other mechanisms.
17:31rhickeykind of, but you'd have to abstract the streams, the parameters, cookies, session state, authentication etc, all of which comes with servlet containers