From debbugs-submit-bounces@debbugs.gnu.org Mon Dec 19 10:15:52 2011 Received: (at submit) by debbugs.gnu.org; 19 Dec 2011 15:15:52 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RcewR-00071L-S4 for submit@debbugs.gnu.org; Mon, 19 Dec 2011 10:15:52 -0500 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RcewO-00071D-W0 for submit@debbugs.gnu.org; Mon, 19 Dec 2011 10:15:50 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rceu8-0005hK-70 for submit@debbugs.gnu.org; Mon, 19 Dec 2011 10:13:55 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-4.5 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([140.186.70.17]:36371) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rceu7-0005gp-QN for submit@debbugs.gnu.org; Mon, 19 Dec 2011 10:13:27 -0500 Received: from eggs.gnu.org ([140.186.70.92]:58834) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rcete-0000nf-Jw for bug-guile@gnu.org; Mon, 19 Dec 2011 10:13:27 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RcetJ-0005NU-Dd for bug-guile@gnu.org; Mon, 19 Dec 2011 10:12:58 -0500 Received: from lo.gmane.org ([80.91.229.12]:34834) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RcetI-0005MY-UA for bug-guile@gnu.org; Mon, 19 Dec 2011 10:12:37 -0500 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1RcetG-0001Jg-Tz for bug-guile@gnu.org; Mon, 19 Dec 2011 16:12:34 +0100 Received: from cpc13-rdng21-2-0-cust334.15-3.cable.virginmedia.com ([82.12.149.79]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 19 Dec 2011 16:12:34 +0100 Received: from ian by cpc13-rdng21-2-0-cust334.15-3.cable.virginmedia.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 19 Dec 2011 16:12:34 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: bug-guile@gnu.org From: Ian Hulin Subject: Please document include and include-from-path Date: Mon, 19 Dec 2011 15:12:22 +0000 Lines: 16 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: cpc13-rdng21-2-0-cust334.15-3.cable.virginmedia.com User-Agent: Mozilla/5.0 (X11; Linux i686; rv:8.0) Gecko/20111124 Thunderbird/8.0 X-Enigmail-Version: 1.3.4 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.17 X-Spam-Score: -5.9 (-----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.9 (-----) I think I know what these do, but could you include them in the docs, and point out how differ from load and load-from-path. Documentation something like this? — Scheme Procedure: include filename Load filename and add its contents to a file currently being compiled. Unlike /load/ its contents are not evaluated immediately. The load paths are not searched. — Scheme Procedure: include-from-path filename Locate /filename/ in the load paths, load /filename/ and add its contents to a file currently being compiled. Unlike /load-from-path/ its contents are not evaluated immediately. From debbugs-submit-bounces@debbugs.gnu.org Fri Dec 23 19:00:15 2011 Received: (at 10327) by debbugs.gnu.org; 24 Dec 2011 00:00:15 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ReF26-0007TH-TD for submit@debbugs.gnu.org; Fri, 23 Dec 2011 19:00:15 -0500 Received: from mail-wi0-f172.google.com ([209.85.212.172]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ReF23-0007T7-OZ for 10327@debbugs.gnu.org; Fri, 23 Dec 2011 19:00:12 -0500 Received: by wibhj6 with SMTP id hj6so3685383wib.3 for <10327@debbugs.gnu.org>; Fri, 23 Dec 2011 15:57:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type:content-transfer-encoding; bh=XAWfXZvf1LRZyEAW4jbxFjIs7Hu6Qh9W+xTt+/a9z20=; b=HYJyk19qNc1OGfEEyxNg1EwZRzicwpL8LXKWQjbDJRyCjm51cGMDXQHTeXnUkBw3uD Ed2vCM7dWuTHQzqoeLpnr8EJyZ+sU6YdDTUqwI+n4xRTgq1T1A1ms60+ZeIlCZVyfwyI u/kRe9HakLA7UyrJ++Tk7ZNS4QWW1SBkyYLys= Received: by 10.180.81.72 with SMTP id y8mr36408291wix.14.1324684673099; Fri, 23 Dec 2011 15:57:53 -0800 (PST) Received: from Kagami.home (host86-169-200-186.range86-169.btcentralplus.com. [86.169.200.186]) by mx.google.com with ESMTPS id w8sm35734767wiz.4.2011.12.23.15.57.52 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 23 Dec 2011 15:57:52 -0800 (PST) From: Ian Price To: 10327@debbugs.gnu.org Subject: Re: bug#10327: Please document include and include-from-path References: Date: Fri, 23 Dec 2011 23:53:51 +0000 In-Reply-To: (Ian Hulin's message of "Mon, 19 Dec 2011 15:12:22 +0000") Message-ID: <87ehvu975c.fsf@Kagami.home> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: 10327 Cc: Ian Hulin X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.9 (---) Ian Hulin writes: > I think I know what these do, but could you include them in the docs, > and point out how differ from load and load-from-path. > > Documentation something like this? > > =E2=80=94 Scheme Procedure: include filename > > Load filename and add its contents to a file currently being > compiled. Unlike /load/ its contents are not evaluated immediately. > The load paths are not searched. > > =E2=80=94 Scheme Procedure: include-from-path filename > > Locate /filename/ in the load paths, load /filename/ and add its > contents to a file currently being compiled. Unlike > /load-from-path/ its contents are not evaluated immediately. I agree, these should be documented, but I would stay away from using the phrase 'load' in a description of these in case it is confusing. Maybe "Adds the contents of the file, in place, at the point of the 'include' macro use at macro expansion time"? Or am I being ever so slightly patronising?=20 --=20 Ian Price "Programming is like pinball. The reward for doing it well is the opportunity to do it again" - from "The Wizardy Compiled" From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 27 10:32:20 2012 Received: (at 10327-done) by debbugs.gnu.org; 27 Jan 2012 15:32:20 +0000 Received: from localhost ([127.0.0.1]:46903 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Rqnml-0005Rf-H4 for submit@debbugs.gnu.org; Fri, 27 Jan 2012 10:32:19 -0500 Received: from a-pb-sasl-sd.pobox.com ([74.115.168.62]:34570 helo=sasl.smtp.pobox.com) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Rqnmg-0005RV-VR for 10327-done@debbugs.gnu.org; Fri, 27 Jan 2012 10:32:16 -0500 Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTP id 3DEEB905F; Fri, 27 Jan 2012 10:31:36 -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=IfHSyvjxpbhonWjGZeA5vt85BZ8=; b=jbxl0Q mod+J5CkdmpYujnYu2yxzY0gfczfUk3xAHpPu5bfa3+TX+5Hqi/mdItEt2zoLfWf EivzZLRHR+mW+VCZ/Ja17hAuippw6GetanXtkmwSJSjeJGavgC0PUbgeAvV8hINH 1GKNP0qx3QSZ5QQxInviX04HLZsLw/c56o7E8= 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=ULGfZqcurhWeWqg7m9PB1J8OEPAuo7aD nq56YlvlxIUjWk+2g3kl6f/NYgL0B26e4o83HVN/52k8sfq3mYhdyzDBNXhC5VRV bcPzD04NCv5b6zgQd+zuOU6KEU0SWkxqd6iKh90xoNZMIscPA4uSm/W3xztk31Od XyxE3LDjMuE= Received: from a-pb-sasl-sd.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTP id 36DFD905E; Fri, 27 Jan 2012 10:31:36 -0500 (EST) 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 71DC9905D; Fri, 27 Jan 2012 10:31:35 -0500 (EST) From: Andy Wingo To: Ian Price Subject: Re: bug#10327: Please document include and include-from-path References: <87ehvu975c.fsf@Kagami.home> Date: Fri, 27 Jan 2012 16:31:31 +0100 In-Reply-To: <87ehvu975c.fsf@Kagami.home> (Ian Price's message of "Fri, 23 Dec 2011 23:53:51 +0000") Message-ID: <87aa59go18.fsf@pobox.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Pobox-Relay-ID: FF5E0BC4-48FB-11E1-8715-65B1DE995924-02397024!a-pb-sasl-sd.pobox.com X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 10327-done Cc: Ian Hulin , 10327-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) Hello Ian & Ian :) Thanks for the report. I added some extensive docs. 6.17.11 Local Inclusion ----------------------- This section has discussed various means of linking Scheme code together: fundamentally, loading up files at run-time using `load' and `load-compiled'. Guile provides another option to compose parts of programs together at expansion-time instead of at run-time. -- Scheme Syntax: include file-name Open FILE-NAME, at expansion-time, and read the Scheme forms that it contains, splicing them into the location of the `include', within a `begin'. If you are a C programmer, if `load' in Scheme is like `dlopen' in C, consider `include' to be like the C preprocessor's `#include'. When you use `include', it is as if the contents of the included file were typed in instead of the `include' form. Because the code is included at compile-time, it is available to the macroexpander. Syntax definitions in the included file are available to later code in the form in which the `include' appears, without the need for `eval-when'. (*Note Eval When::.) For the same reason, compiling a form that uses `include' results in one compilation unit, composed of multiple files. Loading the compiled file is one `stat' operation for the compilation unit, instead of `2*N' in the case of `load' (once for each loaded source file, and once each corresponding compiled file, in the best case). Unlike `load', `include' also works within nested lexical contexts. It so happens that the optimizer works best within a lexical context, because all of the uses of bindings in a lexical context are visible, so composing files by including them within a `(let () ...)' can sometimes lead to important speed improvements. On the other hand, `include' does have all the disadvantages of early binding: once the code with the `include' is compiled, no change to the included file is reflected in the future behavior of the including form. Also, the particular form of `include', which requires an absolute path, or a path relative to the current directory at compile-time, is not very amenable to compiling the source in one place, but then installing the source to another place. For this reason, Guile provides another form, `include-from-path', which looks for the source file to include within a load path. -- Scheme Syntax: include-from-path file-name Like `include', but instead of expecting `file-name' to be an absolute file name, it is expected to be a relative path to search in the `%load-path'. `include-from-path' is more useful when you want to install all of the source files for a package (as you should!). It makes it possible to evaluate an installed file from source, instead of relying on the `.go' file being up to date. On Sat 24 Dec 2011 00:53, Ian Price writes: > Or am I being ever so slightly patronising? "Recursion and condescension"? :-) http://james-iry.blogspot.com/2009/05/brief-incomplete-and-mostly-wrong.html Cheers, Andy -- http://wingolog.org/ From unknown Sat Jun 21 10:33:48 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 25 Feb 2012 12:24:03 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator