From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Mark H Weaver Newsgroups: gmane.lisp.guile.user Subject: Re: procedure-source availability Date: Sun, 30 Sep 2012 23:40:48 -0400 Message-ID: <506910C0.7060108@netris.org> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1349062875 8423 80.91.229.3 (1 Oct 2012 03:41:15 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 1 Oct 2012 03:41:15 +0000 (UTC) Cc: guile-user@gnu.org To: Panicz Maciej Godek Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Mon Oct 01 05:41:20 2012 Return-path: Envelope-to: guile-user@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 1TIWsc-00057Z-E6 for guile-user@m.gmane.org; Mon, 01 Oct 2012 05:41:14 +0200 Original-Received: from localhost ([::1]:34718 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TIWsX-0006vx-0E for guile-user@m.gmane.org; Sun, 30 Sep 2012 23:41:09 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:60677) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TIWsR-0006vr-Q2 for guile-user@gnu.org; Sun, 30 Sep 2012 23:41:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TIWsQ-0000mU-Q0 for guile-user@gnu.org; Sun, 30 Sep 2012 23:41:03 -0400 Original-Received: from world.peace.net ([96.39.62.75]:55550) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TIWsQ-0000mJ-IY for guile-user@gnu.org; Sun, 30 Sep 2012 23:41:02 -0400 Original-Received: from 209-6-91-212.c3-0.smr-ubr1.sbo-smr.ma.cable.rcn.com ([209.6.91.212] helo=[192.168.1.176]) by world.peace.net with esmtpsa (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.72) (envelope-from ) id 1TIWsH-0002RI-Gx; Sun, 30 Sep 2012 23:40:53 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.7) Gecko/20120922 Icedove/10.0.7 In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 96.39.62.75 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Original-Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.user:9602 Archived-At: On 09/30/2012 04:11 PM, Panicz Maciej Godek wrote: > I've found a bug report on savannah, which noted the lack of > ``procedure-source'' for guile 1.9.11 > http://savannah.gnu.org/bugs/?30469 > I wonder if any further decisions were made regarding the maintenance > of ``procedure-source''. I would find it really useful for my > application if the sexp containing the lambda expression that was used > to generate the procedure was stored in it's property list, and I > don't understand why this isn't currently done. Out of curiosity, why do you need this? The reason I ask is that, in the presence of macros, it is not clear what you mean by the "procedure-source". Do you mean before macro expansion? If so, what use it is to you, since it may contain user macros that your code cannot understand? Furthermore, many procedures simply don't exist before macro expansion. For example, a record type definition expands to several procedure definitions that do not exist in the original source. If you mean after macro expansion (or perhaps in some intermediate state of macro expansion, e.g. at the point where the macro expander first encounters the lambda expression), then a normal sexp with the original identifier names is no longer sufficient. In psyntax, these intermediate forms are represented as syntax objects, but at the very least you'd need to rename the identifiers to prevent unintended variable capture. It's a very thorny issue, and I suspect that's the reason that 'procedure-source' no longer works. If we are going to reimplement that functionality, then we first need to figure out precisely what it _should_ do in the general case. Which brings me back to the question: "Why do you need this?" Regards, Mark