Chris wrote:
> You could indeed save your work as big blobs of text in 5!:5 
> format 

I think I understand his point now, and I think you may have misunderstood it. 

Have you ever used the Dyalog IDE?  It's breathtaking.  Gorgeous.  Sublime.  

I think what Joe (and many of the rest of us!) want is something akin to that, 
and he does not care about how it actually stores
code.  Imagine a J IDE similar to Dyalog's, but which writes functions to 
script files.  Not as big, ugly blobs, but in properly
formatted, nicely laid-out script files.  

The scripts would not be any different than they are now.  In particular, they 
could be edited by any editor, shared via email,
cut, copied, pasted, rearranged, reloaded, etc.  A J script edited by Magic J 
IDE v2.0 would be indistinguishable from one edited
in notepad, or in the current J IDE.

The difference would be in the IDE.  For example, if I typed a function name 
into the session, and double clicked it, or put my
cursor over it and pressed SHIFT+Enter, a small window could pop up with the 
function's definition, which I could edit.  Then I'd
press Esc and the new definition would be loaded into the session and 
simultaneously written (nicely) into the proper place in a
script file.  

Alternatively, Shift+Enter could do some of the magic that CTRL+F1 and  edit_z_ 
 do:  find the script which defined the cursor'd
name, open it in a new script window, and put the cursor on the first line of 
its definition.  Then I could edit-edit-edit, CTRL+W
(or some version of CTRL+W which puts focus back in the session window, like 
F12 does), and merrrily go on my way with the new
version of the name.

(This latter isn't always the right thing to do:  Shift+Enter implies that only 
the new definition of the current name should be
loaded, not the entire script which defined it, which could have side effects.)

There are some edge conditions:  What if the current name wasn't loaded from a 
script?  What if it were typed directly in the
session window?  One (very nice!) thing that could be done is to inspect the 
input log, extract all the lines that (could've)
contributed to the creation of the name, pull them out in order, and put them 
in a temp script, ready to be edited and loaded.

Just because J is script-based doesn't mean the IDE can't automate some common 
tasks.  It can just be an advanced tool to work
with scripts.

-Dan

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to