O'Reilly logo

Common Lisp Recipes: A Problem-Solution Approach by Edmund Weitz

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

14. I/O: Streams and Files

Communication between COMMON LISP and the “world outside” is usually performed via streams, whether you are interacting with files, with network connections, or with your IDE. These streams, which can be character streams (for textual data of all kinds) or binary streams (to transfer bits in chunks of bytes), are conceptually easy to use but still remarkably flexible and they are ultimately also used by the Lisp reader (see Chapter 8) and the Lisp printer (see Chapter 9). This chapter is about the various ways you can use, adapt, and combine streams and it ends with a recipe that demonstrates how you can create your own stream classes for almost every task you can imagine.

(See also Recipe 3-3.)

14-1. Redirecting Streams ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required