Preface

In 2009, my dear friend and editor, Jackie Carter, sent an early draft of Seven Languages in Seven Weeks to Joe Armstrong, creator of the Erlang language. I was beyond nervous. He would read my thoughts about Erlang and also a couple of other languages, including Ruby and Prolog.

My Ruby confidence was high. As an early adopter and author, I knew the language well after writing several books and even teaching conference workshops. My Erlang knowledge was quite limited. I expected Joe to have plenty to say about my musings on his creation.

Then there was Prolog. I didn’t expect many comments about the logic language because it’s not a popular language. I couldn’t have been more wrong. It turns out Prolog was one of Joe’s favorite languages, so he had plenty of comments about the chapter. Over time, he helped me get the programs and prose into shape and volunteered to write the foreword for Seven Languages in Seven Weeks. Over the years that followed, he became a good friend. We’d see one another on the conference circuit two or three times a year. Wherever we were, he always had something to say about Prolog’s beauty and simplicity.

At one point in his review process, Joe suggested I replace one problem with another, the map coloring problem. He coached me to give it a try. I was quickly able to rough out the rules of the problem. To test my progress, I ran my program, and Prolog started spitting out the long list of correct answers. I was floored.

I told Joe and he was laughing with glee. He said, “You’ve just had your Prolog moment!” He was right.

As you work through the chapters, you won’t find a typical code repository. Most of the programs are twenty lines or less. The real magic of Prolog is that you can solve problems succinctly with a few lines of code and a collection of facts.

Over the course of this book, I hope you find your own Prolog moment. If something makes you smile, tell someone and help them find a Prolog moment too.

Bruce Tate
March 2022
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.139.83.178