#clojure logs

2008-05-10

04:55esquesquehello
04:55esquesquei was wondering if clojure had an equivalent of cl's return-from
12:08Chouseresquesque: I don't think so. There's been a related discussion recently: http://groups.google.com/group/clojure/browse_thread/thread/90eae0f570989254
12:14asbjxrnAnyone got hints for how to write a macro that uses variable capture?
12:20asbjxrnI keep getting that "Can't use qualified name as parameter" error.
12:21asbjxrnhttp://paste.lisp.org/display/60547 for an example of what I want.
15:28Chouserasbjxrn: try ~(symbol "x") instead of just x
15:46hoeckasbjxrn: or ~'x
15:56Chouserno way! so much better.
15:56Chouserhoeck: thanks. :-)
16:13hoeckchouser: :)
21:01asbjxrnChouser, I tried that. Same error, unfortunally.
21:04rhickeytried what?
21:05asbjxrnusing ~'x instead of just x in my macro where I try to use variable capture.
21:06asbjxrnI posted on the group as well: http://groups.google.com/group/clojure/browse_thread/thread/b4102f39dcc28569#
21:15rhickey~' is the way to expose symbols without resolution, so maybe something else is wrong? Can you paste it on paste.lisp.org?
21:18asbjxrnhttp://paste.lisp.org/display/60547#1
21:20asbjxrnHmm. The namespace isn't clean when I do this, but I hope there nothing that interferes
21:22asbjxrnMacroexpansion looks ok: http://paste.lisp.org/display/60547#2
21:24rhickeyenv is your problem - you probably want a gensym, try env#
21:25asbjxrnDoh.
21:37asbjxrnAnother question: How do I subclass a class? This feels like it should be elementary, but I haven figured it out. (Say I want to add a environment map to a JPanel, for example.)
21:37rhickeyuse proxy
21:39rhickeyin order to get state, close over it
21:39asbjxrnI thought so, but I've only seen how to add/override func... Ah. another doh....
21:41rhickeydon't sweat it, it's a different way to look at things for sure
21:42asbjxrnWell, I'm coming from the lisp side of the fence, so closures shouldn't be a big conceptual step...
21:43rhickeyright, but not the way you'd think of extending Java classes necessarily
21:44rhickeythere is a newer way in SVN, and it does allow for a single final state field - see src/genclass.clj