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.devel Subject: Re: redo-safe-variables and redo-safe-parameters Date: Wed, 03 Apr 2013 21:36:45 +0200 Message-ID: <26254241.alHDNf9hMe@warperdoze> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit X-Trace: ger.gmane.org 1365017826 32142 80.91.229.3 (3 Apr 2013 19:37:06 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 3 Apr 2013 19:37:06 +0000 (UTC) To: noah.b.lavine@gmail.com, guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Wed Apr 03 21:37:29 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 1UNTUq-0001y6-SS for guile-devel@m.gmane.org; Wed, 03 Apr 2013 21:37:24 +0200 Original-Received: from localhost ([::1]:47875 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UNTUS-0006Pq-5N for guile-devel@m.gmane.org; Wed, 03 Apr 2013 15:37:00 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:52248) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UNTUO-0006Kd-Cm for guile-devel@gnu.org; Wed, 03 Apr 2013 15:36:58 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UNTUJ-0003M4-Ka for guile-devel@gnu.org; Wed, 03 Apr 2013 15:36:56 -0400 Original-Received: from mail-lb0-f174.google.com ([209.85.217.174]:56508) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UNTUJ-0003LX-30 for guile-devel@gnu.org; Wed, 03 Apr 2013 15:36:51 -0400 Original-Received: by mail-lb0-f174.google.com with SMTP id s10so1982065lbi.33 for ; Wed, 03 Apr 2013 12:36:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:subject:date:message-id:user-agent:mime-version :content-transfer-encoding:content-type; bh=yM1WsWfZLQRd8kytkZreggKJ1Sd7jlM3c9asVZrDE0A=; b=PmESUwQabURLwfpoXiS+h95lxJPY3kGTjD0QEMPbODtS+jktdxZg7LBMLXxCgy8cf2 rVe1Y4RpoMd+Z4xzghK3gRZ/SVFyQsUejwHtfXOC5Hn5iGpl8ClAqGAwFlbkl5QzlRYU zEXYuz4hDdFBcQm0xaVHvDwm3t/z4SOROYh3MmLUNgdqAKnYT7KFayw4T4p3glb7qgaS UsJSS9YF1Z0sgf5mcYca7BHODBjTyxeNAfD7u8CoYsSNgG0XLDZRb9qkOJTOpeHx0M5t 5WnjHJ5F2R2tCLM34g03Q/6sRRySAZRCWu9L7fLmU3LpRvY2B17obciGVKs3WqCrpGdR /Ihw== X-Received: by 10.152.146.199 with SMTP id te7mr1612908lab.23.1365017809591; Wed, 03 Apr 2013 12:36:49 -0700 (PDT) Original-Received: from warperdoze.localnet (1-1-1-39a.veo.vs.bostream.se. [82.182.254.46]) by mx.google.com with ESMTPS id fq10sm2840115lbb.14.2013.04.03.12.36.47 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 03 Apr 2013 12:36:48 -0700 (PDT) User-Agent: KMail/4.9.5 (Linux/3.5.0-26-generic; KDE/4.9.5; x86_64; ; ) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 209.85.217.174 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:16127 Archived-At: > Noha writes > Hi, > A few points: > 1. I really, really think that it is a bad idea for the type of a > variable to change depending on how it is used (i.e. set! > vs. set~). That means that you should remove points 12 and 14, and > maybe some other points. I agree with you now, I was a bit too creative there :-) > 2. You shouldn't specify the semantics in terms of code, but by a > description. That means removing points 3, 4, 5, and 7 and replacing > them with text that says how the variables work. You can move the > same ideas down to the reference implementation, though - that is > good. I will in the end go there meanwhile I like to keep some code for clarity. > 3. I strongly suspect that you will find that MIT Scheme's fluid-let > has the semantics you want. If it doesn't, I would be interested to > see an example that shows the difference between that and the type > of variables that you want. I think that fluid parameters fluid-let are close in semantics. but I do not want the backtracking feature of fluid -let in some applications and it carries an overhead compared to just haveing variables and an init value. Note: I have been going back to guile-log to try to implement the ideas in actual code. I got it working and implemented in efficient C I hope. The code for e.g. any-interleave got 8x faster (Now About 10x slower then a simple all in stead of 80). My conclusion now is that to get an efficient implementation one needs to go back to dynamic-wind guards. And demand that redo-safeness imply that we assume that the code backtracks over the dynamic-wind at the state storage point. This is featurefull enough to satisfy most uses of redo/undo that I can think of. /Stefan