converted to 1.6 markup
|Deletions are marked like this.||Additions are marked like this.|
|Line 3:||Line 3:|
|Line 99:||Line 99:|
|Certain state in J is completely hidden from the user, and is neither queriable nor set-able. This is the effect of "warming up" a J session. See Roger's example of this in [wiki:JForum:programming/2006-October/003601 the closing the .ijx window thread] in the Forums.||Certain state in J is completely hidden from the user, and is neither queriable nor set-able. This is the effect of "warming up" a J session. See Roger's example of this in [[JForum:programming/2006-October/003601|the closing the .ijx window thread]] in the Forums.|
How does state accumulate in a J session? How does it effect execution? How can we query it, reset it, and carry selected parts forward to a fresh J session?
M. state? Does this persist across independent invocations of memoized names?
names & locales
- retain names
- retain locales
- retain locale paths
NB. Perhaps only retain named locales, and let scripts create numberd locales? NB. but then there's no guaruntee the same objects will be represented by the NB. same numbers
- mapped files
NB. (see also file names and numbers, and file locks, in the !: section)
foreigns (not wd)
1!:20 Open names+numbers
1!:31 File locks
1!:43 Query Working Dir
1!:45 Reload profile
NB. Set Env? Maybe this inherets automatically from parent J to child J?
4!:3 NB. Reload scripts, in order? Use LOADED_j_ to determine which were loaded "by hand"? NB. LOADED_j_ is a front end issue
9!:36 NB. See if this sort of thing is the same in the default profile (ie. invoke with the same command line, and only set the 9!:x that are different)
13!:0 NB. 13!:17
13!:11 NB. Reset errorno and errmsg
13!:12 NB. using assert?
15!:0 NB. Way to figure out which DLLs are currently loaded into memory?
15!:6 NB. Way to restore mapped names?
18!:5 NB. 18!:4
Certain state in J is completely hidden from the user, and is neither queriable nor set-able. This is the effect of "warming up" a J session. See Roger's example of this in the closing the .ijx window thread in the Forums.
invocation command line NB. [: 15!:1@:,&0 _1@:> ('kernel32 GetCommandLineA *c'"_) 15!:0 ''"_
- IJX window
- contents (history) NB. Motivation to restart J: too much data in wd
- state (max, min, normal)
- script windows:
- contents (scripts)
- state (max, min, normal)
- visible sections (scroll cursor)
- selected text
11!:0 NB. Restore forms & such?
NB. What about gl and isi and all that stuff?
The J session manager also accumulates "hidden" state, e.g. LOADED_j_, but all this state is represented by names in locales controlled by the standard library. So persisting those locales is a comprehensive way to persist this "hidden" state.