Development Environment

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

Angrim
Posts: 97
Joined: Mon Jun 25, 2012 10:16 pm
Location: Forks, WA
Full name: Ben Nye

Re: Development Environment

Post by Angrim »

vim for editing
gcc to compile
valgrind, gdb, and printf for debugging.
rcs for version control, vital if you want to try out a great new idea with the
option to back out of it if it isn't so great. Oh, and cvs for version control when I work on sunsetter, since that's on sourceforge.
Ralph Stoesser
Posts: 408
Joined: Sat Mar 06, 2010 9:28 am

Re: Development Environment

Post by Ralph Stoesser »

vim for editing
gcc to compile
printf, gdb, valgrind for debugging
git for version control
8-)
User avatar
michiguel
Posts: 6401
Joined: Thu Mar 09, 2006 8:30 pm
Location: Chicago, Illinois, USA

Re: Development Environment

Post by michiguel »

Ralph Stoesser wrote:vim for editing
gcc to compile
printf, gdb, valgrind for debugging
git for version control
8-)
For my chess engine:

Linux

gedit for editing. It is very important that I have the ability to have tabs that detect when a file was modified and alert me. This is critical when working with GIT and changing branches. In addition, it color codes C files, and any other scripting language I am using at the same time. I work with gedit and a terminal open at the same time. No IDE.

gcc & intel compiler

I use my own type of ASSERT, which spits all sort of information about the state of the engine, board, and what PV lead to that point. And I use that ASSERT all over the place.

I do not use any type of debugger. GDB once every two years or so, maybe. The only time I use gdb is to find where the engine crashes. Generally, that never happens because the problem is caught by an ASSERT first.

When I need to debug, I used printf (Yes, printf) with specific functions that spit diagrams of bitboards etc. if needed. No debugger can give me this.

I have FOLLOW macros. Those are triggered in a special debug mode. They will print specific info ("Entering section x etc., node=1023658 alpha=0, beta=1") or the whole pv that leads to that point. That allows me to follow the whole tree, dump it into a file, and search for a specific text. This was critical to me to debug a parallel version of the engine.

GIT (Thanks God for GIT).

To compile, build etc. etc. I have scripts, most of them in Ruby. I use Rake (Ruby make) rather than Make, which is much more powerful and most importantly, user friendly. Having proper scripts, I found I do not need a IDE, and it fact, I think it gets in the way. I used some IDEs in the past (windows) and I cannot be happier than I am today with just gedit.

I use grep a lot.

Miguel
User avatar
jsgroby
Posts: 83
Joined: Mon Mar 24, 2014 12:26 am
Location: Glen Carbon, IL USA

Re: Development Environment

Post by jsgroby »

michiguel wrote:
Ralph Stoesser wrote:vim for editing
gcc to compile
printf, gdb, valgrind for debugging
git for version control
8-)
For my chess engine:

Linux

gedit for editing. It is very important that I have the ability to have tabs that detect when a file was modified and alert me. This is critical when working with GIT and changing branches. In addition, it color codes C files, and any other scripting language I am using at the same time. I work with gedit and a terminal open at the same time. No IDE.

gcc & intel compiler

I use my own type of ASSERT, which spits all sort of information about the state of the engine, board, and what PV lead to that point. And I use that ASSERT all over the place.

I do not use any type of debugger. GDB once every two years or so, maybe. The only time I use gdb is to find where the engine crashes. Generally, that never happens because the problem is caught by an ASSERT first.

When I need to debug, I used printf (Yes, printf) with specific functions that spit diagrams of bitboards etc. if needed. No debugger can give me this.

I have FOLLOW macros. Those are triggered in a special debug mode. They will print specific info ("Entering section x etc., node=1023658 alpha=0, beta=1") or the whole pv that leads to that point. That allows me to follow the whole tree, dump it into a file, and search for a specific text. This was critical to me to debug a parallel version of the engine.

GIT (Thanks God for GIT).

To compile, build etc. etc. I have scripts, most of them in Ruby. I use Rake (Ruby make) rather than Make, which is much more powerful and most importantly, user friendly. Having proper scripts, I found I do not need a IDE, and it fact, I think it gets in the way. I used some IDEs in the past (windows) and I cannot be happier than I am today with just gedit.

I use grep a lot.

Miguel
When people say Intel Compiler, are they talking about the expensive one you get directly from Intel? One of these?

https://software.intel.com/en-us/intel- ... w=compiler
User avatar
michiguel
Posts: 6401
Joined: Thu Mar 09, 2006 8:30 pm
Location: Chicago, Illinois, USA

Re: Development Environment

Post by michiguel »

jsgroby wrote:
michiguel wrote:
Ralph Stoesser wrote:vim for editing
gcc to compile
printf, gdb, valgrind for debugging
git for version control
8-)
For my chess engine:

Linux

gedit for editing. It is very important that I have the ability to have tabs that detect when a file was modified and alert me. This is critical when working with GIT and changing branches. In addition, it color codes C files, and any other scripting language I am using at the same time. I work with gedit and a terminal open at the same time. No IDE.

gcc & intel compiler

I use my own type of ASSERT, which spits all sort of information about the state of the engine, board, and what PV lead to that point. And I use that ASSERT all over the place.

I do not use any type of debugger. GDB once every two years or so, maybe. The only time I use gdb is to find where the engine crashes. Generally, that never happens because the problem is caught by an ASSERT first.

