Is there a tool to ask the computer how it can understand code?

Discussion of chess software programming and technical issues.

Moderators: hgm, Harvey Williamson, bob

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
chrisw
Posts: 779
Joined: Tue Apr 03, 2012 2:28 pm

Re: Is there a tool to ask the computer how it can understand code?

Post by chrisw » Sat Nov 10, 2018 6:13 pm

Dann Corbit wrote:
Fri Nov 09, 2018 8:19 pm
mar wrote:
Fri Nov 09, 2018 12:33 pm
{snip}
You should learn a bit about C++ before trying to understand C++ code.
Don't those two things go hand in hand?

But it probably would be a good idea to read Bjarne Stroustrup's books.
Yes, I was going to say that too (the hand in hand).
I find, since I restarted doing code recently, that there is so much of everything and everything moves so fast, that it’s best to work with a subset of the thing you are working in, you can always look stuff up anyway and, reversing a habit of a lifetime, it’s a good idea to go in at the highest level you can. I tended to just naturally code in C++, but now I discovered Python.
Chris Whittington
Ontological Terrorist
Lead Philosopher Computer Chess
Comrade Commissar Aspergers Liberation Front
Ostranenye Catalyst
Zero tolerance personal comments
5-4-8 tritype, INTP, BCF 221
facebook: chris.whittington.522
twitter: Skool_Dog

syzygy
Posts: 4343
Joined: Tue Feb 28, 2012 10:56 pm

Re: Is there a tool to ask the computer how it can understand code?

Post by syzygy » Mon Nov 12, 2018 9:24 pm

Uri Blass wrote:
Thu Nov 08, 2018 5:25 am
I take the following line in stockfish's code that is the first line in main.cpp line 37

Code: Select all

std::cout << engine_info() << std::endl;
Do you want to find where the implementation of "engine_info()" can be found, or do you want to figure out what std::cout is doing?

For std::cout, just look here:
https://en.cppreference.com/w/

The search function brings you to here:
https://en.cppreference.com/w/cpp/io/cout

std::cout and the << operator are just unnecessarily "cute" ways to print stuff.

Post Reply