chibicc 源码笔记

(0522e2d) Compile an integer to an exectuable that exits with the given number

  • 输出一个简单的 echo 汇编到tmp.s.
  • Makefile 中的 main.o 默认自动编译,.PHONY声明testclean为伪目标,防止意外依赖。

(bf7081f) Add + and - operators
(a1ab0ff) Add a tokenizer to allow space characters between tokens

Read More

使用 GitHub Actions 自动部署

GitHub Actions 是 GitHub 的线上持续集成 (CI) 服务,它提供了非常丰富的操作,能够在线上自动化地完成许多繁琐的操作。

Action 基本配置

GitHub 的 Action 配置文件放在项目下的 .github/workflows 目录中,我们可以新建一个 yaml 文件,例如 gh-pages.yml

Read More

Win 与 Unix 的几个字符区别

某些字符在 Win 端和 Unix 端有着不同的涵义,这是由它们各自发展的历史原因所导致的。

正斜杠与反斜杠

正斜杠 / 的英文是 forward slash 或者直接 slash,而反斜杠 \ 的英文名是 backward slash 也即 backslash。

Read More

简明 Git

Git 本质上是一个备份工具,不过它使用了一个 diff 算法为每次改变都做了一个节点的备份,很多关于 git 的教程实际上只是一个 cheatsheet, 并没有真正讲明白 git 的内在逻辑。一般来说,使用 git 进行版本控制的工作项目至少存在 3 份工作环境,分别是本地 , 缓存 cache, 和远程仓库 remote.

Read More