📜 ⬆️ ⬇️

"Lisp in Small Pieces" in Russian

(Parentheses) - Elegant weapons, for a more civilized age This book by French professor Christian Kenneck about Lisp and Scheme interpreters is quite well known in the English-speaking world. Even a couple of times skipped on Habré. But in the Russian-speaking community, Scheme is most often associated with “Structure and Interpretation of Computer Programs” (aka SICP). This is a good tutorial for beginners, where as many as two chapters are devoted to the implementation of the language used, but it does not consider the implementation of quite interesting and important for Lisp things like macros, sequels, dynamic calculations.

Once “Lisp in Small Pieces” fell into my hands, and after a few dozen pages, I realized that it was not worth it to disappear into obscurity like a diamond. And since the best way to get more adepts in a sect to popularize a foreign book is to translate it into the native language of the target audience, this is what I did instead of reading normally. Finally, translation, layout and proofreading were completed; The results of the effort are presented to your attention.

Inside the reader expect:
In general, an excellent tutorial on the basics of the implementation of programming languages, which is not only familiar with lovers of brackets.
')
( tl; dr: PDF , EPUB , HTML )

For some reason (at least, I got the feeling) in various articles for newbies on the topic of writing your own implementations often focuses on “boring” things like syntax analysis, examining toy languages ​​and simplest optimizations instead of concentrating on the main thing: “ Developing programming languages ​​is a fun and creative thing. ” It is this idea that needs to be put into the head of an interested person, confirming his hopes, and not bothering him with a chore or breaking a dream with something like a well - known checklist . After all, if programming is interesting, then programming programming languages ​​is an interest in the square! If a software developer is a god for his programs, then a language developer is ... wow! One can take care of worldly affairs later.

Scheme is known for its ease of implementation. Even more, this language rightfully bears the title of the most intolerable programming language: more than a dozen popular (and mutually incompatible) implementations, even more kneaded handicrafts of varying degrees of readiness, and, probably, hundreds of student interpreters handed over annually. So if you implement Scheme on Scheme itself, then you can fully concentrate on the language development process itself, and not (prematurely) think about parsers, a suitable type system, a garbage collector and so on. This is the tutorial that teaches this, leaving low-level implementation details for those who are interested, and what should lie deeper.

By agreement with the author, the book is distributed under the terms of CC BY-ND 3.0 . The sources for the book (LaTeX and clumsy HTML) along with build instructions are on Github . From the same place from the releases you can download PDF and EPUB ( options for screens the size of a matchbox). In the browser, you can read a book here . Version on dead trees - in Wishlist.

Unfortunately, I can not vouch for the quality of the EPUB-version due to the lack of the necessary number of different devices for testing and the general wretchedness of the hardware support for the EPUB. Probably, on everything that does not have a full-fledged browser, the text will spread out, the proposed fonts will be ignored along with half the CSS and everything will look awful. Upon request, I can stamp PDFs for specific screen sizes and resolutions. (I will be glad to discuss in the comments on the topic of the most adequate format of electronic books for technical literature.)

Source: https://habr.com/ru/post/204442/


All Articles