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

今日精选

HOT

最新资讯

共 29690 篇
第 263/1485 页
AI 资讯 Dev.to

A Deep Dive into Amazon Bedrock Prompt Caching for Claude 4.6

Have you ever noticed that your GenAI applications are spending massive amounts of time and money re-reading the exact same setup text? Every time a user asks a short question in a chatbot, the Large Language Model (LLM) must re-read your entire 2,000-word corporate playbook, your agent's system rules, and the full chat history from scratch. This phase is called the pre-fill math phase, and it drives up both your cloud bill and your user latency (Time-to-First-Token).With Amazon Bedrock Prompt Caching for Claude 4.6 (both Sonnet 4.6 and Opus 4.6), this problem is completely solved. You can achieve up to a 90% cost reduction on input tokens and an 85% drop in latency by using a clever architectural shortcut. Here is exactly how it works under the hood, how AWS maintains it across API requests, and how to implement it using Python. The Secret Architecture: Model Inference vs. AWS Infrastructure Prompt caching is a beautiful team effort between the AI model hardware and the AWS cloud infrastructure. The Model Level (The Brains): Inside Claude 4.6, text is processed through mathematical matrices called KV (Key-Value) Caches. Instead of re-reading text, the GPUs calculate the meaning of your system instructions once and build a "mathematical profile." When a cache point is triggered, the model freezes this calculated KV state inside the GPU memory. 2.The AWS Bedrock Level (The Manager): Normally, an LLM wipes its memory the millisecond an API call finishes. AWS Bedrock changes this. It takes your static prompt, creates a secure, unique cryptographic hash (fingerprint), and pins that KV memory block alive. When your next API request comes in, AWS Bedrock instantly hashes the new incoming prompt text. If the top section matches a saved fingerprint, Bedrock's router bypasses the standard pre-fill setup and routes your request directly to the GPU holding your frozen mathematical profile. It is exactly like loading a "Save Game" file instead of restarting a video game from Le

Nitheesh gaddam 2026-07-26 20:43 12 原文
开源项目 Dev.to

🛠️ How to Run a Privacy-First, Browser-Based Stream Downloader (FlowPick) — A Hands-On Tutorial

Hey folks 👋 If you've ever wanted to save a video lecture, a livestream replay, or a podcast episode for offline listening, you've probably run into the usual options: sketchy "online video parser" websites that ask you to paste your link into their server, or desktop apps that want you to sign up and upload stuff. Neither feels great when the whole point is your content. I went looking for something better and ended up working with FlowPick — an open-source, privacy-first media downloader that runs entirely in your browser. No uploads, no accounts, no telemetry. Everything (sniffing, downloading, merging, transcoding) happens client-side with FFmpeg compiled to WebAssembly. In this tutorial we'll: Clone and run FlowPick locally Download our first HLS ( .m3u8 ) and DASH ( .mpd ) stream Build and deploy it Poke at the internals so we can customize it If you just want to try it without installing anything, there's a hosted version at https://flowpick.net (more below). The full source is on GitHub: https://github.com/ezwebtools/flowpick . 🔗 Repo: https://github.com/ezwebtools/flowpick · Live tools: https://flowpick.net A 30-second primer: what are HLS and DASH? Before we touch code, two words you'll see everywhere in this space: HLS (HTTP Live Streaming) uses a .m3u8 manifest that lists small .ts (or fMP4) segments. Common for live streams and a lot of video platforms. DASH (Dynamic Adaptive Streaming over HTTP) uses a .mpd manifest; video and audio usually travel as separate .m4s tracks. YouTube and Bilibili lean on this. The key idea: the "video" isn't one file. It's a playlist pointing at dozens (sometimes hundreds) of tiny segments. A downloader's job is to fetch all the segments, decrypt them if needed, and stitch them back into one playable file. That's exactly what FlowPick does — in the browser. What FlowPick is, in one paragraph FlowPick is a Nuxt 4 app that ships in two shapes: A browser extension that sniffs media from the current tab's network requests. An

