The Reasoned Schemer, second edition
P**S
Extremely fun to read and it will bend your mind.
This book takes you on the next adventure in the Schemer series. The Little Schemer taught lists and recursion, The Seasoned Schemer taught computation and now Reasoned Schemer teaches you logic programming and relational programming. Relational programming describes what you want in the result rather than how to get to result. As any book in the Schemer series, it's extremely fun to read and it will bend your mind. It will make you think from the first page. All in all this book teaches the essence of Prolog - the most well-known logic programming language.I've placed this book #13 in my Top 100 Programming, Computer and Science books list:http://www.catonmat.net/blog/top-100-books-part-three/.
D**N
I had to refund it because I couldn't read it (sadly I dont have perfect eyesight) and now have to wait for a print ...
This review is for the kindle version only. Its absolutely unreadable on my kindle paperwhite because the text is tiny and the font very "thin". You cannot make the text bigger. I had to refund it because I couldn't read it (sadly I dont have perfect eyesight) and now have to wait for a print copy :(
J**P
Good idea - very neglected implementation
First a word about The Reasoned Schemers soul-brother "The Little Schemer":I read the Little Schemer from one end to the other, and I simply adored it. It taught me so much that I hadn't really grasped before, and it taught me how to program. I can't recommend The Little Schemer hight enough for persons who wants to know what programming is really about.The Reasoned Schemer builds on the same idea, and I was therefor very eager to get started with it. Unfortunately, even though this book follows the same recipe as The Little Schemer, the actual implementation of this recipe is very poorly conducted. Where The Little Schemer was careful in its stepwise built-up of knowledge, making certain no assumptions were left unexplained, this book seems to have been written more hurriedly - the author seems to have forgotten to clear his mind for all the stuff that he finds obvious, but which the intended group of readers is in fact only just beginning to learn. I think the basic idea behind these books really has something going for it. Reading this book, I realize a good recipe also need a good cook and good preparation. The author of this book certainly is a good cook, but, it seems he badly neglected taking the time it takes, to think this book through.Conclusively, I can in no way recommend this book. It is simply too poorly implemented.
M**C
Mind opening
Great. Fun.
B**R
Brauchbare Einführung in miniKanren und damit auch clojure core logic
Ich habe mir dieses Buch gekauft um mehr über miniKanren zu lernen, da ich es in Form von clojure.core.logic verwenden möchte. Die online verfügbaren Dokumentationen dazu sind leider nicht sehr ergiebig oder greift an einer zu hohen Ebene an. Ich denke dieses Buch ist der Schlüssel, welcher diese Lücke füllt.Das Buch erklärt leider nicht sehr viel in Prosa, es versucht eher die Welt von miniKanren durch viele Beispiele abzustecken, so wie man es in einer Deklarativen Sprache selbst machen würde. Es macht durchaus Spaß die Beispiele nachzuvollziehen und daraus zu lernen, erfordert aber noch einiges an Eigenleistung um es zu verstehen.
M**R
fascinating and challenging
As the saying goes, if you like this sort of thing, this is the sort of thing you'll like. The authors have extended the approach of their classic book _The Little Schemer_ to encompass what is usually called logic programming, but which they refer to as "relational programming" (a much better name, in my opinion). They extend the Scheme language with relational analogues of many constructs, notably lambda and cond (in many, many variations), and also provide extended versions of standard Scheme operations like cons, car, and cdr. Basically, the relational approach involves taking the result of a function call and making it just another argument, but a special argument that can get assigned to as the result of the computation. Big deal, so what? you ask. The important thing is that _all_ of the function arguments behave this way, so that you can specify the result of a function (relation) and ask the system to generate the arguments. For instance, instead of saying 2 + 2 = X and figuring out what X is, you can say X + 2 = 4 and the system will figure out what X has to be (in this case... ummm... oh yeah, 2). To do this, the system uses a mechanism called "backtracking" which systematically tries alternatives until it either finds the answer, gives up, or (if you didn't program the search right) goes on forever. If you haven't seen this style of programming before, this book will definitely open your eyes.The relational/logic programming style is usually learned by studying the Prolog language, which is how I learned it (though I'm no expert). Having a knowledge of Prolog will definitely make this book easier to understand, although the approach given here is more modern than Prolog in several ways. For one thing, the named relations of Prolog are replaced here by anonymous relations (analogous to lambda expressions being anonymous functions), and for another, the (somewhat brutal) "cut" operator of Prolog, which is used to control backtracking, is ignored in favor of more subtle approaches involving interleaving solutions and giving up after single results are found.I think the approach of learning-by-pattern-recognition that all the "Little X" books use is fairly effective here, though I think a lot of readers (meaning me) wouldn't mind a more extended discussion of the mechanics of the system.All in all, if you liked _The Little Schemer_ and are curious about new ways of programming, you should definitely pick up a copy of this book. It will stretch your mind like a Slinky, and when you're done you'll have learned a new way of looking at programming.
R**R
論理型プログラミングから学ぶ処理系作成
Schemerシリーズの中では前二著とは独立しています。著者のひとり Oleg Kiselyov 氏の作成した miniKANREN 上でのプログラミングを全編で行います。 miniKANREN は Scheme 上に構築した論理型言語で、DSL の形態になっています。 miniKANREN は Scheme と似た condi などが含まれており、これらを上手に使って Prolog の教科書で出てくるレッドカットやグリーンカット等を分かり易く解説しています。こういった例から論理型といっても手続きの評価順序の影響があることを理解できます。読者として2つのグループを想定しているようです。ひとつは miniKANREN 上のプログラミングを通して論理型プログラミングを学ぶグループです。もうひとつは巻末の miniKANREN 作成から処理系の作成を学ぶグループです。前者の場合には予備知識は不要ですが、後者の場合にはマクロ等に関する深い知識が必要です。 SICP や On Lisp を読み終わっているぐらいの知識が必要だと思います。自分のスキルアップとともに読み取れる内容がどんどん深くなっていくのが処理系作成の醍醐味です。自分の Scheme のスキルを確認するために何度か読み返してみると新しい発見ができる面白い本だと思います。Clause and Effect と一緒に読むと Prolog を学びやすいのでお勧めです。
S**E
it is not as easy as that
I gave this book 5 stars, but as this book is in a complete category of its own, that is kind of a technicality. The Reasoned Schemer is a book that introduces you to the notion, usage, and application of logic programming. It is entirely structured in a question/answer format, which slowly introduces you to all the base "control" structures you would need in logic programming.Non logic programming basically works from the notion of imperative data flow. This is generally represented by the concept of a function. A function takes a argument and returns a value, it takes input variables and returns output variables. A logic program creates a relation (not a function) between a set of variables. If you had a two input function, with one output, you could represent this as a logic program relation of three variables. Two of those relation variables would be what were the two inputs to the function, the third variable would be the output of the function. Here is the kicker though. You can provide concrete values for any number of those variable in any order and ask the relation what the other variables might be. At the simplest level, this means that you might run your function "backwards" (from the output to the input). But really, it means that you can ask any question relating to those variables (conceptually). Now, realistically, it is not as easy as that. Some relations may never terminate (return a answer), some grow too large and barf (overflow), some may not complete for various other reasons. It can be more complex to actually write a logical relation than a function, this must be balanced against the fact that the relation is far more powerful than the function.If you want a primer for logical programing, this book is probably worth your time. It takes you through writing many of the fundamental parts of a logical relation. The only thing I think it really skips is the actual unification (= x y) primitive itself, which I believe it uses as a given. You can learn quite a bit by reading this code slowly and carefully. Note however, that you must complete every step of the question/answer pairings! Skimming this book will not work (unless you already know it). Really, these concepts build on each other. It is a rather small (page number and physically) book, but it will take far more time to really go through then its size would suggest. Read and work through for the purpose of understanding, and I think you will really get a good backing in logic programming, and probably enjoy yourself as well!Note: The above statements applied to the paper edition.The Kindle version of this Book is pure garbage. Here I am, on a 2016 Macbook Pro with a Retina Display and I can barely read the damn thing. I tried reading on my Android, just awful. I tried on my Windows PC, same. A good deal of the information in this book is communicated by bolding and italics. These are incredibly difficult to see in the Kindle version. Shame on the publisher for releasing such an inferior thing to the public. Disappointed in Amazon for not enforcing minimum legibility standards on non free Kindle books. DO NOT EVEN CONSIDER BUYING THE KINDLE EDITION!
Trustpilot
1 week ago
1 day ago