← cd ~/ 返回首页
⚠ DEMO — 当前页面为演示内容,笔记为占位示例,真实数据待补充完善。
❯ tree ~/notes/
~/notes
├── scratchpad.md ← 碎片笔记
├── reading-list.md ← 阅读清单
├── tools-i-use.md ← 常用工具
└── quotes.md ← 摘抄收藏
## scratchpad.md 碎片笔记
2025-05-10 23:42
关于 LLM Agent 的思考
LLM Agent 的本质是将大模型的推理能力与外部工具执行解耦。关键设计点:
1. Tool Definition — 清晰的 schema 定义比 prompt engineering 更重要
2. Planning — ReAct 模式在大多数场景够用,复杂任务可考虑 tree-of-thought
3. Memory — 短期记忆(上下文窗口)+ 长期记忆(向量检索)的混合架构是当前最优解
2025-05-08 15:20
Go channel 的一个坑
close(nil chan) 会 panic,不是返回 error。
最佳实践:发送方 close channel,接收方用 v, ok := <-ch 检测关闭。
多发送方场景使用 sync.Once 或者专门的 done channel。
2025-04-30 09:15
PostgreSQL 查询优化笔记
EXPLAIN ANALYZE 比 EXPLAIN 更准确,因为会实际执行。
注意 Seq Scan vs Index Scan — 小表 Seq Scan 反而更快。
pg_stat_statements 是排查慢查询的第一站。
## reading-list.md 阅读清单
-
✓ 已读
Designing Data-Intensive Applications — Martin Kleppmann
-
✓ 已读
Crafting Interpreters — Robert Nystrom
-
● 在读
Database Internals — Alex Petrov
-
○ 待读
The Art of Computer Programming, Vol 1 — Knuth
-
○ 待读
A Philosophy of Software Design — John Ousterhout
## tools-i-use.md 常用工具
Editor: neovim + vscode
Terminal: warp / kitty
Shell: zsh + starship
Notes: Obsidian
Git: lazygit + gh CLI
Browser: Arc
Launcher: Raycast
Font: JetBrains Mono
## quotes.md 摘抄收藏
"Simplicity is prerequisite for reliability."
— Edsger W. Dijkstra
"Make it work, make it right, make it fast."
— Kent Beck
"The most effective debugging tool is still careful thought."
— Brian Kernighan