Incredibly cool VP features

Discussions related to Visual Prolog
choibakk
Posts: 19
Joined: 5 Sep 2019 19:30

Incredibly cool VP features

Unread post by choibakk » 22 Jul 2020 2:28

I would like to mention just a few of the VP features that greatly aid/help me writing my chess program NADYA2.0 chess. I was thinking I wanted to give some complements to the PDC team for your efforts:

1. The VP compiler has absolutely no memory loss issues (at least in my application). I run regular tests that calculate billions of chess moves and have never seen a memory leak. This includes tests that take multiple days to complete.

2. Delayed calculated constants calculated by predicates--not called unless you actually need to calculate a value.

Code: Select all

facts     pos_bits_w : c_bb := get_pos_bits_w_() [constant].  %  If I don't try to access pow_bits_w, it won't be calculated     pos_bits_b : c_bb := get_pos_bits_b_() [constant].  %  and once calculated, it can't be changed!
3. One of my favorite VP compiler features since I discovered it: "presenters"!!! Debugging a chess program can be very tedious. Having the ability to look at board positions / moves / pieces / captures, etc... while debugging in the VP debugger, in their contextual representations instead of just numerical values / pointers, etc is probably one of the coolest compiler features ever!

Cheers,
CHoibakk

User avatar
Thomas Linder Puls
VIP Member
Posts: 1168
Joined: 28 Feb 2000 0:01

Re: Incredibly cool VP features

Unread post by Thomas Linder Puls » 22 Jul 2020 21:11

Thank you. Disregarding all modesty I have to agree that presenters are rather 8-). And it has actually also been one of the most difficult things to get working. The debugger run code in your process while it is braked. But when your program is braked it may "posses some resources" that are required for the presenter code to work, and in such cases the presenter code may block and then the whole concept "blocks". But I think it is quite solid now.
Regards Thomas Linder Puls
PDC

choibakk
Posts: 19
Joined: 5 Sep 2019 19:30

Re: Incredibly cool VP features

Unread post by choibakk » 14 Aug 2020 0:24

Stepping into and over C\C++ in the VPC IDE! I never expected being able to do that. Impressed.

choibakk
Posts: 19
Joined: 5 Sep 2019 19:30

Re: Incredibly cool VP features

Unread post by choibakk » 19 Sep 2020 1:55

Support Pattern

IMO this is very important to learn with VPC -- especially if your understanding of object oriented development comes from another language like C++. This pattern is documented: https://wiki.visual-prolog.com/index.ph ... rt_pattern, and another example by Martin Meyer is at: viewtopic.php?f=2&t=13225&p=42864&hilit ... nce#p42864.

If your understanding of object oriented programming is more from a language like C++, and you are confused about PDC's interfaces/classes/inheritance/object, understanding the above is critical IMO.

Cheers.

Post Reply