Chicken Scheme 6.0
Chicken Scheme 6.0
6.0.0 - Core libraries
6.0.0 - 核心库
-
All modules specified by the R7RS small language are now available in the core system.
-
R7RS 小语言规范中定义的所有模块现已在核心系统中提供。
-
The internal string representation has been converted to UTF-8, making strings fully UNICODE capable.
-
内部字符串表示已转换为 UTF-8,使字符串完全支持 UNICODE。
-
The (chicken blob) module has been replaced with (chicken bytevector), containing R7RS compatible bytevector operations. Bytevectors are now fully equivalent to SRFI-4 u8vectors.
-
(chicken blob) 模块已被 (chicken bytevector) 取代,其中包含与 R7RS 兼容的字节向量操作。字节向量现在与 SRFI-4 的 u8vectors 完全等价。
-
The read-syntax for blobs (
#${...}') has been removed. Bytevectors can be read using#u8(…)’ or `#u8”…”’. -
用于 blob 的读取语法 (
#${...}') 已被移除。字节向量现在可以使用#u8(…)’ 或 `#u8”…”’ 进行读取。 -
`char-name’ now allows removing a named character definition.
-
`char-name’ 现在允许移除已命名的字符定义。
-
open-input-file' andopen-output-file’ accept a file encoding, supported are currently UTF-8 (the default) and Latin-1 (ISO-8859-1). -
open-input-file' 和open-output-file’ 现在接受文件编码参数,目前支持 UTF-8(默认)和 Latin-1 (ISO-8859-1)。 -
file-read',file-write’, ‘set-pseudo-random-seed!’ and `random-bytes’ require a bytevector argument and do not accept strings. -
file-read',file-write’, ‘set-pseudo-random-seed!’ 和 `random-bytes’ 现在要求使用字节向量作为参数,不再接受字符串。 -
process-fork',process-run’,process' andprocess*’ return now a process-object instead of a PID, use process record accessors to retrieve exit-status and input/output ports.process-wait' andprocess-signal’ accept either a PID or a process object as argument. -
process-fork',process-run’,process' 和process*’ 现在返回一个进程对象(process-object)而非 PID,请使用进程记录访问器来获取退出状态和输入/输出端口。process-wait' 和process-signal’ 现在接受 PID 或进程对象作为参数。 -
File-locking operations in the (chicken file posix) module now use the flock(2) system call, operator over whole files, are thread-safe and use a simpler interface. `file-test-lock’ has been removed.
-
(chicken file posix) 模块中的文件锁定操作现在使用 flock(2) 系统调用,作用于整个文件,具备线程安全性,并使用了更简单的接口。`file-test-lock’ 已被移除。
-
read-u8vector',read-u8vector!’ and `write-u8vector’ have been removed, use the equivalent operations from the (chicken io) module instead. -
read-u8vector',read-u8vector!’ 和 `write-u8vector’ 已被移除,请改用 (chicken io) 模块中的等效操作。 -
Added
read-bytevector',read-bytevector!’ and `write-bytevector’ to the (chicken io) module. -
在 (chicken io) 模块中添加了
read-bytevector',read-bytevector!’ 和 `write-bytevector’。 -
Removed
set-port-name!', use the SRFI-17 setter forport-name’ instead. -
移除了
set-port-name!',请改用port-name’ 的 SRFI-17 setter。 -
Added `port-encoding’ to the (chicken port) module.
-
在 (chicken port) 模块中添加了 `port-encoding’。
-
make-input-port' andmake-output-port’ take their optional port methods as keyword arguments now. -
make-input-port' 和make-output-port’ 的可选端口方法现在通过关键字参数传递。 -
Added
make-binary-input-port' andmake-binary-output-port’. -
添加了
make-binary-input-port' 和make-binary-output-port’。 -
Locatives on strings are now indexed by code-point, not byte.
-
字符串上的定位器(Locatives)现在按码点(code-point)索引,而非字节。
-
`symbol-escape’ now also controls whether symbols are printed in escaped (”|…|”) mode or not.
-
`symbol-escape’ 现在也控制符号是否以转义 (”|…|”) 模式打印。
-
Symbol printing is stricter in deciding when symbols should be escaped or not.
-
符号打印在决定何时需要转义时变得更加严格。
-
The following primitives have been moved from (chicken base) to R7RS modules:
-
以下原语已从 (chicken base) 迁移至 R7RS 模块:
-
exact-integer?,exact-integer-sqrt?',vector-copy!’,make-parameter',call/cc’,open-input-string',open-output-string’,get-output-string',input-port-open?’,output-port-open?',parameterize’ and `port?’ moved from the (chicken base) to the (scheme base) module. -
exact-integer?,exact-integer-sqrt?',vector-copy!’,make-parameter',call/cc’,open-input-string',open-output-string’,get-output-string',input-port-open?’,output-port-open?',parameterize’ 和 `port?’ 已从 (chicken base) 迁移至 (scheme base) 模块。 -
`case-lambda’ moved from (chicken base) to (scheme case-lambda).
-
`case-lambda’ 已从 (chicken base) 迁移至 (scheme case-lambda)。
-
`features’ moved from (chicken platform) to (scheme base).
-
`features’ 已从 (chicken platform) 迁移至 (scheme base)。
-
`write-string’ moved from (chicken io) to (scheme base) and its signature changed to the R7RS one.
-
`write-string’ 已从 (chicken io) 迁移至 (scheme base),其签名已更改为 R7RS 标准。
-
`define-record-type’ moved to (scheme base) and is generative, to be compliant with R7RS.
-
`define-record-type’ 已迁移至 (scheme base) 且变为生成式(generative),以符合 R7RS 标准。
-
`syntax-error’ has been removed from (chicken syntax) and is now a macro and part of (scheme base).
-
`syntax-error’ 已从 (chicken syntax) 移除,现在作为一个宏包含在 (scheme base) 中。
-
record-instance?' andmake-record-instance’ accept non-symbolic type specifiers to support generative record types. -
record-instance?' 和make-record-instance’ 现在接受非符号类型说明符,以支持生成式记录类型。 -
The new (chicken number-vector) module now provides a superset of SRFI-4, including 64 and 128-bit complex number vectors, the `srfi-4’ module is still available but exports only those procedures as are specified in SRFI-4.
-
新的 (chicken number-vector) 模块现在提供了 SRFI-4 的超集,包括 64 位和 128 位复数向量;`srfi-4’ 模块仍然可用,但仅导出 SRFI-4 规范中定义的那些过程。
-
The second (optional) parameter for
load' andload-relative’ may be either an environment or an evaluation procedure. -
load' 和load-relative’ 的第二个(可选)参数现在可以是环境或求值过程。 -
The module aliases
srfi-0',srfi-6’,srfi-9',srfi-11’,srfi-23',srfi-39’ and `srfi-98’ have been removed (all of these are covered by R7RS). -
模块别名
srfi-0',srfi-6’,srfi-9',srfi-11’,srfi-23',srfi-39’ 和 `srfi-98’ 已被移除(这些功能均已被 R7RS 覆盖)。 -
The modules
r4rs',r5rs’,r4rs-null' andr5rs-null’ have been renamed to `(scheme XXX)’. -
模块
r4rs',r5rs’,r4rs-null' 和r5rs-null’ 已重命名为 `(scheme XXX)’。 -
Hexadecimal escape sequences in strings and extended symbols must be terminated by the `;’ character, following R7RS.
-
字符串和扩展符号中的十六进制转义序列必须以 `;’ 字符结尾,以符合 R7RS。
-
The
#ci'/#cs’ read syntaxes have been removed, use `#![no-]fold-case’ markers instead. -
#ci'/#cs’ 读取语法已被移除,请改用 `#![no-]fold-case’ 标记。 -
include' andinclude-relative’ accept multiple filenames, `include-ci’ has been added. -
include' 和include-relative’ 现在接受多个文件名,并添加了 `include-ci’。 -
Added `include-path’ to (chicken platform) module.
-
在 (chicken platform) 模块中添加了 `include-path’。
-
Added `number-vector-data’ to (chicken memory representation) module.
-
在 (chicken memory representation) 模块中添加了 `number-vector-data’。
-
define-library' has been extended to support theexport-all’ specification. -
define-library' 已扩展以支持export-all’ 规范。 -
The platform-identifier “mingw32” has been renamed to “mingw”.
-
平台标识符 “mingw32” 已重命名为 “mingw”。
-
Library procedures that return paths now always convert them to contain forward slashes, ‘make-pathname’ always uses ”/” for path separation.
-
返回路径的库过程现在总是将其转换为包含正斜杠,‘make-pathname’ 总是使用 ”/” 作为路径分隔符。
-
Added `expand1’ to (chicken syntax) module for expanding a macro only once, also added the “,x1” command to “csi” for this.
-
在 (chicken syntax) 模块中添加了 `expand1’ 以仅展开宏一次,并为此在 “csi” 中添加了 “,x1” 命令。
-
Added the (chicken version) module.
-
添加了 (chicken version) 模块。
-
delete-file*' anddelete-file’ now behave consistently with broken symlinks. -
delete-file*' 和delete-file’ 现在对损坏的符号链接的处理行为保持一致。 -
`number->string’ now accepts bases up to 36, where before it only accepted bases up to 16 (thanks to Diego A. Mundo)
-
`number->string’ 现在接受最高 36 进制,此前仅支持最高 16 进制(感谢 Diego A. Mundo)。
-
`string->number’ now handles ambiguous cases involving the character “i” in bases higher than 18 more consistently.
-
`string->number’ 现在能更一致地处理在 18 进制以上时涉及字符 “i” 的歧义情况。
-
`make-rectangular’ returns a complex number if the imaginary part is inexact zero.
-
如果虚部为非精确零(inexact zero),`make-rectangular’ 现在返回一个复数。
-
`string->number’ and the reader accept and handle correctly complex numbers with a negative inexact zero as the imaginary part.
-
`string->number’ 和读取器现在可以正确接受并处理虚部为负非精确零的复数。
-
`imag-part’ returns exact zero when given a non-complex number.
-
当传入非复数时,`imag-part’ 返回精确零。
-
max' andmin’ ignore nan values when given any non-nan argument. -
当给定任何非 NaN 参数时,
max' 和min’ 会忽略 NaN 值。
Syntax expander
语法展开器
- `syntax-rules’ attempts to better support tail patterns with ellipses (#1736).
- `syntax-rules’ 尝试更好地支持带有省略号的尾部模式 (#1736)。
FFI changes
FFI 变更
-
Strings and symbols passed to foreign code are not copied, they are passed directly, any mutations done by external code will be visible on the Scheme side.
-
传递给外部代码(foreign code)的字符串和符号不再被复制,而是直接传递;外部代码所做的任何修改在 Scheme 端都将可见。
-
Complex numbers, C structs and unions can now be passed directly as arguments and returned as results when interfacing to C code.
-
在与 C 代码交互时,复数、C 结构体和联合体现在可以直接作为参数传递并作为结果返回。
Tools
工具
-
The compiler and interpreter option
-r5rs-syntax' has been renamed to-r7rs-syntax’ and does not disable extended symbol syntax (”|…|”) anymore. -
编译器和解释器选项
-r5rs-syntax' 已重命名为-r7rs-syntax’,且不再禁用扩展符号语法 (”|…|”)。 -
The “feathers” debugger has been removed from the core and is now available as an egg.
-
“feathers” 调试器已从核心中移除,现在作为 egg 提供。
-
The
set-describer!' procedure has been removed from thecsi’ module. -
set-describer!' 过程已从csi’ 模块中移除。 -
The “csc” program now accepts tool flags (e.g. -compiler, -cc etc) which have paths with spaces in them without requiring the user to…
-
“csc” 程序现在接受包含空格路径的工具标志(例如 -compiler, -cc 等),无需用户…