This PR adds support for a STDIN channel stream that overrides *query-io* and *standard-input*. This makes it possible to detect input requests without overriding the internals of Maxima functions like retrieve. It also adds the beginning of a testing framework for the client side. Some unneeded functions are removed and all Maxima overrides are moved into overrides.lisp.
Mechanism
The class stdin-stream looks for finish-output calls on *query-io* and interprets them as printed prompts which are used in an input_request. The read side of *query-io* then filled with the results. The iopub-stream assists by looking for ANSI SOS and ANSI ST which are used as prompt delimeters. It writes prompts to *query-io* causing an input_request. All read calls from *standard-input*, *debug-io* and iopub-stream are routed to stdin-stream also.
All of this makes retrieve, $read, the dbm-loop prompts and the Lisp functions such as yes-or-no-p work without overriding.
This PR adds support for a STDIN channel stream that overrides
*query-io*
and*standard-input*
. This makes it possible to detect input requests without overriding the internals of Maxima functions likeretrieve
. It also adds the beginning of a testing framework for the client side. Some unneeded functions are removed and all Maxima overrides are moved intooverrides.lisp
.Mechanism
The class
stdin-stream
looks forfinish-output
calls on*query-io*
and interprets them as printed prompts which are used in aninput_request
. The read side of*query-io*
then filled with the results. Theiopub-stream
assists by looking for ANSI SOS and ANSI ST which are used as prompt delimeters. It writes prompts to*query-io*
causing aninput_request
. All read calls from*standard-input*
,*debug-io*
andiopub-stream
are routed tostdin-stream
also.All of this makes
retrieve
,$read
, the dbm-loop prompts and the Lisp functions such asyes-or-no-p
work without overriding.