-
Notifications
You must be signed in to change notification settings - Fork 35
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
Idea: more generalization for ptys #54
Comments
Another reason I'm a bit confused by this approach - if you have a program that writes to both stdout and stderr simultaneously e.g. because you're drawing a progress bar on stdout, and then you want to println to stderr, it won't work because they're two separate terminals entirely with their own interceptor lists and locks - even though in the typical case, they're both connected to the same terminal. |
@mikehearn thanks for the feedback. I changed I agree that Here are some of the design constraints that led me to the current solution:
|
Thanks. Those are good rationales. Probably, if they were described in the kdocs I'd have restricted the scope of the bug report to the lack of shared interceptors/locking. Internally I've started abstracting Mordant a bit, because at some point I want to expose its capabilities via APIs in my own product and can't/don't want to be asking you to keep to a stable library ABI in future. I've played with a few alternatives but the current approach, which seems to be working, is an upgraded So for example there's a wrapper type for Markdown, and when you use I think for Mordant the |
Sounds good. I do have a lot of docs to write. |
I updated to latest Mordant today - looks good. I found the way stderr is handled a little odd. Why is it done as a sort of transformation of TerminalInterface/Terminal? It feels a bit like Terminal should just be a wrapper around an arbitrary byte stream and maybe a set of environment variables, rather than special cased for stderr/stdout, as that way you can easily connect it to things like a telnet or ssh session. Note that this would require modifying StdoutTerminalInterface.
The text was updated successfully, but these errors were encountered: