[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [computer-go] GTP and KGS



Peter Drake wrote:

On Wednesday, July 14, 2004, at 11:43  AM, Richard Brown wrote:

Peter Drake wrote:

Any clues as to what the problem is? GoGui is happy with this response to the name command.

Are you using System.out.print() or something else?  I ask because

System.out.println.
Aha!  This may be your problem.  System.out.println() appends its
_own_ end-of-line character(s) to whatever you've asked it to print.

In the Unix world, the end-of-line convention is <LF>, just a 10.

In the DOS world, the end-of-line convention is <CR><LF>, a 13
followed by a 10.

In the Apple world, the end-of-line convention is (or once was)
either <LF><CR> or just <CR>.  (Can't remember which.)

In the now-defunct DEC world, the end-of-line convention was once
either <LF><CR> or just <CR>.  (Can't remember which.)

All these differing end-of-line conventions are the historical reason
that FTP (File Transmission Protocol) has an "ascii" versus "binary"
switch.  If you send a text file in "binary" mode, you're likely to
get the wrong end-of-file convention on the receiving end, unless the
receiver has the same kind of computer the sender has.

In your case, there might even be a spurious <CR> leftover from your
"list_commands", causing _anything_ you send next to be malformed.

So, your jvm's System.out.println() is probably using Apple's
end-of-line convention.  Try System.out.print() instead, and
concatenate the <LF> characters to the text of your commands
(as in my example code).

I'm betting dollars to holes in doughnuts that it will work.

--
Richard L. Brown             Office of Information Services
Senior Unix Sysadmin         University of Wisconsin System
                            780 Regent St., Rm. 246
rbrown@xxxxxxxxxxxxxxxxx              Madison, WI  53715

_______________________________________________
computer-go mailing list
computer-go@xxxxxxxxxxxxxxxxx
http://www.computer-go.org/mailman/listinfo/computer-go/