最新 kitty 0.37.0 加了个超酷光标痕迹动画(cursor trail animation)
翻了下实现 PR 发现竟然还给 Yazi 做了适配, https://github.com/kovidgoyal/kitty/pull/7998 爱了!
翻了下实现 PR 发现竟然还给 Yazi 做了适配, https://github.com/kovidgoyal/kitty/pull/7998 爱了!
GitHub
Enhance Cursor Trail: Improved Animation, Fades, and New Distance Threshold Option by jinhwanlazy · Pull Request #7998 · kovidgoyal/kitty
continued from #7970. 3 main changes
Improved cursor trail animation. It now looks uniform regardless of its moving direction. The movement appears smoother, especially when the cursor moves horiz...
Improved cursor trail animation. It now looks uniform regardless of its moving direction. The movement appears smoother, especially when the cursor moves horiz...
🥰7
🌸
mlua v0.10 升级体验 昨天把 mlua 从 0.9.9 升到 0.10.0,以为就 10 分钟的事,结果改了一个小时也没改完,从满血直接给我干到吐血: • 所有 struct、trait lifetime 都删了,行吧,为了更方便推断类型,我可以批量替换下 • trait 名从 TableExt 换成了 ObjectLike,也可以替换下 • Scope 的 create_any_userdata 给扬了,啊?变更日志没有啊,也没标记 deprecated,就没了??直接把 owned any…
今天终于把它合了,拖了两周期间一直在跟 mlua 作者对线友好交流 - 巨大感谢 Alex 的所有帮助!
上个 post 提到的问题基本都解决了:
• 0.10 把
• 0.10 把
• 0.10 的
• 中途发现随机 panic bug:报告&修复了,https://github.com/mlua-rs/mlua/issues/477
• 中途发现
上个 post 提到的问题基本都解决了:
• 0.10 把
Scope::create_any_userdata 扬了:加回去了!• 0.10 把
MultiValue::from_vec() 扬了:加回去了!• 0.10 的
UserDataRef 只能在 non-scope 用,行为变了没记录:补充进了 breaking changes!• 中途发现随机 panic bug:报告&修复了,https://github.com/mlua-rs/mlua/issues/477
• 中途发现
AnyUserData::borrow() 行为也变了:加了 2 个新 API AnyUserData::destroy()、Scope::add_destructor() 还原之前行为,https://github.com/mlua-rs/mlua/issues/476👍4
想加个
上次
https://github.com/sxyazi/yazi/issues/1905
CODE_OF_CONDUCT.md,但不会写文案,发了个 good first issue,半小时收到了 claim,开心上次
CONTRIBUTING.md 也是这样找人写的,专业的事给专业的人,并且可以得到贡献机会 - 很多人想贡献只是不懂 Rust/编码,感觉这是个良性的社区互动https://github.com/sxyazi/yazi/issues/1905
GitHub
Add `CODE_OF_CONDUCT.md` · Issue #1905 · sxyazi/yazi
Some ideas: Respect different viewpoints Zero tolerance for harassment Communicate professionally and constructively Assume good intent in conversations – misunderstandings can happen, but give the...
❤4
昨天看 mlua 源码学到一个挺精妙的 trick:运行时检查类型
大概原理是给
mlua 利用这个 trick 为并发环境做了一些性能优化,如果
https://github.com/mlua-rs/mlua/commit/bb311349ecb24cb9ad4598f9c997eb9bf658f716
T 是否 Sync大概原理是给
T 创建一个 newtype,并为 newtype 实现 Copy、Clone 两个 trait,而 Copy 只在 T: Sync 时实现,然后调用 newtype 的 .clone(),看看走的 Copy 还是 Clone,如果是 Clone 表示 T 不 Sync。mlua 利用这个 trick 为并发环境做了一些性能优化,如果
T: Sync,就加 shared lock,否则 exclusive lockhttps://github.com/mlua-rs/mlua/commit/bb311349ecb24cb9ad4598f9c997eb9bf658f716
👍10
Yazi 有了新视频!
https://www.youtube.com/watch?v=TIxZ4G1JQ5c
13 分钟把基础操作、配置、插件/主题系统、包管理器、自定义 UI 都过了一遍,还介绍了些 tips,awesome!
https://www.youtube.com/watch?v=TIxZ4G1JQ5c
13 分钟把基础操作、配置、插件/主题系统、包管理器、自定义 UI 都过了一遍,还介绍了些 tips,awesome!
YouTube
Finally a terminal file explorer that doesn't suck!
Presentation of yazi, a terminal file explorer written in Rust with sane defaults and configuration.
I forgot to mention that you can create a file with `a` (it will create a directory if the name ends with /) and you can show hidden files by pressing `.`.…
I forgot to mention that you can create a file with `a` (it will create a directory if the name ends with /) and you can show hidden files by pressing `.`.…
👍2
Yazi 终端文件管理器 v0.4 发布!
经过 3 个月开发,很高兴宣布 Yazi 0.4 今天正式发布。
这是有史以来最大的一个版本,53 个新功能,41 项错误修复,以及 12 项性能改善。以下是新功能一览:
• Spotter
• 透明图像预览
• dark/light mode 支持
•
• Previewer/Preloader/Spotter/Fetcher 支持传递参数
• 查找关键字指示器
•
• tarballs 解压支持
• 智能批量重命名
• 更好的图像尺寸适配、用户配置解析
请阅读 https://github.com/sxyazi/yazi/releases/tag/v0.4.0 捕捉所有细节。
经过 3 个月开发,很高兴宣布 Yazi 0.4 今天正式发布。
这是有史以来最大的一个版本,53 个新功能,41 项错误修复,以及 12 项性能改善。以下是新功能一览:
• Spotter
• 透明图像预览
• dark/light mode 支持
•
ya emit / ya emit-to 子命令• Previewer/Preloader/Spotter/Fetcher 支持传递参数
• 查找关键字指示器
•
noop 虚拟命令• tarballs 解压支持
• 智能批量重命名
• 更好的图像尺寸适配、用户配置解析
请阅读 https://github.com/sxyazi/yazi/releases/tag/v0.4.0 捕捉所有细节。
🎉8🔥1
想监听 Linux mount/umount,一开始直接
真好!不用 unsafe,也不用自己再起个线程
libc::epoll,写一半想起来 tokio 本身带了个 AsyncFd:
let f = File::open("/proc/mounts")?;
let fd = AsyncFd::with_interest(f.as_fd(), Interest::READABLE)?;
loop {
let mut guard = fd.readable().await?;
guard.clear_ready();
println!("Changed...");
}
真好!不用 unsafe,也不用自己再起个线程
epoll_wait。👍8
GitHub Linux arm64 runner 对 public repo 免费了!
https://github.blog/changelog/2025-01-16-linux-arm64-hosted-runners-now-available-for-free-in-public-repositories-public-preview/
刚刚收到个 PR 才发现 https://github.com/sxyazi/yazi/pull/2214
巧的是昨天刚宣布,今天就用上了,好耶!
https://github.blog/changelog/2025-01-16-linux-arm64-hosted-runners-now-available-for-free-in-public-repositories-public-preview/
刚刚收到个 PR 才发现 https://github.com/sxyazi/yazi/pull/2214
巧的是昨天刚宣布,今天就用上了,好耶!
The GitHub Blog
Linux arm64 hosted runners now available for free in public repositories (Public Preview) - GitHub Changelog
Now in public preview, Linux arm64 hosted runners are available for free in public repositories. Following the release of arm64 larger hosted runners in June, this offering now extends to…
🔥4
This media is not supported in your browser
VIEW IN TELEGRAM
昨天花了点时间给 Yazi 添加了 Helix 支持
现在可以在 Helix 里丝滑使用 Yazi 管理文件了,不需要 Zellij 或 tmux,甚至能预览图片、视频!
反响还不错,得到了 250 个 upvotes!https://www.reddit.com/r/HelixEditor/comments/1j72tmr/use_yazi_file_manager_directly_in_helix_without/
现在可以在 Helix 里丝滑使用 Yazi 管理文件了,不需要 Zellij 或 tmux,甚至能预览图片、视频!
反响还不错,得到了 250 个 upvotes!https://www.reddit.com/r/HelixEditor/comments/1j72tmr/use_yazi_file_manager_directly_in_helix_without/
👍11
deranged 0.4.1 把 time 和 plist 炸了🤯
https://github.com/time-rs/time/issues/736
https://github.com/ebarnard/rust-plist/issues/151
https://github.com/time-rs/time/issues/736
https://github.com/ebarnard/rust-plist/issues/151
GitHub
Errors about not being able to infer the type · Issue #736 · time-rs/time
Building time v0.3.40 with rustc 1.85.1 seems to produce the following errors: Compiling time v0.3.40 (/home/stephan/time/time) error[E0282]: type annotations needed --> time/src/duration.rs:936...
🤯3
https://github.com/kovidgoyal/kitty/issues/8533
!终于有终端能正确支持 Unicode grapheme cluster 了,这是历史性的一刻
现在,kitty 对 Unicode 支持最好,Ghostty 最差。
---
Ghostty 宣称正确支持 grapheme clustering,上周 我还引用它文章,但没想到比 Apple Terminal 还差😅
!终于有终端能正确支持 Unicode grapheme cluster 了,这是历史性的一刻
现在,kitty 对 Unicode 支持最好,Ghostty 最差。
---
Ghostty 宣称正确支持 grapheme clustering,上周 我还引用它文章,但没想到比 Apple Terminal 还差😅
GitHub
[RFC] Specifying how terminals process Unicode text · Issue #8533 · kovidgoyal/kitty
Hi all, Following on from the text-sizing work in #8226 I have decided to specify the exact algorithm terminals should use to split Unicode text into cells and implement it in kitty. It is based on...
👍6
草,PowerShell OpenSSH fork 把
https://github.com/PowerShell/openssh-portable/blob/efa17c848b3e579d8a4a0e71edf6d233b5e30917/contrib/win32/win32compat/misc.c#L500-L501
就算
我见过的所有终端、SSH client 要么设置终端真实像素大小,要么设置
这几乎是事实标准,PowerShell OpenSSH 这操作我还第一次见。
ws_xpixel、ws_ypixel 硬编码成了 640*480,无论终端窗口多大,TIOCGWINSZ 永远报告 640*480。https://github.com/PowerShell/openssh-portable/blob/efa17c848b3e579d8a4a0e71edf6d233b5e30917/contrib/win32/win32compat/misc.c#L500-L501
就算
ws_xpixel、ws_ypixel 是未定义的,也不能硬编码个假值啊。。我见过的所有终端、SSH client 要么设置终端真实像素大小,要么设置
0 表示不支持,这样 client app 可以检查是否 0 决定能否使用它。这几乎是事实标准,PowerShell OpenSSH 这操作我还第一次见。
GitHub
openssh-portable/contrib/win32/win32compat/misc.c at efa17c848b3e579d8a4a0e71edf6d233b5e30917 · PowerShell/openssh-portable
Portable OpenSSH, all Win32-OpenSSH releases and wiki are managed at https://github.com/powershell/Win32-OpenSSH - PowerShell/openssh-portable
🤯12👍1
一个新 SFTP Client crate
现有 Rust SFTP Client 要么依赖 OpenSSL,要么是对
因此我 fork 了
• 支持包含无效 UTF-8 的路径:虽然 SFTP 协议规定路径是 UTF-8,但 Linux 文件名本身就允许无效 UTF-8,主流 SFTP Server 也都支持,这也是主要 fork 的动机,解决了 https://github.com/AspectUnk/russh-sftp/issues/42
• 支持获取文件的 nlink、用户名、组名属性
• 泛型返回值参数,更 idiomatic,如:
• 更少的依赖
• 性能优化
• 所有 Packets 都支持 Copy-on-write,避免不必要内存分配
• Packet 长度预先计算,避免二次分配
•
打算先在 Yazi 上测试一段时间,等稳定了发到 crates.io 回报社区,源码在 https://github.com/sxyazi/yazi/tree/main/yazi-sftp
现有 Rust SFTP Client 要么依赖 OpenSSL,要么是对
ssh 或 sftp 二进制的 Command 包装;前者会加大构建难度,后者存在跨平台问题。因此我 fork 了
russh-sftp 做了个新的 yazi-sftp,虽然是 fork,但重写了 9 成以上的代码:• 支持包含无效 UTF-8 的路径:虽然 SFTP 协议规定路径是 UTF-8,但 Linux 文件名本身就允许无效 UTF-8,主流 SFTP Server 也都支持,这也是主要 fork 的动机,解决了 https://github.com/AspectUnk/russh-sftp/issues/42
• 支持获取文件的 nlink、用户名、组名属性
• 泛型返回值参数,更 idiomatic,如:
let attrs: responses::Attrs = session.send(requests::Stat::new(path)).await?
• 更少的依赖
• 性能优化
• 所有 Packets 都支持 Copy-on-write,避免不必要内存分配
• Packet 长度预先计算,避免二次分配
•
AsyncRead、AsyncWrite trait 实现避免克隆 buffer打算先在 Yazi 上测试一段时间,等稳定了发到 crates.io 回报社区,源码在 https://github.com/sxyazi/yazi/tree/main/yazi-sftp
👍6❤2🔥1
JetBrains 赞助了几个订阅
最近 RustRover 团队联系,给了些免费订阅支持 Yazi 维护,这些订阅是 Open Source License,可使用旗下所有产品,有效期一年,到期似乎可以联系他们续订。
Yazi 活跃(代码)贡献者可 PM 我获取。
非常感谢 JetBrains 对 Rust 生态、开源社区的支持!❤️
最近 RustRover 团队联系,给了些免费订阅支持 Yazi 维护,这些订阅是 Open Source License,可使用旗下所有产品,有效期一年,到期似乎可以联系他们续订。
Yazi 活跃(代码)贡献者可 PM 我获取。
非常感谢 JetBrains 对 Rust 生态、开源社区的支持!❤️
❤12🥰4