Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make targets of the magic strings "*stdout*", "*stdin*", and "*errout*" changeable #2822

Open
ssiccha opened this issue Sep 18, 2018 · 0 comments
Assignees
Labels
gapdays2018-fall Issues and PRs that arose at https://www.gapdays.de/gapdays2018-fall kind: enhancement Label for issues suggesting enhancements; and for pull requests implementing enhancements kind: new feature release notes: to be added PRs introducing changes that should be (but have not yet been) mentioned in the release notes topic: kernel

Comments

@ssiccha
Copy link
Contributor

ssiccha commented Sep 18, 2018

Change the magic strings to be abstract placeholders for i/o streams, which are initialized to stdout, stdin, and errout of GAP's process. I would introduce new functions Redirect*** and Reset*** for StandardOutput, StandardInput and ErrorOut.

The Redirect*** functions should change its target permanently. I would implement RedirectStandardOutput("*errout*") to redirect "*stdout*" to wherever "*errout*" currently points to. The Reset*** functions can be used to reset the magic strings to point to stdout, stdin, and respectively errout of GAP's process again.

This was discussed in #1815 by @markuspf and @fingolfin.

@ssiccha ssiccha added kind: enhancement Label for issues suggesting enhancements; and for pull requests implementing enhancements kind: new feature topic: kernel release notes: to be added PRs introducing changes that should be (but have not yet been) mentioned in the release notes labels Sep 18, 2018
@ssiccha ssiccha self-assigned this Sep 18, 2018
ssiccha added a commit to ssiccha/gap that referenced this issue Sep 18, 2018
This commit introduces new global variables StandardInput,
StandardOutput, ErrorOutput.

ADD_SET is used since the new global variables are
initialized relatively early in the start-up process,
AddSet is not yet available at this point.

The lib/colorprompt.g was changed to use StandardOutput
instead of defining its own STDOut.

As a next step one can make it possible to change the targets
of the magic strings "*stdout*", "*stdin*", and "*errout*",
as suggested by @fingolfin in gap-system#1815. See gap-system#2822.
ssiccha added a commit to ssiccha/gap that referenced this issue Sep 18, 2018
Makes all functions in error.g use ErrorOutput instead of the magic
string "*errout*". Then the error messages can be redirected by
overwriting ErrorOutput.

This should be temporary. If the target of "*errout*" itself can be
changed, this can be reverted again. See gap-system#2822.
ssiccha added a commit to ssiccha/gap that referenced this issue Sep 18, 2018
This commit introduces new global variables StandardInput,
StandardOutput, ErrorOutput.

ADD_SET is used since the new global variables are
initialized relatively early in the start-up process,
AddSet is not yet available at this point.

As a next step one can make it possible to change the targets
of the magic strings "*stdout*", "*stdin*", and "*errout*",
as suggested by @fingolfin in gap-system#1815. See gap-system#2822.
ssiccha added a commit to ssiccha/gap that referenced this issue Sep 18, 2018
Makes all functions in error.g use ErrorOutput instead of the magic
string "*errout*". Then the error messages can be redirected by
overwriting ErrorOutput.

This should be temporary. If the target of "*errout*" itself can be
changed, this can be reverted again. See gap-system#2822.
ssiccha added a commit to ssiccha/gap that referenced this issue Sep 18, 2018
This commit introduces a new global variable ErrorOutput.

ADD_SET is used since the new global variables are
initialized relatively early in the start-up process,
AddSet is not yet available at this point.

As a next step one can make it possible to change the targets
of the magic strings "*stdout*", "*stdin*", and "*errout*",
as suggested by @fingolfin in gap-system#1815. See gap-system#2822.
ssiccha added a commit to ssiccha/gap that referenced this issue Sep 18, 2018
Makes all functions in error.g use ErrorOutput instead of the magic
string "*errout*". Then the error messages can be redirected by
overwriting ErrorOutput.

This should be temporary. If the target of "*errout*" itself can be
changed, this can be reverted again. See gap-system#2822.
ssiccha added a commit to ssiccha/gap that referenced this issue Sep 18, 2018
This commit introduces a new global variable ErrorOutput.

ADD_SET is used since the new global variables are
initialized relatively early in the start-up process,
AddSet is not yet available at this point.

