## Lisp Study Group - 09/19/20 -- ### Prelude * What makes Lisp special * What makes SICP special -- ### Topics * 3 lessons from Chapter 1 * Discussion & Code Review --- ### Caveats -- From [Your language sucks, it doesn't matter][yls]: > Languages generally become popular when they bring an innovative runtime, > or when they have runtime exclusivity. The quality of the language itself is secondary. [yls]: https://matklad.github.io//2020/09/13/your-language-sucks.html -- Basically, languages are interesting because they're the only way to reach a platform (think Swift -> iOS, Javascript -> Browser, VimL/Emacs Lisp -> editor), or they have unique runtime characteristics (say, Garbage Collected but with certain safety and performance guarantees in Java's case). -- > A language that doesn't affect the way you think about programming, is not > worth knowing. - Alan Perlis Practically, there is no "best language" and that whole argument doesn't matter. That doesn't mean it isn't valuable to learn many ways to approach programming. **Don't be dogmatic.** --- ### What makes Lisp special? -- In terms of a killer feature other languages lack? Macros. -- As a language overall? A rare combination of powerful dynamic features and speed. -- As a platform? A different history and technical culture to learn from. Everyone should learn at least one "fringe" language :) --- ### What makes SICP special? -- Very few software books are still worth reading 30+ years after they were written. -- It is celebrated by many but [also][hillel] [divisive][why-the-split]. -- It's more interested in helping you think about computation than making you a programmer. -- It's not for everyone and the lessons you would pick up from writing lots of lisp code are likely quite different than what you would from reading SICP. It doesn't fit most learners needs or goals and, IMO, for it to be successful managing both the pacing and the exercises is _crucial_. Have to be the right ones, not too many, not too few, an ideal level of strain. [hillel]: https://twitter.com/hillelogram/status/1292141140876156928 [why-the-split]: https://www.amazon.com/review/R403HR4VL71K8 --- ### 3 Lessons from Chapter 1 1. With a simple set of rules, a tractable mental model of evaluation emerges. * Atomic values just "are themselves". * Expressions simplify arguments first, then evaluate 'call position', then the simplified form. * You can now understand what a computer does as simply as substituting a value for X in algebra class. -- 2. A rough feel for algorithmic growth. * The visual use of trees for subexpressions of a problem is huge. * Iteration vs Recursion means one thing on a "syntax" level and something else re: difference between a procedure and a process. * Recursive doesn't mean it has to be wasteful of memory... -- 3. What it means for a value or abstraction to be "first-class". * Named by variables * Passed as an argument * Returned from a function or method * Included in data structures * Note: Literal syntax is not on this list. --- ### Discussion and Code Review # Show me the code