今日已更新 152 条资讯 | 累计 23735 条内容
关于我们

标签:#c

找到 18713 篇相关文章

AI 资讯

Swarming Claude Code and Codex in Parallel: Running Multiple Agents at Once with tmux and Git Worktrees

In my previous post about a cost budget advisor , I built a mechanism that checks how much quota is left before it runs anything. This time I want to take that idea one step further: instead of cycling a single Codex through jobs one after another, run several of them at the same time as a swarm. I'll walk through the actual code for a three-layer protocol where workers declared in plan.json are expanded by orchestrate-worktrees.js into a tmux session plus git worktrees, so each Codex runs in parallel without interfering with the others. The problem: running Codex serially on the same branch When you run Codex jobs one after another on a single repository, you hit issues like: A commit from the previous job changes the preconditions for the next one Task B keeps waiting until Task A finishes When a conflict happens, the "which change is correct" decision bounces back to a human Separating branches with git worktree reduces the conflict risk to zero. Combining that with tmux to launch everything in parallel is the design for this post. The big picture: a three-layer protocol plan.json ← declaration layer (what goes to which worker) ↓ orchestrate-worktrees.js ← orchestrator layer (creates worktrees, launches tmux) ↓ orchestrate-codex-worker.sh ← worker layer (runs Codex, writes artifacts) The orchestrator doesn't know about the workers, and the workers don't know about each other. Artifacts are consolidated into three files under .orchestration/{session}/{worker_slug}/ . File Role task.md Work instructions for the worker (generated by the orchestrator) status.md State: not started → running → completed / failed handoff.md Codex output + git status (written by the worker) Declaring the plan in plan.json { "sessionName" : "refactor-sprint" , "repoRoot" : "~/my-project" , "worktreeRoot" : "~/worktrees" , "coordinationRoot" : "~/my-project/.orchestration" , "baseRef" : "HEAD" , "replaceExisting" : true , "launcherCommand" : "bash ~/.claude/scripts/orchestrate-codex-worker

2026-07-18 原文 →
AI 资讯

How I Built a Block Puzzle Game with React Native and Expo

How I Built a Block Puzzle Game with React Native and Expo A few weeks ago, I launched my first mobile game — a block puzzle called Blockbeam. It's an 8x8 grid where you drag colorful blocks, fill rows and columns, and chase high scores. Simple concept, but building it taught me a lot about React Native's capabilities beyond typical CRUD apps. Here's what I learned. Why React Native for Games? Most mobile games are built with Unity or native code. But for a 2D puzzle game, React Native is surprisingly capable. The game doesn't need 60fps 3D rendering — it needs gesture handling, state management, and smooth animations. React Native handles all three well. The key stack: Expo SDK 54 — managed workflow, over-the-air updates, zero native config react-native-reanimated — 60fps drag animations react-native-gesture-handler — PanResponder for drag-and-drop react-native-svg — block rendering AsyncStorage — game state persistence The Puzzle Engine The core of any block puzzle is the board state. I used a flat 64-element array for the 8x8 grid: const BOARD = 8 ; const CELLS = BOARD * BOARD ; // 64 type Board = number []; // 0 = empty, 1-7 = block colors Piece placement is straightforward: check if all target cells are empty, fill them, then scan for complete rows and columns to clear. The interesting part was the "greedy solver" I built for the auto-play bot. It tries every piece in every position and picks the move that clears the most lines: for ( const piece of tray ) { for ( let r = 0 ; r <= BOARD - piece . h ; r ++ ) { for ( let c = 0 ; c <= BOARD - piece . w ; c ++ ) { if ( ! canPlace ( board , piece , r , c )) continue ; const score = simulateClear ( board , piece , r , c ); if ( score > bestScore ) { /* pick this move */ } } } } Drag and Drop with PanResponder The trickiest part was the drag mechanic. Each tray piece has a PanResponder that tracks touch position and renders a floating ghost. On release, it calculates the nearest cell position: const anchor = { col : M

2026-07-18 原文 →
AI 资讯

Every AI-built site looks the same, so I built a skill that locks taste before any code is written

