From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Daniel Hartwig Newsgroups: gmane.lisp.guile.user Subject: Re: procedure-source availability Date: Wed, 3 Oct 2012 09:03:30 +0800 Message-ID: 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: quoted-printable X-Trace: ger.gmane.org 1349226240 11721 80.91.229.3 (3 Oct 2012 01:04:00 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 3 Oct 2012 01:04:00 +0000 (UTC) Cc: guile-user@gnu.org To: Panicz Maciej Godek Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Wed Oct 03 03:04:05 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 1TJDNG-0001Vq-LZ for guile-user@m.gmane.org; Wed, 03 Oct 2012 03:03:42 +0200 Original-Received: from localhost ([::1]:45247 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TJDNA-0005vh-St for guile-user@m.gmane.org; Tue, 02 Oct 2012 21:03:36 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:34145) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TJDN6-0005vc-Ui for guile-user@gnu.org; Tue, 02 Oct 2012 21:03:33 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TJDN5-00037y-Vw for guile-user@gnu.org; Tue, 02 Oct 2012 21:03:32 -0400 Original-Received: from mail-ob0-f169.google.com ([209.85.214.169]:35953) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TJDN5-00037u-RC for guile-user@gnu.org; Tue, 02 Oct 2012 21:03:31 -0400 Original-Received: by obcva7 with SMTP id va7so7652086obc.0 for ; Tue, 02 Oct 2012 18:03:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=Qv/DZ7omgXcRcyoenJWCtltlf+5m/xIU1TJutWFzPd4=; b=xaQ7X01MCoVIzaAie5hodrUqVhatmj6S6hlz2P+I4YUoM8qqGVWo7GjG8mZi8Majvf r9dMH19wmIVX7kcgXfArerU0nVUHX1JFDPNiM9jTSKrsi1LaNjB4+b6ReIvi01Zpb0xp WgfEjBk9oBQedwj1aS9O2NihhezpWZE2cq9CVPFdfqV3AYx9r9rblPFisn6t0WW3EKbn VZCkMAWfb0dpmNiRzePa5J++abvaWe8qJRc7tnZcTYtMGYqnhL+u049Gd2AK6wagW7Sd ttctbvDyGqjfQDpSEgEAo+mjYRqY5ef4QXUUAi0Q/pcFKIHWfn1sAMrZJlCgyNFikoWg POjA== Original-Received: by 10.182.40.34 with SMTP id u2mr392230obk.7.1349226210836; Tue, 02 Oct 2012 18:03:30 -0700 (PDT) Original-Received: by 10.60.56.41 with HTTP; Tue, 2 Oct 2012 18:03:30 -0700 (PDT) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.85.214.169 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:9607 Archived-At: On 3 October 2012 03:29, Panicz Maciej Godek wrote= : > Well, the idea for now is that the associated .spec file containing > the state of GUI is loaded on startup, and the state of the > interpreter is dumped to that file on exit (or at GUI's request). > Viewing the file will obviously be an option (for the curious user), > but any modifications would probably be overwritten eventually (unless > the file is write-protected). You may be interested to see how Smalltalk handles this kind of thing. IIRC it dumps the complete VM state to disk and reloads. Even pre-packaged programs are simply VM dumps. To deconstruct and then reconstruct the running state of a system is quite a complex task. Keep your own record of source information, etc. when your objects are instantiated. Associate this with each using object properties (or similar construct). This way you have any required environment and precisely the source which generated the object, the user can inspect this if interested and it can be used to create new instances. As someone mentioned earlier, the way macros are expanded there is no single point to define (internal to guile) what is the =E2=80=9Csource=E2= =80=9D of a procedure. However, your system can define this as it has a clear point of object instantiation. I have not worked on such a system myself, so am poking around in the dark here. Good luck :-)