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

今日精选

HOT

最新资讯

共 29089 篇
第 179/1455 页
AI 资讯 Dev.to

ISO 3166-1 Alpha-2 Country Codes: A Developer's Guide

Any application that ships across borders needs a way to name a country. You reach for a two-letter code, write US , JP , DE , and move on. Then a support ticket arrives. A user in Belfast picked "United Kingdom" and your shipping API rejected UK . Someone in Pristina found no option at all. Your analytics dashboard shows a country called AN that dissolved in 2010. These bugs share one root: ISO 3166-1 alpha-2 carries more rules than its two characters suggest. Let's walk through the parts that break real applications, and how to model country data so the next revision of the standard does not break yours. Key takeaways ISO 3166-1 defines 249 officially assigned alpha-2 codes. UK is not one of them. The United Kingdom is GB . Four other status categories exist: user-assigned, exceptionally reserved, transitionally reserved, and indeterminately reserved. They follow different rules. Kosovo uses XK , a code from the user-assigned range that ISO has never officially assigned. Codes get recycled. CS meant Czechoslovakia, then Serbia and Montenegro. Country names change far more often than their codes. Store the code, resolve the name at render time. What alpha-2 covers ISO 3166 splits into three parts. Part 1 names countries and their dependent territories. Part 2 names subdivisions inside them. Part 3 records codes that fell out of use. Part 1 gives you three code sets for the same entity: Format Japan Notes Alpha-2 JP Two letters. Used by ccTLDs, BCP 47 language tags, payment APIs. Alpha-3 JPN Three letters. Easier to read on its own. Numeric-3 392 Digits from UN M49. Script-independent, survives alphabet changes. Alpha-2 is the set you meet most often. Two characters fit anywhere, and the Internet Assigned Numbers Authority (IANA) draws the country-code top-level domains straight from the alpha-2 list, which puts these codes in front of everyone who ever registered a domain. That reach explains the misuse. Five kinds of code The 249 official codes get the attention.

Rushan 2026-07-29 11:46 6 原文
AI 资讯 Dev.to

MCP Usage Metering: Track Agent Tool Calls Without Billing Surprises

An AI agent can turn one user request into a small storm of model calls, MCP tool calls, retries, partial failures, and background work. If you only meter the final response, you are guessing. If you meter every low-level event without context, you create noise customers will not trust. That is the billing trap many AI product builders are walking into: the product feels simple, but the usage behind it is multi-step, non-deterministic, and easy to dispute. MCP makes this more urgent. The Model Context Protocol gives agents a standard way to call tools, but a standard tool call is not the same thing as a fair usage meter. A production meter needs to answer harder questions: Which customer, workspace, user, and agent run caused the call? Was it read-only or write-capable? Was the call retried, duplicated, cached, rejected, or actually executed? Did it hit a paid upstream API? Should it count toward quota, invoice, abuse limits, or only observability? Can you explain the charge without exposing private prompt or customer data? This guide shows a practical MCP usage metering architecture for solo developers, micro product teams, and AI platform builders who need cost control without surprising users. Why MCP Usage Metering Is Different From Token Tracking Token tracking is mostly linear. You send a prompt, receive a response, and record input tokens, output tokens, model, latency, and cost. Agent tool usage is messier. A single request like "research these accounts and update the CRM" might trigger: A retrieval call to fetch customer rules A search tool call for each account A browser or enrichment call for missing fields A CRM read A CRM write proposal A human approval pause A final write call A summary response Some calls are internal. Some are customer-visible. Some are expensive. Some are dangerous. Some are free but should be rate limited. Some fail after doing real work. Some are retried by the agent, the SDK, the queue, or the network layer. If you charge blindly

Jack M 2026-07-29 11:34 5 原文
AI 资讯 Dev.to

The Window to Build AI Expertise Is Closing Faster Than Anyone Expected

