Re: syntax closures

2013-02-15 Thread Stefan Israelsson Tampe
BTW. Of cause if you read the doc's for srfi-72 you will see a whole different machinery that brings many features, they explicitly states 6 facts in the abstract for which I adress one in the code. On the other hand when they try to sell it it they just uses examples for the case for witch I try

Re: syntax closures

2013-02-15 Thread Stefan Israelsson Tampe
How about h-quasisyntax for hygienic quasisyntax ? On Fri, Feb 15, 2013 at 5:16 AM, Mark H Weaver wrote: > Stefan Israelsson Tampe writes: >> Let's call it guile-srfi-72, In the end it is a srfi-72 simulator [...] > > I'm pretty sure this is also false. One of the main points of SRFI-72 > is

Re: syntax closures

2013-02-14 Thread Mark H Weaver
Stefan Israelsson Tampe writes: > Let's call it guile-srfi-72, In the end it is a srfi-72 simulator [...] I'm pretty sure this is also false. One of the main points of SRFI-72 is the improved hygiene algorithm, which is quite different than psyntax in its details. Unless I'm mistaken, you have

Re: syntax closures

2013-02-14 Thread Stefan Israelsson Tampe
I didn't know that this was a taken name already, Let's call it guile-srfi-72, In the end it is a srfi-72 simulator that mix well with the current guile macro system but is not a perfect replacement (yet) I'll check it out, But srfi-72 really covers a need I have when writing macros with syntax-p

Re: syntax closures

2013-02-14 Thread Mikael Djurfeldt
Just saw this. Right, "syntactic closures" is the name of a macro system by Alan Bawden and Jonathan Rees: http://en.wikipedia.org/wiki/Syntactic_closures http://www.gnu.org/software/mit-scheme/documentation/mit-scheme-ref/Syntactic-Closures.html#Syntactic-Closures So, it would be good to choos

Re: syntax closures

2013-01-24 Thread Alex Shinn
On Thu, Jan 24, 2013 at 4:11 PM, Stefan Israelsson Tampe < stefan.ita...@gmail.com> wrote: > > 2. I was actually hesistant to call this srfi-72 because of trying to > do what it want >more than what it say's. A main trick to simulate the effect was to > introduce >a closure in the syntax a

Re: syntax closures

2013-01-23 Thread Stefan Israelsson Tampe
Hi Alex! > Note SRFI-72 is not an implementation of syntactic-closures. > It's an alternate hygiene algorithm closer to the R6RS one which > includes a compatible syntax-case and some convenience utilities. To comments to this: 1. The main reason for SRFI-72 is to e.g. capture the let bound y in

Re: syntax closures

2013-01-23 Thread Alex Shinn
On Thu, Jan 24, 2013 at 8:24 AM, Stefan Israelsson Tampe < stefan.ita...@gmail.com> wrote: > Hi, > > I managed to do what you said, the result is at > > https://gitorious.org/syntax-closures > > I changed it so that it is enough to do > > (use-modules (srfi sr

Re: syntax closures

2013-01-23 Thread Stefan Israelsson Tampe
Hi, I managed to do what you said, the result is at https://gitorious.org/syntax-closures I changed it so that it is enough to do (use-modules (srfi srfi-72)) and hacking along with it using both #, and #,@ Especially #,@ was difficult but using the ck macro the appending become more natural

Re: syntax closures

2013-01-22 Thread Stefan Israelsson Tampe
Ok, the unsyntax-72 code cannot be cleanly done I think. You really need to use a reader macro. I leave the code base modding the reader char #. as before and will simple wait for a a possibility of per port reader option to be configured via a library. /Stefan On Tue, Jan 22, 2013 at 5:38 PM, An

Re: syntax closures

2013-01-22 Thread Stefan Israelsson Tampe
Hi wingo: Yes this is something I can do. But on a second thought I can't find a way to handle unsyntax-splicing without a splicing macro. Modding #, and not #,@ just screams for difficult errors to show up. Therefor I will in stead just write another macro unsyntax-72 that people can use. btw, I

Re: syntax closures

2013-01-22 Thread Andy Wingo
On Tue 22 Jan 2013 17:19, Stefan Israelsson Tampe writes: >> > (read-hash-extend #\_ syntax-closure-reader) >> >> Have you tried having your srfi-72 module export a binding for unsyntax? > > I would like to use that of cause, but does it mix well with other > already written code? It should wor

Re: syntax closures

2013-01-22 Thread Stefan Israelsson Tampe
ther reader features. Don't know to what a degree you need to do to achieve this. Is it something that a library can do? This relates to the previous question. Anyway I just thoght your thoughts and published a repo, https://gitorious.org/syntax-closures And I also suggeted to ijp to put it into guild-hall. Regards Stefan

Re: syntax closures

2013-01-22 Thread Andy Wingo
Hi, On Thu 17 Jan 2013 21:51, Stefan Israelsson Tampe writes: > Hi all, I wanted to resurrect the idea of a syntactic closure. I did > some thinking and Meta: I seem to be receiving your mails with this really strange line wrapping. It's been this way for a while, and it makes it difficult to