--------LET OVER LAMBDA PRESS RELEASE--------- Announcing _Let_Over_Lambda_ by Doug Hoyte: http://letoverlambda.com If you are looking for a dry coding manual that re-hashes common-sense techniques in whatever langue du jour, this book is not for you. This book is about pushing the boundaries of what we know about programming. While this book teaches useful macro skills that can help solve your programming problems today and now, it has also been designed to be entertaining and inspiring. If you have ever wondered what lisp or even programming itself is really about, this is the book you have been looking for. Chapter 1 "Introduction": A short introduction and a section outlining the "U-Language" (conventions and terminology). Chapter 2: "Closures": Unlike the later chapters, this one contains no original research. Instead, it is a from-the-ground-up description of scope, extent, and closures. It is designed to fill any gaps in your knowledge about these constructs. This chapter describes everything you need to effectively use closures in Common Lisp: How to reason about them, similarities and differences between them and object systems, how efficient they are, how they interact with dynamic scope, etc. This chapter introduces a terminology for closures I am so fond of I named the book after: "Let Over Lambda". Chapter 3: "Macro Basics": This chapter starts with a few simple but interesting problems and shows natural metaprogramming techniques for solving them. Macro programming slang can be difficult for the un-initiated to follow but after reading this chapter you will understand what is meant by "iterative development", "domain specific language", "control structure", "free variable", and "variable capture". This chapter introduces an original notation for creating macros with gensyms: gensyms are indicated with special-case symbol print-names. The classic lisp macro once-only is defined as a macro combination using our new gensym macro. Chapter 4: "Read Macros": Read macros are a difficult subject to explain because most of the best ones are already included with lisp and are no longer thought of as read macros but rather integral parts of the language. Nevertheless, this chapter introduces a few read macros that can make a big difference for certain lisp programs. Different options for reading strings (ones where you don't need to "escape" characters) are implemented. A syntax for CL-PPCRE regular expressions that makes them just as convenient as in perl is developed. Backquote and cyclic expressions are also explained in depth. The final section describes best practices for processing untrusted user input with Common Lisp. Chapter 5: "Programs That Program": In a functional language if it looks like a function call it is enforced by the syntax of the language to be a function call. But lisp macros are the exact opposite of that. This chapter shows how to construct and reason about complex systems of lisp macros. By using a "top-down" programming style, you can program however you feel like and then later bend the language into compiling/interpreting those programs. This is one of my favourite chapters because it shows that the implication of lisp macros is that in lisp, nothing is impossible. A macro is created that makes all "cxr" combinations available: (with-all-cxrs #'caadadadddaaaddddadadar). This chapter also explains macrolet and recursive macros. Chapter 6: "Anaphoric Macros": This chapter is about anaphoric macros as described in On Lisp. Such macros invisibly capture variable references. Especially when combined with macros that invisibly inject variable references, the anaphoric macro is a topic so unexplored that I think entire original books are yet be written about it. This chapter focuses on one such application: Re-wiring lexical scope. Macros let you swap lambda forms at run-time while preserving their closed over bindings or even eval forms without throwing out your lexical environment: (let ((x 1)) (eval '(incf x))) (let ((x 1)) (pandoric-eval (x) '(incf x))) ... only one will do what is intended. This chapter also includes a section on finite state machines and one that defines a type of scoping that we have been using since chapter three called sub-lexical scope. Symbol macros and their important relationships with generalised variables are explained. Chapter 7: "Macro Efficiency Topics": We usually don't care about performance but when we do there is no better language for experimenting with or actually implementing efficient programs than lisp. If you know C or other low level languages, this chapter will tell you everything you need to know in order to transfer this knowledge to Common Lisp's machine code compilers. There is a section "Getting To Know Your Disassembler" that deciphers many common compiler notes and points out useful things to look for in compiled lisp code. Macros are used to simulate C pointers in two ways: a safe closure-based layer of syntax, and coaxing the lisp compiler into creating unsafe machine instructions. A simple heap overflow is demonstrated. Efficient memory management with macros is described. Because there are few good descriptions elsewhere, compiler macros are explored in depth: what they are, how they are different from regular macros, how to use them. Batcher and Knuth's Algorithm 5.2.2M "merge-exchange sort" is found to be useful as the basis for a re-implementation of Paul Graham's sortf macro from On Lisp. Decimal order of magnitude performance improvements over our Common Lisp implementation's #'sort function are observed. There is a brief discussion of sorting network theory and fast median calculations. The chapter ends reminding you to take all benchmark results with a large grain of salt. Chapter 8: "Lisp Moving Forth Moving Lisp": One of my favourite languages (after lisp of course) is Chuck Moore's forth. This chapter is my attempt at explaining forth to a lisp audience. Although stacks may be the most apparent feature of forth, forth is about stacks no more than lisp is about lists. It is actually "threading" (a way of assembling programs into memory) that makes forth what it is. Just as the easiest way to write certain programs in non-lisp languages is to first write a lisp interpreter in that language, the same is true for forth. This chapter develops a forth compiler in lisp and along the way defines the central theme of the book--duality of syntax. After forth has been bootstrapped, we use forth immediate words (like lisp macros) to write lisp programs. The conclusion is that forth is great for the same reason that lisp is great: it is a high local maximum in the space of meta-programming languages. There are also four appendices of highly opinionated flame-bait for your (dis-)enjoyment. The above is only a summary of some of the topics discussed in Let Over Lambda. I have tried to aggregate a large amount of lisp knowledge so a short summary cannot do the full content justice. Read the first three chapters free online: http://letoverlambda.com Or purchase a full copy from lulu.com: http://stores.lulu.com/letoverlambda Thanks for your interest, Doug Hoyte President, CEO, Chief Lisp Officer Lambda Press Department, HCSW --------LET OVER LAMBDA PRESS RELEASE---------