[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: computer-go: Perl Module for next move.
There is a module for Perl called inline, which permits you to embed
sections of different compiler code within the Perl script and have it
accessible. Its primarily oriented towards a Unix-like environment,
although I understand the .40 release is capable of running in a Win32
environment as well. http://search.cpan.org/search?dist=Inline
Python also has an additional advantage IIRC in that it has built-in
support for direct conversion to C code, permitting you to compile
at a later point for speed. Perl has several utilities that permit similar
actions, but they seem to be more after-the-fact... Python's way appears
to be part of its core design.
Kurt
(Not a perl fanatic, but its what I do for the moment. My job
believes that self-improvement, such as learning new languages
like Python, for the corporate benefit should only happen in
my personal time...)
Inge Wallin wrote:
> Matthew Corey Brown wrote:
>
> > I'm interested in tracking down a perl interface for gomodem and gungo's
> > engine/utils.c
> >
> > I'm interested in giving a function the current board, then getting back
> > an array of answers either the resulting borad after dead peices are
> > removed or an illeagle move. Perl is needed cause I have a mishmash of
> <snip>
>
> You can do this in many ways.
>
> 1. There is a protocol in Gnu go that is called GTP, Go Text Protocol
> that is intended for exactly these kind of things. If you really
> want to use perl, you can run gnugo as a subprocess to the perl
> process and talk to the gnugo process using GTP.
>
> 2. There is a program that is used to wrap libraries into modules
> for a number of script languages, among them perl, python and TCL.
> I can't remember the name of it right now, but I am sure somebody
> else here on the list can help you, or perhaps you could track it
> down yourself. You can use that to wrap Gnu Go into a perl module.
>
> I was thinking of doing this myself later, but I haven't got around
> to it yet.
>
> By the way, if you are not a perl fanatic, you might want to try
> python instead. Just as easy as writing perl, but much much more
> readable afterwards. I once heard python described as "perl the
> way god meant it to be", and I can sort of agree with that. Take a
> look at http://www.python.org/. It is well invested time to learn
> python.
>