a132811

a132811

V2EX member #55470, joined on 2014-02-08 11:15:21 +08:00
利用泛型实现的 golang 缓存装饰器
Go 编程语言  •  a132811  •  Dec 13, 2023  •  Lastly replied by a132811
6
golang 泛型能否支持可变参数
Go 编程语言  •  a132811  •  Jul 31, 2023  •  Lastly replied by Anubisks
4
ts 有办法隐式修改 class constructor 的类型吗?
TypeScript  •  a132811  •  Jun 19, 2023  •  Lastly replied by chnwillliu
2
Vue3 下有什么 umijs 的替代品推荐吗?
Vue.js  •  a132811  •  Aug 1, 2022  •  Lastly replied by a132811
13
感觉 uber/fx 并不比 getInstance 工厂好用
Go 编程语言  •  a132811  •  Aug 9, 2022  •  Lastly replied by a132811
20
a132811's recent replies
@zcf0508 我以前的做法,本地开发时直接用一键命令行的正向代理:证书、域名都本地生成、不侵入服务端  https://github.com/ahuigo/selfhttps
我试一下
像 deepwiki ,不过缺乏最重要的 AI 问答
提个复现 issue 吧。
我之前遇到另外的问题: https://github.com/microsoft/vscode/issues?q=is%3Aissue%20editor.editContext
Oct 24, 2025
Replied to a topic by fingerxie 程序员 智谱、claudecode、codex、qwen,gemini cli 对比
claude code 不太稳定,bug 有点多。
最近换成了 qwen-code + 公司内 LiteLLM hub 提供的各种模型,主要还是用的 Claude
脚本执行器,运行完就释放,不需要实现 gc 。

这在 isolate worker/playground 场景下执行 js/python/golang 都很有用,包括执行流程编排的其它语言的表达式。

完成度比较高的 js interpreter 是 https://github.com/boa-dev/boa
Apr 10, 2025
Replied to a topic by wheelg 奇思妙想 想要一个这样的 Magic 浏览器
1. chrome 启动时加--disable-web-security 可突破跨域限制:
mac 下可以启动隔离的 chrome:
open -na "Google Chrome" --args --disable-web-security --user-data-dir="/tmp/chrome_dev_session"

https://stackoverflow.com/questions/3102819/disable-same-origin-policy-in-chrome

2. 禁用 cors 限制的话,会遇到许多问题
- 用户信息有潜在的安全风险
- 网站服务商会受很大的影响:应对来自 c 端的 ai 爬虫就已经很头大了,放开限制的话,随便一个 web 网站都可能主动利用 js 或被注入 xss 对别的网站发起各种分布式攻击(客户端也有这个风险,但是门槛更高一点)


安全、方便、功能、开发体验之间存在许多矛盾的: pwa 相比客户端应用,牺牲了一些功能,得到了安全。

真要给 pwa 搞一个专门的浏览器的话,可能要禁止 cors 带 cookie ,禁止 xss 执行等,完全模仿客户端的行为.... 这可能会影响现有一些网站的执行。
支持
About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   6041 Online   Highest 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 37ms · UTC 03:15 · PVG 11:15 · LAX 20:15 · JFK 23:15
♥ Do have faith in what you're doing.