I spend a lot of time in the AI space -- reading papers, building things, talking to engineers who are actually shipping. And there is a gap between what the demos show and what production systems actually look like that nobody is being fully honest about. So here is my honest take on where things actually are. The Problem With How We Talk About AI Agents Everyone is calling everything an "agent" right now. A function that calls a tool? Agent. A chatbot with memory? Agent. A script with a loop? Agent. This dilution is not just semantic. It is causing real engineering mistakes. When you do not have a precise definition for what you are building, you end up over-engineering simple pipelines and under-engineering genuinely complex ones. I have seen teams spend weeks adding "agentic" orchestration to workflows that would have been fine as a single well-structured prompt. Here is the definition I keep coming back to: an agent is a system that has an objective, not just an instruction. It decides what to do next. It handles failure. It knows when it is done. Everything else is just a fancy function call. 🟢 If your system needs a human to tell it each step, it is not an agent. It is a chat interface. 🔵 If your system can recover from a failed tool call and try a different approach, you are getting somewhere. ✅ If your system can decompose a goal into subtasks and delegate them, that is the real thing. What Is Actually Happening in Production Right Now The honest picture from teams I follow and talk to: Most real agent deployments are narrow. They do one thing well. Customer support triage. Document extraction. Code review on a specific codebase. They are not general-purpose reasoning engines. They are purpose-built pipelines with some intelligence in the decision layer. The teams getting good results are not chasing the latest model release. They are obsessing over: ☑️ Tool design -- what can the agent actually call, and how clean is the interface ☑️ Failure handling -- wh

AI Bug Slayer 🐞 2026-07-29 11:31 5 原文
AI 资讯 Dev.to

Agent Reach installs the tools, then gets out of the way

Agent Reach is easiest to understand as a setup layer: it gives a command-capable coding agent a local toolbox, then stops being the center of the workflow. What is Agent Reach CLI for? Agent Reach CLI is a local, open-source coordinator for AI coding agents that can run shell commands; it is not a hosted scraping API, managed crawler, or cloud browser service. The practical job is narrower and more useful: choose platform utilities, install them, verify they work, and route the agent toward the right upstream tool. The current setup story should be pinned to Agent Reach v1.5.0, with package metadata listing Python >=3.10 and an MIT license . The v1.5.0 release was published on June 11, 2026, and describes 162 total tests plus 32 end-to-end real-machine tests across 13 channels . That matters because the project is handling brittle platform tooling, not exposing one stable universal API. "Selects, installs, health-checks and routes" is the core model described by the Agent Reach project, which means the agent still calls tools such as OpenCLI, yt-dlp, GitHub CLI, Jina Reader, feedparser, and platform CLIs directly (source: Agent Reach GitHub repository ). Out of the box, the zero-config surface is deliberately limited: public web reading via Jina Reader, YouTube, GitHub, RSS, Exa Search, V2EX, and basic Bilibili are listed in the install guide . The seed video frames the tool as a way to give agents access to social and web platforms, but builders should read that through the repo’s stricter model: Agent Reach installs and checks local capabilities; it does not remove login, cookie, or platform constraints . Prerequisites before pipx Agent Reach prerequisites are mostly local-environment prerequisites: use Python >=3.10, a shell-capable workstation, and accounts where you can manage CLIs, browser sessions, environment variables, and cookies deliberately . Treat the setup as installing a local capability layer for an AI coding agent, not as signing up for a hosted sc

Creeta 2026-07-29 11:31 6 原文
AI 资讯 Dev.to

Two Years From Now, This Will Be the Only Skill That Matters in AI

I spend a lot of time in the AI space -- reading papers, building things, talking to engineers who are actually shipping. And there is a gap between what the demos show and what production systems actually look like that nobody is being fully honest about. So here is my honest take on where things actually are. The Problem With How We Talk About AI Agents Everyone is calling everything an "agent" right now. A function that calls a tool? Agent. A chatbot with memory? Agent. A script with a loop? Agent. This dilution is not just semantic. It is causing real engineering mistakes. When you do not have a precise definition for what you are building, you end up over-engineering simple pipelines and under-engineering genuinely complex ones. I have seen teams spend weeks adding "agentic" orchestration to workflows that would have been fine as a single well-structured prompt. Here is the definition I keep coming back to: an agent is a system that has an objective, not just an instruction. It decides what to do next. It handles failure. It knows when it is done. Everything else is just a fancy function call. 🟢 If your system needs a human to tell it each step, it is not an agent. It is a chat interface. 🔵 If your system can recover from a failed tool call and try a different approach, you are getting somewhere. ✅ If your system can decompose a goal into subtasks and delegate them, that is the real thing. What Is Actually Happening in Production Right Now The honest picture from teams I follow and talk to: Most real agent deployments are narrow. They do one thing well. Customer support triage. Document extraction. Code review on a specific codebase. They are not general-purpose reasoning engines. They are purpose-built pipelines with some intelligence in the decision layer. The teams getting good results are not chasing the latest model release. They are obsessing over: ☑️ Tool design -- what can the agent actually call, and how clean is the interface ☑️ Failure handling -- wh

