equal?
.
(sqrt1pm1 z)
computes sqrt(1 + z) - 1
, with
low relative error even for values of z near zero
(rsqrt z)
computes 1/sqrt(z)
(compound z w)
computes (1 + z)^w
, with low
relative error even for values of z near zero
(compoundm1 z w)
computes (1 + z)^w - 1
,
with low relative error even for values of z near zero
(flo:sqrt1pm1 x)
(flo:rsqrt x)
(flo:compound x y)
—note y must be a flonum, not an
exact integer
(flo:compoundm1 x y)
(exp2 z)
(exp10 z)
(exp2m1 z)
(exp10m1 z)
(log2 z)
(log10 z)
(log2p1 z)
(log10p1 z)
logp1
is added as an alias for
log1p
.
These follow IEEE
754-2019, except that they are not necessarily correctly rounded.
sin-pi*
,
cos-pi*
, tan-pi*
, asin/pi
,
cos/pi
, atan/pi
.
These compute the standard trigonometric functions in units of
half-revolutions rather than radians.
versin
,
exsec
, aversin
, aexsec
.
These compute the historical trigonometric functions
versin z = 1 - cos z exsec z = (1 - cos z)/cos z,which are useful because they are well-conditioned near zero unlike cosine, and as such were used in many historical trigonometric computations and tables. (In contrast, the other trigonometric torments like secant and hacovercosine and excosecant aren't terribly useful.)
versin-pi*
,
exsec-pi*
, aversin/pi
,
aexsec/pi
. These are like versin
and
exsec
but in units of half-revolutions rather than
radians.
log
,
exp
, log1p
, and expm1
now have
better error bounds for complex inputs, and no longer overflow
unnecessarily.
(expm1 x+iy)
is still bad when x ~ 0
and
e^x cos y ~ 1
but it should be improved on much of the
rest of the complex plane.
sqrt
no longer spuriously overflows on
certain complex inputs. (However, it may still spuriously raise a
floating-point overflow exception on an exact input, even if the
resulting value is correct and exact.)
import!
procedure.
That functionality is now provided by the ,(import …)
REPL escape.
merge-sort
,
merge-sort!
, quick-sort
, and
quick-sort!
procedures, as well as the sort
and sort!
aliases for merge sort, now accept an optional
parameter for a procedure to map an element to a sorting key.
Example:
(merge-sort '((123 . value0) (456 . value1) (78 . value2)) < car) ;Value: ((78 . value2) (123 . value0) (456 . value1))
fix:lsh
procedure (to be
read as left shift) now computes arithmetic shifts on all
platforms. Previously, for negative shift amounts, it would sometimes
compute logical right shifts relative to the number of bits in a
fixnum.
See
here
for historical details.
environ
in unistd.h
,
which causes gcc -Wredundant-decls warnings to reject the
POSIX requirement that users declare extern char
**environ.
automake
rather than m4
.
inferior-repl
mode, use
of read
was throwing a wrong-number-of-arguments error.
--help
option was being sent
partly to standard error and standard output; now it is all sent to
standard error.
./configure --enable-cross-compiling
.
.com
files must be recompiled.
Formerly MIT Scheme used unassigned reference traps for optional
parameters without values; now it uses a #!default
object. But LIAR
hadn't gotten the memo, and if every call site omitted the argument,
LIAR would constant-fold an unassigned reference trap instead of
#!default
.
(let () (define (test #!optional x) (pp (map-reference-trap (lambda () x)))) (test))
(bytevector-zero-explicit! bv [start [end]])
intended not to be optimized away.
This isn't correctly implemented yet—an old copy of the data may remain elsewhere in memory after a GC—but it may be useful to mark where you would want to zero the bytevector if we fixed it in the future.
On your x86 workstation, with mit-scheme-x86-64 in $PATH (requires 10.1.11 or newer):
cd mit-scheme-X.Y.Z/src ./configure \ --enable-native-code=aarch64le \ --enable-cross-compiling make cross-host
On your aarch64 laptop:
cd mit-scheme-X.Y.Z/src (cd microcode && ./configure) make cross-target
The procedure (find-scheme-libraries!
directory)
can be called to pre-register all of the
libraries in directory; once pre-registered, a library is
automatically loaded as needed. When Scheme starts, if the directory
${HOME}/.mit-scheme/libraries/
exists,
find-scheme-libraries!
is called on it.
Note that there is no relationship between a library file's location
and its name. Library files can be organized as desired. In
addition, libraries can now be named using the .sld
suffix, which has its own special suffixes for compiled code, or
you can use .scm
as before.
The PRNG algorithm is based on the stream cipher ChaCha. The state is a 32-byte seed s; each output x is obtained by breaking the 64-byte quantity ChaCha_s(0) into two 32-byte halves s′ and x, and replacing the state s by s′.
The state is a little smaller than the old algorithm, and we now
implement random-source-pseudo-randomize!
keyed by two
128-bit integer seeds which can safely be drawn from the random source
itself to attain reproducible randomized subtrees of computation with
no danger of collisions in the seeds.
(flo:random-unit state)
flo:random-unit-open
if you must for essentially the same
semantics, but prefer flo:random-unit-closed
.
(flo:random-unit-open state)
flo:random-unit
and
random-real
were limited to a narrower range and excluded
many floating-point numbers in that range.
(flo:random-unit-closed state)
log
, but not safe to pass the
outcome to log1p
.
WARNING: The SRFI 27 and old MIT Scheme RNG API are not widely
implemented as cryptographic PRNGs, so code written against them
can't rely on them to be cryptographically secure in general.
Further, anything involving random-integer
,
random-real
, or bignums is likely to be vulnerable to
timing attacks. But if you accidentally do use this API to generate
cryptographic key material (as SRFI 27 suggests) then you might not
be as bad off as you would have been before.
rt-tree
and wt-tree
features
are now always loaded, so it's not necessary to call
load-option
to get them.
(srfi n)
. Additionally,
most of the SRFI definitions are bound in the global environment.
,help
at the REPL and/or
read the User Manual.
count-matching-items
delete-matching-items
list-transform-negative
keep-matching-items
list-transform-positive
count
,
remove
, and filter
, which are the same with
different argument ordering.
#f
, which made it clumsy
to represent #f
as an ordinary value in the car. This
change will likely break any code explicitly using weak pairs.
syntax-rules
.
While it doesn't yet support the full R7RS
specification, it appears to be fairly bug-free. Thanks to Arthur
Gleckler for pointing out many of these bugs.
/tmp
as the default
temporary directory, not /var/tmp
.
/var/tmp
is conventionally for temporary files that are
persistent across reboot, e.g. vi recovery files, not for temporary
files that we have no use for after a reboot.
A huge amount of work has been done on arithmetic, particularly floating-point arithmetic, by Taylor Campbell.
(log1p x)
= log (1 + x) for any x in (−1, +∞),
−∞ for -1.
[The primitive flo:log1p
has a range restriction due to the Intel
i387 CPU instruction.]
(expm1 x)
= ex − 1 for any real x.
[The primitive flo:expm1
has a range restriction due to the Intel
i387 CPU instruction.]
(log1mexp x)
= log (1 − ex), for x < 0
(log1pexp x)
= log (1 + ex)
(logistic x)
= 1/(1 + e−x), inverse of logit
(logit p)
= log p/(1 − p), inverse of logistic
(log-logistic x)
= log 1/(1 + e−x), inverse of logit-exp
(logit-exp t)
= log et/(1 − et), inverse of log-logistic
(logit1/2+ p)
= (logit (+ 1/2 p)), inverse of logistic-1/2
(logistic-1/2 x)
= (- (logistic x) 1/2), inverse of logit1/2+
(logsumexp (list x y z ...))
= log (ex + ey + ez + ...),
guaranteed not to overflow or underflow
(copysign m s)
returns a real number with the magnitude of m and
the sign of s.
(modexp b e m)
returns be mod m.
flo:radix
flo:radix.
flo:precision
flo:error-bound
flo:log-error-bound
(log flo:error-bound)
flo:ulp-of-one
flo:error-bound
.
flo:log-ulp-of-one
(log flo:ulp-of-one)
(flo:ulp x)
flo:normal-exponent-max
flo:radix
that is a
finite floating-point number, as an exact integer. Note that there
are floating-point numbers greater than (expt
flo:radix. flo:normal-exponent-max)
—the greatest one is just
below flo:radix
times that. But there are none that are
a greater integer power of flo:radix
.
flo:normal-exponent-min
flo:radix
that is a normal floating-point number, as an exact integer.
(expt flo:radix. flo:normal-exponent-min)
is also named
flo:smallest-positive-normal
.
flo:subnormal-exponent-min
flo:radix
that is a nonzero, subnormal floating-point number, as an exact
integer. (expt flo:radix. flo:subnormal-exponent-min)
is
the least positive floating-point number, also named
flo:smallest-positive-subnormal
.
flo:smallest-positive-subnormal
flo:smallest-positive-normal
flo:largest-positive-normal
flo:least-subnormal-exponent-base-2
flo:least-subnormal-exponent-base-e
flo:least-subnormal-exponent-base-10
flo:least-normal-exponent-base-2
flo:least-normal-exponent-base-e
flo:least-normal-exponent-base-10
flo:greatest-normal-exponent-base-2
flo:greatest-normal-exponent-base-e
flo:greatest-normal-exponent-base-10
(flo:ldexp x e)
(flo:scalbn x e)
flo:radix
and e is an integer(flo:logb y)
(flo:scalbn y (- e))
, and 1 ≤ x < b, and e is an integer(flo:classify x)
zero
subnormal
normal
infinite
nan
(flo:subnormal? x)
(flo:safe-zero? x)
flo:zero?
raises an invalid-operation exception on NaN;
flo:safe-zero?
never does even on signalling NaN.
(flo:sign-negative? x)
(flo:negative? 0.)
and (flo:negative?
-0.)
both return false, while (flo:sign-negative?
-0.)
returns true. Also, flo:negative?
raises
invalid-operation exception on NaN, while
flo:sign-negative?
never does even on signalling NaN.
(flo:safe< x y)
(flo:safe<= x y)
(flo:safe> x y)
(flo:safe>= x y)
(flo:safe= x y)
(flo:safe<> x y)
(flo:unordered? x y)
flo:<
&c., do not raise invalid-operation
exceptions on quiet NaNs. (However, they do raise invalid-operation
exceptions on signalling NaNs.)
(flo:<> x y)
(flo:total< x y)
(flo:total-order x y)
is a three-way
comparison, −1 if x < y, 0 if x = y, +1 if x > y.
(flo:total-mag< x y)
(flo:total< (flo:abs x) (flo:abs y))
(flo:total-order-mag x y)
(flo:total-order (flo:abs x) (flo:abs y))
flo:min
flo:max
flo:min-mag
flo:max-mag
flo:min-num
flo:max-num
flo:min-mag-num
flo:max-mag-num
(flo:make-nan negative? quiet? payload)
(- (expt 2 flo:significand-digits-base-2 2) 1)
.
(flo:nan-quiet? nan)
(flo:nan-payload nan)
This follows IEEE 754's semantics for the default mode, and it has been the case on some platforms (e.g, macOS) for some time.
If you want to trap on (e.g.) invalid-operation, you can do
(flo:with-exceptions-trapped (flo:exception:invalid-operation) (lambda () ...))
(flo:trappable-exceptions)
gives the set of all exceptions that can be
trapped. Human-readable names are available by (flo:exceptions->names
(flo:trappable-exceptions))
.
You can also test for floating-point exceptions after a computation without trapping. Before you can do this for the first time in any thread, you must clear the floating-point exceptions (otherwise there may be residual garbage from past computations):
(flo:preserving-environment (lambda () (flo:clear-exceptions! (flo:supported-exceptions)) (let ((x (do-big-computation))) (if (not (zero? (flo:test-exceptions (flo:exception:underflow)))) (warn "underflow")) x)))
(flo:*+ u v a)
(flo:fma u v)
(flo:fast-fma?)
(parameterize ((param:printer-radix #x10)) (write-to-string (list #x1.5p10 1.5e10 0.1 (flo:nextafter 0.1 1.0)))) ;Value: "(#x1.5p+10 #x1.bf08ebp+33 #x1.999999999999ap-4 #x1.999999999999bp-4)"
(decompose-ieee754 x base emax precision if-zero if-subnormal if-normal if-infinite if-nan)
(decompose-ieee754-binary x exponent-bits precision)
-> [sign biased-exponent trailing-significand](decompose-ieee754-binary32 x)
-> [sign biased-exponent trailing-significand](decompose-ieee754-binary64 x)
-> [sign biased-exponent trailing-significand](decompose-ieee754-binary128 x)
-> [sign biased-exponent trailing-significand](compose-ieee754-binary sign biased-exponent trailing-significand exponent-bits precision)
-> real(compose-ieee754-binary32 sign biased-exponent trailing-significand)
-> real(compose-ieee754-binary64 sign biased-exponent trailing-significand)
-> real(compose-ieee754-binary128 sign biased-exponent trailing-significand)
-> real(compose-ieee754-zero sign)
-> real(compose-ieee754-subnormal sign significand base emin precision)
-> real(compose-ieee754-normal sign exponent significand base emin precision)
-> real(compose-ieee754-infinity sign)
-> real(compose-ieee754-nan sign quiet payload)
-> nan(ieee754-binary32-exact? x)
-> boolean(ieee754-binary64-exact? x)
-> boolean(ieee754-binary128-exact? x)
-> boolean(ieee754-binary-hex-string x exponent-bits precision)
-> string(ieee754-binary32-hex-string x)
-> string(ieee754-binary64-hex-string x)
-> string(ieee754-binary128-hex-string x)
-> stringThe sequence is sign type "." payload, where sign is "+" or "-", type is "nan" for quiet NaNs and "snan" for signalling NaNs, and payload is an integer represented in the current radix.
The notations +snan.0
and -snan.0
are forbidden because the bit pattern
they would mean represents +inf.0
and -inf.0
instead.
(angle z)
now correctly handles edge cases with signed zero.
<=
and >=
procedures now
return false for NaN inputs; they previously returned true.
Additionally, on amd64, all of the numerical comparison routines now
raise floating-point exceptions for NaN inputs according to the rules
of IEEE 754-2008, which can be tested and can trap. (The new
procedures flo:safe<
, flo:safe<=
,
flo:safe>
, flo:safe>=
,
flo:safe=
, flo:safe<>
, and
flo:unordered?
avoid exceptions.)
(The i386 compiler back end does not correctly raise floating-point exceptions, and the C and SVM back ends may or may not depending on your C compiler's IEEE 754-2008 conformance.)
-0.+i
is now correctly parsed as negative zero real part; previously
the negative was discarded and it was parsed as positive zero.-0.i
is now correctly printed as such, not as +-0.i
.(atan -2i)
now returns the same result as (atan 0.-2i)
, not (atan -0.-2i)
.(* +i (make-rectangular x y))
= (make-rectangular (* -1 y) x)
(* (make-rectangular x y) +i)
= (make-rectangular (* -1 y) x)
(/ (make-rectangular x y) -i)
= (make-rectangular (* -1 y) x)
(* -1 (make-rectangular x y))
= (make-rectangular y (* -1 x))
(* (make-rectangular x y) -i)
= (make-rectangular y (* -1 x))
(/ (make-rectangular x y) +i)
= (make-rectangular y (* -1 x))
abs
now always correctly adjusts the sign of a NaN and never
raises a floating-point exception, following IEEE 754-2008.
(* 0 +inf.0)
now returns NaN; previously it returned 0.
integer?
procedure no longer returns true for infinities.
A side effect of this bug was that the compiler's common subexpression elimination would crash when handling infinities, either written literally or due to constant folding:
; Compiling file: "./floenv.bin" => "./floenv.com"... ;The object +inf.0, passed as the first argument to flonum-normalize, is not the correct type.
(magnitude z)
procedure no longer overflows with large and
angles near odd multiples of π/4.
+nan.0
and -nan.0
are now read as floating-point
not-a-number; nan.0
was incorrectly read as that, but is now read as
a symbol as it should be.
(- x)
into (- 0 x)
. This
means when x is a floating-point zero, (- x)
reliably changes its sign.
(make-polar magnitude 0)
now returns magnitude,
even if it is infinite or NaN; previously for infinite magnitudes it
returned a rectangular number with NaN imaginary part.
#e+inf.0
, #e+nan.0
, &c.
Infinities and NaNs are not exact numbers and as such there is no way
to interpret them with the #e
prefix. (The
#i
prefix still works.)
sqrt
procedure now correctly propagates NaNs, handles
complex numbers with infinities, and raises floating-point exceptions
only where appropriate.
/usr/local/bin/mit-scheme-x86-64-11.0.90
while its library would be stored at
/usr/local/lib/mit-scheme-x86-64-11.0.90/
.
Bug fix Fix printing of vectors, which was throwing an error in common circumstances.
Bug fix Fix several issues with syntax-rules. More are known, but they will be fixed in the 11.1 release.
Preparation Make a small tweak to fasdump needed for building the 11.1 release.
Feature Multiple values are now slightly more correct than previously. But they are still not entirely compliant with R7RS.
Bug fix Add missing definition to exact
to reference manual.
Bug fix Change write
to generate datum labels only when
there are cycles in the object being printed.
Bug fix HTTP I/O was failing on some cases with an empty body.
Bug fix Textual input from non-blocking ports was getting stuck in an infinite loop.
Bug fix Edwin was communicating with subprocesses using UTF-8 encoding but has no support for this; now it uses ISO 8859-1 instead.
Bug fix Several calls to read-bytevector!
were not handling
EOF correctly.
Bug fix Interaction between let-syntax
and
define
was incorrect, thinking the defines were in the
environment of the let-syntax
rather than the environment
enclosing it.
Bug fix Typo in parsing of close bracket caused failure in cases when it should have succeeded.
Bug fix Procedures flo:+inf.0
and flo:-inf.0
were being chosen when the distribution binaries were being built.
But these procedures are system specific, so are now chosen on the
target system.
Performance change symbol<?
to compare as UTF-8
bytevector. This makes it different from string<?
but
much faster, which is more important for symbols.
Bug fix Fix botched edit in last release that broke Edwin.
This is the "MIT Professors" release, after the two professors who reported the bugs.
Feature When reading Scheme files, the reader now looks for and obeys a "coding" attribute. For example,
;; -*- coding: iso-8859-1 -*-
tells the reader to use iso-8859-1
coding, rather than
the default utf-8
coding. The file attributes line uses
the same format that Emacs accepts (multiple attributes separated by
semicolons), except that the right-hand side of each attribute will be
parsed by read
and consequently must be valid Scheme
syntax.
Bug fix Make sure that Edwin reads and writes files in
iso-8859-1
coding. This is the only coding that Edwin
supports since it uses single-byte strings.
Note that there is no way to automatically override the
default coding when writing files, other than to use
(port/set-coding port coding)
on the output
port after opening it and before writing to it.
Bug fix Fix a minor bug in IMAIL.
Feature Some support for upcoming changes to the ABI and compiler.
Performance More performance improvements for Edwin and IMAIL.
Bug fix More fixes to X11 graphics support.
Bug fix Fix support for UTF-8 encoding of file names.
Bug fix Killing Emacs *scheme* buffer was not killing the scheme process.
Bug fix Fix printing of string slices.
Performance Minor tweak to character sets in Edwin regexps.
Bug fix Fix problems from X11 graphics support.
Bug fix Top-level definition should return the name when evaluated.
Feature Change param:reader-fold-case?
to be settable.
Bug fix Fix problem where Scheme crashes when running under Emacs using
--emacs
.
Bug fix Fix breakage that caused legacy make-hash-table
to
throw an exception.
Feature Implement position
option for textual ports, export
binary-port-position
,set-binary-port-position!
,
and binary-port-length
, and fix bug in position of binary
output ports.
Feature Allow use of bundle?
as a bundle predicate.
Also allow #f
to be passed, meaning the same thing.
Feature New printer parameter
param:print-hash-number-in-objects?
controls whether
objects with #[...]
printed representation will contain
the hash number for the object. By default, it's true so there's no
change in behavior.
Performance Speed up string operations for Edwin and IMAIL. These changes should provide noticeable improvements.
Performance Don't use general predicate relations for record predicates; there's no advantage, and it's far slower than just chasing the parent link.
Revise unix installation notes to be more specific.
A bunch of changes to smooth the process of installation.
Bug fix make flo:integer?
answer true only for finite inputs.
Bug fix x11 plugin wasn't being recompiled when installing from native distribution.
Bug fix Fix problem that required a working mit-scheme when building and installing one of the distributed native builds.
This release has a few high-level changes in addition to those detailed below:
Note that one of the new features of R7RS is
parameters, which provide a portable way to do dynamic
binding. As of this release, the use of fluid-let
is
deprecated; it will be removed entirely in a future release.
Also note that the REPL has not changed its behavior. That's also true of the loader and the compiler, but these automatically detect when a file contains R7RS code and treats it appropriately. These changes allow existing code to continue working while new code can be written.
without-interrupts
for exclusive, atomic access to the
entire system. Thus without-interrupts
is deprecated.
Many of the system's uses of without-interrupts
sought
only to avoid interruption of a set of data structure modifications
that would leave the data in an inconsistent state. These
applications of without-interrupts
were replaced with
applications of a new procedure: without-interruption
.
Users of subprocess-global-status-tick
and
subprocess-status-tick
relied on
without-interrupts
to ensure a subprocess could not
change status between examining the tick and blocking to wait for a
tick. Without without-interrupts
, these users needed
another mechanism to reliably block for subprocess status changes.
The IO system already does this for IO using thread events, so a
procedure similar to register-io-thread-event
was added:
register-subprocess-event
.
*scheme*
buffer. When the thread system trapped, a
random thread's (but often the only thread's) dynamic state was used
to get a current output port.
In anticipation of more finely threaded (and multi-processing) worlds,
all of the surprising behavior was taken out of GC notifications.
Interested threads are required to register and each runs a thread
event soon after the flip (like an interrupt).
block-on-io-descriptor
outlines the
thread event driven process underlying Scheme's multi-tasking IO. The
same process can be employed to reliably block on multiple event
sources. Note that without-interrupts
is not needed, and
was replaced by with-thread-events-blocked
.
(let ((state)) ; registration ids, flags shared with event handlers (dynamic-wind (lambda () (set! state (register-multiple-thread-events))) (lambda () (with-thread-events-blocked (lambda () (if (wait? state) (suspend-current-thread))))) (lambda () (deregister-multiple-thread-events state))))
suspend-current-thread
procedure was changed to
put the thread back into an event-blocking state when it returns,
as is customary for such procedures, allowing an atomic
examination of the state after unblocking.
run-shell-command
procedure now takes advantage
of the ability to block on two IO channels and a subprocess
status. The procedure can do fully asynchronous IO to/from the
subprocess and, with output flushing, acts more like a subshell.
--prepend-library
, is
convenient for testing a plugin before installing it.
(make-condition-variable #!optional name) -> condvar
(condition-variable-name condvar) -> name
(condition-variable-specific condvar) -> object
(condition-variable-specific-set! condvar object)
(unlock-thread-mutex-and-wait thread-mutex condvar #!optional timeout-ms)
(condition-variable-wait! condvar thread-mutex #!optional timeout-ms)
(condition-variable-signal! condvar)
(condition-variable-broadcast! condvar)
(make-thread-barrier count #!optional name) -> thread-barrier
(thread-barrier-wait thread-barrier)
with-thread-mutex-lock
;
with-thread-mutex-locked
is deprecated.
(flo:copysign magnitude sign)
(flo:nextafter x)
(flo:sinh x)
(flo:cosh x)
(flo:tanh x)
(flo:asinh x)
(flo:acosh x)
(flo:atanh x)
(flo:cbrt x)
(flo:erf x)
(flo:erfc x)
(flo:gamma x)
(flo:hypot x)
(flo:j0 x)
(flo:j1 x)
(flo:y0 x)
(flo:y1 x)
(flo:yn x)
(reference-barrier x)
guarantees
x is not GC'd yet.
(ffs x)
: find first set, 1-indexed with 0 for 0(fls x)
: find last set, 1-indexed with 0 for 0 (same as integer-length
)(ctz x)
: count trailing zeros (same as ffs)((clz n) x)
: count leading zeros in n-bit word x(sha3256) -> sha3
(sha3256-update sha3 buf start end)
(sha3256-final sha3) -> digest
load-noisily?
variable was removed. It has been
ignored for at least 10 years.
with-thread-mutex-try-lock
procedure was added for
the use of GC daemons that clean a serialized data structure. They
may run when a mutex is locked, cannot deadlock, and can afford to
punt.
peek-no-hang
input operation takes a timeout argument
allowing it to wait rather than return immediately.
register-subprocess-event
procedure) to reliably block
without missing a subprocess status change, nor any other event on its
many input sources.
world-report
procedure and a monitor-world
Edwin command were added.
open-unix-server-socket
,
unix-server-connection-accept
, and
close-unix-server-socket
procedures were added.
spawn-edwin
procedure makes it convenient to use both
an Edwin on X and a REPL on the console.
register-time-event
is analogous to
register-timer-event
but takes a real time instead of an
interval, simplifying the effort to meet a deadline.
export-deprecated
keyword rather than
export
. References to the exported bindings are noted in
the analyses.
thread-get
and
thread-put!
. Threads can be given 'name
properties and world-report
will display their names.
The create-thread
procedure (like SRFI 18's
make-thread
) now takes an optional name
argument.
make-string
and string-copy
. Immutability
provides a number of useful features, the most important being that
space-efficient representations can be used. See the reference manual
for full details.
hash
has been changed to be compatible with
SRFI 69. Previously it was similar to
object-hash
, which should be used in its place now.
vector-8b
procedures, which used to provide a way
to access strings as vectors of bytes, are now deprecated. They
don't work with the new string representation. Instead please use
bytevectors for this purpose.
->uri
to convert a string to a
URI prior to using them.
#<...>
. Both the reader and the printer work
with this syntax.
automagic-integrations eta-substitution integrate-safely open-block-optimizations
write
and pp
has
been completely revamped. The new mechanism identifies a set of
objects by a universal predicate (that is, a procedure that accepts
any object and returns a boolean value), which is completely general
and does not depend on details of the object's representation.
begin0
flo:expm1
, flo:logp1
ignorable
((constant-procedure x) args ...) = x
(reference-barrier x)
for wrangling weaknessscheme --batch-mode
no longer messes with the tty modes.(Note that we're skipping the 8.x version numbers because long ago there was an 8.x series that we never released.)
In the past my (Chris Hanson's) policy for a stable release was that the documentation had to be updated for the release before it went out. In practice, this has meant that there have been no stable releases in recent years. As of this release, we will no longer consider updated documentation a prerequisite for a stable release.
#f
are now distinct objects.
bchscheme
was similar except that its temporary region
was a file.
reduce
; code using the old
reduce
should adapt to the new behavior, or use
reduce-left
which implements the old behavior.
record-type-default-inits
now returns a
list, not a vector.
load-noisily
and load-latest
procedures
are now just aliases for load
.
all.com
band is now used by default, meaning that the
compiler and Edwin are both loaded. In order to use the smaller
runtime.com
band, it must be explicitly specified with
the --band
option. The --compiler
and
--edwin
options are now accepted but ignored. The env
vars MITSCHEME_COMPILER_BAND
,
MITSCHEME_EDWIN_BAND
, and MITSCHEME_ALL_BAND
are now ignored.
--large
option is now ignored, and all difference
between large and small memory sizes is eliminated.
The old MITSCHEME_LARGE_foo
and
MITSCHEME_SMALL_foo
environment variables are
ignored, replaced by two new vars MITSCHEME_HEAP_SIZE
and
MITSCHEME_STACK_SIZE
. (There's no var for constant size
since it's rarely necessary to specify it.)
(no-type-checks)
and
(no-range-checks)
allow these defaults to be overridden.
This change will cause some performance degredation; we're interested
in hearing about situations in which this is a significant problem.
MITSCHEME_LOAD_OPTIONS
is now considered optional rather
than required.
--eval
and --load
command-line options
have been changed so that their actions are queued to be evaluated by
the REPL rather than being processed outside of the
REPL context. This fixes various problems with the use of
these options.
cond-expand
now recognizes mit
and
mit/gnu
as features, to assist porting programs.
#;(+ 3 4)
.
discard-char
is now an alias for read-char
.
open-tcp-stream-socket
now takes only two arguments.
make-strong-eq-hash-table
and
make-strong-eqv-hash-table
.
symbol
provides an easy way to build
new (interned) symbols.
smallest-fixnum
and
largest-fixnum
provide the limits on the fixnum
representation.
channel-file-truncate
can truncate an
open file.
string->symbol
accepts an ISO 8859-1 string
and converts it, while symbol->string
returns an
ISO 8859-1 string (or signals an error if conversion
impossible). New procedures utf8-string->symbol
and
symbol->utf8-string
provide support for UTF-8 strings.
string->number
now accepts an optional argument; if
given and true, and the input string isn't a number's representation,
an error is signalled.
read
procedure now accepts an optional second
argument, an environment in which to look up control variables such as
*parser-radix*
. This allows these variables to be scoped
rather than dynamically bound, which in turn makes them much safer to
use. Numerous callers of read
have been changed to pass
an appropriate environment here.
flo:rounding-modes
,
flo:rounding-mode
, flo:set-rounding-mode!
,
and flo:with-rounding-mode
that provide control over the
floating-point rounding mode on systems that support it. Currently
this is known to work on recent versions of GNU/Linux and
OS X.
random-source-pseudo-randomize!
from
SRFI 27 has not been implemented. While I agree that this
could be useful, it effectively mandates a particular
PRNG, and I don't want to be forced to use it.
hash
from SRFI 69 has not been
implemented, as it's a name conflict with a pre-existing procedure.
mod_lisp
.
*parser
support for parsing character streams. This
isn't yet documented.
xml-element-content
has been renamed
to xml-element-contents
.
M-x paredit-mode
.
As of this release, MIT Scheme is a part of the GNU project and has been renamed MIT/GNU Scheme. The project is now hosted on Savannah. License text in the source files has been changed, and a license/warranty statement is now emitted during boot, to conform to the GNU coding standards.
This is the first testing release of MIT/GNU Scheme. I had originally planned to do a stable 7.8.0 release, but time pressures have made it difficult to bring the documentation up to date, so this release comes with out-of-date documentation. Additionally, there will be binaries only for GNU/Linux; users of other systems will have to wait for the stable release.
In releases 7.7.0 and 7.7.1, variable definitions (i.e. instances
of the define
special form) appearing inside let-syntax
modified the environment outside of the let-syntax
, while syntax definitions (instances of the define-syntax
special form) modified the environment corresponding
to the let-syntax
form. However, according to R5RS
this is incorrect: all definitions should modify the environment
corresponding to the let-syntax
form. The syntax has been
changed to conform to R5RS.
The record abstraction has received a major update. The primary purpose of this update has been to improve the performance of constructors, and to implement keyword constructors for records. As a consequence, the representation of record types has been changed. Because record types are constructed at load time, this has no effect on previously-compiled code.
However, the define-structure
macro was also changed to
use these new facilities. The interface between
define-structure
and the record abstraction was changed
to increase performance, and consequently previously-compiled
instances of define-structure
no longer work and must be
recompiled.
A further change to define-structure
is that the
initial-value expressions are interpreted in a different way.
Previously, an undocumented feature of these expressions was that they
could refer to other supplied record field names as free variables.
This no longer works; instead these expressions are closed in the
environment in which the define-structure
macro appears.
The default type-descriptor name for define-structure
has
changed. Previously, for a structure defined as
(define-structure foo bar)
the type descriptor was named foo
. Now, the type descriptor
is named rtd:foo
. This change is useful primarily because it
is common to name variables that hold objects of this type foo
, and when the type descriptor has the same name, it causes
confusion between references to the descriptor and unintended free
references to an object. (After making this change, several such free
references were found in the MIT/GNU Scheme code.)
Finally, define-structure
now defines a type descriptor
for every structure definition, including structures without tags.
Previously this was done only for tagged structures.
The representation of character objects has been changed to provide direct support for Unicode. Previously, the representation had 16 bits of code and 5 bucky bits. The new representation has 21 bits of code and 4 bucky bits (the "top" bucky bit has been eliminated). This allows direct representation of the entire Unicode space.
In addition, the syntax of characters has been extended to allow arbitrary Unicode characters to be represented. The new syntax is #\U+XXXX, where XXXX is a sequence of hexadecimal digits specifying a Unicode code point. This supersedes an undocumented syntax #\<codeXXXX>.
The runtime library's support for Unicode has been completely rewritten, and now has support for UTF-8, UTF-16, and UTF-32 encodings, as well as support for wide strings. The UTF-8 codec has been fixed to signal errors for overlong coding sequences.
The special form define-syntax
has been changed so that the
right-hand side may be a keyword. This can be used to make aliases
for existing keywords, such as
(define-syntax sequence begin)
In pre-7.7 versions of MIT/GNU Scheme, the right-hand side of
the special form define-syntax
was a procedure, such as
(define-syntax foo (lambda ...))
This behavior was preserved in the 7.7 versions by a kludge that made the above equivalent to
(define-syntax foo (non-hygienic-macro-transformer (lambda ...)))
With this release, the old syntax has been eliminated. It is now
necessary to use the non-hygienic-macro-transformer
special
form in these cases. (Note, however, that non-hygienic-macro-transformer
is also a kludge and is not
guaranteed to produce working macros. You should rewrite your macros
in hygienic form to guarantee proper operation.)
Command-line options now start with -- rather than -, again for compliance with GNU coding standards. The older - prefix still works but may eventually be dropped.
The external representation of symbols has been extended to support the quoting mechanisms of Common Lisp. This means that there is a standard external representation for every interned symbol. For example, the notations |abcDEF|, foo|BAR|baz, and abc\ def respectively represent the symbols whose names are "abcDEF", "fooBARbaz", and "abc def".
This change introduces an incompatibility in the way that symbols are printed. Previously, (write symbol) was equivalent to (write-string (symbol->string symbol)). Now, (write symbol) always writes the symbol out with appropriate quoting so that it will read back in as the same symbol.
A new command-line option --batch-mode disables output of banners, prompts, and values. This is intended for use with shell scripts, where the Scheme program writes to standard output and the author doesn't want the output cluttered by the interactivity cues. Note that the effect of this option applies only to the top-level REPL; if an error occurs, all the interactivity cues are re-enabled in the error REPL.
The following SRFIs are now supported: 0, 6, 8, 9, 23, and 30.
The following newly-implemented procedures are notable:
exact-positive-integer? host-big-endian? make-top-level-environment x-graphics/open-display? x-graphics/open-window?
The tcp-server-connection-accept
procedure now accepts an
optional argument line-translation
, which sets the line
translation to be used for newly-accepted sockets. (Thanks to Arthur
Gleckler)
Output ports now track the current column. This is simple minded but should work for ASCII, at least.
The URI support procedures, formerly a part of IMAIL, are now in the runtime library.
HTML mode is now used for ".xml" files, and PHP mode for ".inc" files.
VC mode has a new editor variable vc-cvs-stay-local
that
implements a small subset of the corresponding functionality in
GNU Emacs.
The debug-on-*-error
editor variables can now be set to
'ask
, which causes the user to be prompted for the debugger
when the corresponding error occurs. The default settings of these
variables have been changed to be more appropriate for typical users.
Support for XML namespaces has been implemented. One
consequence of this is that the representation of XML names
has been changed. It is no longer the case that XML names
can be compared with eq?
; instead one must use the new xml-name=?
. Additionally, xml-intern
now takes an optional
second argument, which is the URI of the namespace. XML names that don't have an associated namespace URI are
now ordinary interned symbols, which greatly simplifies reference to
such names.
Comments are preserved by the parser.
The parser now distinguishes between <foo></foo> and <foo/> in its output. The former has a contents list of (""), while the latter has a contents list of ().
Optional indentation is supported for DTD and attributes during output.
The parser now supports handlers for processing instructions, which are invoked during parsing. A handler maps the text of a processing instruction to a list of XML items, which are inserted into the resulting XML structure in place of the processing instruction.
The following new procedures are available to make XML input and output more convenient:
read-xml read-xml-file write-xml-file string->xml substring->xml xml->string xml->wide-string
All the remaining bugs identified by the XML conformance tests have been fixed, except support for UTF-16.
Release 7.7.1 fixes several bugs in IMAIL; fixes a bug that prevented the use of server sockets on Windows systems; and fixes a bug that caused the debugger to generate errors in common circumstances.
This release provides hygienic
macro support, as
defined in R4RS and R5RS. This is a complete
rewrite of the syntax engine, so any program that uses macros should
be rewritten to use the new engine. A subset of the old
macro-definition syntax is still supported, but this will eventually
be removed. Note that the new syntax engine has no effect on the
compiled-code format; most binaries compiled by release 7.6.x should
continue to work.
These syntactic keywords have been eliminated:
define-macro in-package macro make-environment scode-quote sequence unassigned? using-syntax
The syntactic keyword the-environment
has been restricted to
use in top-level environments. It is no longer allowed in the body of
any binding form (e.g. lambda
, let
).
Syntactic keywords are now stored in environments, rather than in a separate syntax-table structure. The environment abstraction has been enhanced to support this, as well as to make it more general. The changes are documented in the reference manual.
The syntax-table abstraction has been eliminated, and most procedures
and arguments involving syntax tables have been removed. One
exception is the load
procedure, which still accepts a
syntax-table argument, but ignores it.
Although the 7.6.1 release had a workaround for problems with certain AMD Athlon processors, the workaround was ineffective on machines running Windows operating systems (and possibly OS/2 systems as well). This version fixes that problem.
The hash-table abstraction is now always loaded. It's not necessary
to call load-option
prior to use of hash tables. For upwards
compatibility, calling (load-option 'hash-table) is still
permitted but does nothing.
JOIN DONATE SHOP“The Free Software Foundation (FSF) is a nonprofit with a worldwide mission to promote computer user freedom. We defend the rights of all software users.”
Please send general FSF & GNU inquiries to <gnu@gnu.org>.
There are also other ways to contact the FSF.
Broken links and other corrections or suggestions can be sent to <bug-mit-scheme@gnu.org>.
Please see the Translations README for information on coordinating and submitting translations of this article.
Copyright © 2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020,2021,2022,2023 Free Software Foundation, Inc.
This page is licensed under a Creative Commons Attribution-NoDerivatives 4.0 International License.
Copyright Infringement Notification
Updated: 2023-03-14T00:11:13-04