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

标签:#compute

找到 176 篇相关文章

开发者

What a Language Needs Before It Can Compile Itself

Code: Megapixel99/lambda-language lm is a small low-level language I wrote: static types, explicit memory, no closures, no garbage collector, and four independent backends that emit C, WebAssembly, ARM64 and bytecode for a VM. Its compiler is about 4,400 lines of JavaScript. The obvious next question is whether the language can compile itself, and the obvious first step is the lexer, which is 129 lines. In lm the same lexer is 355 lines. That ratio is the finding, because almost none of it is lm being a verbose language. Six specific absences account for nearly all of it, and writing them down was a planned milestone rather than an afterthought: the point of porting the lexer first was to find out what the language could not do while the port was still small enough to abandon. The one that cost the most src/lexer.js has a single advance(n) that moves pos , line and col together, called from 14 places. lm had no way to take the address of a scalar local, so a function could not mutate a caller's variable, and a function returning three values would need a struct allocated on every call. So advance does not exist. All 14 sites write pos += 1; col += 1; inline, and the newline case writes the three-line variant. That is the single largest source of the size difference, and it also caused the only correctness bug in the port. Column counting inside a string literal has to skip UTF-8 continuation bytes, and because the logic is inlined rather than centralised there is no one place to fix it. The two comment scanners over-count a column in exactly the same way. They get away with it only because a comment always ends at a newline, which resets the column before anything reads it. That is worth sitting with. A centralised advance would have been fixed once and been right in all three places. Instead the code is right in one place by correction and in two others by luck, and the luck is load-bearing: change what terminates a comment and two latent bugs become live ones. Dup

2026-09-05 原文 →
AI 资讯

Bir Ev Ağı Aslında Nasıl Çalışıyor? LAN/WAN’dan WISP, VLAN ve VPN’e

Ev Ağı Nasıl Çalışır? Bir ev ağını en basit haliyle şöyle düşünebiliriz: Internet │ ISP ağı │ Ev Router'ı │ ┌─────────────┼─────────────┐ │ │ │ Laptop Telefon NAS Ev router'ı burada iki farklı dünyayı birbirine bağlar: ISP üzerinden ulaştığı dış ağ ve evdeki cihazların bulunduğu yerel ağ. Bu basit topolojinin arkasında LAN, WAN, subnet, DHCP, routing, NAT, firewall, bridge ve VLAN gibi kavramlar birlikte çalışır. 1. Ev ağı, ISP ve internet tarafı LAN ve WAN LAN — Local Area Network , router'ın yerel ağ tarafıdır. Evdeki laptop, telefon, NAS, televizyon gibi cihazlar genellikle bu tarafta bulunur. Örneğin router'ın LAN adresi: 192.168.1.1/24 olsun. Cihazlar da: Laptop 192.168.1.20 Telefon 192.168.1.30 NAS 192.168.1.50 adreslerini kullanabilir. Bunların tamamı aynı: 192.168.1.0/24 yerel IP ağına aittir. WAN — Wide Area Network ise router'ın kendi yerel ağı dışındaki bir upstream ağa bağlandığı taraftır. Tipik bir evde: Internet / ISP │ WAN │ Router │ LAN │ Ev cihazları şeklinde görünür. LAN ve WAN, Ethernet kablosunun fiziksel türünü tanımlamaz. Aynı standart Ethernet bağlantısı bir router için LAN, başka bir router için WAN rolünde olabilir. Örneğin: Internet │ Upstream Router LAN: 192.168.1.1 │ │ Ethernet ▼ Downstream Router WAN: 192.168.1.50 LAN: 192.168.10.1 Buradaki 192.168.1.0/24 ağı: upstream router açısından LAN, downstream router açısından WAN tarafıdır. Dolayısıyla LAN ve WAN kavramları hangi router açısından baktığımıza göre anlam kazanır . Upstream ve downstream Ağda internet veya daha üstteki ağa doğru olan yön upstream , son kullanıcı cihazlarına doğru olan yön ise downstream olarak adlandırılır. Internet │ Upstream Router │ Downstream Router │ Laptop Downstream router'ın internete doğru bağlandığı router onun upstream router'ıdır. Bu terminoloji özellikle evde bir modem/router arkasına ikinci bir router bağlandığında kullanışlı hale gelir. ISP'nin rolü ISP — Internet Service Provider , ev ağını daha büyük internet altyapısına bağlayan servis sağlayıcıdı

2026-09-05 原文 →
AI 资讯

Three Years of Starting Over: How I Landed on Cybersecurity

