关于 Screeps: World 链接索引

介绍 这游戏应该叫:Screeps: World,后面出了一个 MMO sandbox game for programmers 是一个使用真实的编程语言,来控制单位和殖民地的一个游戏 这个游戏主要靠时间和程序的效率来取胜。 官网文档 官网:https://screeps.com/ 英文文档:https://docs.screeps.com/ Steam 商店页面:https://store.steampowered.com/app/464350/Screeps_World/ 社区资源 Screeps World 的玩家数量:https://steamcharts.com/app/464350 Screeps Arena 的玩家数量: Screeps: Arena - Steam Charts 中文文档:https://screeps-cn.github.io/ 中文 API 索引:https://screeps-cn.github.io/api/ 研究 Screeps 技术的作者:https://www.jianshu.com/u/02d597cfe36b 非常好的 Screeps 教程中文目录:https://www.jianshu.com/p/5431cb7f42d3 Steam 用户的入门教程: https://steamcommunity.com/id/aopika/recommended/464350/ 极简的新手教程,能够帮助理解游戏机制:https://github.com/Tim-Pohlmann/Screeps-Nooby-Guide 代码资源 脚手架工程,包含了用于编写 Screeps 代码的一切: https://github.com/screepers/screeps-typescript-starter Screeps Plus 包含 Creep 计算器、房屋计算器: https://screepspl.us/services/creep-calculator/ 建议 建议自己玩,不要加入任何群组,有问题查文档,问 AI。 ...

五月 18, 2025 · 2 分钟 · 606 字 · Jiale Liu

使用 gptel 帮助生成博客的 url

背景: 经常需要写博客,又期望定制一个符合博文主题的 url,以前是自己去 Google translate 翻译然后改成 slug 格式(全小写,连字符连接)。 像这篇文章的格式: using-gptel-to-generate-blog-urls 现在有 llm 之后,会开一个 deepseek 的网页或者 ChatGPT 的网页,设置基础 prompt,然后就将中文的文章名称发给它,让他给出对应的英文 最近我想到也许可以将这个步骤通过一个 elisp 函数来实现,最终基于 gptel 加上一些简单的 elisp 代码实现了整个流程。 完整代码: (defun my/gptel-gen-hugo-properties () "Generate Hugo export properties for current Org heading." (interactive) (unless (org-at-heading-p) (user-error "必须在 Org 模式标题位置使用")) (gptel-request (format "将中文标题转换为英文 slug(全小写,连字符连接): 需要翻译的原文:「%s」" (string-trim (org-get-heading t t t t))) :system "只返回转换后的字符串" :callback (lambda (response info) (when-let* ((raw response) (slug (replace-regexp-in-string "\\([^a-z0-9]\\|-\\)+" "-" (downcase raw) nil t))) (org-set-property "EXPORT_HUGO_BUNDLE" slug) (org-set-property "EXPORT_FILE_NAME" "index.zh") (message "生成成功:%s" slug))))) 使用方法: ...

五月 6, 2025 · 2 分钟 · 521 字 · Jiale Liu

一种不使用微信 sdk 实现 App 分享小程序卡片的替代方案

背景: 目前 iOS 和 Android app 想要直接分享微信小程序卡片给其他微信用户时,都需要通过调用微信开放 sdk。 这个过程中需要做平台认证、绑定包名等步骤。 但是有一种情况软件还在开发过程中,或者根本没有来得及申请微信开放平台,但是仍然想要实现分享小程序卡片。本文就提供一种可行的方案。 核心原理: 拼装分享中转页面转页面 scheme,用于 从微信 App 外分享中转页面中的分享中转页面。开放能力 / 获取小程序链接 / 获取 URL Scheme 上述明文 scheme 中应该带有想要分享的小程序卡片的参数:title、path、imageUrl,框架接口 / 页面 / Page 编写小程序的分享中转页面,解析 query 参数 title、path、imageUrl ,并作为 pages 对象中 onShareAppMessage 的返回值,实现打开中转页面后右上角分享卡片功能 注意事项: ...

五月 6, 2025 · 2 分钟 · 577 字 · Jiale Liu

Emacs 上的 AI 相关的 package

