Hello Dan,

Thanks for the detailed explanations and the sample code. I shall look into
it.

Dan> I'm a little concerned that this happens often enough that you need a
button ;)

Actually, there is more to it than bugs! What I am doing is a prototype that
is evolving very fast. Even starting and getting to the place I want to -
even though it is fast since I use J - distracts me from the problem I want
to solve.

I figured that with this facility available in J, it would speed up my
development process since I can focus on exactly the aspects I want to
improve on - and that too directly on a executable!!

In my case, it is about two communicating windows applications using a
socket. And I would like to play around with the protocol between the two
processes. Here I see that this idea has tremendous benefit.

Having said that I would like to know what are the limitations by doing it
this way. Since the running code has a state in memory - particularly when I
use some global variables, I/O or even a Window - there are a few things
that can corrupt the running process image. Are there any such aspects that
I need to care for when I use this mechanism as a way to develop my
application? This can lead to, for example, how I split my code into
reload-sensitive and reload-independent parts and allow only the
reload-independent parts to be reloaded.

For the following:

Dan > I didn't mean that it wouldn't work on Windows, I meant only you
couldn't type that directly into the session manager (the IJX window).  It
has to appear in a script file and be run indirectly.  It will work just
fine on Windows (or any other J platform).

Oops, I missed the IJX window part and interpreted it differently. Now I
follow what you say.


Regarding
Dan>      matrix_reloaded_button =: 3 : 'load ''c:\path\to\script\buggy.ijs'

Yes. This is what I want to do. However, I do not want to hard code the
path. I plan to use the relative paths that J installation provides
(~user\projects\...).

I liked the version you mention before where the entire form is reloaded
without any fixed names. For now, I shall incorporate what you have
suggested and see how it handles my situation.



Regards,
Yuva



On Dec 18, 2007 9:05 AM, Dan Bron <[EMAIL PROTECTED]> wrote:

> Yuva wrote:
> > I want to reload the form to handle the bugs that
> >  can arise in production code.
>
> I'm a little concerned that this happens often enough that you need a
> button ;)
>
> In any case, when I wrote:
> > For example,  3 : 'load (4!:4<''y'') { 4!:3$0' 0  will reload
> > whatever script it's run from (it won't work in the IJX
> > window).
>
> I didn't mean that it wouldn't work on Windows, I meant only you couldn't
> type that directly into the session manager (the IJX
> window).  It has to appear in a script file and be run indirectly.  It
> will work just fine on Windows (or any other J platform).
>
> Actually, I just tested it, and it appears there's been some undocumented
> changes in this area.  Apparently local names are no
> longer valid inputs to  4!:4  .  That's unfortunate (but only for this one
> small use; it may herald bigger, more important changes
> in this area).
>
> So, in lieu of  y  , you must use a global name.  I suggest you use the
> name of the function itself.  In the case I laid out, that
> would be  matrix_reloaded_button  .
>
> I put together a small example for you:
>
>
> http://www.jsoftware.com/svn/DanBron/trunk/uncategorized/matrix_reloaded.ijs
>
> BTW, if you know the name of the script you want to reload then all this
> is overkill .  In that case, you really only need to
> define a verb like this:
>
>        matrix_reloaded_button =: 3 : 'load ''c:\path\to\script\buggy.ijs''
> '
>
> -Dan
>
> ----------------------------------------------------------------------
> 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