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

标签:#compute

找到 161 篇相关文章

AI 资讯

A Deep Dive into the Memory Model

A Deep Dive into the Memory Model From Source Code to Machine Instructions A five-part journey through compilers, executables, virtual memory, and the CPU Introduction: What Really Happens When Code Runs Consider a simple C program: include <stdio.h> int value = 10; int add(int a, int b) { return a + b; } int main() { int x = 5; int result = add(x, value); printf("%d", result); return 0; } Most programmers look at this and see only the visible outcome: 5 + 10 = 15 But behind that single printed number lies a much deeper story. Where does the data actually live? Who moves it from one place to another? How does the CPU find the instructions it needs to run? And how does the result finally make its way to the screen? Answering these questions means understanding a concept that many programmers use daily but rarely examine closely: the memory model. What Is a Memory Model, Really? Ask most developers what a "memory model" means, and the answer usually comes back in two words: stack and heap. That answer isn't wrong - it's just incomplete. A memory model is really a description of five things at once: How data is stored How data is accessed How long data exists Who is responsible for managing that lifetime How different parts of a system communicate through memory A program never leaps directly from C source code into RAM. Several distinct layers sit between the two, each one translating the layer below it into something the layer above can reason about. This article walks through all of them, one at a time, and then reassembles the full picture. The Four Layers, at a Glance Layer What It Deals With Typical Concepts 1. Programming Language Human-readable code scope, lifetime, ownership 2. Compiler Translating code to instructions registers, optimization, assembly 3. Operating System Running the program as a process virtual address space, .text/.data/.bss 4. CPU Architecture Executing raw instructions registers, cache, pipeline, ALU The rest of this article follows a sing

2026-08-05 原文 →
AI 资讯

Decoupling Physical Control and Reasoning: DeepMind's Gemini Robotics 2 Architecture

Why Decouple Reasoning from Motor Control General-purpose robots have to pull off two very different jobs at once. They need to read a cluttered, full-room visual scene, hold a multi-minute plan in memory, and converse with a person — and, in the same instant, close a high-frequency control loop that keeps a balancing humanoid upright and moves a delicate hand without dropping whatever it holds. Cramming both jobs into a single end-to-end network forces uncomfortable trade-offs: the large context window you want for reasoning fights the low latency you need for torque control. On July 28, 2026, Google DeepMind pushed directly against that trade-off with Gemini Robotics 2 , followed on July 30 by Gemini Robotics ER 2. Rather than one monolithic network, the suite splits the problem across three specialized models — whole-body vision-language-action (VLA) control, high-level embodied reasoning, and on-device adaptation — each tuned to a different cadence and context size. The same modular thinking is visible across recent robotics and VLA research collected on the arXiv robotics listings and on Hugging Face Papers , where decomposed perception-planning-control stacks have become a recurring pattern. Understanding DeepMind's specific split clarifies why this architecture is gaining traction. The Three-Model Split ER 2: High-Level Task Reasoning Gemini Robotics ER 2 is the cognitive planner of the stack. It is a vision-language model built for embodied reasoning: it ingests the live camera feed and a natural-language instruction, then decomposes a task that may run several minutes into structured sub-goals. Beyond planning, ER 2 manages dialogue with a human supervisor, interprets spatial context, and coordinates multiple robots operating in a shared workspace — deciding which sub-task gets handed to which platform. Operating more slowly than the control layer (roughly a few times per second), ER 2 trades frequency for breadth of context. That separation matters: a reas

2026-08-05 原文 →
AI 资讯

8051: Building a Custom Disassembler

Industrializing the disassembly of an undocumented processor from a raw binary is a complex task that can be broken down into four key steps: Verify that the binary does not belong to a known processor. Verify that the binary is not obfuscated, compressed, or encrypted code for a known processor. Build an undocumented processor generator. Create the analysis pipeline and custom disassembler generation process. For the first phase of this project, the goal is to build dedicated, lightweight disassemblers—since, for bare-metal binaries, tools like Ghidra require manual processor target selection before analysis can begin. 1. Why Build a Custom Disassembler? To determine whether a binary was compiled for a specific architecture, the strategy consists of disassembling the binary (both statically and dynamically) against candidate instruction sets until: One or more bytes fail to match any valid instruction for that architecture, allowing us to rule it out. The disassembly succeeds completely. (Note: a successful disassembly does not guarantee that the binary was originally intended for that CPU; control flow validity must also be verified). Static disassembly is the first line of defense. However, if it fails due to obfuscation, compression, or encryption, we must escalate to dynamic execution and analysis. Only after systematically eliminating all known architectures can we confidently conclude that we are dealing with a custom or undocumented processor . 2. How to Build Your Custom Disassembler Before deploying heavy machinery for undocumented processors, the logical first step was to check against known architectures. Approach 1: Ghidra and SLAgh Ghidra relies on the SLAgh specification language and maintains an extensive library of processor definitions. The original plan was to leverage its API to extract a normalized opcode mapping table. However, after several attempts, Ghidra proved unsuitable for this specific pipeline for two reasons: Operand Type Loss: Detail

