惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

F
Fortinet All Blogs
S
Secure Thoughts
月光博客
月光博客
美团技术团队
雷峰网
雷峰网
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
N
News and Events Feed by Topic
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Forbes - Security
Forbes - Security
W
WeLiveSecurity
P
Proofpoint News Feed
阮一峰的网络日志
阮一峰的网络日志
爱范儿
爱范儿
G
GRAHAM CLULEY
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
AI
AI
Last Week in AI
Last Week in AI
Google Online Security Blog
Google Online Security Blog
Schneier on Security
Schneier on Security
云风的 BLOG
云风的 BLOG
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Recent Announcements
Recent Announcements
Webroot Blog
Webroot Blog
T
Tor Project blog
Cisco Talos Blog
Cisco Talos Blog
N
News and Events Feed by Topic
罗磊的独立博客
The Register - Security
The Register - Security
Blog — PlanetScale
Blog — PlanetScale
T
Threat Research - Cisco Blogs
博客园 - 【当耐特】
Apple Machine Learning Research
Apple Machine Learning Research
人人都是产品经理
人人都是产品经理
T
The Exploit Database - CXSecurity.com
www.infosecurity-magazine.com
www.infosecurity-magazine.com
B
Blog
腾讯CDC
Microsoft Azure Blog
Microsoft Azure Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
H
Hacker News: Front Page
Application and Cybersecurity Blog
Application and Cybersecurity Blog
Engineering at Meta
Engineering at Meta
Latest news
Latest news
IT之家
IT之家
D
DataBreaches.Net
博客园 - 司徒正美
N
Netflix TechBlog - Medium
V
V2EX
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知

暗无天日

读:AI Agent 安全日志——从可见性与隐私的两难说起 - 暗无天日 读:AI Agent 生产化——一份从原型到上线的速查清单 - 暗无天日 AI写作的语言指纹——如何让文字不那么像机器 - 暗无天日 读:50 条 Claude Code 技巧——一个工程经理的六个月使用心得 读:AI 辅助开发为什么让 E2E 测试更有价值 - 暗无天日 读:在Emacs中使用Claude Code(Spacemacs适配版) - 暗无天日 Claude Code 背后的工程哲学——读 Agent Harness Engineering 读:Agent Harness Engineering——AI 智能体不只是模型,还有套件 - 暗无天日 browser-harness:让 AI 直接接管你的浏览器 - 暗无天日 读:Security-First CI/CD —— DevSecOps 自动化实践指南 TIL: 数字小键盘的小数点陷阱与行内算术求值 - 暗无天日 读:Immutability 不是万能药,它是一种权衡 - 暗无天日 Conducty:给 Claude Code 加上项目记忆和并行执行能力 - 暗无天日 读 — GitHub Trending 里的 Claude Code 技能包 读 — Prompt Caching 省钱指南 TIL: Emacs 中那些跟鼠标配合的冷门快捷键 - 暗无天日 读:Anvil——把 Emacs 变成 AI 的工具服务器 读:Emacs 代码折叠终极指南 - 暗无天日 git推送失败后恢复仓库损坏的完整记录 - 暗无天日 多智能体系统的两个有效模式——以及对 Claude Code 用户的启示 - 暗无天日 用 Org Babel 写 Literate 博文:扩展执行 + 定制导出 proced:Emacs 内置的进程查看器 - 暗无天日 从 proced 定制中学到的 Elisp 模式 读:让 Emacs proced 在 macOS 上显示 CPU 和内存 异步编程的函数着色税 - 暗无天日 链式调用的代价:JavaScript 和 Clojure 的共同教训 - 暗无天日 hyperfine:命令行基准测试工具 - 暗无天日 管道中的变量去哪了?——子 shell 作用域陷阱 - 暗无天日 开源包装器的信任陷阱:四个危险信号 - 暗无天日 程序员愿意为 AI 写文档,却不愿为同事写 - 暗无天日 mktemp: Shell 脚本中临时文件的安全陷阱与最佳实践 - 暗无天日 WSL9x —— 在 Windows 9x 里跑 Linux 内核 6.19 用 ox.el 做你想做的事 —— org-export 高级编程指南 读:Hot-wiring the Lisp Machine —— 用纯 Elisp 构建零依赖的 Org 静态站点生成器 Elisp 性能优化的六个实战教训 - 暗无天日 fcitx5 下 Emacs 无法切换输入法的排查 - 暗无天日 ERT 测试交互命令的三种方式 - 暗无天日 SEM Assistant: 当 Elisp 守护进程遇上 LLM 用 dmsg 给 Elisp 加上结构化调试日志 用 org-habit 追踪非每日习惯 - 暗无天日 Clojure X-Men:当编程语言特性变成超能力 - 暗无天日 TIL: 用 diff-hl 在 fringe 中显示 git 变更 读:llm-test —— 用 LLM agent 驱动 Emacs 测试 TIL: AI 时代的橡皮鸭调试 - 暗无天日 fcitx 启动后键盘输入卡顿的排查 - 暗无天日 TIL: 早期网页的图片热区导航 - 暗无天日 读 Seeing the Whole System 用 Emacs 自动生成每周链接推荐 - 暗无天日 读:ASCII control characters in my terminal 读 What to learn - 暗无天日 Lisp 的括号之痛——一个愚人节玩笑揭开的老伤疤 - 暗无天日 一本书该"线性读"还是"并行读" - 暗无天日 读 How to Monetize a Blog:一篇伪装成变现指南的讽刺文 Python Mock 第三方依赖的四种策略 - 暗无天日 Emacs Lisp 热重载实用指南 - 暗无天日 Prot 的 Emacs 配置哲学 - 暗无天日 TIL: 从直播对谈中学到的三个 Emacs 技巧 - 暗无天日 TIL: 自动使用项目虚拟环境的 Python - 暗无天日 TIL: 让 Help buffer 自动获得焦点 一条命令让本地开发用上 HTTPS —— slim 工具介绍 用 fsck 检查和修复 Linux 文件系统 排查Linux进程"卡死"实战:从strace到gdb全流程 - 暗无天日 PostgreSQL 索引:从基础到你可能不知道的高级用法 - 暗无天日 用 .pdbrc 自定义 Python 调试器 ANSI 转义码的标准化现状 - 暗无天日 终端程序的潜规则 - 暗无天日 PARA Org-mode 测试配置 - 暗无天日 AI越强越辣鸡?控制论说这是必然的 - 暗无天日 AI 越强越需要你盯着——反馈循环实操指南 - 暗无天日 你的AI代理正在偷你的密钥——四种你没想到的泄露通道 - 暗无天日 LLM 在 DevOps 中的三种角色 - 暗无天日 写作风格的反建议 - 暗无天日 反驳本质复杂性——Dan Luu 论为什么《没有银弹》错了 - 暗无天日 文件充满了危险——Dan Luu 谈文件系统的可靠性陷阱 - 暗无天日 AI 时代的 PARA 方法:用 Org-mode 和 AI 打造个人知识管理系统 Linux 数据去重学习笔记 - 暗无天日 创建跨平台 ZIP 文件的隐藏陷阱:Extra Field - 暗无天日 X11 Forwarding 排障指南 - 暗无天日 IP欺骗端口扫描:当别人冒充你去扫描别人 - 暗无天日 Linux 输入栈全景解析:从硬件按键到屏幕响应 - 暗无天日 Unix 系统中那些被埋没的配置开关——以 FontConfig 为例 - 暗无天日 在Linux上限制儿童使用电脑 - 暗无天日 GIF不仅仅是一种图片格式——用GIF流做些奇怪的事 - 暗无天日 Leiningen 学习笔记:Clojure 项目构建与管理从入门到实战配置 - 暗无天日 Google SRE Book 读书笔记 - 暗无天日 yes 管道 head 发生了什么 - 暗无天日 为什么 nohup 在 crontab 中不起作用 Bash中的Indirection与Nameref - 暗无天日 Linux PAM 简介 - 暗无天日 从Linux ISO文件启动计算机 - 暗无天日 用 Bash 打造一个Screen Locker 用GitHub Actions自动构建EGO博客 - 暗无天日 blocking I/O 的作用 - 暗无天日 mobileog 手机端同步提示Error:2 No such file 的解决方法 回收 WSL2 VHDX 文件占用空间 使用 org-mode columnview 生成任务列表 - 暗无天日 Emacs 作为 MPD 客户端 - 暗无天日 移动文件路径却不破坏org file link的方法 - 暗无天日 如何合理的导出help link 成HTML - 暗无天日 笑话理解之Biology - 暗无天日
读:Clojure 搭车客指南 - 暗无天日
2026-04-27 · via 暗无天日

Amy 和 Frank 冲下楼,发现门锁了。窗外,昨天的 Amy 正拿着笔记本电脑朝大门走来。

Frank 翻开《Clojure 搭车客指南》的"锁门及其他小麻烦"一章。指南推荐用 fnil 来解决锁门问题。 fnil 接受一个已有函数,返回一个新函数——当参数为 nil 时,用你指定的默认值代替:

(defn locked-door [key]
  (if key "open" "nope - staying shut"))

(locked-door :key)  ;; => "open"
(locked-door nil)   ;; => "nope - staying shut"

(def this-door (fnil locked-door :another-key-that-works))
(this-door :key)    ;; => "open"
(this-door nil)     ;; => "open"

门开了。两人开车来到动物园的水族馆。

水獭,Frank 解释说,是"前线时间守卫"。看过那些水獭用石头砸贝壳的自然视频吗?其实它们在求值 Clojure 表达式--以维持人类文明的正常运行。它们大多数时候喜欢远程工作(仰面漂浮在水面上,效率最高),有时会建造动物园或水族馆来近距离监控特定区域。

Frank 拿出四颗迷你棉花糖。给了 Amy 两颗,自己一颗塞进耳朵,一颗塞进嘴里,开始和水獭对话。

指南说,迷你棉花糖是创建便携式 Clojure core.async 通道的最佳材料——它不会在手里融化。

core.async 是 Clojure 的并发编程模型,灵感来自 Go 语言的 goroutine 和 channel。通道(channel)是 core.async 的核心概念——你可以把它想象成一根管子,一端放东西,另一端取东西。

core.async 有两套操作符:
- 两个叹号的 ~>!!~ / ~<!!~ 是阻塞操作: ~>!!~ 往通道放消息(put), ~<!!~ 从通道取消息(take)。两个叹号表示"我会一直等到操作完成",在此期间当前线程被卡住
- 一个叹号的 ~>!~ / ~<!~ 是非阻塞操作:功能一样,但只能在 ~go~ 块内使用。一个叹号表示"我不会阻塞线程", ~go~ 块会在等待时自动挂起当前逻辑、释放线程给别的任务用

chan 创建一个通道:

(def talk-to-otters-chan (chan))

默认情况下通道是无缓冲的(unbuffered),也就是棉花糖的原始大小。无缓冲通道要求发送方和接收方同时在场才能通信——就像面对面说话,你说一句,对方得听着,不然你就卡在那。

用阻塞操作 >!! 往通道放消息,会阻塞当前线程:

(>!! talk-to-otters-chan "Hello otters.")  ;; 线程会卡住,直到有接收方

所以一个办法是用 future 在另一个线程里发送:

(future (>!! talk-to-otters-chan "Hello otters."))
(<!! talk-to-otters-chan)  ;; => "Hello otters."

也可以用带缓冲的通道(相当于把棉花糖撑大一点):

(def talk-to-otters-chan (chan 10))  ;; 缓冲区大小为 10

(>!! talk-to-otters-chan "Hello otters.")
;; => nil(不阻塞,消息放进缓冲区了)

(>!! talk-to-otters-chan "Do you know anything about the world ending?")
;; => nil

(<!! talk-to-otters-chan)
;; => "Hello otters."

(<!! talk-to-otters-chan)
;; => "Do you know anything about the world ending?"

但最好的方式是用 go 块实现异步通信——不阻塞任何线程。在 go 块里用非阻塞操作 >! (一个叹号)和 <! (一个叹号):

(def talk-to-otters-chan (chan))

(go (while true
      (println (<! talk-to-otters-chan))))

(>!! talk-to-otters-chan "Hello otters")
(>!! talk-to-otters-chan "Do you know anything about the world ending?")
(>!! talk-to-otters-chan "Also, you are really fuzzy and cute.")

;; REPL 中的输出:
;; Hello otters
;; Do you know anything about the world ending?
;; Also, you are really fuzzy and cute.

更进一步的例子——双向对话。创建两个通道,一个负责说,一个负责听。~go~ 块之间通过通道自动转发消息:

(def talk-chan (chan))
(def listen-chan (chan))

(go (while true
      (println (<! listen-chan))))

(go (while true
      (>! listen-chan
          (str "You said: " (<! talk-chan) " Do you have any Abalone?"))))

(>!! talk-chan "Hello otters")
(>!! talk-chan "Do you know anything about the world ending?")
(>!! talk-chan "Also, you are really fuzzy and cute.")

;; REPL 中的输出:
;; You said: Hello otters Do you have any Abalone?
;; You said: Do you know anything about the world ending? Do you have any Abalone?
;; You said: Also, you are really fuzzy and cute. Do you have any Abalone?

水獭每次都问"你有鲍鱼吗?"——鲍鱼壳是水獭用来砸东西的工具,也是它们的薪水。

Amy 把一颗棉花糖塞进耳朵,立刻听到了 Frank 和水獭的对话。她伸手要把另一颗塞进嘴里问一个重要问题——但不小心碰到了求值器上那个大红 Source 按钮。她和 Frank 被一个漩涡卷起来,吸入地下。

故事戛然而止。Carin Meier 没有写第四篇。