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

Re: [MacPerl] availability of output in remote control mode



>John_Peterson@byu.edu writes:
>>How does one become aware that output is available from a
>>remote-controlled MacPerl script.  Do you really just have to keep
>>polling?
>
>Yes, there currently is no mechanism to "push" data from Perl other than
>reading or the end of the script.
>
>>The SASE and WANT parameters are for input, is there anything
>>analogous for output?
>
>No, but I'm willing to listen to reasonable suggestions that would demonstrate
>the practicality and usefulness of such a mechanism.

Well, I don't know whether this is feasible. What would really make my day
would be an option that allows me to send data directly to STDIN of a
running script and have the AppleScript component wait for an application
response with the data written to STDOUT from Perl. Vice versa Perl should
just wait till it receives a data event.

What would I use it for?

I have > 10 MB of data that I can only get at in chunks < 32k (blessed be
HyperCard's storage limits!). The data is linked to an index I need to
consult after every chunk. At the moment I use one Do Script event per 32k
chunk. With a Send Data event as described above I could avoid restarting
one and the same perl script each time I process a chunk (or gobbling up
processing power polling for the output).

Well, give them something great and instead of saying thank you they will
be clamouring for more.

                                            thank you,

                                                 hansmartin


--
/ Hans Martin Lehmann          []  Wiesendangerstr.4          \
| E-Mail: hmlehman@es.unizh.ch []  CH-8003 Zurich/Switzerland |
| Phone: (41 1) 462 18 51      []  Kleegaertenstr. 57         |
\        (41 28) 46 29 75      []  3930 Visp                  /