Re: Macros and syntax-quote

2008-11-20 Thread Rock
Thanks for your efforts Meikel. Greatly appreciated. Rock On Nov 20, 4:07 pm, Meikel Brandmeyer <[EMAIL PROTECTED]> wrote: > Hi, > > On 20 Nov., 14:28, Rich Hickey <[EMAIL PROTECTED]> wrote: > > > I didn't see any issues with wiki editing, ar eyou still having a > > problem? > > When I go to the

Re: Macros and syntax-quote

2008-11-20 Thread Meikel Brandmeyer
Hi, On 20 Nov., 14:28, Rich Hickey <[EMAIL PROTECTED]> wrote: > I didn't see any issues with wiki editing, ar eyou still having a > problem? When I go to the wiki, I get the notice, that there is one draft waiting for approval. : This is the latest sighted revision, approved on 18 November 2008

Re: Macros and syntax-quote

2008-11-20 Thread Rock
Maybe there should be a little more info regarding the syntax-quote expansion algorithm for more involved situations, especially nested backquotes. There seems to be just the bare minimum in the Reference section. The rest is gathered in bits and pieces here and there. Contrast this with the detai

Re: Macros and syntax-quote

2008-11-20 Thread Michael Wood
On Thu, Nov 20, 2008 at 3:32 PM, Simon Brooke <[EMAIL PROTECTED]> wrote: > On Nov 20, 12:19 pm, Jarkko Oranen <[EMAIL PROTECTED]> wrote: [...] >> I'm not a macro expert myself, but I hope this will help you and >> others as well. >> It's good to spend some time simply writing macros and using >> '

Re: Macros and syntax-quote

2008-11-20 Thread Simon Brooke
On Nov 20, 12:19 pm, Jarkko Oranen <[EMAIL PROTECTED]> wrote: > On Nov 20, 12:29 pm, Rock <[EMAIL PROTECTED]> wrote: > > > Is there any chance of getting a more thourough explanation within > > Clojure? I'm convinced this is an important issue, especially for > > those coming from the likes of Jav

Re: Macros and syntax-quote

2008-11-20 Thread Rich Hickey
On Nov 20, 7:38 am, Meikel Brandmeyer <[EMAIL PROTECTED]> wrote: > Hi, > > On 20 Nov., 13:30, Rich Hickey <[EMAIL PROTECTED]> wrote: > > > Yes. Please use auto-gensyms (name#): > > > `(let [frame# ~frame] > >(.setTitle frame# ~title) > >(.setVisible frame#) > >frame#) > > With this s

Re: Macros and syntax-quote

2008-11-20 Thread Meikel Brandmeyer
Hi, On 20 Nov., 13:30, Rich Hickey <[EMAIL PROTECTED]> wrote: > Yes. Please use auto-gensyms (name#): > > `(let [frame# ~frame] >    (.setTitle frame# ~title) >    (.setVisible frame#) >    frame#) With this specific example, my intention was to show, how using a macro where a function would do

Re: Macros and syntax-quote

2008-11-20 Thread Rich Hickey
On Nov 20, 6:39 am, Meikel Brandmeyer <[EMAIL PROTECTED]> wrote: > Hi, > > On 20 Nov., 11:29, Rock <[EMAIL PROTECTED]> wrote: > > > I was what the difference might be with respect to this: > > > `(let [frame ~frame] > >(.setTitle frame ~title) > >(.setVisible frame) > >frame) > > Th

Re: Macros and syntax-quote

2008-11-20 Thread Jarkko Oranen
On Nov 20, 12:29 pm, Rock <[EMAIL PROTECTED]> wrote: > I was just reading the Macro section in the WikiBook. Regarding the > following piece of code, > > `(let [~'frame ~frame] >    (.setTitle ~'frame ~title) >    (.setVisible ~'frame) >    ~'frame) > > I was what the difference might be with re

Re: Macros and syntax-quote

2008-11-20 Thread Meikel Brandmeyer
Hi, On 20 Nov., 12:49, Rock <[EMAIL PROTECTED]> wrote: > Just out of curiosity, do you know where I can find the code for > syntax-quote in the Clojure source? I would like to see how it's > implemented to possibly get a better understaning of it. You may have a look in Clojure's source in the s

Re: Macros and syntax-quote

2008-11-20 Thread Rock
Yeah. Thanks. Very clear. Just out of curiosity, do you know where I can find the code for syntax-quote in the Clojure source? I would like to see how it's implemented to possibly get a better understaning of it. Thanks again. On Nov 20, 12:39 pm, Meikel Brandmeyer <[EMAIL PROTECTED]> wrote: >

Re: Macros and syntax-quote

2008-11-20 Thread Meikel Brandmeyer
Hi, On 20 Nov., 11:29, Rock <[EMAIL PROTECTED]> wrote: > I was what the difference might be with respect to this: > >  `(let [frame ~frame] >    (.setTitle frame ~title) >    (.setVisible frame) >    frame) This won't work, since - assuming you are in namespace user - the backquote will expand t

Macros and syntax-quote

2008-11-20 Thread Rock
I was just reading the Macro section in the WikiBook. Regarding the following piece of code, `(let [~'frame ~frame] (.setTitle ~'frame ~title) (.setVisible ~'frame) ~'frame) I was what the difference might be with respect to this: `(let [frame ~frame] (.setTitle frame ~title) (.