[gambit-list] Gambit-C 4.0 beta 15

Marc Feeley feeley at iro.umontreal.ca
Mon Sep 12 01:22:21 EDT 2005

A new beta of Gambit-C 4.0 is now available in source form at this


Here's what's new:

- Threads are now structures that can be subtyped.  The special
   form "define-type-of-thread" can be used to define a subclass of
   thread.  The procedure thread-init! must be used to initialize
   derived threads.  For example

      (define-type-of-thread mythread

      (define t (make-mythread 999))
      (thread-init! t (lambda () (pp (mythread-myfield (current- 
      (thread-start! t) ; prints 999

- Each thread now has a mailbox.  The procedure
   (thread-send thread obj) adds obj to the end of the thread's
   mailbox and (thread-receive [timeout [timeout-val]]) retrieves
   the oldest message in the current thread's mailbox.

- The "ring" example has been reimplemented with mailboxes.  A
   "distributed computing" example has been added to show how mailboxes
   and object serialization can be used to implement a distributed
   computing system similar to Termite (see

- Improvements to compiler:
   - Linking now accesses C files produced by the compiler in
     the current directory (where the compiler put them!)
   - Fixed variable conflict problem when using -debug option.
   - Performs safe specialization of (equal? X Y) to (eq? X Y)
     when X or Y is a fixnum, boolean, empty list, etc
   - Fixed inlining problem with cadar and friends (sigh).
   - Better expansion of +, -, *.

- For process ports:
   - Added directory: setting for open-process.
   - The executable of open-process is now searched using "PATH".
   - Added (process-pid port) and (process-status port [default-value]).

- A socket opened with open-tcp-client opens the connection
   in the background.  Any connection error is reported at the
   first read or write on the port.

- Added (timeout->time timeout).

- Added (host-name) and (user-name).

- Added X!Y to the infix syntax.

- Fixed bug in quasiquotation of an improper list constant.

- Improved performance of symbol and keyword hash tables when many
   symbols and keywords are interned (e.g. "read"ing a file with a long
   list of symbols).

- Added (make-uninterned-symbol name [hash]) and
   (make-uninterned-keyword name [hash]).

- Improved hashing function in equal?-hash.

- The procedure make-table now honors the size: setting which
   sets the initial size of the table.

- Fixed a bug in serialization/deserialization of closures and
   continuations referring to code that accesses a global variable that
   has not been defined in the deserialization environment.

- Added Windows implementation of open-process, file-info and file- 

- Cleanup of lib/os.h and configure script to improve portability.
   Gambit now compiles cleanly on Mac OS X, Linux, Solaris, HP-UX,
   MinGW, and cygwin (and probably many other systems).

- Fixed cygwin bug in (copy-file source dest) when the files are

- Improved nonblocking I/O on Windows.  Now I/O on sockets,
   files, and processes only block the thread that requested the I/O.

- Fixed bug on MinGW which caused REPL I/O to be directed to an
   invisible console.

More information about the Gambit-list mailing list