FlowPick Team 2026-07-26 20:34 8 原文
AI 资讯 Dev.to

We Audited Our Claude Code Setup Against Anthropic's Own Context-Engineering Rules — Here's What We Found

The question that started this We run Claude Code against a fairly large, fairly automated repository — a farming-assistance platform with a Node.js backend, a Flutter app, a React dashboard, an in-progress Spring Boot microservices migration, and a home-grown "repo memory" layer called gps that captures invariants, lessons, and preferences across sessions. Over several months we'd wired up a lot of automation: session-start hooks, prompt-submit hooks, auto-captured preferences, persona plugins, a mandatory agent-dispatch table. It felt sophisticated. It also felt, some days, slow to get going — every session seemed to start with a wall of text before any real work happened. So when Anthropic published "The New Rules of Context Engineering for Claude 5 Generation Models" , we asked the obvious question: are we actually following our own advice, or have we just accumulated automation that looks like good practice? This post is the audit, the root cause we found, and the fix — including a mistake we made mid-fix that's worth telling on ourselves for. What the blog post actually says Stripped of marketing language, the post boils down to five concrete rules: Keep CLAUDE.md lightweight. Describe gotchas and non-obvious patterns, not everything you know about the repo. Organize by relevance, not comprehensiveness. Progressive disclosure. Load context at the right time — skills, references, and detail should be pulled in when needed, not front-loaded into every session regardless of task. Trust the model's judgment. Remove redundant guardrails and standing instructions that the newer models don't need spelled out every time. Rely on automatic memory, not manual dumps. Don't hand-maintain a giant preferences block in a markdown file — let the memory system surface the right thing at the right time. Design tools and interfaces, not prose. Push instructions into tool schemas and parameter design rather than repeating them in the system prompt. None of this is radical. It's t

pponali 2026-07-26 20:32 12 原文
AI 资讯 Dev.to

Don't Wait. Fork It.

Nobody has ever asked you to upstream your dotfiles. For thirty years that was the deal with every tool we touched: if you didn't like it, you changed it, and the change lived with you. Then the tools started writing the code, and the deal quietly ended. This essay is about why the deal is back on the table. Because the thing that used to make forking expensive — the labour — is exactly what agents just made cheap. In This Article The Workbench Instinct Then the Harness Era Arrived Forking Was Always the Escape Hatch Code Got Cheap What I Shipped Into My Fork A Feature Does Not Have to Be Useful Your Desire Is the Limit The Fork Is the Destination Now the Discipline Part Bring Back the Joy The Workbench Instinct Show me a developer who has never touched their config and I'll show you someone who hasn't started yet. Vim users brag about their init.lua the way woodworkers talk about a hand plane they've had for twenty years. Emacs people wrote a whole operating system inside a text editor because they could. VS Code won partly because it shipped an extension API and got out of the way. Dotfiles repos are public artifacts, starred and forked, because the setup is part of the craft. This isn't productivity theatre. Some of it is genuine need, some of it is fixing a specific annoyance that only you have, and a lot of it is just fun. All three are valid. The workbench is where the joy lives — and nobody ever waited for permission to alias a command. Then the Harness Era Arrived Then agentic coding tools showed up and quietly changed the shape of the deal. The best-in-class agent harnesses are increasingly vendor-controlled. Claude Code is a product, not a repo you can clone and rebuild. Google announced it's retiring Gemini CLI in favour of a closed-source successor. And note where the line falls: Codex CLI is Apache-2.0 and sitting right there on GitHub, but the Codex desktop app — the thing most people actually click on — is not. The terminal stayed open. The interface

Abdul Rehman 2026-07-26 20:26 12 原文
AI 资讯 Dev.to

I built 185 free browser tools that never upload your files

