Skip to content

Commit e7e5757

Browse files
committed
refactor: standardize monthly post structure and clean up titles
1 parent a70889b commit e7e5757

27 files changed

Lines changed: 1413 additions & 399 deletions

content/monthly/202207.smd

Lines changed: 36 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -8,28 +8,49 @@
88

99
## [观点/教程]($section.id('viewstutorials'))
1010

11-
- [Zig 初体验 - Keep Coding](https://liujiacai.net/blog/2022/07/16/zig-intro/)
12-
11+
- [Zig 初体验 - Keep
12+
Coding](https://liujiacai.net/blog/2022/07/16/zig-intro/)
1313
- [undefined 值的作用](https://github.com/zigcc/forum/discussions/8)
14-
1514
- [用 Zig 优化 yes 命令](https://github.com/zigcc/forum/discussions/4)
16-
17-
- [Some Thoughts on Zig – Sympolymathesy](https://v5.chriskrycho.com/journal/some-thoughts-on-zig/)
18-
19-
- [ziglings-solutions 题解](https://github.com/better-zig/ziglings-solutions)
20-
21-
- [“these are some really impressively bad semantics...”](https://twitter.com/lexi_lambda/status/1551607005026074624)
22-
23-
- [How to Release your Zig Applications](https://zig.news/kristoff/how-to-release-your-zig-applications-2h90)
24-
25-
- [Zig files are structs](https://zig.news/gowind/zig-files-are-structs-288j)
26-
27-
- [Is it necessary to know C before starting with Zig?](https://www.reddit.com/r/Zig/comments/w63x6r/is_it_necessary_to_know_c_or_another_systems/)
15+
- [Some Thoughts on Zig — Sympolymathesy, by Chris
16+
Krycho](https://v5.chriskrycho.com/journal/some-thoughts-on-zig/)
17+
- Zig 语言最吸引人的一点:小巧
18+
- [ziglings-solutions
19+
题解](https://github.com/better-zig/ziglings-solutions)
20+
- [“these are some really impressively bad semantics to choose for your
21+
programming language” /
22+
Twitter](https://twitter.com/lexi_lambda/status/1551607005026074624)
23+
- [How to Release your Zig
24+
Applications](https://zig.news/kristoff/how-to-release-your-zig-applications-2h90)
25+
- [Zig files are structs - Zig NEWS
26+
⚡](https://zig.news/gowind/zig-files-are-structs-288j)
27+
- [Is it necessary to know C (or another systems programming language)
28+
before starting with Zig? :
29+
Zig](https://www.reddit.com/r/Zig/comments/w63x6r/is_it_necessary_to_know_c_or_another_systems/)
2830

2931
## [项目/工具]($section.id('projectstools'))
3032

33+
- [Release bun v0.1.5 ·
34+
oven-sh/bun](https://github.com/oven-sh/bun/releases/tag/bun-v0.1.5)
35+
- [zls 可以解析 build addPackage
36+
的包](https://github.com/zigcc/forum/discussions/7)
37+
- [natecraddock/ziglua: Zig bindings for the Lua C
38+
API](https://github.com/natecraddock/ziglua)
39+
- [Easily create TUI programs with
40+
zig-spoon!](https://zig.news/lhp/easily-create-tui-programs-with-zig-spoon-project-demonstration-4k33)
41+
- [Zig Support plugin for IntelliJ and CLion version 0.0.6
42+
released](https://zig.news/marioariasc/zig-support-plugin-for-intellij-and-clion-version-006-released-o68)
43+
- [r4gus/zbor: CBOR parser written in
44+
Zig](https://github.com/r4gus/zbor)
45+
- [zbor - a CBOR en-/ decoder - Zig NEWS
46+
⚡](https://zig.news/r4gus/zbor-a-cbor-en-decoder-2di0)
47+
- [How I built
48+
zig-sqlite](https://rischmann.fr/blog/how-i-built-zig-sqlite)
49+
3150
## [Zig 语言更新]($section.id('zig-updates'))
3251

52+
[相关链接](https://github.com/ziglang/zig/pulls?page=1&q=+is%3Aclosed+is%3Apr+closed%3A2022-07-01..2022-08-01)
53+
3354
- [std
3455
文档展示更全面](https://twitter.com/croloris/status/1550955321694330880)
3556
- [New Autodocs! by kristoff-it · Pull Request \#12173 ·

content/monthly/202208.smd

Lines changed: 35 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,49 @@
88

99
## [观点/教程]($section.id('viewstutorials'))
1010

11-
- [Growing a {{mustache}} with Zig](https://zig.news/batiati/growing-a-mustache-with-zig-di4)
11+
- [Growing a {{mustache}} with
12+
Zig](https://zig.news/batiati/growing-a-mustache-with-zig-di4)
13+
作者使用 Zig 开发时的目标:
14+
1. Robost,test 代码快
15+
2. Optimal,Zig 语言本身就要求开发者去考虑堆分配
16+
3. Reusable,用户可以在高性能(better performance)与低内存(minimal
17+
memory footprint)使用之间做取舍,以满足不同的场景
18+
- [Will Bun JavaScript Take Node’s
19+
Crown](https://semaphoreci.com/blog/javascript-bun) Hacker News
20+
上的[评论](https://news.ycombinator.com/item?id=32457587)。作者从多个方面对比了
21+
Node 与 Bun,Bun 均胜出
22+
- [Looking into Zig - Ayende @
23+
Rahien](https://ayende.com/blog/194404-A/looking-into-zig)。作者对比了
24+
Zig 与 Rust/C 的区别
25+
- [Cool Zig Patterns - Gotta alloc
26+
fast](https://zig.news/xq/cool-zig-patterns-gotta-alloc-fast-23h)。如果需要分配的对象只有一个,如何优化
27+
Allocator 呢?作者给出了一个 memory pool 的实现,23 行代码
28+
- [Packed structs in Zig make bit/flag sets trivial | Hexops’
29+
devlog](https://devlog.hexops.com/2022/packed-structs-in-zig/)。使用
30+
Zig 的 `packet struct` 实现 bit set 功能
1231

13-
- [Will Bun JavaScript Take Node’s Crown](https://semaphoreci.com/blog/javascript-bun)
32+
## [项目/工具]($section.id('projectstools'))
1433

15-
- [Looking into Zig - Ayende @ Rahien](https://ayende.com/blog/194404-A/looking-into-zig)
34+
- [Virtual tables by vrischmann · Pull Request \#100 ·
35+
vrischmann/zig-sqlite](https://github.com/vrischmann/zig-sqlite/pull/100)。zig-sqlite
36+
作者正常尝试封装 virtual table 的 API,这样就可以用 Zig 写 SQLite
37+
模块了。
1638

17-
- [Cool Zig Patterns - Gotta alloc fast](https://zig.news/xq/cool-zig-patterns-gotta-alloc-fast-23h)
39+
- [Zig Support plugin for IntelliJ and CLion version 0.1.0
40+
released](https://zig.news/marioariasc/zig-support-plugin-for-intellij-and-clion-version-010-released-pd0)
1841

19-
- [Packed structs in Zig make bit/flag sets trivial](https://devlog.hexops.com/2022/packed-structs-in-zig/)
42+
- [How to walk directories? - Help -
43+
Ziggit](https://ziggit.dev/t/how-to-walk-directories/260)
2044

21-
## [项目/工具]($section.id('projectstools'))
45+
- [Zig Visual Programming with
46+
Blockly](https://zig.news/lupyuen/zig-visual-programming-with-blockly-3pbg)
47+
48+
![](/images/blockly.webp)
2249

2350
## [Zig 语言更新]($section.id('zig-updates'))
2451

52+
[相关链接](https://github.com/ziglang/zig/pulls?page=1&q=+is%3Aclosed+is%3Apr+closed%3A2022-08-01..2022-09-01)
53+
2554
- [make self-hosted the default compiler by andrewrk · Pull Request
2655
\#12368](https://github.com/ziglang/zig/pull/12368) Master
2756
分支默认已经是

content/monthly/202209.smd

Lines changed: 108 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,28 +8,124 @@
88

99
## [Zig VS Rust 火花]($section.id('zig-vs-rust-spark'))
1010

11-
### [时间线]($section.id('timeline'))
11+
在 9/10 号左右,在 Twitter 上牵起了一小波关于 Zig VS Rust
12+
的小火花,以至于最后 Zig 创始人 Andrew Kelley
13+
[发推](https://twitter.com/andy_kelley/status/1568679389113757698)表示
14+
Let us exist。这里稍微整理下这件事情的过程: 本次事件主要涉及两个人:
1215

13-
### [总结]($section.id('summary'))
16+
- Rust 核心贡献者: Patrick Walton
17+
- Zig 社区 VP: Loris Cro
1418

15-
## [观点/教程]($section.id('viewstutorials'))
16-
17-
- [How (memory) safe is zig?](https://www.scattered-thoughts.net/writing/how-safe-is-zig/)
19+
## [时间线]($section.id('timeline'))
1820

19-
- [Hacked std.PriorityQueue for constant time update](https://www.reddit.com/r/Zig/comments/x8fxqr/hacked_stdpriorityqueue_for_constant_time_update/)
21+
- 8/26 号,一篇关于 wasm 2 Game Jam
22+
的[分析报告](https://wasm4.org/blog/jam-2-results/)中,使用 Zig
23+
的人数最多
24+
- 9/9 号,这篇报告在 HackerNews
25+
上引起了[热烈讨论](https://news.ycombinator.com/item?id=32777636),其中
26+
Walton 在多处回复中表示 Zig
27+
语言的劣势,[并称](https://news.ycombinator.com/item?id=32782842) \>
28+
It’s perfectly reasonable to take the position that it’s deeply
29+
problematic for a language aiming for wide use in 2022 to not be
30+
memory safe. There’s no requirement that you “focus on tradeoffs”,
31+
especially since real people get hurt by memory safety problems.
32+
- Loris [回复到](https://news.ycombinator.com/item?id=32785380): \> I
33+
think you’re actively hurting the project that you care about in your
34+
ineffective crusade, but hey, don’t let me stop you.
35+
- 9/10 号,有人发推对
36+
[tigerbeetle](https://github.com/tigerbeetledb/tigerbeetle/blob/main/docs/TIGER_STYLE.md#safety)
37+
内存分配方式表示好奇:所有内存必须在启动时静态分配好
38+
- Walton
39+
[回复到](https://mobile.twitter.com/pcwalton/status/1568498326496247809):
40+
\> The weird thing is that this is used as an example of why you
41+
supposedly don’t need language-enforced memory safety. \> \> But that
42+
literally is language-enforced memory safety! Just *way* more
43+
restrictive than what Rust has: if you hate the borrow check, try the
44+
“no heap” check… \> \> This is wrong because you can still have UAF
45+
from freed stack frames.
46+
- Loris 针对 Walton 的回复说了句“What a boring, useless
47+
take.([原推](https://mobile.twitter.com/kripken/status/1568428308131622913)的回复已经被
48+
Loris
49+
删除了,可以[在这里](https://archive.ph/jq3kw#selection-1275.0-1275.30)看到历史):
50+
- Walton
51+
发推[表示](https://mobile.twitter.com/pcwalton/status/1568302065851707392)在
52+
2022 年,所有语言都应该是内存安全,应该算是『编程语言界的共识』,并称
53+
Zig 是行业的一大退步 😅
54+
- Loris 专门发了一个 [Twitter
55+
thread](https://twitter.com/croloris/status/1568573729940164608?s=21&t=v2Dj_F2f_kUzZDQps5KjtQ)
56+
来阐述『软件的目标不仅仅是内存安全,更重要的是正确』。比如 tigerbeetle
57+
这里[提到的](https://github.com/tigerbeetledb/tigerbeetle/blob/main/docs/DESIGN.md)。而且即便内存安全,也可能发生
58+
OOM
2059

21-
- [Flutter/Dart + FFI + Zig](https://github.com/zigcc/forum/discussions/21)
60+
## [总结]($section.id('summary'))
2261

23-
- [Building a Tiny Mutex](https://zig.news/kprotty/building-a-tiny-mutex-537k)
62+
上面的链接比较多,这里稍微总结下这次争论的问题:
2463

25-
- [Perfecting WebGPU/Dawn native graphics for Zig](https://devlog.hexops.com/2022/perfecting-webgpu-native/)
64+
> Rust 用户觉得 Zig 不是内存安全的语言,Zig 认为 Rust
65+
> 的语言过度复杂,这反而会导致程序复杂度挺升,导致程序产生错误行为
2666

27-
- [Cross-Compiling and packaging C, Go and Zig projects with Nix](https://flyx.org/cross-packaging/)
67+
使用 Zig 的人大概率也是 Rust 用户,之所以有了安全的 Rust,还来选
68+
Zig,笔者觉得大概率就是本次争论的观点,Rust
69+
过于复杂,导致程序员不仅仅要考虑业务行为,还需要按照 Rust
70+
的风格来编程,这加剧了程序出错的可能性。
2871

29-
- [Revisiting the design approach to the Zig programming language](https://about.sourcegraph.com/blog/zig-programming-language-revisiting-design-approach)
72+
## [观点/教程]($section.id('viewstutorials'))
3073

31-
- [Zig ⚡ Improving the User Experience for Unused Variables](https://vimeo.com/748218307)
74+
- [How (memory) safe is
75+
zig?](https://www.scattered-thoughts.net/writing/how-safe-is-zig/)
76+
作者重点介绍了在内存安全方面,Zig 的优劣势。尽管 Zig 相比 C
77+
有了明显的改进,但相比 Rust
78+
这种在编译期就能发现程序问题来说,显得有些鸡肋,但在一些可控的环境下,比如
79+
WASM、嵌入式环境中,Zig 还是有发挥的空间
80+
- [How (memory) safe is zig? (UPDATED) |
81+
Lobsters](https://lobste.rs/s/nw7hsd)
82+
- [How safe is Zig? | Hacker
83+
News](https://news.ycombinator.com/item?id=31850347)
84+
- [Hacked std.PriorityQueue for constant time
85+
update](https://www.reddit.com/r/Zig/comments/x8fxqr/hacked_stdpriorityqueue_for_constant_time_update/)
86+
- [Flutter/Dart + FFI + Zig: Flutter 使用 FFI 调用 Zig
87+
示例](https://github.com/zigcc/forum/discussions/21)
88+
- [Building a Tiny
89+
Mutex](https://zig.news/kprotty/building-a-tiny-mutex-537k)
90+
- [Perfecting WebGPU/Dawn native graphics for
91+
Zig](https://devlog.hexops.com/2022/perfecting-webgpu-native/)
92+
- [Cross-Compiling and packaging C, Go and Zig projects with
93+
Nix](https://flyx.org/cross-packaging/) 介绍如何基于
94+
[Nix](https://nixos.org/) 来进行交叉编译
95+
- [Revisiting the design approach to the Zig programming
96+
language](https://about.sourcegraph.com/blog/zig-programming-language-revisiting-design-approach)
97+
Sourcegraph 的一档播客,对 Zig 创始人的采访,介绍了 Zig
98+
的由来,其中提到一个性能优化点是:untagged
99+
union,这里有它的一些介绍:[Andrew Kelley claims Zig is faster than
100+
Rust in
101+
perfomance](https://www.reddit.com/r/rust/comments/s5caye/comment/hsz6uf0/?utm_source=share&utm_medium=web2x&context=3)
102+
- [Zig ⚡ Improving the User Experience for Unused
103+
Variables](https://vimeo.com/748218307)
32104

33105
## [项目/工具]($section.id('projectstools'))
34106

107+
- [Zig
108+
开发常用类库](https://github.com/zigcc/forum/discussions/28),如果读者的
109+
Zig 项目托管在 GitHub,推荐加上
110+
[zig-package](https://github.com/topics/zig-package)
111+
这个标签,这样可以自动被 https://zig.pm/ 收录
112+
- https://zig.run/ - 在线运行 zig 代码
113+
- [Zig Support plugin for IntelliJ and CLion version 0.0.7
114+
released](https://zig.news/marioariasc/zig-support-plugin-for-intellij-and-clion-version-007-released-1en8)
115+
- [zig-napigen](https://github.com/cztomsik/zig-napigen) Automatic N-API
116+
bindings for your Zig project.
117+
- [Dart 通过 FFI 调用 Zig
118+
库示例](https://github.com/better-dart/learn-dart/blob/main/packages/ffi-binding/example/main.dart#L31)
119+
- [zig-gamedev](https://github.com/michal-z/zig-gamedev)
120+
- [loc in Zig](https://github.com/jiacai2050/loc) 代码行数统计工具
121+
- [Grep in Zig](https://github.com/EclesioMeloJunior/zig-grep)
122+
- [randomutils](https://gitlab.com/hdante/randomutils) Generate 64-bit
123+
random numbers
124+
- [zig-pico](https://github.com/paperdev-code/zig-pico) 树莓派 [Pico
125+
SDK](https://github.com/raspberrypi/pico-sdk) 的 Zig 绑定库
126+
- [stm32f4.zig](https://github.com/moonxraccoon/stm32f4.zig) STM32F4(ARM
127+
Cortex M4 的高性能 32 位微控制器) 固件抽象层
128+
35129
## [Zig 语言更新]($section.id('zig-updates'))
130+
131+
[相关链接](https://github.com/ziglang/zig/pulls?q=+is%3Aclosed+is%3Apr+closed%3A2022-09-01..2022-10-01+)

content/monthly/202210.smd

Lines changed: 46 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -8,26 +8,53 @@
88

99
## [观点/教程]($section.id('viewstutorials'))
1010

11-
- [Zig Is Self-Hosted Now, What’s Next?](https://kristoff.it/blog/zig-self-hosted-now-what/)
12-
13-
- [Howto Pair Strings with Enums](https://zig.news/david_vanderson/howto-pair-strings-with-enums-9ce)
14-
15-
- [A Database Without Dynamic Memory Allocation](https://tigerbeetle.com/blog/a-database-without-dynamic-memory/)
16-
17-
- [That Time I Tried Porting Zig to SerenityOS](https://sin-ack.github.io/posts/sycl-talk-20221007/)
18-
19-
- [Building a high-performance database buffer pool in Zig using io_uring’s new fixed-buffer mode](https://gavinray97.github.io/blog/io-uring-fixed-bufferpool-zig)
20-
21-
- [Zig-style generics are not well-suited for most languages](https://typesanitizer.com/blog/zig-generics.html)
22-
23-
- [Zig and WebAssembly are a match made in heaven](https://blog.battlefy.com/zig-and-webassembly-are-a-match-made-in-heaven)
24-
25-
- [Stay Together For The Kids - Andrew Kelley](https://www.bilibili.com/video/BV1ne411G74c/?share_source=copy_web&vd_source=9191359325bcbfb53bd116d1f5b22175)
26-
27-
- [Ziglibc: Sweeping out the rug from underneath C - Jonathan Marler](https://www.bilibili.com/video/BV1Td4y1y7U9/?share_source=copy_web&vd_source=9191359325bcbfb53bd116d1f5b22175)
28-
29-
- [005. 与 LemonHX 畅聊新一代编程语言 Zig – RustTalk](https://rusttalk.github.io/podcast/005/)
11+
- [Zig Is Self-Hosted Now, What’s Next? | Loris Cro’s
12+
Blog](https://kristoff.it/blog/zig-self-hosted-now-what/) | 0.10
13+
即将在 11-01 号发布,Loris 回顾了目前 stage2
14+
的进展,包管理器是下一个目标,但是不会引入中央仓库
15+
- Loris 会在 Twitch 直播这次的 [release
16+
party](https://ziggit.dev/t/release-party-and-zig-rush-november-1st/435)
17+
- [Howto Pair Strings with
18+
Enums](https://zig.news/david_vanderson/howto-pair-strings-with-enums-9ce)
19+
利用 Zig comptime 的能力为 enum 增加描述信息
20+
- [A Database Without Dynamic Memory
21+
Allocation](https://tigerbeetle.com/blog/a-database-without-dynamic-memory/)
22+
| TigerBeetle 讲述了如何静态内存的优势,如何应用到数据库中,以及 Zig
23+
为实现这种设计方式的优势
24+
- [That Time I Tried Porting Zig to SerenityOS - sin-ack’s
25+
writings](https://sin-ack.github.io/posts/sycl-talk-20221007/)
26+
- [Building a high-performance database buffer pool in Zig using
27+
io_uring’s new fixed-buffer
28+
mode](https://gavinray97.github.io/blog/io-uring-fixed-bufferpool-zig)
29+
- [Zig-style generics are not well-suited for most
30+
languages](https://typesanitizer.com/blog/zig-generics.html)
31+
- [Zig and WebAssembly are a match made in
32+
heaven](https://blog.battlefy.com/zig-and-webassembly-are-a-match-made-in-heaven)
33+
- \[视频\] [Stay Together For The Kids - Andrew Kelley - Software You
34+
Can Love
35+
2022](https://www.bilibili.com/video/BV1ne411G74c/?share_source=copy_web&vd_source=9191359325bcbfb53bd116d1f5b22175)
36+
- \[视频\] [Ziglibc: Sweeping out the rug from underneath C - Jonathan
37+
Marler - Software You Can Love
38+
2022](https://www.bilibili.com/video/BV1Td4y1y7U9/?share_source=copy_web&vd_source=9191359325bcbfb53bd116d1f5b22175)
39+
- \[音频\] [005. 与 LemonHX 畅聊新一代编程语言 Zig –
40+
RustTalk](https://rusttalk.github.io/podcast/005/)
3041

3142
## [项目/工具]($section.id('projectstools'))
3243

44+
- [Himujjal/zig-json5](https://github.com/Himujjal/zig-json5): A JSON5
45+
parser/stringifier for Zig resembling the std.json API
46+
- [hexops/mach-examples](https://github.com/hexops/mach-examples): Mach
47+
core & engine examples
48+
- [sagemathinc/cowasm](https://github.com/sagemathinc/cowasm): CoWasm:
49+
Collaborative WebAssembly for Servers and Browsers. Built using Zig.
50+
Supports Python with extension modules, including numpy.
51+
- [loc 使用 mmap 后速度快了 2
52+
倍](https://github.com/jiacai2050/loc/pull/2)
53+
- 一个 Zig Hackers 的 Twitter 列表:[Zig
54+
Hero](https://twitter.com/i/lists/1570249876155568129)
55+
- [A minimal RocksDB example with
56+
Zig](https://notes.eatonphil.com/zigrocks.html)
57+
3358
## [Zig 语言更新]($section.id('zig-updates'))
59+
60+
[相关链接](https://github.com/ziglang/zig/pulls?page=1&q=+is%3Aclosed+is%3Apr+closed%3A2022-10-01..2022-11-01)

0 commit comments

Comments
 (0)