2012-09-21

interactive adda sessions

7.19: adde/interactive adda sessions:
. rather than the usual terminal interaction,
there are 3 boxes (input, output, and hist)
. hist (short for history) is a text list of
what went into the input box recently .
. it's both a sequence of text lines,
so, you can edit it;
and it's also a sequence of statements,
so you can set your cursor on any statement
and do a {ctrl-r, menu/run}
to have the selected statement copied to input
where it then gets run .
[7.19: 9.5:
. the interaction file can be decomposed by
saving the current interaction sequence
as a subprogram named x:
it then saves it in a file named x`body,
like any other subrogram definition;
and, back at the hist file,
the sequence that had just been saved
is turned into a subprogram definition .]

. the hist window is also an outline editor,
so, for each subprogram definition,
the body of the subprogram can be collapsed
into the name of the subprogram .
. you can either see things as a tree,
or see just one node of the tree .

. each interactive symbol definition
is stored as a file in a folder named
interactive.adda; and when you're done,
you can save the session to folder x,
so then it copies interactive.adda to x.adda .
. if x already exists, you can either
merge hist with the selected
or have hist replace it .
9.5:
. merging is useful when your interactions are
developing pieces of a library;
replacements would useful for keeping track of
recent interactions,
eg, by naming sessions after days of the week,
you could always keep 7 days of session history .

No comments:

Post a Comment