I've been a die-hard Computer Science fan for as long as I can remember. Right after my 10th standard, I picked up C — that was four years ago. Around the same time, GitHub pulled me in before I even understood what was happening there. I couldn't parse a single line of what people were building, but I could tell something big was going on. That curiosity eventually pulled me into web development, and from there, into almost every corner of tech over the next few years — AI included. Diploma: The Real Lessons Weren't in the Syllabus I just finished a 3-year Diploma in Computer Engineering. Looking back, the biggest lessons weren't in the coursework. They were in hallway conversations — friends and teachers talking about where technology and the market are headed, instead of the usual teenage small talk. Watching how an organization actually runs, what really happens day to day — that taught me more than most subjects did. A Habit I Used to See as a Flaw Here's a pattern about how I work: everything I start, I start from zero — and I don't always go deep. I finish with the basics, then move on. For a long time I saw that as a bad habit. Three years and almost every major technology later, I've changed my mind — it was the fastest way to find out that "a little bit of everything" isn't who I am. What I actually need is to dig into a system until I find the reason it works. Until I do, I can't let it go. Where That Instinct Pointed Me: Cybersecurity That same need to dig eventually pointed me toward something equal parts fun and dangerous — cybersecurity. I'm about three months into this path now, and I'm moving slowly. Not because it's too hard, but because I won't move to the next topic until every dot is connected. Loose ends don't let me sleep. What I've Learned So Far This is still the floor, not the ceiling, but it's real and hands-on: Web authentication attacks — 2FA bypass, broken password-reset logic, username enumeration through timing differences, account lo

2026-09-04 原文 →
开发者

Zstandard einfach erklärt in 2 Episoden — Episode 1

Episode 1: Was in einer ZST-Datei passiertEpisode 1: Was in einer ZST-Datei passiertZST-Dateien begegnen uns immer häufiger bei großen Downloads, Softwarepaketen, Backups und Serverdaten. Sie sind oft deutlich kleiner als die ursprünglichen Dateien und lassen sich trotzdem sehr schnell wieder entpacken. Doch wie funktioniert das? Warum werden Dateien komprimiert? Eine Datei besteht aus Daten. Je mehr Daten sie enthält, desto mehr Speicherplatz wird benötigt und desto länger dauert ihre Übertragung. Kompression versucht, dieselben Informationen mit weniger Daten darzustellen. Beim späteren Entpacken muss daraus wieder exakt die ursprüngliche Datei entstehen. Nach dem Entpacken ist die Datei Bit für Bit identisch mit dem Original. Es wird nichts weggelassen und nichts vereinfacht. Wiederholungen benötigen unnötig viel Platz Betrachten wir diesen Satz: Kleine Katzen kuscheln auf kleinen Kissen, junge Katzen kuscheln auf bunten Kissen und alte Katzen kuscheln auf weichen Kissen.Die folgenden Teile kommen mehrfach vor: A = Katzen kuscheln auf B = KissenWenn wir die wiederkehrenden Textteile durch die Variablen A und B ersetzen, können wir den Satz kürzer darstellen: Kleine A kleinen B, junge A bunten B und alte A weichen B.Damit ist der Text noch nicht vollständig. Zusätzlich müssen wir speichern, wofür A und B stehen: A = Katzen kuscheln auf B = KissenAus diesen Informationen lässt sich der ursprüngliche Satz wiederherstellen. Jedes A wird durch Katzen kuscheln auf und jedes B durch Kissen ersetzt. Das ist bereits die grundlegende Idee der verlustfreien Kompression: Wiederkehrende Daten werden nicht jedes Mal vollständig gespeichert. Stattdessen werden sie einmal gespeichert und anschließend durch kürzere Verweise ersetzt. ### Zstandard verwendet keine Variablen Unsere Variablen A und B dienen nur dazu, das Prinzip verständlich zu machen. Zstandard versteht weder Wörter noch Sätze. Es weiß nicht, was Katzen oder Kissen sind. Für das Programm besteht eine Datei lediglich

2026-09-01 原文 →
AI 资讯

Interpreters and Compilers: How Your Code Actually Becomes a Running Program