2026-08-04 原文 →
AI 资讯

LLM中如果一个问题容易验证 那么AI就容易学会解决!说说这个特性与P与NP问题的关联性

大模型来了,有个说法是如果一个问题容易验证 那么ai就容易学会解决!说说这个特性与p np问题的关联性 这个说法听起来很直观,但其实 混淆了"验证的复杂性"和"学习/求解的复杂性"这两件不同的事 。我们把它拆开看。 先把"容易验证"在 P/NP 里的精确定位理清 在计算复杂度理论中: NP = 给定候选解(证书),能在多项式时间内验证其正确性的问题 P = 能在多项式时间内直接求解的问题 P ≠ NP ? = 是否所有容易验证的问题,也都容易求解? 所以"容易验证"在 CS 里的严格含义是: 验证者在多项式时间内工作 , 不是说 AI 训练成本低 。 "容易验证 ⇒ AI 容易学会"——部分成立,但有重要的限定 这个直觉 在某些场景下确实成立 ,原因是"验证"提供了 稠密的训练信号 : ✅ 成立的情形:验证器可作奖励/过滤 当一个问题具备"易于验证"的结构时,我们可以用它来: 生成训练数据 :比如 SAT 问题,随机生成一个赋值,代入公式验证,正确就得到一对 (公式, 赋值) 训练样本—— 数据无限且免费 RL 中的奖励塑形 :LLM 生成代码 → 编译器/单元测试验证 → immediate reward Self-play / 自我蒸馏 :AlphaGo 等用模拟器验证落子结果 Verifier-Guided Search :用"易于验证"的判据引导 beam search / MCTS,如 AlphaCode、AlphaGeometry 💡 这就是为什么像 代码生成、形式化证明、数学解题 这些领域近期进展飞快——它们都有"相对容易的验证器"(单元测试、类型检查器、证明校验器)。 ❌ 但这个推论远非普遍成立 "容易验证"≠"AI 容易学会",有几个关键原因: 1. 验证器只给二值信号,梯度稀疏 验证器通常只输出 0/1(对/错),而深度学习需要平滑的损失曲面。对于复杂的 NP 问题,绝大多数随机猜测都是错的 → 奖励恒为 0 → 梯度消失,学不到东西 。这就是"稀疏奖励"难题。 2. P ≠ NP 意味着:验证简单 ≠ 求解简单 即使验证是 O(n),找到那个能通过验证的解可能仍需 O(2ⁿ)。AI 模型本质上是在做启发式搜索,面对组合爆炸, 没有 free lunch 。例如: 数独:验证 O(n²),但最难的数独对人类和 AI 都极具挑战 TSP:验证一条回路 O(n),但找最优回路是 NP-Hard 3. 分布偏移与泛化 NP 问题的"容易验证"是** worst-case 复杂度**意义下的。AI 学到的是训练分布的统计规律,遇到分布外的实例会失效。比如 LLM 在数学竞赛题上表现好,但换个数字或换种表述就可能崩。 4. 验证本身也可能不在 NP 里 很多现实问题是 PSPACE 或更难 (如围棋先手胜负),验证一个"策略"需要指数时间——这种问题连"提供证书让 AI 模仿"都很困难。 一张对照表 问题类型 验证复杂度 AI 易学吗? 例子 P 类 多项式 通常容易 (有高效算法可直接教) 排序、最短路径 NP-Complete,且有稠密验证信号 多项式 中等 (RL + 验证器有效) SAT、数独、TSP 近似 NP-Complete,但验证信号稀疏 多项式 困难 (奖励太稀) 某些密码学难题 超出 NP(PSPACE 等) 超多项式 极难 (验证本身就很贵) 围棋先手胜、QSAT 不可判定 不存在 不可能 (理论上限) 程序等价性 真正的关联在哪里 "容易验证 ⇒ AI 容易学会"更准确的说法应该是: 📌 如果一个问题有"多项式时间的验证器",并且我们能从中提取稠密的训练信号(如 partial credit、逐步验证),那么 AI 可以通过"生成 + 验证"的循环去逼近求解。 这本质上就是 用 NP 的"验证侧"去攻击"求解侧" ——也是当前 LLM + Verifier 范式(如 RLHF 中的 reward model、AlphaProof 的 formal verifier)的理论基础。 但要注意: 这不是 P=NP 的证明,AI 找到的解在 worst-case 仍可能不是最优的 AI 解决的是 平均情况(average-case) 或 特定分布 ,而非 worst-case 一旦问题规模增大到超出训练分布,性能会急剧下降 一个更深的视角:平均-case 复杂度 理论计算机科学里有个分支叫 Average-Case Complexity ,研究"典型实例"的难度。很多 NP-Complete 问题在 average-case 下其实有不错启发式算法——这也解释了为什么 AI 在某些 NP 问题上表现惊喜,但在 adversarial 构造的 hard instance 上翻车。 所以回到你的说法: "

