понедельник, 25 декабря 2017 г.

Prolog ideas

Here is my list of Prolog ideas:

  1. JSON parser
  2. HTTP requests parser
  3. Declarative UI
  4. Validation rules for UI
  5. Business logic in C\C++\Java
The idea of declarative UI I borrowed from the Turbo Prolog 2 User guide and Turbo Prolog Toolbox. It could be useful to have some intermediate UI form representation  in order to be able to translate it into different languages.

As for the last topic it turned out to be easy embed tuProlog in Java. And I had a prototype where I call java methods from Prolog.

The later topics need to be researched further.

Turbo Prolog 2.0. Changes from 1.x.

 Turbo Prolog 2.0 change list

- external database support with protected memory access

- BGI interface support

- improved text editor

- ability to save trace to file

- integers overflow check

- stack check

- error level

- ability to call prolog predicates from Turbo C

- conditional compilation support  (ifdef, ifndef, elsedef, enddef)

- standart trap predicate

- build with Turbo C 1.5

четверг, 21 декабря 2017 г.

W.F. Clocksin, C.S. Mellish. Programming in Prolog

Hi everyone.

I have just read "Programming in Prolog" and wonder why this book is recommended for beginners?

The most useful tip in this book is located at the end of it in appendix C:
This book describes Prolog version which is not related to any particular existing version. The idea was to create the description of "general" Prolog which applies to all systems at once.
 The best way to learn Prolog system you have -- is to read user documentation supplied with it.

Wow! Such a wonderful advise. Why I have to read all the book till the end in order to find out this?
Beginners  will suffer a lot and will complain about Prolog. This shouldn't be like this.

Please treat the book as an approach to explain ideas behind Prolog, not a tutorial.