AI 资讯
async/await without the pitfalls
async/await without the pitfalls Async/await is the bread and butter of modern JavaScript. It makes asynchronous code look synchronous, which is great for readability. But it comes with its own set of footguns that can bite you in production. Here's how to avoid them. Pitfall 1: Forgetting await in a loop You might write something like this, expecting each request to finish before the next starts: async function fetchAll ( urls ) { const results = []; for ( const url of urls ) { const res = await fetch ( url ); // this is fine, but see below results . push ( await res . json ()); } return results ; } That's actually correct. The issue arises when you forget await inside a .map() or .forEach() : // Wrong: map returns an array of promises, not data const data = urls . map ( async ( url ) => { const res = await fetch ( url ); return res . json (); }); // data is now an array of promises, not the JSON data async functions always return a promise. So if you use map with an async callback, you get an array of promises. To fix it, use Promise.all : const data = await Promise . all ( urls . map ( async ( url ) => { const res = await fetch ( url ); return res . json (); })); But beware: Promise.all fails fast. If one request fails, the whole thing rejects. If you need to handle failures individually, use Promise.allSettled instead. Pitfall 2: Swallowing errors silently A common mistake is to catch an error and do nothing, which makes debugging a nightmare: try { const data = await fetchData (); // process data } catch ( error ) { // do nothing? bad! } Always at least log the error. Even better, handle it gracefully or rethrow it: try { const data = await fetchData (); } catch ( error ) { console . error ( ' Failed to fetch data: ' , error ); throw error ; // rethrow if you want the caller to handle it } If you're using async/await , unhandled promise rejections can crash your app in Node.js. Always have a catch or a global handler. Pitfall 3: Sequential execution when you ne
AI 资讯
Google Brings Expert Intelligence to Gemini Notebook With Google Play Books
Google has expanded Gemini Notebook with Expert Intelligence , an initiative that lets users ground notebook interactions in trusted content, beginning with eligible ebooks they own through Google Play Books. The update makes books usable alongside a user's own materials, allowing Gemini Notebook to generate responses and learning artifacts based on the combined sources. For teams that need to turn authoritative material into usable guidance, the change offers a more source-centered way to work with AI. According to Google's official Expert Intelligence announcement , the initial catalog includes more than 100,000 books from major publishers. Google describes the effort as a cross-Google initiative developed with authors and publishers, with broader availability planned over time across additional sources and platforms, including the Gemini app and AI Mode in Search. How Expert Intelligence works in Gemini Notebook The initial implementation is centered on books purchased through Google Play Books. A user can add a supported ebook to a Gemini Notebook, then use the book's content as a source for notebook interactions. Google says the notebook can combine that material with the user's own documents and other sources. That distinction matters. This is not simply a general prompt asking Gemini to summarize a title from its training. The workflow is designed to use the content of a book the user owns as part of the notebook's source material. Google presents that approach as a way to engage with trusted content while preserving the link between access and ownership. From source material to usable artifacts Google says Expert Intelligence can create several kinds of outputs from a book's content, either on its own or in combination with a user's materials: Answers grounded in the book Infographics Audio overviews Quizzes Other notebook artifacts The company's example involving Steven Pinker's The Sense of Style illustrates the intended use: a writer can bring the book in
AI 资讯
7 of My 8 Claude Code Agents Had Zero Calls in 30 Days: Finding Dead Agents Automatically
I had eight custom agents defined in Claude Code. When I finally counted, seven of them hadn't been called once in the last 30 days. What keeps my ¥1.2M/month automation setup running isn't clever prompting. It's an environment that keeps checking, automatically, whether the things I built are actually doing anything. Why this setup works Claude Code lets you define custom agents by dropping .md files into the ~/.claude/agents/ directory. You define specialists like architect (architecture design), code-reviewer (code review), and security-reviewer (security audits), and expect Claude Code to pick the right one on its own. It's a natural assumption. But when you actually tally the logs, the results are surprising. Take my environment as an example. ~/.claude/agents/ currently holds eight agent definition files. architect.md code-reviewer.md database-reviewer.md INDEX.md planner.md python-reviewer.md security-reviewer.md typescript-reviewer.md ~/.claude/logs/agent-invocations.jsonl holds 682 records spanning May 28 to August 30, 2026. Aggregating the last 30 days gives this breakdown: === Agent usage (last 30d) === total invocations: 23 unique types: 3 Top 10: agent calls errors Explore 19 0 general-purpose 3 0 code-reviewer 1 0 0-call agents (defined locally but not used in 30d): 7 - INDEX - architect - database-reviewer - planner - python-reviewer - security-reviewer - typescript-reviewer Of the eight defined agents, exactly one, code-reviewer , was called even once in 30 days. The other seven had zero calls . 87.5% of the agents I'd defined might as well not have existed. Narrow it to the last 7 days and it gets worse: code-reviewer drops out too, and the zero-call list grows to eight. === Agent usage (last 7d) === total invocations: 3 unique types: 2 0-call agents (defined locally but not used in 7d): 8 - INDEX - architect - code-reviewer - database-reviewer - planner - python-reviewer - security-reviewer - typescript-reviewer This isn't just a "what a waste" sto
科技前沿
This is the best setting and placement for your Dolby Atmos soundbar
Take the proper steps to fully experience Dolby Atmos sound.
开发者
Who needs a health and fitness app?
So, my fiance wanted a health and fitness app, to track meals, exercise routines, manage upcoming...
AI 资讯
Google needs Hollywood more than the studios need AI
Google has reportedly been reaching out to a number of Hollywood's biggest studios, hoping to strike licensing agreements that would allow it to train its AI models on copyrighted material in exchange for massive piles of cash. In theory, these deals would be a win-win: a huge financial boon to the studios that would also […]
AI 资讯
I Tried Pair Programming With Three Different AI Tools For a Month
AI coding tools can write a function in seconds. The harder question is whether that function...
开发者
Apple follows Google in adopting Trump’s ‘Lake America’ name
Apple Maps is following President Trump's executive order to change the name of Lake Ontario to Lake America.
AI 资讯
AfterQuery reportedly becomes Y Combinator’s fastest-ever unicorn, now valued at $3.2B
AI model-training startup AfterQuery has reportedly raised a round that valued it at $3.2 billion, just five months after announcing its $30 million Series A at a $300 million valuation in April.
AI 资讯
Agents That Act Need Brakes, Not Just Brains
Here's the moment a lot of us had this year. You built an agent. It was genuinely impressive — it...
AI 资讯
Anthropic launches Claude Fable 5.1 and says it’s up to 45 percent cheaper for agentic work
Anthropic says its newest AI models, Fable 5.1 and Mythos 5.1, address criticisms from customers about price, data retention, and overzealous safeguards. The company claims Claude Fable 5.1 offers stronger performance than Fable 5, but costs around 25 percent less typically and up to 45 percent less for complex agentic tasks, thanks to reduced pricing […]
AI 资讯
Meta's new AI transcription model can distinguish between multiple speakers and languages in real-time
The latest release from Meta Superintelligence Lab is a powerful transcription model.
AI 资讯
Stop drawing the graph: reactive agents over versioned artifacts
Stop drawing the graph: reactive agents over versioned artifacts Most agent frameworks make you draw the graph : connect nodes, wire memory, declare control flow. But a knowledge problem is not a workflow. Take a realistic question: "Why did infrastructure costs increase in Q2?" The answer may need Confluence docs, GitLab merge requests, CSV spend data, a calculation, source verification — and a clarifying question. The next question needs a different path. There is no universal graph here, and asking a developer to draw one for every possible question is asking them to predict the future. So we built an agent runtime where you don't describe execution at all . You describe what artifacts exist and what agents can do with them; the runtime derives what runs next from state changes. Agents react to events. There is no graph and no node pipeline. This is ctxloom — a reactive, artifact-driven agent runtime, now open source. What it looks like The whole loop is: create an artifact → agents react → one atomic patch → context advances . A knowledge question — say, "how much does GPU inference cost?" — becomes a chain of typed artifacts: UserQuery → TypedDoc → Evidence → Claim → Answer . Each is produced by an agent that reacts to the previous artifact. No graph describes this chain; it falls out of what each agent consumes and produces. ARTIFACT CREATED / UPDATED │ ▼ AGENTS REACT ──self.effects──► Effects ──compile──► Patch ▲ │ └──────────────────────────────────────────────────────┘ Context v+1 The event that wakes an agent is derived from that same change — the causal chain can never drift from the actual state. from pydantic import BaseModel from ctxloom import Budget , Consume , Context , Runtime , RuntimeResources , create_agent , produce , structured_llm class Question ( BaseModel ): text : str class FindingBody ( BaseModel ): text : str class Finding ( BaseModel ): text : str source : str class Conclusion ( BaseModel ): text : str @produce ( Finding ) async def ana
AI 资讯
Property Moderation Router: Compare 3 Startup API Token Costs with One Key
Short answer: for a property-management startup, the cheapest one-key router is the one that minimizes cost per correctly classified moderation report on your own replay set while preserving a provider-neutral request, response, and error contract. Raw token rates alone cannot make that choice. Choice Best fit Main catch Measure first Managed multi-provider router Small team optimizing time-to-first-call Another control plane owns the routing boundary Valid classifications per dollar Self-hosted gateway Team that needs policy and telemetry under its control You own upgrades, capacity, and incident response Operator hours plus inference cost Thin in-app adapters Narrow model set and strict contract control Every new capability adds adapter work Change lead time and test burden My default for an early startup app is a managed router behind a tiny internal interface, with request fixtures stored outside the router. Choose the self-hosted runner-up when data-path control or custom routing policy is more important than low configuration overhead. Choose direct adapters when the application genuinely uses only a small, stable slice of each provider API. This is a decision about portability, not a hunt for a permanent lowest price. OpenAI, Claude, and Gemini differ in message shapes, structured-output behavior, usage accounting, and model lifecycle. A shared API key removes credential sprawl; it doesn't erase those differences. How should a startup app compare token cost across one-key routers? Start with the unit of work: one moderation report reaching a human reviewer with a valid label, confidence, rationale, and trace ID. A property manager does not buy tokens for their own sake. They need reports such as harassment , fraud , safety , or noise triaged consistently enough that urgent cases rise and ambiguous cases stay in the human queue. The useful equation is: effective cost = inference charges + router charges + retries + invalid-output handling + operational labor T
AI 资讯
ChatGPT Connects to Health Records, Bringing AI Closer to Clinical Workflows
OpenAI is moving ChatGPT closer to the clinical systems healthcare teams use every day. The company is enabling direct interoperability between ChatGPT and health-system data sources , including electronic health records, in supported deployments. The change is designed to bring AI-assisted work into clinical workflows instead of requiring clinicians to move between a separate AI tool and the patient chart. The development expands the company's ChatGPT for Healthcare direction , which includes HIPAA-compliant workspaces and responses backed by trusted medical sources. As described in OpenAI's announcement on connecting ChatGPT to health records and healthcare sources , the focus is on making relevant clinical information and AI assistance available within supported EHR layouts and care-coordination processes. For healthcare providers, the significance is practical rather than merely technical. If deployed appropriately, a connected assistant could reduce context switching around routine documentation and information-review tasks. However, the initial communications do not provide an exhaustive list of supported EHR vendors, regions, user roles, or pricing. Availability will depend on deployment-specific arrangements and enterprise partnerships. What ChatGPT's health record connections change The central shift is from a standalone conversational interface to a more integrated clinical copilot model. OpenAI describes ChatGPT being connected to health records and healthcare sources, enabling AI-supported work where clinicians already review and document care. That could support workflows such as: Drafting notes from information available in the clinical context. Summarizing patient information for review. Supporting care coordination across connected healthcare data sources. Keeping AI-assisted tasks inside the EHR interface rather than requiring a separate workspace. These are examples of the types of workflows OpenAI's high-level description points toward, not a guar
AI 资讯
Open AI’s Astra model is on the way—and very good at breaking into computer systems
OpenAI previewed the precautions it is taking as it prepares to release Astra, its newest, cyber-critical LLM.
AI 资讯
Google Business Profile Continuity Planning: How to Protect Local Lead Flow
A Google Business Profile can be a major source of calls, website visits, directions, bookings and customer confidence for a local business. That makes a suspension, reverification request, ownership problem or other loss of profile access more than a support-ticket inconvenience. It can interrupt a meaningful part of the lead pipeline. A Search Engine Land continuity-planning guide for Google Business Profiles , published on August 24, 2026, argues that businesses should prepare for this possibility before it happens. Its central point is practical: recovering a profile matters, but so does maintaining lead flow while recovery is underway. This is not an argument for abandoning Google Business Profile. A complete, accurate profile remains an important local discovery asset. The risk comes from treating it as the only dependable route between prospective customers and a business. If access is disrupted, recovery can take time and may involve lost profile content, reviews or historical performance data. A continuity plan gives the team a defined response instead of forcing it to improvise under revenue pressure. The four-part Google Business Profile continuity framework The framework is built around four connected actions: Preserve, Recover, Replace and Reduce . Together, they cover both immediate response and longer-term resilience. Preserve ownership, evidence and profile records Preparation starts with control. Businesses should ensure that the right people have ownership or access to the profile and that account responsibilities are clear. They should also retain the documents likely to be needed for verification or an appeal, such as business registrations, licences, utility bills and other evidence relevant to the business. It is also sensible to maintain copies of important profile information and keep NAP data consistent. NAP means the business name, address and phone number. Consistency across the website, directories and social profiles makes it easier for
AI 资讯
Inside `OpenWhispr/openwhispr`: A Privacy-First Voice-to-Text Workflow
Voice dictation is one of those tools that can quietly improve an entire day. OpenWhispr/openwhispr is gaining attention on GitHub, with 43 stars added today, because it treats dictation as a local-first productivity utility rather than just another cloud transcription feature. The project supports local speech-to-text models, including Nvidia Parakeet and Whisper, while also allowing cloud models through a bring-your-own-key workflow. That gives developers an important choice: keep audio on the device for privacy, or trade some privacy for potentially faster or more capable hosted inference. A practical way to start exploring the source is: git clone https://github.com/OpenWhispr/openwhispr.git cd openwhispr git log -5 --oneline For everyday use, the fastest path will usually be the project’s cross-platform release package. After installation, configure a local model if your machine has suitable hardware, or add your own provider credentials through the application settings. Keeping credentials in the app’s secure configuration storage is preferable to committing them to shell history or dotfiles. The architecture choice is especially interesting for independent developers. Local inference can reduce recurring API costs and keeps sensitive conversations away from third-party servers. The trade-off is hardware dependency: CPU-only transcription may introduce noticeable latency, while GPU acceleration can require additional drivers, memory, and model downloads. Before deploying this into a team workflow, I would watch for: Model consistency: Different Whisper or Parakeet variants can produce noticeably different punctuation, latency, and accuracy. Operational boundaries: Local processing improves privacy, but model files, logs, clipboard integration, and temporary audio buffers still need review. The strongest value proposition is not merely “speech recognition.” It is giving users control over where transcription happens. For developers who dictate code, documentati
AI 资讯
Google’s Android update tackles motion sickness, accessibility, and more
While some of the features see Google playing catch-up to Apple, which already offers similar features for iPhone users, others specifically leverage Gemini to provide various improvements.
AI 资讯
America Can Still Lose the A.I. Race to Itself
At 5:21 p.m. Eastern on Friday, June 12, Anthropic received a United States government directive. By nightfall, two of the most capable artificial-intelligence models in the world had gone dark after a Commerce Department export-control directive prompted Anthropic to take them offline worldwide. The directive required Anthropic to prevent access to Claude Fable 5 and Claude Mythos 5 by any foreign national, whether that person was inside or outside the United States. It extended even to Anthropic's own foreign-national employees. Because the company had no reliable way to verify every user's nationality in real time, it suspended both models for everyone . The controls remained in place until June 30. On July 1, Anthropic restored Fable globally. Mythos took a narrower path: after government approval on June 26, access returned to a set of United States organizations while Anthropic continued coordinating with the government over broader domestic and international access. That sounds like a short outage with a happy ending. It was neither. I have spent years building systems where a dependency going unavailable is not an abstraction. Once software is woven into a product or an operating process, access to it becomes part of the architecture. A model that can be withdrawn immediately under a company-specific determination and factual rationale no customer could have read is no longer only a technical dependency. It is a bet on unpublished policy. The United States needs to govern frontier A.I. It also needs companies, researchers, investors, and customers to know what the rules are before the government enforces them. June showed how far apart those two needs remain. The security concern was real The government's concern was not invented. Fable and Mythos shared the same underlying model, but Fable was released with strong safeguards for general use while Mythos, with fewer safeguards, went only to a small group of defensive-cybersecurity partners. Anthropic says My