202304 | 首次闯入 Tiobe 前 50

发布: 2023-05-03   上次更新: 2023-09-03

文章目录

重大事件

在 2023 四月份的 Tiobe 指数上,Zig 排名 46,尽管 Loris 发推表示这个数字对 Zig 来说没什么实际意义,但对于多数吃瓜群众来说,这还是十分让人鼓舞的。

For people who heard about Zig just recently:

  • Zig is not 2x faster than Rust, despite what recent benchmarks might lead you to believe.
  • You won't find many Zig jobs for a few years still, despite the Tiobe stuff.
  • Don't join to the Zig community just to rant about Rust.

— Loris Cro ⚡ (@croloris) April 13, 2023

观点/教程

When should I use an UNTAGGED Union?
Loris 的文章,作者利用访问 untagged union 的未赋值字段是一种 safety-checked UB 的行为,来解决数组成员被重新赋值过的情况。
Data driven polymorphism
作者用 Zig 来实现 Clojure 语言中的 defmulti,以达到『动态派发』的效果
Testing and Files as Structs
作者演示了一个文件作为 struct 的效果,这样导入时就可以用 const Node = @import("Node.zig") 的方式了。
Sneaky Error Payloads
一种在错误中携带上下文信息的方式,上一期的月报也有类似讨论。 Errors and Zig
Regular Expressions in Zig
由于 Zig 现在不支持 C 中的 bitfields,因此无法直接使用 Posix 的 regex.h ,这篇文章介绍了一种解决方法。
Zig Build System
对 Zig build 系统的介绍
Reasonable Bootstrap
探讨了编译器如何实现自举的方式
Data Oriented Parallel Value Interner
Matklad 探讨了如何实现一个高性能的 Interner
TigerStyle! (Or How To Design Safer Systems in Less Time)
Systems Distributed 23 视频。B 站链接
What Is a Database?
Systems Distributed 23 视频,B 站链接,作者博客:Scattered Thoughts

项目/工具

Coming Soon to a Zig Near You: HTTP Client
对标准库 std.http 的介绍。
Zig Bits 0x3: Mastering project management in Zig
介绍了如何更好地维护一个 Zig 项目,包括:新增依赖、增加测试覆盖率、增加文档、基于 GitHub Action 做持续集成等。
ityonemo/zigler
zig nifs in elixir
Ziggifying Kilo
使用 Zig 重写 kilo 编辑器,目前仅能在 Linux 上运行
jakubgiesler/VecZig
Vector implementation in Zig
b0bleet/zvisor
Zvisor is an open-source hypervisor written in the Zig programming language, which provides a modern and efficient approach to systems programming.

Zig 语言更新

建议/反馈✉️

  1. 关注微信公众号,加微信群与更多人一起畅聊 Zig
  2. 发现内容错误或链接失效?欢迎提交 PR
  3. 想要分享 Zig 使用经验,欢迎给我们供稿