From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Jean Louis Newsgroups: gmane.lisp.guile.bugs,gmane.lisp.guile.devel Subject: bug#24887: procedure-sources not working Date: Wed, 1 Mar 2017 17:43:36 +0300 Message-ID: <20170301144335.GF11339@protected.rcdrun.com> References: <20161105220110.GA3991@protected.rcdrun.com> <878topgkcd.fsf@pobox.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1488379634 3950 195.159.176.226 (1 Mar 2017 14:47:14 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 1 Mar 2017 14:47:14 +0000 (UTC) Cc: Jean Louis , 24887@debbugs.gnu.org, guile-devel@gnu.org To: Andy Wingo Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Wed Mar 01 15:47:11 2017 Return-path: Envelope-to: guile-bugs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cj5X3-0000TS-26 for guile-bugs@m.gmane.org; Wed, 01 Mar 2017 15:47:09 +0100 Original-Received: from localhost ([::1]:46971 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cj5X9-0005u0-4q for guile-bugs@m.gmane.org; Wed, 01 Mar 2017 09:47:15 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40440) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cj5X1-0005ts-Av for bug-guile@gnu.org; Wed, 01 Mar 2017 09:47:11 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cj5Ww-0005it-Bq for bug-guile@gnu.org; Wed, 01 Mar 2017 09:47:07 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:34852) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cj5Ww-0005il-8A for bug-guile@gnu.org; Wed, 01 Mar 2017 09:47:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cj5Ww-00012r-2Y for bug-guile@gnu.org; Wed, 01 Mar 2017 09:47:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Jean Louis Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Wed, 01 Mar 2017 14:47:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24887 X-GNU-PR-Package: guile X-GNU-PR-Keywords: Original-Received: via spool by 24887-submit@debbugs.gnu.org id=B24887.14883796134002 (code B ref 24887); Wed, 01 Mar 2017 14:47:02 +0000 Original-Received: (at 24887) by debbugs.gnu.org; 1 Mar 2017 14:46:53 +0000 Original-Received: from localhost ([127.0.0.1]:33051 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cj5Wn-00012T-3D for submit@debbugs.gnu.org; Wed, 01 Mar 2017 09:46:53 -0500 Original-Received: from stw1.rcdrun.com ([217.170.207.13]:42498) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cj5Wl-00012H-NM for 24887@debbugs.gnu.org; Wed, 01 Mar 2017 09:46:52 -0500 Original-Received: from protected.rcdrun.com (localhost [::1]) (AUTH: PLAIN securesender, TLS: TLSv1/SSLv3,256bits,AES256-SHA) by stw1.rcdrun.com with ESMTPSA; Wed, 01 Mar 2017 07:47:13 -0700 id 00000000000866AD.0000000058B6DEF2.0000432C Original-Received: from localhost (localhost [127.0.0.1]) (uid 1001) by protected.rcdrun.com with local; Wed, 01 Mar 2017 17:43:36 +0300 id 00000000000ED1AC.0000000058B6DE18.00003E9B Content-Disposition: inline In-Reply-To: <878topgkcd.fsf@pobox.com> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-guile@gnu.org List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Original-Sender: "bug-guile" Xref: news.gmane.org gmane.lisp.guile.bugs:8625 gmane.lisp.guile.devel:18967 Archived-At: On Wed, Mar 01, 2017 at 03:09:06PM +0100, Andy Wingo wrote: > On Sat 05 Nov 2016 23:01, Jean Louis writes: > > > Sadly, the procedure-source is not working. This would be very useful > > for programming. > > > > Jean > > > > scheme@(guile-user) [50]> (define (dosomething text) (write text)) > > scheme@(guile-user) [50]> (dosomething "Hello") > > "Hello"scheme@(guile-user) [50]> (procedure-source dosomething ) > > $93 = #f > > scheme@(guile-user) [50]> > > Sadly I think I am going to WONTFIX this one :/ > > The reason is complicated. First of all, a procedure's source only > makes sense within an environment: in a module and in a lexical > context, and you're not guaranteed to be able to reconstruct either of > those. Also a procedure's source is expressed in some dialect via > macros; what should the source be for even this simple example? Should > it be: Thank you. I am not an advanced user of Guile. And that procedure-source, I can compare to (SYMBOL-PLIST 'FUNCTION) in Lisp, as I am also using CLISP. If I have a function defined, such as RED, then I can see the source of the function in CLISP: (symbol-plist 'red) (SYSTEM::DEFINITION ((DEFUN RED (FILE) (ED FILE) (LOAD FILE)) . #(NIL NIL NIL NIL ((DECLARATION OPTIMIZE DECLARATION)))) SYSTEM::DOC (SYSTEM::FILE ((SYSTEM::DEFUN/DEFMACRO #P"/home/data1/protected/.clisprc.lisp" 53 53)))) And I was simply expecting the PROCEDURE-SOURCE in Guile to behave in similar fashion. >From documentation: -- Scheme Procedure: procedure-source proc -- C Function: scm_procedure_source (proc) Return the source of the procedure PROC. Returns ‘#f’ if the source code is not available. So that is what I am expecting according to documentation. As I am not developer of Guile, rather user and student, I cannot go into details, if it should be there or not. It is simply there and is not functioning, so it is expected to function. Or you propose the removal, I don't mind. Jean Louis