基础工具 gptel - https://github.com/karthink/gptel mcp.el - https://github.com/lizqwerscott/mcp.el AI 对话/repl elisa - https://github.com/s-kostyaev/elisa chatgpt-shell - https://github.com/xenodium/chatgpt-shell 代码补全 minuet-ai - https://github.com/milanglacier/minuet-ai.el copilot.el - https://github.com/copilot-emacs/copilot.el AI 辅助编程 aider.el - https://github.com/tninja/aider.el aidermacs - https://github.com/MatthewZMD/aidermacs copilot-chat.el - https://github.com/chep/copilot-chat.el

四月 21, 2025 · 1 分钟 · 48 字 · Jiale Liu

微信开发者工具 Cannot read property 'getCurrentPagesByDomain'

问题 最近在做小程序自动化测试,核心原理是利用小程序自动化库: miniprogram-automator 文档如下: 小程序自动化 / API / Automator 但是最近突然出现问题,执行自动化测试脚本时报错: Cannot read property 'getCurrentPagesByDomain' of undefined at Transport.Connection.onMessage (node_modules/miniprogram-automator/out/Connection.js:1:1087) at WebSocket.<anonymous> (node_modules/miniprogram-automator/out/Transport.js:1:322) at WebSocket.onMessage (node_modules/ws/lib/event-target.js:120:16) at Receiver.receiverOnMessage (node_modules/ws/lib/websocket.js:789:20) at Receiver.dataMessage (node_modules/ws/lib/receiver.js:422:14) at Receiver.getData (node_modules/ws/lib/receiver.js:352:17) at Receiver.startLoop (node_modules/ws/lib/receiver.js:138:22) at Receiver._write (node_modules/ws/lib/receiver.js:74:10) at Socket.socketOnData (node_modules/ws/lib/websocket.js:864:35) 困难 翻遍全网没有结果: 找到的连接全部无法打开 就算找到几个还能打开的,也是久久没有人回复。 解决 整整一个下午,尝试了各种方法都没有结果,我甚至让 Gemni 2.5 pro 帮忙逆向了 miniprogram-automator 的代码。 发现核心逻辑其实在微信开发者工具里面,这个库其实只是基于 RPC 通讯将这些功能封装成 Node.js 版本 API 而已。 ...

四月 16, 2025 · 1 分钟 · 433 字 · Jiale Liu

2025 年 3 月稳定可用高并发的 DeepSeek-R1 模型

前言 LLM 发展到现在,领先的大模型在能力上已经得到了认可,问题就是如何找到稳定可靠,并且便宜的 API 服务商。 现在将市面上常见的提供完整版(非蒸馏)DeepSeek API 的提供上列出来,作为备忘。 DeepSeek 官方 官网:https://www.deepseek.com/ 开放平台:https://platform.deepseek.com/ 文档:https://api-docs.deepseek.com/zh-cn/ 邀请计划:无 价格(RMB): (北京时间 08:30-00:30)按照标准价格计费 模型价格 deepseek-chat deepseek-reasoner 百万 tokens 输入(缓存命中)(4) 0.5 元 1 元 百万 tokens 输入(缓存未命中) 2 元 4 元 百万 tokens 输出 (5) 8 元 16 元 (北京时间 00:30-08:30) 按照优惠价格计费 ...

三月 22, 2025 · 7 分钟 · 3021 字 · Jiale Liu

使用 GitHub Actions 发布第一个 MCP

前言 我最近编写了一个 MCP 服务器:nailuoGG/anki-mcp-server。 但是有一个问题,用户安装时需要在本地进行构建,流程比较复杂,能否更简单一点呢? 我想到了将其发布到 npm 上,然后使用 `npx anki-mcp-server` 命令来使用。 进一步想,作为一个开源项目,为什么不使用 GitHub Actions 来进行自动化发布呢?而且至少有以下几个好处: 安全性,防止开发者本地电脑被侵入导致意外发包的情况,而且能保持让打包构建过程公开透明 便利性,便于多人协作,这样发布时就不依赖单个开发者,也能够保持发布的一致性 准备 在 Npm 上创建账户,并创建并获取 Access Tokens,记为 NPM_TOKEN。https://www.npmjs.com/ 在 GitHub 上创建工程仓库 https://github.com/ 在 GitHub 仓库设置页面添加 secrets 这里详细记录一下如何添加 secrets: ...

