Skip to content
HomeVideosBooks
AllTopicsTrends
BlogsPodcasts
HistoryListsWatch laterLiked videosFollowing

The videos, books, blogs and podcasts Hacker News keeps recommending, all in one place.

VideosBooksBlogsPodcastsAboutPrivacySettings

Data from Hacker News, HackerTube, HackerBooks, HackerBlogs and Open Library. Credits · Not affiliated with Y Combinator.

HomeVideosBooksBlogsPodcasts
Ctrl K
    Cover of Common Lisp Recipes

    Common Lisp Recipes

    Edmund Weitz · 2015

    Find solutions to problems and answers to questions you are likely to encounter when writing real-world applications in Common Lisp. This book covers areas as diverse as web programming, databases, graphical user interfaces, integration with other programming languages, multi-threading, and mobile devices as well as debugging techniques and optimization, to name just a few. Written by an author who has used Common Lisp in many successful commercial projects over more than a decade, Common Lisp Recipes is also the first Common Lisp book to tackle such advanced topics as environment access, logical pathnames, Gray streams, delivery of executables, pretty printing, setf expansions, or changing the syntax of Common Lisp. The book is organized around specific problems or questions each followed by ready-to-use example solutions and clear explanations of the concepts involved, plus pointers to alternatives and more information. Each recipe can be read independently of the others and thus the book will earn a special place on your bookshelf as a reference work you always want to have within reach. Common Lisp Recipes is aimed at programmers who are already familiar with Common Lisp to a certain extent but do not yet have the experience you typically only get from years of hacking in a specific computer language. It is written in a style that mixes hands-on no-frills pragmatism with precise information and prudent mentorship.

    Lisp & Functional
    Open LibraryAmazon
    Stats for nerds
    20recommend
    38mentions
    26people
    2015–2024years
    82% recommend18% neutral

    Mentions per year

    2015201620172018201920202021202220232024

    What Hacker News says

    1. lispmJun 2024
      > Many thanks for taking the time to show those features off, it's very kind of you and I genuinely appreciate it.

      :-)

      > was also quite impressed with SBCL for catching function calls passing unknown keys at compile time, before the call is invoked.

      Generally CL compilers tend to check argument lists at compile time. Number of args, correct keyword arguments, ...

      SBCL is especially good, due to its further support of declarations as assertions and its support for various compile time checks. You'll also get Lisp backtraces in a natively compiled Lisp then as a bonus. Also for newcomers it is quite helpful, because SBCL gives a lot of warnings and other feedback for various possible problems (from undeclared identifiers, unused variables up to missing optimization opportunities).

      > Perhaps the fact that many Lisp guides feel compelled to start with a terse implementation of lambda calculus might actually be somewhat of a disservice, in hiding the more practical side of the language?

      That's true. Lisp was often used in education as a vehicle to learn things like lambda calculus (or similar). Practical programming or "software engineering" with Lisp wasn't part of those courses.

      There are books which cover those topics, too. Like "Practical Common Lisp" by Peter Seibel, "Paradigms of AI Programming" from Peter Norvig or "Common Lisp Recipes" by Edi Weitz.

      For SBCL one definitely needs to read the manual to get an idea about its extended features.

      thread
    2. jnxxApr 2024
      In respect to Common Lisp, you could look into "Common Lisp Recipes" by Weitz[2], and "Practical Common Lisp" by Seibel[1]. These are industrial-strength systems which were used to built large airline reservation systems.

      Scheme is in a way more minimalist and Schemes are not as large, but this might also be give an erroneous impression because they build on the enormous experience with Common Lisp and have boiled down to the most essential parts - it is not the kind of minimalism "the simplest things that could work" but "what turned out to be indispensable in practice", which is a very different thing.

      [1] https://gigamonkeys.com/book/

      [2] https://weitz.de/cl-recipes/ or https://www.amazon.com/Common-Lisp-Recipes-Problem-Solution-...

      thread
    3. JtsummersNov 2021
      For Common Lisp: Practical Common Lisp is a good introductory text. ANSI Common Lisp is older, but still relevant (the standard is from 1994, it hasn't changed, though the community and tooling has the language is stable). On Lisp and Let over Lambda are good follow-on texts if you want to learn about macros, in particular. Common Lisp Recipes is another good one for after PCL.

      For Emacs Lisp: I just looked at the info pages for emacs. There are some books, never touched them so can't comment. But if you know CL, Emacs Lisp is not a stretch to learn as it's about 90% the same (especially since they made some changes in the past decade or so to better support lexical scope by default).

      For Scheme: Check out The Little Schemer and the rest of that book series. Unique presentation style, but very approachable if you get past it (some people don't, I liked them).

      thread
    4. Abhinav2000Aug 2021
      I think this is a very valid viewpoint. Typically its better not to learn / use macros until one is sufficiently advanced, functions will do for 99.5% of the circumstances, to call a famous author ;-)

      You should try it out. The book Common Lisp Recipes by Edi Weitz is really good and practical - you can get web servers up and running in minutes, and has many other practical uses (I have to check the contents again, but its about 750 pages long and covers stuff like interfacing with C and Java), highly recommended if you want to get productive in Lisp!

      thread
    5. jnxxJan 2021
      It is a very multi-dimensional issue. While all these languages belong to the same family, they also take some time to learn, and each has its specific strengths. It is probably very helpful to think about what matters most to you, and pick what matches your needs best for the first language.

      Here some axes of distinction:

      1. supported programming styles

      2. support for concurrency

      3. performance of generated code and parallelism

      4. floating-point performance

      5. level of standardization

      6. closeness to the system and capability to call into C functions, or functions with C ABI

      7. suitability for scripting and stand-alone programs

      8. GUI programming

      9. Comprehensiveness and beginner-friendliness of documentation

      10. REPL Programming

      11. Libraries

      12. Licenses

      Here what I know about the languages you name:

      (I also mention ABCL = Armed Bear Common Lisp a few times, just to illustrate that you also can run Common Lisp on the Java Platform).

      1. supported paradigms - Clojure is very opiniated in supporting and demanding a purely functional style. It uses purely functional data structures. Racket and Scheme support a functional style well, but allow for seamless imperative code. Common Lisp is agnostic, one can program in a purely functional way and there are libraries with purely functional data structures, but it requires much more discipline.

      2. Clojure has best support for concurrency and server-like tasks, it is made for that. Racket also supports green threads, apart from its places parallelism.

      3. Racket, Chez, Common Lisp and so on support OS level threads and parallelism. Chez and Common Lisp stand out as they generate the most performant code - when it comes to raw computing power, single-threaded SBCL code will be faster than multi-threaded Clojure code. SBCL, for example, also allows to add compiler hints which generate unsafe code with better optimizations (for example, indicating that integer values will only be in a specific range).

      4. SBCL has by far the best floating-point performance, I think Chez comes after that, and I'd expect Racket to improve further here. Racket has also been reviewed very favourably for scientific applications (https://khinsen.wordpress.com/2014/05/10/exploring-racket/ - Konrad Hinsen, the author, was an early contributor to Numerical Python).

      5. Of all these, Common Lisp is standardized most. Especially Racket and Clojure are defined by their implementation.

      6. Clojure and ABCL allow to call into Java. In turn, all of Common Lisp, Guile, Racket, Chez allow to call easily into C. There is a performance difference, I think, between most Schemes and SBCL: Calling into a C function has some extra cost because the stack is handled differently (I think it is because of continuations). I also tried to call into Rust functions from Racket and that works very nicely.

      7. Clojure's startup time is simply too slow for scripting. It is also a bit hampered in that it runs on the JVM. There is babashka, which is interesting but has no mature status. Conversely, Common Lisp and Racket are well suited to scripting. It is also possible to compile SBCL and Racket programs into a single executable. I think SBCL supports this case best, for running Racket programs, an extra runtime library or a standard Racket installation is needed. Guile is also well-suited to scripting and is closer to the OS than some other Lisps.

      8. Racket has a very nice support for GUI programming with a platform-independent functional API. Clojure and ABCL also allow to call into Swing and Fx code written in Java. I have not tried the rest but it looks relatively painful and brittle in comparison.

      9. Racket has very comprehensive and high-quality documentation good for beginners. Clojure is also comprehensively documented, but might assume a bit more experience. Common Lisp is, as an open system, more eclectic, and this might lead especially beginners to underestimate how mature and good it is. It is very under-hyped compared to Clojure. But there is the Common Lisp Cookbook on the web, which is really good. I can also warmly recommend the books "Practical Common Lisp" by Peter Seibel, and "Common Lisp Recipes" by (corrected!) Edmund Weitz. If you want to have true understanding, and are about to write industry-grade robust software, they are really worth every cent.

      10. REPL Programming: Lisps and Schemes such as Racket have a subtle difference which affects the style of programming. In Lisp, everything is dynamic and you can re-load and evaluate parts of the program when it is running. This makes for a great development environment. In contrast to that, Racket for example has a clear distinction between compilation time and run time, which gives certain safety and correctness guarantees, but requires that the program is re-loaded more often during development.

      11. Libraries: Racket has a distinct "Batteries included" feeling which makes it nice for beginners. Clojure uses Leiningen which runs on top of Maven to automatically retrieve libraries, it works very well. Racket has a similar system. Common Lisp is more eclectic again, what is used today is quicklisp and asdf (see the Common Lisp Cookbook). There is also a reasonable support in OS Packages e.g. in Debian, and in addition GNU Guix is a very interesting solution for packaging of Lisp libraries and in polyglot projects.

      12. Licenses: Clojure has a non-copyleft license (Eclipse License) which might be an obstacle if you want to publish copyleft libraries and code (not sure about the exact limits here but the problem is that in a Lisp system, there is less clear of a boundary of system or language code and your own code, so it is probably advisable to use a language with compatible license if you want to publish copyleft code). Racket is Apache 2 which is GPL compatible. Guile is, as part of the GNU system, GNU LGPL.

      In summary, I think Racket is great for beginners, although you could start with all of them. Clojure is fantastic for servers and to learn about functional programming. Guile and Racket are great for scripting. Common Lisp, and especially SBCL requires a bit more learning effort at the beginning, but it is a really mature and highly performant system which gives you a lot of freedom.

      thread
    6. linguaeDec 2020
      I am finishing up teaching an undergraduate-level course on programming language principles and paradigms.

      Here is what I recommend:

      1. Study Scheme for an introduction to programming in a Lisp-like language. I used Structure and Interpretation of Computer Programs as one of my course textbooks (I also assigned my students separate textbooks for the Prolog and Smalltalk portions of the class). My favorite part of this book is its discussion of the metacircular interpreter (i.e., a Scheme interpreter written in Scheme), which is key to understanding how a Lisp works internally.

      2. Read the Lisp 1.5 Programmer's Manual. While this Lisp has long been succeeded by more modern Lisps, it is a very nicely designed manual that discusses the implementation of Lisp. It also has a short metacircular interpreter on page 13 that profoundly inspired Alan Kay and many other luminaries of computer science.

      3. Begin learning Common Lisp. Common Lisp is much more complex than Scheme is; Common Lisp is to Scheme as C++ is to C. I started getting serious about learning Common Lisp earlier this year, and I am currently working through the Advent of Code exercises in Common Lisp. My favorite intro book is Common Lisp: A Gentle Introduction to Symbolic Computing. I also own a copy of Common Lisp Recipes, which has been valuable for learning Common Lisp idioms; part of the challenge of learning a large language is figuring out what are the most idiomatically correct ways of doing things.

      4. Read The Art of the Metaobject Protocol. I have a copy of the book, but I haven't gone through it yet. My goal is to work through this book to have a full understanding of the Common Lisp Object System.

      thread

    Related

    Cover of Practical Common Lisp
    2007–2026

    Practical Common Lisp

    Peter Seibel
    218 recommend · 400
    Cover of On LISP
    2007–2026

    On LISP

    Paul Graham
    192 recommend · 533
    Cover of The art of the metaobject protocol
    2010–2026

    The art of the metaobject protocol

    Gregor Kiczales
    38 recommend · 92
    Cover of ANSI Common Lisp
    2007–2025

    ANSI Common Lisp

    Paul Graham
    67 recommend · 177
    Cover of Lisp in Small Pieces
    2007–2026

    Lisp in Small Pieces

    Christian Queinnec
    101 recommend · 246
    Cover of Let  Over Lambda
    2008–2026

    Let Over Lambda

    Doug Hoyte
    66 recommend · 127
    Cover of Successful Lisp
    2007–2025

    Successful Lisp

    David B. Lamkins
    9 recommend · 12
    Cover of Land of Lisp
    2009–2026

    Land of Lisp

    Conrad Barski
    124 recommend · 256