惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Scott Helme
Scott Helme
N
Netflix TechBlog - Medium
AI
AI
Security Latest
Security Latest
GbyAI
GbyAI
P
Proofpoint News Feed
Y
Y Combinator Blog
A
Arctic Wolf
G
Google Developers Blog
U
Unit 42
爱范儿
爱范儿
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
V
Vulnerabilities – Threatpost
Know Your Adversary
Know Your Adversary
Cisco Talos Blog
Cisco Talos Blog
T
Tor Project blog
C
CXSECURITY Database RSS Feed - CXSecurity.com
T
Threatpost
L
Lohrmann on Cybersecurity
C
CERT Recently Published Vulnerability Notes
C
Check Point Blog
B
Blog RSS Feed
The GitHub Blog
The GitHub Blog
Microsoft Azure Blog
Microsoft Azure Blog
博客园 - 【当耐特】
博客园 - Franky
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
C
Cisco Blogs
云风的 BLOG
云风的 BLOG
NISL@THU
NISL@THU
D
Darknet – Hacking Tools, Hacker News & Cyber Security
Microsoft Security Blog
Microsoft Security Blog
T
The Blog of Author Tim Ferriss
阮一峰的网络日志
阮一峰的网络日志
Latest news
Latest news
L
LINUX DO - 最新话题
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
美团技术团队
WordPress大学
WordPress大学
L
LangChain Blog
Stack Overflow Blog
Stack Overflow Blog
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
酷 壳 – CoolShell
酷 壳 – CoolShell
大猫的无限游戏
大猫的无限游戏
The Hacker News
The Hacker News
Simon Willison's Weblog
Simon Willison's Weblog
V
V2EX
Project Zero
Project Zero
博客园_首页

Hacker News: Show HN