Every developer writes code that "just works" thousands of times without thinking about what happens between hitting save and seeing output on screen. This article pulls back that curtain. We're going to walk through, in real depth, how source code — plain text you typed — becomes a running program, covering lexing, parsing, abstract syntax trees, semantic analysis, and the actual difference between interpretation and compilation (including why that difference is far blurrier than most explanations make it sound). This is one of those topics where understanding the fundamentals pays off across your entire career — it changes how you read error messages, how you reason about performance, and how you evaluate new languages and tools. 1. The Big Picture: Two Broad Strategies At the highest level, there are two strategies for running code: Compilation — translate the entire source program into another form (often machine code, but not always) before running it. The translation and the execution are separate steps. Interpretation — read and execute the source program directly, translating and running it (roughly) simultaneously, statement by statement. In practice, almost no real system is purely one or the other. Python "compiles" your source to bytecode before interpreting the bytecode. Java compiles to bytecode, then a JIT (Just-In-Time) compiler compiles hot paths of that bytecode to native machine code while the program runs . JavaScript engines like V8 do something similar. The clean binary of "compiled vs. interpreted" that gets taught early on is really a spectrum, and most production language runtimes today live somewhere in the middle. But to understand any point on that spectrum, you need to understand the pipeline every one of these systems shares. Let's build it up stage by stage. 2. Stage One: Lexical Analysis (Lexing / Tokenizing) The first thing that has to happen to your source code is the least glamorous: it gets chopped into pieces. Source code, to a c

2026-09-01 原文 →
AI 资讯

Open-Vocabulary Object Detection for Robots Using Vision-Language Models

Open-Vocabulary Object Detection for Robots Using Vision-Language Models Traditional object detectors are trained on a fixed set of classes. For example: person car chair dog But robots often encounter objects that were not explicitly included in their original training labels. Open-vocabulary perception allows a robot to query concepts using natural language. From Fixed Classes to Natural Language Traditional: Image --> Detector --> {person, car, chair} Open vocabulary: Image + "find a red toolbox" | v Vision-Language Model | v Candidate Regions Robot Perception Pipeline Camera | v Image Preprocessing | v Vision-Language Model | +--> "red toolbox" +--> "safety helmet" +--> "door handle" | v Detected Regions | v 3D Localization | v Robot Planner Why This Matters A robot deployed in the real world may receive commands such as: Find the nearest orange package. The system should not require a new fixed detector class for every possible object. Connecting 2D and 3D A VLM may identify an object in an image. Depth or LiDAR can then estimate its 3D location. RGB Image | v 2D Object Region | +---- Depth | +---- LiDAR | v 3D Object Position This transforms semantic understanding into spatial information. Safety and Verification Open-vocabulary models can produce uncertain or incorrect detections. For robot control, add verification: VLM Detection | v Confidence Check | v Geometric Validation | v Temporal Consistency | v Planner Never assume that a language model's output is automatically safe for direct actuation. ROS 2 Architecture A modular implementation might use: /camera/image | v /vlm_detector | v /detections | v /3d_projection | v /object_tracker | v /planner This makes it possible to replace the VLM without redesigning the rest of the robot stack. Latency Management Large models may be expensive. Possible strategies include: Run perception at a lower frequency. Track detected objects between VLM calls. Resize images. Use hardware acceleration. Cache repeated queries.

2026-09-01 原文 →
AI 资讯

3D Object Detection for Physical AI Applications

3D Object Detection for Physical AI Applications A robot needs more than image classification. It needs to know: What object is present? Where is it? How large is it? How is it oriented? 3D object detection answers these questions in physical space. 3D Detection Pipeline Camera / LiDAR | v Preprocessing | v Feature Extraction | v 3D Detection Model | v 3D Bounding Boxes | v Tracking / Planning A 3D bounding box can contain: (x, y, z) (width, height, depth) (rotation) (class) (confidence) LiDAR-Based Detection LiDAR naturally provides 3D geometry. A typical pipeline is: Point Cloud | v Filtering | v Voxelization / Features | v Neural Network | v 3D Boxes Challenges include sparse points and computational cost. Camera-Based Detection A camera provides dense visual information. Monocular 3D detection tries to infer depth from a single image, while stereo systems can estimate depth geometrically. Multi-Modal Detection Combining cameras and LiDAR can provide both semantics and geometry: Camera ---> Visual Features --+ | LiDAR ----> 3D Features ------+--> Fusion --> 3D Detection This is useful for autonomous robots operating around people, vehicles, and objects. Post-Processing Raw detections are often filtered using: Confidence thresholds Non-maximum suppression Geometric constraints Temporal tracking Tracking can stabilize detections across frames. ROS 2 Integration A practical architecture: /sensors/camera /sensors/lidar | v /3d_detector | v /objects_3d | +--> /tracker | +--> /planner Use standardized message structures where practical so perception remains decoupled from planning. Measuring Performance Evaluate: Precision Recall 3D IoU Position error Orientation error Inference latency FPS For physical AI, latency matters almost as much as accuracy. A detector that is accurate but too slow can still be unsuitable for a moving robot. Production Considerations Test across: Day/night conditions Different sensor placements Partial occlusion Different object sizes Dynamic

