From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andy Wingo Newsgroups: gmane.lisp.guile.devel Subject: Re: vm branch now uses vm repl by default Date: Tue, 09 Sep 2008 20:13:44 +0200 Message-ID: References: <87y721btiy.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1220991774 15665 80.91.229.12 (9 Sep 2008 20:22:54 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 9 Sep 2008 20:22:54 +0000 (UTC) Cc: guile-devel@gnu.org To: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Tue Sep 09 22:23:50 2008 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Kd9k6-0003he-2w for guile-devel@m.gmane.org; Tue, 09 Sep 2008 22:23:18 +0200 Original-Received: from localhost ([127.0.0.1]:59029 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kd9j5-0008TJ-6k for guile-devel@m.gmane.org; Tue, 09 Sep 2008 16:22:15 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Kd9ir-0008HR-92 for guile-devel@gnu.org; Tue, 09 Sep 2008 16:22:01 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Kd9ik-0008A0-JW for guile-devel@gnu.org; Tue, 09 Sep 2008 16:21:59 -0400 Original-Received: from [199.232.76.173] (port=38911 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kd9ik-00089t-At for guile-devel@gnu.org; Tue, 09 Sep 2008 16:21:54 -0400 Original-Received: from a-sasl-quonix.sasl.smtp.pobox.com ([208.72.237.25]:48704 helo=sasl.smtp.pobox.com) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Kd9iV-00067z-O8; Tue, 09 Sep 2008 16:21:40 -0400 Original-Received: from localhost.localdomain (localhost [127.0.0.1]) by a-sasl-quonix.sasl.smtp.pobox.com (Postfix) with ESMTP id D92CF7AE5A; Tue, 9 Sep 2008 16:21:30 -0400 (EDT) Original-Received: from unquote (251.Red-83-32-65.dynamicIP.rima-tde.net [83.32.65.251]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by a-sasl-quonix.sasl.smtp.pobox.com (Postfix) with ESMTPSA id 9244F7AE57; Tue, 9 Sep 2008 16:21:25 -0400 (EDT) In-Reply-To: <87y721btiy.fsf@gnu.org> ("Ludovic =?utf-8?Q?Court=C3=A8s=22'?= =?utf-8?Q?s?= message of "Tue, 09 Sep 2008 10:41:41 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-Pobox-Relay-ID: E396D514-7EAC-11DD-AED6-3113EBD4C077-02397024!a-sasl-quonix.pobox.com X-detected-kernel: by monty-python.gnu.org: Solaris 10 (beta) X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:7646 Archived-At: On Tue 09 Sep 2008 10:41, ludo@gnu.org (Ludovic Court=C3=A8s) writes: > So, previously, there was `variable-ref': There still is. It is used when a variable is bound immediately, when it is pushed on the stack by a link-now instruction. scheme@(guile-user)> ,c (define x a) Disassembly of #: nlocs =3D 0 nexts =3D 0 0 (load-symbol "a") ;; a 3 (link-now) 4 (variable-ref) 5 (define "x") 8 (variable-set) 9 (void) 10 (return) > Now, there's also a vector associated with each closure to store > references to global variables, right? Looks better! That's always been the case IIRC, only before it used to push and pop a bit more -- instead of (late-variable-ref 0)=20 it would be (object-ref 0) (variable-ref) where the object was instantiated by a load-symbol / link-now pair. But that's not how Guile's toplevel lookups occur, so I added the new behavior, which has the added benefit of not pushing and popping so much. > (Hint: the doc is outdated. :-)) It's still correct, just not complete :-) I'll get on it at some point, probably folding into Guile's docs somehow. >> scheme@(guile-user)> ,option interp #t > > That means good old `CEVAL ()' is used, right? Yep, whatever (language-evaluator (repl-language repl)) does -- which for `scheme' is `eval'. http://git.savannah.gnu.org/gitweb/?p=3Dguile.git;a=3Dcommitdiff;h=3D02= ed0d3df2607c5d78fbc38cbb82a65df1bc7080 > When that is the case, one can still use `{eval,debug}-options', right? Yep > It'd be nice if we could find a way to "do something" with the > `current-reader' fluid at compilation time, like detecting top-level > `(fluid-set! current-reader ...)' statements and use that to switch the > compiler's reader (hacky...). Perhaps, there is already a repl-reader fluid for readline's benefit. Note also that languages have readers as well, so that e.g. elisp can read differently from scheme. Andy --=20 http://wingolog.org/