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

今日精选

HOT

最新资讯

共 32289 篇
第 1187/1615 页
AI 资讯 Dev.to

Ditch Electron: Securing Local Socket Communications using Opaque Tokens

Part 3 of the ERTH Architecture Series: Preventing port-scanning attacks and local socket hijacking in multi-process desktop apps. In the second part of this series , we built a self-healing Watchdog daemon in Bun to monitor and resurrect our Python sidecar backend (Robyn). Now, our desktop app is extremely stable. But it is also extremely insecure. You might think: "This is a desktop app running entirely on 127.0.0.1 (localhost). People from the internet can't access it, so why do I need security?" This is a classic cognitive blind spot in desktop app development. In reality, your local loopback interface is shared globally by the operating system. Any script running in the user’s web browser (e.g., a malicious website they happen to visit) can aggressively scan local ports (from 10000 to 65535). Once it hits your Robyn sidecar's dynamic port, it can send unauthenticated POST requests to delete databases, read private files, or trigger system actions. To prevent this, we must build a Zero-Trust Shield using Opaque Tokens to lock down all communication between the frontend WebView and the Python sidecar. The Zero-Trust Security Model To block unauthorized local traffic, the frontend and backend must share a cryptographically secure, short-lived token. Any request lacking this token will be instantly rejected by Robyn with a 403 Forbidden response. Here is how the defense line functions: Let's implement this architecture step-by-step. Step 1: Generating the Ephemeral Token in Bun Rather than saving credentials to a local config file (which could be read by malware on the system), we generate a random UUIDv4 in Bun’s process memory at startup. This token exists only during the application's runtime. // src-app/frontend/src/bun/index.ts // Generate a cryptographically secure, one-time Opaque Token in memory const agentSecretToken = crypto . randomUUID (); Next, we inject this token into the child process's environment variables when we spawn the Python sidecar: // Spaw

木头人 2026-06-14 08:46 5 原文
AI 资讯 Dev.to

You Are Not Underpaid Because You Are Foreign. You Just Never Saw The Number.

I place developers with US tech companies for a living. Before that sentence makes you close the tab: what follows is the thing I tell developers for free, one conversation at a time, until I got tired of saying it one person at a time. Last month a developer in Prague asked me if 55 dollars an hour was a reasonable rate. Nine years in. Kotlin, AWS. He had built and run a payment system for one of the largest Czech fintechs. Three million transactions a month. Zero P0 incidents in two years. A profile most US startups would fight over. I told him what the US market actually pays for that exact stack at that exact level. He went quiet for about thirty seconds. Then he said: "I have been contracting for three years. I just did the math." He had left roughly 180,000 dollars on the table. Not because he was not good enough. Because no one had ever told him the number. This is the most expensive blind spot in our industry, and almost nobody outside the US escapes it. So let me walk through why it happens, because once you see it you cannot unsee it. You are pricing against the only benchmark you have ever seen When you set your rate, you do not pull it from nowhere. You anchor it to something. And the only thing you have ever had to anchor to is your local market. So a senior engineer in Warsaw prices against Warsaw. One in Bucharest against Bucharest. You take the local senior salary, maybe add a premium because the client is foreign, and you land on a number that feels brave. Forty-five an hour feels brave when the engineer at the next desk makes the local equivalent of twenty. Here is the disruptive part. The US client is not paying for your location. They are not even thinking about your location, except as a logistics detail. They are paying for the work, and what that work is worth to their business. A payment system that does not go down is worth the same to a US fintech whether the person who built it sits in San Francisco or Brno. The value did not get cheaper w

Jerry Kasem 2026-06-14 08:40 10 原文
AI 资讯 Dev.to

Apple’s On-Device AI: The Quiet Revolution for Edge Computing and Local-First Apps

