Date: Mon, 4 Apr 2022 13:39:24 -0500
{fmt} for ostreams does not appear to implement the console bypass that
would cause the issue. It's not clear to me that Rust is even relevant; the
documentation of std::io appears to suggest that all writes to stdout, if a
console, are transcoded and routed through WriteConsoleW (
https://doc.rust-lang.org/std/io/fn.stdout.html), in which case there is no
problem either.
On Mon, Apr 4, 2022 at 11:53 AM Peter Brett via Lib-Ext <
lib-ext_at_[hidden]> wrote:
> Hi all,
>
>
>
> I would like to hear about:
>
> - actual real-world application problems caused by the current {fmt}
> and Rust behaviour
> - implementation experience of the proposed change, and especially
> measurements of performance impact in representative usage scenarios.
>
>
>
> Until there is some report about this, I would recommend * no change*.
>
>
>
> Best regards,
>
>
>
> Peter
>
>
>
> *From:* Lib-Ext <lib-ext-bounces_at_[hidden]> *On Behalf Of *Inbal
> Levi via Lib-Ext
> *Sent:* 28 March 2022 18:09
> *To:* C++ Library Evolution Working Group <lib-ext_at_[hidden]>
> *Cc:* Inbal Levi <sinbal2l_at_[hidden]>; sg16_at_[hidden]; Bryce
> Adelstein Lelbach aka wash <brycelelbach_at_[hidden]>; Corentin <
> corentin.jabot_at_[hidden]>; Victor Zverovich <victor.zverovich_at_[hidden]>
> *Subject:* [isocpp-lib-ext] LEWG(I) Weekly review - P2549R0: Should the
> output of std::print to a terminal be synchronized with the underlying
> stream?
>
>
>
> Hello all,
>
> Today we have a paper in a bit of a different format (😉) -
>
> this is an *Info* paper, which the fmt library author wrote to notify
> LEWG of the current behaviour.
>
> Currently there's *no action* suggested in the paper, but we would like the
> author to *get an indication on the amount of support for the status quo,
> as well as whether a change is needed.*
>
>
>
> P2539R0: Should the output of std::print to a terminal be synchronized
> with the underlying stream? (wg21.link/P2539
> <https://urldefense.com/v3/__http:/wg21.link/P2539__;!!EHscmS1ygiU1lA!QjZVReeE9bUgzPAODFm3mlQeK8Jf1FwrBIK8Rb0qfeTThWTigFlEajpaZ5c--w$>
> )
>
> by: Victor Zverovich
>
> ***
> * From the Discussion:*
>
> To prevent mojibake std::print may use a native Unicode API when writing
> to a terminal bypassing the stream buffer. During the review of [P2093]
> <https://urldefense.com/v3/__http:/www.open-std.org/jtc1/sc22/wg21/docs/papers/2022/p2539r0.html*biblio-p2093__;Iw!!EHscmS1ygiU1lA!QjZVReeE9bUgzPAODFm3mlQeK8Jf1FwrBIK8Rb0qfeTThWTigFlEajr5PrNXGQ$> "Formatted
> output" Tim Song suggested that synchronizing std::print with the
> underlying stream may be beneficial for gradual adoption.
>
>
>
> *Some meta data:*
>
> - *Bottom Line: *Neither {fmt} ([FMT]) nor Rust ([RUST-STDIO]) do such
> synchronization in their implementations of print.
> - To indicate your opinion on whether a change is needed (reasoning
> is, of course, welcome):
>
>
> - If you support the status quo (no change): please response with *"No
> Change"*
> - If you think a change is needed (synchronize the output with the
> underlying steam): please response* "+1"*
>
> ***
>
> * Weekly reviews improve quality!*
>
> Running weekly reviews allows more iterations on each proposal, which
> hopefully, in turn, will result in more accurate and subtle fixes.
>
>
>
> Thank you for taking the time to review the proposal,
>
> and have a great week!
>
>
>
> Inbal Levi
> _______________________________________________
> Lib-Ext mailing list
> Lib-Ext_at_[hidden]
> Subscription: https://lists.isocpp.org/mailman/listinfo.cgi/lib-ext
> Link to this post: http://lists.isocpp.org/lib-ext/2022/04/22901.php
>
would cause the issue. It's not clear to me that Rust is even relevant; the
documentation of std::io appears to suggest that all writes to stdout, if a
console, are transcoded and routed through WriteConsoleW (
https://doc.rust-lang.org/std/io/fn.stdout.html), in which case there is no
problem either.
On Mon, Apr 4, 2022 at 11:53 AM Peter Brett via Lib-Ext <
lib-ext_at_[hidden]> wrote:
> Hi all,
>
>
>
> I would like to hear about:
>
> - actual real-world application problems caused by the current {fmt}
> and Rust behaviour
> - implementation experience of the proposed change, and especially
> measurements of performance impact in representative usage scenarios.
>
>
>
> Until there is some report about this, I would recommend * no change*.
>
>
>
> Best regards,
>
>
>
> Peter
>
>
>
> *From:* Lib-Ext <lib-ext-bounces_at_[hidden]> *On Behalf Of *Inbal
> Levi via Lib-Ext
> *Sent:* 28 March 2022 18:09
> *To:* C++ Library Evolution Working Group <lib-ext_at_[hidden]>
> *Cc:* Inbal Levi <sinbal2l_at_[hidden]>; sg16_at_[hidden]; Bryce
> Adelstein Lelbach aka wash <brycelelbach_at_[hidden]>; Corentin <
> corentin.jabot_at_[hidden]>; Victor Zverovich <victor.zverovich_at_[hidden]>
> *Subject:* [isocpp-lib-ext] LEWG(I) Weekly review - P2549R0: Should the
> output of std::print to a terminal be synchronized with the underlying
> stream?
>
>
>
> Hello all,
>
> Today we have a paper in a bit of a different format (😉) -
>
> this is an *Info* paper, which the fmt library author wrote to notify
> LEWG of the current behaviour.
>
> Currently there's *no action* suggested in the paper, but we would like the
> author to *get an indication on the amount of support for the status quo,
> as well as whether a change is needed.*
>
>
>
> P2539R0: Should the output of std::print to a terminal be synchronized
> with the underlying stream? (wg21.link/P2539
> <https://urldefense.com/v3/__http:/wg21.link/P2539__;!!EHscmS1ygiU1lA!QjZVReeE9bUgzPAODFm3mlQeK8Jf1FwrBIK8Rb0qfeTThWTigFlEajpaZ5c--w$>
> )
>
> by: Victor Zverovich
>
> ***
> * From the Discussion:*
>
> To prevent mojibake std::print may use a native Unicode API when writing
> to a terminal bypassing the stream buffer. During the review of [P2093]
> <https://urldefense.com/v3/__http:/www.open-std.org/jtc1/sc22/wg21/docs/papers/2022/p2539r0.html*biblio-p2093__;Iw!!EHscmS1ygiU1lA!QjZVReeE9bUgzPAODFm3mlQeK8Jf1FwrBIK8Rb0qfeTThWTigFlEajr5PrNXGQ$> "Formatted
> output" Tim Song suggested that synchronizing std::print with the
> underlying stream may be beneficial for gradual adoption.
>
>
>
> *Some meta data:*
>
> - *Bottom Line: *Neither {fmt} ([FMT]) nor Rust ([RUST-STDIO]) do such
> synchronization in their implementations of print.
> - To indicate your opinion on whether a change is needed (reasoning
> is, of course, welcome):
>
>
> - If you support the status quo (no change): please response with *"No
> Change"*
> - If you think a change is needed (synchronize the output with the
> underlying steam): please response* "+1"*
>
> ***
>
> * Weekly reviews improve quality!*
>
> Running weekly reviews allows more iterations on each proposal, which
> hopefully, in turn, will result in more accurate and subtle fixes.
>
>
>
> Thank you for taking the time to review the proposal,
>
> and have a great week!
>
>
>
> Inbal Levi
> _______________________________________________
> Lib-Ext mailing list
> Lib-Ext_at_[hidden]
> Subscription: https://lists.isocpp.org/mailman/listinfo.cgi/lib-ext
> Link to this post: http://lists.isocpp.org/lib-ext/2022/04/22901.php
>
Received on 2022-04-04 18:39:59