Page 1 of 1

Incredibly cool VP features

Posted: 22 Jul 2020 2:28
by choibakk
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!


Re: Incredibly cool VP features

Posted: 22 Jul 2020 21:11
by Thomas Linder Puls
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.

Re: Incredibly cool VP features

Posted: 14 Aug 2020 0:24
by choibakk
Stepping into and over C\C++ in the VPC IDE! I never expected being able to do that. Impressed.

Re: Incredibly cool VP features

Posted: 19 Sep 2020 1:55
by choibakk
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: ... 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.