From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: ludo@gnu.org (Ludovic =?iso-8859-1?Q?Court=E8s?=) Newsgroups: gmane.lisp.guile.user Subject: Re: procedure-source availability Date: Thu, 04 Oct 2012 21:40:24 +0200 Message-ID: <87txuakouv.fsf@gnu.org> References: <506910C0.7060108@netris.org> <87y5jp9de5.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1349408295 2882 80.91.229.3 (5 Oct 2012 03:38:15 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 5 Oct 2012 03:38:15 +0000 (UTC) To: guile-user@gnu.org Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Fri Oct 05 05:38:21 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 1TJyk0-00085P-M8 for guile-user@m.gmane.org; Fri, 05 Oct 2012 05:38:20 +0200 Original-Received: from localhost ([::1]:54527 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TJyju-0005gV-Sq for guile-user@m.gmane.org; Thu, 04 Oct 2012 23:38:14 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:47131) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TJwkk-00065d-8f for guile-user@gnu.org; Thu, 04 Oct 2012 21:31:00 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TJwki-0003rC-SI for guile-user@gnu.org; Thu, 04 Oct 2012 21:30:58 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:35817) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TJwki-0003qM-MB for guile-user@gnu.org; Thu, 04 Oct 2012 21:30:56 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1TJwk1-00013C-Gd for guile-user@gnu.org; Fri, 05 Oct 2012 03:30:13 +0200 Original-Received: from reverse-83.fdn.fr ([80.67.176.83]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 05 Oct 2012 03:30:13 +0200 Original-Received: from ludo by reverse-83.fdn.fr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 05 Oct 2012 03:30:13 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 38 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: reverse-83.fdn.fr X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 13 =?iso-8859-1?Q?Vend=E9miaire?= an 221 de la =?iso-8859-1?Q?R=E9volution?= X-PGP-Key-ID: 0xEA52ECF4 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 83C4 F8E5 10A3 3B4C 5BEA D15D 77DD 95E2 EA52 ECF4 X-OS: x86_64-unknown-linux-gnu User-Agent: Gnus/5.130005 (Ma Gnus v0.5) Emacs/24.2 (gnu/linux) Cancel-Lock: sha1:Vq2kiQ8qGVbJTld1eXydnx14oK0= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-Mailman-Approved-At: Thu, 04 Oct 2012 23:38:10 -0400 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:9610 Archived-At: Hi, Panicz Maciej Godek skribis: > I recall someone having the idea of adding smalltalk-like images to guile. > I'd love to see such feature one day, but if guile is supposed to be > an extension language, I think the C interface would need to be > redesigned, because there would be a need to somehow dump the smobs > from the heap to re-load them later. At the C level, that seems somewhat ambitious. :-) > I don't know much about the implementation of the GOOPS objects, but I > suspect that they would also require some means of serialization The (oop goops save) module implements parts of a serialization framework. When GOOPS is loaded, any Scheme object is a GOOPS instance, so one could define methods to serialize any type of object. [...] > then I could easily implement this functionality myself (making 'self' > a reserved keyword) > > (define-syntax lambda > (syntax-rules () > ((_ args body ...) > (let ((self (primitive-lambda args body ...))) > (set-procedure-property! self 'source (quote (primitive-lambda > args body ...))) > self)))) Note that this doesn’t make ‘self’ a reserved keyword; instead, it’s just a local variable that cannot be referred to by name in BODY, thanks to the macro hygiene rules. Thanks, Ludo’.