
Common Lisp Tips - such_a_casual
http:&#x2F;&#x2F;lisptips.com<p>A collection of short, dense bits of code with a brief explanation of what the code does and why it&#x27;s cool. The site&#x27;s creator, Zach Beane is the man behind Quicklisp, the default package manager for any Common Lisper.<p>If you try to ask anyone what you should read to learn Common Lisp, the universal recommendation is &quot;Practical Common Lisp&quot;. However, the book is a lot more text than code and as such, I still haven&#x27;t got past chapter 10 (of about 30).<p>For other people like myself, that enjoy learning from chunks of code and looking stuff up in the official documentation, I highly recommend you give lisptips.com a shot. I&#x27;ve been thoroughly enjoying learning all of these cool things that I probably wouldn&#x27;t find by reading books or watching videos.<p>Here are some tips that I found cool:<p>1) http:&#x2F;&#x2F;lisptips.com&#x2F;post&#x2F;30978863226&#x2F;a-simple-repl<p>How to make a repl in a few lines of code. when you think about it, all a repl requires is 4 functions, READ, EVALUATE, PRINT, LOOP lol so I guess that may not seem very cool. But in the tip, it&#x27;s shown how to define functionality to use asterisks (*) to access previous forms.<p>2) http:&#x2F;&#x2F;lisptips.com&#x2F;post&#x2F;31516446212&#x2F;using-an-adjustable-displaced-array-as-a-cursor-on<p>Lisp has something called a  displaced-array which is basically an array of pointers that acts as a subset of a larger array. Since the displaced-array doesn&#x27;t actually have any values of its own, changing this subset (displaced-array) changes the larger array (called the target). The snippet shows how to use a displaced-array to act as a cursor to a stream. This snippet forced me to look up a lot of things in the official docs and play around a lot with the code to fully understand what was going on.<p>3) http:&#x2F;&#x2F;lisptips.com&#x2F;post&#x2F;31253190116&#x2F;binding-keyword-arguments<p>Create aliases for parameters.
======
daly
Also, I can highly recommend the book Common Lisp Recipes by Edi Weitz. I
literally laughed out loud in Section 9.7 "Recursive Processing of FORMAT
controls". The idea of combining FORMATTER, user-defined FORMAT controls, and
recursive formats makes me want to create a new language with only the FORMAT
command. It could rival APL for being write-only.