PurrrrrFocus: Pomodoro Timer App - App Store Workflow Engine — Multi-Step Orchestration for Bun RapidPhoto: Pro Photo Editor App - App Store GitHub - DheerG/swarms: Achieve extraordinary results with claude code across a variety of tasks SPICE simulation → oscilloscope → verification with Claude Code — Lucas Gerads Show HN: VCoding – A 5 MB native Windows IDE with no dynamic dependencies Show HN: LLMs don't hallucinate because they're bad at math, it's the format GitHub - Agent-FM/agentfm-core: AgentFM is a peer-to-peer network that turns everyday computers into a decentralized AI supercomputer. AgentFM lets you run massive AI workloads directly across a global mesh of idle CPUs and GPUs. Show HN: Tracking Top US Science Olympiad Alumni over Last 25 Years GitHub - Potarix/agent-hub: One place to talk to all your agents Show HN: Runtime security for AI agents(injection,tool abuse, data exfiltration) GitHub - dubeyKartikay/lazyspotify: Terminal Spotify client for macOS and Linux GitHub - the-banana-tool/king-louie: Easy to use GUI Personal AI Assistant. Win/Linux/Mac. Show HN I made my vacation rental bookable by AI agents–no Airbnb, 0% commission GitHub - basteez/jsf-autoreload: maven plugin to enable hot reload on jsf projects uvm32/hosts/host-gdbstub at main · ringtailsoftware/uvm32 GitHub - labsai/EDDI: Config-driven engine that turns JSON into production-grade AI agents. Multi-agent orchestration, 12+ LLM providers, MCP/A2A protocols, RAG, persistent memory, and enterprise compliance (EU AI Act, GDPR, HIPAA). Built on Quarkus. GitHub - glitchnsec/fortyone-oss: AI Executive Assistant Platform Quickstart | Alien GitHub - muxshed/shed: One stream in, or many. Every destination, simultaneously. No cloud middleman, no per-channel fees, no limits. GitHub - ocrbase-hq/ocrbase: 📄 PDF/IMG ->.MD/JSON Document OCR API for PaddleOCR and GLMOCR. Self-hostable. GitHub - impactjo/home-memory: MCP server that lets your AI assistant remember everything about your home. GitHub - Sets88/dbcls: DbCls is a powerful terminal database client that supports various databases GitHub - neptun2000/heor-agent-mcp GitHub - SeanFDZ/macmind: Single-layer transformer in HyperTalk for the classic Macintosh RollQuation: Math Puzzles - Apps on Google Play GitHub - dropbox/witchcraft Show HN: Agent-cache – Multi-tier LLM/tool/session caching for Valkey and Redis GitHub - opentalon/opentalon: OpenTalon is an open-source platform built from the ground up in Go as a robust alternative to OpenClaw LinkedIn™ 职位抓取工具 - Chrome 应用商店 GitHub - EdoardoBambini/Agent-Armor-Iaga: AI agents are getting tool access — shell, file system, databases, APIs, secrets. But **nobody is governing what they actually do with it**. Frameworks like LangChain, CrewAI, AutoGen, and Claude Code give agents the power to execute. Agent Armor gives you the power to control, audit, and approve every single action before it happens. HN Vibes — Week 15, Apr 7–13 2026 GitHub - chojs23/ec: Easy terminal-native 3-way git mergetool vim-like workflow GitHub - SethPyle376/hiraeth: Local AWS emulator focused on fast integration testing, with SQS support, SQLite-backed state, and a debug-friendly web UI. GitHub - JakOb-dotcom/cloud-sandbox-security-analysis: Technical analysis and Proof of Concept (PoC) regarding environment variable exfiltration in containerized cloud sandboxes via side-channel data leaks. Springboards - Flint Alpha Show HN: A simpler coding agent harness GitHub - audiodude/sudomake-friends GitHub - 256thFission/mini-mythos: OSS clone of Anthropic’s Mythos harness to locate C/C++ memory vulnerabilities Show HN: OpenParallax: OS-level privilege separation for AI agent execution Hacker News Sorted - Chrome 应用商店 Show HN: How to Install Docker on Ubuntu 24.04 LTS: Complete 2026 Guide GitHub - himanshudongre/smriti GitHub - sverrirsig/claude-control: macOS desktop dashboard for monitoring and managing multiple Claude Code sessions GitHub - ory/dockertest: Write better integration tests! Dockertest helps you boot up ephermal docker images for your Go tests with minimal work. Chiral - Chrome 应用商店 Show HN: Two Claudes collaborating through shared memory on a $100 mini-PC GitHub - pmichaillat/latex-cv: Minimalist LaTeX template for academic CVs GitHub - oguzbilgic/posse: A web UI for Anthropic Managed Agents. GitHub - sshiraz/depsly: Dependency risk analysis tool for npm packages ABI Add safari/agent-harness — Safari browser automation via safari-mcp by achiya-automation · Pull Request #212 · HKUDS/CLI-Anything GitHub - Halfblood-Prince/trustcheck: Verify PyPI package attestations and improve Python supply-chain security GitHub - oguzbilgic/kern-ai: Agents that do the work and show it. GitHub - bruits/satteri: High-performance Markdown and MDX processing for the JavaScript ecosystem GitHub - tylergibbs1/feedstock: High-performance web crawler and scraper for TypeScript, powered by Bun and Playwright GitHub - Grimm67123/grimmbot: The self-improving sandboxed and open-source AI agent. With persistent memory and scheduling. GitHub - whitevanillaskies/whitebloom: Local whiteboard that blooms. GitHub - hwdsl2/docker-whisper: Docker image for a self-hosted Whisper speech-to-text server with speaker diarization and OpenAI-compatible transcription and translation APIs. Powered by faster-whisper. Supports all Whisper models, NVIDIA GPU (CUDA) acceleration, JSON/SRT/VTT output, SSE streaming, offline mode, and multi-arch (amd64, arm64). GitHub - yisding/reviewwiggum GitHub - MarwanAlsoltany/serrors: Structured errors for Go: sentinel hierarchies, typed data, custom formatting, and slog integration. GitHub - soatok/age-php GitHub - Luthiraa/markitme GitHub - stagas/rtdiff: realtime git diff gui and AI-assisted commits GitHub - tombedor/excalicharts GitHub - wh1le/excalidraw-edit: Open and edit .excalidraw files from the terminal. Offline, auto-saves to disk. MalExt Sentry - Malicious Extension Scanner - Chrome 应用商店 GitHub - syi0808/asciianimesvg: Generate animated ASCII art SVGs from text. CLI, Rust library, WASM, and web editor. GitHub - zaina-ml/ml_forge: A visual-based graph node editor for training computer vision models. GitHub - anakin87/llm-rl-environments-lil-course: 🌱 A little course on Reinforcement Learning Environments for evaluating and training Language Models GitHub - takaakit/superpowers-uml: Superpowers-UML modifies Superpowers to ensure a software development workflow in which AI agents design through UML modeling. AdriByte Studio - Sviluppo Web e Soluzioni Digitali GitHub - chouligi/angel-copilot: Your personalized Angel Investment Advisor Show HN: MoodSense AI (ML and FastAPI and Gradio, Deployed on Hugging Face) Moodsense Ai - a Hugging Face Space by aman179102 GitHub - agenteractai/lodmem: Level Of Detail Context Management for Agents GitHub - ostefani/subnetlens: A fast, concurrent network scanner with a TUI and plain-text CLI, built in Go. It discovers live hosts on your network, scans their open ports, resolves hostnames, and fingerprints operating systems—delivered. Cyber Pulse: Agentic Intel - Apps on Google Play Whisper API: Self-Hostable Speech to Text Transcription The Agent-Web Protocol Stack: A Research Thesis GitHub - msmarkgu/RelayFreeLLM: A restful API designed to route user prompts to various AI model providers. Show HN: Provepy – A Python decorator that proves your code using Lean and LLMs Show HN: Pardonned.com – A searchable database of US Pardons GitHub - patrickdappollonio/dux: Dux is a terminal UI that lets you run multiple AI coding agents side by side, each in its own git worktree, with full companion terminals, macros, commit generation, and a command palette that knows more tricks than you do. kMC Crystal Simulator Show HN: HyperFlow – A self-improving agent framework built on LangGraph GitHub - stef41/vibescore: 🎵 Grade your vibe-coded project. One command, instant letter grade across security, quality, dependencies, and testing. GitHub - stef41/lmscan: 🔍 Detect AI-generated text and fingerprint which LLM wrote it. Open-source GPTZero alternative. Zero dependencies, works offline. imgur.com GitHub - visionscaper/collabmem: Enabling long-term collaboration with Agentic AI - building up episodic and world model memory over time with in-context awareness 在 Steam 上购买 FriedrichAI: Offline AI 立省 10% GitHub - atripati/ark: AI Runtime Kernel — a context operating system for AI agents. Eliminates tool bloat, loads only what’s needed, and gives LLMs their reasoning space back. GitHub - nowork-studio/toprank: Open-source Claude Code skills for SEO, SEM, Google Ads GitHub - tacomanator/sash: Lightweight macOS menu bar app for reliably cycling through windows of the current application. Appents | Social Media Management for Product-First Teams GitHub - pnhoang/youtube-spam-blocker: Automatically detects and hides spam messages in YouTube Live chat. Set rate limits, keyword filters, and block repeat offenders. GitHub - decisionnode/DecisionNode: CLI + Local MCP - A shared structured memory store across Claude Code, Cursor, Windsurf, Antigravity, and every MCP client. Semantically queryable. GitHub - AvaCodeSolutions/django-email-learning: An open source Django app for creating email-based learning platforms with IMAP integration and React frontend components. The $100K Gap in Kubernetes Security Tooling Function Calling Harness: From 6.75% to 100%
1990s Game Dev Algorithms for Distributed Systems
cremer · 2026-04-30 · via Hacker News: Show HN

