dyna icon indicating copy to clipboard operation
dyna copied to clipboard

log.dyna file

Open jeisner opened this issue 11 years ago • 1 comments

Repl commands should go into a log script, by default called log.dyna.
Such a script can be reexecuted by calling /usr/bin/dyna on it later. If the user edits the log file during the repl session that is writing it, then we notice this at the start of the next command. Prior to executing the next command, we cold-start by executing the new version of the script from a blank slate (but suppressing any output).

When a new dyna session starts and its logfile already exists, probably rename it to a numbered backup, e.g., the old log.dyna --> log.3.dyna.

jeisner avatar Jun 04 '13 04:06 jeisner

Note on where this design is going:

Remember that the eventual design is that a .dyna file can contain both rules and scripting commands. It defines a dynabase together with some scripting commands that have side effects, which are stored as a special element of the dynabase, analogous to the "main" routine in Java. The scripting command "do d" (or "exec d" or "run d" or something) says to run the scripting commands in dynabase d.)

(If there are scripting commands in the middle of the file, then we actually define several dynabases so that each scripting command is referring to the dynabase defined above it. Each dynabase is an extension of the previous one and its scripting commands start with calling "do" on the previous one.)

jeisner avatar Jun 04 '13 04:06 jeisner