1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-30 06:50:31 +02:00

update NEWS

* NEWS: Update for 2.0.1.
This commit is contained in:
Andy Wingo 2011-04-13 14:07:22 +02:00
parent 9d6a151fbd
commit 7c81eba25b

406
NEWS
View file

@ -7,34 +7,17 @@ Please send Guile bug reports to bug-guile@gnu.org.
Changes in 2.0.1 (since 2.0.0):
* Notable changes
** guile.m4 supports linking with rpath
* New modules (see the manual for details)
The GUILE_FLAGS macro now sets GUILE_LIBS and GUILE_LTLIBS, which
include appropriate directives to the linker to include libguile-2.0.so
in the runtime library lookup path.
** `(ice-9 binary-ports)', XXX
** `begin' expands macros in its body before other expressions
* Memory leak fixes
close-port leaking iconv_t
weak hash table pumping
* doc work
goops mop
* guile.m4 supports linking with rpath
* guile.m4 (GUILE_FLAGS): Also set GUILE_LIBS and GUILE_LTLIBS. Fix
documentation.
* Add omitted exports from `(ice-9 vlist)'.
* module/ice-9/vlist.scm: Export `vhash-delq' and `vhash-delv'.
* re-enable the after-gc-hook
* chi-top-sequence defines macros before expanding other exps
This enables support for programs like the following:
(begin
(define even?
@ -45,305 +28,172 @@ goops mop
((odd? x) (not (even? x)))))
(even? 10))
* flush all input on a read error
** REPL reader usability enhancements
* module/system/repl/repl.scm (flush-all-input): New helper.
(prompting-meta-read): Flush all input on a read error, as we could be
within some expression or a string or something.
The REPL now flushes input after a read error, which should prevent one
error from causing other errors. The REPL also now interprets comments
as whitespace.
* repl.scm understands comments
** REPL output has configurable width
* module/system/repl/repl.scm (read-comment, read-scheme-line-comment)
(read-scheme-datum-comment): New helpers.
(meta-reader): Take a language instead of a reader. If we have a
nonwhitespace char, first check to see that it's a comment, and if so,
read it off and loop.
(prompting-meta-read): Call meta-reader with the lang.
The REPL now defaults to output with the current terminal's width, in
columns. See "Debug Commands" in the manual for more information on
the ,width command.
* Add ,width meta-command to set screen width in debug output
** Better C access to the module system
terminal-width by default
Guile now has convenient C accessors to look up variables or values in
modules and their public interfaces. See `scm_c_public_ref' and friends
in "Accessing Modules from C" in the manual.
* man page updates
** Added `scm_call_5', `scm_call_6'
Mark Harig
See "Fly Evaluation" in the manual.
* add ice-9 eval-string
** Added `scm_from_latin1_keyword', `scm_from_utf8_keyword'
Fly Evaluation in the manual
See "Keyword Procedures" in the manual, for more. Note that
`scm_from_locale_keyword' should not be used when the name is a C string
constant.
* add scm_c_public_ref et al
** R6RS unicode and string I/O work
* libguile/modules.h:
* libguile/modules.c (scm_public_lookup, scm_private_lookup)
(scm_c_public_lookup, scm_c_private_lookup, scm_public_ref)
(scm_private_ref, scm_c_public_ref, scm_c_private_ref)
(scm_public_variable, scm_private_variable, scm_c_public_variable)
(scm_c_private_variable): New helpers to get at variables and values
in modules.
Added efficient implementations of `get-string-n' and `get-string-n!'
for binary ports. Exported `current-input-port', `current-output-port'
and `current-error-port' from `(rnrs io ports)', and enhanced support
for transcoders.
"Accessing Modules from C" in the manual
** Added `pointer->scm', `scm->pointer' to `(system foreign)'
* add scm_call_{5,6}
These procedure are useful if one needs to pass and receive SCM values
to and from foreign functions. See "Foreign Variables" in the manual,
for more.
* doc/ref/api-evaluation.texi (Fly Evaluation): Document
scm_call_{5,6,n}.
** Added `heap-allocated-since-gc' to `(gc-stats)'
* Add scm_from_latin1_keyword and scm_from_utf8_keyword
Also fixed the long-standing bug in the REPL `,stat' command.
* doc/ref/api-data.texi: Document new functions. Remind users that
scm_from_locale_keyword should not be used when the name is a C string
constant. Change formal parameter from `str' to `name'.
** Add `on-error' REPL option
* srfi-9 define-record-type in nested contexts
This option controls what happens when an error occurs at the REPL, and
defaults to `debug', indicating that Guile should enter the debugger.
Other values include `report', which will simply print a backtrace
without entering the debugger. See "System Commands" in the manual.
* Add `get-string-n' and `get-string-n!' for binary and R6RS ports
** Enforce immutability of string literals
* rnrs io ports work
Attempting to mutate a string literal now causes a runtime error.
Export `current-input-port', `current-output-port' and
`current-error-port'.
** Fix pthread redirection
Enhance transcoder-related functionality of `(rnrs io ports)'
Guile 2.0.0 shipped with headers that, if configured with pthread
support, would re-define `pthread_create', `pthread_join', and other API
to redirect to the BDW-GC wrappers, `GC_pthread_create', etc. This was
unintended, and not necessary: because threads must enter Guile with
scm_with_guile, Guile can handle thread registration itself, without
needing to make the GC aware of all threads. This oversight has been
fixed.
* module/rnrs/io/ports.scm (transcoder-eol-style)
(transcoder-error-handling-mode): Export these.
(textual-port?): Implement this procedure and export it.
* module/rnrs.scm: Export these here as well.
** `with-continuation-barrier' now unwinds on `quit'
* module/rnrs/io/ports.scm (port-transcoder): Implement this procedure.
(binary-port?): Treat only ports without an encoding as binary ports,
add docstring.
(standard-input-port, standard-output-port, standard-error-port):
Ensure these are created without an encoding.
(eol-style): Add `none' as enumeration member.
(native-eol-style): Switch to `none' from `lf'.
A throw to `quit' in a continuation barrier will cause Guile to exit.
Before, it would do so before unwinding to the barrier, which would
prevent cleanup handlers from running. This has been fixed so that it
exits only after unwinding.
* test-suite/tests/r6rs-ports.test (7.2.7 Input ports)
(8.2.10 Output ports): Test binary-ness of `standard-input-port',
`standard-output-port' and `standard-error-port'.
(8.2.6 Input and output ports): Add test for `port-transcoder'.
** `string->pointer' and `pointer->string' have optional encoding arg
doc: Remove "lack of support for Unicode I/O and strings".
This allows users of the FFI to more easily deal in strings with
particular (non-locale) encodings, like "utf-8". See "Void Pointers and
Byte Access" in the manual, for more.
* doc/ref/api-io.texi (R6RS I/O Ports): Remove 1.8ish comment.
** R6RS fixnum arithmetic optimizations
* add pointer->scm, scm->pointer
R6RS fixnum operations are are still slower than generic arithmetic,
however.
* libguile/foreign.c (scm_pointer_to_scm, scm_scm_to_pointer): New
functions, useful to pass and receive SCM values to and from foreign
functions.
** New procedure: `define-inlinable'
* module/system/foreign.scm: Export the new functions.
See "Inlinable Procedures" in the manual, for more.
* doc/ref/api-foreign.texi (Foreign Variables): Add docs.
** New procedure: `exact-integer-sqrt'
* gc-stats update
See "Integer Operations" in the manual, for more.
add heap-allocated-since-gc; fix ,stat.
** "Extended read syntax" for symbols parses better
* allow ,option on-error report instead of debug
In #{foo}# symbols, backslashes are now treated as escapes, as the
symbol-printing code intended. Additionally, "\x" within #{foo}# is now
interpreted as starting an R6RS hex escape. This is backward compatible
because the symbol printer would never produce a "\x" before. The
printer also works better too.
"System Commands" in the manual.
* Manual updates
* Make VM string literals immutable.
** GOOPS documentation updates
* don't redirect pthread_create et al
** New man page
* libguile/bdw-gc.h: Don't do pthread redirects, because we don't want
to affect applications' pthread_* bindings.
Thanks to Mark Harig for improvements to guile.1.
* libguile/pthread-threads.h (scm_i_pthread_create)
(scm_i_pthread_detach, scm_i_pthread_exit, scm_i_pthread_cancel)
(scm_i_pthread_sigmask): Do pthread redirects here, in this internal
header.
** SRFI-23 documented
* Document SRFI-23
The humble `error' SRFI now has an entry in the manual.
* doc/ref/srfi-modules.texi: mention that we support SRFI 23
* module/ice-9/boot-9.scm (%cond-expand-features): add srfi-23
* New modules
* with-continuation-barrier calls exit(3) _after_ unwinding
* libguile/continuations.c (scm_handler, c_handler)
(scm_c_with_continuation_barrier, scm_with_continuation_barrier):
Instead of calling scm_handle_by_message_noexit in the pre-unwind
handler, roll our own exception printing in the pre-unwind, and do to
exit()-on-quit in the post-unwind handler. This lets the stack unwind
at exit-time so that pending dynwinds run.
* test-suite/tests/continuations.test ("continuations"): Add a test.
* string->pointer and pointer->string have optional encoding arg
"Void Pointers and Byte Access" in the manual.
* Several optimizations for R6RS fixnum arithmetic
* Move `define-inlinable' into the default namespace
* module/ice-9/boot-9.scm (define-inlineable): Moved here from SRFI-9.
* module/srfi/srfi-9 (define-inlinable): Removed here.
* doc/ref/api-procedures.texi (Inlinable Procedures): Add subsection
about `define-inlinable'.
* Implement R6RS' `fixnum?' in a smarter way
* module/rnrs/arithmetic/fixnums.scm (fixnum?): Implemented using
bit-twiddling, and using `define-inlinable'.
commit 882c89636a2a4afa26cff17c7cdbc1d8c1cb2745
Author: Mark H Weaver <mhw@netris.org>
Date: Wed Apr 6 15:09:42 2011 -0400
Fix the R6RS exact-integer-sqrt and import into core guile
* libguile/numbers.c (scm_exact_integer_sqrt): New C procedure to
compute exact integer square root and remainder.
(scm_i_exact_integer_sqrt): New Scheme procedure `exact-integer-sqrt'
from the R6RS, imported into core guile.
* libguile/numbers.h: Add prototypes.
* module/rnrs/base.scm: Remove broken stub implementation, which would
fail badly when applied to large integers.
* doc/ref/api-data.texi: Add documentation.
* doc/ref/r6rs.texi: Change documentation for `exact-integer-sqrt' to a
stub that xrefs the core docs, as is done for other operations
available in core.
* test-suite/tests/numbers.test: Add tests.
* NEWS: Add news entries.
commit adf43b3f081878860ed1d4d5091b9a432b44da90
Author: Andy Wingo <wingo@pobox.com>
Date: Mon Apr 11 10:13:48 2011 +0200
ignore SIGPIPE in (system repl server)
* module/system/repl/server.scm (run-server): Ignore SIGPIPE when we run
a server, as otherwise a rudely disconnected client could cause the
server to quit. Thanks to John Proctor for the report, and Detlev
Zundel for the debugging.
commit 15671c6e7fd86160b415b5373b2c1539e23556f3
Author: Andy Wingo <wingo@pobox.com>
Date: Mon Apr 11 11:52:35 2011 +0200
refactor scm_i_print_symbol_name
* libguile/print.c (symbol_has_extended_read_syntax)
(print_normal_symbol, print_extended_symbol, scm_i_print_symbol_name):
Factor scm_i_print_symbol_name into separate routines. Add comments.
There are a number of bugs here.
commit d9527cfafdad1046770437a7a59d3745e7243c67
Author: Andy Wingo <wingo@pobox.com>
Date: Mon Apr 11 12:48:06 2011 +0200
read-extended-symbol handles backslash better, including r6rs hex escapes
* libguile/read.c (scm_read_extended_symbol): Interpret '\' as an escape
character. Due to some historical oddities we have to support '\'
before any character, but since we never emitted '\' in front of
"normal" characters like 'x' we can interpret "\x..;" to be an R6RS
hex escape.
* test-suite/tests/reader.test ("#{}#"): Add tests.
commit 2e9fc9fc73a8157152e6b2e122ec545d96478c2a
Author: Andy Wingo <wingo@pobox.com>
Date: Mon Apr 11 13:38:27 2011 +0200
symbols with odd characters print better in #{}#
* libguile/print.c (symbol_has_extended_read_syntax): Use a more
general, unicode-appropriate algorithm. Hopefully doesn't cause
any current #{}# cases to be unescaped.
(print_extended_symbol): Use more appropriate unicode algorithm, and
emit unicode hex escapes instead of our own lame escapes.
* test-suite/tests/symbols.test: Add tests.
commit b9e22602bb9c7d82500e4e5612bf80e478e28b8c
Author: Andy Wingo <wingo@pobox.com>
Date: Mon Apr 11 13:49:29 2011 +0200
regen psyntax-pp.scm
* module/ice-9/psyntax-pp.scm: Regenerate, to take advantage of better
#{}# serialization.
commit 62ef23cbb828accf1f5b9622ff17775aa539d354
Author: Andy Wingo <wingo@pobox.com>
Date: Mon Apr 11 17:21:20 2011 +0200
fix reader.test for --disable-deprecated
* test-suite/tests/reader.test: Fix deprecated tests; begin-deprecated
was splicing in expression context before, which is a no-no.
commit cf9d4a82146556ff45d40d6eec8579082287900e
Author: Ian Price <ianprice90@googlemail.com>
Date: Wed Apr 6 01:53:38 2011 +0100
Added optional second arg to R6RS log function
* module/rnrs/base.scm (log): now takes a base argument, using the
change of base formula for logs.
* test-suite/tests/r6rs-base.test ("log (2nd arg)"): Add test cases.
commit 15993bce1cd0a2e69f11a6ac1725fa7a219c5b7c
Author: Ian Price <ianprice90@googlemail.com>
Date: Wed Apr 6 13:51:44 2011 +0100
fix assert to return true value.
* module/rnrs/base.scm (assert): returns value instead of void.
* test-suite/tests/r6rs-base.test ("assert"): add test cases.
commit c89b45299329d034875429804f18768c1ea96713
Author: Ian Price <ianprice90@googlemail.com>
Date: Fri Apr 8 02:49:20 2011 +0100
Fix fencepost error in bip_seek
* libguile/r6rs-ports.c (bip_seek): Fix to allow seeking to end of port.
* test-suite/tests/r6rs-ports.test ("bytevector input port can seek to
very end"): Add tests.
commit dcb1e3b0f8c79d1373f334909fa5d653ec7674eb
Author: Andy Wingo <wingo@pobox.com>
Date: Wed Apr 13 12:03:50 2011 +0200
--disable-threads fix
* libguile/threads.c (do_thread_exit_trampoline, on_thread_exit):
(scm_i_init_thread_for_guile): Only register and unregister threads
with bdw-gc when we are building with threads support. Thanks to
Marijn for the report.
* New procedures (see the manual for details)
** exact-integer-sqrt, imported into core from (rnrs base)
** `(ice-9 binary-ports)': XXX, in the manual
** `(ice-9 eval-string)': "Fly Evaluation", in the manual
* Bugs fixed
** exact-integer-sqrt now handles large integers correctly
** Fixed iconv_t memory leak on close-port
** Fixed some leaks with weak hash tables
** Export `vhash-delq' and `vhash-delv' from `(ice-9 vlist)'
** `after-gc-hook' works again
** `define-record-type' now allowed in nested contexts
** `exact-integer-sqrt' now handles large integers correctly
** Fixed C extension examples in manual
** `vhash-delete' honors HASH argument
** Make `locale-digit-grouping' more robust
** Default exception printer robustness fixes
** Fix presence of non-I CPPFLAGS in `guile-2.0.pc'
** `read' updates line/column numbers when reading SCSH block comments
** Fix imports of multiple custom interfaces of same module
** Fix encoding scanning for non-seekable ports
** Fix `setter' when called with a non-setter generic
** Fix f32 and f64 bytevectors to not accept rationals
** Fix description of the R6RS `finite?' in manual
** Quotient, remainder and modulo accept inexact integers again
** Fix `continue' within `while' to take zero arguments
** Fix alignment for structures in FFI
** Fix port-filename of stdin, stdout, stderr to match the docs
** Fix weak hash table-related bug in `define-wrapped-pointer-type'
** Fix partial continuation application with pending procedure calls
** scm_{to,from}_locale_string use current locale, not current ports
** Fix thread cleanup, by using a pthread_key destructor
** Fix `quit' at the REPL
** Fix a failure to sync regs in vm bytevector ops
** Fix (texinfo reflection) to handle nested structures like syntax patterns
** Fix stexi->html double translation
** Fix tree-il->scheme fix for <prompt>
** Fix compilation of <prompt> in <fix> in single-value context
** Fix race condition in ensure-writable-dir
** Fix error message on ,disassemble "non-procedure"
** Fix prompt and abort with the boot evaluator
** Fix `procedure->pointer' for functions returning `void'
** Fix error reporting in dynamic-pointer
** Fix problems detecting coding: in block comments
** Fix duplicate load-path and load-compiled-path in compilation environment
** Add fallback read(2) suppport for .go files if mmap(2) unavailable
** Fix c32vector-set!, c64vector-set!
** Fix mistakenly deprecated read syntax for uniform complex vectors
** Fix parsing of exact numbers with negative exponents
** Ignore SIGPIPE in (system repl server)
** Fix optional second arg to R6RS log function
** Fix R6RS `assert' to return true value.
** Fix fencepost error when seeking in bytevector input ports
exact-integer-sqrt now works correctly when applied to very large
integers (too large to be precisely represented by a C double).
It has also been imported into core from (rnrs base).
Changes in 2.0.0 (changes since the 1.8.x series):