Imagine a global map simulation, a distributed land registry, or a radio frequency allocator. They all share one unbreakable rule: two people cannot own the exact same space. Polygons must not overlap.

Traditional GIS solved this decades ago. But doing it on-chain—inside a strictly consensus-driven network without external servers—has long been considered impossible. Compute limits were simply too strict.

I wrote Mercator, an open-source spatial indexing library for Sui. It lets you register polygons of any shape directly in a smart contract, mathematically guaranteeing zero overlap.

Registering a 4-vertex polygon in Mercator costs about $0.0065. Registering twenty polygons costs exactly the same. The system scales logarithmically, not linearly. To achieve this, I didn't invent anything new. I just borrowed algorithms from 1990s game engines: the Separating Axis Theorem (SAT) for collision detection, and the Morton Z-curve for indexing.

Why are these classic tools only becoming smart contract primitives now? The answer lies in data model architecture. This code simply will not run on EVM, Solana, or Aptos. Here is why.

Wait, Why Do This On-Chain at All?

The obvious question: why not just use Postgres and PostGIS?

If you trust a central authority to arbitrate boundaries, you absolutely should. A centralized database will always be faster. But if you are building a system that requires trustless ownership—like a decentralized frequency allocator, an autonomous world, or a censorship-resistant registry—the spatial guarantee must share the same security model as the ledger.

