logo
Kurashizu Blogwhere ideas flow
  • Home
  • News
  • Blog
  • About
  • Home
  • News
  • Blog
  • About

© 2026 Kurashizu. All rights reserved.

Admin·New Post·Service Status
Powered by Cloudflare·31.10.26
← Back to news

Chicken Scheme 6.0

Original article
code.call-cc.org|274 points|44 comments|by eatonphil|Aug 11, 2026

Chicken Scheme 6.0: Release Overview

The 6.0.0 update marks a significant milestone, primarily by integrating all modules defined by the R7RS small language directly into the core system.

🌐 String & Character Enhancements

The internal architecture for strings has been overhauled to use UTF-8, ensuring full UNICODE\text{UNICODE}UNICODE compatibility.

  • Indexing: Locatives on strings are now based on code-points rather than raw bytes.
  • Character Management: The char-name procedure now supports the removal of named character definitions.
  • Escaping:
    • symbol-escape now toggles whether symbols are displayed in escaped mode (|...|).
    • Symbol printing logic is now more rigorous regarding when escaping is required.
    • Hexadecimal escape sequences now strictly require a terminating ; character, adhering to R7RS standards.

📦 Data Handling & I/O

Bytevectors and Blobs

The system has transitioned from (chicken blob) to (chicken bytevector), which provides R7RS-compliant operations.

Old ProcedureNew Requirement / Status
file-readNow requires a bytevector (strings no longer accepted)
file-writeNow requires a bytevector (strings no longer accepted)
set-pseudo-random-seed!Now requires a bytevector
random-bytesNow requires a bytevector
read-u8vectorRemoved→\text{Removed} \rightarrowRemoved→ Use (chicken io)
write-u8vectorRemoved→\text{Removed} \rightarrowRemoved→ Use (chicken io)

Port & File Operations

  • Encodings: open-input-file and open-output-file now support encoding arguments (Default: UTF-8; also supports Latin-1).
  • Port Creation: make-input-port and make-output-port now utilize keyword arguments for optional methods.
  • New Ports: Added make-binary-input-port and make-binary-output-port.
  • Port Naming: set-port-name! has been deleted; please use the SRFI-17 setter for port-name.
  • File Locking: The (chicken file posix) module now employs the flock(2) system call, which is thread-safe and operates on entire files.

🏗️ Module Architecture & Migration

Many primitives have been relocated to align with R7RS.

Detailed Relocations

  • To (scheme base): 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?.
  • To (scheme case-lambda): case-lambda.
  • To (scheme base) (with signature change): write-string (moved from (chicken io)).
  • Generative Records: define-record-type is now generative and resides in (scheme base). Consequently, record-instance? and make-record-instance now accept non-symbolic type specifiers.

Deprecations & Renaming

  • Remove srfi-0, srfi-6, srfi-9, srfi-11, srfi-23, srfi-39, and srfi-98 (absorbed by R7RS).
  • Rename r4rs, r5rs, r4rs-null, and r5rs-null to (scheme XXX).
  • Rename platform identifier mingw32 to mingw.

🔢 Numerical & Mathematical Updates

Number Vectors

A new module, (chicken number-vector), provides a superset of SRFI-4, adding support for 64-bit and 128-bit complex number vectors. The original srfi-4 module remains but is restricted to the SRFI-4 specification.

Complex Numbers & Arithmetic

Using LaTeX notation, the following logic now applies:

  • Rectangulars: make-rectangular returns a complex number if the imaginary part is an inexact 000.
  • Imaginary Parts: imag-part returns an exact 000 when the input is not a complex number.
  • Parsing: string->number and the reader now correctly process complex numbers where the imaginary part is a negative inexact 000 (e.g., a+(−0.0i)a + (-0.0i)a+(−0.0i)).
  • Comparison: max and min will ignore NaN values provided a non-NaN argument is present.

Base Conversion

number->string now supports bases up to 363636 (previously 161616). string->number has been improved to handle the character "i" more consistently in bases >18> 18>18.

⚙️ Syntax & Compiler

Expansion & Macros

  • Single Expansion: Added expand1 to (chicken syntax) and the ,x1 command to csi for expanding macros exactly once.
  • Tail Patterns: syntax-rules now offers improved support for tail patterns involving ellipses.
  • Includes: include and include-relative now accept multiple files; include-ci is newly available.
  • Library Specs: define-library now supports export-all.

Read Syntax

The #ci'/#cs'` syntaxes are gone. Use the following instead:

#!fold-case
#!no-fold-case

🔌 Foreign Function Interface (FFI)

The FFI has been optimized for performance and flexibility:

  1. Direct Passing: Strings and symbols are no longer copied when passed to foreign code. Warning: Mutations made by external C code will be reflected in Scheme.
  2. Direct Types: C structs, unions, and complex numbers can now be passed as arguments and returned as results directly.

🛠️ Tooling & Installation

Compiler & Interpreter

  • The flag -r5rs-syntax is now -r7rs-syntax and no longer disables extended symbol syntax.
  • Paths: Library procedures and make-pathname now consistently use forward slashes (/).
  • File System: delete-file and delete-file* now behave identically when encountering broken symlinks.

CSI & Debugging

  • The "feathers" debugger is no longer part of the core; it is now an egg.
  • set-describer! has been removed from the csi module.

Installation & Config

chicken-install now implements locking for the cache directory. In egg specifications, csc-options and link-options now support custom-config forms.

Important Note on Tool Arguments: Tool paths containing spaces are now handled without requiring double-quotes. However, as a result, the system no longer accepts space-separated flags for tool arguments.

If you require specific flags, please wrap the tool call in a short shell script.

Miscellaneous

  • load and load-relative now allow the second optional parameter to be either an evaluation procedure or an environment.
  • Added number-vector-data to the (chicken memory representation) module.