Why browser-based? Every other "online tool" site uploads your PDFs and images to their server for processing. That means: Your sensitive documents sit on someone else's machine Processing speed depends on their server load File size limits, watermarks, or forced signups I built everything using client-side processing — Canvas API, pdf-lib, Tesseract.js (WebAssembly), and more. Your files literally never leave your device. What's included PDF Tools (28): Merge, split, compress, convert to Word/Excel, password protect, watermark, page numbers, metadata editor Image Tools (30): Compressor, background remover, crop, resize, DPI changer, EXIF viewer/remover, OCR (image to text), meme generator, QR code generator Developer Tools (42): JSON formatter, JWT decoder, Base64/Base32 encoder, regex tester, cron generator, SQL formatter, CSS/JS/HTML minifier Design Tools (14): CSS gradient, box shadow, border radius generators, color contrast checker (WCAG), Tailwind component builders Calculators (16): EMI, SIP, BMI, compound interest, salary tax, GST/VAT, ROI, fuel cost Plus text tools, unit converters, YouTube tools, utilities, and more. Tech Stack Next.js 15 (static export, deployed on Cloudflare Pages) TypeScript (strict mode) Tailwind CSS (dark mode) pdf-lib, pdfjs-dist (PDF processing) Tesseract.js (OCR — WebAssembly, zero dependency on external APIs) @imgly /background-removal (on-device AI background removal) SEO and Performance Every tool page includes: FAQ + HowTo structured data (visible in Google rich results) BreadcrumbList schema BlogPosting schema for blog articles Keyword-optimized titles and descriptions OG images for social sharing next/image with priority hints for fast LCP Try it toolshubs.app Looking for feedback — especially on the image compressor, PDF merger, and background remover. What tools would you add next?

Apurba Kumar 2026-07-26 20:23 7 原文
开发者 Dev.to

6 design choices that got developers to actually adopt our free public REST API

Publishing an open dataset on GitHub is easy. Getting developers to use it is a different problem. Here is what I learned shipping ReceiptEdit's 2026 US sales tax dataset as a free REST API. 1. No auth. No sign-up. Ever. Every API-key ceremony is a step where trial users bounce. The dataset is public. https://receiptedit.com/api/sales-tax/california — that is the entire contract. 2. Match the data shape to how it will actually be consumed 90% of consumers ask "What's the sales tax for X state?" So the top-level endpoint is /api/sales-tax/:state — one state per response. When someone needs all 50 for analysis, the CSV/JSON files sit next to the API at github.com/receiptedit/us-sales-tax-2026 . 3. CORS on. Cache long. Access-Control-Allow-Origin: * Cache-Control: public, max-age=86400, s-maxage=604800 4. Ship an embed alongside the API <iframe src= "https://receiptedit.com/api/embed/sales-tax/california" width= "380" height= "540" style= "border:0" loading= "lazy" ></iframe> Bloggers on Medium/WordPress cannot install an npm package. They can paste an iframe. 5. License permissively Real MIT. Attribution appreciated, never required. Try it API: https://receiptedit.com/api/sales-tax Source: https://github.com/receiptedit/us-sales-tax-2026 Embed: https://receiptedit.com/api/embed/sales-tax/california Docs: https://receiptedit.com/developers Product: https://receiptedit.com Happy to talk API-design tradeoffs in comments.

Ishwar Sirvi 2026-07-26 20:20 9 原文
AI 资讯 Dev.to

Are AI-Generated Videos Rewriting Our Understanding of Physics?

