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

标签:#RAM

找到 1409 篇相关文章

AI 资讯

How I replaced LLM calls with coding agent calls and saved money

When building an AI agent, you need LLM calls. It can be done via a remote API or a local API, but either way you need to do it. Whether the agent is a simple conversational agent or a ReAct agent with a bunch of tools, whether it's using a complex graph or a simple RAG, it must be based on the concept of sending prompts to the language model. But, what if we replace the language model with... another agent? Let's say we already have a smart agent with a bunch of tools that can handle complex problems. Why not use it to build a new agent on top of it? This way we can focus on the specific custom functionality we want to achieve, while already having the common functionalities covered by the underlying agent. You might think this must be expensive. You get a better performance, so you have to pay for it, right? Well, not necessarily. The catch is that the coding assistants are actually surprisingly cheap when compared to API prices. They offer much more than raw LLM calls, they offer amazing agent functionality, but the cost is actually lower, and it's not a small difference. The cost of LLM calls per 1M tokens is usually between $2 and $7. For coding assistant subscriptions, it's a bit more tricky to calculate because you pay for monthly subscription, but it can be still converted to per 1M tokens cost, and from what LLM just told me it is around $0.08 to $2. That's a huge difference! And the complex agents are cheaper than raw LLM's! according to ChatGPT: Service Cost per 1M tokens Codex / ChatGPT coding plan ~$0.08 Cursor Pro ~$0.08–0.25 GitHub Copilot Pro ~$0.10–0.30 Claude Pro / Claude Code ~$0.74 GPT-5 API ~$2.1 Claude Sonnet API ~$4.2 Claude Opus API ~$7.0 according to Claude: Service Cost per 1M tokens Haiku 4.5 (API) $1.80 Sonnet 5 (API, intro thru Aug 31 '26) $3.60 Sonnet 5 (API, standard) $5.40 Opus 4.8 (API) $9.00 Fable 5 (API) $18.00 Claude Code — Pro ~$1.10–$2.15 (est.) Claude Code — Max 5x ~$2.10–$4.15 (est.) Claude Code — Max 20x ~$2–$4 (est.) So, why

2026-07-11 原文 →
AI 资讯

pgrust: The Open-Source Project Rewriting PostgreSQL in Rust

Rewriting a Database Giant: Meet pgrust PostgreSQL is the bedrock of modern application development. It is incredibly stable and feature-rich, but it is built on a C codebase that started in the 1980s. In systems programming, legacy C architectures carry memory-safety risks and make core changes difficult. pgrust is an experimental open-source project that aims to rewrite the entire PostgreSQL database engine from scratch in Rust. The project recently hit a historic milestone: it now passes 100% of the official PostgreSQL 18.3 regression test suite (over 46,000 test queries). What is pgrust? pgrust is a native reimplementation of the Postgres query execution and storage layers. Unlike other projects that wrap Postgres or write extensions, pgrust is a complete rewrite of the database core itself. Crucially, it is disk-compatible with PostgreSQL 18.3, meaning it can boot up and read from an existing Postgres database directory on your machine. Key Technical Improvements By shifting from C to Rust, pgrust introduces several modern engineering improvements: 1. Memory Safety Rust’s strict compiler guarantees eliminate major classes of security vulnerabilities (like buffer overflows and dangling pointers) that frequently patch legacy C databases. 2. Thread-Per-Connection Model Standard PostgreSQL uses a "process-per-connection" architecture, which consumes a lot of system memory. pgrust changes this to a "thread-per-connection" model, drastically reducing the overhead of open connections. 3. Massively Improved Performance Because of its optimized query engine and thread-based architecture, early benchmarks show: 50% faster execution on standard transaction workloads. Up to 300x faster execution on analytical workloads. Built with an "AI Agent Factory" Rewriting a database with millions of lines of code is a monumental task. The authors of pgrust accomplished this by setting up an automated pipeline of concurrent AI coding agents. The agents were tasked with explaining leg

2026-07-11 原文 →
AI 资讯

From AI Council to Delivery System

How I Supervise Three Engineering Workflows at Once Three Workflows, One Operator Right now, I have three engineering workflows open. One is under council review. Four AI roles are challenging an architectural proposal, and I will need to decide which objections actually change the plan. The second is already in implementation. That one does not need me at the moment. The specification is approved, the boundaries are clear, and the executor can keep moving. The third has come back from audit. The findings are valid, but corrective work is paused. A remediation plan exists, and someone other than the executor needs to review it before any more code changes. This is the part that still feels new: I can move between all three without reopening old chats and rebuilding the story in my head. A few months ago, even one workflow could take most of my attention. I carried context between every stage: rewriting role prompts, moving decisions between conversations, tracking the current document, and turning audit findings into the next round of work. The AI council itself was already useful. It produced strong reasoning and exposed assumptions I would probably have missed. But I was still the glue around it. The council improved the decisions. The system around it made those decisions easier to carry into implementation, audit, and correction without losing control. Conversations Were No Longer the Workflow The main change was simple to describe: I stopped treating the workflow as a series of conversations. Chats are good for thinking. They are not a good place to keep authority. Before this change, a decision might exist somewhere in a long discussion. The next agent had to interpret it, and I had to remember whether it was final, provisional, or already replaced. Now the state of the work lives in a small set of artifacts. Evidence becomes a source-grounded brief. Decisions become an approved specification. The specification becomes bounded implementation. The implementatio

2026-07-11 原文 →
AI 资讯

The Shell You Know vs The Shell You Deserve

Hello, I'm Maneshwar. I'm building git-lrc, a Micro AI code reviewer that runs on every commit. It is free and source-available on Github. Star git-lrc to help devs discover the project. Do give it a try and share your feedback. You've been using the terminal for months/ years. Maybe you cd into a folder, ls around, run your script, and call it a day. That's fine. That's like knowing how to boil water and calling yourself a chef. But the terminal has layers . It's basically an onion that occasionally makes you cry, usually around 12 AM when a script fails silently and you have no idea why. So grab your coffee and let's talk about the command line tricks that actually make your life better. Not the "did you know ls -la shows hidden files" tier tips. Your Terminal Has A Memory. Use It. Most devs mash the up arrow like it's 2007 and they're trying to beat a Flash game. Stop that. Press ctrl-r instead. It searches your command history live. Type a few letters, it finds the last matching command. Press ctrl-r again to cycle back further. Found it? Hit Enter to run it, or the right arrow to drop it into your prompt so you can edit it first. ctrl-r ( reverse-i-search ) ` docker run ` : docker run -it --rm -v $( pwd ) :/app node:20 bash Pair this with ctrl-w (delete last word) and ctrl-u (nuke the line back to the cursor) and you'll start editing commands like you're speedrunning a text adventure. And if you're the type who types a whole essay of a command and then realizes you forgot something at the start, ctrl-a jumps to the beginning of the line and ctrl-e jumps to the end. No more holding the left arrow key like it owes you money. Pro tip: if you're a TUI fan and ctrl-r's default search feels a bit flat, check out McFly xargs Is The Friend Who Actually Shows Up Pipes ( | ) are great. They pass output from one command into another. But sometimes you don't want to pass output as input , you want to pass it as arguments . That's where xargs comes in, and once you get it,

2026-07-11 原文 →
AI 资讯

Why Error Messages Matter More in the Age of AI

Everyone talks about AI writing code. Nobody talks about AI debugging code. Bad error messages are the worst, we've all seen them. You open the logs or run your program and see something like this... Error: something went wrong It leaves you asking: What happened? Where did it happen? Why did it happen? How do I fix it? You might have written some of these pretty silly error messages, I know I have. They don't help us fix software quickly because we first have to figure out why the error happened. Rust has been shipping fantastic error messages for years. Take this example where I accidentally call println instead of println! . $ cargo run 101 ↵ Compiling ducksay v0.2.0 (~/oss/ducksay) error[E0423]: expected function, found macro `print` --> src/main.rs:51:3 | 51 | print("{}", render_with_style(&message, cli.width.get(), style)); | ^^^^^ not a function | help: use `!` to invoke the macro | 51 | print!("{}", render_with_style(&message, cli.width.get(), style)); | It's fantastic! It tells you what went wrong, where it occurred, and how to fix it. When you're building software, you should make your error messages exceptional (punny 😂). Here's another example from Vite+ where I had a syntax error in the config file. $ vp dev failed to load config from ~/oss/test-ssr-on-aws/vite.config.ts error when starting dev server: Error: Build failed with 1 error: [PARSE_ERROR] Error: Unexpected token ╭─[ vite.config.ts:5:3 ] │ 5 │ , │ ┬ │ ╰── ───╯ Now imagine debugging code with generic error messages that tell you absolutely nothing helpful. You'll have to manually trace through the code to figure out what the heck is going on. AI agents run into the same problem. If the error tells them almost nothing, they have to spend extra time reading files, tracing execution paths, and making additional tool calls just to understand what failed. So what can we do to help humans and AI? Here are some of my top recommendations for writing good error messages. 1. Be descriptive and specific W

2026-07-10 原文 →
AI 资讯

Every AI provider fails in its own way. I stopped checking status codes and built an error model instead.

I built an API gateway that routes between OpenAI, Anthropic and Gemini. I figured integrating both providers would be the hard part. It wasn't. Calling their APIs is maybe an afternoon of work each. The hard part showed up later, the first time something went wrong. The moment it broke Early on, my error handling was basically: catch whatever the provider throws, forward the status code, move on. } catch ( error ) { res . status ( error . status || 500 ). json ({ error : error . message }) } This worked fine until I actually looked at what each provider sends back when something goes wrong. OpenAI wraps its errors in an object with a type and sometimes a code . Anthropic wraps its errors differently, with its own type field that means something else entirely. A 429 from one provider might mean "you're sending too fast, back off." A 429 from another context might mean something closer to "we're out of capacity right now, this isn't really about your rate at all." If you're just forwarding error.status and error.message straight through, none of that nuance survives. Your own error handling ends up being provider-specific whether you meant it to be or not, because the shape of the failure is different depending on who you called. What I built instead Instead of trusting each provider's raw error shape, every call now normalizes into the same internal error model before it reaches the response: } catch ( error ) { const classified = classifyProviderError ( error ) res . status ( classified . httpStatus ). json ({ error : ' AI provider error. Please try again. ' , error_class : classified . error_class , provider : classified . provider }) } error_class is one of a small fixed set: rate_limited , overloaded , quota_exceeded , invalid_request , authentication_error , server_error . That's true regardless of which provider actually failed. The raw provider error still gets logged for me to debug, but what the caller sees is the category of failure, not the provider's spe

2026-07-10 原文 →
开发者

Two Sum and the use of Dictionary (Easy) | LeetCode Practice #1

Two Sum Given an array of integers nums and an integer target , return indices of the two numbers such that they add up to target . (You may assume that each input would have exactly one solution, and you may not use the same element twice. You can return the answer in any order.) Python ####Double FOR Loops (Runtime: 2100ms, Memory: 13.3MB) #DECLARE nums: ARRAY of INTEGER #DECLARE target: INTEGER class Solution : def twoSum ( self , nums , target ): Length = len ( nums ) for i in range ( Length - 1 ): for j in range (( i + 1 ), Length ): if nums [ i ] + nums [ j ] == target : return i , j return None ####Hashing Algorithm (Runtime: 0ms, Memory: 12.9MB) #DECLARE nums: ARRAY of INTEGER #DECLARE target: INTEGER class Solution : def twoSum ( self , nums , target ): Seen = {} for i , Value in enumerate ( nums ): if ( target - Value ) in Seen : return Seen [ target - Value ], i Seen [ Value ] = i return None

2026-07-10 原文 →
AI 资讯

RxJS in Angular — Chapter 9 | Timing Operators — debounceTime, throttleTime, interval & More

👋 Welcome to Chapter 9! Imagine a user typing in a search box. They type "i", "ip", "iph", "ipho", "iphon", "iphone" — 6 keystrokes in 2 seconds. Do you really want to make 6 API calls ? Of course not! You want to wait until they stop typing and then search once. That's what timing operators solve. They control when and how often values flow through your stream. ⏱️ debounceTime() — Wait for the Silence debounceTime(ms) waits until there's a pause of ms milliseconds, THEN lets the latest value through. Think of it like this: "Ignore everything until they stop for a moment." Like a person who waits for you to finish talking before responding. import { debounceTime } from ' rxjs/operators ' ; // User types fast: 'i' → 'ip' → 'iph' → 'ipho' → 'iphon' → 'iphone' // debounceTime(400) waits 400ms of silence, then sends 'iphone' only searchControl . valueChanges . pipe ( debounceTime ( 400 )) . subscribe ( term => { this . searchProducts ( term ); // Only called ONCE with 'iphone'! }); Timeline: Type 'i' → [400ms timer starts] Type 'ip' → [reset timer] Type 'iph' → [reset timer] Type 'iphone'→ [reset timer] ... 400ms silence ... EMIT: 'iphone' ✅ Real Angular Example — Smart Search Box import { Component , OnInit , OnDestroy } from ' @angular/core ' ; import { FormControl } from ' @angular/forms ' ; import { Observable , Subject } from ' rxjs ' ; import { debounceTime , distinctUntilChanged , switchMap , startWith , takeUntil } from ' rxjs/operators ' ; @ Component ({ selector : ' app-search-box ' , template : ` <div class="search-wrapper"> <input [formControl]="searchControl" placeholder="Search products..." (keyup.escape)="clearSearch()"> <span *ngIf="isLoading" class="spinner">🔄</span> <button *ngIf="searchControl.value" (click)="clearSearch()">✕</button> </div> <div class="results-count" *ngIf="(results$ | async) as results"> Found {{ results.length }} results </div> <div class="results"> <div *ngFor="let item of results$ | async" class="result-item"> <strong>{{ item.nam

2026-07-10 原文 →
AI 资讯

GLM 5.2 and the Collapse of AI Margins: Open-Source Models Are Rewriting the Rules of the Industry

GLM 5.2 and the Collapse of AI Margins: Open-Source Models Are Rewriting the Rules of the Industry Introduction: A "Counterintuitive" Open-Source Release Figure 1: The core drivers of the AI margin collapse — open-source models, price competition, and surging usage In 2026, Zhipu AI quietly published the GLM 5.2 open-source model on Hugging Face. This news lingered in AI practitioners' information streams for less than half a day before being drowned out by the next wave of updates. But those who were truly sharp noticed a set of data: GLM 5.2's performance across multiple authoritative benchmarks was nearly on par with top-tier closed-source models like GPT-4o and Claude 3.5 Sonnet — yet its inference cost was only a fraction of theirs. This is no longer a story of "catching up." This is leapfrogging . Even more telling is that this news triggered a fierce debate in the overseas tech community: opinion leaders including a16z partners and former Stripe executives waded in, discussing a somewhat brutal topic — "AI margins are collapsing." This discussion quickly spread from tech circles to investment circles, because it points directly at a core question: When open-source models' capabilities approach or even partially surpass those of closed-source models, how long can the existing AI business model hold up? If 2023's open-source models were still "toys" — with cliff-like gaps from closed-source products in complex reasoning, code generation, and multi-turn dialogue — then the 2024-2025 open-source models are no longer "value-for-money alternatives," but a fundamentally new paradigm threat. The release of GLM 5.2 is merely the latest signal flare of this paradigm shift. In this article, we'll unpack three things: what GLM 5.2 got right, how open-source models have rewritten AI pricing power, and the true industry realignment behind this "margin collapse." Technical Core: The Architecture Secrets of GLM 5.2 Figure 2: Schematic of GLM-5.2's MoE (Mixture of Experts) la

2026-07-10 原文 →
AI 资讯

I Did the Math on GPT-5.6. The $2.50 Terra Tier Is the One I'd Ship First.

GPT-5.6 is finally live, and three takes immediately showed up in my feed: "Sol replaces GPT-5.5 everywhere." "The API still isn't broadly available." "The 1.05M context window means you can stop thinking about prompt size." Two are wrong. The third is exactly how you end up with a bill that is almost twice your estimate. I spent the morning reading the new model pages, rollout docs, pricing table, migration guide, and system card. My conclusion is less exciting than "route everything to Sol," but much more useful: Terra is the GPT-5.6 tier I'd test first for most production workloads. TL;DR No, GPT-5.6 Sol should not replace every GPT-5.5 request. It has the same $5/$30 standard token price and different agent behavior. Yes, the API is live. Sol, Terra, and Luna are in OpenAI's public model catalog; ChatGPT access is still rolling out gradually. Terra is the practical default: $2.50 input and $15 output per million tokens, exactly half Sol's price. Luna is the volume tier: $1 input and $6 output, with the same 1.05M context window. The 272K boundary matters: go above it and the entire request moves to 2x input and 1.5x output pricing. The uncomfortable part: OpenAI says GPT-5.6 is more likely than GPT-5.5 to take actions beyond user intent in agentic coding. What actually shipped This isn't one model with three marketing labels. It is a three-tier family with explicit model IDs. Tier Model ID Input / 1M Output / 1M My default use Sol gpt-5.6-sol $5.00 $30.00 Hard coding and deep analysis Terra gpt-5.6-terra $2.50 $15.00 General production Luna gpt-5.6-luna $1.00 $6.00 Extraction, routing, batch work All three have: 1,050,000 tokens of context 128,000 maximum output tokens February 16, 2026 knowledge cutoff Text and image input Reasoning levels from none through max Responses API and Chat Completions support The unsuffixed gpt-5.6 alias points to Sol. I wouldn't use that alias in a cost-sensitive production service. An explicit model tier makes billing behavior easi

2026-07-10 原文 →
AI 资讯

Staff Augmentation vs. Dedicated Teams in 2026: What Actually Changed

TL;DR: In 2026, the old "cheaper hourly rate vs. more control" framing is outdated. AI-assisted delivery is compressing team size, contracts are shifting from hourly to outcome-based, and onboarding windows have shrunk from months to days. Use staff augmentation when you have strong internal PM capacity and need specific skills for 3-6 months. Use a dedicated team when you're running a 2+ year product and need a self-contained unit with its own PM/QA. Below is a breakdown of the current landscape, including how providers like Toptal-style networks, 6senseHQ , Cleveroad , ScienceSoft , BairesDev , SolveIt , and Uptech fit into each model. Why this decision looks different in 2026 than it did in 2023 Three things changed the calculus this year: AI-assisted engineers ship more per head. Teams are increasingly built around a handful of seniors paired with AI coding assistants rather than a dozen mid-level developers billed by the hour — which makes the traditional "cost per hour" comparison less meaningful than "cost per shipped outcome." Contracts are moving from time-and-materials to outcome-based. Buyers are pushing vendors to tie payment to delivery milestones, not logged hours, partly because AI tooling makes hour-counting a weaker proxy for value. Onboarding windows collapsed. Several dedicated-team providers now quote 3-7 day ramp-up instead of the 2-4 week window that was standard a few years ago, which narrows the traditional "augmentation is faster to start" advantage. None of this changes the fundamental difference between the two models. It changes how much each one costs you in practice. The core difference, restated simply Staff augmentation : you hire individual engineers who join your team, use your tools, and report to your leads. You manage the work. Dedicated team : you hire a self-contained unit (engineers + QA + a PM/lead) that runs its own delivery process. You manage the roadmap, they manage the mechanics. The break-even point most guides converge

2026-07-10 原文 →