From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Neil Jerram Newsgroups: gmane.lisp.guile.user Subject: Re: Modified load-path proposal Date: Sat, 07 Jan 2006 13:37:48 +0000 Message-ID: <87bqyonopf.fsf@ossau.uklinux.net> References: <878xwx5ld2.fsf@ossau.uklinux.net> <87u0fl3wam.fsf@ossau.uklinux.net> <87oe5s51l4.fsf@ivanova.rotty.yi.org> <87ek6njah0.fsf@ossau.uklinux.net> <87r7adf8h1.fsf@zip.com.au> <87vezhbknv.fsf@ossau.uklinux.net> <87u0ey3mph.fsf@ossau.uklinux.net> <873bmf4ey4.fsf@laas.fr> <87y832l4af.fsf@ossau.uklinux.net> <87irttpf2c.fsf@laas.fr> <87r78duc9d.fsf@ossau.uklinux.net> <87hd99z7q2.fsf@laas.fr> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1136644007 10292 80.91.229.2 (7 Jan 2006 14:26:47 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 7 Jan 2006 14:26:47 +0000 (UTC) Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Sat Jan 07 15:26:43 2006 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EvF1b-0006Wg-Dl for guile-user@m.gmane.org; Sat, 07 Jan 2006 15:26:31 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EvF3Q-00039g-Km for guile-user@m.gmane.org; Sat, 07 Jan 2006 09:28:24 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EvEKV-0003EI-6d for guile-user@gnu.org; Sat, 07 Jan 2006 08:41:59 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EvEKR-0003DV-CU for guile-user@gnu.org; Sat, 07 Jan 2006 08:41:58 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EvEKQ-0003DL-N9 for guile-user@gnu.org; Sat, 07 Jan 2006 08:41:54 -0500 Original-Received: from [80.84.72.33] (helo=mail3.uklinux.net) by monty-python.gnu.org with esmtp (Exim 4.34) id 1EvEML-00057x-Q7 for guile-user@gnu.org; Sat, 07 Jan 2006 08:43:54 -0500 Original-Received: from laruns (host86-129-132-201.range86-129.btcentralplus.com [86.129.132.201]) by mail3.uklinux.net (Postfix) with ESMTP id 6D32940A066 for ; Sat, 7 Jan 2006 13:39:53 +0000 (UTC) Original-Received: from laruns (laruns [127.0.0.1]) by laruns (Postfix) with ESMTP id EF8D29F106 for ; Sat, 7 Jan 2006 13:37:48 +0000 (GMT) Original-To: guile-user@gnu.org In-Reply-To: <87hd99z7q2.fsf@laas.fr> ( =?iso-8859-1?q?Ludovic_Court=E8s's_message_of?= "Fri, 16 Dec 2005 10:55:49 +0100") User-Agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux) X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.user:5038 Archived-At: ludovic.courtes@laas.fr (Ludovic Court=E8s) writes: > Neil Jerram writes: > >> How so? Given that you're about to do a (use-modules (whatnot)), I >> can't see that also doing (initialize-packages "whatnot") will make a >> significant difference. > > Because people haven't been doing so for years. Some of us certainly > don't want to iterate over each and every Guile module to add this line. > It's quite a big change and it's very interpreter-centric (okay, this > last point is maybe not the strongest argument I could come up with > ;-)). Fair point. It would be better to avoid this if we could. > It would be different if the `initialize-packages' line could be added > automatically --- in fact, `use-modules' could do it and this would be > completely transparent to the module user (more below). [...] > Additionally, I'd be quite happy if the `initialize-packages' phase > could be made automatic. This could be done like this: > > 1. Packages install their module hierarchy wherever they want; > > 2. In addition, packages may install a start-up file in, say, > /usr/share/guile/packages/ (installing these files into the right > Guile directory could be done by a wrapper script, say > `guile-install-module-init'). > > For instance, if I am to install the complete `foo' module > hierarchy, then I can install /usr/share/guile/packages/foo.init > that will be read, if available, the first time a `(foo SOMETHING)' > module is loaded. If that file was available, its content (a > string) are added to `%load-path'. > > > More generally, when module `(foo bar)' is loaded for the first time, > Guile could: > > 1. Look for /../packages/foo/bar.init and use its content to > augment `%load-path' if available; > > 2. If the previous file wasn't available, look for > /../packages/foo.init and use its content to augment > `%load-path' if available; > > 3. If no `init' file was found, just leave `%load-path' unchanged. > > > This way, `init' files are loaded on demand, like in your > `initialize-packages' approach. However, it is less intrusive. > > This is based on the observation that (i) we want modules to be > installable in *any* directory, but (ii) at some point, there must be a > *fixed* directory to look for files to bootstrap further file loading. This is all possible, but it feels to me quite complex and not very elegant; it doesn't feel right to have a shadow tree of potentially all installed modules under $sysconfdir. It seems to me that neither of these ideas (yours and mine) quite fly yet. I have yet another idea, though, that I'll post in a separate thread shortly. Regards, Neil _______________________________________________ Guile-user mailing list Guile-user@gnu.org http://lists.gnu.org/mailman/listinfo/guile-user