> > 6) Missing: Save the session that has unfinished experiments....
> >
> > Since Step 6 is not recommended, how do you accomplish that part?
You don't -- it's an antipattern.
Both saved workspaces and saved session logs.
While the former is simply hard to maintain,
the latter has very occasional interest for historical
reason: this is the session where I discovered X,
then you save or copy it to an archive;
or when you don't have time to transfer it to a script,
then the saved temp 1.ijx works fine.
Scripts are really much better:
- they keep things organized; they allow to keep data in
declarative form (a=: %:1+2*i.3 4), not as a matrix that you
don't remember where it came from.
- you can re-arrange things, put comments; refactor in general,
which organizes the thought process
- you can easily diff and version-manage the code
- the data can be stored in satelite files in more manageable
form such as CSV, etc.
To preserve the flow of the session, but with the ability
to easily rearange things, you can edit the session log,
then remove all the results and transfer the commands to
the script between 0 : 0 ... ) E.g.
0 : 0 NB. select all. Ctrl+E
load'stats'
]A=: 10 5 [EMAIL PROTECTED] 100
3 lsfit (,: [EMAIL PROTECTED]){."1 A
dstat {."1 A
)
And you get yourself a mini-lab.
Or even the whole file can be like that without 0 : 0 ... )
See http://www.jsoftware.com/jwiki/System/Beta/Pointer_Call
The practice shows that if it were useful someone
would have created it and used it. But for practice,
you can look at jwdict that can be adapted for workspaces.
A more useful thing for session would be something
similar to the "session executed lines" in
http://www.jsoftware.com/jwiki/System/Interpreter/Requests
which is a reusable executable workbook.
--- Chris Burke <[EMAIL PROTECTED]> wrote:
> Yuvaraj Athur Raghuvir wrote:
> > Aha! So, there has been an explicit decision to not support workspaces.
> >
> > Just wondering - given that the learning of J has a lot to do with
> > experimentation, a whole load of expressions are tried before finalizing on
> > a form that one wants to store in a script file for later use. And in real
> > life there are interruptions that means the session has to be shut down
> > with
> > an intention of carrying on at a later point in time.
> >
> > I thought that preserving the sessions could be one way of getting back to
> > that context fast.
> >
> > Currently my practice is as follows:
> > 1) Keep a J Session active
> > 2) Keep a J Script file open
> > 3) Experiment with real data in the J Session.
> > 4) When satisfied, transfer the learning & code into the Script file
> > 5) Save the script file.
> > 6) Missing: Save the session that has unfinished experiments....
> >
> > Since Step 6 is not recommended, how do you accomplish that part?
>
> It sounds like you are coming from APL, in which case a good starting
> point is http://www.jsoftware.com/jwiki/Doc/J4APL, in particular see
> section Workspaces and Scripts.
>
> The workspace or saved-session approach is not used in J. Also, you need
> not create definitions in the ijx window and then copy them to a script
> once you have them working. Typically, ijx is used only for trivial
> experimentation. Instead, create your definitions in scripts, and run
> the scripts. The script files are saved each time they are loaded, so
> work in progress is always being saved.
>
> The J IDE makes working with scripts pretty easy. Project Manager can
> organize them, and a click of the Test button, or running a test script
> from a programmed function key, can save all open scripts, then run your
> application.
>
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm