Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Symbolic: A doomed effort, or it's time to get my lead-lined jockstr

Author: Tord Romstad

Date: 04:47:29 02/17/04

Go up one level in this thread


On February 17, 2004 at 07:25:35, Sune Fischer wrote:

>
>>>Perhaps that says more about your C programming than your Lisp programming.
>>
>>I've already conceded that point.  If you read my last post again, you
>>will see that I explicitly state that I am a much better Lisp programmer
>>than C programmer.  You are one of those who have detailed knowledge and
>>lots of experience with low-level programming and computer hardware,
>>and you are therefore able to squeeze out more performance from a C or
>>assembly language program than I would ever manage.  Without such
>>knowledge (which, I think, most of us do not posess), C simply doesn't
>>offer any significant performance advantage.
>
>I think that depends on exactly how high-level Lisp is.
>I'd hate to use Lisp for writing an engine if e.g. Lisp didn't have bitwise
>operators. :)

In fact it has more bitwise operators than C.  But the difference is of
course unimportant, because the missing ones can be implemented in C with
a line or two of code.

>>There is noone who forces you to use the same language for the whole program,
>>of course.  Performance-critical parts of a Lisp program could be rewritten
>>in C or assembly language.  Mixing Lisp and assembly language tends to be
>>much easier and more comfortable than mixing C and assembly language, because
>>of the power of Lisp macros.
>
>I don't really follow you here, you seem to be saying that Lisp is good because
>you don't have to use it(!) but you can replace it with assembly?

What I tried to say was that if I wanted to write an assembly language
chess program, I would have written it in Lisp, making extensive use of
Lisp macros.  Essentially I would build a simple special-purpose low-level
chess programming language with a Lispish syntax, and use macros to
transform this to assembly language.  Much easier and more comfortable
than writing directly in assembly language, but with very little loss
of performance.

For an iteresting example of this type of approach, look at the following
article describing Naughty Dog Software's use of Lisp to create a language
called GOAL ("Game Oriented Assembly Lisp"), which they use to develop
video games for the Sony Playstation.  This is of course different from
chess programming, but it is still an example of programs with very high
performance requirements:

http://www.franz.com/success/customer_apps/animation_graphics/naughtydog.lhtml

>It seems one can't really argue in favor using a high-level language solely
>because it is high-level, and then afterwards ask people to use inlined assembly
>for speed when the high-levelness doesn't cut it.
>
>Somehow this seems contradictory to me.

The point is that high-level languages are sometimes the perfect tools
for writing low-level programs.  :-)

Tord



This page took 0 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.