Major feature upgrade
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.
- 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
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.
EPIPE error from
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.
- gauche.configure: Replacement of autoconf-based
system for configuring Gauche extensions.
- New string interpolation syntax:
#"foo ~x" instead of
#`"foo ,x" . ref:String interpolation, for the details.
A bunch of new procedures and enhancements
- New numerical procedures:
- On rationalization:
As a bonus, now converting flonums to exact number can produce more
readable (simple) rational numbers; see
- On integer operations:
- Gamma functions:
- r7rs division operators
- expt now returns exact value if possible, even
the exponent is non-integer (but exact rational).
- New list and vector procedures:
vector-map (r7rs), vector-for-each (r7rs),
- New regex procedures:
- 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:
- gauche.lazy: New procedure:
Support for basic authentication added.
file-filter may leave the destination
file untouched if it won't be changed, by
Also added new procedures:
- 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
- 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
#false for r7rs.
- Negative zeros (
-0.0) are recognized when it matters.
- cond-expand supports
library clause (r7rs).
- text.unicode: utf8->string,
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
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
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
but that interpretation is no longer allowed since R6RS. Now it raises
- It is now an error to pass strings containing NUL characters
to external libraries that expects strings. For example, passing
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
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.
- Fix: thread-terminate! caused SEGV when called on a thread that's
- Fix: Character reader produced incorrect values in some
- 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
- write-ber-integer ignored the port argument.
- gauche.net: On Windows, the socket code
had a fd leak.
- text.diff: diff ignored
- 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.
Last modified : 2014/07/25 01:09:57 UTC