bob wrote:You are going to have to convince me how a pointer to a bunch of things is different from a global in the context of software engineering and programming.
A lot of sw engineering is about reuse (either in time or in space). Imagine trying to provide a libcrafty. You'll have to put each instance in its own address space to create new instances of its globals. Some people call that fork.
Now look at zlib and see how that is different and faster. It doesn't limit itself to one instance per address space.
Except I don't use fork, because I WANT shared data (trans/ref, killers, split blocks, etc, etc, and etc...
BTW Fork doesn't duplicate everything. Only that which is modified. global data that is not modified remains in all address spaces that you create with fork, not to mention the code.
There are two hidden metrics/definitions of "clear coding" in this thread. One is how easily other programmers understand the code by browsing through it (Folkert). The other is as a tool for oneself to produce the desired result, to help organise ones own mind (Henk, you).
I have no idea what Henk uses, because we only see him complain about his own bugs, but never a snippet of his code.
Crafty uses an additional method to assist both uses: many very detailed comments of the code's intent. Crafty can be very difficult to understand without them (for non-bobs), and throwing all variables in a globals section is part of the reason. Not only speed related variables are there. Even the input buffer is. But that is compensated by its outstandingly nice to read comments, I would say. Obviously you don't have problems to achieve the desired result. And obviously Henk has.
[PS: About sw engineering: if you want to reuse Crafty in a different context, for example as a support function linked to an ICS, you really have a problem unless you fork. Now I don't support the dogma "globals are bad" BTW, as less as I support "code reuse is the goal of sw engineering", but many do. I support "does as intended within budget". Trying to make a program "reusable in a different context" often causes unnecessary complications.]
Henk wrote:Functions compose well. Free or global variables usually cause problems.
Unfortunately you will always have global variables if you use threads, if you want the search to be anything even close to reasonably efficient...
I don't know if a twenty times slower transposition table will become the main computational bottleneck during normal move search otherwise using balanced trees might become an option.
It HAS to be fast. It HAS to be hashed, not searched.
If it has to be fast then functional programming fails for there is no fast functional implementation for a transposition table.
Not that I am so much interested, but this account is _clearly_ a troll.
Can I ask what are the moderator policies regarding trolling?
Hello Marco,
Allow to me to attempt a succinct clarification.
I simply despise the "he is a troll posts" particularly as prior to that question, you express your disinterest (which is your right incidentally) in the answer anyway.
Complain to a moderator.
This way is simply not the way to do it; yet a number of persons insist on doing it this way.
I have removed examples of Henk's posts before and may do so again, but without the assistance of the programmers in particular, I cannot assess what is, and what is not, trolling here.
Not that I am so much interested, but this account is _clearly_ a troll.
Can I ask what are the moderator policies regarding trolling?
Hello Marco,
Allow to me to attempt a succinct clarification.
I simply despise the "he is a troll posts" particularly as prior to that question, you express your disinterest (which is your right incidentally) in the answer anyway.
Complain to a moderator.
This way is simply not the way to do it; yet a number of persons insist on doing it this way.
I have removed examples of Henk's posts before and may do so again, but without the assistance of the programmers in particular, I cannot assess what is, and what is not, trolling here.
Later.
Hi Roger,
I am a programmer and I can state that his posts make no sense.
His scheme is to craft carefully chosen semi-random words picked up in technical jargon dictionary in a non sense line that is written so to provoke the reaction of people reading it.
Not that I am so much interested, but this account is _clearly_ a troll.
Can I ask what are the moderator policies regarding trolling?
Hello Marco,
Allow to me to attempt a succinct clarification.
I simply despise the "he is a troll posts" particularly as prior to that question, you express your disinterest (which is your right incidentally) in the answer anyway.
Complain to a moderator.
This way is simply not the way to do it; yet a number of persons insist on doing it this way.
I have removed examples of Henk's posts before and may do so again, but without the assistance of the programmers in particular, I cannot assess what is, and what is not, trolling here.
Later.
Hi Roger,
I am a programmer and I can state that his posts make no sense.
His scheme is to craft carefully chosen semi-random words picked up in technical jargon dictionary in a non sense line that is written so to provoke the reaction of people reading it.
It is really a conscious trolling scheme IMO.
Hello Marco,
This would have been more properly conducted by pm, but, as the original fault is mine, allow me to conclude here.
I know that you are a programmer.
I appreciate the insight, because, although I am not in your category (or indeed, of anyone who posts here), I assumed that there was something to the content as Henk has written and run a Winboard compatible engine in HG's monthly tournament.
Also, he engages HG, Sven Schule and Dr. Hyatt regularly in this forum and I cannot imagine a trio of that caliber responding to nonsense posts for long.
I will consult with the other two moderators (who are superb programmers) for their take.
Not that I am so much interested, but this account is _clearly_ a troll.
Can I ask what are the moderator policies regarding trolling?
Hello Marco,
Allow to me to attempt a succinct clarification.
I simply despise the "he is a troll posts" particularly as prior to that question, you express your disinterest (which is your right incidentally) in the answer anyway.
Complain to a moderator.
This way is simply not the way to do it; yet a number of persons insist on doing it this way.
I have removed examples of Henk's posts before and may do so again, but without the assistance of the programmers in particular, I cannot assess what is, and what is not, trolling here.
The better solution is in (1), but he does not like it and he will show you his prefered (2), then he breaks it in (3) then asks for better solution in (4).
So we go on circles here. I recommend (1), he likes (2) he breaks it in (3) and ask in (4), you recommend (1), he likes (2) ... We go on infinite loop .
He probably has some problems and needs some help.