One aspect of this project which is surprisingly difficult is standard output. Julia provides a handy redirect_stdio method for this, but there are a number of shortcomings. This is what is currently used to get the standard output from a Cell in Olive.
The only way to write this output into memory is to use a Pipe.
redirecting the output in this way duplicates stream descriptors -- throwing an error if more than one is opened at a time.
proposed solution
The solution to this, hopefully, will rely on the mutation of the new olive_module bare modules. These modules will remove println(a::Any) = println(stdout, a::Any ...) and replace it with println(a::Any ...) = println(ourbuffer, a ...)
Basically, we are going to change the Methods inside of Base to facilitate this rather than redirecting our output.
standard output
One aspect of this project which is surprisingly difficult is standard output. Julia provides a handy
redirect_stdio
method for this, but there are a number of shortcomings. This is what is currently used to get the standard output from aCell
inOlive
.Pipe
.proposed solution
The solution to this, hopefully, will rely on the mutation of the new
olive_module
bare modules. These modules will removeprintln(a::Any) = println(stdout, a::Any ...)
and replace it withprintln(a::Any ...) = println(ourbuffer, a ...)
Basically, we are going to change the
Methods
inside ofBase
to facilitate this rather than redirecting our output.