News for hackers. Stuff that matters.
Re:Restarts in Common Lisp by metroholografix on Wednesday April 01, 2020 @09:37AM (#22748352)
I find that Practical Common Lisp has not aged well. Maybe it's the "practical" part with the specific examples the author used -that are now terribly dated- that is mainly responsible, but the end result is that I no longer recommend it.

My goto recommendation for newcomers is Norvig's PAIP which is full of insightful moments and unbelievably good code and for people with more experience "Let over Lambda" by Doug Hoyte, which is a mind-blowing book mainly because of the time-transcendent nature of the examples Doug chose.

Re:Restarts in Common Lisp by HerrMonnezza on Wednesday April 01, 2020 @10:56AM (#22749257)
Having read both PAIP and Practical CL, I do not see them as comparable: PAIP teaches classical AI algorithms, and introduces as much CL as nacessary to carry out the task; Practical CL instead has a goal of teaching Common Lisp, and uses coding examples to showcase features the language.

I agree that the MP3 streaming server example in PCL looks outdated, but so are many topics in PAIP as Norvig himself points out at the end of his retrospective [1]. (And I still think that the MP3 parser in PCL is a really good example for showing Lisp I/O, binrary processing abilities, and subtleties of CLOS, despite not being something that anyone would code as a side project nowadays.)

[1]: http://norvig.com/Lisp-retro.html

Re:Restarts in Common Lisp by metroholografix on Wednesday April 01, 2020 @11:19AM (#22749547)
I don't agree. PAIP goes well beyond "introduces as much CL as necessary to carry out the task" in its Common Lisp presentation. It could easily serve as a first book for someone to learn Common Lisp, even if that person has no interest in AI whatsoever.

Some of the examples in PAIP may be outdated in a historical but not practical sense. I've joked in the past that the code is so well-written than it can be excised and framed on a wall. With code this good, the lessons one can learn are numerous and the code stands the test of time.

Unfortunately, the same can not be said about the PCL examples since - to name two - there are far better ways to do binary parsing and pathname handling today than binary-types and cl-fad. The PCL examples are a product of the time that they were written but they are tied to a particular verbose, subjective style and were not "optimal" or even particularly good, back then.

Ultimately, PCL introduces Common Lisp to the audience as does PAIP. The difference is that reading PCL in 2020 will have minimum, let's say thought-provoking, impact. Reading PAIP (or Let over Lambda, SICP, On Lisp, Lisp in Small Pieces) remains -and will remain- a paradigm-shifting experience.

Re:Restarts in Common Lisp by register on Thursday April 02, 2020 @08:59AM (#22758403)
I found "Lisp In Small Pieces" an extremely difficult book to digest. Non for the contents per se but rather for the prose. I never managed to get past the second chapter. Does anybody share the feeling?
Re:Restarts in Common Lisp by metroholografix on Thursday April 02, 2020 @02:12PM (#22761850)
Assuming that you're referring to the English version (it was originally written in French), I do agree that it's not an easy read. The translator did not do a good job in my view.

It does come together however, with some additional effort and extra passes.

Re:Restarts in Common Lisp by taeric on Wednesday April 01, 2020 @04:51PM (#22753360)
Do you have pointers for how to better do binary and path management?
Re:Restarts in Common Lisp by metroholografix on Wednesday April 01, 2020 @05:16PM (#22753607)
Use UIOP [1] for all path/filesystem (and more) operations. It's part of ASDF which means it's bundled with every Common Lisp implementation that counts. Generally, if something is covered by UIOP, you should use it instead of depending on a different library.

Binary parsing depends on the application constraints.

You can't go wrong by studying Frode's binary-types (not the same as PCL binary-types) though [2].

[1] https://common-lisp.net/project/asdf/uiop.html

[2] https://github.com/frodef/binary-types/

Re:Restarts in Common Lisp by vz8 on Wednesday April 01, 2020 @09:53AM (#22748453)
For those not in the know, PAIP is Paradigms of Artificial Intelligence Programming, with a fantastic repo here: https://github.com/norvig/paip-lisp
Re:Restarts in Common Lisp by taeric on Wednesday April 01, 2020 @10:52AM (#22749204)
Conversely, it has aged well in that all of the code still works. My Scala and Python books? Grrr
Re:Restarts in Common Lisp by nabla9 on Wednesday April 01, 2020 @09:55AM (#22748467)
PAIP is a great book. It both teachers Lisp programming and "classical" AI programming.

Knowing classical AI IMHO should be considered as part of programmers toolbox. What was once bleeding edge AI is now high level heuristic problem solving.

Re:Restarts in Common Lisp by zeveb on Wednesday April 01, 2020 @03:10PM (#22752468)
Are we really at a point that MP3 parsing is so old-fashioned that it's not worth recommending a book which uses it for an example?

Guys, this is software not Milan Fashion Week. It's okay: those are just examples. Software still has to parse things, even in 2020!

Re:Restarts in Common Lisp by ksaj on Wednesday April 01, 2020 @09:59PM (#22755572)
And besides, this part of the book has gone a long way on how I've been programming for and setting up my Pirate Radio (Raspberry Pi radio). There are probably easier ways to do it, including just using the software they recommend in the first place, but then I don't get anywhere near the level of enjoyable education from it either.
Re:Restarts in Common Lisp by sulami on Wednesday April 01, 2020 @09:39AM (#22748370)
I'm planning to read PAIP over the upcoming weekend as a follow-up, I've already got it sitting here.

I know next to nothing about AI, beyond the basics of RNNs, so I'm hoping to learn a lot.

Re:Restarts in Common Lisp by kannmig on Wednesday April 01, 2020 @09:53AM (#22748458)
The material handled in PAIP mostly focuses on classical symbolic AI, as opposed to the modern ML-based AI that you refer to in RNNs.

(Not to discourage you from reading the book, of course!)

Re:Restarts in Common Lisp by yarrel on Wednesday April 01, 2020 @01:27PM (#22751245)
It's AI in the rule-based GOFAI paradigm rather than modern neural-network-based ML.

Treat it as a review of some of the historical classics of computer science and you can't go wrong.

Re:Restarts in Common Lisp by weavie on Wednesday April 01, 2020 @10:01AM (#22748526)
You may need more than a weekend!
Re:Restarts in Common Lisp by billsix on Wednesday April 01, 2020 @10:58AM (#22749290)
Re:Restarts in Common Lisp by newusertoday on Thursday April 02, 2020 @03:11AM (#22756890)
I respectfully disagree. I think PCL still does an excellent job in exposing CL features with coding examples.
Re:Restarts in Common Lisp by register on Thursday April 02, 2020 @09:06AM (#22758473)
I have read both and I also like PAIP better. I find PCL good only for somebody that don't have much programming experience. I believe that somebody that is a seasoned programmer and that wants to gets some understanding of CL will appreciate PAIP better. This is because PAIP begins with an introduction of the language that just touches all the basic stuff upfront very clearly and only afterwards starts to build on examples. So if one wants only to get an introduction to CL he can just read the first chapters and forget the rest. PCL does the opposite introducing just a few features at a time and providing a lot of examples side by side. This might force the reader to pay attention to stuff he is not really interested in.

P.S: I found the examples/practice part quite boring in both cases but for sure PAIP is more interesting as there is a chance to learn something new/unusual.