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

标签:#compute

找到 104 篇相关文章

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 原文 →
AI 资讯

The Simplex Method, Explained Like an Algorithm (with a Free Step-by-Step Solver)

If you have written any optimization code, you have met linear programming even if nobody called it that. "Maximize output without blowing the resource budget" is an LP problem, and the classic algorithm that solves it is the simplex method. It is worth understanding not because you will hand-code it (you'll usually call a solver), but because knowing how it moves makes you far better at modeling problems for it. Here is the algorithm stripped down to its logic. The problem shape Every LP problem has three parts: an objective function to maximize or minimize, e.g. Z = 5x1 + 4x2 a set of linear constraints, e.g. 6x1 + 4x2 <= 24, x1 + 2x2 <= 6 non-negativity: all variables >= 0 Geometrically, the constraints carve out a feasible region (a polytope). The optimum always sits at a corner of that region. The simplex method is just a smart way of hopping from corner to corner, uphill, until there is no higher corner to move to. The algorithm as pseudocode build initial tableau (add a slack variable per <= constraint) loop: compute Cj - Zj for each column if all (Cj - Zj) <= 0: break # optimal reached pivot_col = column with most positive Cj - Zj # entering variable ratios = RHS / pivot_col entries (only positive entries) pivot_row = row with smallest non-negative ratio # leaving variable pivot(pivot_row, pivot_col) # elementary row operations return solution from final tableau That's it. Four moves per iteration: score the columns, pick the entering variable, run the ratio test for the leaving variable, pivot. Repeat until the optimality condition holds. A quick worked run Take Maximize Z = 5x1 + 4x2 subject to 6x1 + 4x2 <= 24 and x1 + 2x2 <= 6. Add slack variables s1, s2, build the tableau, and iterate. The optimum lands at x1 = 3, x2 = 1.5, Z = 21. Two pivots and you're done. Simple on paper until the numbers get ugly. Where humans (and debugging) actually break The algorithm is clean. The arithmetic is not. A single wrong entry in one pivot silently corrupts every table

2026-07-21 原文 →
AI 资讯

AI 개발자가 실전에서 쓰는 필수 수학 개념 완전 정복

https://mdooai.com AI 모델을 다루다 보면 코드는 돌아가는데 왜 성능이 안 나오는지 이해하지 못하는 순간이 옵니다. 그 답은 대부분 수학에 있습니다. 실무 AI 개발자로 성장하기 위해 반드시 잡아야 할 최소한의 수학 개념과, 그것을 어떻게 공부해야 하는지를 구체적으로 살펴보겠습니다. 코딩만으로는 해결할 수 없는 AI 모델 성능의 열쇠 많은 주니어 개발자들이 비슷한 경험을 합니다. PyTorch나 TensorFlow로 튜토리얼 코드를 복사하고, 학습도 돌리고, 결과도 나옵니다. 그런데 모델이 왜 이렇게 예측하는지, 왜 학습이 멈추는지, 어떻게 하면 성능이 올라가는지는 설명할 수가 없습니다. 이 간극의 정체가 바로 수학입니다. 가령 모델이 과적합(overfitting)될 때 L2 정규화를 쓰라는 조언을 듣습니다. 코드 한 줄로 해결되지만, 그게 왜 작동하는지는 가중치 벡터의 크기를 제한한다는 선형대수와 확률론적 추론이 얽혀 있습니다. 이 원리를 이해하는 개발자와 모르는 개발자가 새로운 문제에서 만들어내는 솔루션의 질은 다를 수밖에 없습니다. 다행인 건, AI 개발에서 필요한 수학은 대학원 수준의 수리해석학이 아닙니다. 핵심 개념 몇 가지를 실용적 도구로 이해하는 것으로 충분합니다. 선형대수와 확률통계, 어떤 개념부터 공부해야 할까? 선형대수와 확률통계는 AI 수학의 두 축입니다. 그런데 이 두 분야 전체를 공부하려 들면 끝이 없습니다. 개발자 관점에서 실제로 반복해서 등장하는 개념만 추려내면 다음과 같습니다. 선형대수에서 우선해야 할 개념 벡터와 행렬의 연산 : 데이터는 사실상 전부 벡터와 행렬로 표현됩니다. 이미지는 픽셀값 행렬이고, 텍스트는 임베딩 벡터입니다. 행렬 곱(matrix multiplication)이 신경망의 순전파(forward pass) 그 자체입니다. 내적(dot product)과 유사도 : 추천 시스템, 어텐션 메커니즘(Transformer의 핵심)이 내적 연산 위에 서 있습니다. 고유값(eigenvalue)과 고유벡터(eigenvector) : PCA(주성분 분석)처럼 차원을 줄이는 기법을 이해하려면 반드시 필요합니다. 행렬 분해(SVD 등) : 추천 시스템과 자연어 처리의 기반 기술에 등장합니다. 확률통계에서 우선해야 할 개념 확률분포와 기댓값 : 모델의 출력이 확률인 이유, 소프트맥스(softmax)가 하는 일을 이해하는 기반입니다. 베이즈 정리 : 사전 지식을 데이터로 업데이트하는 논리 구조로, 생성 모델과 불확실성 추정에 직접 연결됩니다. 최대 우도 추정(MLE, Maximum Likelihood Estimation) : 모델 학습이 왜 손실 함수를 최소화하는 방향인지를 설명하는 원리입니다. 크로스 엔트로피 손실 : 분류 모델에서 가장 자주 쓰이는 손실 함수로, 확률론과 정보이론이 만나는 지점입니다. 분야 핵심 개념 AI 실무 연결 지점 선형대수 행렬 곱, 내적 신경망 순전파, 어텐션 선형대수 고유값·고유벡터 PCA, 차원 축소 선형대수 행렬 분해(SVD) 추천 시스템, NLP 확률통계 확률분포, 기댓값 소프트맥스, 분류 출력 확률통계 베이즈 정리 생성 모델, 불확실성 추정 확률통계 최대 우도 추정 손실 함수의 논리적 근거 확률통계 크로스 엔트로피 분류 모델 학습 활성화 함수와 역전파에서 미적분은 어떻게 작동하는가? 미적분은 신경망 학습의 핵심 메커니즘인 역전파(backpropagation)를 이해하는 데 필요합니다. 겁먹을 필요는 없습니다. AI 개발에서 실제로 필요한 미적분 개념은 크게 두 가지입니다. 1. 편미분과 기울기(gradient) 손실 함수는 모델의 가중치를 변수로 가지는 다변수 함수입니다. 학습이란 이 함수의 값을 줄이는 방향으로 가중치를 조금씩 조정하는 과정입니다. 이 '방향'을 계산하는 도구가 편미분이고, 모든 가중치에 대한 편미분을 모아놓은 것이 기울기(gradient)입니다. 경사하강법(gradient descent)은 이 기울기의 반대 방향으로 가중치를 업데이트합니다. 수식으로는 다음과 같습니다. 새 가중치 = 기존 가중치 − 학습률(lr) × 기

2026-07-20 原文 →
AI 资讯

DevLog #1: Re-entering the Matrix after years away

I’ve been out of context with my computer science degree for years, and honestly, it feels overwhelming. I want to change that, so I'm starting this log to document my comeback story, my failures, and my progress. What I did today: Acknowledged the starting line. Took 10 minutes to think about where I left off and what I need to tackle first. Decided to write daily logs. This is not my first attempt to finish the degree, but hopefully with some public eyes on it, it will be the last. 10 subject left. Starting with Mathematical analysis. The biggest challenge right now: Feeling completely out of context and fighting the urge to get distracted by everything else. Many things have changed since i was actively going to classes. My generation graduated many years ago and i feel like getting all the information I need will be extremely difficult since i don't know anyone. Getting information from the university websites and emailing professors will be slow. Next steps: Tomorrow, I'm going to try to overcome my overdramatic anxiety and post in the student groups I was in, in hope that somebody might have new information about the subjects. I will go start lesson #1. Goal is to ease into the material and start a habit, rather than pressuring myself to do everything at once. Come back tomorrow.

2026-07-19 原文 →
科技前沿

OPERATING SYSTEM

**🙄 فى كتاب chapter الصدمة دي هي بالظبط اللي حسيت بيها وأنا بقرأ أول “operating system: three easy Pieces “ ‘OSTEP’. 🖤اهلا بيكم ! يارب تكونوا بخير 💯 حابه اشارك معاكم رحلتى مع قراءة الكتاب ونستفيد منه سوا قبل ما نعرف هو !!!! ولا لا OS is virtual machine 🤔 !!!!دا يعنى ايه ووظيفته ايه OS تعالوا الاول نعرف ال موجودة فى الكمبيوتر ولا لا ؟؟؟؟ RAM وال CPUزى ال HARDWARE وهل هو قطعة ::هنبدأ من الاخر موجود على الكمبيوتر SW هو عبارة عن HW يسيدى مش قطعة OSال .على الجهازINSTALL ولازم يبقى ووظيفته ايه؟؟؟ OS طب يعنى ايه ‘OS’ اختصار “OPERATING SYSTEM”. .“يعنى نظام تشغيل “ .👁‍🗨👁‍🗨 تعالوا نعرف معنى ” نظام تشغيل” ونفسرها نظام تشغيل يعنى مسئول عن 1_ “HWالنظام “من غيره مش هيبقى فيه نظام خصوصا لقطع ال . يعنى بناخد منه الاذن للعمليات HW ببعضه وكمان بيدير ال HWيعنى هو بيربط ال 👏 . (Order)من الاخر بيخلق “النظام” 2_.”التشغيل “هو المسئول عن تشغيل البرامج Learn about Medium’s values هو اللي بيتحكم في دورة حياة البرنامج بالكامل؛هو اللي بيبدأ تشغيله في الذاكرة،OSيعني الـ وبيحدد هو محتاج إيه من إمكانيات الجهاز عشان يشتغل بكفاءة وبيفضل مراقبه ويحميه طول ما هوشغال ، ولحد ما تقفليه بنفسك 🌹 .ويقوم هو بتنظيف الذاكرة وتوفير المساحة لغيره 🧐::وظيفته بقا بيخلي البرنامج يشتغل بسهولة:1️⃣ لأنه بيخلق للبرنامج بيئة وهمية مريحة، وبيخفي عنه كل التعقيدات والأسلاك بتاعة الهاردوير عشان يشتغل بسلاسة 2️⃣: بيسمح للبرامج إنها تشارك الذاكرة بين كل البرامج بالعدل RAM بيشتغل كعسكري مرور بيوزع مساحة الـ . وبيحمي كل برنامج في مساحته الخاصة 3️⃣: بيمكن البرامج إنها تتعامل مع الأجهزة بيعمل كـ “وسيط” أو مترجم بيوصل كود البرنامج بالقطع الحقيقية (زي الشاشة أو الهارد) .عشان ينفذ أوامره فوراً بيعمل التلات حاجات دول إزاي في نفس الوقت وبمنتهى السلاسة؟ ؟؟؟OS طب الـ بيعملهم يسيدى عن طريق أكبر خدعة سحرية في عالم الكمبيوتروهي الـ Virtualization👌 كنت حابة جداً أكلمكم المرة دي عن خدعة الـ “Virtualization” 💎 😌👁👁اللي اتكلمنا عليها في العنوان، بس لقيت البوست هيبقى طويل أوي عليكم ✔🔥!!وعشان متعبكمش معايا.. هنخليها للبوست الجاي إن شاء الله 💯✅!!بيعمل الخدعة دي إزاي OSاستنوا البوست الجاى عشان نعرف الـ 💋.دمتم بخير **

2026-07-19 原文 →
AI 资讯

A Hands-On Guide to kalbee: Your First Kalman Filter (and Beyond)

Everything you need to go from pip install to a working multi-object tracker, one runnable snippet at a time. kalbee is a Python library for state estimation — the art of recovering a clean signal (position, velocity, temperature, whatever you're measuring) from noisy sensor data. This guide walks through it from the ground up. Every code block runs as-is; copy them into a file and follow along. Install pip install kalbee The only runtime dependencies are NumPy and SciPy. Optional extras add object-detection ( pip install "kalbee[yolo]" ) and plotting ( pip install "kalbee[viz]" ) support. The one idea you need: predict and update Every filter in kalbee works the same way. You alternate between two steps: predict() — advance the state forward in time using a motion model ("where do I think the object is now?"). update(z) — correct that prediction with a new measurement z ("what does the sensor actually say?"). The filter tracks two things: the state x (your best estimate) and the covariance P (how uncertain that estimate is). You read them back via kf.x and kf.P . Your first filter Let's track an object moving at roughly constant velocity, measuring only its (noisy) position. Instead of hand-building matrices, we use kalbee's ready-made models : import numpy as np from kalbee import KalmanFilter , rmse from kalbee.models import constant_velocity , position_measurement_model dt = 1.0 # Motion model: state is [position, velocity] F , Q = constant_velocity ( dt = dt , process_var = 0.01 , n_dims = 1 ) # Measurement model: we observe position only, with noise variance 4.0 H , R = position_measurement_model ( order = 1 , n_dims = 1 , measurement_var = 4.0 ) # Simulate a noisy trajectory rng = np . random . default_rng ( 0 ) pos , vel = 0.0 , 1.0 truths , measurements = [], [] for _ in range ( 50 ): pos += vel * dt truths . append ( pos ) measurements . append ( pos + rng . standard_normal () * 2.0 ) # std 2.0 -> var 4.0 # Create the filter: start at zero with high uncert

2026-07-19 原文 →
AI 资讯

LOD (Law of Demeter)

Introdução O nome do princípio vem do próprio nome do projeto de pesquisa (que remete a Deméter, deusa grega da agricultura — a metáfora era "cultivar" software que cresce de forma incremental e adaptável, não do princípio de acoplamento em si). O projeto Demeter investigava como reduzir o custo de manutenção de sistemas orientados a objetos observando que boa parte das mudanças de software quebrava código muito distante do ponto onde a mudança real acontecia — um efeito cascata causado por classes que conheciam profundamente a estrutura interna de outras classes. Essa observação foi confirmada empiricamente alguns anos depois: em 1994, Chidamber & Kemerer publicaram as famosas métricas CK ( A Metrics Suite for Object Oriented Design ), nas quais o CBO (Coupling Between Objects) — quão acoplada uma classe é a outras — se tornou um dos preditores mais fortes de defeitos e esforço de manutenção em estudos empíricos posteriores de engenharia de software. Ou seja: a intuição por trás da Law of Demeter (menos acoplamento = menos bugs ao mudar código) tem respaldo em dados de décadas de pesquisa empírica em qualidade de software. Definição Também chamada de "Principle of Least Knowledge" , a formulação clássica é: Um método M de um objeto O só deve chamar métodos de: O próprio O Os parâmetros recebidos por M Qualquer objeto que M crie/instancie internamente Os componentes diretos de O (seus atributos/campos) Variáveis globais acessíveis a O Resumo popular: "use apenas um ponto" — evite código como: pedido . getCliente (). getEndereco (). getCidade (). getNome () Isso é conhecido como "train wreck" (trem de vagões) — cada . é um vagão acoplado ao anterior. Se a estrutura interna de Cliente ou Endereco mudar, todo código que fez essa travessia quebra, mesmo estando em um módulo completamente não relacionado. Porque isso importa na prática? Quando o método M faz objeto.getX().getY().metodo() , ele passa a depender da estrutura interna de X e Y , não só da interface pública d

2026-07-19 原文 →
AI 资讯

How a Bookstore in Finland Reaches the Whole World

Week 0 of my DevOps Micro Internship was about the foundations—the parts of the internet you use every day without thinking about them. The exercise that made it click was a simple scenario: a friend launches an online bookstore called EpicReads, hosted on a server in Finland, and asks how people anywhere in the world can open it. The answer is a short chain of technologies working together. The Chain of Technologies Packet Switching: When someone opens the site, their request does not travel as one big lump. Packet switching breaks the data into small packets that each take the best available path across the network and get reassembled at the other end. This is what keeps the internet fast and resilient even across continents. IP Addresses & TCP/IP: Every device on the way has a unique IP address, like a postal address, so the user's computer and the Finland server can actually find each other. The TCP/IP suite runs the conversation: IP handles addressing and routing, while TCP makes sure the packets arrive complete and in the right order, asking again for anything that went missing. HTTP & HTTPS: On top of that sits HTTP and HTTPS, which define how the browser and server actually exchange the web pages. HTTPS adds encryption, so a customer's details and payment stay private. DNS: The last piece is DNS. Nobody wants to type an IP address, so DNS acts as the internet's phonebook, translating epicreads.com into the server's IP. To point a domain at an IPv4 address, you use an A record . The Biggest Takeaway The biggest lesson for me was not any single term. It was seeing how these layers hand off to each other so cleanly that the whole thing feels instant to a user. Understanding that chain is the groundwork for everything else in DevOps, because once you know how a request really travels, troubleshooting stops being guesswork. P.S. This post is part of the DevOps Micro Internship with Agentic AI Cohort 3 by Pravin Mishra. You can begin your DevOps journey by joining

2026-07-18 原文 →
AI 资讯

🚀 Mastering OOP for Interviews : Understanding Abstraction from First Principles (C++)

Series: Master OOP for Software Engineering Interviews Introduction Ask ten beginner developers: "What is abstraction?" Most answers sound like this: "Abstraction is the process of hiding implementation details and showing only essential information." Technically, that's correct. But if I ask the next question: "Why was abstraction invented?" or "Can you explain abstraction using an Inventory Management System?" or "How is abstraction different from encapsulation?" many candidates struggle. That's because they memorized the definition instead of understanding the idea behind it. In this article, we'll learn abstraction the way experienced software engineers think about it—not by memorizing definitions, but by understanding why it exists, what problem it solves, and how it appears in every modern software system. 🎯 Learning Goals After reading this article, you should be able to: Explain abstraction without memorizing a textbook definition. Understand why abstraction exists. Identify abstraction in everyday life. Recognize abstraction in software systems. Confidently answer beginner interview questions. Build a strong mental model that makes future OOP concepts easier. Before We Learn Abstraction... Let's ask an important question. Why do programming languages even provide OOP? Imagine writing software for an e-commerce company. The system contains: Products Customers Orders Warehouses Payments Delivery Partners Notifications Discounts Reviews Thousands of features. If every developer had to understand every implementation detail before writing code, software development would become impossible. We need a way to reduce complexity. That solution is called abstraction. The Problem Abstraction Solves Imagine buying a new car. You sit inside. You: Press the accelerator. Turn the steering wheel. Shift gears. Press the brake. Simple. But underneath the hood, hundreds of complex operations happen every second. The engine burns fuel. The pistons move. The gearbox changes tor

2026-07-15 原文 →
AI 资讯

# Understanding Backtracking Through a Tetris Optimizer in Go

When I first heard the term backtracking , it sounded like a complicated algorithm reserved for computer scientists. After spending the last couple of weeks learning it and implementing it in a Tetris Optimizer project, I realized something surprising: Backtracking is simply the art of making a decision, checking whether it works, and if it doesn't, undoing it and trying something else. This article explains backtracking using a practical project instead of abstract examples. The Problem Imagine you have several Tetris pieces (tetrominoes), and your goal is to fit all of them into the smallest possible square . It might look something like this: A A A A B B B B C C C C D D D D The challenge is to arrange every piece so that: No pieces overlap. No piece extends outside the board. Every piece is used exactly once. The board is as small as possible. This is much harder than it looks. My First Thought Initially, I thought I could simply place one piece after another. Place A Place B Place C Place D Done! Unfortunately, programming isn't always that kind. Sometimes the first position you choose for piece A makes it impossible to place D later. The mistake wasn't with D . The mistake happened much earlier. Enter Backtracking Backtracking works like this: Place a piece. Try placing the next one. If you get stuck... Remove the last piece. Try a different position. Repeat until every piece fits. It's essentially saying: "If this path doesn't work, let's go back and explore another one." Visualizing the Search Suppose we have four tetrominoes. Start ├── Put A at (0,0) │ ├── Put B │ │ ├── Put C │ │ │ ├── D fits ✅ │ │ │ └── D fails ❌ │ │ └── Try another position │ └── Move A elsewhere └── Try another position for A Every branch represents another possibility. Backtracking explores these branches until it finds one that works. How It Looks in Go The heart of the algorithm is surprisingly small. func solve ( index int ) bool { if index == len ( pieces ) { return true } for every

2026-07-15 原文 →
AI 资讯

Which Is to Be Master? Language, Authority and LLMs

Introduction “When I use a word,” Humpty Dumpty said in rather a scornful tone, “it means just what I choose it to mean—neither more nor less.” “The question is,” said Alice, “whether you can make words mean so many different things.” “The question is,” said Humpty Dumpty, “which is to be master—that's all.” — Lewis Carroll, Through the Looking-Glass Humpty Dumpty believes that words can mean whatever we choose them to mean. Alice asks an interesting question. Can they? Programming and Language Programming languages derive much of their power from formally specified semantics. The language implementation, not the programmer, defines what if , while and return mean. I cannot persuade the compiler that false should be treated as true . The rules establish a shared and mechanically enforced understanding of what a program means. Large Language Models however, do not execute according to fixed semantics. They interpret natural language through context. This distinction has profound consequences and suggests that a language model has no intrinsic notion of authority. In a programming language, when two instructions conflict, the language specification and execution environment determine the outcome. In natural language, authority does not arise from the words alone. It depends on context, convention, identity, and external rules. Language models, by nature, inherit this ambiguity. A prompt is therefore not a program in the traditional sense. It is an attempt to establish the context within which subsequent language should be interpreted. "You are a detective." "Do not reveal the identity of the murderer." "Only answer questions using the evidence you have observed." None of these statements is mechanically enforced merely because it appears in the prompt. They describe a role, a constraint, and an assumed world. The model may follow them, but their authority must be created and protected by systems outside the model. Prompt injection exploits precisely this weakness. It

2026-07-14 原文 →