Major feature enhancements
We cover R7RS-large Red and Tangerine Edition.
srfi-101: Purely functional random-access pairs and lists (scheme.rlist)
srfi-116: Immutable list library (scheme.ilist)
srfi-135: Immutable texts (scheme.text)
srfi-159: Combinator formatting (scheme.show)
srfi-176: Version flag. Supported as built-in. (version-alist)
srfi-195: Multiple-value boxes (Boxes).
In Gauche, string access using integer character index costs O(n) by default, because we store strings in multibyte format. Two improvements are incorporated to allow O(1) random string access.
scheme.text library provides this feature (with a
text). In Gauche, a text is simply a string with
a string index computed. See String%20indexing for the
Note: Gauche internally had string pointers to implement some
string operations efficiently. Now string cursors can be used for
that purpose, we dropped string pointers. If you have code that
uses string pointers, although it was undocumented, you can keep using
it by defining
GAUCHE_STRING_POINTER environment variable.
We'll completely drop it in the next release, though.
Scheme defines literal pairs to be immutable, but it is up to the implementation to check it. Gauche used to not check it, allowing mutating literal pairs. Now it is no longer allowed--it throws an error. Mutating literal pairs is never correct, and if you get the error, you've been doing it wrong.
Immutable pairs can also be explicitly constructed using scheme.ilist module. In Gauche, immutable pairs and lists behaves exactly like normal pairs and lists, except that they can't be modified. See Mutable%20and%20immutable%20pairs, for the details.
If your code depends on the previous behavior and can't change
swiftly, set the environment variable
to restore the old behavior.
The editor feature is enhanced a lot, including online help. Type
M-h h to get a quick cheet sheet.
The line editor isn't turn on by default yet, but you can either
turn on with the command-line option
the environment variable
You no longer need to
(use gauche.parameter) to use parameters
as defined in R7RS. The module still exists and provides
a few obscure features.
We now supports bitvector type in the core. Note that there's
a syntax conflict with bitvector literals and incomplete strings;
now the official way of incomplete string literal is to prefix
a string with
#**. The older syntax is still recognized
as far as it's not ambiguous. See Incomplete%20strings.
This only affects for C code using ScmPort. To support future extensions flexibly, we hide the internal implementation of ScmPort. It shouldn't affect code that accesses ScmPort via API, but if the code directly refers to the members of ScmPort, it should be rewritten to use API.
One notable change is that port positions no longer need to be an integer offset.
<mbed-tls> is used if it's
<ax-tls> is always available but its cipher support
is limited and can't connect to some https sites.
Now we support conversion natively,
between UTF (8, 16, 32) and ISO8859-n, as well as between Japanese
encodings. We use
iconv(3) only when we need to deal with other
This is because
iconv lacks a necessary API to support
srfi-181 transcoded ports properly. If you just need to convert
encodings, you can keep using
gauche.charconv and it handles wide
variety of encodings supported by
iconv. If you use
the conversion is limited between the natively supported encodings.
We may enhance native support of conversions if there's need for it.
~f handle complex numbers as well,
and added a bunch of new directives:
replace strictness that
replaces invalid unicode sequence with
utf8->string is also changed to use the replace character
for invalid input sequence, instead of throwing an error.
#t to both symbols
and wrapped identifiers. In ER-macro systems, identifiers can be a bare
symbol as well. To check an object is an identifier but not a symbol,
you can use wrapped-identifier? to check an object
is a non-symbol identifier.
gosh is run inside a build tree (with
-frest option), make
sure we link with
libgauche.so in the build tree regardless of the
LD_LIBRARY_PATH. ( https://github.com/shirok/Gauche/pull/557
apropos now takes a string as well as a symbol ( https://github.com/shirok/Gauche/pull/555 )
.dir-locals.el file in the source tree. It sets up
Emacs to add some Gauche-specific indentations.
gosh is run in suid/sgid process, do not load
and do not load/save history files.
argument to specify the exactness of the result when no exactness
prefix is given in the input.
gauche-package generate can now generate template of Scheme-only
to use a collection as a generator.
<time> object for timestamp.
eqv?, we use
eqv-hash regardless of
comparator's hash function. It is permitted by srfi-125, and it allows
objects that doesn't have hash method can still be used
with eq/eqv based hashtables
( https://github.com/shirok/Gauche/issues/708 ).
:error keyword argument accepts
:merge, to tell
run-process that stderr should be merged into stdout.
-e option can accept multiple S-expressions.
pseudo class rendering ( https://github.com/shirok/Gauche/pull/645 ),
( https://github.com/shirok/Gauche/pull/648 ).
:encoding keyword argument ( https://github.com/shirok/Gauche/issues/651 ).
apply detects if the argument list is circular and throws an error.
copy-list detects the circular list and throws an error.
allowed to take an empty body.
undefined hygienically, causing an error when used
in R7RS code that doesn't inherit