From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Mikael Djurfeldt Newsgroups: gmane.lisp.guile.devel Subject: Re: goops and memoization Date: Mon, 02 Dec 2002 10:14:00 +0100 Sender: guile-devel-admin@gnu.org Message-ID: References: Reply-To: djurfeldt@nada.kth.se NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1038820741 5303 80.91.224.249 (2 Dec 2002 09:19:01 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 2 Dec 2002 09:19:01 +0000 (UTC) Cc: Neil Jerram , guile-devel@gnu.org, djurfeldt@nada.kth.se Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18ImjA-0001Me-00 for ; Mon, 02 Dec 2002 10:18:56 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18ImiL-0007Av-00; Mon, 02 Dec 2002 04:18:05 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 18Imho-00060J-00 for guile-devel@gnu.org; Mon, 02 Dec 2002 04:17:32 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 18Imhg-0005cY-00 for guile-devel@gnu.org; Mon, 02 Dec 2002 04:17:31 -0500 Original-Received: from kvast.blakulla.net ([213.212.20.77]) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18Imhf-0005UW-00 for guile-devel@gnu.org; Mon, 02 Dec 2002 04:17:23 -0500 Original-Received: from barbara.blakulla.net ([213.212.21.238] helo=linnaeus) by kvast.blakulla.net with esmtp (Exim 3.36 #1 (Debian)) id 18ImeO-0001km-00; Mon, 02 Dec 2002 10:14:00 +0100 Original-Received: from mdj by linnaeus with local (Exim 3.36 #1 (Debian)) id 18ImeO-0007Dt-00; Mon, 02 Dec 2002 10:14:00 +0100 Original-To: Dirk Herrmann Original-Cc: djurfeldt@nada.kth.se In-Reply-To: (Mikael Djurfeldt's message of "Mon, 02 Dec 2002 09:45:05 +0100") User-Agent: Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.2 (i386-pc-linux-gnu) Errors-To: guile-devel-admin@gnu.org X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Developers list for Guile, the GNU extensibility library List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.lisp.guile.devel:1770 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.devel:1770 Mikael Djurfeldt writes: > Mixing different stages as it is currently done introduces a lot of > dependencies between different parts of guile. This makes > maintaining guile quite hard - our current discussion is already an > example of the problem. Just to clarify my points: Working on the output of procedure-source does not introduce dependencies. On the contrary: Since the output of procedure-source is required to be Scheme code, we have a completely clean separation of different parts of Guile. Regardless of how the evaluator changes, this representation will remain valid and method compilation will continue working. However, working on the memoized representation *would* introduce a dependency between Goops code and the current version of the evaluator. (I have the view, though, that that is acceptable.) The current problem arises not because of how compile-method retrieves its input, but because of how the result of the work of compile-method is "returned" to the rest of the system. Previously, it was OK to regard the compile-method output as an executable representation, now it is not. The core of the problem is that while there exists a well-defined interface for retrieving the representation of the method, procedure-source, there doesn't exist a well-defined interface for giving a compiled method back to the evaluator. A standardized way would be to pass Scheme code in the form of a lambda expression to "eval", but it is simply not possible to use that standard interface, because methods need to preserve their local environment. So, again, if you want to preserve separation of parts of Guile, you should provide the interface for giving compiled method source (output of compile-method) back to Guile. If you are prepared to sacrifice separation for efficiency, you should implement compile-method in C and let it operate on the memoized representation. Best regards, Mikael _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://mail.gnu.org/mailman/listinfo/guile-devel