guile-sources
[Top][All Lists]
Advanced

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

ttn-pers-scheme 0.16 available


From: thi
Subject: ttn-pers-scheme 0.16 available
Date: Mon, 19 Mar 2001 05:24:17 -0800

hello guile folks,

please see directory:

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

for tarball and friends.  any macro wizards wanna have a good laugh?
check out `editing-buffer' and help me find the right path...  lots of
other things too.  NEWS excerpt follows.  ah, text...

a question for the mailing list admins: is there any way to add the full
archive URL as a mail header?  i notice a "List-Archive:" field, but its
value is not enough detail to be immediately useful...

thi


________________________________________
- VERSION 0.16 (released 2001/03/19)

  - Benchmark framework added

        You can now do "make tea" which runs some benchmarks, displaying
        user and system CPU usage for each case.  You can increase or
        decrease the iteration counts by specifying an env var like so:

        make BENCHMARK_ITERATION_MULTIPLIER=N tea

        N can be an integer, a floating point number, or even a rational
        number.  The actual number of iterations computed is displayed.
        See ttn/testing/benchmarks/Makefile var `benchmarks' for the
        full list of benchmarks.  You can specify a subset like so:

        make benchmarks='baseline gap-buffer' tea

        Furthermore, for benchmark FOO, see FOO.scm for various options
        to skip parts of the benchmarks.  For example:

        make benchmarks='gap-buffer' opts='--skip-make-gap-buffer' tea

        At this time, there are only a few benchmarks, but if your
        computer is as slow as the author's, perhaps you can escape the
        scourge of "instant tea".

  - Changes to (ttn pgtable)

    - New proc: `define-db-col-type' NAME DEFAULT STRINGIFIER OBJECTIFIER

        Register type NAME with DEFAULT, STRINGIFIER and OBJECTIFIER
        procs.  NAME is a symbol.  DEFAULT is a string to use if the
        Scheme object is #f.  STRINGIFIER is a proc that takes a Scheme
        object and returns a string suitable for use in an "INSERT
        VALUES" SQL command (including SQL quotes).  OBJECTIFIER is a
        proc that takes a string (without SQL quotes) and returns the
        Scheme object parsed out of it."

        See ttn/pgtable.scm for examples; (ttn pgtable) uses this proc
        for its own initialization.

    - New supported type: `bool'

    - Bugfixes

        The return value of the `table->object-alist' `pgtable-manager'
        managed proc is now ordered properly.

        The `timestamp' stringifier only attempts to convert numbers,
        and leaves strings alone.

  - Changes to (ttn moduleutils)

    - Retired proc: `ls'

        This was such a thin wrapper around `apropos' that we can forego
        it w/o much sadness.

    - New macro: `import-from-module' OTHER-MODULE-NAME . NAMES

        Import into current module from OTHER-MODULE-NAME variables
        NAMES.  Each element of NAMES is taken to be either a variable
        name, or a pair (OLD-NAME . NEW-NAME) describing the mapping to
        be used.  OLD-NAME needs to be defined in OTHER-MODULE-NAME,
        though it need not be exported.

    - New macro: `reexport-from-module' OTHER-MODULE-NAME . SPECIFICALLY

        Re-export variables from module named OTHER-MODULE-NAME.  If
        optional args SPECIFICALLY is the empty list, all public
        variables from OTHER-MODULE-NAME are exported, otherwise, each
        element in SPECIFICALLY is taken to be either a symbol naming a
        variable to be exported, or a pair of symbols of the form
        (OLD-NAME . NEW-NAME) describing the mapping to be used.
        OLD-NAME should name an exported variable in OTHER-MODULE-NAME.

        This macro was snarfed from in THUD.

  - Changes to (ttn fileutils)

    - Performance enhanced procs: `find-file', `save-buffer'

    - New proc: `write-buffer' BUFFER FILENAME

        Write BUFFER into file FILENAME.
        FILENAME is passed through `expand-file-name', q.v.
        This makes the buffer visit that file.
        FILENAME cannot be a directory."

  - Changes to (ttn gap-buffer)

    - Performance enhanced proc: `gb->lines'

    - Bugfix

        `gb-goto-char' now returns `new-point', even if that is an
        invalid point (in which case, point is set to `point-min' or
        `point-max' anyway).  This mimics the behavior of GNU Emacs.

  - New module: (ttn edit)

        This module exports a macro `editing-buffer'.  Docstring:

        Consider BUFFER the "current buffer" and execute BODY.
        In BODY, applications of one of `current-buffer-procs' (see
        source) are handled specially.

        There is too much other stuff to document in this NEWS file, so
        here's a short program that gives a taste of what can be done:

        #!/bin/sh
        exec guile -s $0 $0       # -*- scheme -*-
        !#
        (use-modules (ttn fileutils) (ttn edit) (ttn echo))
        (editing-buffer (find-file (cadr (command-line)))
          (while (re-search-forward "^.+<([^>]*[^^])>" (point-max) #t)
            (echo (match-string 1))))
        ;; <find this tag>
        ;; <but don't find this one:^>
        #!
        <don't find this one either>
        !#

        Save this to foo, do "chmod +x foo", install ttn-pers-scheme
        somewhere in the `%load-path' and run foo.  The program should
        display "find this tag".

        Procs supported: point, point-min, point-max, buffer-string,
        buffer-substring, goto-char, forward-char, backward-char,
        match-data, set-match-data, match-string, looking-at,
        match-beginning, match-end, search-forward, search-backward,
        re-search-forward, replace-match, insert, delete-char,
        erase-buffer, delete-region.

  - Testing news

        Testing (ttn pgtable) is now more flexible; the database name
        you set up need not be the same as your user name.  See README
        for revised instructions.

[NEWS excerpt ends here]



reply via email to

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