Release 0.9.5
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 GAUCHE_KEYWORD_IS_SYMBOL
turns
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.
- R7RS
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
data.*
; so
util.queue
, util.sparse
, util.trie
are renamed to
data.queue, data.sparse,
data.trie.
- Module
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,
uvector->generator.
- In gauche.process:
- In gauche.termios:
sys-termios-copy
- In gauche.test:
- In gauche.vport: List ports are added. See
open-input-char-list, open-input-byte-list.
- In data.queue: mtqueue-num-waiting-readers.
- In data.trie: trie-longest-match.
- In data.random: samples$, for random
sampling.
- In text.csv: Middle-layer procedures:
csv-rows->tuples, make-csv-header-parser,
make-csv-record-parser.
- In rfc.uri: uri-ref to access
components of uri conveniently.
- In rfc.http:
http-status-code->description.
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
<mixin-condition>
mechanism.
Details.
- 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
and source-location.
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
,info
/,doc
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 (read-line)
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
#<undef>
, for
less cluttering of REPL.
Other notable improvements
- gauche.configure: More feature tests on compilers and linking.
Start using
package.scm
for the source of package metainformation.
- Extended number syntax:
- You can insert
_
in prefixed numeric literal for readability,
e.g. #b1101_1000_0001_1101
.
- Polar notation of numeric literal recognize
pi
suffix,
e.g. 2@0.5pi
=> 0.0+2.0i
.
- The reader recognizes CL-ish
#<radix>r
syntax, e.g.
#3r121
for 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
as signal.
- A new debug special reader macro:
#?,
, which can be used
as #?,(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.
The #?=
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
implementations do.
- 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
accessed).
- rfc.http: Handles ipv6-style server address
spec, e.g.
[::1]:8888
.
- file.util: copy-file - Now
takes
:if-exists
and :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
Bug fixes
- Fixed numerous bugs in hygienic macro expander.
- When a module exports an inherited binding from renaming,
it wasn't searched properly.
- util.match:
Fixed a bug that doesn't handle match
expressions generated by hygienic macros.
- Make
-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