Latest posts

Mar 28, 2025

Why Is There Fun


Linus Torvalds 在他的书Just for Fun中谈到The Beauty of programming:

It’s a game much more involved than chess, a game where you can make up your own rules and where the end result is whatever you can make of it.

这与数学有着相似之处,同样是在人所创造的系统中玩耍

One of the biggest joys was learning that computers are like mathematics: You get to make up your own world with its own rules. In physics, you’re constrained by existing rules. But in math, as in programming, anything goes as long as it’s self-consistent.

Mar 28, 2025

Synchronization Mechanism In Assembly Level


Synchronization is required for operation of execution. Two memory accesses form a data race if they are from different threads to the same location, at least one is a write, and they occur one after another.

we focus on the implementation of lock and unlock synchronization operations.

Lock and unlock can be used straightforwardly to create regions where only a single processor can operate, called a mutual exclusion

To implement this two operation, we need hardware primitives that atomically read and write into memory.

Mar 26, 2025

Heuristic Computing


Human’s ignorance makes one not able to present an algorithm for the exact nature of a certain task. For instance, write a realistic fiction or paint a expressionist canvases. The enough information is unknown for an algorithm to be invented to capture the nature of them. Those tasks may involve multiple variables and parameters that interacts in a nontrivial way. Indeed, comprehending the full nature of these interactions may well exceed human’s cognitive capacity.

Latest photos