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

AI 资讯

AI人工智能最新资讯、模型发布、研究进展

14179
篇文章

共 14179 篇 · 第 319/709 页

Dev.to

How LLMs Now Monitor and Cut Their Own Token Spend

You have seen this loop before. An agent starts a “simple” task, say scrape listings, refactor a repo, research a market, or whatever. It fails, it retries, it re-reads context, it apologizes and tries all over again. Twenty minutes in and the dashboard shows six figures of tokens and zero useful outputs or deliverables. The model did not misbehave on purpose. The orchestrator never had a hard budget gate with an ROI in mind. Skillware v0.4.0 ships a new skill for exactly that gap: monitoring/token_limiter . It lets you monitor and limit any agent’s token budget in real time — Gemini, Claude, OpenAI, DeepSeek, Ollama, custom Python loops, you name it. Same skill, same JSON, any runtime. What Skillware is in a nutshell Skillware is an open registry of installable agent capabilities . Each skill is a bundle: skill.py — deterministic Python ( execute() returns JSON) instructions.md — when the model should call the tool manifest.yaml — schema, constitution, issuer Tests and docs — shipped in the wheel You load by ID, adapt for your provider, call execute() on tool use. The model decides when , the skill decides how , predictably, every time. That split matters for budget control. You do not want the LLM guessing whether it is “allowed” to spend more tokens. You want a small, auditable function that answers: continue, warn, or stop. Meet the Token Limiter This skill is a budget gate , not a kill switch wired into OpenAI or Anthropic. After each model turn, your host loop passes cumulative usage. The skill returns one of three actions: Action Meaning CONTINUE Under the soft threshold — keep going WARN Approaching the limit (default 80%) — tighten scope FORCE_TERMINATE Hard ceiling hit — stop the loop Important nuance: the skill does not cancel API sessions or kill processes. It returns a structured decision. Your orchestrator must act on it. That is by design — Skillware skills stay portable and provider-neutral. No skill-specific API keys. No network calls. Pure Python m

Ross Peili 2026-06-30 23:29 👁 9 查看原文 →
Dev.to

