Subject: CVS commit: pkgsrc/lang/gauche
From: enami tsugutomo
Date: 2014-07-21 09:40:07
Message id: 20140721074007.3C8A796@cvs.netbsd.org

Log Message:
Update gauche to 0.9.4.  Changes are:

Release 0.9.4

Major feature upgrade

  * R7RS support
  * Notable improvements
  * A bunch of new procedures and enhancements
  * Tons of bug fixes
      + Fixes that may break the compatibility
      + Miscellaneous fixes

R7RS support

Gauche now supports R7RS-small ( http://r7rs.org/ ). It can load R7RS libraries
and execute R7RS scripts seamlessly. (There are minor caveats; see ref:Standard
conformance). See also ref:Library modules - R7RS integration for the details
of how R7RS is integrated.

The backward compatibility to the legacy Gauche code is kept as much as
possible; in short, you can keep using existing Gauche code and write new code
in pretty much the same way.

It's up to you to write code in traditional Gauche way or R7RS way: If you plan
to make the code portable, you may want to stick with R7RS, but if you need to
depend on lots of Gauche-specific libraries, there's not much point to adopt
R7RS structure, for you can't run it in other implementations anyway.

Notable improvements

  * REPL is slightly improved: You can access history (ref:Working in REPL).
    And describe shows known bindings when called on symbols. The default
    writer now do not show shared structures, for it confused newcomers; it
    still shows circular structures in srfi:38 notation.
  * data.random: Random data generators.
  * math.prime module for lazy sequence of primes, testing primality, and prime
    factorization.
  * srfi-106: Basic socket interface.
  * PIPE signal handling is changed. By default, Gauche effectively ignores
    SIGPIPE; the system calls will generate EPIPE system-error instead. Since
    the signal delivery timing differ in the Scheme world from C world,
    handling SIGPIPE reasonably is difficult, while handling system error is
    straightforward and synchronous. Note that EPIPE error from stdout and
    stderr terminates the process immediately, so that the Gauche script don't
    spit error messsages when used in command pipelines and the destination
    command exits prematurely. See ref:Handling signals for the details.
  * write and display is now R7RS; that is, they won't explode by circular
    structures.
  * On Windows, system interface functions now properly handles multibyte
    filenames, command-line arguments and enviornment variables. Contribution
    from SAITO Atsushi.

A bunch of new procedures and enhancements

  * New numerical procedures:
      + On rationalization: rationalize, real->rational, continued-fraction;
        see Gauche-blog:20120925-rationalize. As a bonus, now converting
        flonums to exact number can produce more readable (simple) rational
        numbers; see Gauche-blog:20120930-exact.
      + On integer operations: exact-integer? (r7rs) expt-mod, twos-exponent,
        twos-exponent-factor,
      + Gamma functions: gamma, lgamma.
      + r7rs division operators floor/, floor-quotient, floor-remainder,
        truncate/, truncate-quotient, truncate-remainder.
  * expt now returns exact value if possible, even the exponent is non-integer
    (but exact rational).
  * New list and vector procedures: length<=?, list-set!, vector-map (r7rs),
    vector-for-each (r7rs), vector-tabulate.
  * New regex procedures: rxmatch-substrings, rxmatch-positions,
    rxmatch-named-groups.
      + Also, regex objects now have read-write invariance.
  * rfc.json: Now you can customize mappings between json array/object and
    Scheme objects. Also parse-json* is added to parse multiple JSON objects
    from a single source.
  * gauche.generator: New procedures: gconcatenate, gmerge, gbuffer-filter.
  * gauche.lazy: New procedure: lconcatenate
  * gauche.uvector:
      + u8vector-multi-copy!, u8vector-append (and all other TAG variations).
      + string->u8vector etc.: Added immutable? optional argument to produce
        immutable uvector, which avoids copying the string contents. u8vector->
        string also avoids copying if the source vector is immutable.
  * rfc.http: Support for basic authentication added.
  * file.filter: file-filter may leave the destination file untouched if it
    won't be changed, by :leave-unchanged option. Also added new procedures:
    file-filter-for-each, file-filter-fold, file-filter-map.
  * You can now load script from non-regular files (e.g. device files). Useful
    for one-liner such as gosh -E... /dev/null.
  * Char-set now adopts collection framework, and also they're applicable
    object to test membership.
  * Trie (util.trie) now adopts dictionary framework.
  * make-tree-map accepts single compare argument instead of = and <.
  * rfc.hmac: Pick appropriate block size according to the digest algorithm
    metaclasses.
  * string-split: Accept an optional argument to limit the number of the
    result, much like Perl's similar operator.
  * command-line (r7rs)
  * include and include-ci (r7rs)
  * util.sparse: sparse-vector-ref and sparse-table-ref now have generalized
    setters.
  * symbol=?, boolean=? (r7rs).
  * Reader supports #true and #false for r7rs.
  * Negative zeros (-0.0) are recognized when it matters.
  * generator-find
  * cond-expand supports library clause (r7rs).
  * text.unicode: utf8->string, string->utf8 (r7rs); string-ci=? etc. that
    handles Unicode full case mapping, as required by R7RS.
  * dotimes and dolist now supports omission of variable.
  * letrec* (r7rs).
  * rfc.base64: base64-decode and base64-encode support :url-safe keyword
    argument to use url-safe alternative characters.
  * syntax-rules: Support r7rs enhancements.
  * define-values: Made r7rs compliant.
  * sys-errno->symbol, sys-symbol->errno.
  * Built-in sort procedures now supports srfi-95. See ref:Comparison and
    sorting.
  * digit->integer, integer->digit: Extended to handle digit characters other
    than [0-9]; Unicode defines a bunch of them.
  * gauche.dictionary: Bimap can have default conflict resolution.
  * os.windows: Console procedures are enhanced. Contribution from github.com/
    Hamayama.

Tons of bug fixes

Fixes that may break the compatibility

  * The reader syntax \xNN is now interpreted as R7RS-way by default
    (semicolon-terminated, Unicode codepoint). If we don't find the terminating
    semicolon, we interpret it as the legacy syntax. However, there are
    ambiguous cases that lead to incompatible behavior. You can switch the
    reader mode by reader-lexical-mode to make it fully comatiple to the old
    Gauche.
  * The hash function for char-set behaved poorly, so we changed it. If you
    have saved the hash value of char-sets in the previous versions of Gauche,
    you need to recalculate them.
  * We no longer coerce the result to inexact when dividing an exact numebr by
    exact zero; we used to return +inf.0, but that interpretation is no longer
    allowed since R6RS. Now it raises an error.
  * It is now an error to pass strings containing NUL characters to external
    libraries that expects strings. For example, passing "foo.scm\0.exe" to
    open-input-file throws an error. Allowing it would make potential security
    issue. If you need to pass a byte array that may contain 0, consider using
    u8vector instead of strings.
  * copy-bit-field: The argument order is switched - Gauche was following the
    old SLIB interface, but it was changed during SRFI-60 discussion. We now
    comply the new argument order for the portability, and the old code that
    uses this procedure need to be changed.
  * rfc.uri: Use uppercase for percent-encoding of special chars, as
    recommended in RFC3986. Watch out if the code relying on the case of
    percent-encoding.
  * srfi-13: Switched the argument order of string-filter and string-delete;
    they are changed after finalization, to be in sync with srfi:13's reference
    implementation. (Usually reference implementation is fixed to match the
    spec, but in this case, quite a few Scheme implementations had been using
    the reference implementation as it was, and changing it would have broken
    existing code.) Fortunately we could support both order so that the
    existing code will keep working, but we recommend to change the code to
    match the new order if possible.

Miscellaneous fixes

  * Fix: thread-terminate! caused SEGV when called on a thread that's not
    running.
  * Fix: Character reader produced incorrect values in some #\uxxxxx input.
  * Fixed incorrect/missing stack traces, contributed from Vitaly Magerya.
  * Fixed subtle bugs in conversion between rationals and flonums.
  * util.match: Fixed match-define.
  * force: Fixed leak, introduced between 0.9.2 and 0.9.3.
  * write-ber-integer ignored the port argument.
  * gauche.net: On Windows, the socket code had a fd leak.
  * text.diff: diff ignored :equal keyword argument.
  * rfc.tls: Fixed file descriptor leak.
  * rfc.json: Propertly handles surrogate pairs.
  * unwind-protect: The cleanup handler wasn't called properly if the process
    exits within the body.

Files:
RevisionActionfile
1.2modifypkgsrc/lang/gauche/DESCR
1.63modifypkgsrc/lang/gauche/Makefile
1.29modifypkgsrc/lang/gauche/PLIST
1.32modifypkgsrc/lang/gauche/distinfo
1.12modifypkgsrc/lang/gauche/patches/patch-aa
1.1removepkgsrc/lang/gauche/patches/patch-gc_configure
1.1removepkgsrc/lang/gauche/patches/patch-gc_dyn__load.c