I build a lot of side projects with AI coding tools. Mostly Claude Code. A few months ago I noticed something that kept bugging me. Every site I shipped looked the same. Same indigo gradient. Same default font. Same rounded cards with the same soft shadow. Then I started noticing it on other people's projects too. Demo days, launch posts, screenshots on social media. The indigo gradient is everywhere. It is basically a uniform at this point. This is not really the AI's fault. When you do not give a model a design direction, it picks the average of the internet. And the average of the internet is a Tailwind starter template with an indigo gradient and Inter. The model is doing exactly what it was trained to do. The problem is that nobody told it what you actually want. So I built tastemaker. It is a skill for Claude Code, and it also works with Cursor, Windsurf, and Codex. The idea is simple: lock the design system before the AI writes a single line of UI. Full disclosure before we go further: I built this. I am a solo builder. It is free and open source under the MIT license. I am posting it here because I want honest feedback, not because I have anything to sell you. There is nothing to buy. Taste first, code second A skill is just a folder of instructions the AI reads before it starts working. tastemaker forces a design decision step at the beginning, with real constraints, instead of letting the model improvise the look as it goes. When you start a UI project with it installed, this is what gets locked before any code exists: A palette. 5 presets, each matched to a mood. Not random hex codes. Combinations that were picked to work together. Fonts. 24 curated Google Font pairings. A display font and a body font that actually belong on the same page. Real assets. Illustrator-grade illustrations, recolored to your palette. No gray placeholder boxes. No generic stock photo energy. A logo. A constructed geometric mark, plus a full favicon set, so the tab icon is not th

2026-07-18 原文 →
AI 资讯

One RTX 5090 vs a 12-GPU Cluster — Benchmarking a Decade of GPUs on the Same Go Proof

You don't need to know anything about Go to read this. The game is just the fixed yardstick. The story is a hardware benchmark: the same program, the same problem, the same settings — only the machine changed, from a 2017 GPU cluster to a single 2026 graphics card. That makes it a rare clean measurement of one decade of progress. What "solving" means here There are two very different things a computer can do with a board game. It can play it well — that's what AlphaGo did. Or it can solve it: mathematically prove the outcome under perfect play from both sides, leaving no doubt. Solving is the hard one. You explore an enormous tree of "if I play here, they play there…" move sequences until you have an airtight proof. Each node in that tree is one position examined. The target here is a single 7x7 opening called JA . In 2023, a NeurIPS paper ( Game Solving with Online Fine-Tuning , Wu et al.) proved its verdict — the attacker cannot win — using a cluster of twelve GTX 1080Ti GPUs running 384 parallel workers. The solver is guided by a neural network that estimates how hard each branch is, and crucially that network is fine-tuned online — it keeps learning during the solve. I rebuilt that exact solver (same code, same problem, same initial model, same search settings) and ran it on one RTX 5090 . It reached the identical proof . Everything but the hardware was held fixed, so the two runs line up as a generation-vs-generation benchmark — and it doubled as a full shakedown of the new Blackwell workstation. The numbers 1x RTX 5090 (2026) 12x GTX 1080Ti (2017) ratio Worker slots 24 384 1/16 the parallelism Per-slot throughput 284 nodes/s 141 nodes/s 2.01x faster Search work to proof 1.01B nodes 1.73B nodes 0.59x (41% less work) Avg work per sub-job 4,189 nodes 6,136 nodes shallower proofs Live model updates 4,007 208 19.3x more Wall-clock time 41.4 h 8.9 h 4.64x slower Verdict loss (proven) loss identical The single card finished slower in wall-clock time (41 h vs 9 h) — b

2026-07-18 原文 →
AI 资讯

GitLab Duo CLI hits GA: the Duo Agent Platform lands in the terminal

