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

今日精选

HOT

最新资讯

共 33962 篇
第 1379/1699 页
AI 资讯 Dev.to

Cx Dev Log — 2026-05-25

The interpreter's variable lookup is now blazing through arithmetic loops at a 57% faster pace. But this isn't just about raw speed — four tracker items were checked off the list, culminating in a more robust system. All rolled out on submain, a direct result of a thorough four-pillar audit. BindingId replaces string hashing at runtime The heavyweight change came from tracker #009. Previously, our interpreter was busy hashing variable names every time they were accessed. That was a repeat offender in wasted cycles. Now, by using a pre-assigned numeric BindingId, we seize efficiency. The semantic phase was already handing out these IDs, but the runtime kept adding the overhead back. It doesn’t anymore. ScopeFrame.vars has transitioned to a HashMap equipped with a zero-cost identity hasher keyed by u32 binding IDs. Name-based lookups are still around but tucked away for less frequent operations like string interpolation. Fixes were necessary upstream: ConstDecl and semantic_impls now hold onto their BindingId, making sure our semantic phase pipelines gracefully into the interpreter's primary key system — narrowing the gap with JIT's variable handling. Here's how the numbers shine on a Windows release build: arith_loop (5M iterations): from 5744ms down to 2481ms (56.8% boost) nested_loops (4M iterations): from 2675ms down to 1796ms (32.8% boost) fib_recursive: from 6835ms down to 6488ms (merely 5.1% faster due to call-frame constraints) Our findings align with expectations: recursive functions aren't bogged down by variable lookups as much as by setting up call frames. Array bounds errors stop lying Misleading diagnostic labels are on their way out, thanks to tracker #002 and #032. Attempts to access out-of-bounds array indices once triggered an error as unhelpful as variable 'index 5' has not been declared . Not anymore. Changes came in two waves. First, we introduced a new error variant: RuntimeError::IndexOutOfBounds { pos, index, length } . Then, three runtime.rs c

COMMENTERTHE9 2026-06-09 08:09 11 原文
AI 资讯 Dev.to

5 Claude API Errors That Cost Me Money (And How I Trapped Them)

Retry storms turned 1 timeout into 340 duplicate calls billed in 90 seconds Infinite tool loop ran 1,200 iterations before I noticed at 2am Partial stream cleanup stopped half-written DB writes corrupting records Trap every error class with a circuit breaker and a hard iteration cap Five Claude API errors quietly drained my account before I built guards around them. None of them threw a loud crash. They just kept billing while I slept. Here is exactly what broke, what it cost, and the traps I now run on every project. The Retry Storm That Billed 340 Times in 90 Seconds The most expensive mistake I made was naive retry logic. A single request timed out. My code caught the timeout and retried. The retry also timed out, so it retried again. Within 90 seconds I had fired 340 requests for one piece of work. The problem was that the Claude API had actually received and processed several of those requests. The timeout happened on my side waiting for the response, not on Anthropic's side. So I was paying for completed work I never saw, then paying again for the retry. My first version of the retry looked harmless. A while loop, a counter set to 5, a sleep of one second between attempts. The flaw was that the sleep was constant and the counter reset on every new job. Under load, jobs stacked, and each one spawned its own retry chain. That is how 1 timeout became 340 calls. The fix was exponential backoff with a hard ceiling and a request ID. I now generate a unique idempotency-style key per logical job and refuse to issue a second call for the same key until the first fully resolves or hard-fails. Backoff starts at 2 seconds and doubles up to 32 seconds, then gives up after 5 total attempts. attempt = 0 delay = 2 while attempt < 5 : try : return call_claude ( job_key ) except Timeout : attempt += 1 sleep ( delay + random_jitter ()) delay = min ( delay * 2 , 32 ) raise GiveUp ( job_key ) The jitter matters more than it looks. Without it, ten failed jobs all retry at the exact

RAXXO Studios 2026-06-09 08:07 10 原文
AI 资讯 Dev.to

Hashing in Distributed Systems: A Complete Guide to Algorithms, Best Practices, and Real-World Applications

Have you ever wondered how Discord keeps your channel messages available even when a server goes down? Or how Amazon DynamoDB serves petabytes of data with single-digit millisecond latency? The unsung hero powering almost all these distributed systems is hashing — a simple but powerful technique that makes even load distribution, fast lookups, and seamless scaling possible. As more applications move to distributed cloud architectures, understanding hashing for distributed systems is no longer optional for developers. Choosing the wrong hashing algorithm can lead to cascading failures, cache stampedes, and expensive downtime. This guide breaks down every core hashing technique, real-world use cases, best practices, and common pitfalls to avoid in 2026. Table of Contents What is Hashing in Distributed Systems? Core Hashing Algorithms Explained Traditional Modulo Hashing Consistent Hashing Virtual Nodes (VNodes) Rendezvous Hashing (HRW) Jump Consistent Hash Maglev Hashing Multi-Probe Consistent Hashing Consistent Hashing with Bounded Loads Real-World Applications of Distributed Hashing Head-to-Head Algorithm Comparison Best Practices for Distributed Hashing Common Pitfalls to Avoid Conclusion References What is Hashing in Distributed Systems? Hashing in distributed systems is the practice of mapping data keys (e.g., user IDs, object keys, channel IDs) to server nodes using a deterministic hash function. The core goals are: Distribute load evenly across all nodes to avoid hotspots Enable fast lookups (O(1) or O(log N)) without a central coordinator Minimize data movement when nodes are added or removed during scaling Support fault tolerance by simplifying replication across nodes The simplest implementation is modulo-based hashing , where node_id = hash(key) % N and N is the total number of nodes. While trivial to implement, it suffers from a fatal flaw: the rehashing problem. When N changes (a node is added or removed), nearly all keys are remapped to new nodes, causin