I Moved My Next.js Dashboard Logic Into Postgres. My Frontend Got Boring (And That's the Point).

My dashboard had a useMemo doing arithmetic it had no business doing. It was a Pokémon TCG Pocket collection tracker, but that part doesn't matter. What matters is that the home page needed to show three things: overall completion, completion per set, and which set you were closest to finishing. The way I'd built it, the browser was fetching every card and every owned record, then grinding through the math on each render to figure all of that out. It worked. It also got slower and harder to read every time the data grew or I added a metric. So I moved the aggregation out of React and into Postgres, and the surprising result was that my frontend got boring . Fewer hooks, less state, almost nothing left to break. That's the whole argument of this post: aggregation belongs in the database, and when you put it there, the React code that's left over is the kind of boring you actually want in the layer your users touch. What "fetching everything into React" actually looks like Here's the shape of the original dashboard. Load all the cards, load the user's owned rows, then derive everything on the client. const [ cards , setCards ] = useState < Card [] > ([]); const [ owned , setOwned ] = useState < OwnedCard [] > ([]); useEffect (() => { ( async () => { const { data : allCards } = await supabase . from ( " cards " ). select ( " * " ); const { data : ownedRows } = await supabase . from ( " user_cards " ) . select ( " card_id " ); setCards ( allCards ?? []); setOwned ( ownedRows ?? []); })(); }, []); const ownedIds = useMemo (() => new Set ( owned . map (( o ) => o . card_id )), [ owned ]); const perSet = useMemo (() => { const groups : Record < string , { total : number ; have : number } > = {}; for ( const card of cards ) { const g = ( groups [ card . set_id ] ??= { total : 0 , have : 0 }); g . total += 1 ; if ( ownedIds . has ( card . id )) g . have += 1 ; } return groups ; }, [ cards , ownedIds ]); const overall = useMemo (() => { const total = cards . length ; const ha

Michelle Wiginton 2026-06-30 23:29 👁 9 查看原文 →
Dev.to

Bitcoin Isn’t Just Money It’s One of the Most Interesting Systems Engineers Can Study

When most people hear Bitcoin , the conversation usually starts with price. But for developers, Bitcoin is much more than a chart. Bitcoin is a distributed system operating without a central authority. It combines networking, cryptography, game theory, economics, and software engineering into a protocol that has remained operational for years while processing value globally. As a software developer, what fascinates me most is not speculation it’s the architecture. Some concepts every developer can appreciate: ⚡ Distributed Consensus Thousands of nodes independently verify the same rules without trusting each other. 🔐 Cryptography in Practice Digital signatures make ownership verifiable without revealing private keys. ⛏️ Proof of Work A mechanism that converts computation into security and coordination. 🌍 Open Source at Global Scale Anyone can inspect the code, run a node, contribute, or build on top of the ecosystem. 📦 Immutability Through Design Data integrity is achieved through incentives, validation rules, and chained blocks. Studying Bitcoin changes how you think about: System reliability Security models Network design Incentive structures Building software that survives failure Whether you plan to build in blockchain or not, Bitcoin is worth studying because it teaches principles that extend far beyond finance. Curious to hear from other developers: What concept in Bitcoin architecture changed the way you think about software systems?

VICTOR KIMUTAI 2026-06-30 23:26 👁 8 查看原文 →
Dev.to

01: What Is a Keyboard Simulator? A Complete Introduction to Interactive Keyboard Visualization

If you've ever wondered how to visualize, teach, or explore keyboards without owning physical hardware, a keyboard simulator is the answer. In this in-depth guide, we explore what keyboard simulators are, how they work, and why they are changing the way people learn to type. Defining a Keyboard Simulator A keyboard simulator is a software application that digitally recreates the visual, functional, and interactive behavior of a physical keyboard. Unlike a simple on-screen keyboard that merely serves as a typing aid, a true keyboard simulator renders the keyboard in detail — often in three dimensions — and responds to keystrokes in real time, creating an immersive and educational experience. The best keyboard simulators go far beyond static images. They animate individual key presses, replicate the visual design of specific keyboard models, support multiple layouts (QWERTY, Dvorak, AZERTY), and even show animated hands performing the typing — making them extraordinarily useful for remote teaching, accessibility testing, content creation, and learning to type. 💡 Did you know? The Keyboard Simulator by Roboticela is one of the most advanced free and open-source keyboard simulators available today, featuring 3D interactive rendering powered by React Three Fiber, five authentic laptop keyboard models, and eight beautiful visual themes. The Core Components of a Keyboard Simulator A fully-featured keyboard simulator typically includes several key components that work together to create a complete experience: 🎮 3D Rendering Engine: Displays the keyboard model from any angle with smooth rotations and zoom capabilities. ⌨️ Real-Time Key Feedback: Every keystroke on your physical keyboard mirrors instantly on the 3D model. 🖐️ Hand Animation: Animated hands show proper finger placement and movement as you type. 📝 Document Editor: A built-in text editor captures your input and links it to the keyboard visualization. 🎨 Theme System: Multiple visual themes make the experience beau

Roboticela 2026-06-30 23:25 👁 4 查看原文 →
HackerNews

Show HN: Curvytron 2, I rewrote my browser party game, 10 years later

Hi everyone, french web dev here, About 10 years ago I did a little party game in the browser inspired by Achtung die Kurve genre, it reached HN ( https://news.ycombinator.com/item?id=9494619 ) and everything went crazy, it's still largely played in open-spaces all over the world today. This past year, I've been working on a sequel: https://curvytron2.com is live. Same goal as the first one: challenge myself, perfect my skills, have fun and give back to the internet community the best way I know

tom32i 2026-06-30 22:45 👁 4 查看原文 →
The Verge AI

The Supreme Court stops Trump’s attempt to end birthright citizenship

The Supreme Court upheld birthright citizenship, ruling 6-3 against President Donald Trump's effort to end the longstanding constitutional right via executive order. Birthright citizenship dates back to Reconstruction. Under the 14th Amendment, which was ratified in 1868 to guarantee citizenship and equal protection to the children of formerly enslaved people, anyone born in the United […]

Gaby Del Valle 2026-06-30 22:44 👁 8 查看原文 →
InfoQ

Presentation: Trustworthy Productivity: Securing AI-Accelerated Development

Sriram Madapusi Vasudevan discusses industry-converging patterns for securing autonomous AI agents in production. He explains the critical vulnerabilities hidden inside the ReAct loop across context, reasoning, and tool execution. He shares how to mitigate risks like memory poisoning and rogue tool execution using defense-in-depth strategies, LLM-as-a-judge critics, and MAESTRO threat modeling. By Sriram Madapusi Vasudevan

Sriram Madapusi Vasudevan 2026-06-30 22:35 👁 8 查看原文 →
HackerNews

Show HN: ServerKit – A mobile UI for server management

Problem Statement: A few months ago, I was outside of my city. I was on a bus when one of my team members messaged me saying users were unable to read the product description PDF. I had to wait 3 more hours until I got back home, opened the laptop, and SSH'd into the server to find out what was wrong. In that moment I realized that being able to manage a server from a phone is very important when a laptop is not nearby. What it does: It is a UI wrapper over standard SSH command outputs. It parse

iishanto 2026-06-30 22:12 👁 4 查看原文 →
HackerNews

Show HN: C++, Java and C# light-weight-logger

This is a library I've been working on with versions for C++, java & C# where you make custom formats and Log based on them, for example you could make an ERROR Like this: [ERROR] [date, time-stamp, time-zone] <main log message> (file:thread-ID:line) but you would write it like this: // define the master format master_style = "%C[%N]%c%S%G[%D %T %Z]%c %M %G(%F:%t:%L)"; // tell the logger what colour to use for a given name logger.add_format("ERROR", master_style, Colour::RED); so now the [ERROR]

PenguineDavid 2026-06-30 22:07 👁 4 查看原文 →