How synthetic reality may influence human intuition about motion, gravity, and causality AI video generation has reached a point where a model can create scenes that look physically convincing at first glance: A person jumping impossible distances Objects moving without inertia Water flowing upward Animals performing human-like actions Buildings bending like rubber People interacting with impossible environments For decades, humans learned physics by observing the real world. A ball falls. A glass breaks. A person cannot walk through a wall. Heavy objects require more force to move. These observations create what cognitive scientists call intuitive physics : an internal mental model that predicts how objects should behave. But what happens when the majority of visual experiences become synthetic? Could AI-generated videos slowly change how future generations perceive reality? Humans Do Not See Reality Directly A common misconception is that our brain works like a camera: Reality → Eyes → Brain → Understanding The actual process is closer to: Reality ↓ Sensory input ↓ Brain prediction model ↓ Perception The brain is constantly predicting what should happen next. When you see a ball thrown into the air, your brain automatically predicts: trajectory speed gravity collision point acceleration This happens before conscious reasoning. This capability is known as predictive processing . Your brain is not only asking: "What am I seeing?" It is also asking: "Does this match my internal model of how the world works?" The Brain Learns Physics From Experience Young children do not learn physics from equations. They learn by interaction. A baby discovers: Objects continue to exist when hidden Unsupported objects fall Solid objects cannot overlap Larger objects require more effort to move Researchers call these abilities core knowledge systems . Humans appear to have an innate expectation that the physical world follows consistent rules. For example: A child watching a ball roll

Mohammad Rajaei Monfared 2026-07-26 20:20 7 原文
AI 资讯 Dev.to

Building Atomic Cross-Border Settlement on Stellar

