Skip to content
Felix S. Klock II edited this page Jul 28, 2013 · 1 revision

== R6RS i/o system ==

Aside from a few specific problems (documented on other pages of this wiki), the R6RS i/o system became operational in Larceny v0.95 (First Safety). Larceny v0.96 (Fluoridation) eliminated some transitional features, which improved performance.

To simplify Larceny's transition to its new i/o system, the OS-dependent parts of the i/o system are unchanged from v0.93. That means UTF-16 transcoding isn't very useful on Windows, even though it is implemented. It also means that set-position! isn't implemented on binary file ports, which is an actual bug.

The following procedures are deprecated but must survive for a while to ease the transition:

  • open-binary-input-file
  • open-binary-output-file Despite their names, both of these return a textual port whose transcoder is (make-transcoder (latin-1-codec) 'none 'ignore). With that particular transcoder, arbitrary bytes can be mixed with text, so we use these ports for files that contain compiled code (.lop and .fasl files). Although this is conceptually evil, and the names are misleading, it is all compatible with the R6RS i/o system.

Note that the peek-char, read-char, and write-char procedures no longer work on binary ports, which makes them considerably faster.

Clone this wiki locally