From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alan Manuel Gloria Newsgroups: gmane.lisp.guile.devel Subject: Re: Adding to guile curly-infix (SRFI 105), neoteric- & sweet-expressions Date: Wed, 29 Aug 2012 15:54:40 +0800 Message-ID: References: <871uiq4uj6.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: ger.gmane.org 1346228384 6848 80.91.229.3 (29 Aug 2012 08:19:44 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 29 Aug 2012 08:19:44 +0000 (UTC) Cc: ludo@gnu.org, david@aquilenet.fr, guile-devel@gnu.org To: dwheeler@dwheeler.com Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Wed Aug 29 10:19:45 2012 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 1T6dV3-0008Da-4R for guile-devel@m.gmane.org; Wed, 29 Aug 2012 10:19:45 +0200 Original-Received: from localhost ([::1]:41407 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T6dV0-0001G9-PZ for guile-devel@m.gmane.org; Wed, 29 Aug 2012 04:19:42 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:57403) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T6dUs-0001FD-Kj for guile-devel@gnu.org; Wed, 29 Aug 2012 04:19:40 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T6dUo-0005Ok-Bx for guile-devel@gnu.org; Wed, 29 Aug 2012 04:19:34 -0400 Original-Received: from mail-pb0-f41.google.com ([209.85.160.41]:37098) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T6dUo-0005OW-41; Wed, 29 Aug 2012 04:19:30 -0400 Original-Received: by pbbro12 with SMTP id ro12so789381pbb.0 for ; Wed, 29 Aug 2012 01:19:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=bMGK5at7WJlAu+Lk7XiBoiwlrUbevdtQlXOcW/zX5lo=; b=NSKom8n9RZHfw4sthu1mzn7mQrISnSx0a3DBft5ibRlMbI858LTKABum5rbv8lHH+c +Kf9LR2eQZTtY5h/EEVpw13/R/ZvIQ1NSSVP6mPos7wvLNWeJp4LtBKFo/PtXvzo6Cv8 pf2y+i5yvDYd2wPP8frSNlND4YMsPVjzRvhee2DFovwJRlXKPLfG7vbkWFsVSS5RJBhW eQz9ZRLEtCA6/t/NEZdtQB33gqJtQiJ1Ak4YSSjyfqeLjitO6RzU2niPDT4jKhOJHPU4 nOtquTjDd6Ts4NzuW8Au4S4rKvpIvlS+LZcaatzDJPCn3nemYs8GL7UyUjKuq2GQD7dX PtFw== Original-Received: by 10.68.141.46 with SMTP id rl14mr2879533pbb.2.1346226881176; Wed, 29 Aug 2012 00:54:41 -0700 (PDT) Original-Received: by 10.66.163.2 with HTTP; Wed, 29 Aug 2012 00:54:40 -0700 (PDT) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.85.160.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:14830 Archived-At: On Wed, Aug 29, 2012 at 9:49 AM, David A. Wheeler wrote: >> Please let us know what youd need to have it implemented within Guile, >> or, even better, send a patch. ;-) > > Okay! Since we already have it implemented on *top* of guile, I have hopes that it'll be relatively easy to implement *in* guile. > >> I think Nala Ginrut once posted a patch that would allow read to >> optionally recognize braces as delimiters. I guess thats a starting >> point? > > Yes, { and } as delimiters makes the rest much easier. Heya Ludo', Regarding sweet-expressions, #-handling in Guile becomes an issue. Specifically, in our existing code on top of Guile, we had to reimplement # handling to properly handle #| |#, #! !# and #; comments. Since indentation is significant in sweet-expressions, it is necessary to ensure that a reader that finds a hash-based comment does not consume any whitespace after the comment, and should instead somehow signal the discovery of the comment. In our current code, the hash-handler returns an empty list if it found a #||# #!!# #; comment, or returns a singleton list with the item it found. If Guile's hash-handling in its reader has a similar protocol, then it can be adapted for use with the sweet-expression reader. Otherwise, if the hash-handling effectively tail-calls back to the top-level read after finding a comment, then the routine needs to be changed so that the sweet-expression reader can use it (as otherwise there will be two implementations of hash-handling). Other than that, for now I don't know of what else is needed on top of { }-as-delimiter and an alternative entry point for handling hash objects on the reader. Sincerely, AmkG