【阅】本周阅读摘选2026-04-06 → 2026-04-12

Posted by Cao Zihang on April 13, 2026 Word Count:
本周阅读摘选
2026-04-06 → 2026-04-12
目录

学术相关

技术技巧

腾讯技术工程丨技术教科书:顶级开发团队设计的Harness工程项目源码什么样

cloc丨Count Lines of Code

  • file & directory & archive & git repo: cloc [path]
  • Iterative for d in ./*/ ; do (cd "$d" && echo "$d" && cloc --vcs git); done
  • help cloc --help

有输入输出控制options,支持diff对比

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
prompt> cloc perl-5.22.0.tar.gz
    5605 text files.
    5386 unique files.
    2176 files ignored.

https://github.com/AlDanial/cloc v 1.65  T=25.49 s (134.7 files/s, 51980.3 lines/s)
-----------------------------------------------------------------------------------
Language                         files          blank        comment           code
-----------------------------------------------------------------------------------
Perl                              2892         136396         184362         536445
C                                  130          24676          33684         155648
C/C++ Header                       148           9766          16569         147858
Bourne Shell                       112           4044           6796          42668
Pascal                               8            458           1603           8592
XML                                 33            142              0           2410
YAML                                49             20             15           2078
C++                                 10            313            277           2033
make                                 4            426            488           1986
Prolog                              12            438              2           1146
JSON                                14              1              0           1037
yacc                                 1             85             76            998
Windows Message File                 1            102             11            489
DOS Batch                           14             92             41            389
Windows Resource File                3             10              0             85
D                                    1              5              7              8
Lisp                                 2              0              3              4
-----------------------------------------------------------------------------------
SUM:                              3434         176974         243934         903874
-----------------------------------------------------------------------------------

Tree-Sitter]

增量式代码解析器生成器,将源代码转换为抽象语法树AST,并提供Tree Query Language (TQL)进行查询

VS Code、Neovim等均使用Tree-Sitter进行语法高亮

娱乐

DeepScientist & PaperOrchestra

主要关注Harness