From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Israelsson Tampe Newsgroups: gmane.lisp.guile.devel Subject: Re: syntax closures Date: Tue, 22 Jan 2013 17:19:55 +0100 Message-ID: References: <87ip6pv0jm.fsf@pobox.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: ger.gmane.org 1358871606 2662 80.91.229.3 (22 Jan 2013 16:20:06 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 22 Jan 2013 16:20:06 +0000 (UTC) To: Andy Wingo , guile-devel Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Tue Jan 22 17:20:23 2013 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TxgaD-0001CC-Sn for guile-devel@m.gmane.org; Tue, 22 Jan 2013 17:20:22 +0100 Original-Received: from localhost ([::1]:39340 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TxgZw-0007Kd-L8 for guile-devel@m.gmane.org; Tue, 22 Jan 2013 11:20:04 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:55913) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TxgZr-0007JJ-To for guile-devel@gnu.org; Tue, 22 Jan 2013 11:20:02 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TxgZo-0007bi-LA for guile-devel@gnu.org; Tue, 22 Jan 2013 11:19:59 -0500 Original-Received: from mail-qe0-f41.google.com ([209.85.128.41]:47138) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TxgZo-0007bX-H3 for guile-devel@gnu.org; Tue, 22 Jan 2013 11:19:56 -0500 Original-Received: by mail-qe0-f41.google.com with SMTP id 7so365230qeb.14 for ; Tue, 22 Jan 2013 08:19:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:content-type; bh=G08ks+YQ/RcXRtPvGyVL5AvSJyGyssqk0z2OpVCSGWk=; b=uI7bFaKilRmH0WUpkygY5u03f8QQCEU23DZw8K5xF6kYwxEZAS8qYzGa9yi13V7zWB bBTVpoZaSbEh90rq+ZxJkMxUlM+fUW32BK/YIn9VgFRegB/HE4lT9Cnjob4rIlygXrGG wrsMddd60/nt4tLhdk6mVadlOgXsAUhuxilteBKBdAIB4EKWmrGFjD2CPoudkuGIGDAo ioKubT++mcc/AQ2aDpZFciegJXt63d0sCC4a6E7/3zNHbA0bbQ3QhCuw+RhvTSLkJ8cS 2hlrjj/sblL9JV/EVdUNXQmgwIKtD3NMaGIieLVMF7cc4mIbFhPVCKZ4BMK9p75HeGvx Whig== X-Received: by 10.224.177.72 with SMTP id bh8mr23855540qab.49.1358871596061; Tue, 22 Jan 2013 08:19:56 -0800 (PST) Original-Received: by 10.49.28.135 with HTTP; Tue, 22 Jan 2013 08:19:55 -0800 (PST) In-Reply-To: <87ip6pv0jm.fsf@pobox.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 209.85.128.41 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:15545 Archived-At: Hi On Tue, Jan 22, 2013 at 1:56 PM, Andy Wingo wrote: > > 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 > read your mails. Would you mind taking a look at your editor and > setting the fill column to 72 characters? Thanks :) I'm using a web interface, poor me, I'll try to use a proper client after this mail. > > 2. The idea is to capture the syntactic environment in template1 ... and > > call the > > closure with the captured syntactic elements and insert the > > resulting syntax into > > . > > Into what? Heh, I misstakenly pushed a send shortcut that mixed badly with emacs keybindings. Anyway the captured syntaxes is then inserted in their positions. There are a few caveats with the approach, see the code file in the repo for a discussion of that. > > (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? > > The question for me is how to treat this code, as a library of it's > > own supporting e.g. racket and guile and other schemes with the > > syntax case system, or should we try to make this reader extension as > > nice as possible and incorporate the code in guile. Is #_ ok? do you > > have any other suggestion? > > I would prefer not to include it in the core; in my ignorance I do not > see the need, especially if it can be implemented in a library. Of > course it may make sense to bundle a srfi-72 implementation with guile, > but ideally we can do so without affecting the core. I would like to be able to set this feature on per port bases just like we do with other 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