Skip to content

Commit 95e8a57

Browse files
release: version v0.7.0 release (#81)
1 parent 233793f commit 95e8a57

13 files changed

Lines changed: 1359 additions & 11 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
build/
1313
**/build/
1414
*.build/
15+
**/_build_ci/
1516

1617
# VitePress
1718
node_modules/

CONTRIBUTORS.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,9 @@
4848
**贡献类型**:🎨 📝
4949
**贡献渠道**:微信
5050
**贡献说明**:指导文档站 UI 设计,提供阅读体验改进意见
51+
52+
### [Nyuudoukumo](https://github.com/Nyuudoukumo)
53+
54+
**贡献类型**:🐛 💡
55+
**贡献渠道**:GitHub
56+
**贡献说明**:反馈卷一「Cache 机制与内存层次」示例与解释不一致的问题(#67),促成量纲修正

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
---
2121

2222
<!-- COVERAGE_START -->
23-
![English Coverage](https://img.shields.io/badge/en_coverage-99%25-green.svg) 491/494 docs translated
23+
![English Coverage](https://img.shields.io/badge/en_coverage-100%25-green.svg) 494/494 docs translated
2424
<!-- COVERAGE_END -->
2525

2626
## 这是什么项目
@@ -103,12 +103,12 @@ cmake -S code/examples/chapter05/06_array_vs_stdarray -B build && cmake --build
103103
|----|------|:----:|--------|
104104
| 卷一 | 基础入门(含 C 速通) | 87 | ✅ 成型 |
105105
| 卷二 | 现代特性(RAII / 智能指针 / 移动 / lambda) | 44 | ✅ 成型 |
106-
| 卷三 | 标准库深入 | 8 | 🔨 在建 |
107-
| 卷四 | 高级主题(concepts / 协程 / 模板) | 8 | 🔨 在建 |
106+
| 卷三 | 标准库深入 | 40 | ✅ 成型 |
107+
| 卷四 | 高级主题(concepts / 协程 / 模板 / 设计模式| 29 | 🔨 在建 |
108108
| 卷五 | 并发编程 | 44 | ✅ 成型 |
109-
| 卷六 | 性能优化 | 3 | 🔨 在建 |
109+
| 卷六 | 性能优化 | 6 | 🔨 在建 |
110110
| 卷七 | 工程实践(CMake / 工具链 / 调试) | 8 | 🔨 在建 |
111-
| 卷八 | 领域应用(嵌入式 / 网络 / GUI / 存储| 63 | ✅ 成型 |
111+
| 卷八 | 领域应用(嵌入式 / GUI / 存储等| 63 | ✅ 成型 |
112112
| 卷九 | 开源项目研读(Chromium 等) | 16 | 📚 持续更新 |
113113
| 卷十 | 课程与演讲笔记(CppCon 等) | 17 | 📚 持续更新 |
114114

changelogs/v0.7.0.md

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
# v0.7.0 (2026-06-25)
2+
3+
内容主线里程碑:卷三「标准库」全面成型、卷四补齐 GoF 设计模式系列、卷六补齐内存安全与 sanitizer 三部曲、卷五并发 Lab 重设计为 TDD 工程;平台层落地代码折叠与字号开关,部署链路切换为 GitHub Pages artifact 方式;英文翻译覆盖率达 100%。
4+
5+
## 卷三:标准库全面成型
6+
7+
按 v0.6.0 路线图「012 卷三全面重建」收尾。本轮把容器以外的标准库全部写完,并把扁平结构重组为 6 个子目录,每篇均带本机 GCC 16.1.1 真实终端输出,零 stub:
8+
9+
- **containers/(13 篇)** — v0.6.0 里程碑内容,本轮仅作目录迁移,确认完整无损坏。
10+
- **iterators-algorithms/(7 篇 40–46)** — 迭代器适配器、STL 算法总览(上/下)、数值算法、ranges 与 C++23 新件(`fold`/`contains`/新适配器)、并行算法(`-ltbb``par` / `par_unseq` 编译命令)。
11+
- **strings/(6 篇)**`char8_t` 与 UTF-8、`string_view``charconv``format``print``regex`(按 C++20/23 标注支持度)。
12+
- **error-utils/(8 篇 61–68)**`optional``variant``any``expected`(monadic 链 + 与异常的性能实测,频繁失败路径快近两个数量级)、`functional``error_code``stacktrace``source_location`
13+
- **io/(3 篇 55–57)**`iostream`(为何慢、怎么用才不慢)、`fstream`(RAII + 二进制可移植性)、`filesystem`(真实遍历 `/usr/include` 21173 条目 benchmark,冷热页缓存差 ~20×,`directory_entry` 缓存 vs 自由函数重 stat 实测)。
14+
- **time-numeric/(3 篇 58–60)**`chrono`(实测 `high_resolution_clock` 在 libstdc++ 是 `system_clock` 别名,纠正老资料说是 `steady_clock` 的说法;C++20 日历/时区/`parse`)、`cmath`(精度陷阱)、`random`(为什么别用 `rand`)。
15+
16+
v0.6.0 changelog 标记的卷三待办基本清零;唯一留作可选深化项的是独立的「libc++ 源码阅读」专题——但多篇 deep-dive(`vector`/`string`/`map`/`unordered_map`/`charconv`/`regex` 等)已内嵌实现级源码分析,故该专题文章的缺失不等于内容缺失。
17+
18+
## 卷四:GoF 设计模式系列
19+
20+
从笔者旧博客迁移 **21 篇 GoF 设计模式**([01-singleton … 21-mediator](documents/vol4-advanced/vol4-generics-patterns/)),一次性补齐 `vol4-generics-patterns` 子区。按创造型(4)/结构型(7)/行为型(10)分组,统一走「朴素写法 → 逐步改进 → 终端实测验证 → 决策表 → 小结」骨架,是现代 C++ 写法而非朴素 OOP:
21+
22+
- **Visitor**`-O2` 汇编看 `std::visit` 判别式分派 + 500 万次虚函数 vs variant 实测,带诚实的「variant 并不总是更快」caveat。
23+
- **Singleton** 用 500 线程实测证 C++11 magic-statics 线程安全,对比 DCLP 的 acquire/release。
24+
- **Observer**`weak_ptr` 防悬挂 + ASan 复现 use-after-free。
25+
26+
21 篇均有配套 CMake 工程([`code/volumn_codes/vol4/design-patterns/`](code/volumn_codes/vol4/design-patterns/)),中英双语对齐。index 另标「规划中」的模板级模式(Policy-Based Design / CRTP / type erasure / Mixin 等)作为未来路线。
27+
28+
## 卷六:内存安全与 sanitizer
29+
30+
新增内存安全三部曲(#80,迁移自作者 `*sans` 笔记):
31+
32+
- **ASan 家族**(compile-time instrumentation / 1:8 影子内存 / quarantine)+ Heartbleed(CVE-2014-0160)越界读框架;五 sanitizer(ASan/LSan/MSan/TSan/UBSan)对比,ASan↔TSan 互斥用真实编译错误演示。
33+
- **Valgrind vs ASan**——DBT/JIT(20–50× 慢、免重编译、memcheck A-bit/V-bit 双影子表)vs CTI(~2×、须重编译、影子内存)两条路线对比;五工具分解(memcheck/callgrind/cachegrind/helgrind+drd/massif),六种错误(uninit/UAF/OOB/leak/malloc-delete 错配/double-free)带 GCC 16.1.1 + valgrind 3.25.1 真实输出。
34+
- **sanitizer 工具链全景**——用户态 `-fsanitize=*` ↔ 内核 KASAN/KMSAN/UBSAN/KCSAN/KFENCE/DAMON(含合并版本),三层防御(开发期全插桩 / 预发布采样 / 生产轻量)。
35+
36+
37+
## 卷五:并发 Lab 重设计
38+
39+
并发 Lab(#70)重设计为 TDD 工程:新增 [`code/volumn_codes/vol5-labs/`](code/volumn_codes/vol5-labs/)(standalone FetchContent + Catch2 v3.7.1),`templates/`(空骨架,学习者拷贝去做)/ `examples/`(参考实现)双轨,每个 lab 独立可构建。
40+
41+
- **Lab 0(线程生命周期)** 完整:MS1–4 渐进测试 + TSan 友好的并发文件扫描器参考实现(递归收集 → 分片 → `JoiningThread` worker → 归约)。
42+
- **Lab 1(阻塞队列 / 并发缓存 / 同步原语)** 模板与 MS1–6 测试就绪;参考实现标注「⚠️ 正在开发中」,目前只有空声明,完成后作为对照。
43+
44+
两份 lab 手册(`exercises/00-thread-lifecycle.md``01-bounded-queue.md`)大改重写
45+
46+
## 卷八:领域归属整理
47+
48+
`networking` 子区内容下线(挪至 `.claude/drafts/networking/` 待重写,gitignored),卷八回归嵌入式 / GUI / 存储 / 算法 / C++ 深入五个已成型子领域(中英 index 与全仓引用同步清理,零死链)。
49+
50+
## 平台与站点
51+
52+
- **长代码折叠**(#72,对应 issue #71):构建期 markdown-it 插件,把超阈值行数的代码块整段包进原生 `<details>`——零 FOUC(静态即折叠态)、无 JS 原生可展开、打印友好;`code-group` 内子块豁免。代码放在 `<details>` 外、纯 CSS `:has(details[open])` 控展开。
53+
- **字号开关**(#69):正文五档缩放(超小 / 小 / 正常 / 大 / 超大),桌面 + 移动端导航均有,A-/A+ 步进,localStorage 持久化,首屏由 `<head>` 内联脚本提前应用防闪烁。
54+
- **部署链路优化**(#78):`gh-pages` 分支部署 → `actions/deploy-pages` artifact 部署。根治了 search 索引 chunk 每次构建换 hash 被 commit 进 gh-pages、致仓库膨胀至 437MB(86% 是 `.git`)的问题;main 分支保持干净,站点已上线。
55+
- **构建/校验基础设施**:
56+
- `tags.py` 抽为 `VALID_TAGS` 单一数据源(`validate_frontmatter.py` + `check_quality.py` 共用),根治 vol4 设计模式迁移时两套白名单分叉导致 CI 挂的坑;本轮补全 GoF 设计模式 + 内存安全 + 调试/测试等新标签。
57+
- 新增 `build_examples.py`:host / STM32 分离 + CTest 支持,CI 接入,发现 113 个 host 工程。
58+
- `translate.py` 两处加固:`normalize_translated_title` 剥离 LLM 重新加回的 `<>`(v-html 吃裸尖括号)+ `yaml.dump width` 防长标题折行被侧边栏截断。
59+
60+
## 内容修复
61+
62+
- **卷一 Cache 步长实验量纲错误**(总耗时 → 每次访问耗时),#68 —— 源自 [@Nyuudoukumo](https://github.com/Nyuudoukumo) 的反馈 issue #67
63+
- **`std::inplace_vector` 代码示例改进**,#73,@YukunJ
64+
- **`std::is_trivially_copyable_v` 代码示例错误表述修正**,#75,@YukunJ
65+
- **`std::pmr::vector` 仅用栈缓冲、不落堆的实测佐证**,#77,@YukunJ
66+
67+
## 翻译
68+
69+
- 英文全量对齐;卷六内存安全 3 篇补译,英文覆盖率 **99% → 100%(494/494)**,所有卷全部双语对齐。
70+
- README 状态表全量刷新:卷三 8→40 篇(翻为「✅ 成型」)、卷四 8→29 篇(标注含设计模式)、卷六 3→6 篇、卷八描述去掉已下线的「网络」;coverage 徽章由 `coverage.py --update` 自动更新为 100%。
71+
72+
## 贡献者
73+
74+
Charliechen114514、YukunJ(代码与内容);
75+
76+
感谢反馈者 **[@Nyuudoukumo](https://github.com/Nyuudoukumo)**(issue #67 卷一 Cache 内容勘误,促成 #68 量纲修正)。已同步进 CONTRIBUTORS.md 与中英 team 页。
77+
78+
本版合并 PR #68#80#71/#74 为 issue,未计入)
79+
80+
贡献者 Charliechen114514、YukunJ,反馈者 Nyuudoukumo。

documents/en/team/index.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,15 @@ The valuable feedback from these folks is equally worth recording. It is your fe
9898
<p class="card-desc">Reported compilation failure in the expected example</p>
9999
</div>
100100
</a>
101+
<a href="https://github.com/Nyuudoukumo" target="_blank" rel="noopener noreferrer" class="contributor-card">
102+
<img src="https://github.com/Nyuudoukumo.png?size=96" alt="Nyuudoukumo" class="card-avatar" />
103+
<div class="card-body">
104+
<span class="card-name">Nyuudoukumo <span class="card-badge issue">Issue</span></span>
105+
<p class="card-role">Bug Report · Content Errata</p>
106+
<p class="card-types">🐛 💡</p>
107+
<p class="card-desc">Reported an inconsistency between the example and explanation in Vol.1 "Cache and Memory Hierarchy" (#67), leading to a units fix</p>
108+
</div>
109+
</a>
101110
</div>
102111

103112
## How to Become a Contributor

documents/en/vol5-concurrency/exercises/01-bounded-queue.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ Upon completion, you should have muscle memory for the mutex + condition_variabl
5555

5656
## Project Scaffold (Get this running first)
5757

58-
Each Lab has two versions under `vol5-labs/`: **`templates/lab1_bounded_queue/`** is the empty implementation skeleton (copy this one to work on), and **`examples/lab1_bounded_queue/`** is the reference implementation (use this to compare if you get stuck, but don't copy it upfront). Both are standalone projects. You will be working on the `templates` version:
58+
Each Lab has two versions under `vol5-labs/`: **`templates/lab1_bounded_queue/`** is the empty implementation skeleton (copy this one to work on), and **`examples/lab1_bounded_queue/`** is the reference implementation (⚠️ under development — currently only empty declarations, no complete reference yet; once complete, use it to compare if you get stuck, but don't copy it upfront). Both are standalone projects. You will be working on the `templates` version:
5959

6060
```text
6161
templates/lab1_bounded_queue/

0 commit comments

Comments
 (0)