The story of AI for the last three years has been written in megawatts. Nvidia GPUs stacked in desert data centers . Models with trillion-parameter counts. APIs that pipe your prompts, photos, and personal data to the cloud, burn a forest of electricity to process them, and return an answer 800ms later. If you're building with AI in 2026, the default assumption is that intelligence lives somewhere else. Your device is just a glass terminal. Apple has been telling a different story. No press tour. No "AGI in your pocket" hype cycles. Instead, a decade of silicon releases where the Neural Engine number (FLOPS) quietly doubled, then doubled again. Core ML updates that casually added transformer support. Here is my thesis : Apple’s on-device AI strategy is a privacy-first, performance-oriented architectural break from cloud-centric AI. By co-designing silicon, models, and APIs to run locally, Apple is unlocking a new class of local-first applications where user data never leaves the device, latency is measured in milliseconds, and features work in airplane mode. This doesn’t kill cloud AI. But it forces every developer to answer a new question: what part of your product must be in the cloud, and what gets better when it stays in the user’s pocket? This post is a technical teardown of that shift. I’ll cover the hardware realities of the Neural Engine and unified memory, the brutal constraints of fitting LLMs on device, what Core ML actually gives developers in 2026, and where this architecture creates new product opportunities that cloud-first can’t touch. I’ll also be blunt about the limits. On-device AI won't replace GPT-5 training clusters. But it might replace 80% of the API calls you make to them. At this moment, cloud AI gets all the headlines, but the real transformation may already be running 24/7 in your pocket, without ever touching the internet. Why the On-Device Push? Apple's AI strategy looks slow only if you measure it in keynote superlatives. Measure it in

Rex Anthony 2026-06-14 08:30 11 原文
AI 资讯 Dev.to

Three months running 6 apps. Here's what actually happened.

The honest version of a "build in public" post is the one you write when the numbers aren't what you expected. Three months ago I shipped six apps in about six weeks. Momentum, PawFormance, PillPal, HomeGrown, Palette Pro, ContentForge. All live. All working. One paying subscriber across the whole portfolio at month one. Here's what I learned. The apps weren't the problem. Distribution was. I built each app to solve a real problem I had or watched someone have. Momentum came from tracking my own workouts badly. PillPal came from watching my mother manage medications in a way that scared me. HomeGrown came from a garden spreadsheet that was getting embarrassing. The apps work. They do what they say they do. The problem is that almost nobody found them. Six months of Google Analytics data: direct traffic to five of the six apps is essentially zero. The two apps with real traffic — Momentum and HomeGrown — have it because I posted two answers on Quora. Not because of any launch strategy. Because I answered two questions that people were actually searching for. That's the whole lesson: search intent > launch energy. What I tried Show HN posts (2 posts, 0 comments each — posted on a weekend, classic mistake) Directory submissions across BetaList, SaaSHub, AlternativeTo, Uneed (all pending or no visible traffic) Dev.to articles (this one included) — some SEO value, slow build Mastodon presence (strong community engagement, zero app traffic) LinkedIn posts about the build process (engagement but no conversion; wrong audience for the apps) What actually worked Two Quora answers that directly addressed the search query someone was already running One Medium article that ranked for a specific keyword within two weeks That's it. That's the whole list. What month three looks like Momentum: $7.99 MRR, 1 paying subscriber. That's not a mistake — that's one person who found the app and decided it was worth paying for. ContentForge: free tier users, 0 paid. The free tier is active

Chad Dyar 2026-06-14 08:19 4 原文
AI 资讯 Dev.to

I Cut Our Image Captioning Costs 60% — Here's the Backend Story

Check this out: i Cut Our Image Captioning Costs 60% — Here's the Backend Story Look, I'll be honest. Six months ago I didn't think twice about image captioning. We were a small team, traffic was low, and we just threw everything at GPT-4o because it was the path of least resistance. Then our infra bill came in, my manager did that thing where he just stares at the dashboard, and suddenly I was a "cost optimization" guy. fwiw, that was not in my job description. This is the story of how I went from "we just use GPT-4o for everything" to a multi-model setup that cut our spend by more than half, with quality that — imho — is actually better than what we had before. No, this is not a sponsored post. Yes, I am going to mention Global API at the end because they made my life easier. More on that in a bit. Why Image Captioning Was Even on My Radar Our product has a lot of user-uploaded images. Think: product photos, profile pictures, the usual suspects. For each one we need a short, accessible caption that we use for SEO, alt text, and a downstream tagging pipeline. The downstream pipeline, btw, is the part that actually makes us money. Garbage captions in, garbage tags out. We were calling gpt-4o for everything. Every image. No caching. No batching. No thought. Each call cost us $2.50 per million input tokens and $10.00 per million output tokens. You don't have to be a math PhD to know that scales badly. I was not a math PhD. I am still not a math PhD. But I can do division. When I started pulling the numbers, the situation was grim. We were processing roughly 8 million images a month, and each one was generating more tokens than it needed to. I found one image in the logs that had produced a 4,000-token caption. The image was a screenshot of an error message. The caption was longer than the error. The Wake-Up Call: Actually Reading the Catalog One Saturday morning, coffee in hand, I decided to actually look at what was on offer. I'd been ignoring the multi-model world b

