unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Andy Wingo <wingo@pobox.com>
To: Mark Harig <idirectscm@aim.com>
Cc: guile-devel@gnu.org
Subject: Re: Patch: New section "Invoking Guile" for chapter "Programming in Scheme"
Date: Sun, 24 Apr 2011 16:33:44 +0200	[thread overview]
Message-ID: <m3pqobd8hj.fsf@unquote.localdomain> (raw)
In-Reply-To: <8CDD0063C9BEB29-FC8-5987@web-mmc-d08.sysops.aol.com> (Mark Harig's message of "Sat, 23 Apr 2011 15:46:13 -0400")

On Sat 23 Apr 2011 21:46, Mark Harig <idirectscm@aim.com> writes:

> Here is a set of patches to add the new section "Invoking Guile" to
> the chapter "Programming in Scheme."

They look good in general, though I have some comments.  I would like
Neil to look over them as well, or at least say he's OK with them.

First, your patches should be "atomic"; see
http://www.kernel.org/pub/software/scm/git/docs/user-manual.html#patch-series
for some commentary.  In particular see point 3.  The manual should be
working after each patch.

The commit logs are good.

> +@item -s @var{script} @var{arg...}
> +@cindex script mode
> +Read and evaluate Scheme source code from the file @var{script}, as the
> +@code{load} function would.  After loading @var{script}, exit.  Any
> +command-line arguments @var{arg...} following @var{script} become the
> +script's arguments; the @code{command-line} function returns a list of
> +strings of the form @code{(@var{script} @var{arg...})}.

The "-s" is actually optional, and only *needed* if your script starts
with a dash.  So please document "guile foo.scm" as the default, and
just mention "-s" in case of the script starting with a dash, or if you
are writing some other shell script.  Use @itemx in this case, I think.

> +strings, even those that are written as numerals.  (Note that here we
> +are referring to names and values that are defined in the operating
> +system shell from which Guile is invoked.  This is not the same as a
> +Scheme environment that is defined within a running instance of guile.

"Guile", I think.

> +How to set environment variables before starting Guile depends on the
> +operating system, and especially the shell that you are using.  For
> +example, here's how to set the environment variable @env{ORGANIZATION}
> +to @samp{not very much} using Bash:
> +
> +@example
> +export ORGANIZATION="not very much"
> +@end example
> +
> +@noindent
> +and here's how to do it in csh or tcsh:
> +
> +@example
> +setenv ORGANIZATION "not very much"
> +@end example

Perhaps the tcsh example is superfluous.  Perhaps we should also mention
the way to set env vars for one invocation: "GUILE_AUTO_COMPILE=0
guile".

> +If you wish to retrieve or change the value of the shell environment
> +variables that effect the run-time behavior of Guile from within a
> +running instance of guile, see @xref{Runtime Environment}.

"affect"

> +@item GUILE_HUSH
> +@vindex GUILE_HUSH
> +The @code{#/} notation for lists provokes a warning message from Guile.
> +This syntax will be removed from Guile in the near future.
> +
> +To disable the warning message, set the @env{GUILE_HUSH} environment
> +variable to any non-empty value.

This variable does not exist.

> +@item GUILE_INIT_MALLOC_LIMIT
> +@vindex GUILE_INIT_MALLOC_LIMIT
> +@item GUILE_MIN_YIELD_MALLOC
> +@vindex GUILE_MIN_YIELD_MALLOC
> +@cindex garbage collecting
> +@item GUILE_MAX_SEGMENT_SIZE
> +@vindex GUILE_MAX_SEGMENT_SIZE
> +@item GUILE_INIT_SEGMENT_SIZE_2
> +@vindex GUILE_INIT_SEGMENT_SIZE_2
> +@item GUILE_INIT_SEGMENT_SIZE_1
> +@vindex GUILE_INIT_SEGMENT_SIZE_1
> +@item GUILE_MIN_YIELD_2
> +@vindex GUILE_MIN_YIELD_2

Since switching to the BDW GC, these variables are not used any more.

GC_FREE_SPACE_DIVISOR is parsed by Guile though.  The GC itself does
appear to do a number of getenv calls, but we can't really document
those in Guile I don't think.

> +@item GUILE_SYSTEM_LOAD_COMPILED_PATH
> +@item GUILE_SYSTEM_PATH
> +@item GUILE_SYSTEM_LTDL_PATH

These are paths that Guile itself uses to look up .go, .scm, and .so
files, respectively.  They have default values, relative to $prefix, but
can be overridden if you really know what you're doing.  This is only
really useful when building Guile itself.

> +@item GUILE_INIT_SEGMENT_SIZE_1
> +@item GUILE_MIN_YIELD_1
> +@item GUILE_INIT_SEGMENT_SIZE_2
> +@item GUILE_MIN_YIELD_2
> +@item GUILE_MAX_SEGMENT_SIZE
> +@item GUILE_INIT_HEAP_SIZE_1
> +@item GUILE_INIT_HEAP_SIZE_2

Not used any more.

> +@item GUILE_WARN_DEPRECATED
> +@vindex GUILE_WARN_DEPRECATED
> +Please provide a description of me.

@ref to Deprecation.

    wingo@unquote:~/src/guile$ meta/guile
    GNU Guile 2.0.0.202-514ff6
    Copyright (C) 1995-2011 Free Software Foundation, Inc.

    Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'.
    This program is free software, and you are welcome to redistribute it
    under certain conditions; type `,show c' for details.

    Enter `,help' for help.
    scheme@(guile-user)> (feature? 'foo)
    $1 = #f
    scheme@(guile-user)> 

    Some deprecated features have been used.  Set the environment
    variable GUILE_WARN_DEPRECATED to "detailed" and rerun the
    program to get more information.  Set it to "no" to suppress
    this message.
    wingo@unquote:~/src/guile$ GUILE_WARN_DEPRECATED=detailed meta/guile
    GNU Guile 2.0.0.202-514ff6
    Copyright (C) 1995-2011 Free Software Foundation, Inc.

    Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'.
    This program is free software, and you are welcome to redistribute it
    under certain conditions; type `,show c' for details.

    Enter `,help' for help.
    scheme@(guile-user)> (feature? 'foo)
    `feature?' is deprecated.  Use `provided?' instead.
    $1 = #f
    scheme@(guile-user)> 
    wingo@unquote:~/src/guile$ 

Otherwise, looking very good.  Thank you for this work, and looking
forward to the revised patchset :-)

Cheers,

Andy
-- 
http://wingolog.org/



  reply	other threads:[~2011-04-24 14:33 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-23 19:46 Patch: New section "Invoking Guile" for chapter "Programming in Scheme" Mark Harig
2011-04-24 14:33 ` Andy Wingo [this message]
2011-04-24 20:36   ` Mark Harig
2011-04-24 21:00     ` Andy Wingo
2011-04-24 21:58       ` Mark Harig
2011-04-25  8:01         ` Andy Wingo
2011-04-24 22:09       ` David Pirotte
2011-04-24 22:43         ` Indexing Scheme and C identifiers separately Mark Harig
2011-04-25  1:18           ` Noah Lavine
2011-04-25 16:16           ` David Pirotte
2011-05-20 22:53             ` Neil Jerram
2011-04-25 19:49       ` Patch: New section "Invoking Guile" for chapter "Programming in Scheme" Mark Harig
2011-04-26 18:07         ` Neil Jerram
2011-04-26 21:01           ` Ludovic Courtès
2011-04-27  9:40             ` Andy Wingo
2011-04-27 10:23               ` Ludovic Courtès
2011-04-27 19:29                 ` Neil Jerram
2011-04-27 16:54           ` Mark Harig
2011-04-27 19:40             ` Neil Jerram
2011-06-30 11:23         ` Andy Wingo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3pqobd8hj.fsf@unquote.localdomain \
    --to=wingo@pobox.com \
    --cc=guile-devel@gnu.org \
    --cc=idirectscm@aim.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).