From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andy Wingo Newsgroups: gmane.lisp.guile.devel Subject: Re: ideas for guile prolog Date: Sat, 28 Aug 2010 10:11:08 -0700 Message-ID: References: <201008112335.56856.stefan.tampe@spray.se> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1283016707 23701 80.91.229.12 (28 Aug 2010 17:31:47 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 28 Aug 2010 17:31:47 +0000 (UTC) Cc: guile-devel@gnu.org To: Stefan Israelsson Tampe Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Sat Aug 28 19:31:46 2010 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OpPFk-0007tB-P9 for guile-devel@m.gmane.org; Sat, 28 Aug 2010 19:31:41 +0200 Original-Received: from localhost ([127.0.0.1]:53546 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OpPFj-0004af-JE for guile-devel@m.gmane.org; Sat, 28 Aug 2010 13:31:39 -0400 Original-Received: from [140.186.70.92] (port=58857 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OpPDp-0003UX-VU for guile-devel@gnu.org; Sat, 28 Aug 2010 13:29:43 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OpOsm-0001qJ-NJ for guile-devel@gnu.org; Sat, 28 Aug 2010 13:08:00 -0400 Original-Received: from a-pb-sasl-quonix.pobox.com ([208.72.237.25]:55346 helo=sasl.smtp.pobox.com) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OpOsm-0001pv-LT for guile-devel@gnu.org; Sat, 28 Aug 2010 13:07:56 -0400 Original-Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-quonix.pobox.com (Postfix) with ESMTP id B021ED194F; Sat, 28 Aug 2010 13:07:54 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=sasl; bh=riYLXjV44aC2ufQ8U/cM1dO5rdU=; b=KVwcsg no2O+NHdzPjvJgbODxmwhgMLbHaE86AIxFUz8sGS69bNuKm6cjfk8mUy0SVfEuLs ga/8HKcDk9xu932mFMvlnGN8Klp0PR7VG/mgf697mAKNa0Wps35QvvckiW2E7JoG EsQlUeciy01EPWYN1QJo8g1KXEmCxPTwToSiw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; q=dns; s=sasl; b=ankWWjQv7ylQGUaD0Ez5r8PWpPxSyOea gXhARqrpO+In0kdAUIjcIC+piMBhfTrw6yiP/lxx9nXHpg51Lf6dhZb7RcEZizIz bqXXPoDKvDkXsy9Epk6nVImhINUfbQln7dAFMy65vSw3UBSQkwIBrhQyki+t7BV9 hkN70r+Ve7s= Original-Received: from a-pb-sasl-quonix. (unknown [127.0.0.1]) by a-pb-sasl-quonix.pobox.com (Postfix) with ESMTP id 98558D194E; Sat, 28 Aug 2010 13:07:53 -0400 (EDT) Original-Received: from unquote.localdomain (unknown [75.28.21.123]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by a-pb-sasl-quonix.pobox.com (Postfix) with ESMTPSA id 25594D194D; Sat, 28 Aug 2010 13:07:51 -0400 (EDT) In-Reply-To: <201008112335.56856.stefan.tampe@spray.se> (Stefan Israelsson Tampe's message of "Wed, 11 Aug 2010 23:35:56 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) X-Pobox-Relay-ID: CBBF07F4-B2C6-11DF-A451-030CEE7EF46B-02397024!a-pb-sasl-quonix.pobox.com X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta) X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:10801 Archived-At: Hi Stefan, On Wed 11 Aug 2010 14:35, Stefan Israelsson Tampe writes: > The special thing with this situation is that you may fill up your entire Ram > with continuations so it would be nice to compact them tree wise and also > facilitate reasonable fast execution deducing the state before execution of a > closure. You essentially build a redo tree. Some Schemes put stack frames on the heap, so that continuations that "overlap" share state. Guile doesn't do this, but perhaps you could simulate it by capturing continuations, and storing the stack of continuations in a variable, or something. When continuations are captured you could push on a new prompt, and then capturing a subsequent continuation just captures the continuation up to the prompt. You can simulate delimited call/cc with prompt/abort, except for dynamic-wind effects (because aborting unwinds the stack). Guile 2.2 will have a properly delimited call/cc, preserving the dynamic state. > This would allow for cool things like having a prolog system setting > up a set of continuations that can be played with, generate new > continuations etc. > > Any thoughts? Sounds like fun :) Standard disclaimer that this wouldn't be ready for Guile any time soon, but do have fun :) Andy -- http://wingolog.org/