gentleforge 2026-06-14 08:16 10 原文
AI 资讯 Dev.to

I Built a Private AI Brain on My Laptop for $0

Last week I couldn't shake an idea: what if I had an AI that knew everything I know ? Not ChatGPT — something on my hardware, holding my knowledge, answering to no one's API bill. Yesterday I built it. Here's the honest breakdown. What it does NEXUS runs on a regular Windows laptop — aging i7, 16GB RAM, no GPU. It: Remembers everything. Drop any file in a folder; 60 seconds later it's searchable memory. Answers from MY knowledge. "Which of my projects were formally closed and why?" — it answers from my actual records. Watches the live web. Every 2 hours it pulls Hacker News and news feeds, learns what's trending, pings my Telegram. Reports to my phone. 7 AM daily briefing: what it learned, what's running, what needs me. The stack — all free, all open source Ollama runs the models (Llama 3.2, Mistral 7B). Open WebUI is my private ChatGPT. Qdrant stores memory. n8n automates. SearXNG searches privately. PostgreSQL, Redis, and MinIO handle data. Commercial equivalent: $300–500/month . My cost: electricity. The memory trick nobody explains simply Parse — extract text from any file Chunk — split into ~300-word pieces Embed — each chunk becomes 768 numbers representing its meaning Store — a database that searches by similarity Your question becomes 768 numbers too, and the database finds memories with similar meaning — not matching keywords. I asked "how do I get clients cheaper" and it found my notes on "reducing customer acquisition cost." Different words. Same meaning. That's the magic. What surprised me A 2GB model is genuinely useful. Llama 3.2 3B answers from my knowledge in seconds, on CPU. The automation matters more than the AI. The watched folder + Telegram bot turned a cool demo into a system I actually use. Windows is fine. Docker Desktop + WSL2 ran all nine services without drama. The bill, honestly Hardware: $0 (laptop I own) Software: $0 (open source) APIs: $0 (all local) Time: one focused day The only future cost is a cloud GPU server (~$65/mo) when I outg

TheonaiaO 2026-06-14 08:13 12 原文
AI 资讯 Dev.to

GLM 5.2 Just Dropped: What Zhipu's New Open-Weights Flagship Means for Developers

Introduction Zhipu AI (THUDM) has officially released GLM 5.2 , the latest iteration of its flagship open-weights model family. Announced today by Jie Tang on Twitter, the release is already making waves on Hacker News — racking up 269 points and 146 comments within hours. For developers who have been watching the open-weight LLM race, this is a significant moment. What's New in GLM 5.2 GLM 5.2 builds on the GLM-4 series that put Zhipu on the global map. The release focuses on three areas that matter most to production teams: Stronger reasoning and coding : Improved performance on multi-step reasoning benchmarks and competitive code generation against closed-source models like GPT-5 and Claude 4.5. Better multilingual behavior : GLM has always been strong in Chinese; 5.2 pushes English-quality code reasoning and longer-context retrieval closer to frontier levels. Longer context window : Reports point to a 200K+ token context with reduced degradation on long-document tasks — useful for codebase-level analysis. Weights, inference code, and a technical report have landed on Hugging Face under the THUDM organization, with an OpenAI-compatible API endpoint exposed by Zhipu's own platform. Why It Matters The open-weights race has consolidated around a handful of serious contenders — Llama, Qwen, DeepSeek, Mistral, and now GLM. Zhipu's positioning is unique: a Chinese lab that consistently weights-and-releases frontier-class models while still maintaining a hosted commercial API. For developers, that translates to real options: You can self-host on a single H200 or a pair of RTX 5090s and skip per-token API costs entirely. You can route between self-hosted GLM 5.2 and a hosted Anthropic/OpenAI endpoint depending on cost, latency, and capability. You get an OpenAI-compatible endpoint, so dropping GLM into an existing stack is a config change, not a rewrite. The Bigger Picture GLM 5.2 lands on the same week that U.S. regulators have reportedly cracked down on Anthropic model

LiVanGy 2026-06-14 08:10 7 原文
AI 资讯 Dev.to

General Token Economics: The Core System Behind a Sustainable Web3 Project