As a next step one can make it possible to change the targets
of the magic strings "*stdout*", "*stdin*", and "*errout*",
as suggested by @fingolfin in gap-system#1815. See gap-system#2822.
ssiccha added a commit to ssiccha/gap that referenced this issue Sep 18, 2018
Makes all functions in error.g use ErrorOutput instead of the magic
string "*errout*". Then the error messages can be redirected by
overwriting ErrorOutput.

This should be temporary. If the target of "*errout*" itself can be
changed, this can be reverted again. See gap-system#2822.
ssiccha added a commit to ssiccha/gap that referenced this issue Sep 18, 2018
This commit introduces a new global variable ERROR_OUTPUT.

As a next step one can make it possible to change the targets
of the magic strings "*stdout*", "*stdin*", and "*errout*",
as suggested by @fingolfin in gap-system#1815. See gap-system#2822.
ssiccha added a commit to ssiccha/gap that referenced this issue Sep 18, 2018
Makes all functions in error.g use ErrorOutput instead of the magic
string "*errout*". Then the error messages can be redirected by
overwriting ErrorOutput.

This should be temporary. If the target of "*errout*" itself can be
changed, this can be reverted again. See gap-system#2822.
ssiccha added a commit to ssiccha/gap that referenced this issue Sep 18, 2018
This commit introduces a new global variable ERROR_OUTPUT.

As a next step one can make it possible to change the targets
of the magic strings "*stdout*", "*stdin*", and "*errout*",
as suggested by @fingolfin in gap-system#1815. See gap-system#2822.
ssiccha added a commit to ssiccha/gap that referenced this issue Sep 18, 2018
Makes all functions in error.g use ErrorOutput instead of the magic
string "*errout*". Then the error messages can be redirected by
overwriting ErrorOutput.

This should be temporary. If the target of "*errout*" itself can be
changed, this can be reverted again. See gap-system#2822.
ssiccha added a commit to ssiccha/gap that referenced this issue Sep 19, 2018
Makes all functions in error.g use ERROR_OUTPUT instead of the magic
string "*errout*". Then the error messages can be redirected by
overwriting ERROR_OUTPUT.

This should be temporary. If the target of "*errout*" itself can be
changed, this can be reverted again. See gap-system#2822.
@fingolfin fingolfin added the gapdays2018-fall Issues and PRs that arose at https://www.gapdays.de/gapdays2018-fall label Sep 19, 2018
ssiccha added a commit to ssiccha/gap that referenced this issue Sep 20, 2018
This commit introduces a new global variable ERROR_OUTPUT.

As a next step one can make it possible to change the targets
of the magic strings "*stdout*", "*stdin*", and "*errout*",
as suggested by @fingolfin in gap-system#1815. See gap-system#2822.
ssiccha added a commit to ssiccha/gap that referenced this issue Sep 20, 2018
Makes all functions in error.g use ERROR_OUTPUT instead of the magic
string "*errout*". Then the error messages can be redirected by
overwriting ERROR_OUTPUT.

This should be temporary. If the target of "*errout*" itself can be
changed, this can be reverted again. See gap-system#2822.
ssiccha added a commit to ssiccha/gap that referenced this issue Sep 20, 2018
This commit introduces a new global variable ERROR_OUTPUT.

As a next step one can make it possible to change the targets
of the magic strings "*stdout*", "*stdin*", and "*errout*",
as suggested by @fingolfin in gap-system#1815. See gap-system#2822.
ssiccha added a commit to ssiccha/gap that referenced this issue Sep 20, 2018
Makes all functions in error.g use ERROR_OUTPUT instead of the magic
string "*errout*". Then the error messages can be redirected by
overwriting ERROR_OUTPUT.

This should be temporary. If the target of "*errout*" itself can be
changed, this can be reverted again. See gap-system#2822.
ssiccha added a commit to ssiccha/gap that referenced this issue Sep 20, 2018
This commit introduces a new global variable ERROR_OUTPUT.

As a next step one can make it possible to change the targets
of the magic strings "*stdout*", "*stdin*", and "*errout*",
as suggested by @fingolfin in gap-system#1815. See gap-system#2822.
ssiccha added a commit to ssiccha/gap that referenced this issue Sep 20, 2018
Makes all functions in error.g use ERROR_OUTPUT instead of the magic
string "*errout*". Then the error messages can be redirected by
overwriting ERROR_OUTPUT.

This should be temporary. If the target of "*errout*" itself can be
changed, this can be reverted again. See gap-system#2822.
ssiccha added a commit to ssiccha/gap that referenced this issue Sep 20, 2018
This commit introduces a new global variable ERROR_OUTPUT.