If your ownership record is on-chain, but your collision detection runs on a central server, the server administrator is the actual owner of the network. They can arbitrarily approve overlapping claims, destroying the asset's value.

Bringing the index on-chain also unlocks atomic composability. A third-party smart contract can dictate: "Execute this complex financial trade only if this exact 50-vertex polygon is successfully registered without overlapping existing claims." If the spatial check fails, the entire transaction rolls back. You cannot do that if the spatial state lives outside the virtual machine.

The Double-Claim Problem

When math gets too heavy, smart contracts usually offload it to external servers (oracles). This works for many tasks, but for spatial rights, it destroys atomicity.

Here is the state vulnerability:

  1. Alice sends a transaction: "Register Polygon A."
  2. The contract asks the oracle: "Is this space clear?"
  3. While the oracle computes (an async delay of several blocks), Bob sends a transaction: "Register Polygon B," which overlaps A.
  4. The oracle replies to Alice: "Clear." It then replies to Bob: "Clear" (Alice's polygon isn't saved in global state yet).
  5. Result: Both Alice and Bob get rights to the exact same territory.

This is an inevitable flaw of asynchronous architecture. "Fast" oracles don't exist: a time gap of even a fraction of a second leaves a window for a race condition.

The only fix is to check for collisions and save the result in the exact same transaction, entirely on-chain. The geometry must be calculated inside the network's virtual machine.

The 1990s Classics: AABB, Quadtrees, and SAT

I ported three classic physics engine algorithms to the Move language. Together, they form a fast pipeline: filter out the noise for pennies, leaving heavy math only for actual collisions.

  1. AABB (Axis-Aligned Bounding Box). The rough filter. We bound each polygon in a simple rectangle. If the rectangles don't intersect, the polygons don't either. This costs just four simple comparisons and eliminates 90%+ of candidates.
  2. Quadtree with Morton Z-curve (1966). Map space is recursively divided into four quadrants. To store this tree in a flat hash table, I use a Morton curve: interleaving the bits of x and y coordinates into a single 64-bit integer. The magic here is that Mercator stores a polygon in exactly one cell—at the depth where it fits entirely inside one square. Insertion and deletion are O(1), regardless of the plot's size.
  3. SAT (Separating Axis Theorem, 1996). The heavy artillery. Two convex polygons do not intersect if and only if you can draw a straight line between them. The algorithm checks axes perpendicular to the polygon edges. As soon as it finds a gap, it stops (early exit).

Crucial detail: All arithmetic in Mercator is integer-based. The Move VM does not support floating-point numbers. While painful for game physics, this is a salvation for distributed consensus. We get strictly deterministic results across all nodes. The on-chain math and the client-side math match bit-for-bit.

The Pipeline

The innovation isn't the algorithms themselves; it's the pipeline. A new registration passes through four filters:

  1. Topology: Polygons must be convex, closed, and not pathologically stretched. Invalid shapes abort immediately.
  2. The "Home" Cell: The algorithm calculates the AABB, traverses the quadtree, and finds the smallest cell that fully contains it. It computes the Morton key here—this is the polygon's address.
  3. Broadphase: To avoid scanning the entire tree, a bitmask (occupied_depths) tracks which tree levels actually contain registered plots. The search skips empty space entirely.
  4. Narrowphase: Finally, for the tiny handful of remaining candidates, SAT is deployed. The first detected overlap aborts the transaction.

