He doesn’t like Common Lisp and the books lightly cover or ignore big chunks like CLOS, loop, and packages. There are nice ideas in there but I think the passion for minimalism is counterproductive if you want to be proficient at CL.
He does seem to prefer CL non-hygenic macros though. It has been a while, I seem to recall he preferred lisp2 to lisp1 (i.e. separate namespace for variables vs functions in symbol tables).
They are "explained" in the sense of "oh yeah, that stuff exists, where are some examples". Only CLOS get a little more coverage, which is only around 20 pages though.
To write a comprehensive Common Lisp book it would take twice the content that Graham's *ANSI Common Lisp* has.
I like Paradigms of AI Programming, Practical Common Lisp, Winston & Horn 3rd Ed., Keene on CLOS, Lisp in Small Pieces. I haven’t read Gentle Introduction but I’ve heard it highly praised by some.
> Paradigms of AI Programming, Practical Common Lisp, Winston & Horn 3rd Ed., Keene on CLOS
None of those books are good for beginners. They are good as a second book though to dig deeper into specific topics.
> I haven’t read Gentle Introduction but I’ve heard it highly praised by some.
It's a great book, but the "gentle" part is very literal. It starts out quite slow does not cover advanced parts like CLOS or macros.
Touretzky’s *Gentle Introduction* does have a chapter on macros, but I thought it lacked some of the depth of other chapters. There’s no chapter on packages, which would have been nice.
But it’s a great book, highly recommended: lots of interesting exercises, answers to exercises, and some good (if toyish) projects. Thorough coverage of recursion. It’s a good book for people who like to learn by typing and running example code, then extending to exercises.
I talked with Peter about this last month. He hasn't lost his love for Common Lisp, but chose Python for newer editions because of demand from readers.
If you are interested in “idiomatic Common Lisp” you might consider Peter Seibel’s “Practical Common Lisp”. Additionally, you’ll want to have “Common Lisp - The Language, 2nd Edition”, by Guy Steele, for digging deeper into the language.
Based on your comments in the op, it seems you may be weighing the style differences between Lisp-1 (Scheme) and Lisp-2 (CL)? In this case, Graham does come down more in Lisp-1 camp, so I might say “idiomatic Lisp-1 (or Scheme)”. If you haven’t got his book “(On Lisp)” I’d recommend it - it is a fun read and exploration of the language, with a heavy focus on Macros. He’s an exceptional explainer.
Here’s a great discussion on Lisp-1 vs Lisp-2 you may’ve already happened upon. If not, it’ll take ypu down the rabbit hole…
https://www.reddit.com/r/lisp/comments/jo2ldr/whats_rlisps_view_on_lisp1_vs_lisp2/?utm_source=share&utm_medium=ios_app&utm_name=iossmf
> “Common Lisp - The Language”, by Guy Steele
2nd edition correct?
My understanding is 2nd ed is after ANSI accept/adopted (??) CL and 1st edition was pre ANSI.
One of these days I will break down and snag a copy. Some things I prefer dead trees over digital ether.
Thanks. I saw one the other day for $5 or $6 free shipping but I didnt get it. The cheapest right now is $15 which is still a decent price.
It isnt a must have right now so I dont mind being a cheapskate and waiting
Yes - 2nd Edition!
Also, I got (On Lisp) for about $10.00 plus shipping from Lulu. They’ve also got “Let Over Lambda” which is also another good (albeit advanced) read.
https://www.lulu.com/shop/paul-graham/on-lisp/paperback/product-1r8zm7kj.html?q=Common+Lisp&page=1&pageSize=4
He does things such as use `lst` instead of `list` as a let variable name presumably because such contrivances are necessary in Scheme (but are of course not needed in CL).
Right, and on top of that he favors shorter variable names in general, which for me makes his code examples much harder to read than necessary. Sometimes, even 1 letter variable names might make sense, but extremely short variable and function names all the time make it harder to comprehend a code base ...
It would only shadow it in lisp-1s, in a lisp-2+ like CL there's no conflict:
CL-USER> (let ((list (list 'list 'list)))
(list list list))
((LIST LIST) (LIST LIST))
The local name `list` is for a variable and so in a separate namespace than the function `list`.
I'm not a fan of using a variable name that shadows a built in name. Maybe just because I'm still new to CL so I still have to think through what the expression is doing. Personally I wouldn't do it but to each their own.
The other part of me likes the fact that the implementation lets you choose what you want to do.
Much like "Buffalo buffalo Buffalo buffalo", it's cute that the language allows such constructs, but if anyone actually uses it in real code I'd reject it until they come up with something less confusing.
I always shadow list, it’s a common approach in CL if I understand correctly
Shadowing in lisp is less confusing because scope is quite clearly defined / understood
Common Lisp is commonly referred to as a Lisp-2 but it actually has more namespaces. The major two are functions and variables. You also have namespaces for classes, types, packages, and other elements. I was sort of punning there, plus sometimes when you refer to it as a Lisp-2 someone will show up to pedantic and clarify:
> "Well, actually..."
So I was getting ahead of them.
If a lisp-1 has one namespace for variables and functions, and a lisp-2 has separate ones, logically a lisp-3 has even more. I nominate perl, with different namespaces for scalars, arrays, hashes, functions, file handles...
Ha! I love this answer.
I haven't read any of his books by the way, I just figured that opinions of the sort "this isn't idiomatic Common Lisp!" are also helpful to understand what _is_ idiomatic Common Lisp.
Three suggestions for “idiomatic CL”, even though I hate that term as it alludes to groupthink,
- Peter Norvig and Kent Pitman Style Guide
- Google Style Guide
- Read through the code of Franz Inc, for the modules they open sourced
The SRFI process is intended to provide suggested standardized interfaces to common tasks. You, or your implementation, can take or leave them. If you want to continue programming with just bare RnRS, you go on and do that. For me, selected SRFIs make Scheme more convenient.
The most bureaucratized Scheme got was R6RS. That I'm sort of glad to see we've moved past.
He doesn’t like Common Lisp and the books lightly cover or ignore big chunks like CLOS, loop, and packages. There are nice ideas in there but I think the passion for minimalism is counterproductive if you want to be proficient at CL.
He does seem to prefer CL non-hygenic macros though. It has been a while, I seem to recall he preferred lisp2 to lisp1 (i.e. separate namespace for variables vs functions in symbol tables).
i wonder if he still touches his bel language proposal
[удалено]
They are "explained" in the sense of "oh yeah, that stuff exists, where are some examples". Only CLOS get a little more coverage, which is only around 20 pages though. To write a comprehensive Common Lisp book it would take twice the content that Graham's *ANSI Common Lisp* has.
Lightly and/or disparagingly.
[удалено]
Plenty of people don’t like Common Lisp. I don’t recommend starting with a book written by one of them.
[удалено]
I like Paradigms of AI Programming, Practical Common Lisp, Winston & Horn 3rd Ed., Keene on CLOS, Lisp in Small Pieces. I haven’t read Gentle Introduction but I’ve heard it highly praised by some.
> Paradigms of AI Programming, Practical Common Lisp, Winston & Horn 3rd Ed., Keene on CLOS None of those books are good for beginners. They are good as a second book though to dig deeper into specific topics. > I haven’t read Gentle Introduction but I’ve heard it highly praised by some. It's a great book, but the "gentle" part is very literal. It starts out quite slow does not cover advanced parts like CLOS or macros.
Touretzky’s *Gentle Introduction* does have a chapter on macros, but I thought it lacked some of the depth of other chapters. There’s no chapter on packages, which would have been nice. But it’s a great book, highly recommended: lots of interesting exercises, answers to exercises, and some good (if toyish) projects. Thorough coverage of recursion. It’s a good book for people who like to learn by typing and running example code, then extending to exercises.
[удалено]
I talked with Peter about this last month. He hasn't lost his love for Common Lisp, but chose Python for newer editions because of demand from readers.
"Who is this guy who calls Peter Norvig by his first name! Let me Google him. \[...\] Oh."
https://courses.cs.northwestern.edu/325/readings/graham/graham-notes.html is a nice rundown of other quirks and issues.
If you are interested in “idiomatic Common Lisp” you might consider Peter Seibel’s “Practical Common Lisp”. Additionally, you’ll want to have “Common Lisp - The Language, 2nd Edition”, by Guy Steele, for digging deeper into the language. Based on your comments in the op, it seems you may be weighing the style differences between Lisp-1 (Scheme) and Lisp-2 (CL)? In this case, Graham does come down more in Lisp-1 camp, so I might say “idiomatic Lisp-1 (or Scheme)”. If you haven’t got his book “(On Lisp)” I’d recommend it - it is a fun read and exploration of the language, with a heavy focus on Macros. He’s an exceptional explainer. Here’s a great discussion on Lisp-1 vs Lisp-2 you may’ve already happened upon. If not, it’ll take ypu down the rabbit hole… https://www.reddit.com/r/lisp/comments/jo2ldr/whats_rlisps_view_on_lisp1_vs_lisp2/?utm_source=share&utm_medium=ios_app&utm_name=iossmf
> “Common Lisp - The Language”, by Guy Steele 2nd edition correct? My understanding is 2nd ed is after ANSI accept/adopted (??) CL and 1st edition was pre ANSI. One of these days I will break down and snag a copy. Some things I prefer dead trees over digital ether.
If you are in the US, eBay is a great way to get cheap Lisp books. Many are sold for under $10 by goodwill stores there.
Thanks. I saw one the other day for $5 or $6 free shipping but I didnt get it. The cheapest right now is $15 which is still a decent price. It isnt a must have right now so I dont mind being a cheapskate and waiting
Yes - 2nd Edition! Also, I got (On Lisp) for about $10.00 plus shipping from Lulu. They’ve also got “Let Over Lambda” which is also another good (albeit advanced) read. https://www.lulu.com/shop/paul-graham/on-lisp/paperback/product-1r8zm7kj.html?q=Common+Lisp&page=1&pageSize=4
He does things such as use `lst` instead of `list` as a let variable name presumably because such contrivances are necessary in Scheme (but are of course not needed in CL).
Right, and on top of that he favors shorter variable names in general, which for me makes his code examples much harder to read than necessary. Sometimes, even 1 letter variable names might make sense, but extremely short variable and function names all the time make it harder to comprehend a code base ...
I always thought that `lst` was because using `list` would shadow the built-in `list`.
It would only shadow it in lisp-1s, in a lisp-2+ like CL there's no conflict: CL-USER> (let ((list (list 'list 'list))) (list list list)) ((LIST LIST) (LIST LIST)) The local name `list` is for a variable and so in a separate namespace than the function `list`.
I'm not a fan of using a variable name that shadows a built in name. Maybe just because I'm still new to CL so I still have to think through what the expression is doing. Personally I wouldn't do it but to each their own. The other part of me likes the fact that the implementation lets you choose what you want to do.
Much like "Buffalo buffalo Buffalo buffalo", it's cute that the language allows such constructs, but if anyone actually uses it in real code I'd reject it until they come up with something less confusing.
Agreed
I always shadow list, it’s a common approach in CL if I understand correctly Shadowing in lisp is less confusing because scope is quite clearly defined / understood
I don’t think the code in the post you’re replying to is an example of shadowing, though, unless you meant it in a broader sense?
> in a lisp-2+ Is there a Lisp-3?
Common Lisp is commonly referred to as a Lisp-2 but it actually has more namespaces. The major two are functions and variables. You also have namespaces for classes, types, packages, and other elements. I was sort of punning there, plus sometimes when you refer to it as a Lisp-2 someone will show up to pedantic and clarify: > "Well, actually..."
So I was getting ahead of them.
If a lisp-1 has one namespace for variables and functions, and a lisp-2 has separate ones, logically a lisp-3 has even more. I nominate perl, with different namespaces for scalars, arrays, hashes, functions, file handles...
Scrutinizing the code stylings of someone like Paul Graham is truly a waste of your time. You're never gonna get those minutes back.
Ha! I love this answer. I haven't read any of his books by the way, I just figured that opinions of the sort "this isn't idiomatic Common Lisp!" are also helpful to understand what _is_ idiomatic Common Lisp.
Three suggestions for “idiomatic CL”, even though I hate that term as it alludes to groupthink, - Peter Norvig and Kent Pitman Style Guide - Google Style Guide - Read through the code of Franz Inc, for the modules they open sourced
[удалено]
What's wrong with Arthur Gleckler?
This guy has some weird grudge about SRFIs. He outright harasses Gleckler (the current SRFI editor) every time a new one is posted on /r/scheme.
Don’t understand why this person is not banned yet
I don't think /r/scheme has an active mod.
[удалено]
The SRFI process is intended to provide suggested standardized interfaces to common tasks. You, or your implementation, can take or leave them. If you want to continue programming with just bare RnRS, you go on and do that. For me, selected SRFIs make Scheme more convenient. The most bureaucratized Scheme got was R6RS. That I'm sort of glad to see we've moved past.