srfi-72

2012-07-10 Thread Stefan Israelsson Tampe
Hi, I have thought about what abstraction is needed to be supported by psyntax in order to implement srfi-72. Consider macro expansion of code #'C, ideally we would like to write the expansion as E#'C with E an expansion operator. For two expansion operators E,F we would expect to support this E(

Re: [racket-dev] Enhancement to the syntax system?

2012-07-10 Thread Stefan Israelsson Tampe
The question I posed was If it's possible to use srfi-72 in guile or racket. It is indeed a wish of mine that it's implemented because it will most certainly help me write beutiful code because that srfi cater to the coding style Ichoose to have. Without it one most certainly need to use with-synta

Re: [racket-dev] Enhancement to the syntax system?

2012-07-10 Thread Eli Barzilay
An hour and a half ago, Matthew Flatt wrote: > > It's natural --- but not correct --- to think that #` is responsible > for hygiene, in which case `(f #'x)' should keep the given `x' > separate from the `let'-bound `x' in the result. > > Instead, hygiene is the responsibility of macro invocation,

Re: [racket-dev] Enhancement to the syntax system?

2012-07-10 Thread Ryan Culpepper
On 07/10/2012 10:51 AM, Eli Barzilay wrote: 20 minutes ago, Marijn wrote: It seems to me that both these results cannot be correct simultaneously, but I'll await the experts' opinion on that. This does look weird: #lang racket (define-for-syntax (f stx) #`(let ([x 1]) #,stx)) (defin

Re: [racket-dev] Enhancement to the syntax system?

2012-07-10 Thread Matthew Flatt
At Tue, 10 Jul 2012 10:51:57 -0400, Eli Barzilay wrote: > 20 minutes ago, Marijn wrote: > > > > It seems to me that both these results cannot be correct > > simultaneously, but I'll await the experts' opinion on that. > > This does look weird: > > #lang racket > (define-for-syntax (f stx) #`

Re: Guile build failure

2012-07-10 Thread David Pirotte
Hi Ludovic, > Which branch is it? Did you try the 2.0.6 tarball? This was using stable. No I didn't try the tarball, but since you asked i just did and did in 2 different locations: /opt [no nfs] and /usr/local/src [uses nfs] and make check passes on /opt but fails on /usr/local/src ... Tot

Re: [racket-dev] Enhancement to the syntax system?

2012-07-10 Thread Stefan Israelsson Tampe
samth made a pointer to http://srfi.schemers.org/srfi-72/srfi-72.html It does not look like guile racket etc. have implemented this yet. Am I wrong? This is precisely what I'm after! On Tue, Jul 10, 2012 at 5:26 PM, Ludovic Courtès wrote: > Hi, > > Matthew Flatt skribis: > > > It's natural

Re: [racket-dev] Enhancement to the syntax system?

2012-07-10 Thread Ludovic Courtès
Hi, Matthew Flatt skribis: > It's natural --- but not correct --- to think that #` is responsible > for hygiene, in which case `(f #'x)' should keep the given `x' separate > from the `let'-bound `x' in the result. [...] > If you change the example to > > #lang racket > (begin-for-syntax >

Re: Enhancement to the syntax system?

2012-07-10 Thread Ludovic Courtès
Hi, Stefan Israelsson Tampe skribis: > racket: > (define-for-syntax (f x) #`(let ((x 1)) #,x)) >> (define-syntax (g x) (syntax-case x ()((_ y) #`(let ((x y)) #,(f #'x > ) >> (g 4) > 4 > > In guile, > scheme@(guile-user)> (define (f x) #`(let ((x 1)) #,x)) > scheme@(guile-user)> (define-synta

Re: [racket-dev] Enhancement to the syntax system?

2012-07-10 Thread Eli Barzilay
20 minutes ago, Marijn wrote: > > It seems to me that both these results cannot be correct > simultaneously, but I'll await the experts' opinion on that. This does look weird: #lang racket (define-for-syntax (f stx) #`(let ([x 1]) #,stx)) (define-syntax (m stx) (with-syntax ([zz (f #'x

Re: Enhancement to the syntax system?

2012-07-10 Thread Marijn
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 10-07-12 15:35, Stefan Israelsson Tampe wrote: > I did miss something when trying in racket, it's a psyntax bug! I'm glad you're finally looking harder at the Racket behavior. > racket: (define-for-syntax (f x) #`(let ((x 1)) #,x)) >> (define-synt

Re: Enhancement to the syntax system?

2012-07-10 Thread Stefan Israelsson Tampe
I did miss something when trying in racket, it's a psyntax bug! Look! racket: (define-for-syntax (f x) #`(let ((x 1)) #,x)) > (define-syntax (g x) (syntax-case x ()((_ y) #`(let ((x y)) #,(f #'x ) > (g 4) 4 In guile, scheme@(guile-user)> (define (f x) #`(let ((x 1)) #,x)) scheme@(guile-user)

Re: Enhancement to the syntax system?

2012-07-10 Thread Ludovic Courtès
Hi! Stefan Israelsson Tampe skribis: > | It’s true that it’s annoying that the wrong binding is silently used. > | Do you think it’s common enough to justify new syntax? > > Yes this highlights a comon problem when implementing racket match with #`. Sure, but it’s not good-style. ;-) In gener

Guile build failure

2012-07-10 Thread Ludovic Courtès
Hi David, David Pirotte skribis: > It compiles fine here, from git, Which branch is it? Did you try the 2.0.6 tarball? [...] >?: 1 [primitive-load > "/usr/local/src/guile/git-clone/test-suite/tests/load.test"] >?: 0 [rmdir "/mnt/galia/linux/64/local/src/guile/git-clone/load-test.dir

Re: Enhancement to the syntax system?

2012-07-10 Thread Stefan Israelsson Tampe
Ok, I coded a suggested syntax that is a quick solution but maybe not ideal because really this should be hanlded on the psyntax level. We probably cannot use the old syntax because it can break old code in other words one has to introduce new language elements. Also I asked on #scheme and tried to