Token economics is not only about token price. It is about designing the rules, incentives, and long-term logic of a Web3 ecosystem. When people start building a Web3 project, they usually focus on the visible parts first. They think about the smart contract, the frontend, the wallet connection, the token launch, the whitepaper, and maybe the community. All of those are important. But there is one part that can decide whether the project survives or fails: Token economics. A project can have clean smart contracts, a nice UI, and strong marketing, but if the token economy is weak, the project can slowly collapse. Users may come only for rewards, early investors may dump, inflation may destroy value, and the token may lose its reason to exist. That is why token economics should not be treated as just a “crypto finance” topic. For developers and Web3 builders, token economics is closer to system design . It defines how value moves inside the ecosystem, how users are rewarded, how supply is controlled, how governance works, and how the project can grow without depending only on hype. What Is Token Economics? Token economics, often called tokenomics , means the design of how a token works inside a project. It answers questions like: Why does this token exist? Who receives the token? How is the token used? How many tokens will exist? How are rewards distributed? When can team and investor tokens unlock? How does the project treasury work? What creates real demand for the token? In simple words, token economics is the rule system behind a token. A token is not only something people buy and sell. In a real Web3 product, a token can be used for payments, staking, governance, access, rewards, collateral, or network fees. If the token has no clear role, it becomes only a speculative asset. That is dangerous because speculation can bring attention, but it cannot support a project forever. Why Developers Should Care Some developers think token economics is only for founders, eco

Jabo N 2026-06-14 08:07 12 原文
开发者 Dev.to

Vertica vs VoltDB (Volt Active Data): Key Differences, Use Cases & How to Choose in 2026

If you're building a modern data stack that requires either high-throughput transaction processing or large-scale analytical workloads, you've likely come across both Vertica and VoltDB (now rebranded as Volt Active Data). While both are distributed relational database management systems (RDBMS), they are architected for completely opposite use cases — choosing the wrong one can lead to 10x higher costs, missed latency SLAs, and poor application performance. In this guide, we break down every key difference between OpenText Vertica and Volt Active Data, with practical examples, real-world use cases, and best practices to help you make the right choice for your team. Table of Contents What is OpenText Vertica? What is Volt Active Data (Formerly VoltDB)? Core Differences Between Vertica and VoltDB Real-World Use Cases: When to Pick Which Best Practices & Common Mistakes Conclusion & Key Takeaways References What is OpenText Vertica? OpenText Vertica (formerly Micro Focus Vertica) is a columnar relational DBMS built exclusively for analytical (OLAP) workloads, first launched in 2005. As of 2026, the latest stable version is 26.1, with native lakehouse and Apache Iceberg export support for modern data ecosystems. Core Vertica Architecture Vertica's design is optimized for fast queries across massive datasets: Columnar storage : Data is stored by column instead of row, enabling significantly higher compression ratios and faster aggregation queries that only access a small subset of columns Massively Parallel Processing (MPP) : Query execution and data are distributed across hundreds of nodes for parallel processing Dual deployment modes : Enterprise Mode : Shared-nothing architecture with data stored locally on nodes for maximum performance Eon Mode : Compute and storage separated, using shared object storage (S3, GCS, ADLS) to scale compute independently of storage for cloud workloads Projections : Physical, sorted copies of data optimized for common query patterns (ins

Andrew 2026-06-14 08:07 13 原文
开发者 HackerNews

Is there a name for the type of comments agents add where they leak the prompt?

This is a stupid example to illustrate what I mean. Say you have this code: def create_background(width: int, height: int) -> Image: ... You tell the agent to use default values for create_background, the same as in create_screen. It changes the code to: # Now create_background params have default values, the same as create_screen in screen.py def create_background(width: int = DEFAULT_WIDTH, height: int = DEFAULT_HEIGHT) -> Image: ... The unnecessary comment is a staple of vibed code, but the t

xdennis 2026-06-14 08:04 3 原文
AI 资讯 Dev.to

PostgreSQL 22P01 Error: Causes and Solutions Complete Guide

