unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
From: Stefan Israelsson Tampe <stefan.itampe@gmail.com>
To: Andy Wingo <wingo@pobox.com>
Cc: 14039-close@debbugs.gnu.org
Subject: bug#14039: Bug in with-fluids semantics
Date: Sun, 24 Mar 2013 14:47:35 +0100	[thread overview]
Message-ID: <CAGua6m2Q=ewuX6Uo2_wXwBowyQZG4YqA3tO6S3mEwQP5+QDBEQ@mail.gmail.com> (raw)
In-Reply-To: <87obeaq6j0.fsf@pobox.com>

I got the impression (on irc) that you thought backtracking would be
compromised with
my fix. Not so. It's the other half of the swap that should be skiped.
All semantics referring
to situations where a continuation is used one or zero times is preserved.

Consider a fluid a, with value v and storage s

the swap used on wind and non local unwind and currently on return unwind
-------------
temp <- v
v  <- s
s  <- temp

Suggestion for the return unwind:
v <- s

E.g. we will backtrack to the old value before but not store the
current value in s.

It's true that the semantic is different. I would really say that we
need to have both implemented.
I would argue that my solution should be default. But I can live with
it being a separate construct
only that it will have support in the VM to get sane behavior in logic programs.

/Stefan



On Sat, Mar 23, 2013 at 8:07 PM, Andy Wingo <wingo@pobox.com> wrote:
> On Sat 23 Mar 2013 11:41, Stefan Israelsson Tampe <stefan.itampe@gmail.com> writes:
>
>> The reason is that when the with-fluid returns normally it does a full
>> swap. It should only do half a swap e.g. restore the old value of the
>> fluid and not store the current which is of non use because it can not
>> be reached anymore and it contaminates the continuation k.
>
> That's not how fluids work, semantically: for better (I think) or for
> worse (you think).  We cannot change this.
>
> A
> --
> http://wingolog.org/





      parent reply	other threads:[~2013-03-24 13:47 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-23 10:41 bug#14039: Bug in with-fluids semantics Stefan Israelsson Tampe
2013-03-23 14:51 ` Daniel Hartwig
2013-03-23 15:41   ` Stefan Israelsson Tampe
2013-03-23 17:58   ` Stefan Israelsson Tampe
2013-03-23 19:07 ` Andy Wingo
2013-03-23 19:44   ` Stefan Israelsson Tampe
2013-03-24 13:47   ` Stefan Israelsson Tampe [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='CAGua6m2Q=ewuX6Uo2_wXwBowyQZG4YqA3tO6S3mEwQP5+QDBEQ@mail.gmail.com' \
    --to=stefan.itampe@gmail.com \
    --cc=14039-close@debbugs.gnu.org \
    --cc=wingo@pobox.com \
    /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).