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: Anything better for delayed lexical evaluation than (lambda () ...)? Date: Tue, 13 Dec 2011 14:05:19 +0100 Message-ID: <87aa6wbp0w.fsf@pobox.com> References: <87liqtpsl9.fsf@fencepost.gnu.org> <874nxdwkbi.fsf@rapitore.luna> <87d3bvfo5d.fsf@fencepost.gnu.org> <871usaicvi.fsf@netris.org> <87mxaycmlx.fsf@fencepost.gnu.org> <87wra1hcek.fsf@netris.org> <87mxaxihnw.fsf@pobox.com> <87obvclu92.fsf@fencepost.gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1323781544 1424 80.91.229.12 (13 Dec 2011 13:05:44 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 13 Dec 2011 13:05:44 +0000 (UTC) Cc: guile-devel@gnu.org To: David Kastrup Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Tue Dec 13 14:05:39 2011 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RaS39-0001zP-6E for guile-devel@m.gmane.org; Tue, 13 Dec 2011 14:05:39 +0100 Original-Received: from localhost ([::1]:33156 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RaS38-0001iS-ME for guile-devel@m.gmane.org; Tue, 13 Dec 2011 08:05:38 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:55767) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RaS32-0001hT-4K for guile-devel@gnu.org; Tue, 13 Dec 2011 08:05:36 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RaS2x-0002O1-52 for guile-devel@gnu.org; Tue, 13 Dec 2011 08:05:32 -0500 Original-Received: from a-pb-sasl-sd.pobox.com ([74.115.168.62]:47960 helo=sasl.smtp.pobox.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RaS2u-0002Ng-Kw; Tue, 13 Dec 2011 08:05:24 -0500 Original-Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTP id 28DAB7C14; Tue, 13 Dec 2011 08:05:24 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=sasl; bh=G35YWB9Hkf8ZmLGU6jNrEFSRqrw=; b=WG9Js6 iCnrQ2+Bh4elhtrkyfSdJ4IKQAwiltp+KY7kPPog/Ex0cTjgh4qD+gKVjgh2eZVo TOeJBSC0TA3CRid9r2AVlaPapz7ci/jlBQZW3aNBhjhs2XGI/tbpClA5j2X9nFa7 30bLQlqZixSLj/OC9befB2AgMVIE8moPqoS1s= DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; q=dns; s=sasl; b=BpijjeIOg/iwrv1e/+ge91+IIvW7i/RY XW68TaYMhP1ONfQWYqZX8k1Xx+Id9M/6w0RH/+5yT97OZ6y2uRVqJHNPzo2Tbfk8 buZMCBReJ42Hcgshuie4oWjbk7kYFdAKChz38zJK/zA/wmbzOl5OGBat11q+fJ// T0nZnJI9DTo= Original-Received: from a-pb-sasl-sd.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTP id 212E17C13; Tue, 13 Dec 2011 08:05:24 -0500 (EST) Original-Received: from badger (unknown [90.164.198.39]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTPSA id 849627C12; Tue, 13 Dec 2011 08:05:23 -0500 (EST) In-Reply-To: <87obvclu92.fsf@fencepost.gnu.org> (David Kastrup's message of "Tue, 13 Dec 2011 10:02:17 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) X-Pobox-Relay-ID: 1E4D2FD6-258B-11E1-8398-65B1DE995924-02397024!a-pb-sasl-sd.pobox.com X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta) X-Received-From: 74.115.168.62 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:13051 Archived-At: On Tue 13 Dec 2011 10:02, David Kastrup writes: > Lilypond's input language is not "David's current strategy". I was referring to your implementation strategy. Mark describes another implementation strategy. > It does not help because it requires _advance_ knowledge of when you are > going to want to fish for environments. You can call Lilypond's > #{ ... #} construct in the normal REPL. You can call it in any function > definition. It is pervasive. I was suggesting to evaluate all lilypond "scheme" code with the lilypond "scheme" interpreter. That would make `the-environment' available everywhere. I still think making your #{}# parser expand to lexically-scoped Scheme is the best option. Another option is to use the reflective facilities to implement a form of procedure-environment. If you compile your Scheme procedures, with partial evaluation disabled, you should be able to use program-bindings to get this information. I wonder if we could provide some sort of current-bindings syntactic form, also. It would require psyntax hooks, but it could work. Andy -- http://wingolog.org/