Skip to content

Commit b353ad1

Browse files
committed
polish
1 parent 172f4d1 commit b353ad1

File tree

2 files changed

+15
-4
lines changed

2 files changed

+15
-4
lines changed

content/monthly/202404.org

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#+TITLE: 202404 | Zig 0.12.0 正式释出
22
#+DATE: 2024-04-18T21:59:49+0800
3-
#+LASTMOD: 2024-05-02T22:19:23+0800
3+
#+LASTMOD: 2024-05-03T09:01:56+0800
44
* 重大事件
55
千呼万唤的 0.12.0 版本终于 2024-04-20 正式释出了!这次版本历时 8 个月,有 268 位贡献者,一共进行了 3688 次提交!社区内的一些讨论:[[https://news.ycombinator.com/item?id=40096176][Hacker News]]、[[https://lobste.rs/s/fa4svu][Lobsters]]。
66
这是它的 [[https://ziglang.org/download/0.12.0/release-notes.html][Release notes]]。ZigCC 对这个文档进行了翻译、整理,方便大家阅读:
@@ -11,7 +11,7 @@
1111

1212
0.12.0 这个版本,对用户来说,最重大的变更就是构建系统的稳定了,这对于 Zig 生态的发展是十分关键的一步,试想一个项目用到的依赖之间版本不兼容,
1313
这是十分痛苦的事情,毫无疑问这是阻碍 Zig 生态发生的绊脚石,没有之一。好在这一切都在 0.12 这个版本解决了,用户可以基于 Step
14-
构成的有向无环图来编译自己的项目,不需要在折腾 CMake、Makefile、Vcpkg、Git submodule 等机制,所有的依赖使用 zon 来管理即可。
14+
构成的有向无环图来编译自己的项目,不需要再折腾 CMake、Makefile、Vcpkg、Git submodule 等工具,所有的依赖使用 zon 来管理即可。
1515
读者如果对 Zig 构建系统还不熟悉,可以参考:
1616
- 官方文档:[[https://ziglang.org/learn/build-system/][Zig Build System]]
1717
- Zig 升级: [[https://course.ziglang.cc/engineering/build-system][构建系统]]
@@ -63,7 +63,7 @@ u3@16b196367-u2@16b196367
6363
- [[https://procmarco.com/blog/learnings-from-building-a-db-in-zig/][Learnings From Building a DB in Zig]] :: 作者分享了在一次 3 天的 Hackthon 中,使用 Zig 开发一个数据库的经历。
6464
- [[https://zig.news/michalsieron/buildzigzon-dependency-hashes-47kj][build.zig.zon dependency hashes]] :: 讲解了 zon 中依赖的 hash 是怎么计算出来的
6565
- [[https://zig.news/liyu1981/play-with-new-comptime-var-rule-of-zig-0120-333k][play with new comptime var rule of zig 0.12.0]] ::
66-
- [[https://zig.news/inspectorboat/to-simd-and-beyond-optimizing-a-simple-comparison-routine-1jkf][To SIMD and beyond: Optimizing a simple comparison routine]] :: 作者在这里循序渐进的减少了几种数字比较的技巧,从基本的方案,到 Vector,到最后利用 bit 的特点,来逐步优化,并用 godbolt 查看生成的汇编代码,是一篇不错的文章。
66+
- [[https://zig.news/inspectorboat/to-simd-and-beyond-optimizing-a-simple-comparison-routine-1jkf][To SIMD and beyond: Optimizing a simple comparison routine]] :: 作者在这里循序渐进的介绍了几种数字比较的技巧,从基本的方案,到 Vector,到最后利用 bit 的特点,来逐步优化,并用 godbolt 查看生成的汇编代码,是一篇不错的文章。
6767
- [[https://www.reddit.com/r/Zig/comments/1cc1x2v/documentation_takes_another_step_backwards/][Documentation takes another step backwards : r/Zig]] :: 一个 Reddit 用户对文档的抱怨
6868
* 项目/工具
6969
- [[https://github.com/rofrol/zig-companies][rofrol/zig-companies]] :: A list of companies using Zig in production.

content/monthly/202405.org

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,20 @@
11
#+TITLE: 202405
22
#+DATE: 2024-05-02T22:18:59+0800
3-
#+LASTMOD: 2024-05-02T22:21:37+0800
3+
#+LASTMOD: 2024-05-06T09:35:39+0800
44
#+DRAFT: true
55
* 重大事件
66
* 观点/教程
77
- [[https://arne.me/blog/thoughts-on-zig][Thoughts on Zig]] :: 又一篇 Zig 初学者的使用体验文档,如果你也在犹豫要不要学 Zig,这是个不错的经验参考。
8+
- [[https://www.reddit.com/r/Zig/comments/1ckstjv/im_sold_on_zigs_simplicity/][I'm sold on Zig's simplicity : r/Zig]] :: 一个具有资深经验开发者,在这里描述了自己选择业余项目语言的经历:
9+
- Rust 越来越复杂,有种发展成 C++ 的趋势
10+
- C++ 新版本的特性(比如 module)LSP 支持的不够好,而且历史包袱严重
11+
- C 缺少元编程,并且没有命名空间
12+
13+
最后从 Andrew 的一个播客了解到 Zig,经过自己尝试,发现了 Zig 没有辜负他的期望,尽管是第一次写 Zig,但基本上没有什么难度,
14+
每次遇到问题,仔细想几分钟就差不多有答案了。下面是他罗列的 Zig 的一些优势:
15+
- 十分简洁,import 返回的是一个 struct,和其他变量一样使用
16+
- 与 C 无缝交换,
17+
- 具有 Result 效果的错误处理
18+
- 唯一缺失的就是『接口』,但这一点并不是很关键,就像在 C里也没有,但是 C 可以做任何事
819
* 项目/工具
920
* [[https://github.com/ziglang/zig/pulls?page=1&q=+is%3Aclosed+is%3Apr+closed%3A2024-05-01..2024-06-01][Zig 语言更新]]

0 commit comments

Comments
 (0)