As a next step one can make it possible to change the targets
of the magic strings "*stdout*", "*stdin*", and "*errout*",
as suggested by @fingolfin in gap-system#1815. See gap-system#2822.
ssiccha added a commit to ssiccha/gap that referenced this issue Sep 20, 2018
Makes all functions in error.g use ERROR_OUTPUT instead of the magic
string "*errout*". Then the error messages can be redirected by
overwriting ERROR_OUTPUT.

This should be temporary. If the target of "*errout*" itself can be
changed, this can be reverted again. See gap-system#2822.
ssiccha added a commit to ssiccha/gap that referenced this issue Sep 21, 2018
This commit introduces a new global variable ERROR_OUTPUT.

As a next step one can make it possible to change the targets
of the magic strings "*stdout*", "*stdin*", and "*errout*",
as suggested by @fingolfin in gap-system#1815. See gap-system#2822.
ssiccha added a commit to ssiccha/gap that referenced this issue Sep 21, 2018
Makes all functions in error.g use ERROR_OUTPUT instead of the magic
string "*errout*". Then the error messages can be redirected by
overwriting ERROR_OUTPUT.

This should be temporary. If the target of "*errout*" itself can be
changed, this can be reverted again. See gap-system#2822.
ssiccha added a commit to ssiccha/gap that referenced this issue Sep 21, 2018
This commit introduces a new global variable ERROR_OUTPUT.

As a next step one can make it possible to change the targets
of the magic strings "*stdout*", "*stdin*", and "*errout*",
as suggested by @fingolfin in gap-system#1815. See gap-system#2822.
ssiccha added a commit to ssiccha/gap that referenced this issue Sep 21, 2018
Makes all functions in error.g use ERROR_OUTPUT instead of the magic
string "*errout*". Then the error messages can be redirected by
overwriting ERROR_OUTPUT.

This should be temporary. If the target of "*errout*" itself can be
changed, this can be reverted again. See gap-system#2822.
fingolfin pushed a commit that referenced this issue Sep 21, 2018
This commit introduces a new global variable ERROR_OUTPUT.

As a next step one can make it possible to change the targets
of the magic strings "*stdout*", "*stdin*", and "*errout*",
as suggested by @fingolfin in #1815. See #2822.
fingolfin pushed a commit that referenced this issue Sep 21, 2018
Makes all functions in error.g use ERROR_OUTPUT instead of the magic
string "*errout*". Then the error messages can be redirected by
overwriting ERROR_OUTPUT.

This should be temporary. If the target of "*errout*" itself can be
changed, this can be reverted again. See #2822.
markuspf pushed a commit that referenced this issue Sep 22, 2018
This commit introduces a new global variable ERROR_OUTPUT.

As a next step one can make it possible to change the targets
of the magic strings "*stdout*", "*stdin*", and "*errout*",
as suggested by @fingolfin in #1815. See #2822.
markuspf pushed a commit that referenced this issue Sep 22, 2018
Makes all functions in error.g use ERROR_OUTPUT instead of the magic
string "*errout*". Then the error messages can be redirected by
overwriting ERROR_OUTPUT.

This should be temporary. If the target of "*errout*" itself can be
changed, this can be reverted again. See #2822.
ssiccha added a commit to ssiccha/gap that referenced this issue Mar 27, 2019
This commit introduces a new global variable ERROR_OUTPUT.

As a next step one can make it possible to change the targets
of the magic strings "*stdout*", "*stdin*", and "*errout*",
as suggested by @fingolfin in gap-system#1815. See gap-system#2822.
ssiccha added a commit to ssiccha/gap that referenced this issue Mar 27, 2019
Makes all functions in error.g use ERROR_OUTPUT instead of the magic
string "*errout*". Then the error messages can be redirected by
overwriting ERROR_OUTPUT.

This should be temporary. If the target of "*errout*" itself can be
changed, this can be reverted again. See gap-system#2822.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gapdays2018-fall Issues and PRs that arose at https://www.gapdays.de/gapdays2018-fall kind: enhancement Label for issues suggesting enhancements; and for pull requests implementing enhancements kind: new feature release notes: to be added PRs introducing changes that should be (but have not yet been) mentioned in the release notes topic: kernel
Projects
None yet
Development

No branches or pull requests

2 participants