2026-09-01 原文 →
AI 资讯

Visual-Inertial Odometry for Autonomous Robots

Visual-Inertial Odometry for Autonomous Robots A robot needs to estimate how it moves through the world. GPS is unavailable indoors, wheel odometry can slip, and LiDAR may not always be available. Visual-Inertial Odometry (VIO) combines cameras and IMUs to estimate motion. Basic Idea Camera ---> Visual Features ---+ | v State Estimator ^ | IMU ----> Motion Information ---+ | v Robot Trajectory The camera provides visual constraints. The IMU provides high-frequency motion measurements. Why Combine Them? A camera gives rich spatial information but can suffer from: Motion blur Low texture Poor lighting Slow frame rate An IMU operates at much higher rates but accumulates drift when integrated over time. Their weaknesses are complementary. Feature Tracking A simple visual pipeline might be: Image | v Feature Detection | v Feature Tracking | v Motion Estimation Feature types may include corners or learned visual features. IMU Prediction The IMU can predict how the robot's state changes between camera frames. Conceptually: Previous State | +--> IMU measurements | v Predicted State | +--> Camera observation | v Corrected State This is the prediction/correction pattern used by many estimators. Initialization VIO initialization is important because the estimator must determine quantities such as: Initial orientation Gravity direction Velocity Scale for monocular systems Sensor biases Poor initialization can cause instability later. ROS 2 Architecture /camera/image | v Visual Frontend ----+ | /imu/data ----------+--> VIO Estimator --> /odometry | +--> /tf Use consistent timestamps and calibrated camera-IMU extrinsics. Improving Robustness Useful techniques include: Rejecting outlier feature matches Monitoring IMU saturation Handling dropped frames Estimating sensor biases Detecting low-texture scenes Monitoring estimator health Evaluation Evaluate against a trusted trajectory where available. Useful metrics include: Absolute trajectory error Relative pose error Drift per dista

2026-09-01 原文 →
AI 资讯

I Built My Own Fail-Fast HashMap — Here's Why a Boolean Flag Wasn't Enough

If you've done LeetCode's Design HashMap , you've implemented put , get , and remove . What that exercise usually skips is the part that actually breaks in production: what happens when someone mutates the map while another piece of code is iterating over it. I ran into this directly while building MyHashMap , a from-scratch single-threaded HashMap (separate chaining, resize on load factor). Getting put / get / remove right was the easy 80%. Getting entrySet().iterator() to correctly detect concurrent mutation — including the case where a second, completely separate iterator is the one that should notice — took three wrong turns before landing on the pattern the JDK actually uses. The problem, concretely Iterator < Entry < K , V >> it = map . entrySet (). iterator (); it . next (); map . put ( someNewKey , someValue ); // structural change, mid-iteration it . next (); // ??? — undefined behavior if we don't guard against this Without a guard, next() might return a stale entry, skip entries entirely, or throw an unrelated exception depending on internal bucket-array state. Java's real collections handle this with ConcurrentModificationException (CME) — but the interesting part isn't the exception, it's the mechanism that detects when to throw it. First idea: a boolean "dirty" flag Obvious first attempt: a boolean modified field on the map, flipped to true on any put / remove , checked by the iterator. This works for exactly one iterator. It falls apart the moment two iterators are alive at once: Iterator A calls next() , sees modified == false , proceeds. Something else mutates the map. modified flips to true . Iterator B — created after that mutation — checks the same shared modified flag, sees true , and incorrectly throws, even though nothing has changed since B was created. A single shared boolean can't represent "changed since this specific iterator was created" for more than one iterator at a time. Resetting it on read doesn't help either — now the other iterat

2026-08-31 原文 →
AI 资讯

I taught my hand gestures to run an AI coding agent

A few weekends ago I got annoyed at typing prompts into a terminal and decided the fix was, obviously, to control my AI agent with hand gestures instead. This is the story of building that, and the two hours I lost fighting a GPU crash that had nothing to do with my code. The idea: a webcam watches your hand, MediaPipe tracks the landmarks, and three gestures map to three actions on an Anthropic-powered coding agent. Pinch (thumb and index touching) - the agent writes code Spinning your index finger in a circle - the agent brainstorms an idea Two fingers "running" up and down - it runs whatever code it just wrote No keyboard. No prompt box. Just your hand in front of a webcam, like you're a conductor telling an orchestra what to play. The MediaPipe detour I started with MediaPipe's newer Tasks API (HandLandmarker), because it's the one all the docs point you to now. It crashed immediately on my Mac with a Metal/GPU service error, even when I forced it onto the CPU delegate. Spent way too long assuming it was my setup before realizing the new API just doesn't play nice with this machine. Switched to the legacy mp.solutions.hands API, pinned to mediapipe==0.10.21, and the problem vanished. Sometimes the fix for a shiny new API is to not use it yet. Gestures are messier than they sound Detecting "pinch" is easy: measure the distance between thumb and index tip, threshold it, done. The other two took more work. "Running" fingers needed the vertical oscillation of the index and middle fingertips, counted by sign crossings, so it doesn't false trigger on a hand that's just drifting. "Spinning" tracks the index fingertip's trajectory and accumulates the signed angle around a center point, so a real circle reads differently than a shaky hand. Both run on a rolling 1.5 second buffer of landmarks, edge triggered so a gesture fires once, not once per frame. Letting the agent run its own code, unsandboxed, on purpose The runner executes whatever the agent wrote as a subprocess

