From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Han-Wen Nienhuys Newsgroups: gmane.lisp.guile.devel Subject: Re: scm_* API extension? [was] scm_* API question Date: Mon, 5 Aug 2002 20:12:27 +0200 Sender: guile-devel-admin@gnu.org Message-ID: <15694.49163.715320.366211@meddo.cs.uu.nl> References: <20020730121436.GA4465@www> <20020730200929.A18106@kiwi.pyrotechnics.com> <20020731100300.GC5661@www> <20020731150602.A32555@kiwi.pyrotechnics.com> <20020801094121.GC7425@www> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: main.gmane.org 1028571146 26612 127.0.0.1 (5 Aug 2002 18:12:26 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 5 Aug 2002 18:12:26 +0000 (UTC) Cc: rm@fabula.de, guile-devel@gnu.org Return-path: Original-Received: from fencepost.gnu.org ([199.232.76.164]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 17bmLA-0006v5-00 for ; Mon, 05 Aug 2002 20:12:24 +0200 Original-Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org) by fencepost.gnu.org with esmtp (Exim 3.35 #1 (Debian)) id 17bmLp-0000so-00; Mon, 05 Aug 2002 14:13:05 -0400 Original-Received: from aurora.cs.uu.nl ([131.211.80.20] helo=mail.cs.uu.nl) by fencepost.gnu.org with esmtp (Exim 3.35 #1 (Debian)) id 17bmLE-0000nL-00 for ; Mon, 05 Aug 2002 14:12:28 -0400 Original-Received: from meddo.cs.uu.nl.cs.uu.nl (meddo.cs.uu.nl [131.211.80.91]) by mail.cs.uu.nl (Postfix) with ESMTP id C577D1CB292; Mon, 5 Aug 2002 20:12:27 +0200 (CEST) Original-To: Marius Vollmer In-Reply-To: X-Mailer: VM 7.03 under Emacs 21.2.1 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:990 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.devel:990 marius.vollmer@uni-dortmund.de writes: > > What is an 'interpreter'? What do multiple instances of the > interpreter have in common, what is specific to each instance? I > think that once you know what you want from multiple interpreters, you > can implement them easily with the features we already have. Or with > fork. What I want is a way to encapsulate state changes; modules give a nice way to deal with naming variables, but not with their values. When I have two lilypond files, one doing f1.ly #(set! global-foo-option #t) ;; default = #f \score {\notes { .. } } f2.ly \score { \notes { ..other notes.. } } What really happens during execution depends on the order of execution: if you do lilypond f1 f2 then f2 is processed with global-foo-option set to #t. If you change the order, then f2 is processed with global-foo-option set to #f. It would be nice if we could have some kind of copy-on-write system for variables, so that I can reset the state of the variables before processing each new file. [disclaimer, I know nothing of advanced Scheme techniques, I might be missing some basic idiom here completely.] -- Han-Wen Nienhuys | hanwen@cs.uu.nl | http://www.cs.uu.nl/~hanwen/ _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://mail.gnu.org/mailman/listinfo/guile-devel