Major Feature Upgrade
Better R7RS conformance
- Keyword-symbol integration:
Gauche keywords (e.g.
:key) can be symbols
that are automatically bound to itself.
It breaks the backward compatibility in some corner cases, however,
so we haven't make the change in effect by default in 0.9.5.
Setting the environment variable
on this feature.
See Keywords, for the details.
We urge you to test your code with this feature turned on, for pretty soon
(probably in the next release) we'll make this feature effective by default.
raise is now conformant of R7RS (which is slightly
different from Gauche's builtin raise, which is srfi-18 conformant).
New modules and procedures
- Renamed modules (old names are still valid, but new code should use the new names):
- Data structure implementations are now named
util.trie are renamed to
text.unicode is renamed to gauche.unicode,
for it's essential for R7RS support.
- New modules:
- Low-level hygienic macro support by er-macro-transformer.
- New builtin macros and procedures:
- In gauche.uvector:
- In gauche.sequence:
- In gauche.array:
Add constructors u8array, etc., for the consistency.
- In gauche.lazy: lappend-map
- In gauche.generator: gflatten,
- In gauche.process:
- In gauche.termios:
- In gauche.test:
- In gauche.vport: List ports are added. See
- In data.queue: mtqueue-num-waiting-readers.
- In data.trie: trie-longest-match.
- In data.random: samples$, for random
- In text.csv: Middle-layer procedures:
- In rfc.uri: uri-ref to access
components of uri conveniently.
- In rfc.http:
Added srfi supports
- srfi-69: Basic hash tables
- srfi-111: Boxes
- srfi-112: Environment inquiry
- srfi-113: Sets and Bags
- srfi-114: Comparators
- srfi-117: Mutable queues
- srfi-118: Simple adjustable-size strings
srfi-121: Generators - Covered by gauche.generator.
srfi-128: Comparators (reduced) - the comparator is actually built-in to Gauche's core, so that other built-in mechanism such as
hashtables, treemaps, sort, etc. can take comparators.
srfi-131: ERR5RS Record Syntax (reduced) - Subset of gauche.record.
- srfi-133: Vector library
srfi-134: Immutable deques - Covered by data.ideque.
More pleasant interactive experience
- Better error message while loading/compiling, using
- Improved describe.
- Toplevel REPL commands. See blog entry, or see the manual section
"Working in REPL"
- Scheme-defined procedures maintain source code and source location.
It can be queried by source-code
The source location is also shown by describe.
(Source code isn't kept for precompiled Scheme code for now.)
- Online REPL document (info procedure, or
toplevel command) now shows just the named entry.
- Experimental support of line-editing.
If the environment variable
GAUCHE_READ_EDIT is set
and the terminal is capable,
you can use line editing (with emacs-like key binding).
This feature still in early development stage
and has number of known issues---especially, multiline edit only partially work.
If you're brave, give it a shot,
but don't blame me if your REPL explodes.
- You can invoke editor from repl by
(ed file-or-procedure) (see ed). If the source
location is known, you can directly jump to the source of the procedure,
edit, and reload it.
- Now REPL consumes the trailing newline of input S-expr; that is,
when you type
(read-line) on REPL, it waits for your input.
Before, REPL didn't consume the trailing newline, so
immediately returned when it sees the newline character left in the
input buffer, but that confused users.
- use, select-module,
export, import - Now these
forms evaluate to zero values instead of
less cluttering of REPL.
Other notable improvements
- gauche.configure: More feature tests on compilers and linking.
package.scm for the source of package metainformation.
- Extended number syntax:
- You can insert
_ in prefixed numeric literal for readability,
- Polar notation of numeric literal recognize
- The reader recognizes CL-ish
#<radix>r syntax, e.g.
121 on base 3 (which is 16 in decimal).
- Hashtables are now salted, meaning, it uses different hash functions
at least for each invocation of the program, so that it is immune
to the hash collision attack. The hash function
is deprecated, replaced by default-hash,
portable-hash and legacy-hash.
See the manual entry for the details.
- sys-sleep, sys-nanosleep:
Changed to retry sleep/nanosleep by default if it is interrupted by
- A new debug special reader macro:
#?,, which can be used
#?,(proc arg ...). When evaluated, it displays the form
(proc arg ...)
and each value of
arg, then calls
proc with those arguments
and displays the return value(s). Similar to
#?= but you can
also check the actual value of arguments.
#?= stub is also improved to show the thread from which
it is displaying.
- gauche.vport: open-output-uvector now
takes an option to make the output buffer extendable.
- load searches
.sld suffix as well, as some other R7RS
- Stack trace now works for threads (but you have to call
report-error within guard clauses explicitly, for by default
unhandled error is propagated to the thread that calls thread-join!).
- gauche.uvector: s8vector->string and
u8vector->string now take optional 'terminator' argument,
convenient to extract NUL-terminated string from fixed size buffer.
- gauche.net: More flexible port number selection
in make-server-socket and make-server-sockets.
- data.sparse: Allow default value per vector
(a sparse vector returns its default value when unset element is
- rfc.http: Handles ipv6-style server address
- file.util: copy-file - Now
:append keyword arguments.
- crypt.bcrypt: Update bcrypt implementation and
changed the default from 2a to 2b.
- gauche.termios: Support mintty on MSYS.
- rfc.tls: Add basic server-side certificate support.
Changes that may alter the behavior of existing code
- Fixed numerous bugs in hygienic macro expander.
- When a module exports an inherited binding from renaming,
it wasn't searched properly.
Fixed a bug that doesn't handle match
expressions generated by hygienic macros.
-fcase-fold option affect REPL as well.
- fixnum-width: It returned a number one smaller than
the correct value.
- Fixed a number reader bug handling very big or very small exponent.
- srfi-13: Fixed a bug in xsubstring
when 'from' argument is negative.
- parameterize: Fixed a bug that failed to
restore parameter values in some edge cases.
Last modified : 2016/10/08 22:47:13 UTC