目录:
** 0x01 花时间在有伸缩性的事情上|Do Things That Scale
** 0x02 浏览器引擎简史
** 0x03 Git 内部的对象存储|Git-Internals-PDF
** 0x04 函数式可组合 UI 组件|React Hook
** 0x05 如何画出完备的状态图
** 0x06 MIT 的 CS 工具课
** 0x07 自由开放格式的图像格式|FLIF - Free Lossless Image Format
** 0x08 微服务的黑暗面 | The Dark Side of Microservices, Explained
0x01 花时间在有伸缩性的事情上|Do Things That Scale
这篇文章的作者认为不必浪费时间在那些没有伸缩性 (Scale) 的事情上, 例如:
只解决了自己或少数人的问题: Only fix a problem for myself (and maybe a small group of others)
需要永久维护, 例如需要自己永久维护: Have to be maintained in perpetuity (by me)
而应该做那些更有伸缩性的事情:
修复那些大多数人大部分时候需要解决的问题: Fix the problem in way that will just work? for most people, most of the time
由社区里广泛的人参与开发, 使用和维护的项目: Are developed, used, and maintained by a wider community
0x02 浏览器引擎简史
主流浏览器和它们的引擎:
IE 浏览器的渲染引擎是 Trident
Chromium 浏览器的渲染引擎是 Blink
Safari 浏览器的渲染引擎是 webkit
Edge 浏览器原来的渲染引擎是 Edgehtml, 现在是基于 Chromium 魔改了.
Mozilla Firefox 的渲染引擎原来是 Gecko, 现在逐渐改为基于 rust 开发的 Servo
Opera 浏览器原来有独立的渲染引擎, 现在也基于 Chromium 了, 但是原始的一帮人又自己另外搞了一个独立的浏览器引擎和浏览器, 做个性化定制.
而 Blink,2013 年之前 Chromium 浏览器的引擎也是 Webkit, 只是 Google 想要做多进程构架, 于是就自立门户, 改名自家的渲染引擎为 Blink, 并且删除了大量的 Webkit 里不被需要的文件, 从此以后不再向上游 Webkit 提交. 基于 Webkit 渲染引擎的浏览器除了 Apple 的 Safari 外, 还有很多其他的. 而 Webkit 前身是 KDE 小组的 KHTML.
[1] Webkit 引擎主页 https://webkit.org/
[2] Blink 引擎 https://www.chromium.org/blink
[3] Servo https://servo.org/
0x03 Git 内部的对象存储|Git-Internals-PDF
- It's hard to reuse stateful logic between components
- Complex components become hard to understand
- 1/13: Course overview + the shell
- 1/14: Shell Tools and Scripting
- 1/15: Editors (VIM)
- 1/16: Data Wrangling
- 1/21: Command-line Environment
- 1/22: Version Control (Git)
- 1/23: Debugging and Profiling
- 1/27: Metaprogramming
- 1/28: Security and Cryptography
- 1/29: Potpourri
- 1/30: Q&A
- // a file is a bunch of bytes
- type blob = array<byte>
- // a directory contains named files and directories
- type tree = map<string, tree | file>
- // a commit has parents, metadata, and the top-level tree
- type commit = struct {
- parent: array<commit>
- author: string
- // 注: 原文没有, 但最新的 Git 有这个
- committer: string
- message: string
- tree: tree
- }
- type object = blob | tree | commit
- objects = map<string, object>
- def store(object):
- id = sha1(object)
- objects[id] = object
- def load(id):
- return objects[id]
- // 注: 原文没有, 我添加的
- // a tag provides a permanent shorthand name for a particular commit.
- // it contains an object, type, tag, tagger and a message
- type tag = struct {
- // object 是某个 commit 的 hash
- object: string
- type: string
- tag: string
- tagger: string
- message: string
- }
- 14% smaller than lossless WebP,
- 22% smaller than lossless BPG,
- 33% smaller than brute-force crushed PNG files (using ZopfliPNG),
- 43% smaller than typical PNG files,
- 46% smaller than optimized Adam7-interlaced PNG files,
- 53% smaller than lossless JPEG 2000 compression,
- From a theoretical perspective, the difficulty mostly arises from two key areas:
- consensus
来源: http://www.bubuko.com/infodetail-3413779.html