Sometimes I want to give a user the opportunity to intervene in some otherwise-automated process if a certain condition is satisfied.
As a toy example, consider an AbstractDict object where upon inserting a key-value, if the key exists and isinteractive(), the user is dropped into a REPL mode that lets them inspect the contents of the dictionary, the pair being added, and decide what to do.
Currently I don't think ReplMaker can be used for this case, because it can only add REPL modes which are triggered from a key-press in the default Julia REPL. What would be needed is something that returns a REPL object and runs it on call. I don't think this would require too much on top of the REPL stdlib, however the stdlib does not have a very good (or well documented) API for this sort of thing, so I think it would be worth doing here.
Sometimes I want to give a user the opportunity to intervene in some otherwise-automated process if a certain condition is satisfied.
As a toy example, consider an
AbstractDictobject where upon inserting a key-value, if the key exists andisinteractive(), the user is dropped into a REPL mode that lets them inspect the contents of the dictionary, the pair being added, and decide what to do.Currently I don't think
ReplMakercan be used for this case, because it can only add REPL modes which are triggered from a key-press in the default Julia REPL. What would be needed is something that returns a REPL object and runs it on call. I don't think this would require too much on top of theREPLstdlib, however the stdlib does not have a very good (or well documented) API for this sort of thing, so I think it would be worth doing here.