JHS talks directly to the socket It does not write to stdout. Writing to
stdout is the cgi technique.

On Wed, Feb 15, 2012 at 9:11 PM, bill lam <bbill....@gmail.com> wrote:

> I might be wrong but I once browse the source of JHS and found that
> JHS itself writes to standard output when generating html response.
> That might conflict with other 2!:1.  Eric should have a more
> definitive answer.
>
> Чтв, 16 Фев 2012, Ian Clark писал(а):
> > Haven't been able to try it on Windows. I would guess there'd be no
> > problem. There wasn't when I did this sort of stuff with APL+Win. If I
> > recall (years ago) sndPlaySound had a Boolean argument to optionally
> > make it synchronous/asynchronous.
> >
> > But something you said hinted to me it might be Firefox/javascript
> > that's causing the trouble, not j7.
> >
> > I've just tried it under jcon701 and there is indeed no problem.
> > jcon701 will happily accept and execute input even while the forked
> > child process is running, eg a sound is playing. In other words, the
> > result of i.6 appears immediately.
> >
> > Now I've tried it under Safari (which is better integrated with the
> > Mac) instead of Firefox. Still get the same problem.
> >
> > On Wed, Feb 15, 2012 at 1:34 PM, David Mitchell <davidmitch...@att.net>
> wrote:
> > > I was able to get a similar result as the one you saw with jhs7 on
> OpenSuse with
> > > firefox and Sox play.  I also discovered that jconsole7 and jgtk7 on
> OpenSuse
> > > return from the spawn and display the i.6 result while the sound is
> playing.
> > >
> > > On win7, I installed sox play.exe and found that
> > > fork_jtask_ 'D:\sox-14-3-2\play -q d:\test.wav rate -v 44100'
> > > would return immediately and display the results of i.6 while the
> sound was
> > > playing on jconsole7, jgtk7 and jhs7 with firefox.
> > >
> > >
> > > On 2/14/2012 16:04, Ian Clark wrote:
> > >> 2!:1 is not truly asynchronous in JHS, it seems. The net result is
> > >> that I cannot see how to launch a child process without the session
> > >> hanging until the child terminates.
> > >>
> > >> Strange to say, the jijx session immediately resumes, and will accept
> > >> (re-)input. But it will not execute the inputted expression. Inside a
> > >> verb however, execution continues past 2!:1 (which successfully forks
> > >> the child process), but after completion of the verb the session is
> > >> silent (until the child process is terminated).
> > >>
> > >> Example:
> > >> Suppose test6s.wav is a sound file lasting 6 seconds. (Chosen to last
> > >> long enough to allow "i.6" to be entered.)
> > >>
> > >>     2!:1 'afplay ~/wav/test6s.wav&'
> > >>     i.6
> > >> 0 1 2 3 4 5
> > >>
> > >> The jijx accepts i.6 but hangs until test6s.wav finishes playing. Only
> > >> then does 0 1 2 3 4 5 appear.
> > >>
> > >>     JVERSION
> > >> Engine: j701/2011-01-10/11:25 build: Feb  6 2011 16:16:29
> > >> Library: 7.01.055
> > >> Platform: Darwin 64
> > >> Installer: j701a_mac64.dmg
> > >> ----------------------------------------------------------------------
> > >> For information about J forums see
> http://www.jsoftware.com/forums.htm
> > >>
> > > ----------------------------------------------------------------------
> > > For information about J forums see http://www.jsoftware.com/forums.htm
> > ----------------------------------------------------------------------
> > For information about J forums see http://www.jsoftware.com/forums.htm
>
> --
> regards,
> ====================================================
> GPG key 1024D/4434BAB3 2008-08-24
> gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to