For 99% of registrations, step 4 never executes. The AABB and quadtree filter out irrelevant plots instantly, saving compute resources.

Why This Breaks on EVM, Solana, and Aptos

If oracles are out, why not just write a quadtree in Solidity or Rust? Because every major platform kills this idea in its own way:

  • EVM (Ethereum): Transactions execute sequentially, and compute is extremely expensive. Running SAT on EVM hits gas limits immediately. ZK-proofs (proving SAT off-chain) take 5–30 seconds to generate—killing interactivity.
  • Solana: Two fatal blockers. First, Solana requires a static list of all memory cells (accounts) you will read before execution. But a quadtree traversal path is only known during execution. Static lists and dynamic trees are incompatible. Second, Solana has a hard limit of 1.4M CU per transaction. SAT for two 16-vertex polygons takes ~4.5M CU. You cannot optimize that away.
  • Aptos: Aptos uses Move, so you could store the tree in a table. The problem is concurrency. Block-STM executes transactions optimistically but rolls them back on memory conflicts. If Alice and Bob register plots on opposite ends of the map, Aptos still flags a conflict because they are writing to the same global registry table. Parallel registrations degrade into a slow sequential queue.

The root problem: none of these platforms support dynamic runtime access to independent objects without state conflicts.

Sui Architecture: Dynamic Objects

Sui solves this at the object model level. There are no "accounts with tables." Every quadtree node is a separate, independent object.

When a transaction calculates a Morton key, it accesses the required object on the fly—just like a program working with pointers in RAM. Parallelism follows automatically: plots in different quadrants touch different objects. Nodes process them in parallel with zero locks.

The collision check and database write happen in one transaction. Finality takes less than a second. Attackers have no time gap to exploit.

Gas Economics

Tests ran on the Sui Testnet. The minimum compute cost for any transaction on the platform is floored at 1,000,000 MIST.

VerticesCost (MIST)In USD (at $0.93/SUI)
47,045,496~$0.0065
87,531,896~$0.0070
168,504,696~$0.0079
3211,120,296~$0.0103
6420,481,496~$0.0190

Up to 16 vertices, the algorithm runs so fast it simply hits the platform's minimum compute threshold. Costs only rise for complex shapes (32–64 vertices) because SAT scales quadratically. The bulk of the total cost (about 6–7 million MIST) is actually storage, not math.

Fun fact: Register 20 square plots in different locations sequentially, and each transaction costs exactly 7,045,496 MIST. The tree does not degrade as it fills. A million objects on the other side of the continent won't slow down your transaction.

As a bonus, deleting a polygon triggers a storage rebate, refunding part of the gas. The net cost of a "register and delete" cycle is about $0.0019.

Engineering Constraints

This is not a silver bullet. The architecture dictates strict limits:

  1. Convex Decomposition: SAT only works with convex polygons. The protocol supports complex plots (e.g., L-shapes), but registers them as arrays of convex parts. The client-side application must decompose complex polygons before sending the transaction.
  2. DOS Limits: To prevent compute spam, the contract hardcodes strict limits: maximum 64 polygons per tree cell. Registering a 65th plot in an overcrowded square aborts with ECellOccupancyExceeded.
  3. No Privacy: The spatial index is public. If you need to prove non-intersection while hiding coordinates, this approach fails. You would need ZK-proofs, inheriting all their speed compromises.
  4. Flat Coordinate System: The library was built for Web Mercator, meaning the "earth" is flat. This works perfectly for city-sized plots, but projection distortions will break area calculations for polygons the size of Greenland. You can fork the library and use any other 2D coordinate grid (like game boards).

Mercator is open-source. Use it as an out-of-the-box spatial registry, or extract the standalone geometry modules (polygon, sat, aabb) to use independently of the quadtree.

  • GitHub: mercaearth/mercator
  • WASM Client: exact-poly — decomposes complex shapes into convex parts in the browser. It uses the exact same integer math as the smart contract, guaranteeing bit-for-bit identical results.
  • Live Demo (Mainnet): merca.earth — a spatial cadastre built on top of Mercator.

Questions, bug reports, and PRs are welcome in the repository.