AI Bug Slayer 🐞 2026-07-29 11:31 6 原文
AI 资讯 Dev.to

How to safely run AI-generated code — a practical sandboxing checklist

Cross-post. Original: stellarbytecapital.com/blog/how-to-run-ai-generated-code-safely If you're building an AI agent, sooner or later it will write code and you'll have to run that code. The moment you do, you're executing something no human reviewed against your infrastructure. This is a practical checklist for doing that safely — the controls we use in production, in the order they matter. The short version: treat every piece of AI-generated code as hostile, and design so that even a full compromise of the runtime buys the attacker nothing. First, the threat model Before controls, be honest about what can go wrong when you run untrusted code: It reads or exfiltrates data belonging to other users on the same host. It reaches out to the network to leak data or pull a payload. It leaves state behind — temp files, mutated env, background threads — that corrupts the next run. It exhausts CPU, memory, or disk and takes down the shared service. It escapes the sandbox entirely via a kernel or runtime bug. "The model probably won't do that" is not a control. Design for the case where it does. The core pattern: one disposable sandbox per execution The single highest-leverage decision: run every execution in its own fresh sandbox, and destroy it after the run. Never reuse. Reuse is where most bugs and attacks live — leaked file descriptors, leftover temp files, mutated globals, a background thread from the last run. If nothing is ever reused, that entire class of problems disappears. To keep it fast, keep a warm pool of ready sandboxes and backfill each one as it's consumed. The checklist Isolation boundary — use a real boundary, not a language-level "safe eval." A container is the baseline; a microVM ( gVisor , Firecracker ) is stronger against kernel escapes. Network egress: default-deny — no outbound network by default. An escaped agent that can't reach the internet has nowhere to send data. Filesystem: read-only + ephemeral — mount inputs read-only; give a scratch space

Weston Carnes 2026-07-29 11:31 7 原文
AI 资讯 Dev.to

Building a Modern Rate Limiter and DDoS Protection Library for Python

Rate limiting is one of those features every production API eventually needs. Whether you're building a public REST API, a WebSocket service, or an authentication endpoint, you'll eventually face problems like: Credential stuffing Brute-force attacks API abuse Bots scraping your endpoints Unexpected traffic spikes Most applications solve this with a simple request counter. But after building several APIs with Django, FastAPI, and Flask, I realized that production traffic requires much more than "X requests per minute." That observation led me to build drogue , an open-source Python library for rate limiting and traffic protection. The Problem Traditional rate limiting is straightforward: Allow 100 requests per minute. This works well for many cases, but real-world applications quickly expose its limitations. For example: A distributed attack can remain below the per-IP limit. A bot can rotate through proxies. WebSocket connections often require different handling than HTTP requests. Different endpoints need different protection strategies. I wanted a system that could go beyond simple request counting. Design Goals From the beginning, I focused on a few principles. 1. Clean framework integration I didn't want endpoint functions filled with framework-specific plumbing. Instead, the library should feel like a natural extension of the framework. from fastapi import FastAPI from drogue.adapters.fastapi import DrogueLimiter app = FastAPI () limiter = DrogueLimiter ( app , default_limits = [ " 100/minute " ]) @app.get ( " /users " ) @limiter.limit ( " 10/minute " ) async def users (): return { " status " : " ok " } No additional request objects. No complicated middleware configuration. Minimal boilerplate. Multiple Rate Limiting Algorithms Different applications require different algorithms. Instead of supporting only one approach, drogue includes multiple options: Token Bucket Sliding Window Fixed Window Each has different trade-offs between accuracy, burst handling, and

zlynv 2026-07-29 11:31 6 原文
AI 资讯 Dev.to

ViciDial "Campaign Has No Dialable Leads" — List & Hopper Troubleshooting

