That's exactly what I'm going to do, @Don.
It's the "silly solution" I proposed in my original post, but after a
few trials, I've decided it's not so silly after all.

There will only be one call of jconsole needed following each user
interaction with my proposed Xcode-written top-end. Not one per J
statement.

The time to setup up and teardown the J environment several times in a
typical session (of which saving and reloading a script of the changed
variables is normally only a small proportion) seems tolerable in
practice, indeed hardly noticeable. Gotchers may emerge farther into
the project, but for now I can proceed with building a prototype
without having to work out how to converse with a long-running J
daemon. The result will be oh-so-robust, because there's so little to
go wrong.

(But it would be nice to know how to do it the daemon way.)

Ian

On Mon, Nov 9, 2015 at 9:25 PM, Don Guinn <dongu...@gmail.com> wrote:
> You could write out pertinent data to a file before ending the J session to
> read back in when you run jconsole again.
>
> On Mon, Nov 9, 2015 at 1:20 PM, Ian Clark <earthspo...@gmail.com> wrote:
>
>> > You should think of each terminal command line as simulating a separate
>> run of the program you are modeling.
>>
>> That is my understanding too. Therefore I guess the only way I can
>> communicate sensibly via Terminal with a daemon listening on a port is
>> via something like netcat. As per your example, or one of the examples
>> given by: man nc. This is precisely where the usage of NSTask is hazy
>> to me, and the documentation doesn't seem to help (or else I can't
>> read it properly). I'm going to look for more sample code.
>>
>> On Mon, Nov 9, 2015 at 8:10 PM, Raul Miller <rauldmil...@gmail.com> wrote:
>> > On Mon, Nov 9, 2015 at 3:04 PM, Ian Clark <earthspo...@gmail.com> wrote:
>> >> However I don't yet know how to converse via NSTask with a daemon
>> >> through a port. I need to find a tame daemon that will talk to me
>> >> nicely via Mac Terminal, which I can then try to handle via NSTask.
>> >> Then I'll feel more confident about conversing with a long-running
>> >> jconsole process.
>> >
>> > I think you have conflicting (internally inconsistent) requirements here.
>> >
>> > You should think of each terminal command line as simulating a
>> > separate run of the program you are modeling.
>> >
>> > Thanks,
>> >
>> > --
>> > Raul
>> > ----------------------------------------------------------------------
>> > 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
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to