guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

ttn-pers-scheme 0.13 available


From: thi
Subject: ttn-pers-scheme 0.13 available
Date: Tue, 27 Feb 2001 16:27:38 -0800

greetings guile folks,

please see
       
 http://www.glug.org/people/ttn/software/ttn-pers-scheme/

for tarball and friends.  lots of new stuff in this release, most of it
to get decent scripting support for the (ongoing) guile projects list db
change...  some random notes:

first, `call-process' is modeled after `open-process' in (ice-9 popen);
maybe there can be some backward leakage?  next, the new `find-file' and
`save-buffer' procs are extremely inefficient, but iirc guile-core/NEWS
has some hints on how to make them less hoggish.  lastly, a hidden OBOE
symphony is waiting to burst forth in `expand-file-name'.  heh.

in other news, did you know a new laptop keyboard can cost 200 USD?  ugh!
may the gods smile on the techs who will be installing it by eow....

thi


___________________________________________
- VERSION 0.13 (released 2001/02/27)

  - New module: (ttn grep) --- Pick mappings according to regexp line match

        Two procs are exported: `grep' and `grep-matches'.
        Docstrings are reproduced here.

    - `grep' RE STRINGS . FLAGS

        Return list of matches to regexp RE from STRINGS list.  Optional
        args FLAGS are zero or more symbols which modify regexp
        matching:
        `invert'    -- the result list is those strings that do NOT match
        `fold-case' -- consider upper and lower case to be identical
        Return list order is the same as in the input list.

    - `grep-matches' RE STRINGS . FLAGS

        Return non-#f match results of `regexp-exec' of regexp RE on
        STRINGS list.  Optional args FLAGS are zero or more symbols which
        modify regexp matching:
        `invert' -- the result list is composed entirely of #t values,
                    with length equal to the number of strings that do
                    NOT match (not very useful; this option listed for
                    completeness)
        `fold-case' -- consider upper and lower case to be identical
        Return list order is the same as in the input list.

  - New module: (ttn fileutils) --- Munge files in core

        Two procs are exported: `expand-file-name' and `find-file'.
        Docstrings are reproduced here.

    - `expand-file-name' NAME . DEFAULT-DIRECTORY

        Convert filename NAME to absolute, and canonicalize it.  Second
        arg DEFAULT-DIRECTORY is directory to start with if NAME is
        relative (does not start with slash); if DEFAULT-DIRECTORY is #f
        or missing, `(getcwd)' is used.  File name components that are
        `.' are removed, and so are file name components followed by
        `..', along with the `..' itself; note that these
        simplifications are done without checking the resulting file
        names in the file system.
        An initial `~/' expands to your home directory.
        An initial `~USER/' expands to USER's home directory.

    - `find-file' FILENAME

        Insert file named FILENAME into a buffer, and return that
        buffer.  FILENAME is passed through `expand-file-name', q.v.
        If the file is not readable, return #f.

    - `save-buffer' BUFFER

        Save BUFFER to disk.  BUFFER should be from `find-file', q.v.
        An error is thrown if BUFFER's `filename' object-property is not
        set.  An error is thrown if the file cannot be written.

  - Changes to (ttn gap-buffer)

    - new proc: `gb-erase!' GB

    - new proc: `gb-filter!' GB PROC-TAKING/RETURNING-STRING

    - new proc: `gb->lines' BG

    - new proc: `gb-filter-lines!' GB PROC-TAKING/RETURNING-LIST

    - `make-gap-buffer-port' now throws error if arg not a gap-buffer

  - Changes to (ttn shellutils)

    - new proc: `args->normalized-list' ARGS

        For ARGS, trim surrounding whitespace, join together separated
        by space, then split apart on space boundaries.  For example:

        (args->normalized-list "rsync a b c" " d " "e" "f g h")
        =>
        ("rsync" "a" "b" "c" "d" "e" "f" "g" "h")"

        This is used by `call-process' and `call-process->buffers'.

    - new proc: `call-process' PROGRAM . ARGS

        Call PROGRAM synchronously in separate process w/ optional ARGS.
        Key `#:inp' specifies the program's input port; #f means
        `/dev/null'.  Key `#:outp' specifies the program's output port;
        #f means discard output; 0 means discard and don't wait.  Key
        `#:errp' specifies the program's error output port; #f means
        discard output.  If omitted, ports default to standard input,
        output and error ports, respectively.

        If the output port is 0, return immediately with value #f.
        Otherwise wait for PROGRAM to terminate and return a numeric
        exit status.

        Key `#:norm' specifies whether or not PROGRAM and ARGS should be
        passed through `args->normalized-list' (default no processing).

    - new proc: `call-process->buffers' PROGRAM . ARGS

        Call PROGRAM synchronously in separate process w/ optional ARGS.
        Key `#:inb' specifies the program's input buffer.  Key `#:outb'
        specifies the program's output buffer Key `#:errb' specifies the
        program's error output buffer.  Default is that all buffers are
        specified as `#f.  Key `#:norm' specifies whether or not PROGRAM
        and ARGS should be passed through `args->normalized-list'
        (default no processing).  Return a numeric exit status.

    - new proc: `make-buffered-caller' PROGRAM . ARGS

        Return a procedure that is capable of calling PROGRAM w/
        optional ARGS.  When called, the program stdout and stderr are
        captured to buffers.  The key `#:inb' (default #f) specifies an
        input buffer to use for the call.

        The returned procedure takes one of the following commands (a
        symbol):

        redefine NEW-DEF -- Redefine the called program and its args.
                            NEW-DEF is one or more strings.
        execute          -- Call program, clearing buffers first.
                            Return exit status of the program.
        execute/no-init  -- Same as `execute', w/o clearing buffers first.
        outbuf           -- Return output buffer object.
        outbuf-string    -- Return output buffer as a string.
        outbuf-lines     -- Return output buffer as a list of strings.
        errbuf           -- Return error output buffer.
        errbuf-string    -- Return error output buffer as a string.
        errbuf-lines     -- Return error output buffer as a list of strings.

[NEWS excerpt ends here]



reply via email to

[Prev in Thread] Current Thread [Next in Thread]