今日精选
HOT最新资讯
共 27296 篇Persistent State Machines: LLM Attention with INT4 In-Memory Cells
Article URL: https://zenodo.org/records/21753002 Comments URL: https://news.ycombinator.com/item?id=49140080 Points: 8 # Comments: 2
How Is ""2" > "10"" "true" in JavaScript?
What is output of ""2">"10"" true or false At first glance, this looks completely wrong. We all know that: 2 > 10 is obviously: false Because 2 is smaller than 10. But what happens when we add quotation marks? "2" > "10" The result is: true 😱 Wait… how can 2 be greater than 10? The answer is simple: ""2"" and ""10"" are not numbers. They are strings. 🔢 Numbers vs. Strings In JavaScript, these two values are different: 2 This is a number. While: "2" This is a string. The quotation marks tell JavaScript that the value should be treated as text. So: 2 > 10 compares two numbers: 2 > 10 → false But: "2" > "10" compares two strings. And that's where things get interesting! 🔤 How Does JavaScript Compare Strings? When JavaScript compares two strings, it uses lexicographical comparison. You can think of this as comparing text in a dictionary-like order, based on the character values. Let's compare: "2" "10" JavaScript looks at the first character of each string: "2" → first character is 2 "10" → first character is 1 Since the character ""2"" comes after ""1"" in the ordering used for the comparison, JavaScript determines: "2" > "10" as: true So: console.log("2" > "10"); outputs: true 🧪 Let's Compare Both Cases Case 1: Numbers console.log(2 > 10); Output: false Because JavaScript compares the actual numerical values: 2 is less than 10 Case 2: Strings console.log("2" > "10"); Output: true Because JavaScript performs a string comparison. The important thing is: 2 → Number "2" → String The quotation marks can completely change how JavaScript interprets the value. ⚠️ What About Mixed Types? Now look at this: console.log("2" > 10); Here, one value is a string and the other is a number. JavaScript handles this differently. In this case, it converts the string ""2"" into a number for the comparison. So the comparison effectively becomes: 2 > 10 The result is: false This is why understanding data types is extremely important when programming. 💡 The Big Lesson These three comparisons
Gotcha: chasing a bug that was never in my code
This is a submission for DEV's Summer Bug Smash: Smash Stories powered by Sentry . The build was done. Themis Lex worked on my machine, and not in the "works if you squint" way. A court clerk enters their role, describes their workflow, picks a data sensitivity level, and gets back a PDF with two sections: where AI can safely support the work, and where it must never touch it. Claude via Bedrock generates the assessment. Server-side PDF render. No accounts, no storage, session ends when the download does. Three weeks solo, for the Women in AI Accelerator Spring 2026 Build Challenge. Initial commit went in at 7:06pm on May 9. I pushed to AWS Amplify . Build went green. I opened the live site, filled out the form, hit submit. Nothing. Twenty eight seconds later, "Request timed out." I told myself the bug was not in my code. Everything ran locally. This had to be a platform problem. That belief carried me all night. It mostly held up. The exception was the first thing I should have checked. Here is the commit log, because it tells the story better than I can: 19:06 Initial commit: Themis Lex MVP 20:31 refactor: migrate Bedrock auth to IAM compute role 22:29 diag: log credential env vars at runtime (booleans only, remove after fix) 22:40 fix: forward BEDROCK_MODEL_ID to SSR runtime via next.config.js env 22:50 fix: switch to InvokeModelWithResponseStreamCommand to beat 28s Lambda timeout ... 06:28 fix: remove unused type export that broke isolatedModules build 06:37 fix: end-to-end response streaming to beat Amplify 28s gateway timeout 06:48 fix: reduce max_tokens to 3000 to fit Amplify 30s timeout 06:52 fix: reduce max_tokens to 2000, 3000 still exceeded 30s timeout 07:00 fix: switch to Claude Haiku 4.5 to fit Amplify 30s timeout Ten and a half hours from first deploy to the fix that shipped it. That gap between 22:50 and 06:28 is me sleeping on it, which turned out to be the second most productive thing I did. The error message was the absence of an error message My f
I benchmarked which of 18 AI models writes the least like "AI slop"
If you write with AI you already know the tells: the throat-clearing opener, the tidy rule of three, "it's not just X, it's Y." But I was curious to see statistically what models actually produced the most slop, so I made my own opensource benchmark: theslopindex.com Here's how I came up with the benchmark. 1) The Baseline: Slop can only be measured compared to stuff that already existed. So I got corpus of data for various areas of writing (email, social, chat, and essays) so that each has a human baseline. 2) Tasks I then hand-wrote 112 written scenarios for the models to egenerate outputs to across email, Slack, social media posts, and essays (a cold email, a schedule change, a launch tweet, an argumentative essay, etc). Every model gets the identical scenarios at default settings, several samples each: and you can see all the exact outputs in my Github repo. 3) Axes Now for how to decide to measure slop we settled with 5 dimensions. - Conciseness (one of the most annoying parts of AI writing is how it takes 6 paragraphs to say 2 sentences) - Templating (AI often reuses the same sentences/styles across unrelated scenarios) - Rhythm (Variance in sentence/paragaphs, humans often switch this up while models stay p similar) - Tells (Over used vocab and construction for stuff like "delve", "it's not just X, it's Y") - Human Preference (I think this is most important as everything else are just heuristics for this) Note how we DELIBERATIVELY don't have any LLM judging, I think it'd be pretty stupid to have LLMs judge LLMs Now for the results What really surprised me is how human preference influenced the rankings heavily. When looking at only the "mechanical" part. Fable is actually #2 on the benchmark, but when I included human preference it drops to last . And I think this is indicative that as the models more recently have become more benchmark optimized, they've actually produced more slop than less. Which is where good prompting, harness, and more matter. But eith
Stop Leaking PII! Local Data Masking with Transformers.js and WASM
In an era where data privacy is no longer a "nice-to-have" but a legal mandate (looking at you, GDPR and HIPAA), sending raw user data to the cloud is like playing with fire. If you are building health-tech or fintech apps, the risk of exposing Personally Identifiable Information (PII) is a constant headache. But what if the data never leaves the user's browser in its raw form? Enter Edge AI and Privacy-preserving AI . By leveraging Transformers.js and WebAssembly (WASM) , we can perform complex Named Entity Recognition (NER) to de-identify sensitive information directly on the client side. In this tutorial, we’ll build a "Privacy Shield" that detects and masks names, locations, and health identifiers before they ever hit your API. The Architecture: Privacy First 🏗️ The traditional approach involves sending raw text to a server-side LLM or NLP service. Our approach intercepts the data at the "Edge" (the browser). graph TD A[User Inputs Sensitive Health Data] --> B{Browser-side Privacy Shield} B --> C[Transformers.js / WASM] C --> D[NER Model Analysis] D --> E[Data Masking / Redaction] E --> F[Clean Data] F --> G[Cloud Storage / Analytics] G -.-> H[Compliance & Security ✅] style B fill:#f9f,stroke:#333,stroke-width:2px style C fill:#bbf,stroke:#333,stroke-width:2px By using WebAssembly , we get near-native performance for running BERT-based models in the browser, ensuring the UI remains snappy while keeping the data 100% local. Prerequisites 🛠️ To follow along, you'll need: Tech Stack : TypeScript, Vite, and Transformers.js . Basic understanding of NER (Named Entity Recognition) . A passion for not getting sued for data leaks. 🥑 Step 1: Setting up the Privacy Pipeline First, let's install the library: npm install @xenova/transformers Now, let's create our PrivacyShield service. We will use a lightweight NER model (like Xenova/bert-base-NER ) that has been optimized for the web. // src/services/privacyShield.ts import { pipeline , env } from ' @xenova/transformers ' ;
The Open-Weight Inflection Point: Kimi K3, Claude Opus 5, and Microsoft MAI Signal a Market Shift
The Open-Weight Inflection Point: Kimi K3, Claude Opus 5, and Microsoft MAI Signal a Market Shift Subtitle: Three major releases in one day point to the same conclusion — the AI industry is shifting from "who can build the strongest model" to "who can build the most cost-effective one." July 28, 2026, might be remembered as the day the AI industry's center of gravity shifted. Three announcements — from Moonshot AI, Anthropic, and Microsoft — each independently signaled the same underlying trend: open and cost-efficient models are becoming the new competitive baseline. Here's what happened and why it matters. 1. Kimi K3 Goes Open-Weight: First 3T-Class Open Model Moonshot AI publicly released Kimi K3's full model weights on HuggingFace — a 2.8-trillion-parameter Mixture-of-Experts model with 104B activated parameters. This is the first 3T-class model ever made openly available to the public. Key technical highlights: Architecture: Kimi Delta Attention (KDA) + Attention Residuals (AttnRes), 896 experts with 16 activated per token Native Multimodality: Text, images, and video understanding via MoonViT-V2 vision encoder Context Window: 1,048,576 tokens (~1M tokens) Benchmarks: Terminal-Bench 2.1: 88.3, BrowseComp: 91.2, MCPMark-Verified: 94.5 — competitive with Claude Fable 5 and GPT-5.6 Sol Why it matters: Kimi K3 raises the "open-source model ceiling" to an unprecedented level. For the first time, a model that competes with top-tier closed-source models is available with fully public weights — giving startups, researchers, and enterprises a genuine alternative to API-dependent workflows. For developers, this is the practical part: you can now self-host a model that holds its own against frontier closed models. That changes cost models, data-privacy decisions, and vendor lock-in math overnight. 2. Claude Opus 5: Anthropic's "Daily Driver" Strategy Anthropic launched Claude Opus 5 — a mid-premium model positioned as the "daily driver" for 90% of knowledge work. The key
136 raw removals, 17 real ones: what a spec diff over-reports
Originally published at mendapi.com . Between two published snapshots of the Cloudflare OpenAPI schema — 7abe88500e55 (2026-03-31) → c92b9b0fde23 (2026-07-27) — a raw structural diff produced 6,354 change records. 136 of them were endpoint path removals, the scariest kind a diff can report: the route your code calls is simply gone from the spec. Except 119 of those 136 were not gone at all. This is the accounting of how we know, per record, with machine evidence. The trap in a raw diff A path removal in a spec diff means one thing: the string key disappeared from the paths object. It does not mean the runtime URL stopped working. Specs get refactored — concrete routes collapse into templated ones, path parameters get renamed, methods get merged — and every one of those refactors shows up as a "removal" if you only look at one side of the diff. An alerting tool that pages you 136 times for this corridor is training you to ignore it. The whole job of the curation layer is to keep that from happening without silently dropping a real break. The ledger: 17 + 119 = 136 Every one of the 136 raw removals has an adjudicated destination. 17 were kept as genuinely client-breaking: the runtime URL or method really disappeared, with no surviving successor. The other 119 were excluded, each with machine evidence from the two spec snapshots that the surface actually survives: Template consolidation — 107 records. Concrete Workers AI model routes like /ai/run/@cf/baai/bge-m3 collapsed into the pre-existing generic /ai/run/{model_name} route. The runtime URL a client sends never changed; the spec just stopped enumerating each model. The evidence rule requires the templated route to exist in both snapshots and to swallow the removed path with a literal-anchored match, so a template that is merely a shape prefix of a genuinely removed endpoint does not count. Parameter rename, runtime-identical — 11 records. Path parameters renamed ( {postfix_id} to {investigate_id} and friends). Afte