我的 Vibe Coding 最佳实践——ADR文档
工作和业余也用AI写代码,大大小小项目都经历了。从 rules, skills, spec, agent 到 harness 都玩过了 从AI嘴里发现一条比较稳的套路——ADR文档 rule, skills, spec 这些东西最大的问题就是瞎jb指挥。ADR 的好处是记录why,以及决策演变历史。 贴一段我整理的 ADR 文档就明白了: --- title: 如何使用 ADR id: ADR-001 date: 2026-06-26 09:01:21 status: accepted --- ADR ADR(Architecture Decision Record,架构决策记录)的核心目标很简单:记录为什么做出了某个重要技术决策,而不是记录系统长什么样。 目前比较常见的是 MADR、Nygard ..
更多MacOS 快速插入当前时间
第一步:创建快捷指令 打开 Shortcuts。 点击右上角 + 新建快捷指令。 添加动作 1:日期 搜 添加 日期(Current Date) 动作,默认为当前时间 添加动作 2:格式化日期 添加 格式化日期,日期格式 自定义,填 yyyy-MM-dd HH:mm:ss 添加动作 3:Applescript on run {input, parameters} -- 稍微延长一点延迟,确保触发快捷键的手指已经离开键盘 delay 0.1 -- display dialog "Current date" -- 将 Shortcuts 传入的 list 转换为字符串 set ts to item 1 of input as string tell application "Sys..
更多基于 git 的零拷贝静态web服务器
无聊,产生了个crazy的想法。 git 内部用 zlib 压缩文件内容 Content-Encoding: gzip 也是 如果web服务器输出 .git 里的 静态 内容,是不是可以减一个二次解压/压缩步骤??? blob sha1 直接当etag? 跟AI较量了几轮,一开始它说做不到。因为 blob 的格式比较变态。因为 hello world... 在 .git/objects/ab/cdef... 里的东西是这么存的 zlib(blob 1234\0hello world...) I was like ???日他妈真变态啊。这前面是写死了 blob <size>\0 然后把文件内容放在一起,再压缩的。 .git 这设计脑子有病啊。。。为啥不是原始文件gz而是加个头去gz。。。 此路不..
更多浏览器通过WebGPU上做AI推理
先说结论,在2026Q2这个时间点,通过浏览器webgpu 做 AI 不值得。 本来看官方demo跑得好好的,自己搓下来也觉得没啥,就一个小问题,fp32的模型有点大,最好换 q8 的。 q8的不能在 webgpu上跑,wasm也凑合用。原因是缺少一些矩阵乘法算子。开源库嘛,也理解。只是速度就慢了一点。 本来前几个月就这样平安无事,结果 transformers.js 升级到 v4,支持 q8 跑webgpu了,甚至 q4 q2 bitnet 这种高级货都支持了。满心欢喜的切过去,结果 webgpu 跟 wasm 一样慢? 于是就不甘心了。一路折腾,发现这个不仅跟算子有关,还跟硬件有关。甚至老掉牙的硬件不支持 shader-f16 。简单的说其实 GPU 原生支持最好的就 IEEE 754 fp32,f1..
更多Bonsai 在 M2 安装
有个 1bit 模型最近很火 https://github.com/PrismML-Eng/Bonsai-demo 我本地环境不知道咋回事,搞混了 x86_64 和 arm64 。还有官方默认 python 3.11 我也不太满意,强行升级一波。 diff --git setup.sh setup.sh index 543fab0..80c1190 100755 --- setup.sh +++ setup.sh @@ -13,7 +13,8 @@ cd "$SCRIPT_DIR" VENV_DIR="$SCRIPT_DIR/.venv" VENV_PY="$VENV_DIR/bin/python" -PYTHON_VERSION="3.11" +# PYTHON_VERSION="3.11" +P..
更多首页和404更新
觉得每年都得折腾一下。 做了个 404 页面 https://est.im/404 老登们一眼就能get到点。00后可能没见过。 哈哈哈,等有空了去做个多语言版本的 😎 可能没折腾过的不知道这玩意是在 shdoclc.dll 里,通过 Reource Hacker 可以提取出来 本来想去 win10 瞻仰一下遗迹,发现 iexplore.exe 直接强行启动 Edge了。搜到个法子可以绕过,新建个 1.vbs Set ie = CreateObject("InternetExplorer.Application") ie.Navigate "about:blank" ie.Visible = 1 然后地址栏输入 res://shdoclc.dll/http_404.htm 。嘿,您猜怎么着,Win10..
更多tmux enables AIs to operate servers safely
We’ve all seen plenty of horror stories about AI trashing servers. Yet, there are still tedious tasks we’d love for AI to handle. To keep things safe, you have to manually copy-paste back and forth commands and outputs. Yet the current mainstream solutions usually involve "adding another layer": relay IO, intercepting dangerous commands or even using a sm..
更多chat.est.im launches at 3.14
Long over due. But finally, it's here. Last year I saw an interesting thread on V2EX that utilize curl -N to display cool ANSI art, and I wondered how to make it "interactive". After a series of battle with AI coding agents, it's finally done. The project is located at https://chat.est.im/. You can try it with curl -NT. https://chat.est.im/hello. I wrote ..
更多安全的Python3沙箱——eval
很早之前从 reddit 看到过有人吹 eval(expr.replace('__', ''), {'__builtins__': None}, {}) 这个写法其实很安全,当年没人能攻破沙箱。我这个水平肯定是不肯能了,现在有AI了,让 opus-4.6-thinking 试了下 The classic escape chain needs object.__subclasses__() → find a class with __init__.__globals__['os'] → os.system(). Every step past info disclosure is blocked: Vector Why it fails str.format() calling methods..
更多isomorphic-git 实现 sparse checkout & commit
去年9月手搓了套blog评论系统 - req4cmt,可能是全世界很少见通过 git repo 文件本身存储评论内容,而不是 github issue。 git repo 文件 append 内容涉及到一个性能问题:repo作为整体,也就是历史所有全体评论,被 fetch, commit , push 的成本太高。如果只能修改其中的一个文件就好了。这就是 sparse checkout。git底层早就支持了,git 命令在2020年之后2.25.0+支持,但是 Cloudflare Worker 没法执行命令,也没文件系统,于是召唤AI跟我一起折腾。 大概用的这个 prompt: 核心目的是避免 clone 整个repo!! 注意在 cloudflare worker 上跑。和nodejs有点差别。 ..
更多