I suspect that the chess game uses interactive
stdin/stdout conversation, as opposed to single
in/out exchange that all the task operations are
constructed for.

If that's the case, a diffent implementation
is needed, possibly a stateful object with
methods like read, write, peek, wait, etc.
There are different strategies: sync vs async
IO, overlapped IO etc.

Is there a sample of a small complete session
with the chess programm written in C or Perl, etc?
Preferably reproducible in a simple way.


--- JC Coez <[EMAIL PROTECTED]> wrote:

> I used "spawn" (from task.ijs) and I understand now that the chess engine is 
> always requiring some data and loops with a reply such as 'invalid 
> command,try...' until the variable which receives the data is 32meg. and J 
> hangs... I don't know how to modify the ReadAll so that the loop would not 
> occur and the process would only wait until new data colud be sent to the 
> engine. Is that possible ?
> 
> ----- Original Message ----- 
> From: "bill lam" <[EMAIL PROTECTED]>
> To: "Programming forum" <[email protected]>
> Sent: Friday, March 30, 2007 9:20 AM
> Subject: Re: [Jprogramming] stdin/stdout
> 
> 
> > Was the chess engine actually designed to communicate with other programs 
> > with stdin/stdout?  As Joey pointed out, stdin/stdout usually buffered so 
> > that it may not be suitable for interactive communication.  I guess you 
> > have to find out the exact communication protocol first.
> >
> > JC Coez wrote:
> >> I would like to use a chess engine , such as Arion 
> >> http://transversale.fr/Arion/Arion.htm . I am writing a GUI to play chess 
> >> with J (using grid) and would like to add as an extra, such an engine. 
> >> This program is a windows application using stdin and stdout to read 
> >> chess moves and write possible solutions. I tried other similar engines 
> >> without success. I think I miss something in the use of pipes...or is it 
> >> impossible to do it ?
> >>
> 
> >>>> I did try the shell, fork and spawn, but it does not work in my case. 
> >>>> I
> >>>> tried to use the verbs createPipe and CreateProcess but without 
> >>>> success.
> >>>> Instead J is not responding...The createProcess is fine but when I want 
> >>>> to
> >>>> Read or Write thru a Pipe, I have to close the process manually.
> >>>> Any other track ?
> >>>> Thanks for help
> >>>> JC Coez
> >>>>
> >>>> >
> >>>> > ----- Original Message -----
> >>>> > From: "Björn Helgason" <[EMAIL PROTECTED]>
> >>>> > To: "Programming forum" <[email protected]>
> >>>> > Sent: Wednesday, March 21, 2007 11:37 AM
> >>>> > Subject: Re: [Jprogramming] stdin/stdout
> >>>> >
> >>>> >
> >>>> >> Try out
> >>>> >>
> >>>> >> require'task'
> >>>> >>
> >>>> >> shell
> >>>> >> fork
> >>>> >> spawn
> >>>> >>
> >>>> >> 2007/3/21, JC Coez <[EMAIL PROTECTED]>:
> >>>> >
> >>>> >
> >>>> >
> >>>>
> >>>>
> >>>> ----------------------------------------------------------------------
> >>>> For information about J forums see http://www.jsoftware.com/forums.htm
> >>>>
> >>>
> >>>
> >>>
> >>> -- 
> >>> Björn Helgason, Verkfræðingur
> >>> Fugl&Fiskur ehf, Þerneyjarsund 23, Box 127
> >>> 801 Grímsnes ,t-póst: [EMAIL PROTECTED]
> >>> Skype: gosiminn, gsm: +3546985532
> >>> Landslags og skrúðgarðagerð, gröfuþjónusta
> >>> http://groups.google.com/group/J-Programming
> >>>
> >>>
> >>> Tæknikunnátta höndlar hið flókna, sköpunargáfa er meistari 
> >>> einfaldleikans
> >>>
> >>> góður kennari getur stigið á tær án þess að glansinn fari af skónum
> >>>          /|_      .-----------------------------------.
> >>>         ,'  .\  /  | Með léttri lund verður        |
> >>>     ,--'    _,'   | Dagurinn í dag                     |
> >>>    /       /       | Enn betri en gærdagurinn  |
> >>>   (   -.  |        `-----------------------------------'
> >>>   |     ) |        (\_ _/)
> >>>  (`-.  '--.)       (='.'=)
> >>>   `. )----'        (")_(")
> >>>
> >>
> >>
> >> --------------------------------------------------------------------------------
> >>
> >>
> >>
> >>> ----------------------------------------------------------------------
> >>> For information about J forums see http://www.jsoftware.com/forums.htm
> >>> ---------------------------------------------------------------------------------------
> >>>
> >>> Orange vous informe que cet  e-mail a ete controle par l'anti-virus 
> >>> mail.
> >>> Aucun virus connu a ce jour par nos services n'a ete detecte.
> >>>
> >>>
> >>
> >>
> >> ----------------------------------------------------------------------
> >> For information about J forums see http://www.jsoftware.com/forums.htm
> >>
> >
> >
> > -- 
> > regards,
> > bill
> > ----------------------------------------------------------------------
> > For information about J forums see http://www.jsoftware.com/forums.htm
> > ---------------------------------------------------------------------------------------
> > Orange vous informe que cet  e-mail a ete controle par l'anti-virus mail. 
> > Aucun virus connu a ce jour par nos services n'a ete detecte.
> >
> >
> > 
> 
> 
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
> 



 
____________________________________________________________________________________
Sucker-punch spam with award-winning protection. 
Try the free Yahoo! Mail Beta.
http://advision.webevents.yahoo.com/mailbeta/features_spam.html
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to