2026-08-02 原文 →
AI 资讯

Whizz: Your Esoteric Language that's Short as BF, but Easier to Write

I just made Whizz, an esoteric programming language that is full of capability and possible experimentation. Before I interest you in that, I'll explain to you something. What is an esoteric programming language? An esoteric language (or an esolang, colloquially), is a programming language designed to not fit the coding 'norms' or conventions. Take an example: BF ('BF' is an abbreviation and euphemism of brainf***). A standard language would notate a 'Hello, World!' program as something like: print ( " Hello, World! " ) BF, on the other hand, requires something like this: ++++++++ [ > ++++ [ > ++ > +++ > +++ > + <<<< - ] > + > + > - >> + [ < ] < - ] >> . > ---.+++++++..+++. >> . < -. < .+++.------.--------. >> +. > ++. As you can see, BF, like most esolangs, is different: it's hard to write and a puzzle. Whizz is inspired by BF, as its incrementing, decrementing and looping are inspired by it. I made Whizz because I thought languages like BF were way too monotonous to write. Esolangs should be hard and puzzling to write, but not laborious. BF requires you type '+' as many times you want to increment (without loops): so you have to find shortcuts and unscalable solutions, just to achieve your goal. In Whizz, just type that incrementation repetition count before the '+' sign, and there you have it! These wonderful features that Whizz boasts keep the challenge in esolang-ing, but contradictorily makes it more 'scalable'. Another notable feature is functions: the epitome of order. An example of a Whizz program would be: zeroToNine { [ create variables ] counter 10+ [ track state ] char 48+ [ print this one ] space 32+ [ space char ] ( char!+ [ print and increment char ] counter-; [ decrement counter and end if zero ] space! [ print space ] ) } zeroToNine* This, self explanatorily, outputs '0 1 2 3 4 5 6 7 8 9'. Again, in minimized form: c10+n48+s32+(n!+c-;s!) I genuinely hope you experiment with Whizz, and solve puzzles & challenges with it, as if it were BF! Install it

2026-07-31 原文 →
AI 资讯

The 8 Most Expensive Unit Conversion Mistakes in Engineering History — and the Software Bugs That Caused Them

TL;DR Eight engineering disasters. Zero arithmetic errors. Every single one was caused by two numbers — both correct, both carefully computed — meaning different things on opposite sides of a software interface. One cost $65 billion. Another killed 28 soldiers because 0.1 can't be represented in binary. The fix is never the math. The fix is the label. There is a particular kind of silence in a control room when someone realizes the number on the screen is in the wrong unit. It lasts about two seconds. Then it's replaced by the kind of noise nobody wants to hear. On September 23, 1999, that silence happened at the Jet Propulsion Laboratory in Pasadena, California. The Mars Climate Orbiter had just disappeared behind the planet. Telemetry showed the spacecraft at 57 kilometers above the surface. It was supposed to be at 140. The silence was four seconds long. Then someone said "oh no" — the official NASA transcript uses a stronger word — and $327 million of aluminum, titanium, and human effort disintegrated into the Martian atmosphere. What follows are eight stories about the same bug, wearing different uniforms. Some are famous. Some you've never heard of. Two of them are pure software failures that every developer who's ever written for (let i = 0; i < 10; i += 0.1) has come within a rounding error of replicating. 1. The Patriot Missile — When 0.1 Is Not 0.1 (1991) Let's start with the one that belongs in every CS curriculum. Because this isn't a "unit conversion" error in the traditional sense — nobody confused meters and feet. The error was in the way a computer counted time. And it killed 28 American soldiers in a warehouse in Dhahran, Saudi Arabia. The MIM-104 Patriot missile system tracks incoming targets using a phased-array radar. The radar scans the sky, and the fire-control computer predicts where the target will be when the interceptor arrives. That prediction depends on knowing exactly when the radar echo returned. Time is measured by the system's interna