三月 21, 2025 · 3 分钟 · 1018 字 · Jiale Liu

知识索引:使用 Ollama 本地 LLM 模型角色扮演

前言 关于拿 LLM 做角色扮演这件事情,自从 OpenAI 发布 ChatGPT 时就已经发展起来,在近几年的硬件升级和模型升级下,已经形成了一个较为完善的生态。 相关的资料散落在各个站点,普通人想要了解,需要花费很大的功夫。 正好最近在逛 Reddit,收集到一些知识索引,本文就尝试做“索引的索引” 客户端 唯一推荐的客户端: SillyTavern , 仓库链接 安装方法: git clone https://github.com/SillyTavern/SillyTavern -b release cd SillyTavern && npm i && npm run start 本地模型 本地模型通常在性能上比不上云端模型,但是如果考虑到隐私性和费用,并且你也有一些合适的硬件,本地模型也不失为一种选择。 ...

三月 9, 2025 · 2 分钟 · 512 字 · Jiale Liu

从潜水到高玩:优化你的 Hacker News 使用习惯

基础 Hacker News(简称 HN)是一个由 Y Combinator 创建并运营的社交新闻网站,主要面向科技爱好者、程序员、创业者和对技术、创新感兴趣的人群。它于 2007 年由 Paul Graham 推出,旨在提供一个分享和讨论高质量内容的平台。 我想这是大多数情况下的使用方式是直接访问 https://news.ycombinator.com 点开即可看到最新的热门文章。主要板块: Front Page(首页):展示当前最热门的内容。 New:最新提交的帖子,按时间排序。 Past:历史帖子归档。 Comments:单独查看近期评论。 Ask HN:用户提问的专区,类似技术或职业建议的论坛。 ...

三月 9, 2025 · 3 分钟 · 1137 字 · Jiale Liu

告别重复输出!QwQ-32B 故障排查与修复实战指南

问题 QwQ-32B 是一个性能比肩 DeepSeek-R1 的推理模型, 但是很多人发现模型会出现无限生成、不停重复输出的情况。 等了两天后发现已经有解决方案了:Tutorial: How to Run QwQ-32B effectively | Unsloth Documentation 本文是自己的体验记录 推荐参数设置 Temperature = 0.6 TopP = 0.95 TopK = 20 ~ 40 Min_P of 0.02 Repetition Penalty of 1.0 使用对话模板 <|im_start|>user\nCreate a Flappy Bird game in Python.<|im_end|>\n<|im_start|>assistant\n<think>\n Ollama 我只有在 MacBook Pro 上才能跑起来这个模型,因此只记录了 Ollama 的使用。 llama.cpp的用法 ollama 支持将模型设置打包到 params 文件里,所以 MacBook 用户直接执行以下命令就行了 ollama run hf.co/unsloth/QwQ-32B-GGUF:Q4_K_M 或者用其他的量化版本 unsloth/QwQ-32B-GGUF at main ollama run hf.co/unsloth/QwQ-32B-GGUF:Q5_K_M 效果和总结 我尝试了 unslosh 的 Flappy Bird 游戏的例子: Create a Flappy Bird game in Python. You must include these things: - You must use pygame. - The background color should be randomly chosen and is a light shade. Start with a light blue color. - Pressing SPACE multiple times will accelerate the bird. - The bird's shape should be randomly chosen as a square, circle or triangle. The color should be randomly chosen as a dark color. - Place on the bottom some land colored as dark brown or yellow chosen randomly. - Make a score shown on the top right side. Increment if you pass pipes and don't hit them. - Make randomly spaced pipes with enough space. Color them randomly as dark green or light brown or a dark gray shade. - When you lose, show the best score. Make the text inside the screen. Pressing q or Esc will quit the game. Restarting is pressing SPACE again. - The final game should be inside a markdown section in Python. Check your code for errors and fix them before the final markdown section. 对话客户端用的是 chatbox,输出结果由于太长就不放出来了。可以直接看 unslosh 的分享 ...

三月 8, 2025 · 2 分钟 · 520 字 · Jiale Liu