Lisp Lore : a Guide to Programming the Lisp Machine

Lisp Lore : a Guide to Programming the Lisp Machine

LISP LORE: A GUIDE TO PROGRAMMING THE LISP MACHINE Hank Bromley ^g. LISP LORE: A GUIDE TO PROGRAMMING THE LISP MACHINE AT&T LISP LORE: A GUIDE TO PROGRAMMING THE LISP MACHINE by Hank Bromley AT&T Bell Laboratories W KLUWER ACADEMIC PUBLISHERS Boston/ Dordrecht/ Lancaster Distributors for North America: Kluwer Academic Publishers 101 Philip Drive Assinippi Park Norwell, Massachusetts 02061, USA Distributors for the UK and Ireland: Kluwer Academic Publishers MTP Press Limited Falcon House, Queen Square Lancaster LAI 1RN, UNITED KINGDOM Distributors for all other countries: Kluwer Academic Publishers Group Distribution Centre Post Office Box 322 3300 AH Dordrecht, THE NETHERLANDS Library of Congress Cataloging-in-Publication Data Bromley, Hank. Lisp lore. Includes index. 1. LISP (Computer program language) I. Title. QA76.73.L23B75 1986 005.133 86-7377 ISBN 0-89838-220-3 Copyright © 1986 by Bell Telephone Laboratories, Incorporated. Portions of this book are copyrighted by Symbolics, Inc. All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, mechanical, photocopying, recording, or otherwise, without the prior written permission of the publisher, Kluwer Academic Publishers, 101 Philip Drive, Assinippi Park, Norwell, Massachusetts 02061. Printed in the United States of America TABLE OF CONTENTS LIST OF FIGURES 5.1 1 7 TABLE OF CONTENTS 10.4 Messing with the mouse blinker 186 10.5 The :drop-icon method 187 10.6 Setting up the comtab 188 10.7 Getting in the System Menu 188 10.8 The Program 189 10.9 Problem Set #9 194 1 MORE ADVANCED USE OF THE EDITOR 199 11.1 Keyboard Macros 199 11.2 Writing New Commands 201 1 1.3 Buffers and Streams 201 1 1.4 Reading from the Mini-buffer 204 11.5 A Real Example 206 11.6 Problem Set #10 207 12 A QUICK LOOK AT "THE NETWORK" 211 12.1 The "Gee-Whiz" Overview 211 12.2 The Beginning of the Real Explanation 213 12.3 The Ethernet 214 12.4Chaosnet 215 12.5 A Bit More on Serial Streams 217 12.6 The Role of the Namespace 2 1 12.7 Troubleshooting 219 APPENDIX: BASIC ZMACS COMMANDS 221 INDEX 225 LIST OF FIGURES 1 Flavor tree for lisp-listener 24 2 Structure of combined method 28 3 Transitions among window states 48 PREFACE This book had its genesis in the following piece of computer mail: From allegra!joan-b Tue Dec 18 09:15:54 1984 To: solalhjb Subject: lispm Hank, I've been talking with Mark Plotnik and Bill Gale about asking you to conduct a basic course on using the lisp machine. Mark, for instance, would really like to cover basics like the flavor system, etc., so he could start doing his own programming without a lot of trial and error, and Bill and I would be interested in this, too. I'm quite sure that Mark Jones, Bruce, Eric and Van would also be really interested. Would you like to do it? Bill has let me know that if you'd care to set something up, he's free to meet with us anytime this week or next (although I'll only be here on Wed. next week) so we can come up with a plan. What do you think? Joan. (All the people and computers mentioned above work at AT&T Bell Laboratories, in Murray Hill, New Jersey.) I agreed, with some trepidation, to try teaching such a course. It wasn't clear how I was going to explain the lisp machine environment Xii PREFACE to a few dozen beginners when at the time I felt I was scarcely able to keep myself afloat. Particularly since many of the "beginners" had PhD's in computer science and a decade or two of programming experience. But the need was apparent, and it sounded like fun to try, so we had a few planning sessions and began class the next month. From early January through late March we met once a week, about a dozen times in all, generally choosing the topic for each session at the conclusion of the previous one. I spent the last few days before each meeting throwing together lecture notes and a problem set (typically finishing shortly after the announced class time). By the end of the course, the students had attained varying levels of expertise. In all likelihood, the person who learned the most was the instructor; nothing provides motivation to figure something out like having committed oneself to talking about After it was over, another co-worker saw the sizable pile of handouts I had gen- erated and proposed that it would make a good book. He offered to contact a pub- lisher he had recently deaft with. I was at first skeptical that the informal notes I had hurriedly concocted would interest a reputable academic publisher, but after taking another look at the materials that had sprouted, and discussing the matter, we agreed that quite a few people would find them valuable. I've spent the last few months filling out and cleaning up the pile, and Presto, change-o. My "set of hand- outs" is "a book." There are a number of people who have, in one way or another, consciously or oth- erwise, helped create this book. Ken Church was instrumental in arranging my first experience using the lisp machine, and later was responsible for bringing me to Bell Labs. He also taught a course here, before I came, which laid some of the groundwork for my own course. Eva Ejerhed, in a rare act of faith, hired me to work on a lisp machine thousands of miles from the nearest expert assistance, without my having ever touched one. Joan Bachenko and Bill Gale first suggested I teach a course at the Labs. Many of my colleagues who served as experimental subjects by participating in one of the three trials of the course provided useful comments on the class handouts; among those whose contributions I particularly recall are Mark Liberman, Jeff Gelbard and Doug Stumberger. Ted Kowalski first broached the idea of making a book from the handouts, and also — with Sharon Murrel — supplied lots of assistance with the use of their Monk text formatting system. Wayne Wolf suggested improvements to my coverage of managing multi- ple processes. Jon Balgley, of Symbolics, Inc.,* wrote a helpful review of one Symbolics, Symbolics 3600, Symbolics 3640, Symbolics 3670, and Document Examiner are trade- marks of Symbolics, Inc. Zetalisp® is a registered trademark of Symbolics, Inc. PREFACE Xlll version of the manuscript. Valerie Barr introduced herself to the lisp machine by actually working through an entire draft, making a great many valuable observa- tions along the way. Mitch Marcus and Osamu Fujimura, my supervision at the Labs, were most understanding about the amount of time I put into this project. Carl Harris was an obliging and patient Publisher. Finally, Symbolics, Inc. gra- ciously allowed me to quote extensively from their copyrighted materials, and Sheryl Avruch of Symbolics made possible the distribution of a tape to accompany this book. I would like to hear about any problems readers have while working their way through the text. Please don't hesitate to mail me any of your comments or sugges- tions. Hank Bromley December, 1985 computer mail: US mail: hjb@mit-mc (arpa) AT&T Bell Laboratories, room 2D-410 alice 600 Mountain Avenue research } !sola!hjb (uucp) Murray Hill, NJ 07974 allegra LISP LORE: A GUIDE TO PROGRAMMING THE LISP MACHINE INTRODUCTION The full 1 1 -volume set of documentation that comes with a Symbolics lisp machine is understandably intimidating to the novice. "Where do I start?" is an oft-heard question, and one without a good answer. The eleven volumes provide an excellent reference medium, but are largely lacking in tutorial material suitable for a beginner. This book is intended to fill that gap. No claim is made for complete- ness of coverage — the eleven volumes fulfill that need. My goal is rather to present a readily grasped introduction to several representative areas of interest, including enough information to show how easy it is to build useful programs on the lisp machine. At the end of this course, the student should have a clear enough picture of what facilities exist on the machine to make effective use of the complete documentation, instead of being overwhelmed by it. The desire to cover a broad range of topics, coupled with the necessity of limiting the amount of text, caused many items to be mentioned or referred to with little or no explanation. It's always appropriate to look up in the full documentation any- thing that's confusing. The manuals are perfectly adequate reference materials, as long as you know what you want to look up. The point in this text is rarely to explain what some specific function does in isolation — that's what the manuals are good for. The focus here is on how to integrate the isolated pieces into real appli- cations, how to find your way around the landscape, how to use the multitudinous features described in such splendid detail in the 1 1 volumes. The manuals provide INTRODUCTION a wonderfully thorough, but static, view of what's in the lisp machine environment; I've tried to provide a dynamic view of what that environment looks like in action, or rather in interaction with a human. The book assumes some background in lisp; the reader is expected to have experi- ence with some dialect of the language. If you lack such experience, you may want to do a bit of preparatory study.* This course concentrates on those aspects of lisp machine lisp ("Zetalisp") which are not found in most dialects, and on the unique overall programming environment offered by the lisp machine.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    274 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us