2026-07-29 原文 →
开发者

Episode 3: High-Level Design

This series follows a fictional conversation between an experienced engineer and his nephew. Every episode explores one stage of how software moves from an idea to production. 👦 Nephew: Uncle, requirements are clear. I checked the codebase — there's already a FavoritesService I can extend for Wishlist. Now can I open VS Code? 👨‍🦳 Uncle: Almost. Tell me — what do you think HLD even is ? You've heard the term in every interview. What do you think it actually means? 👦 Nephew: Some kind of... diagram? Boxes connected with lines, before you start coding? 👨‍🦳 Uncle: That's what it looks like. That's not what it's for . Let me ask differently. Why do you think experienced engineers insist on drawing this before touching code, when they could just start building? 👦 Nephew: ...to plan the work? 👨‍🦳 Uncle: Closer, but still not it. Here's the real answer: HLD exists to decide, in advance, where the walls go — so that six months from now, when someone adds a new feature, they know exactly which room to build it in, without knocking down a wall that was holding up the ceiling. 👦 Nephew: That's a strange way to describe a diagram. 👨‍🦳 Uncle: Then let me show you, instead of describing it. That's the only way this actually lands. What Talks to What 👨‍🦳 Uncle: Suppose we're building this at Flipkart. Not a college project — a company with hundreds of live services, where breaking one thing can affect ten others you've never even heard of. Here's the simplest picture for Wishlist. Frontend ↓ Wishlist API ↓ Wishlist Service ↓ Database 👦 Nephew: That's it? Four boxes? 👨‍🦳 Uncle: That's it. HLD answers exactly one question, and nothing more — what talks to what. Not how the button looks. Not what fields the database table has. Just: which component calls which, and in what direction. 👦 Nephew: Then why does everyone treat it like it's such a big deal? This took ten seconds to draw. 👨‍🦳 Uncle: Because the value isn't in the ten seconds you spend drawing it today. The value is in what i

2026-07-27 原文 →
开发者

Amazon EKS Adds Kubernetes Version Rollback Within 7 Days of an Upgrade

Amazon EKS has recently introduced support for Kubernetes version rollbacks, letting practitioners revert a cluster's control plane to its previous Kubernetes version within 7 days of an upgrade if issues arise. The feature reduces the risk of in-place cluster upgrades by giving teams a safety net to recover quickly from problematic updates. By Renato Losio

2026-07-26 原文 →
AI 资讯

Deep Learning & Computer Vision in Web Diffing: Solving Layout Shifts with Neural Embeddings and SSIM

When engineers talk about visual regression or website change monitoring, pixel-level diffing algorithms (like pixelmatch or Euclidean RGB distance) are usually the default solution. However, in real-world web environments, pixel-by-pixel comparisons fundamentally fail under normal user interactions and dynamic rendering conditions: Elastic Layout Shifts: A single 20px dynamic banner inserted at the top of a page pushes every subsequent DOM element down, causing 100% of the downstream pixels to fail a pixelmatch test, even if the content itself hasn't changed. Sub-Pixel Anti-Aliasing Jitter: Operating systems (macOS vs. Linux vs. Windows) render font glyphs with subtle sub-pixel anti-aliasing variations, creating thousands of false-positive pixel deltas. Semantic vs. Cosmetic Changes: Changing a single word in a paragraph should trigger a localized alert, but a minor color gradient shift in a hero image shouldn't trigger an emergency notification. At PageWatch.tech , we solved this by combining classical Structural Similarity (SSIM) , ORB Feature Alignment , and Siamese Neural Networks (SNN) for latent-space semantic comparison. In this article, I will dive into the mathematics, neural network architectures, and TypeScript implementation of our computer vision diff pipeline. 🧮 1. Beyond Pixel Comparison: Structural Similarity Index (SSIM) Unlike raw Mean Squared Error (MSE), SSIM measures visual change based on human perception across three dimensions: Luminance , Contrast , and Structure . Mathematically, the SSIM between two image windows $x$ and $y$ is defined as: $$\text{SSIM}(x, y) = \frac{(2\mu_x\mu_y + C_1)(2\sigma_{xy} + C_2)}{(\mu_x^2 + \mu_y^2 + C_1)(\sigma_x^2 + \sigma_y^2 + C_2)}$$ Where: $\mu_x, \mu_y$ are the local pixel mean intensities. $\sigma_x^2, \sigma_y^2$ are the local variances. $\sigma_{xy}$ is the covariance between $x$ and $y$. $C_1, C_2$ are stabilization constants. TypeScript Implementation of SSIM Window Sliding Below is a snippet of how

