从 re-frame、Raft、Free Monad 和 Fetch 出发,理解 effect value、interpreter、effect program 与语言级 Effect System 的区别。
Blog
nrepl-starter 在 Java 应用内部启动 Clojure nREPL,Tenx 再把 IDEA 里的方法调用转成 REPL 表达式,让复杂测试数据准备和运行时调试从半小时缩短到秒级。
Fetch 把业务查询写成可组合的程序描述,再自动发现独立请求、合并批量查询,并沿着数据依赖分轮执行。
TinyKV 的 Raft 节点把网络和磁盘副作用变成可检查的消息与 Ready。测试只需传递和断言这些 value,就能模拟选举、丢包与网络分区。
Flutter 的状态管理可以离开模拟器测试。re-dash 把 re-frame 的六个 domino 搬进 ClojureDart:view 是纯函数,用户行为是数据。
为什么只给 neural network 戴上信息遮罩仍会作弊,以及如何用 observation、belief sampler 与 root determinization 搭出第一版公平搜索。
从 War Chest 的棋盘出发,用 cube coordinates 的三维切面理解 axial coordinates、六个邻居以及 hex distance。
把距离、直线、路径与阻挡拆成可组合的几何 primitive,再用它们表达弓箭手、弩手等 War Chest 单位规则。
为什么我要把 coding 领域已经验证过的 AI 工作方法,翻译给愿意改变工作方式的知识工作者。
从第一性原理出发理解 agent:读完以后,你能把 AGENTS.md、skill、plan mode、goal mode、subagent、handoff、guardrail 等概念放回同一套任务坐标里。
How Monte Carlo Tree Search connects game states, legal moves, policy priors, and value estimates.
Interactive notes for learning bitboard board representation.
读 SkillOpt 论文后的一个想法:通用任务可以训练公共 best_skill,但写作和人文类 skill 更像个人 taste profile,选 skill 本质上是在选一种审美和工作方式。
从《降临》的外星文字出发,思考语言如何把高维语义关系投影成人类可以处理的表达。
Agent 不是单个模型,而是围绕模型组织目标、上下文、工具、记忆、权限、验证和控制循环的一套运行系统。
Context assembly 的目标不是把历史对话依次拼接,而是为当前任务构造一个清楚、有层级、有证据的工作视图。
长任务不一定要让 agent 一口气跑到底。把关键中间结果写成结构化文档,本身就是一种受控压缩和人工纠偏机制。
LLM 可以先理解成一个根据当前输入继续生成 token 的语言引擎。Agent 则是把模型、上下文、工具、记忆、权限和运行循环组织起来的系统。
Memory 是外部保存、可被取回的信息;context 是当前这一轮真正放进模型窗口的材料。把两者分开,才能设计清楚 agent 的记忆机制。
Agent 并不是直接用自然语言操作世界,而是把人的意图翻译成结构化工具调用,再由 runtime 做确定性执行。
Agent 能看到什么,本身就是权限问题。Context 管理不能只考虑相关性,也必须考虑可见性、来源边界和派生数据权限。
Agent 说“读这个文件”时,runtime 不一定要把原始字节流直接塞给模型。读操作可以先经过类型感知、可追溯、可展开的处理层。
Subagent 不只是并行执行任务的工具,更重要的是给局部问题创建隔离的上下文、权限和工作区。
Context 不是所有历史,也不是所有资料,而是当前这一轮真正进入模型窗口的材料。理解 context,才能理解 agent 为什么需要管理、压缩和选择信息。
Context 管理的目标不是把更多资料塞给模型,而是在有限窗口里让模型看到更相关、更清楚、更可执行的材料。
新概念往往不是线性出现的,而是网状地互相牵连。学习它们时,先有大致位置感,再慢慢补充细节,是很自然的过程。
在保留必要难度的前提下,用 AI 消解不必要难度、调节练习强度与广度,用 AI 做辅助而非代劳
区分对掌握有实质贡献的「必要难度」与来自糟糕设计的「不必要难度」,以及如何在做学习、教学和工具设计时有意识取舍
长时间运行的 agent 任务必须有明确的 guardrail,否则容易跑偏、浪费 token、增加人类 review 成本。
Testing UI by treating the view as a pure function (state → hiccup), with no browser; and designing test-helper error messages so AI agents can fix failing tests from concrete suggestions.
探讨 AI agent 的自主性 spectrum,讨论 agent 如何判断哪些决策应该自己做,哪些应该由用户来做
介绍如何使用 opencode 插件记录 LLM interaction traces,并让 agent 分析这些 traces 以发现模式和改进自身
分析 Beads 工具的实际使用问题,讨论外部记忆与内部 prompt 的权衡
探讨如何用确定性评分器替代传统 LLM as Judge 进行写作质量评估,包括金字塔原理和 DivIO 文档分类框架
通过提问机制和 zettelkasten 知识组织,让 agent 帮助人类发现和解决问题
AI Eval System 是用来系统性地测试和评估 AI 系统质量的框架。本文介绍了 Eval System 的核心问题、传统方法的局限,以及如何用 GTD 范式来构建这样的系统。
在构建 AI Eval System 时,打分逻辑应该优先使用确定性方法(linter、type checker)。本文讨论了 LLM as judge 的递归问题和不确定性叠加,以及为什么确定性评分方法更具优势。
探讨如何有意义地利用 AI subscription 多余额度,以及长时间运行 agent 的设计挑战
给 Clojure 库添加类型导出,让依赖方获得 clj-kondo 静态类型检查。本文记录了使用 Malli schema 定义类型、导出给 clj-kondo 的完整流程,以及路径配置的陷阱和解决方案。
强类型语言的编译器能做检查,是否意味着 AI 生成代码更有优势?本文探讨了类型表达力、类型体操成本、编译期 vs 运行期验证,以及动态类型语言在 AI 生成场景下的灵活优势。
Exploring the essential difference between libraries, frameworks, and tools/SDKs—and why frameworks matter less in the AI era.
探讨 AI 辅助编程如何改变开发者对开源框架的依赖模式,以及对开源项目生态的长期影响
用设计系统作为允许清单,通过自定义 Linter 约束 AI 生成代码的样式,保证颜色、间距、字体等符合规范。
说明当前项目如何落地设计系统 Linter 方案的数据源与规则实现。
it's like contribution.md on github, but for writing
Me rant about Java and Java devs
记录信息来源, 持续修订
Exploration of common workplace dissatisfaction factors and practical approaches to enhance career fulfillment.
Discover practical techniques to make writing easier and more effective, including leveraging AI tools, personal note-taking systems, and identity-based habit formation for a more productive writing process.
The concept of digital gardening, ideal navigation structures, and content update challenges
An explanation of how RocketMQ handles disk full scenarios, including the error message, relevant source code, and the disk space checking mechanism.
An exploration of shadowing as a language learning technique, discussing its effectiveness at different proficiency levels and providing practical tips for maximizing its benefits.
A summary of my experience learning Indonesian in one month, discussing the challenges and achievements, and providing insights into the learning process.
An overview of the technologies and tools used to create this blog, including Astro, MDX, React, Tailwind CSS, and more.
A reflection on the experience of using the ThirdTime work method for one month, discussing the challenges and achievements, and providing insights into the work method.
An exploration of the new delay message feature in RocketMQ 5.0, discussing its implementation and how to set the precision parameter for optimal performance.
A detailed investigation of the MQBrokerException code 14 issue in RocketMQ, discussing the causes and solutions.
An overview of distributed tracing concepts, including traces, spans, and contexts, with a focus on OpenTracing standards and their applications in system monitoring and debugging.
An explanation of how to use MessageChannel for bidirectional communication between a parent page and an iframe, with code examples and step-by-step instructions.
A tutorial series on building a compiler in Clojure, starting with simple arithmetic expressions and progressing to more complex language features, including AST visualization and compilation to stack-based VM instructions.
当多个实体 ID 都用 String 表示时,编译器无法阻止误传。用 tagged type 和 phantom type 可以把这类约束加入类型系统,而不改变运行时表示。
An introduction to Iso, a type of lens in functional programming that represents isomorphisms between types. The post explains the concept, provides code examples in Scala, and demonstrates practical applications of Iso in handling unit conversions.
An exploration of natural transformations between functors in functional programming, introducing the concept of Free functors and demonstrating how to implement conversions between different container types like Monix Task, Scala Future, and Java CompletableFuture.
An implementation of a distributed mutex using Akka, exploring logical timestamps and consensus algorithms. This post introduces the problem, outlines the requirements for the distributed lock, and sets up the basic Akka actor structure for the solution.
A Rust implementation of out-of-core sorting algorithm, demonstrating how to handle datasets larger than available memory. This post covers the basic concepts of out-of-core sorting, explains the phased approach, and provides a step-by-step implementation in Rust, focusing on disk I/O operations and memory management.
An introduction to string search algorithms, focusing on the naive brute-force approach and the Boyer-Moore algorithm. This post explains the basic concepts, implementation details, and efficiency improvements of these methods for finding substrings within larger text.
An introduction to profunctors in functional programming, explaining their definition, relationship to bifunctors, and implementation in Scala. This post covers the basic structure of profunctors, their laws, and provides examples of profunctor instances like function types.
An overview of the MapReduce distributed computing model based on the original Google paper. This post covers the MapReduce workflow, master-worker architecture, fault tolerance mechanisms, and optimization techniques like data locality and backup tasks. It also addresses common questions about task granularity and failure handling in MapReduce systems.
An explanation of how to implement at-most-once semantics in distributed systems, covering client-side XID usage, server-side result caching, and strategies for cache management and handling concurrent requests.
An exploration of polymorphic function values in Scala, focusing on natural transformations. This post discusses the limitations of standard Scala function values and introduces a more flexible approach for handling polymorphic functions, particularly useful for operations on heterogeneous lists (HLists).
An overview of out-of-core sorting and hashing techniques for handling datasets larger than available memory. This post explains buffer usage, the process of external sorting with multiple passes, and partitioning strategies for out-of-core hashing, including analysis of memory requirements and data size limitations.
An introduction to applicative functors in functional programming, explaining their definition, methods, and properties with Scala code examples. The post covers the ap and pure methods, as well as the product-based definition of applicatives.
An introduction to lenses in functional programming, explaining how they serve as functional equivalents to getters and setters in object-oriented programming, with code examples in Scala.
An introduction to Kleisli arrows in functional programming, explaining how they enable composition of functions that return monadic values. The post covers the concept of Kleisli composition, its implementation in Cats, and provides examples using the Writer monad.
An exploration of contravariant functors in functional programming, explaining their definition, intuition, and practical applications. The post covers the contramap function, compares it with covariant functors, and provides examples using Show and Ordering types in Scala.
An overview of networking hardware including hubs, switches, and routers, along with traffic classification and packet capture techniques. This post explores the differences between these devices, their roles in network communication, and methods for monitoring network traffic.
An analysis of fault-tolerant virtual machine replication techniques, discussing primary-backup architectures, deterministic replay, output consistency, and failure detection mechanisms. The post also compares these approaches with log replication in the Raft consensus algorithm.
An analysis of the Google File System (GFS) architecture, discussing its design assumptions, chunk-based storage, metadata management, and consistency model. The post explores the benefits and drawbacks of large chunk sizes, the role of the master server, and the system's approach to data mutations and consistency.
An overview of the Raft consensus algorithm, explaining its key components including leader election and log replication. This post covers the basics of how Raft ensures consistency across distributed systems, handles network partitions, and maintains a replicated state machine.
An overview of the OSI and TCP/IP network models, explaining the functions of each layer and how they interact. This post also covers network topologies and protocols like CSMA and token ring used in bus networks.
An overview of database storage methods, including log-structured storage, indexing techniques, Sorted String Tables (SSTs), and B-trees. The post explores the advantages of each approach and discusses optimizations for improved performance and reliability.
表达力强的语言对框架的需求就少,Clojure 本身可作为框架,通过 interop 接入 JVM、ClojureScript 接入 JS/Node、libpython-clj 接入 Python 等多元生态。
延续 static site generator 的思路,讨论 render 基于数据库而非文件系统的优点:更好的查询能力、无需 ship db、数据由 ingest 生成故无同步问题,可类比 IDE 与 hledger 的架构。
讨论在静态站点生成器中引入数据库环节的好处:代码复用、强大查询能力、类型安全、可扩展性和更佳的开发体验。
讨论如何通过引入 IR 中间表示层组织 UI 代码,实现业务逻辑可测试、渲染后端可替换、布局算法可复用,适用于 DOM、Mobile、游戏引擎等多个平台。