News for hackers. Stuff that matters.
Re:Show HN: "Programming Algorithms in Lisp” Book by vseloved on Monday February 08, 2021 @11:14AM (#26066411)
Hi, I'm the author.

For those who haven't heard about the book yet: it is a practical description of the main data structures and algorithms in use today. The book is also featuring a presentation of the most important algorithm development techniques, as well a examples of the real-world use cases in each chapter. It uses Common Lisp as an implementation language, and also contains a crash course into the language if you are not yet familiar with it.

For those who have already seen or even read the previous version published on Leanpub, here is a summary of the updates: http://lisp-univ-etc.blogspot.com/2021/02/programming-algori...

As usual, AMA.

Re:Show HN: "Programming Algorithms in Lisp” Book by 2pEXgD0fZ5cF on Monday February 08, 2021 @12:01PM (#26067097)
I bought myself a copy of your book recently. I have not worked through it back to back, but I enjoyed taking a look at known things through the lens of CL.

However I have to admit that the reliance on additional external libraries kind of had me a bit disappointed, but I can understand the reasoning and advantages behind such a decision.

Re:Show HN: "Programming Algorithms in Lisp” Book by vseloved on Monday February 08, 2021 @01:34PM (#26068266)
thanks for the feedback!
Re:Show HN: "Programming Algorithms in Lisp” Book by jimbokun on Monday February 08, 2021 @12:03PM (#26067124)
Is the goal of this book to teach algorithms to Lisp programmers, or to teach algorithms using Lisp as its a good pedagogical language, or something else?
Re:Show HN: "Programming Algorithms in Lisp” Book by vseloved on Monday February 08, 2021 @12:29PM (#26067467)
More of the second: i.e. teach algorithms using Lisp. The secondary goal is to get people more accustomed with Lisp.
Re:Show HN: "Programming Algorithms in Lisp” Book by tluyben2 on Tuesday February 09, 2021 @02:45AM (#26074898)
Bought it yesterday when reading this and read it halfway now; I like it. And thanks for taking the effort writing it!

As for remarks;

I second the reliance on the additional libraries; I think most readers are in fact, as you say in the book, purist... And won't like his reliance. No matter if it makes things better or not.

To that point; I personally like your opinionatedness in the book; on HN (etc) you would be shot down for many remarks you make in the book, but I like them here from people and do like that about the writing.

I wouldn't put smileys :) in a book like this, but that's a matter of taste.

And maybe a proofread by a native English speaker could have been good, but nothing was bad per se, it's just, having worked for 5 years in Ukraine (Lviv/Kyiv), that I recognize the way sentences are constructed and that is sometimes not the most readable in English. But I am not native English, and, again, for this kind of book, it's definitely fine, it would just be a bit of icing on the cake.

