TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Superconsole: A Text-Based User Interface (TUI) Library Written in Rust

26 点作者 stephanos2k超过 2 年前

2 条评论

JdeBP超过 2 年前
There is an interesting irony here.<p>This library is layered on top of a package called CrossTerm, which (on terminal systems, at least, but not on console systems) in turn emits roughly ECMA48 standard control sequences to do the cursor motions and whatnot. So the bottom layer is a terminal&#x2F;terminal emulator that supports&#x2F;emulates a (subset of a) DEC VT520 terminal.<p>But VT520s <i>can already do what the library does</i>. This idea of a static region and a scrolling region on the screen has, after all, been around in the world of terminals since the 1970s. There are DEC VT control sequences for setting left, right, top, and bottom margins; which specify a scrolling region and also modify scrolling and automatic cursor movement behaviours outwith that region. They&#x27;re widely supported in terminal emulators because a popular compatibility testing program, vttest, makes them applicable to many tests.<p>So what is actually going on here is that because CrossTerm does not produce anywhere near the full capabilities of an underlying DEC VT, an entire library has been built on top of it to replicate stuff that actually exists already in the code of the terminal emulators and terminal firmwares. It should be noted that the termcap and terminfo libraries provide a change_scroll_region capability that can set top and bottom margins, and are superior to CrossTerm in that regard.<p>The curious should see the DECSTBM and DECSLRM control sequences and the DECLRMM private mode.
austinjp超过 2 年前
As per recent comments here in other threads, I wonder if we could see less &quot;written in Rust&quot; in the titles?<p>I know it&#x27;s verbatim from TFA&#x27;s title, but honestly, at this point Rust evangelism feels like proselytising propaganda.<p>What exactly is going on? Is there a concerted effort in the Rust community to actively evangelise? Or is it just that blog posters are gaming SEO and riding the upward adoption curve? I&#x27;m aware that several key influences have praised Rust-related efforts, but there seems to be something far more deliberate going on. Is there?<p>I don&#x27;t use Rust, and a few months ago it was on my list of languages to check out, but frankly the fan-boyism is a real turn-off.
评论 #32576591 未加载
评论 #32591320 未加载