ViciDial "Campaign Has No Dialable Leads" — List & Hopper Troubleshooting Master the root causes of no dialable leads errors and regain full campaign productivity through systematic list validation, hopper configuration, and database troubleshooting. Prerequisites Before troubleshooting, ensure you have: SSH access to your ViciDial server with sudo privileges Access to the ViciDial web admin panel at /vicidial/admin.php MySQL/MariaDB command-line access to the asterisk database Understanding of basic ViciDial campaign structure (lists, dialers, agents) Root or asterisk-user permissions to check Asterisk processes Recent backups of your ViciDial database and configuration files A test campaign with known lead counts for validation The "Campaign Has No Dialable Leads" error typically appears when: The dialer attempts to initiate calls but the hopper queue is empty All records in the lead list have been exhausted or marked as non-dialable List settings conflict with campaign configuration The database connection between ViciDial and the dialer is broken Lead filtering rules remove all records from the dialable pool Understanding ViciDial List Architecture The Lead Lifecycle in ViciDial Every lead in ViciDial passes through status states that determine dialability. A lead is considered "dialable" if it matches specific criteria based on campaign and list configuration. Lead Status States: NEW — Fresh lead, never contacted QUEUE — Scheduled for dialing CALL — Currently being dialed LEFT MESSAGE — Voicemail was left CALLED — Contacted but not completed XFER — Transferred to another department XFER SEND — Pending transfer INCALL — Active call in progress CBHOLD — Callback hold status CBSCHED — Callback scheduled DNCC — Do Not Call Compiled DNCL — Do Not Call List The status field in the vicidial_list table controls whether a lead can be dialed again. Most campaigns set a maximum dial count limit to prevent redialing exhausted leads infinitely. Hopper Mechanism The ViciDial

Moisi Trungu 2026-07-29 11:30 6 原文
AI 资讯 Dev.to

AI ตรวจจับมัลแวร์เก่งกว่ามนุษย์จริงหรือ? ไขความจริงเบื้องหลังตัวเลขความแม่นยำ

ทุกวันนี้มัลแวร์รูปแบบใหม่ถูกสร้างขึ้นนับพันนับหมื่นชิ้นในแต่ละวัน ปริมาณภัยคุกคามที่เพิ่มขึ้นอย่างรวดเร็วนี้ทำให้การพึ่งพานักวิเคราะห์ความปลอดภัยไซเบอร์ที่เป็นมนุษย์เพียงอย่างเดียวแทบเป็นไปไม่ได้ นี่คือเหตุผลสำคัญที่บริษัทด้านความปลอดภัยไซเบอร์ทั่วโลกหันมาพึ่งพาปัญญาประดิษฐ์และแมชชีนเลิร์นนิงเป็นแนวหน้าในการรับมือกับมัลแวร์ หลายบริษัทโฆษณาว่าโซลูชันของตนตรวจจับมัลแวร์ได้แม่นยำถึง 99% หรือมากกว่านั้น ตัวเลขเหล่านี้ฟังดูน่าประทับใจอย่างยิ่ง แต่คำถามที่ควรถามต่อคือ ตัวเลขเหล่านี้สะท้อนความเป็นจริงมากน้อยเพียงใด และ AI เก่งกว่ามนุษย์จริงหรือไม่ในสมรภูมิการต่อสู้กับมัลแวร์ บทความนี้จะพาไปไขความจริงเบื้องหลังตัวเลขเหล่านั้นอย่างละเอียด กลไกเบื้องหลังการตรวจจับมัลแวร์ด้วย AI ก่อนจะตอบคำถามว่า AI เก่งกว่ามนุษย์หรือไม่ จำเป็นต้องเข้าใจก่อนว่าระบบ AI ตรวจจับมัลแวร์ทำงานอย่างไร โดยทั่วไปมีสองแนวทางหลักที่ใช้กันในอุตสาหกรรมความปลอดภัยไซเบอร์ แนวทางแรกคือการตรวจจับด้วยลายเซ็นดิจิทัล (Signature-Based Detection) ซึ่งเป็นวิธีดั้งเดิมที่ใช้กันมานานหลายทศวรรษ ระบบจะเปรียบเทียบไฟล์ต้องสงสัยกับฐานข้อมูลลายเซ็นของมัลแวร์ที่เคยพบมาก่อน วิธีนี้แม่นยำสูงสำหรับมัลแวร์ที่รู้จักแล้ว แต่ไม่มีประสิทธิภาพเมื่อเจอมัลแวร์ตัวใหม่ที่ไม่เคยถูกบันทึกไว้ในฐานข้อมูล แนวทางที่สองคือการตรวจจับผ่านพฤติกรรมด้วยแมชชีนเลิร์นนิง (Behavior-Based Detection) ซึ่งเป็นจุดแข็งหลักของ AI ยุคใหม่ ระบบจะถูกฝึกฝนด้วยตัวอย่างมัลแวร์และไฟล์ปกตินับล้านไฟล์ เพื่อเรียนรู้รูปแบบพฤติกรรมที่บ่งชี้ความเป็นอันตราย เช่น ความพยายามเข้าถึงไฟล์ระบบโดยไม่ได้รับอนุญาต การเชื่อมต่อไปยังเซิร์ฟเวอร์ต้องสงสัย หรือการเข้ารหัสไฟล์จำนวนมากในเวลาอันสั้นซึ่งเป็นสัญญาณคลาสสิกของแรนซัมแวร์ จุดเด่นของวิธีนี้คือความสามารถในการตรวจจับมัลแวร์ตัวใหม่ที่ไม่เคยพบมาก่อน หรือที่เรียกว่า Zero-Day Malware เพราะไม่ได้พึ่งพาการจดจำลายเซ็นเดิม แต่อาศัยการวิเคราะห์พฤติกรรมและรูปแบบที่ใกล้เคียงกับสิ่งที่เคยเรียนรู้มาแล้ว ตัวเลขความแม่นยำที่โฆษณากันนั้นบอกอะไรจริง ๆ เมื่อบริษัทความปลอดภัยไซเบอร์อ้างว่าผลิตภัณฑ์ของตนมีความแม่นยำ 99% หรือสูงกว่านั้น ผู้บริโภคควรตระหนักว่าตัวเลขเหล่านี้มักมาจากการทดสอบภายใต้สภาพแวดล้อมที่ควบคุมไว้อย่างเข้มงวด ซึ่งอาจไม่สะท้อนสถานกา