2026-08-30 原文 →
AI 资讯

Nine puzzle solvers, one browser tab, zero servers: a tour of classic search algorithms

I recently finished building a small suite of puzzle and game solvers that all run entirely in the browser — no backend, no API calls, no machine-learning models. You paste in a Sudoku, a chess position, or a crossword pattern, and the answer comes back instantly, computed on your own device. The fun part wasn't the UI. It was that each puzzle turned out to be a textbook excuse to reach for a different classic algorithm. Nine solvers, and I got to use constraint propagation, adversarial search, heuristic search, brute-force scanning, and plain old pattern matching — the stuff that shows up in an algorithms course and then, in most day jobs, never again. This is a tour of which algorithm fits which puzzle, and a few of the potholes I hit along the way. Everything here is vanilla JavaScript running in a Web Worker. The one design constraint: no server Before the algorithms, the rule that shaped all of them: it has to run client-side. That's a privacy choice (your puzzle never leaves the tab) and a cost choice (no compute bill), but it's also a fun forcing function. You can't lean on a beefy backend or a hosted model — you get one browser thread (well, a Worker thread) and whatever you can compute in a few hundred milliseconds. That budget is exactly why classic algorithms shine here. They're fast, deterministic, and small enough to ship as a script. Let's group the solvers by the technique each one leans on. Family 1: Constraint propagation Sudoku Sudoku is the poster child for constraint propagation. A cell that can only be one value forces that value; that in turn shrinks its neighbours' options, which forces more cells, and so on. Most "easy" and "medium" boards fall over from propagation alone (naked singles + hidden singles), and only the hard ones need a backtracking search on top. The nice property: the same engine that solves the board also powers the hint feature (find the next forced cell and explain why it's forced) and a uniqueness check — count solutions,

2026-08-29 原文 →
AI 资讯

MEU COMEÇO NA ÁREA DA TECNOLOGIA

Olá, comunidade dev.to! Meu nome é Neto, tenho 17 anos e sou estudante de Ciência da Computação no UNIPÊ, em João Pessoa. Atualmente, estou cursando o segundo semestre da graduação e também estudando design profissional, área que considero importante para a criação de soluções digitais mais úteis, intuitivas e visualmente agradáveis. Minha trajetória na tecnologia ainda está no começo, mas já tem sido marcada por descobertas, aprendizados e desafios. Escolhi Ciência da Computação porque sempre tive curiosidade sobre como aplicativos, sites e sistemas funcionam. Quero aprender não apenas a programar, mas também a compreender todo o processo de desenvolvimento de um produto, desde a identificação de um problema até a construção de uma solução. Durante o curso, tive a oportunidade de desenvolver, com alguns colegas, um projeto relacionado à criação de um aplicativo. Essa experiência foi importante porque me mostrou que desenvolver um produto vai muito além de escrever código. Foi necessário discutir ideias, organizar tarefas, pensar nas necessidades dos usuários e encontrar soluções para os problemas que surgiram durante o processo. Mesmo enfrentando desafios simples, percebi como cada obstáculo pode contribuir para o nosso crescimento. Em alguns momentos, precisamos revisar decisões, corrigir erros e adaptar o projeto. Também aprendemos que uma equipe precisa manter uma boa comunicação, pois cada integrante possui habilidades, responsabilidades e pontos de vista diferentes. O estudo de design profissional complementa minha formação em computação. Estou aprendendo que uma aplicação não deve apenas funcionar corretamente: ela também precisa oferecer uma boa experiência ao usuário. Elementos como cores, tipografia, organização das informações, acessibilidade e facilidade de navegação influenciam a maneira como as pessoas utilizam um produto. Ainda tenho muito a aprender sobre programação, design e desenvolvimento de projetos. Porém, entendo que a evolução acontece aos po

2026-08-26 原文 →