unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
From: Ian Hulin <ian@hulin.org.uk>
To: 10099@debbugs.gnu.org
Cc: dak@gnu.org
Subject: bug#10099: Null (begin) blocks - V2.0.3 reports error was OK in V2.0.2
Date: Thu, 24 Nov 2011 23:49:48 +0000	[thread overview]
Message-ID: <4ECED81C.6030606@hulin.org.uk> (raw)
In-Reply-To: <871usznhvv.fsf@pobox.com>

Hi Andy,
On 23/11/11 12:27, Andy Wingo wrote:
> Hi Ian,
> 
> Did it really work in v2.0.2, I wonder?
> 
Apparently not, see below for explanation.

> On Tue 22 Nov 2011 00:02, Andy Wingo <wingo@pobox.com> writes:
>> On Mon 21 Nov 2011 18:25, Ian Hulin <ian@hulin.org.uk> writes:
>>> (define-public (void? x) (eq? x (begin))) This works in V1.8,
>>> and apparently used to work in 2.0.2 (no errors),
>> 
>> Interesting.  If it changed incompatibly in 2.0.x, that is a
>> Guile bug. Sorry about that!  We'll fix it.
> 
> I cannot reproduce this issue with 2.0.2.  I suspect that this code
> has been this way since early 1.9 releases, and is a consequence of
> switching to the new syntax expander.
> 
Looks like the change was already in 2.0.2. Another LilyPond developer
(David Kastrup, dak@gnu.org) noticed the advertised API and decided to
use it in part of an ongoing clean-up of the Lily parser.  Meanwhile I
was working on the Guile V2 migration stuff and it broke.
> That said, this change was not mentioned in NEWS, and the
> documentation has not been updated, so perhaps we should do
> something.  I would prefer just to leave it as it is, unless you
> think that adding a compatibility hack could help you somehow.
> What do you think, Ian?
My learned colleague is working round it, but at the very least you
need to deprecate the support for this and document it as such.

Or is there a way of keeping scm_local_eval and procedure-environment
in the API for use only when interpreting?

Here's why I ask the question.

We were wanting to use it in Scheme statements embedded in LilyPond
source code, especially where these needed to pass values back to the
LilyPond parser.  Using scm_local_eval/local-eval solved problems with
lots of kludgy things involving parser look-aheads and suchlike.

We are using #{ and #} to delimit LilyPond code within a Scheme block
which is itself embedded in LilyPond code.
$ is typically used to mark variables to be accessed by the inner
LilyPond which are declared in the intermediate Scheme block.

This is a quote from David's LilyPond issue tracker commentary for the
work-around:

> Lambdaize $ and # in #{ ... #} to make Guile V2 happy.
> 
> Unfortunately Guile V2 was not happy about the implementation of 
> closures around #{ ... #} relying on local-eval and 
> procedure-environment.  This patch abandons this approach and gets 
> back to a scheme similar like the old one, namely compiling the 
> expressions inside of #{ ... #} in advance.

I'm sure David will let me know if I've over-simplified stuff or got
things wrong here.

However, it boils down to lousy timing for LilyPond finding a use for
this bit of the Guile API, which you guys had decided to withdraw
because no-one apparently had a use for it :-{

Cheers,

Ian Hulin






  reply	other threads:[~2011-11-24 23:49 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <4ECA89A5.5090202@hulin.org.uk>
2011-11-21 23:02 ` Null (begin) blocks - V2.0.3 reports error was OK in V2.0.2 Andy Wingo
2011-11-25 10:37   ` bug#10099: " David Kastrup
2011-11-25 11:13     ` Andy Wingo
2011-11-23 12:27 ` Andy Wingo
2011-11-24 23:49   ` Ian Hulin [this message]
2011-11-25  9:31     ` Andy Wingo
2011-12-22  1:17   ` Andy Wingo

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=4ECED81C.6030606@hulin.org.uk \
    --to=ian@hulin.org.uk \
    --cc=10099@debbugs.gnu.org \
    --cc=dak@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).