Skip to content

WISH: a way to extend dyn-print at runtime #180

@hiiamboris

Description

@hiiamboris

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions