From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Noah Lavine Newsgroups: gmane.lisp.guile.devel Subject: Re: redo-safe-variables and redo-safe-parameters Date: Wed, 27 Mar 2013 11:29:39 -0400 Message-ID: References: <13378334.Jv25yq6OaM@warperdoze> <1767639.rWRbQJn65G@warperdoze> <5150614.XCd6n4rqTv@warperdoze> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=047d7b86e3e80feef404d8e9b60a X-Trace: ger.gmane.org 1364398216 23537 80.91.229.3 (27 Mar 2013 15:30:16 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 27 Mar 2013 15:30:16 +0000 (UTC) Cc: guile-devel To: Stefan Israelsson Tampe Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Wed Mar 27 16:30:42 2013 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 1UKsJG-0007FK-Cb for guile-devel@m.gmane.org; Wed, 27 Mar 2013 16:30:42 +0100 Original-Received: from localhost ([::1]:56071 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UKsIs-0006DX-Bg for guile-devel@m.gmane.org; Wed, 27 Mar 2013 11:30:18 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:49978) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UKsId-0005qR-JI for guile-devel@gnu.org; Wed, 27 Mar 2013 11:30:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UKsIb-0001Al-CO for guile-devel@gnu.org; Wed, 27 Mar 2013 11:30:03 -0400 Original-Received: from mail-pb0-f44.google.com ([209.85.160.44]:55948) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UKsIb-00019D-3K for guile-devel@gnu.org; Wed, 27 Mar 2013 11:30:01 -0400 Original-Received: by mail-pb0-f44.google.com with SMTP id wz17so1849956pbc.17 for ; Wed, 27 Mar 2013 08:30:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; bh=1aLFRSKJXU39W+3ubGXBHwyrsibvS3pVESP0BNjqC/I=; b=JWtiNWaMhZljn+64l9FUC6HEfNmZTKsplsHAEsI1mHDzW/gNCtRolIKrP1Hf4roM8s VD66wSdKRoJcgMOlOYaH3OSbrN9k7REM9O/4UcBme/qKF4LmWiv3QXedssRcXJQiNgn5 czbbfYcq993y0kSu9SP42K3UEJE6v8OQDN8IwDRbtGhHPSXRM902OwcylnTXaF0bNag0 lI6JtHGM24jLCn05Rw2PiMZHZBDAHRqL6YTki9FnBwK11iXMqkIv8rkD9TF9/xfuIhT0 5uGRNpRm4eirfZ2gGQf6Gcw4BW2b+hc5mOpNOegB5MI8IfQo6R/9+uY7I9jwAQgpofU1 Dp1A== X-Received: by 10.66.162.70 with SMTP id xy6mr30148755pab.94.1364398200317; Wed, 27 Mar 2013 08:30:00 -0700 (PDT) Original-Received: by 10.68.157.42 with HTTP; Wed, 27 Mar 2013 08:29:39 -0700 (PDT) In-Reply-To: X-Google-Sender-Auth: Rb6bqaQHRYoX4FJYJ3oGRtvNfd8 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 209.85.160.44 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:16026 Archived-At: --047d7b86e3e80feef404d8e9b60a Content-Type: text/plain; charset=ISO-8859-1 On Wed, Mar 27, 2013 at 11:04 AM, Stefan Israelsson Tampe < stefan.itampe@gmail.com> wrote: > Hi Noha, > > On Wed, Mar 27, 2013 at 3:29 PM, Noah Lavine > wrote: > > Hello, > > > > > > On Wed, Mar 27, 2013 at 9:22 AM, Stefan Israelsson Tampe > > wrote: > > I don't understand the difference. If I use ~, I get redo-safe behavior, > and > > if I use !, I get regular behavior (value shared between dynamic states). > > Can I use ~ and ! on the same variable at different places in the code? > If > > yes, doesn't it have to switch behavior? > > using set! means that you basically destroys the redo safe property. > There is no sound concept where you mix them. If you want to mix them > use ~ and add correct function guards to describe the semantics. > ... > You want to allow a user to let one variable behave as with set! and one as > with > set~. It is not broken, the useres sees ~ on one of the varibles and ! > on the other. > Yes, I agree. What I'm saying is, there should be two different ways to declare the variables, and once a variable is declared, you should not need to look elsewhere in the code to see whether it acts like a regular or redo-safe variable. If that is what you specified, I apologize, but I thought that it wasn't. In particular, I think that having an MIT-Scheme-style fluid-let will do the right thing here. I would be interested in talking about its interaction with closure variables, but I think that it's the right thing here with regard to continuations and mutable state. > BTW. srfi's shouuld be careful about specifying dynamic state in order > to achieve thread safe concpets, Scheme48 is threadsafe with their > fluid-let, guile would not be. > Yes, that's an interesting point. Noah --047d7b86e3e80feef404d8e9b60a Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable



On Wed, Mar 27, 2013 at 11:04 AM, Stefan Israelsson Tampe <s= tefan.itampe@gmail.com> wrote:
Hi Noha,

On Wed, Mar 27, 2013 at 3:29 PM, Noah Lavine <noah.b.lavine@gmail.com> wrote:
> Hello,
>
>
> On Wed, Mar 27, 2013 at 9:22 AM, Stefan Israelsson Tampe
> <stefan.itampe@gmail.com= > wrote:
> I don't understand the difference. If I use ~, I get redo-safe beh= avior, and
> if I use !, I get regular behavior (value shared between dynamic state= s).
> Can I use ~ and ! on the same variable at different places in the code= ? If
> yes, doesn't it have to switch behavior?

using set! means that you basically destroys the redo safe property.<= br> There is no sound concept where you mix them. If you want to mix them
use ~ and add correct function guards to describe the semantics.
...
You want to allow a user to let one variable behave as with set= ! and one as with
set~. It is not broken, the useres sees ~ on one of the varibles and !
on the other.

Yes, I agree. What I'= m saying is, there should be two different ways to declare the variables, a= nd once a variable is declared, you should not need to look elsewhere in th= e code to see whether it acts like a regular or redo-safe variable. If that= is what you specified, I apologize, but I thought that it wasn't.

In particular, I think that having an MIT-Scheme-style fluid= -let will do the right thing here. I would be interested in talking about i= ts interaction with closure variables, but I think that it's the right = thing here with regard to continuations and mutable state.
=A0
BTW. srfi's shouuld be careful about specifying dynamic state in order<= br> to achieve thread safe concpets, Scheme48 is threadsafe with their
fluid-let, guile would not be.

Yes, that's an int= eresting point.

Noah

--047d7b86e3e80feef404d8e9b60a--