I have to apply a series of kludges to the Spaces Console in absence of this feature to satisfy the following restrictions:
- dyn-print can only be extended by R/S code
- R/S code needs to call Red code, which requires a
#call
#call requires a path known at compile-time (so we already have an R/S wrapper around a static Red wrapper around a dynamic Red print function...)
-e option produces code unknown at compile-time
- most reasonably advanced code (esp. Spaces) require
-e flag to compile
- most
print calls are baked in and cannot all be replaced at runtime without dyn-print
- I'm using
console-on-demand which provides a console if it receives command line arguments like --help
console-on-demand has to override print to spawn that console
console-on-demand's print itself gets baked in in some places, as it is compiled (has to be, otherwise unreliable)
console-on-demand itself is only relevant for Windows
- interpreted version cannot use any
dyn-print, routines, R/S code, so it has to reload existing print invocations, even though it can't cover all of them
This ends up being an esoteric and brittle mess of code.
I would like to have a way to extend dyn-print without any R/S code, at any time.
I have to apply a series of kludges to the Spaces Console in absence of this feature to satisfy the following restrictions:
#call#callrequires a path known at compile-time (so we already have an R/S wrapper around a static Red wrapper around a dynamic Red print function...)-eoption produces code unknown at compile-time-eflag to compileprintcalls are baked in and cannot all be replaced at runtime without dyn-printconsole-on-demandwhich provides a console if it receives command line arguments like--helpconsole-on-demandhas to overrideprintto spawn that consoleconsole-on-demand's print itself gets baked in in some places, as it is compiled (has to be, otherwise unreliable)console-on-demanditself is only relevant for Windowsdyn-print, routines, R/S code, so it has to reload existingprintinvocations, even though it can't cover all of themThis ends up being an esoteric and brittle mess of code.
I would like to have a way to extend
dyn-printwithout any R/S code, at any time.