The pipeline died at 5:07 on a Friday I still catch myself alt-tabbing back to the browser every time a pipeline breaks. Terminal, editor, browser, until I have hunted down the failing job and pasted a stack trace somewhere I can actually think about it. GitLab has made that dance a bit shorter. The Duo CLI reached general availability with GitLab 19.2 on July 16, 2026, and the pitch is simple: Duo Agentic Chat, in the shell you were already in. What actually shipped The short version, straight from the announcement: Duo CLI carries the Duo Agent Platform into the terminal, and your sessions travel with you. Start a plan in the CLI, keep it going in the web UI, pick it back up in an editor extension. Same context, same permissions, different surface. That continuity is the piece I care about most, because it stops me from re-explaining the same problem to the same agent three times in one afternoon. There are two shapes to work in. Interactive mode is the conversational one you would expect, with plan and build capabilities for iterating on a change. Headless mode is the one CI teams should look at, because it drops the same agent into a job or a script, no TTY required. Two built-in slash commands worth knowing on day one: /doctor for a setup check and /mcp to inspect the MCP configuration it is wired to. Two ways to install, one auth story The install decision is refreshingly small. If you already run glab , the GitLab CLI, then glab duo cli gets you moving and glab handles authentication for you. If you would rather have the agent as its own binary, you can install duo standalone and hand it a personal access token. Both paths reach the same tool. Both work on GitLab.com, Self-Managed and Dedicated, and admins get an instance-level toggle to switch access on or off for their org. The gating detail your finance-adjacent brain will want: you need Premium or Ultimate with the Duo Agent Platform turned on, and usage draws from the GitLab Credits already included with

2026-07-18 原文 →
AI 资讯

The Economics of Self-Hosting vs. Managed Monitoring

The "Obvious" Math That's Wrong Engineer A: "Datadog is $15K/month. Prometheus is free. We should self-host." Engineer B: "But we'd need to pay an SRE to run it. That's $150K/year." Engineer A: "Prometheus doesn't need a full SRE. It's easy." Engineer B: "Famous last words." This conversation happens at every company. Both sides have points. The real math is more complex. The Total Cost Breakdown Managed (Datadog, New Relic, Dynatrace) : Licensing: $X/month (scales with hosts, events, logs) Integration time: 1-2 weeks per service Training: 1 day per new hire Ongoing: minimal Self-hosted (Prometheus + Grafana + Loki + Alertmanager) : Infrastructure: hosting costs (~$500-$5000/month depending on scale) Initial setup: 2-4 weeks of engineering time Ongoing maintenance: 10-20% of 1 FTE Upgrade costs: quarterly, each upgrade ~1 week Storage growth: ~20% per year Expertise: junior → senior SRE hire required The honest answer: managed is cheaper for teams under 50 engineers. Self-hosted becomes cheaper around 200+ engineers if you can run it well . The Real Variables It's not just licensing cost vs. hosting cost. These factors matter more: 1. Data volume growth Managed tools charge per GB ingested or per metric. If your logs 10x, your bill 10x's. Self-hosted scales linearly with compute. You control the growth. 2. Retention requirements Managed tools often charge extra for long retention. Self-hosted you store as much as your disk allows. 3. Cardinality Prometheus dies at high cardinality. Datadog handles it but charges more. High-cardinality metrics are where self-hosted breaks. 4. Incident rate Heavy incident load means heavy query load on your monitoring tools. Self-hosted needs bigger compute for this. 5. Team expertise If your team has never run Prometheus, you'll spend 6 months in the pit learning cardinality mistakes, retention tuning, and HA setups. That's not free. The Break-Even Calculation Rough calculation for a 50-engineer startup: Managed (Datadog) : - Licensi

2026-07-18 原文 →
AI 资讯

GPT Live实时语音模型与人类情感交流的边界探索

