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.bugs Subject: bug#14039: Bug in with-fluids semantics Date: Sun, 24 Mar 2013 14:47:35 +0100 Message-ID: References: <7932480.qaFp3n8hK8@warperdoze> <87obeaq6j0.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 1364132883 12123 80.91.229.3 (24 Mar 2013 13:48:03 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 24 Mar 2013 13:48:03 +0000 (UTC) Cc: 14039-close@debbugs.gnu.org To: Andy Wingo Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Sun Mar 24 14:48:25 2013 Return-path: Envelope-to: guile-bugs@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 1UJlHc-0003Ip-6I for guile-bugs@m.gmane.org; Sun, 24 Mar 2013 14:48:24 +0100 Original-Received: from localhost ([::1]:47474 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UJlHE-0002yi-AW for guile-bugs@m.gmane.org; Sun, 24 Mar 2013 09:48:00 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:39483) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UJlHA-0002yc-EV for bug-guile@gnu.org; Sun, 24 Mar 2013 09:47:57 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UJlH9-0006eT-AK for bug-guile@gnu.org; Sun, 24 Mar 2013 09:47:56 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:39014) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UJlH9-0006eO-6n for bug-guile@gnu.org; Sun, 24 Mar 2013 09:47:55 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1UJlJC-0006Lx-Cx for bug-guile@gnu.org; Sun, 24 Mar 2013 09:50:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Israelsson Tampe Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-guile@gnu.org Resent-Date: Sun, 24 Mar 2013 13:50:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 14039 X-GNU-PR-Package: guile X-GNU-PR-Keywords: Original-Received: via spool by 14039-done@debbugs.gnu.org id=D14039.136413298824392 (code D ref 14039); Sun, 24 Mar 2013 13:50:02 +0000 Original-Received: (at 14039-close) by debbugs.gnu.org; 24 Mar 2013 13:49:48 +0000 Original-Received: from localhost ([127.0.0.1]:43123 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UJlIx-0006LN-4z for submit@debbugs.gnu.org; Sun, 24 Mar 2013 09:49:47 -0400 Original-Received: from mail-pb0-f50.google.com ([209.85.160.50]:63517) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UJlIt-0006LE-Nk for 14039-close@debbugs.gnu.org; Sun, 24 Mar 2013 09:49:45 -0400 Original-Received: by mail-pb0-f50.google.com with SMTP id up1so3745386pbc.37 for <14039-close@debbugs.gnu.org>; Sun, 24 Mar 2013 06:47:35 -0700 (PDT) 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:cc:content-type; bh=t4H94ETEFxKaIIIKEUndZwMTyXACM4kQ+DQuHAnBLgU=; b=u0ibdPuYCttS3pyvBwZmU/4nSmtdMJe/U3ZHny1U0YOW4jTQXFHi98CS/7NpxAYl5n UC978dkixQO2g4NCldXj8fsGQeDC6vk5e38bkfAh7XZFvHz/1WJdpph1fw0jqEkm2epM 4oU0ihXI8Iozt5RfTJzIs65BcG/XvrQ9rNynqLXyHg/vuagNWSbQ4kNhFowSraA7kIe9 Urvh3IeHK/2oE+CdB73P45kFxsN389a+NzkWpfhOynAMwXkGARD6TP5zzjFnSf9uVqA0 TdegjFFeD6nW5gJ8ZwA9Ce+LaQwA/lYfGQAHjOK1N5qkrlHpLXRYoPvvwspct/6g/96h OoIQ== X-Received: by 10.68.242.65 with SMTP id wo1mr12470980pbc.62.1364132855114; Sun, 24 Mar 2013 06:47:35 -0700 (PDT) Original-Received: by 10.70.45.8 with HTTP; Sun, 24 Mar 2013 06:47:35 -0700 (PDT) In-Reply-To: <87obeaq6j0.fsf@pobox.com> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 140.186.70.43 X-BeenThere: bug-guile@gnu.org List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Original-Sender: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.bugs:7004 Archived-At: 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 wrote: > On Sat 23 Mar 2013 11:41, Stefan Israelsson Tampe 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/