When I need to debug, I used printf (Yes, printf) with specific functions that spit diagrams of bitboards etc. if needed. No debugger can give me this.

I have FOLLOW macros. Those are triggered in a special debug mode. They will print specific info ("Entering section x etc., node=1023658 alpha=0, beta=1") or the whole pv that leads to that point. That allows me to follow the whole tree, dump it into a file, and search for a specific text. This was critical to me to debug a parallel version of the engine.

GIT (Thanks God for GIT).

To compile, build etc. etc. I have scripts, most of them in Ruby. I use Rake (Ruby make) rather than Make, which is much more powerful and most importantly, user friendly. Having proper scripts, I found I do not need a IDE, and it fact, I think it gets in the way. I used some IDEs in the past (windows) and I cannot be happier than I am today with just gedit.

I use grep a lot.

Miguel
When people say Intel Compiler, are they talking about the expensive one you get directly from Intel? One of these?

https://software.intel.com/en-us/intel- ... w=compiler
Linux version used to be free. I checked and not anymore.
https://software.intel.com/en-us/intel-composer-xe/

sounds like 249 for academic price (maybe free for students, I did not check).
https://software.intel.com/en-us/intel- ... id-8748-93

I would prefer to put that money on hardware and I use gcc.

Miguel
User avatar
jsgroby
Posts: 83
Joined: Mon Mar 24, 2014 12:26 am
Location: Glen Carbon, IL USA

Re: Development Environment

Post by jsgroby »

michiguel wrote:
jsgroby wrote:
michiguel wrote:
Ralph Stoesser wrote:vim for editing
gcc to compile
printf, gdb, valgrind for debugging
git for version control
8-)
For my chess engine:

Linux

gedit for editing. It is very important that I have the ability to have tabs that detect when a file was modified and alert me. This is critical when working with GIT and changing branches. In addition, it color codes C files, and any other scripting language I am using at the same time. I work with gedit and a terminal open at the same time. No IDE.

gcc & intel compiler

I use my own type of ASSERT, which spits all sort of information about the state of the engine, board, and what PV lead to that point. And I use that ASSERT all over the place.

I do not use any type of debugger. GDB once every two years or so, maybe. The only time I use gdb is to find where the engine crashes. Generally, that never happens because the problem is caught by an ASSERT first.

When I need to debug, I used printf (Yes, printf) with specific functions that spit diagrams of bitboards etc. if needed. No debugger can give me this.

I have FOLLOW macros. Those are triggered in a special debug mode. They will print specific info ("Entering section x etc., node=1023658 alpha=0, beta=1") or the whole pv that leads to that point. That allows me to follow the whole tree, dump it into a file, and search for a specific text. This was critical to me to debug a parallel version of the engine.

GIT (Thanks God for GIT).

To compile, build etc. etc. I have scripts, most of them in Ruby. I use Rake (Ruby make) rather than Make, which is much more powerful and most importantly, user friendly. Having proper scripts, I found I do not need a IDE, and it fact, I think it gets in the way. I used some IDEs in the past (windows) and I cannot be happier than I am today with just gedit.

I use grep a lot.

Miguel
When people say Intel Compiler, are they talking about the expensive one you get directly from Intel? One of these?

https://software.intel.com/en-us/intel- ... w=compiler
Linux version used to be free. I checked and not anymore.
https://software.intel.com/en-us/intel-composer-xe/

sounds like 249 for academic price (maybe free for students, I did not check).
https://software.intel.com/en-us/intel- ... id-8748-93

I would prefer to put that money on hardware and I use gcc.

Miguel
What would be the benefit of using an expensive compiler like the Intel one versus gcc?

Jeff
User avatar
michiguel
Posts: 6401
Joined: Thu Mar 09, 2006 8:30 pm
Location: Chicago, Illinois, USA

Re: Development Environment

Post by michiguel »

jsgroby wrote:
What would be the benefit of using an expensive compiler like the Intel one versus gcc?

Jeff
Used to give significantly faster compiles. Now gcc is roughly similar.

Miguel
Rein Halbersma
Posts: 741
Joined: Tue May 22, 2007 11:13 am

Re: Development Environment

Post by Rein Halbersma »

michiguel wrote:
Linux version used to be free. I checked and not anymore.
https://software.intel.com/en-us/intel-composer-xe/

sounds like 249 for academic price (maybe free for students, I did not check).
https://software.intel.com/en-us/intel- ... id-8748-93

I would prefer to put that money on hardware and I use gcc.

Miguel
Still free, but the link is hard to find: https://software.intel.com/en-us/non-co ... evelopment
Rein Halbersma
Posts: 741
Joined: Tue May 22, 2007 11:13 am

Re: Development Environment

Post by Rein Halbersma »

michiguel wrote:
jsgroby wrote:
What would be the benefit of using an expensive compiler like the Intel one versus gcc?

Jeff
Used to give significantly faster compiles. Now gcc is roughly similar.

Miguel
More importantly: it's always good to use multiple compilers (gcc, clang, intel) to check correctness of your code. Each compiler will find something different in terms of warning.
mar
Posts: 2554
Joined: Fri Nov 26, 2010 2:00 pm
Location: Czech Republic
Full name: Martin Sedlak

Re: Development Environment

Post by mar »

Rein Halbersma wrote:More importantly: it's always good to use multiple compilers (gcc, clang, intel) to check correctness of your code. Each compiler will find something different in terms of warning.
Couldn't agree more :)