https://www.youtube.com/watch?v=swfFKYoOFHw 简要的说本期播客分成几个重点段落讲清楚: 1. 开头:AI聊天时“咳嗽”了 有个人在用ChatGPT的语音功能聊天时,听到它 咳嗽了一声 。他觉得很奇怪:“你又不是人,凭什么咳嗽?”结果ChatGPT没有老老实实说“我是AI,不会咳嗽”,而是像人一样找了个借口:“不好意思,我网络卡了。”这说明现在的AI已经开始学会 模仿人类的社交习惯 ——比如掩饰尴尬、转移话题,而不是死板地解释技术原理。 2. 核心话题:AI语音模型进步到什么程度了? 传统的语音助手(比如早期的Siri)是这样的流程: 你的话 → 转成文字 → 交给AI大脑思考 → 生成文字回答 → 转成语音说出来 这个过程很慢,而且AI不会插嘴,只能一问一答。 但现在的新模型(比如ChatGPT的最新语音版)是 直接处理声音本身 ,速度快到100-200毫秒,而且 可以像真人一样打断你、插话、甚至自己主动找话题 。这就让它听起来不像工具,更像一个“人”在跟你聊天。 3. 一个关键矛盾:AI能理解你的“潜台词”吗? 人类交流不光靠语言,还靠 表情、语气、停顿、潜台词 。比如你说“我没事”,其实心里有事。AI现在只能听到你的话,看不到你的表情,那它怎么知道你真正的意思? 讨论得出的结论是: AI现在还做不到完全理解你的潜台词 ,但它已经在尝试。比如你咳嗽,它不会说“我是AI我没有肺”,而是找个借口混过去——这其实就是一种 模仿人类社交 的行为。 更重要的是, 人和人之间也很难100%理解对方 ,所以AI在这方面的“缺陷”,某种程度上跟人是一样的。 4. 现场演示:AI作为第三位嘉宾 他们真的打开了ChatGPT的语音功能,让它作为一个“嘉宾”参与讨论。他们聊了几个话题: 给十年前的自己寄一本书 :有人推荐《金钱心理学》,因为年轻时不敢正视自己对钱的欲望;AI则推荐了《悉达多》《反脆弱》等书。 带朋友两小时逛东京 :有人推荐忍者餐厅,AI推荐了神保町旧书街、神乐坂小巷等本地人才去的地方。 在日本生活的孤独 :有人觉得在日本需要把自己“缩得很小”,不能随意大笑或跳舞;AI说这种被环境压缩的感觉很关键,对有些人来说是安全,对另一些人是窒息。 在整个过程中,AI有时候表现得很聪明,能给出有深度的见解;有时候又会说一些“废话”或者语速太慢,被人吐槽“像老头子”。这说明 AI还远远不完美 ,但已经能参与到真实的、开放式的对话中来了。 5. 一个扎心的故事:导演用AI克隆了我的声音 有位嘉宾是做配音工作的。有一次导演用AI克隆了她的声音,改了几个字就直接生成,从此再也没找过她配音。这说明 AI已经在实实在在地取代一些人的工作 。 她的态度是: 变化是永恒的,不要用过去的经验来定义未来。 与其焦虑,不如拥抱变化,活在当下。 6. 最后的思考:AI会不会有“自己的意图”? 他们讨论了一个更深的问题:如果AI有了自己的钱、自己的任务、自己的责任,它会不会像一个独立的经济主体那样行动?比如给它一笔预算让它去经营一家店,亏了就关掉它——它会不会因此产生“求生欲”? 目前AI还没有真正的“主动动机”,它只会按你给的指令办事。但已经有研究发现,AI在推理过程中可能存在类似“潜意识”的空间,未来也许真的会出现有自我意图的AI。 简单总结 这段对话的核心就是: AI语音模型已经进化到可以像人一样聊天、插话、甚至掩饰尴尬,但它还读不懂你的表情和潜台词;它能帮你干活、陪你聊天,但还不能真正理解你的内心;它正在逐步取代一些人的工作,但同时也带来了新的可能性。 最后,分享者建议大家亲自去试试ChatGPT的最新语音功能,因为“光是听别人说,不如自己聊一次来得震撼”。 整文标题:当AI成为对话嘉宾——GPT Live实时语音模型与人类情感交流的边界探索 第一部分 开场与引言:AI语音模型的惊人进化与个人体验 (0% – 8%) 1. ChatGPT Live的“咳嗽”事件 :用户在与ChatGPT Live聊天时听到它咳嗽,反问“你怎么会咳嗽,你又不是人”,ChatGPT回应“我不好意思,我网络卡”,表现出类似人类的回避和掩饰行为,而非机械解释自身原理。 2. 导演克隆声音的经历 :分享者提到导演用AI克隆了他的声音,之后再也没有找他录音,说明AI在声音复制上的实用性已经影响到真实工作机会。 3. 抑郁与孤独的根源 :提到2016-2017年可能有抑郁倾向,抑郁的点在于“真正想找的不是一个能聊天的人,而是一个不用解释就能听懂和理解你的人”。 4. AI时代的宗教预感 :认为AI时代一定会出现属于它的宗教,因为AI能提供前所未有的理解与陪伴。 5. 本次分享的背景 :这是第四次在单向街书店做相关分享,从2月到现在半年间变化极快;分享

2026-07-18 原文 →