Most active commenters
  • AnonC(5)

←back to thread

366 points nils-m-holm | 11 comments | | HN request time: 0.517s | source | bottom
1. AnonC ◴[] No.45071926[source]
Under “The Intended Audience” (page 10 of the PDF sample on the site), it says that this is not an introduction to LISP and that it would be more enjoyable with some prerequisites.

Where does one — who has no knowledge of these prerequisites or about LISP (except that the latter has been heard in programming circles as something esoteric, extremely powerful, etc.) — start, before reading this book?

replies(5): >>45071961 #>>45073156 #>>45073538 #>>45073643 #>>45074942 #
2. chrsw ◴[] No.45071961[source]
There's ANSI Common Lisp by Paul Graham. I've never read it and I'm not sure it's the best introduction but thumbing through it I don't see how you can get any more basic than that.
replies(1): >>45074906 #
3. m-a-t-t-i ◴[] No.45073156[source]
If you prefer hands-on learning, How to Design Programs is pretty good resource for the foundations, with lots of examples and exercises: https://htdp.org

But learning the basics of lisp is more like a side effect, the focus is on program design.

replies(2): >>45074910 #>>45076068 #
4. Jach ◴[] No.45073538[source]
One source of awe people have with the idea of Lisp is how much you can build off of so little. I like pg's Roots of Lisp paper on that https://justine.lol/sectorlisp/jmc.pdf The core thing was the meta-circular evaluator (eval) in the original Lisp paper. You can work through it or try re-implementing it in something else. I like this recent tiny version https://justine.lol/sectorlisp2/

Another source of awe is about Lisp being more of a programming system than a language, and Common Lisp was the standardization of a lot of efforts towards that by companies making large and industrial pieces of software like operating systems, word processors, and 3D graphics editors. At the language level, "compile", "compile-file", "disassemble", "trace", "break", "step" are all functions or macros available at runtime. When errors happen, if there's not an explicit handler for it (like an exception handler) then the default behavior isn't to crash but to trigger the built-in debugger. And the stack isn't unwound yet, you can inspect the local variables at every layer. (There's very good introspection in general for everything.) Various restarts will be offered at different parts of the stack -- for example, a value was unknown, so enter it now and continue. Or you can recompile your erroneous function and restart execution at one of the stack frames with the original arguments to try again. Or you can apt-get install some foreign dependency and try reloading it without having to redo any of the effort the program had already made along the way.

Again, all part of the language at runtime, not a suite of separate tools. Implementations may offer things beyond this too, like SBCL's code coverage or profiling features. All the features of the language are designed with this interactivity and redefinability in mind though -- if you redefine a class definition, existing objects will be updated, but you can control that more finely if you need to by first making a new update-instance-for-redefined-class method. (Methods aren't owned by classes, unlike other OOP languages, which I think eliminates a lot of the OOP design problems associated with those other languages.)

I like the book Successful Lisp as a tour of Common Lisp, it's got a suggested reading order in ch 2 for different skill levels: https://dept-info.labri.fr/~strandh/Teaching/MTP/Common/Davi... It's dated in parts as far as tooling goes but if you're mostly interested in reading about some bits rather than actively getting into programming with Lisp that's not so bad. If you do want to get into it, https://lispcookbook.github.io/cl-cookbook/ has some resources on getting started with a Lisp implementation and text editor (doesn't have to be emacs).

replies(1): >>45074902 #
5. epr ◴[] No.45073643[source]
When I was a beginner, A Gentle Introduction to Symbolic Computation worked for me. As the title suggests, it gently introduces concepts in a very beginner friendly manner, so even macros are easy enough to grasp by the time you get there. The diagrams and examples are great.

https://www.cs.cmu.edu/~dst/LispBook/book.pdf

replies(1): >>45074915 #
6. AnonC ◴[] No.45074902[source]
Thank you very much for an elaborate reply. I really appreciate it. I’ll check out the books and links from your comment.
7. AnonC ◴[] No.45074906[source]
Thanks for the recommendation. I appreciate it. I’ve heard about this book before, but never read it.
8. AnonC ◴[] No.45074910[source]
Thanks a lot. I’ve heard about this too, but didn’t spend time to follow through on reading it.
9. AnonC ◴[] No.45074915[source]
Thanks for the recommendation. I appreciate it. I’ll definitely check this out.
10. leoc ◴[] No.45074942[source]
If you're already fairly comfortable with computer programming, The Little Schemer would be almost perfect for this. https://mitpress.mit.edu/9780262560993/the-little-schemer/ It would be well worth reading some of the sequel The Seasoned Schemer https://mitpress.mit.edu/9780262561006/the-seasoned-schemer/ too. In theory TLS should be accessible to anyone, but I've seen a couple of non-programmers bounce off it pretty hard. In those cases HtDP (as mentioned by m-a-t-t-i https://news.ycombinator.com/item?id=45073156 ) should hopefully be slow enough to be accessible.
11. leoc ◴[] No.45076068[source]
HtDP users would probably also be interested in looking into some of the old courses based on it. List courtesy of charlysl: https://news.ycombinator.com/item?id=18891945 .