Building Atomic Cross-Border Settlement on Stellar: The AnchorFX Story A technical deep-dive into Soroban escrow contracts, FX oracles, and mainnet deployment — from testnet prototype to production. se The Problem Cross-border payments still take 3-5 days and cost 6.5% on average. Correspondent banking chains are slow, opaque, and expensive. The $800B remittance market has no atomic settlement layer. Stellar was purpose-built for this. 5-second finality. Built-in DEX. Path payments at the protocol level. And now, with Soroban smart contracts, programmable settlement. AnchorFX is an open-source protocol that combines these primitives into trustless, atomic FX settlement between regulated financial anchors. Two Soroban contracts — an Escrow Factory and an FX Rate Oracle — communicate via cross-contract calls to lock, rate, and settle funds in a single atomic flow. Architecture Sender → [Escrow Contract] → Receiver │ [Oracle Contract] │ FX Rate Data Contract 1: Escrow Factory (995 lines, 23 tests) The escrow contract is a multi-escrow factory with per-escrow storage. Each escrow goes through a defined lifecycle: Created — Sender locks tokens with a timeout and settlement conditions CounterpartyApproved — Receiver signs off on the terms Settled — Admin releases funds at the locked FX rate Refunded — Sender reclaims after timeout expires Cancelled — Admin cancels (circuit breaker) pub fn create_escrow ( env : Env , sender : Address , receiver : Address , token : Address , amount : i128 , timeout_blocks : u32 , corridor : u32 , ) -> u64 { sender .require_auth (); // Read oracle rate at creation time — locks the rate let oracle_addr = env .storage () .instance () .get ( & ORACLE_KEY ) .unwrap (); let rate : u64 = env .invoke_contract ( & oracle_addr , & symbol_short! ( "get_rate" ), ... ); // Store escrow with locked rate // ... } Key security decisions: Per-escrow storage — O(1) reads, independent TTL per escrow Checks-effects-interactions — state saved before token trans

KOMARI Subheeksh 2026-07-26 20:11 9 原文
开发者 HackerNews

Ask HN: Are you using Rust on embedded devices yet? If not, why?

I started dabbling with ESP32-based MCUs from Waveshare with Rust, and I'm quite impressed with the state of things (esp-rs, embassy, probe-rs etc). Note that I haven't really done embedded in any other languages, so I don't really have anything to compare it with. One thing I did notice was that creating beautiful, interactive user interfaces on MCUs with displays is a little harder, libs like embedded-graphics don't look that great. This made me wonder, are people using Rust in their professio

mempirate 2026-07-26 20:11 6 原文
AI 资讯 Dev.to

PhilBuilder vs voltbuilder

The problem Every time I needed to hand someone a quick installable build — a client, a tester, myself on a different machine — I had to either keep a full local toolchain ready (Android Studio, Flutter SDK, Visual Studio...) or spend 20 minutes reinstalling one just for a single build. So I built PhilBuilder : upload a zipped source project, pick a platform, get back an installable app. No local setup required. 🔗 Try it: https://philbuilder.netlify.app What it does You upload a .zip of your project. The tool: Auto-detects the project type (React, Vue, Flutter, React Native, Kotlin, .NET MAUI, Python, Go, Godot, and 14 others — 22 combinations total) Builds it on remote CI Gives you a download link for an APK, AAB, or Windows .exe No account needed for occasional use (3 builds/day). A free account bumps that to 10/day. How it's built The stack is intentionally simple: Frontend : a single static HTML file, no framework, no build step Backend : a Cloudflare Worker handling auth, rate limiting, and dispatching builds Build execution : GitHub Actions — one big workflow with per-language jobs (Cordova for web frameworks, Capacitor for modern web, native Gradle for Kotlin/Java, dotnet publish for MAUI, flutter build for Flutter, briefcase for Python, gomobile for Go, etc.) Storage : Cloudflare R2 for source zips and build artifacts The auto-detection logic walks the extracted zip looking for telltale files — pubspec.yaml → Flutter, *.csproj → .NET MAUI, capacitor.config.* or a @capacitor/core dependency → Capacitor, build.gradle without package.json → native Kotlin/Java, and so on — with fallbacks down to plain HTML. Some technical details Signing : for Android release builds, it can auto-generate a keystore (and let you download it afterward — losing it means you can never update your app on Play Store again, so this is clearly flagged) or accept an uploaded one. Windows builds : this is the newest addition. Flutter and .NET MAUI need windows-latest runners; Go cross-com

Henock Agbo 2026-07-26 20:09 8 原文
AI 资讯 The Verge AI

The vertical video takeover is here

This is The Stepback, a weekly newsletter breaking down one essential story from the tech world. For more on all things vertical video, follow David Pierce. The Stepback arrives in our subscribers' inboxes on Sunday at 8AM ET. Opt in for The Stepback here. How it started For a while, every social and media platform […]

David Pierce 2026-07-26 20:00 8 原文
AI 资讯 Reddit r/MachineLearning

Open-weight 4B models approach o3-level medical question answering in Swedish [P]

I have been running some experiments with smaller open-weight LLMs on multiple-choice questions of Swedish medical licensing exams. On a dataset called MedQA-SWE, GPT-4 scored 84% accuracy in 2024 and o3 scored 88% in 2025 on a smaller, overlapping dataset. With post-training (SFT) on data from earlier years, I got MedGemma-1.5-4B to a passing score of 60% on the final year’s exam. Find the implementation here: https://github.com/tarolangner/medqaswe_medgemma_sft But even though they were released just three months later, Gemma4-E4B and Qwen3.5-4B are flat out superior already, at 77% with no post-training at all. With reasoning enabled, the latter can get to 87% accuracy. It can even push a bit further if no length cap is put on the reasoning traces, but some of them spiral into repetitive loops about formatting that fill the entire context length without giving any answer. Here, I found it helpful to use an ‘early exit’ thinking intervention proposed in the S-GRPO paper that simply injects a phrase and closes the thinking trace at a predetermined sequence length. I also tried their proposed reinforcement learning method to get shorter reasoning traces, but with only minor gains (probably somewhat underdimensioned training setup). Curiously, Qwen3.5-4B does all reasoning in English despite the Swedish prompt, questions and answer options. But it really seems like the language is no obstacle, even though it’s often estimated to be just 1% of LLM training data. I also have a more detailed write-up on the details and experiments here for anyone interested: https://tensorlabbet.com/2026/07/19/medqaswe_post_training/ submitted by /u/AccomplishedCat4770 [link] [留言]

/u/AccomplishedCat4770 2026-07-26 19:58 4 原文