From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Neil Jerram Newsgroups: gmane.lisp.guile.devel Subject: Re: low-hanging SRFI fruit (SRFI-98) Date: Sat, 30 May 2009 23:11:30 +0100 Message-ID: <87octas0kt.fsf@arudy.ossau.uklinux.net> References: <2bc5f8210905261943m3b0a090cm3839b11f442060d4@mail.gmail.com> <87fxeq6xtl.fsf@arudy.ossau.uklinux.net> <2bc5f8210905281519u1e98e859v58d42b3e3a907a37@mail.gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1243721616 13518 80.91.229.12 (30 May 2009 22:13:36 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 30 May 2009 22:13:36 +0000 (UTC) Cc: guile-devel To: Julian Graham Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Sun May 31 00:13:32 2009 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 1MAWnn-0007ou-1e for guile-devel@m.gmane.org; Sun, 31 May 2009 00:13:19 +0200 Original-Received: from localhost ([127.0.0.1]:43894 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MAWnm-0006Jq-3k for guile-devel@m.gmane.org; Sat, 30 May 2009 18:13:18 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MAWmk-0005v3-I7 for guile-devel@gnu.org; Sat, 30 May 2009 18:12:14 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MAWmf-0005qc-8g for guile-devel@gnu.org; Sat, 30 May 2009 18:12:13 -0400 Original-Received: from [199.232.76.173] (port=55266 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MAWmf-0005qU-1a for guile-devel@gnu.org; Sat, 30 May 2009 18:12:09 -0400 Original-Received: from mail3.uklinux.net ([80.84.72.33]:53544) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MAWme-0007xf-Jx for guile-devel@gnu.org; Sat, 30 May 2009 18:12:08 -0400 Original-Received: from arudy (host86-152-99-133.range86-152.btcentralplus.com [86.152.99.133]) by mail3.uklinux.net (Postfix) with ESMTP id 520D41F9099; Sat, 30 May 2009 23:11:31 +0100 (BST) Original-Received: from arudy.ossau.uklinux.net (arudy [127.0.0.1]) by arudy (Postfix) with ESMTP id E3E1C38013; Sat, 30 May 2009 23:11:30 +0100 (BST) In-Reply-To: <2bc5f8210905281519u1e98e859v58d42b3e3a907a37@mail.gmail.com> (Julian Graham's message of "Thu\, 28 May 2009 18\:19\:03 -0400") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.4-2.6 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:8566 Archived-At: Julian Graham writes: >> Looks good to me, please go ahead. > > Find attached a patch that includes the implementation previously > attached, plus unit tests and additions to the NEWS and modules.texi > files. > > > Regards, > Julian Hi Julian, Thanks for doing this. The code and test all look fine to me; I just have a few comments on the commit message and the documentation. Am I correct in thinking that you can commit this yourself? - subject to Savannah coming back up, of course. If so, please do that after incorporating the following points. > From a1e4bcb30b80199de6f2cd620d950d04e0734592 Mon Sep 17 00:00:00 2001 > From: Julian Graham > Date: Thu, 28 May 2009 18:15:05 -0400 > Subject: [PATCH] Implementation of SRFI-98 (An interface to environment variables) When you commit, the commit message should include ChangeLog-style entries for the changes. > --- > NEWS | 1 + > doc/ref/srfi-modules.texi | 19 +++++++++++++++++ > module/srfi/srfi-98.scm | 44 +++++++++++++++++++++++++++++++++++++++++ > test-suite/tests/srfi-98.test | 38 +++++++++++++++++++++++++++++++++++ > 4 files changed, 102 insertions(+), 0 deletions(-) > create mode 100644 module/srfi/srfi-98.scm > create mode 100644 test-suite/tests/srfi-98.test > > diff --git a/NEWS b/NEWS > index 1785fe8..94d6be7 100644 > --- a/NEWS > +++ b/NEWS > @@ -10,6 +10,7 @@ Changes in 1.9.0: > * New modules (see the manual for details) > > ** `(srfi srfi-18)', multithreading support > +** `(srfi srfi-98)', an interface to environment variables > ** The `(ice-9 i18n)' module provides internationalization support > > * Changes to the distribution > diff --git a/doc/ref/srfi-modules.texi b/doc/ref/srfi-modules.texi > index 1fa50b2..638aa46 100644 > --- a/doc/ref/srfi-modules.texi > +++ b/doc/ref/srfi-modules.texi > @@ -47,6 +47,7 @@ get the relevant SRFI documents from the SRFI home page > * SRFI-61:: A more general `cond' clause > * SRFI-69:: Basic hash tables. > * SRFI-88:: Keyword objects. > +* SRFI-98:: An interface to access environment variables. That's not quite idiomatic English, is it? I know it's the title of the SRFI, but I think that `Accessing environment variables' would be simpler and better. > @end menu > > > @@ -3608,6 +3609,24 @@ Return the keyword object whose name is @var{str}. > @end example > @end deffn > > +@node SRFI-98 > +@subsection SRFI-98 An interface to access environment variables. Same again here. > +@cindex SRFI-98 > +@cindex environment variables > + > +This is a portable wrapper around Guile's built-in support for > +interacting with the current environment, @xref{Runtime Environment}. > + > +@deffn {Scheme Procedure} get-environment-variable name > +Returns the value of the named environment variable as a string, or > +@code{#f} if the named environment variable is not found. This is > +equivalent to @code{(getenv name)}. Looking at this from the point of view of a developer wanting to use this procedure... Should name be a symbol, or a string; or can it be either? > +@end deffn > + > +@deffn {Scheme Procedure} get-environment-variables > +Returns names and values of all the environment variables as an > +association list. In which the keys and values are strings? Or are the keys symbols? Regards, Neil