冒出一个idea,理论上现在的科技完全可以做到:「象棋AR眼镜」
带上这种眼镜以后,只要视野内出现类似棋盘的图像,就会激活特定的图像识别系统,将盘面转化为标准棋谱格式,然后调用类似皮卡鱼这种象棋引擎,算出红黑方各自的最佳招之后(因为图片无法确定接下来是谁走棋),再绘制到眼镜中棋盘所在的视野中。
感觉要是实现出来的话,至少能做成产品大卖的,不比什么苹果vr酷炫多了😅
https://blog.glyphdrawing.club/font-with-built-in-syntax-highlighting/
https://platform.deepseek.com/api-docs/zh-cn/function_calling/
pipe.js:
pipe.js
process.stdout.write(require('fs').readFileSync(0, 'utf-8')) // or process.stdin.pipe(process.stdout)
script -q /dev/null node -p "Boolean(0)" | node pipe.js # will print yellow false
https://stablediffusion3.net/zh-CN
啥叫递归啊
url to text(for llm
我才知道娜塔丽波特曼是犹太人……还有她今年离婚了。。😅
=== update ===
才注意到原来费曼也是犹太人😭
let a = await (Promise.reject('msg')).catch(e => e) a === 'msg' // true
(但如果把await放到括号里面就catch不住了🙅♀️
node从v18起就支持把JS代码打包成二进制了:https://nodejs.org/api/single-executable-applications.html
(我记得好像记录过这个,但是找不到了...😅😅
成功用workerd把gdshare在vps上跑起来了
docker pull dcard/workerd docker run -d -p 8081:8081 -v .:/app dcard/workerd serve /app/workerd.capnp
第二条命令执行的时候要确保当前目录有两个文件,一个是workerd.capnp:
workerd.capnp
using Workerd = import "/workerd/workerd.capnp"; const helloWorldExample :Workerd.Config = ( services = [ (name = "main", worker = .helloWorld) ], sockets = [ ( name = "http", address = "*:8081", http = (), service = "main" ) ] ); const helloWorld :Workerd.Worker = ( serviceWorkerScript = embed "worker.js", compatibilityDate = "2023-02-28", );
另一个是worker.js
worker.js
addEventListener('fetch', event => { event.respondWith(handle(event.request)); }); async function handle(request) { return new Response("Hello World\n"); }
(实际上我是用了gdshare
其实不一定要用docker,我本地迷你主机就成功用官方发布的二进制的workerd跑起来了,但是我的vps ubuntu版本比较老,直接跑二进制会报错……
workerd
具体命令则是 ./workerd serve workerd.capnp
./workerd serve workerd.capnp
老版本的node(比如8)在请求用let's encrypt的https证书加密的网站时会报错certificate has expired
certificate has expired
有几种解决办法,最正确的是升级node版本,我试了下14就不报错了。。 最省事的是在env里加一句NODE_TLS_REJECT_UNAUTHORIZED=0
NODE_TLS_REJECT_UNAUTHORIZED=0
更灵活点可以在具体的请求里忽略tls报错:
const https = require("https"); const agent = new https.Agent({ rejectUnauthorized: false, });
最硬核的就是改node源码自己编译了。。
HTTP 418 I'm a teapot