Hacker News new | ask | show | jobs
by z3c0 1190 days ago
I really like Textual. I'm very much the TUI type, and upon discovering it, I decided it would be my go-to for interfaces going forward, as - ideally - I'd be able to run the same apps on my desktop as my home server as my cloud servers.

Well on the latter two, I realized I had a huge uphill battle, as SSH apparently uses CRLF over LF, and I was finding myself having to rewrite half the library to accommodate that.*

And on the former, it occurred to me that I hate everything about Python's asyncio. I'm sure that'll anger some, but sorry, it's terrible, and it doesn't help that every major version deprecates something in favor of something new.

[*] Any advice here would be welcome. I can't find much literature on the subject.

3 comments

I'm not sure I understand your line endings issue. But we've had Textual working over SSH.

If you want to post an issue on the repo, I think we could resolve it.

Will do, thanks!
"half the library" - half of textual, you mean?

Also - can you elaborate on how the CRLF vs LF broke your app? Give a code snippet as an example?

Should've been more clear - I've had to update significant portions of Textual and rich to enable propagating custom line-endings from the top level, but most of the code I touched was in rich.

As for the CRLF/LF issue, I paired textual with AsyncSSH, and was successful in making an SSH service hosting the app. However, connecting resulted in a text soup that I initially assumed was the fault of AsyncSSH. After some time, I realized it was due to the line-endings being defaulted to LF by rich (a reasonable decision in any other scenario.)

On both points, I'd be happy to share some snippets, but I'm halfway around the world from my home computer currently. If this is more than just a passing interest, I'd be happy to follow up upon my return.

Are the CRLFs related to Windows? I’ve never encountered them anywhere else…
Same, but I only run Debian-flavored Linux, so that theory was ruled out pretty quickly. It appears to be a default behavior of pseudo-terminals leftover from the days of yore, when CRLF/LF was still an open debate.