2026-07-23 原文 →
AI 资讯

Getting Started with Sinch Functions

I've built a lot of voice integrations. Every single one needed a deployment whose only job was to talk to the Sinch API: receive the callback, translate it into SVAML or a Conversation API call, hand off to the rest of the application. Not the interesting part. Just the piece that has to exist because your code and Sinch's network live in different places, with a round trip between them on every call event. Sinch Functions moves that piece into the network itself. Your voice and messaging handlers run on the same infrastructure that's already carrying your calls and messages, right where the callbacks originate. This isn't a general-purpose Lambda replacement: the rest of your application, and any compute that isn't glue against Sinch's APIs, stays exactly where it is, whether that's AWS, Azure, or your own infrastructure. Your order lookup, your database writes, your actual business logic: still on Lambda or wherever you already have it. Functions is specifically for the code that exists only to bridge your app and the Sinch network, not a place to run your whole system. I've been trying it out and this post walks through getting set up, writing a basic voice function, and deploying it. Pricing is usage-based and separate from your Voice and Conversation usage: $0.10 per compute-hour (first hour free each month), $0.05 per GB-month of storage (first 0.1 GB free), $0.05 to $0.15 per GB-month for the database depending on tier (first 0.1 GB free), and $5.00 per month per function if you want it kept always-on instead of scaling to zero. These are the current Standard rates from your project's Billing Overview in the Sinch dashboard; treat them as a snapshot, not a guarantee, given the Alpha status below. Sinch Functions is listed as Alpha in the Sinch Build dashboard. Expect the CLI, runtime APIs, pricing, and this walkthrough itself to change before general availability. Treat it as something to experiment with, not something to put in front of production traffic y

2026-07-22 原文 →
AI 资讯

Building a Decompiler Pipeline in Rust: Why Fission Separates NIR and HIR

Building a Decompiler Pipeline in Rust: Why Fission Separates NIR and HIR Decompiler output often looks simple from the outside. A binary goes in. Pseudocode comes out. But between those two points, a decompiler must recover several different kinds of information: instruction semantics register and memory effects control flow stack variables calling conventions data types expressions loops and conditionals readable source-like structure Trying to represent all of this in one intermediate representation quickly becomes difficult. While building Fission , a reverse-engineering and binary decompilation workspace written primarily in Rust, I decided to separate the decompiler pipeline into two main intermediate representations: NIR , a lower-level representation intended to preserve machine semantics HIR , a higher-level representation intended to express recovered, human-readable program structure This article explains why that separation exists, what each representation owns, and why it makes decompiler development easier to reason about. Correctness and readability want different things A decompiler has at least two responsibilities. First, it must preserve the behavior of the original machine code. Second, it must produce output that a human can understand. Those goals overlap, but they are not identical. Consider a simplified fragment of machine-level behavior: tmp0 = RAX tmp1 = tmp0 + 1 RAX = tmp1 flags = update_flags(tmp0, 1, tmp1) A human reader may prefer to see: rax ++ ; The concise form is easier to read, but it omits details that may still matter elsewhere in the pipeline. The flags update could affect a later conditional branch. The operation width may matter. The source and destination could alias. The operation may have originated from an instruction with additional side effects. If the decompiler converts everything into source-like syntax too early, it becomes easy to discard evidence. If it keeps everything at machine level until the final rendering st

2026-07-21 原文 →