From: Matthew Flatt <>
Subject: [plt-scheme] 299.29
Date: Sat, 29 Jan 2005 07:54:11 -0700

The exp-tagged code in CVS for MzScheme and MrEd is now version 299.29.

This version includes a significant change in output buffering:

 * File-stream output ports (including file ports, the initial output
   port, and ports created by `subprocess’) are now block-buffered by
   default, instead of line-buffered. The exception is when an output
   port corresponds to a terminal, in which case it is line-buffered
   by default. Also, the initial error port remains unbuffered.

   This change is especially likely to affect stdio-based communication
   among OS-level processes. For example, when communicating with an
   ispell subprocess, adding a newline at the end of a command
   previously would have been enough to send the command to ispell.
   Now, the output must be flushed explicitly (using `flush-output’) or
   the buffer mode must be explicitly changed to by-line (using

   TCP ports are not file-stream ports, and TCP output remains

These new buffering conventions are standard. I originally resisted the
standard conventions, because I find them confusing. For example, if
you put

 (let loop ([n 0])
   (fprintf (current-error-port) "ERR ~a~n" n)
   (fprintf (current-output-port) "OUT ~a~n" n)
   (loop (add1 n)))

in and run

  mzscheme -r

then your terminal shows alternating "ERR" and "OUT", but in csh

  mzscheme -r >& out

groups many "ERR"s and "OUT"s together in the "out" file, instead of
always interleaving.

But I’ve often regretted MzScheme’s deviation from standard buffering
conventions, and the v300 switchover seems like a good time to change.

As always, feedback on this change is welcome.

Other changes in v299.29:

 * Changed Mac OS preferences file name to "".

 * Added binding of greek-lambda character (code point #x03BB) to
   syntax that expands to `lambda’. This lambda is exported by the
   `mzscheme’ module.

   DrScheme’s "Insert Lambda" menu item now merely inserts a lambda
   character, instead of a special object. (Old files with inserted
   lambdas still contain the special object.)

 * Changed the default mapping for the ’default font in PostScript from
   Times to Helvetica