unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Alan Manuel Gloria <almkglor@gmail.com>
To: dwheeler@dwheeler.com
Cc: ludo@gnu.org, david@aquilenet.fr, guile-devel@gnu.org
Subject: Re: Adding to guile curly-infix (SRFI 105), neoteric- & sweet-expressions
Date: Wed, 29 Aug 2012 15:54:40 +0800	[thread overview]
Message-ID: <CAF+kUQULb8BT1At_mD8qbZiOdi-zVuVDahPgH1CmzUrmHwQ8vw@mail.gmail.com> (raw)
In-Reply-To: <E1T6XPY-0005WG-LH@fenris.runbox.com>

On Wed, Aug 29, 2012 at 9:49 AM, David A. Wheeler <dwheeler@dwheeler.com> 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



      reply	other threads:[~2012-08-29  7:54 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-26 17:02 Adding to guile curly-infix (SRFI 105), neoteric- & sweet-expressions David A. Wheeler
2012-08-27  2:11 ` nalaginrut
2012-08-27  4:16   ` David A. Wheeler
2012-08-27  4:30     ` Alan Manuel Gloria
2012-08-28  2:57       ` Noah Lavine
2012-08-28  6:56         ` Alan Manuel Gloria
2012-08-27 11:20 ` Marijn
2012-09-01  3:16   ` David A. Wheeler
2012-08-28 20:43 ` Ludovic Courtès
2012-08-29  1:49   ` David A. Wheeler
2012-08-29  7:54     ` Alan Manuel Gloria [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAF+kUQULb8BT1At_mD8qbZiOdi-zVuVDahPgH1CmzUrmHwQ8vw@mail.gmail.com \
    --to=almkglor@gmail.com \
    --cc=david@aquilenet.fr \
    --cc=dwheeler@dwheeler.com \
    --cc=guile-devel@gnu.org \
    --cc=ludo@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).