Re: [Chicken-users] macro systems and chicken (long)

2008-04-18 Thread Alaric Snell-Pym
On 18 Apr 2008, at 3:32 am, Alex Shinn wrote: Alaric> When *will* it happen in practice? You could force it whenever you want with make-syntactic-closure. I think in this case it's only likely to come about as part of a higher order macro that closes individual parts all the time for safe

Re: [Chicken-users] macro systems and chicken (long)

2008-04-17 Thread Alex Shinn
> "Alaric" == Alaric Snell-Pym <[EMAIL PROTECTED]> writes: Alaric> On 17 Apr 2008, at 12:58 pm, Alex Shinn wrote: >> >> could fail if the (var val) ... list were passed as a >> syntax object. Though probably this would never >> happen in practice. Alaric> When *will*

Re: [Chicken-users] macro systems and chicken (long)

2008-04-17 Thread Alaric Snell-Pym
On 17 Apr 2008, at 12:58 pm, Alex Shinn wrote: (define-syntax let (er-macro-transformer (lambda (expr rename compare) `((lambda ,(map car (cadr expr)) ,@(cddr expr)) ,@(map cadr (cadr expr)) or equivalently with MATCH destructuring (define-syntax let (e

Re: [Chicken-users] macro systems and chicken (long)

2008-04-17 Thread Alex Shinn
> "Alaric" == Alaric Snell-Pym <[EMAIL PROTECTED]> writes: >> "define-record-type" (SRFI-9) should be >> sufficient. The problem is that it is not that easy >> to construct identifiers in hygienic macros (or it >> probably is, I don't know, I haven't thought about it >> ver

Re: [Chicken-users] macro systems and chicken (long)

2008-04-14 Thread felix winkelmann
On Sat, Apr 12, 2008 at 5:44 AM, Jim Ursetto <[EMAIL PROTECTED]> wrote: > > > On 4/7/08, felix winkelmann <[EMAIL PROTECTED]> wrote: > > > Oh no, not at all. Wait until you've seen it and until the moment comes > > when 50% of all eggs break and you have to migrate spiffy... > > A small price t

Re: [Chicken-users] macro systems and chicken (long)

2008-04-12 Thread Alaric Snell-Pym
On 9 Apr 2008, at 11:31 am, felix winkelmann wrote: (use riaxpander) (define-macro (my-assert test error) `(if (not ,test) (error ,error))) (define-syntax foo (syntax-rules () ((_ x) (let ((tmp x)) (my-assert x "failed") (macroexpand '(let ((x 1)) (foo x)))

Re: [Chicken-users] macro systems and chicken (long)

2008-04-12 Thread Peter Bex
On Fri, Apr 11, 2008 at 09:44:30PM -0600, Jim Ursetto wrote: > > > On 4/7/08, felix winkelmann <[EMAIL PROTECTED]> wrote: > > > Oh no, not at all. Wait until you've seen it and until the moment comes > > when 50% of all eggs break and you have to migrate spiffy... > > A small price to pay. Jus

Re: [Chicken-users] macro systems and chicken (long)

2008-04-11 Thread Jim Ursetto
On 4/7/08, felix winkelmann <[EMAIL PROTECTED]> wrote: > Oh no, not at all. Wait until you've seen it and until the moment comes > when 50% of all eggs break and you have to migrate spiffy... A small price to pay. I would gladly do the drudge work to migrate as many eggs as possible. ___

Re: [Chicken-users] macro systems and chicken (long)

2008-04-09 Thread felix winkelmann
On Tue, Apr 8, 2008 at 12:45 PM, Alaric Snell-Pym <[EMAIL PROTECTED]> wrote: > > riaxpander manages this: > > > > (use riaxpander) > > > > (define-macro (my-assert test error) > >`(if (not ,test) (error ,error))) > > > > > > (define-syntax foo > >(syntax-rules () > >

Re: [Chicken-users] macro systems and chicken (long)

2008-04-09 Thread felix winkelmann
On Tue, Apr 8, 2008 at 12:24 PM, Alaric Snell-Pym <[EMAIL PROTECTED]> wrote: > > > > > "define-record-type" (SRFI-9) should be sufficient. The problem is > > that > > it is not that easy to construct identifiers in hygienic macros (or > > it probably > > is, I don't know, I haven't thought about it

Re: [Chicken-users] macro systems and chicken (long)

2008-04-08 Thread Alaric Snell-Pym
Actually, here's a more twisted test case with lots of shadowing of names with different values at different levels: (use riaxpander) (define-macro (my-assert test error) `(if (not ,test) (error ,error))) (define-syntax foo (syntax-rules () ((_ x) (let ((tmp x)

Re: [Chicken-users] macro systems and chicken (long)

2008-04-08 Thread Alaric Snell-Pym
Yes, but this is a problem with renamed bindings introduced by hygienic macros. For example: (define-syntax foo (syntax-rules () ((_ x) (let ((tmp x)) (assert x "failed") riaxpander manages this: (use riaxpander) (define-macro (my-assert test error) `(if (not ,test) (

Re: [Chicken-users] macro systems and chicken (long)

2008-04-08 Thread Alaric Snell-Pym
"define-record-type" (SRFI-9) should be sufficient. The problem is that it is not that easy to construct identifiers in hygienic macros (or it probably is, I don't know, I haven't thought about it very much, yet. There are many loose ends in the moment since so much changes). It shouldn't be a

Re: [Chicken-users] macro systems and chicken (long)

2008-04-08 Thread felix winkelmann
On Mon, Apr 7, 2008 at 12:24 PM, Alaric Snell-Pym <[EMAIL PROTECTED]> wrote: > > Wooohoo! Is there any overlap of work there with Alex's changes to > riaxpander - can you use that and save some effort? > No, currently not. > > > > The downside is that define-record and in particular define-macr

Re: [Chicken-users] macro systems and chicken (long)

2008-04-08 Thread felix winkelmann
On Mon, Apr 7, 2008 at 4:06 PM, Graham Fawcett <[EMAIL PROTECTED]> wrote: > > > The downside is that define-record and in particular define-macro have to > go. > > define-record has to go? That's scary. I can live without define-macro > (now that Alex has shown me how to do low-level macrology

Re: [Chicken-users] macro systems and chicken (long)

2008-04-07 Thread Graham Fawcett
On Mon, Apr 7, 2008 at 6:11 AM, felix winkelmann <[EMAIL PROTECTED]> wrote: > I'm currently working on a hygienic version of chicken (explicit-renaming + > syntax-rules) which is a first requirement for a full, macro-aware > module system (which is also being implemented). This will be fully >

Re: [Chicken-users] macro systems and chicken (long)

2008-04-07 Thread Alaric Snell-Pym
I'm currently working on a hygienic version of chicken (explicit- renaming + syntax-rules) which is a first requirement for a full, macro-aware module system (which is also being implemented). This will be fully integrated and compatible with all special features (non-contiguous local definitions,

Re: [Chicken-users] macro systems and chicken (long)

2008-04-07 Thread felix winkelmann
On Mon, Apr 7, 2008 at 12:19 PM, Peter Bex <[EMAIL PROTECTED]> wrote: > On Mon, Apr 07, 2008 at 12:11:12PM +0200, felix winkelmann wrote: > > I'm currently working on a hygienic version of chicken (explicit-renaming + > > syntax-rules) which is a first requirement for a full, macro-aware > > mod

Re: [Chicken-users] macro systems and chicken (long)

2008-04-07 Thread Peter Bex
On Mon, Apr 07, 2008 at 12:11:12PM +0200, felix winkelmann wrote: > I'm currently working on a hygienic version of chicken (explicit-renaming + > syntax-rules) which is a first requirement for a full, macro-aware > module system (which is also being implemented). Felix, you ROCK! There, that had

Re: [Chicken-users] macro systems and chicken (long)

2008-04-07 Thread felix winkelmann
On Fri, Apr 4, 2008 at 2:57 PM, Alaric Snell-Pym <[EMAIL PROTECTED]> wrote: > > What are people's feelings about moving it into the core? I know it's > nice to keep it simple, but there's a certain un-simplicity in > defining all the core macros with define-macro to just have them > redefined i

Re: [Chicken-users] macro systems and chicken (long)

2008-04-07 Thread felix winkelmann
On Fri, Apr 4, 2008 at 1:56 PM, Alex Shinn <[EMAIL PROTECTED]> wrote: > There seems to be a lot of confusion in the Chicken > community, and the Lisp community in general, about the > different macro systems, so I thought provide some > background information and discussion of the eggs available

Re: [Chicken-users] macro systems and chicken (long)

2008-04-06 Thread Vincent Manis
On 2008 Apr 06, at 23:19, Vincent Manis wrote: Scheme, but, if Scheme (or Lisp in general) were widely used, EVAL- injection attacts would be very popular among crackers. It's a wonderful feature, Er, `attacks'. I'm not sure what an EVAL-injection attact might be. -- vincent __

Re: [Chicken-users] macro systems and chicken (long)

2008-04-06 Thread Vincent Manis
On 2008 Apr 06, at 22:59, Elf wrote: And as I believe I heard someone say on #scheme the other day, if your program involves EVAL, it's probably broken. Even if the EVAL is hidden behind something else. This sentence makes no sense to me, as this would imply that all programs are always brok

Re: [Chicken-users] macro systems and chicken (long)

2008-04-06 Thread Elf
On Sun, 6 Apr 2008, Robin Lee Powell wrote: On Sun, Apr 06, 2008 at 10:04:26PM -0700, Elf wrote: On Sat, 5 Apr 2008, John Cowan wrote: Alex Shinn scripsit: DEFINE-MACRO is just EVAL. Syntactic closures is just EVAL with the two extra env parameters, [...]. And as I believe I heard someon

Re: [Chicken-users] macro systems and chicken (long)

2008-04-06 Thread Robin Lee Powell
On Sun, Apr 06, 2008 at 10:04:26PM -0700, Elf wrote: > On Sat, 5 Apr 2008, John Cowan wrote: > >> Alex Shinn scripsit: >> >>> DEFINE-MACRO is just EVAL. Syntactic closures is just EVAL with >>> the two extra env parameters, [...]. >> >> And as I believe I heard someone say on #scheme the other day

Re: [Chicken-users] macro systems and chicken (long)

2008-04-06 Thread Elf
On Sat, 5 Apr 2008, John Cowan wrote: Alex Shinn scripsit: DEFINE-MACRO is just EVAL. Syntactic closures is just EVAL with the two extra env parameters, [...]. And as I believe I heard someone say on #scheme the other day, if your program involves EVAL, it's probably broken. Even if the EV

Re: [Chicken-users] macro systems and chicken (long)

2008-04-05 Thread John Cowan
Alex Shinn scripsit: > There seems to be a lot of confusion in the Chicken > community, and the Lisp community in general, about the > different macro systems, so I thought provide some > background information and discussion of the eggs available > in Chicken and their uses. A superb article! -

Re: [Chicken-users] macro systems and chicken (long)

2008-04-05 Thread John Cowan
Alex Shinn scripsit: > DEFINE-MACRO is just EVAL. Syntactic closures is just EVAL > with the two extra env parameters, [...]. And as I believe I heard someone say on #scheme the other day, if your program involves EVAL, it's probably broken. Even if the EVAL is hidden behind something else. Et

Re: [Chicken-users] macro systems and chicken (long)

2008-04-05 Thread Alex Shinn
> "John" == John Cowan <[EMAIL PROTECTED]> writes: John> Alaric Snell-Pym scripsit: >> Syntax-rules is handy for simple stuff, but I'd hate >> for it to be the only macro system I had - I like to >> think of it as a shorthand for a reasonably common >> case, TBH. John>

Re: [Chicken-users] macro systems and chicken (long)

2008-04-05 Thread Alaric Snell-Pym
On 4 Apr 2008, at 7:32 pm, John Cowan wrote: I suppose that syntax extension is one thing, arbitrary compile-time programming is another. It's useful to be able to express common patterns directly in the language, but I don't see the point of running code in the compiler, which is a rather con

Re: [Chicken-users] macro systems and chicken (long)

2008-04-04 Thread John Cowan
Alaric Snell-Pym scripsit: > > I think quite otherwise: I would never write a macro in any system > > other than syntax-rules -- all other macro systems strike me as > > standing on a foundation of quicksand. > > Oooh, interesting! > > Pray tell? I suppose that syntax extension is one thing, ar

Re: [Chicken-users] macro systems and chicken (long)

2008-04-04 Thread Leonardo Valeri Manera
On 04/04/2008, Alaric Snell-Pym <[EMAIL PROTECTED]> wrote: > ...but I'm just lazy ;-) I think I'm going to bite the bullet and > install riaxpander and use er+match for everything, in the hope that > if enough momentum builds up around that, it'll become the de-facto > standard and there will b

Re: [Chicken-users] macro systems and chicken (long)

2008-04-04 Thread Alaric Snell-Pym
On 4 Apr 2008, at 4:22 pm, John Cowan wrote: Alaric Snell-Pym scripsit: Syntax-rules is handy for simple stuff, but I'd hate for it to be the only macro system I had - I like to think of it as a shorthand for a reasonably common case, TBH. I think quite otherwise: I would never write a macro

Re: [Chicken-users] macro systems and chicken (long)

2008-04-04 Thread John Cowan
Alaric Snell-Pym scripsit: > Syntax-rules is handy for simple stuff, but I'd hate for it to be the > only macro system I had - I like to think of it as a shorthand for a > reasonably common case, TBH. I think quite otherwise: I would never write a macro in any system other than syntax-rules -- a

Re: [Chicken-users] macro systems and chicken (long)

2008-04-04 Thread Alaric Snell-Pym
On 4 Apr 2008, at 12:56 pm, Alex Shinn wrote: There seems to be a lot of confusion in the Chicken community, and the Lisp community in general, about the different macro systems, so I thought provide some background information and discussion of the eggs available in Chicken and their uses. *a

[Chicken-users] macro systems and chicken (long)

2008-04-04 Thread Alex Shinn
There seems to be a lot of confusion in the Chicken community, and the Lisp community in general, about the different macro systems, so I thought provide some background information and discussion of the eggs available in Chicken and their uses. --- Background --- There are two completely orthogo