r1ACK 2026-07-29 11:28 7 原文
AI 资讯 Dev.to

Your model can't grade its own homework

Every team I've watched ship a broken measurement system broke it the same way. Not with bad math — with an org chart problem that happened to live in code. The entity making the claim ended up being the entity that decided whether the claim was right. Once you have the shape in your head you start seeing it everywhere. Three roles, not two Most engineers think about measurement as two roles: the thing that acts, and the thing that grades it. That's one role short. There are three: Player — makes the claim. Your model, your service, your PR. Scorer — applies the rubric. Your eval harness, your test suite, your metrics dashboard. Settler — determines what actually happened. Production outcomes. Reality. The scorer is a proxy. The settler is the thing the proxy is trying to approximate. The rule: be the scorer, never the settler. When the player captures the settler, the loop closes on itself and the system can no longer be wrong — which sounds like success and is actually the failure. What it looks like in code Tuning on the test set. You check test accuracy, adjust hyperparameters, check again. Twenty iterations later the test set is training data with extra steps. The player is now selecting its own settler. That's what overfitting is , structurally — not a math failure, a role-collapse failure. LLM-as-judge from the same family. Your generator is GPT-flavored and your judge is GPT-flavored. They share pretraining data, failure modes, and blind spots. The judge doesn't rate quality — it rates similarity to what it would have produced. Correlated error is invisible to averaging; running it 1,000 times makes you more confident of the same wrong answer. Benchmark contamination. The model scores 94% on the benchmark that's in its training data. Nobody lied. The settler just quietly moved inside the player. Self-reported health. A service that returns its own health check is a claimant ruling on its own claim. If the process is wedged, the check is wedged too, and your

dys5315 2026-07-29 11:27 5 原文
AI 资讯 HackerNews

Show HN: Lean4 Datalog DSL Based on Google Zanzibar for AI Projects

Google Zanzibar datalog lang lets you describe concepts and express how they are related. I generalize it to DSL you can use on Lean4 (and other languages) this lets you represent a knowledge base you can construct, store and evaluate, have it under git and improve without big engines or relaying on external infrastructure.

kbradero 2026-07-29 10:22 2 原文