Re: on lisp and scheme macros

2011-12-06 Thread Tassilo Horn
"Jose A. Ortega Ruiz" writes: Hi Jose, >> I don't know scheme macros, so could you please explain why they are >> more powerful? What can you do with a syntax-case macro what you >> cannot do with a Common Lisp (or Clojure) macro? > > In general, syntax-case lets you manipulate first-class synt

Re: on lisp and scheme macros

2011-12-06 Thread Jose A. Ortega Ruiz
Hi Tassilo, On Tue, Dec 06 2011, Tassilo Horn wrote: > "Jose A. Ortega Ruiz" writes: > > Hi Jose, > >>> I think that Common Lisp macros are, strictly speaking, more powerful >>> than Scheme macros, but I don't have a citation. >> >> That's only true for syntax-rules macros. syntax-case macros,

Re: on lisp and scheme macros

2011-12-06 Thread Brian Goslinga
> Does that mean that Clojure's defmacro is aware of the lexical scope as > well and is therefore equally powerful as Scheme's syntax-case? > > Bye, > Tassilo In my implementation of syntax-rules/syntax-case, I did essentially the same thing as syntax-quote (had to reimplement it as there is no pro

Re: on lisp and scheme macros

2011-12-06 Thread Tassilo Horn
Stephen Compall writes: > On Tue, 2011-12-06 at 16:09 +0100, Tassilo Horn wrote: >> Wikipedia lists syntax-case as hygienic macro system, which would >> make it less powerful than CL macros, because if that was true, you >> could not write anaphoric macros with it. > > You can write anaphora with

Re: on lisp and scheme macros

2011-12-06 Thread Stephen Compall
On Tue, 2011-12-06 at 16:09 +0100, Tassilo Horn wrote: > Wikipedia lists syntax-case as hygienic macro system, which would make > it less powerful than CL macros, because if that was true, you could not > write anaphoric macros with it. You can write anaphora with syntax-case. In fact, defmacro i

Re: on lisp and scheme macros

2011-12-06 Thread Tassilo Horn
"Jose A. Ortega Ruiz" writes: Hi Jose, >> I think that Common Lisp macros are, strictly speaking, more powerful >> than Scheme macros, but I don't have a citation. > > That's only true for syntax-rules macros. syntax-case macros, which > most schemes provide and are required by R6RS, are, stric

Re: on lisp and scheme macros

2011-12-05 Thread Jose A. Ortega Ruiz
On Sat, Dec 03 2011, Stuart Sierra wrote: > I think that Common Lisp macros are, strictly speaking, more powerful > than Scheme macros, but I don't have a citation. That's only true for syntax-rules macros. syntax-case macros, which most schemes provide and are required by R6RS, are, strictly sp

Re: on lisp and scheme macros

2011-12-04 Thread Brian Goslinga
You might be interested in the paper 'Fortifying Macros': http://www.ccs.neu.edu/scheme/pubs/icfp10-cf.pdf syntax-parse is very cool and can give good error messages if the user makes a mistake when using the macro. About a year ago I tried making an implementation of a system like syntax-parse f

Re: on lisp and scheme macros

2011-12-04 Thread Joop Kiefte
Em 12/04/11 03:16, Razvan Rotaru escreveu: Wow. I didn't thought this was possible. You know, I have seen a lot of people saying that scheme macros are more "powerfull", citing the fact that scheme also has lisp macros, while it's not possible to do it the other way around. Of course it's possibl

Re: on lisp and scheme macros

2011-12-03 Thread Razvan Rotaru
Wow. I didn't thought this was possible. You know, I have seen a lot of people saying that scheme macros are more "powerfull", citing the fact that scheme also has lisp macros, while it's not possible to do it the other way around. On Dec 4, 2:06 am, Scott Jaderholm wrote: > Scheme style macros i

Re: on lisp and scheme macros

2011-12-03 Thread Marek Kubica
On Sun, 04 Dec 2011 00:08:36 +0100 Tassilo Horn wrote: > Stuart Sierra writes: > > > I think that Common Lisp macros are, strictly speaking, more > > powerful than Scheme macros, but I don't have a citation. > > Let over Lambda is essentially a huge essay about why there's and will > never be

Re: on lisp and scheme macros

2011-12-03 Thread Scott Jaderholm
Scheme style macros in Clojure: https://github.com/qbg/syntax-rules Scott On Sat, Dec 3, 2011 at 1:20 PM, Razvan Rotaru wrote: > Hi everyone, > > I was searching the web these days trying to find out more about these > two macro systems and understand their differences, and why one is > prefera

Re: on lisp and scheme macros

2011-12-03 Thread Peter Danenberg
This talk of "Scheme macros" is a little weird: are we talking syntax-case, explicit-renaming, or unhygienic defmacro? Scheme has them all. There are also implementation-specific mechanisms for writing reader macros: what's left? On Dec 3, 2011, at 14:57, Stuart Sierra wrote: > I think that

Re: on lisp and scheme macros

2011-12-03 Thread Tassilo Horn
Stuart Sierra writes: > I think that Common Lisp macros are, strictly speaking, more powerful > than Scheme macros, but I don't have a citation. Let over Lambda is essentially a huge essay about why there's and will never be anything as powerful than the CL macro system. Bye, Tassilo -- You r

Re: on lisp and scheme macros

2011-12-03 Thread Stuart Sierra
I think that Common Lisp macros are, strictly speaking, more powerful than Scheme macros, but I don't have a citation. -S -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts f

on lisp and scheme macros

2011-12-03 Thread Razvan Rotaru
Hi everyone, I was searching the web these days trying to find out more about these two macro systems and understand their differences, and why one is preferable over the other (or not). I'd like to share with you some ideas, and hopefully get some opinions back as well. Coming from the lisp side,