Andrew 2026-06-09 08:07 13 原文
AI 资讯 Dev.to

Building Your "Longevity Knowledge Graph": Stop Ignoring 10 Years of Health Reports with GraphRAG and Neo4j

We’ve all been there: every year, you get a physical, receive a thick PDF full of blood markers, glance at the "normal range" checkmarks, and toss it into a digital folder titled "Health Stuff" to be forgotten. But what if I told you that those isolated data points are actually a time-series story of your biological aging? In this tutorial, we are going to build a Longevity Knowledge Graph . We will leverage GraphRAG (Graph-based Retrieval-Augmented Generation) , Neo4j , and Unstructured.io to transform a decade of messy medical PDFs into a structured intelligence layer. By the end of this post, you'll be able to query your health history with context that standard vector search simply can't grasp—like "How has my fasting glucose trended relative to my BMI over the last five years?" If you're interested in advanced data engineering patterns or looking for more production-ready AI health architectures, I highly recommend checking out the deep dives over at WellAlly Blog , which served as a major inspiration for this build. Why GraphRAG? (The Problem with Vector Search) Standard RAG (Retrieval-Augmented Generation) is great at finding a specific needle in a haystack. But if you ask, "What is the relationship between my Vitamin D levels and my bone density over time?", a vector database might just pull three separate paragraphs. GraphRAG allows us to: Connect Entities : Link a Blood_Metric (e.g., LDL) to a specific Time_Point . Traverse Relationships : Follow the path from User -> Report -> Marker -> Trend . Global Reasoning : Summarize high-level health trajectories across multiple years of data. The Architecture 🏗️ Here is how the data flows from a messy PDF to a queryable graph: graph TD A[Medical PDF Reports] -->|Unstructured.io| B(Clean JSON/Elements) B -->|Entity Extraction| C{LLM Processing} C -->|Nodes & Edges| D[Neo4j Graph Database] D -->|GraphRAG Query| E[Longevity Insights] F[User Query: 'Is my HbA1c rising?'] --> E subgraph Storage D end Prerequisites To f

Beck_Moulton 2026-06-09 08:05 10 原文
AI 资讯 The Verge AI

Instagram is finally letting everyone reorganize their profile grid

Nearly a year after it was announced, Instagram says it's delivering the ability to rearrange the posts in your profile grid. It had been available to some people in test groups, but as of June 8th, it's rolling out widely via the Android and iPhone mobile apps. Until now, the posts on your Instagram profile […]

Richard Lawler 2026-06-09 07:58 13 原文
AI 资讯 The Verge AI

Apple’s Screen Time updates are too little, too late

Apple spending a big chunk of its WWDC keynote on parental controls was surprising for several reasons. But the biggest is that, despite all the airtime, it didn't announce much new beyond a redesigned interface. Almost all the features touted already exist or are upgrades to current options. Why Apple chose to do this isn't […]

Jennifer Pattison Tuohy 2026-06-09 07:41 11 原文
AI 资讯 Reddit r/artificial

What AI tool do you trust for what task?

I’ve been trying different AI tools lately, and I’m starting to notice that each one has its own strengths and weaknesses. Some feel better for writing. Some are better for research. Some are stronger for coding, image generation, brainstorming, or organizing messy ideas. For people who use AI regularly, what tool do you trust most for specific tasks, and which ones do you avoid for certain work? submitted by /u/GlobalOpsNotes [link] [留言]

/u/GlobalOpsNotes 2026-06-09 07:32 5 原文
AI 资讯 The Verge AI

5 things I already love from the iOS 27 beta

iOS 27 has only been out for a few hours, and I've been messing around with the developer beta on my iPhone 16 Pro. I was most interested in trying out the new Siri AI, but unfortunately, I'm still on Apple's waitlist for that. In the meantime, I've been poking around a bunch of features […]

Jay Peters 2026-06-09 07:30 12 原文
AI 资讯 HackerNews

Show HN: Mach – A compiled systems language looking for contributions

Hi HN, I'm the creator of Mach ( https://github.com/octalide/mach or https://machlang.org ). Two days ago, we finally achieved full self hosting. I wanted to make a post here to show off the language since this is a big milestone for us. ## TL;DR about the language for those curious: - There are no external dependencies anywhere in the pipeline. This includes LLVM, libc bindings, or anything of the sort (save for the historical bootstrap compiler, which requires any C compiler and has been phase

octalide 2026-06-09 07:05 5 原文
AI 资讯 HackerNews

Show HN: Ustps (UDP Speedy Transmission Protocol Secure) and USSH

Hi HN, Over the last few days I've been building USTPS (UDP Speedy Transmission Protocol Secure), an experimental encrypted transport protocol built on top of UDP. The primary goal of USTPS is low-latency video streaming. A server can take a video source and expose it through a USTPS endpoint, while Linux and Android (Termux) clients receive the stream and expose it locally to applications such as VLC, mpv, and FFmpeg. Although streaming is the main focus, USTPS is not limited to media delivery.

x1colegal 2026-06-09 07:00 5 原文