PostgreSQL Error 22P01: Floating Point Exception PostgreSQL error code 22P01 is raised when a floating-point operation produces an exceptional result that cannot be represented as a valid number. This typically occurs during division by zero on float types, operations involving NaN (Not a Number), or arithmetic that yields Infinity . It is most commonly encountered in analytics, financial calculations, and data pipelines processing external or sensor data. Top 3 Causes 1. Division by Zero on Float Types Unlike integer division (which raises 22012 ), dividing a float by zero triggers a floating-point exception. This is especially common in ratio and rate calculations where the denominator can become zero at runtime. -- Problematic query SELECT total_sales :: float / total_orders :: float AS avg_order_value FROM daily_stats ; -- Safe fix using NULLIF SELECT date , total_sales :: float / NULLIF ( total_orders , 0 ):: float AS avg_order_value FROM daily_stats ; 2. NaN Values in Arithmetic Operations Data ingested from external systems, CSVs, or APIs may silently introduce NaN values into float columns. Once NaN participates in arithmetic, results become unpredictable and can trigger exceptions downstream. -- Detect NaN values (NaN is the only value not equal to itself) SELECT id , value FROM sensor_readings WHERE value != value ; -- Replace NaN with NULL safely UPDATE sensor_readings SET value = NULL WHERE value != value ; -- Filter NaN in aggregations SELECT device_id , AVG ( value ) FILTER ( WHERE value = value ) AS clean_avg FROM sensor_readings GROUP BY device_id ; 3. Infinity Arithmetic Conflicts Storing 'Infinity'::float or '-Infinity'::float is valid in PostgreSQL, but performing certain operations on them produces mathematically undefined results (e.g., Infinity - Infinity = NaN ), which can cascade into a floating-point exception. -- Check for Infinity values SELECT id , measurement FROM raw_data WHERE measurement IN ( 'Infinity' :: float , '-Infinity' :: float

umzzil nng 2026-06-14 08:02 11 原文
AI 资讯 Dev.to

agentic workflows are being domesticated by actions

GitHub's Agentic Workflows preview has the kind of headline that makes people reach for the wrong conclusion. Natural language Markdown can turn into GitHub Actions workflows. That sounds like "the YAML is going away." I do not think that is the interesting story. The interesting story is that the agent is not escaping the workflow engine. It is being pulled into it. That matters because a lot of agent demos still pretend the future is a smart process floating above the boring machinery: the agent understands the request, edits the repo, runs some commands, and hands back a neat result. Nice demo. Very clean. Production engineering is not clean like that. Production engineering has permissions, logs, runner groups, approval rules, secrets, firewalls, budgets, weird old repositories, compliance questions, and someone who has to explain what happened when the helpful automation did something surprising. So the shape of Agentic Workflows is useful precisely because it is less magical than the demo version. GitHub is putting agents inside the same CI/CD world that already carries a lot of organizational trust. That is the right direction. markdown is not the control plane The cute part is that a developer can describe a workflow in Markdown and have GitHub turn that into standard Actions YAML. That is useful. YAML is not a personality test, and most teams have better things to do than memorize every Actions syntax edge case. But Markdown is only the input surface. The control plane is still Actions. That distinction matters. If the generated workflow is a normal Actions workflow, then all the existing machinery can still matter: repository permissions, runner selection, logs, environments, approvals, branch protection, organization policy, and whatever security controls the company already built around CI. This is where I get more optimistic about agentic tooling. The bad version of agents asks every organization to trust a new, parallel execution model because the mode

Paulo Victor Leite Lima Gomes 2026-06-14 08:01 11 原文
AI 资讯 Dev.to

Why Your Business Needs an AI Integration Strategy (Not Just an AI Tool)

The hype cycle for AI adoption in businesses often follows a familiar, and often frustrating, trajectory. It begins with the undeniable allure of a powerful new tool—seeing ChatGPT effortlessly summarize documents or Copilot intelligently autocomplete code is undeniably impressive. The immediate reaction is almost universally: "We need to get AI." So, tools are procured, workshops are run, and initial enthusiasm soars. Yet, more often than not, six months down the line, that excitement has waned, and the needle on actual business transformation hasn't moved. The fundamental operational rhythm of the organization remains unchanged. As a Senior IT Consultant and Digital Solutions Architect with over a decade of experience, I've observed this pattern repeatedly across various client engagements. This isn't a failure of the technology itself, but rather a profound strategy failure . It’s the single most common and costly mistake I encounter in AI adoption today. The Critical Distinction: Tool Acquisition vs. Strategic Integration Think of buying an AI tool like purchasing a state-of-the-art machine for a workshop. Its inherent value is immense, but if it sits in a corner, unused or without a defined process around it, that value remains entirely theoretical. It's an expense, not an asset generating return. Real AI integration , on the other hand, is a disciplined, multi-faceted endeavor. It's about deeply understanding your existing business processes, meticulously identifying precisely where intelligent automation can create genuine, measurable leverage. It involves designing a holistic system that delivers this leverage, and critically, establishing robust mechanisms to measure the actual outcomes against predefined business objectives. This holistic approach is strategy. The tools—be it an LLM, a specific AI platform, or an automation suite—are merely components that strategy carefully selects and orchestrates to achieve a greater aim. Where AI Integration Truly Crea

Michael Laweh 2026-06-14 08:01 10 原文