Re:Show HN: "Programming Algorithms in Lisp” Book by vseloved on Tuesday February 09, 2021 @04:43AM (#26075577)
Thanks for the feedback! I recognize the deficiencies of my English writing. Moreover, the current state of the book is, in fact, much-much better than the original manuscript thanks to the efforts of Dr. Robert Strandh, phoe, and Apress proofreaders. As for the residual ugliness - c'est la vie...
Re:Show HN: "Programming Algorithms in Lisp” Book by tluyben2 on Tuesday February 09, 2021 @06:45AM (#26076368)
It's great work anyway! The main point is the technical content; kudos for that! And of course persisting to write it to the very end instead of quitting like most of us do.
Re:Show HN: "Programming Algorithms in Lisp” Book by humbleharbinger on Monday February 08, 2021 @11:51AM (#26066957)
As a second year cs student currently taking an algorithms course with no experience with LISP, would this book be useful for me?
Re:Show HN: "Programming Algorithms in Lisp” Book by vseloved on Monday February 08, 2021 @12:34PM (#26067523)
In the preface, I discuss a bit the topic of how algorithms are taught in the universities versus how they are actually used. I made a choice to lean heavily towards the "practical" approach. So, from the perspective of a student, this shouldn't be your principal manual, the theory isn't presented in the best possible way, to say the least. (As a manual I'd recommend Skiena, or you can use Cormen etc.) But if you read the book as supplementary material it can give you a different perspective on those theoretical concepts and, hopefully, you'll get more value from studying them as you'll see where it all leads and how you might be using the obtained knowledge in your further work. As for Lisp, I don't think that picking it for any smart student should be a problem.
Re:Show HN: "Programming Algorithms in Lisp” Book by NAR8789 on Monday February 08, 2021 @02:04PM (#26068641)
What are this book's selling points as compared to SICP? On the surface, both are teaching computer science fundamentals in a lispy setting.
Re:Show HN: "Programming Algorithms in Lisp” Book by vseloved on Monday February 08, 2021 @02:43PM (#26069136)
You're quite right that SICP is about the fundamentals. Progalgs is about writing efficient programs. It's for those who already understand the fundamentals.
Re:Show HN: "Programming Algorithms in Lisp” Book by airstrike on Monday February 08, 2021 @10:59PM (#26073641)
Any reason why the link is pointing to what seems to be Guadeloupe?
Re:Show HN: "Programming Algorithms in Lisp” Book by vseloved on Tuesday February 09, 2021 @04:25AM (#26075476)
sorry, can you elaborate on that? (I'm affraid I didn't understand the question)
Re:Show HN: "Programming Algorithms in Lisp” Book by airstrike on Tuesday February 09, 2021 @08:44AM (#26077328)
Notice the /gp/ in the link you submitted

    https://www.apress.com/gp/book/9781484264270
                           ^^
which forces the website to show prices for Spain and possibly other local settings.
Re:Show HN: "Programming Algorithms in Lisp” Book by vseloved on Tuesday February 09, 2021 @10:39AM (#26078697)
Got it. Strange, that's the link google search gives me. Also, it shows me price for Ukraine (where I am)
Re:Show HN: "Programming Algorithms in Lisp” Book by airstrike on Tuesday February 09, 2021 @10:41AM (#26078720)
If you remove the "gp" it defaults to wherever it thinks you are. If you instead type "us" instead, it shows the US price in dollars
Re:Show HN: "Programming Algorithms in Lisp” Book by mindcrime on Monday February 08, 2021 @12:04PM (#26067131)
Perfect timing... I just renewed my APress Access subscription like 3 days ago. Will definitely give this a look.
Re:Show HN: "Programming Algorithms in Lisp” Book by u678u on Monday February 08, 2021 @05:05PM (#26070842)
Anyone tried leetcode with lisp? I'm not sure if its a good way to learn or an exercise in banging your head against the wall.
Re:Show HN: "Programming Algorithms in Lisp” Book by ludston on Monday February 08, 2021 @05:54PM (#26071417)
I really enjoy solving project euler puzzles with CL. It's very well suited to them.
Re:Show HN: "Programming Algorithms in Lisp” Book by Jtsummers on Monday February 08, 2021 @05:25PM (#26071092)
I've toyed around with some similar sites in the past. Challenges like that that sit closer to purer algorithm tasks are not at all hard in Common Lisp.
Re:Show HN: "Programming Algorithms in Lisp” Book by fishmaster on Tuesday February 09, 2021 @05:05PM (#26082990)
Advent of Code is pretty good with CL.
Re:Show HN: "Programming Algorithms in Lisp” Book by peebz on Monday February 08, 2021 @03:38PM (#26069779)
How much does this differ from the version I bought on Leanpub?
Re:Show HN: "Programming Algorithms in Lisp” Book by vseloved on Monday February 08, 2021 @03:56PM (#26069995)
Not much. I have summarized all the updates here: http://lisp-univ-etc.blogspot.com/2021/02/programming-algori...
Re:Show HN: "Programming Algorithms in Lisp” Book by peebz on Monday February 08, 2021 @03:59PM (#26070024)
Great - thanks!
Re:Show HN: "Programming Algorithms in Lisp” Book by tasubotadas on Monday February 08, 2021 @03:15PM (#26069534)
Thanks! Looks interesting - just bought it :)
Re:Show HN: "Programming Algorithms in Lisp” Book by yters on Monday February 08, 2021 @11:56AM (#26067020)
Is the big underlying motive for LISP its connection with symbolic AI?
Re:Show HN: "Programming Algorithms in Lisp” Book by Jtsummers on Monday February 08, 2021 @12:17PM (#26067333)
First, I still find it very jarring to see "LISP" written that way when referring to Common Lisp, and most other languages in the Lisp family, as "Lisp" has been the common way of writing it for a very long time. That styling, now, is mostly found in older texts on the subject or when talking about LISP and LISP 1.5 and a few other specific implementations.

Second, Common Lisp is a general purpose, multiparadigm language. There's a lot to like about it. If you want to implement conventional procedural algorithms, the language is well-suited to writing in that style. If you want to adopt a more functional and recursive (versus iterative) style, it is similarly well-suited (though somewhat implementation dependent as CL, unlike Scheme, does not mandate tail call elimination, which can bite you in performance). If you want to write in an OO-style, it has a way to do that (though it is different than the OO-styles many people are familiar with so takes some time to learn). And if you like writing DSLs (but don't want to implement a full parser or an interpreter but would rather have something compiled for better performance), it's very well-suited for it.

Third, while it was commonly used for symbolic AI, it is not restricted to that domain. But, if that's what you want to use it for, you should look into the book Paradigms of AI Programming by Norvig (now available for free online) which is pretty much just about implementing now classic symbolic AI programs in CL.

Re:Show HN: "Programming Algorithms in Lisp” Book by mepian on Monday February 08, 2021 @12:19PM (#26067356)
Not anymore, today Common Lisp is generally a very nice language that balances dynamicity and performance quite well, and especially shines in interactive (or REPL-driven) development: https://mikelevins.github.io/posts/2020-12-18-repl-driven/
Re:Show HN: "Programming Algorithms in Lisp” Book by User23 on Monday February 08, 2021 @12:49PM (#26067721)
Also popular implementations do some cool things. The compiler section in the SBCL manual[1] has good details. SBCL's type inference is powerful and you can also convince yourself it's actually working by looking at the output of DISASSEMBLE.

[1] http://www.sbcl.org/manual/index.html

Re:Show HN: "Programming Algorithms in Lisp” Book by wry_discontent on Monday February 08, 2021 @01:28PM (#26068185)
Clojure is my only serious exposure to lisp, and I get jealous when hearing about features like a `breakloop` in Common Lisp.
Re:Show HN: "Programming Algorithms in Lisp” Book by codr7 on Monday February 08, 2021 @03:52PM (#26069948)
Why not give it a spin?

There is plenty more to discover in Common Lisp, Clojure has some nice tricks but it's a faint echo as far as raw power goes.

http://www.sbcl.org

Re:Show HN: "Programming Algorithms in Lisp” Book by vseloved on Monday February 08, 2021 @03:57PM (#26070013)
there's an interesting recent video on the differences between Cl and Clojure here: https://www.youtube.com/watch?v=44Q9ew9JH_U