News for hackers. Stuff that matters.
Re:Pretty Rust backtraces in raw terminal mode by wkat4242 on Friday February 24, 2023 @04:57PM (#34930702)
Hmm just adding some ASCII art doesn't really make it pretty. Colorizing the output and making it easier to analyze as well as read, would.
Re:Pretty Rust backtraces in raw terminal mode by estebank on Friday February 24, 2023 @05:43PM (#34931216)
The article wasn't about adding ASCII art, only about allowing the default panic handler to print the output correctly when the application uses raw mode in the terminal. It is a good introduction to what registering a panic handler looks like, no more than that. If you want colored backtraces, you can look at https://crates.io/crates/color-backtrace, https://crates.io/crates/better-panic or https://crates.io/crates/color-eyre, which leverage the same machinery shown in the article.
Re:Pretty Rust backtraces in raw terminal mode by kaelinl on Friday February 24, 2023 @05:45PM (#34931241)
In this article, I interpret "pretty" to mean "readable". There is a sample of the alternative in the post. Raw mode requires an explicit carriage return to accompany each line feed if you want the CR behavior, so if the default panic handler prints its normal string, each line is horizontally indented to the end of the previous line.

There is no ASCII art.

Re:Pretty Rust backtraces in raw terminal mode by wkat4242 on Friday February 24, 2023 @09:31PM (#34933212)
Ok then I misunderstood, I was going by the ASCII art in the picture.

I don't know much about Rust so I didn't really get the whole story.