Painel de Notícias

Tecnologia

7045 posts · 26 feeds · tópicos e interesse por Jev

Filtros
dev.to

Protocol Upgrade Compatibility Review: Bitfinex

Protocol Upgrade Compatibility Review: Bitfinex Target Protocol: Bitfinex (TVL: $20712.0M) TVL: ≈ $20.7 B (Ethereum + L2) Prepared by: [Your Firm] – Senior DeFi Security Research & Auditing Team Date: 2026‑10‑09 Bitfinex operates a multi‑chain ecosystem that includes the LEO token, a suite of margin‑trading contracts, custodial vaults, and cross‑chain bridge modules (Ethereum ↔ Arbitrum, Optimism, zkSync). The platform is planning a major protocol upgrade that will introduce: Proxy‑based upgradability for core contracts (margin engine, vault manager, bridge adapters). New storage layout to accommodate additional risk‑parameter fields (e.g., dynamic liquidation thresholds). Governance‑driven parameter changes via a DAO‑style timelocked executor. L2‑specific optimisations (compressed calldata, batch‑settlement). Given the size of the TVL and the heterogeneous deployment across L1/L2, any incompatibility or subtle bug in the upgrade path could expose hundreds of millions of dollars to loss or freeze. Our review focused on compatibility between the existing contracts and the proposed upgrade, with a particular emphasis on: Storage‑slot collisions in proxy patterns. Delegatecall/implementation‑contract isolation. Cross‑chain state‑synchronisation (L1 ↔ L2). Governance and timelock security. Interaction with third‑party DeFi primitives (oracles, AMMs, lending pools). Overall, the upgrade design is sound but contains four critical‑to‑high severity issues that could be exploited before or after the upgrade if left unaddressed. The aggregate risk score for the upgrade is 7 / 10 (High). # Vector Affected Component(s) Description Potential Impact 1 Storage‑slot collision in proxy‑based contracts MarginEngineProxy, VaultManagerProxy, BridgeAdapterProxy The new implementation adds three uint256 fields (maxLeverage, liquidationPenalty, l2BatchSize) before the existing uint256 protocolVersion. The current storage layout places protocolVersion at slot 5; the new fields shift it to

SegurançaDev
Interesse
dev.to

Khmer Hybrid Calendar Meets AI: Introducing My MCP Server

I'm excited to share a new milestone in my development journey: Khmer Hybrid Calendar now has its own Model Context Protocol (MCP) server! 🇰🇭 🔗 MCP Endpoint: https://khc.loemheng.com/mcp 💡 From Calendar Application to AI Integration But I began thinking about a bigger possibility. What if AI assistants and other AI-powered applications could access Khmer calendar information directly, instead of relying only on web searches or manually looking up dates? That question inspired me to explore the Model Context Protocol (MCP). Now, I've successfully integrated an MCP server into Khmer Hybrid Calendar, opening a new way for AI applications to interact with Khmer calendar functionality. 🤖 What Does This Mean? With this integration, Khmer Hybrid Calendar can expose its calendar capabilities through MCP tools, making it possible for compatible AI clients to request supported information programmatically. Depending on the tools available, this can include: 📅 Khmer calendar date information< Instead of treating Khmer calendar data as something available only inside a website or application, this approach makes it possible to bring that information into AI-powered workflows. 🛠️ Why I Built This MCP opens opportunities to connect Khmer Hybrid Calendar with AI assistants, developer tools, automation workflows, and other compatible applications. My goal is to make Khmer calendar information easier for developers and AI systems to access, while continuing to build on the existing calendar engine. This is not about replacing the original application. It's about extending its capabilities and creating more possibilities for future integrations. 🌱 What's Next? I'm looking forward to exploring more use cases, improving the integration, and making Khmer calendar technology useful to more people. Sometimes, a small technical experiment can open the door to much bigger ideas. Khmer Hybrid Calendar is no longer just about displaying dates. It's also about exploring how Khmer calen

IA
Interesse
dev.to

Why Your Mac App Keeps Running After You Close the Window (and How I Fixed It)

If you came from Windows, you've probably noticed this: you click the red close button, the window disappears, but the app is still running. There's a small dot under its icon in the Dock, and it keeps using memory until you press Cmd + Q. On Windows, closing the last window quits the program. On macOS it doesn't. I wanted that Windows behavior on my Mac, so I built TrueClose. No. By default, the red close button only closes the window. The app stays open in the background, keeps its place in the Dock, and keeps using RAM. Apple designed it this way so apps can reopen instantly, but if you never use that, it's just clutter. TrueClose is a small, free, open-source menu bar app for macOS. When you close an app's last window, it quits the app after a short delay. Features: Adjustable delay (0.2–5 seconds): so closing one window right before opening another doesn't quit the app by mistake Blacklist or Whitelist mode: keep music players and menu bar tools running, or only auto-quit the apps you choose Protected system apps: Finder, System Settings, Activity Monitor and similar apps are on the default blacklist, with a warning if you change that Pause/Resume from the menu bar, launch at login, and an option to hide the menu bar icon (reopen Settings with ⌥⇧A) Free, MIT licensed, no telemetry TrueClose uses the macOS Accessibility API to count how many windows each running app has. When an app drops to zero windows, TrueClose starts a timer. If the app still has no windows when the delay ends, TrueClose asks it to quit with NSRunningApplication.terminate(). That call is a normal quit request, the same as pressing Cmd + Q. Apps can still ask about unsaved changes instead of being force-killed. If an app doesn't quit, TrueClose tries again on the next check. With Homebrew: brew install --cask nhatnam7kz/tap/trueclose Or download the .pkg / .dmg from the Releases page. TrueClose isn't signed with a paid Apple certificate, so macOS may block it on first launch. Run this once t

Dev
Interesse
dev.to

Whistle: A 16.9 MB Speech-to-Text Model That Runs on Any CPU (Hands-On Test)

Say you set up your agent stack to accept voice notes, the way most voice-first projects start. The plan is predictable: record audio, hit a transcription API, get text back. At $0.006 per minute it sounds free, until you remember that a voice-first agent loop transcribes everything it hears, including the garbage. Then a post hits the Hacker News front page and stops you: a speech-to-text model called Whistle that ships as a single 16.9 MB file, runs on CPU with zero dependencies, and claims accuracy numbers that beat Whisper base. 16.9 MB is smaller than the icon assets in most apps. A claim like that deserves testing, not retweeting. So this piece is a verification: the model was installed on a plain Linux VPS (no GPU, no special tooling), real audio went in, and every command and output below is reproduced verbatim from that test. The cached model file transcribed a public speech recording correctly and returned word-level timestamps, warm, in under 10 seconds on a commodity CPU. Full disclosure before anything else: the hands-on test in this article was executed by an AI assistant during research for this piece, not in a production deployment. What is confirmed: the install path, real transcription output, timestamp output, and keyword biasing. What is vendor-reported: every accuracy number in the benchmark tables, and all latency figures from the maker. Both kinds are labeled as they appear. Whistle is an open-source (Apache 2.0) speech recognition model from Cactus Compute, released October 2, 2026. It does three jobs on the device, with no network call: Transcription. 16 kHz mono audio, up to 30 seconds per pass, in seven languages: English, German, French, Spanish, Italian, Dutch and Polish. The language is auto-detected unless you pin it. Word timestamps. Every word comes back with a start time, end time, and probability score. Speech embeddings. The encoder output, one row per 80 ms of audio, for search and matching without generating a transcript at all.

IADevLinux
Interesse
Hacker News

Keyboard differences between Windows and Macs

Article URL: https://unsung.aresluna.org/deeper-dive-keyboard-differences-between-windows-and-macs/ Comments URL: https://news.ycombinator.com/item?id=50015515 Points: 5 # Comments: 1

Geral
Interesse
Hacker News

Anger as man sentenced to death for Facebook comment

Article URL: https://www.themirror.com/news/world-news/anger-man-sentenced-death-facebook-2060304 Comments URL: https://news.ycombinator.com/item?id=50015486 Points: 26 # Comments: 11

Geral
Interesse
dev.to

Paper Walk: Print a Card, Leave Your Phone, Go Outside

This is a submission for the Hacktoberfest Open-Source AI Challenge Week 1: Touch Grass Paper Walk is a small web page that makes a printable walk card. You choose how much time you have (10 minutes, 30 minutes or an hour), where you are (home, street, park, water or forest), your area, and how you feel. A small open-weight model running on your own computer writes a few short prompts such as "Find three different shades of green" or "Listen for the farthest sound you can hear." You print the card, put your phone in your pocket, and go. The screen part takes about a minute and the rest happens in the world, so the screen really is the shortest part of the experience. After the walk you can save a one-line note about what you noticed. The next card builds on your earlier notes and avoids repeating them. It's for anyone who is bored at home or stuck in a screen habit and wants a small, low-effort reason to look around. I built it for myself first, in Patna, Bihar. Code https://github.com/jeetsingh008/PaperWalk It's a single HTML file with no dependencies. Run it with Ollama and a small model; the steps are in the README. Model: gemma3:1b, an open-weight model, run locally with Ollama. App: one HTML file with plain JavaScript. It sends your choices (time, place, area, mood, and your last five walk notes) to Ollama's local API and turns the reply into a printable card. Fallback: if no model is running, the page uses a small built-in list of prompts, so it still works offline. Memory: walk notes are saved in the browser's local storage and never leave the device. The hard part was the model, not the code. My first version produced prompts with invented details, like a faded tiger mural on a wall near me, because a 1B-parameter model can't see my surroundings and simply guesses. It also ignored my "bored at home" setting at first. Telling it what not to do barely helped, but giving it a few examples of the style I wanted worked much better. The final card gave plain promp

IA
Interesse
dev.to

Running LaMa Inpainting and Real-ESRGAN in the Browser: Tiles, Memory Walls, and the Optimizations We Threw Away

We build ClearPix, a set of media cleanup tools that run entirely in the browser — no uploads, no server GPUs. That means when a user removes a watermark, a 198MB LaMa inpainting model runs inside their tab, and when they upscale an image, Real-ESRGAN runs next to it in the same JavaScript heap. This post is about what it actually takes to ship that: why we pin a flagship inpainting model to WASM on purpose, how tiled inference keeps large images from blowing up the tab, which "obvious" optimizations we benchmarked and threw away, and the one rule that saved us repeatedly — profile before you touch anything. Server-side model selection is mostly about quality-per-FLOP. In the browser that framing breaks down completely. Our constraints, in order of how often they bite: Memory. Model weights, WASM linear memory, tensors, source image, and output canvas all live in one renderer process. A 4K image alone is ~33MB as RGBA. Hold a large ONNX session open at the wrong moment and Chrome kills the tab — no exception, the page just vanishes. Driver stability. A WebGPU session that creates successfully says nothing about whether session.run() will return. We've seen big models deadlock mid-inference on specific GPU/driver combinations with no error at all. FLOPS. Barely matters. Our profiling keeps showing browser inference is memory-bandwidth-bound, not compute-bound. This is why our model choices look odd from a papers-first perspective: we run Real-ESRGAN's compact general-x4v3 variant instead of the classic RRDBNet x4plus — the "weaker" model won every acceptance case while running an order of magnitude faster, because "fast in the browser" is a property of the architecture, not the runtime. The full model-selection benchmark (and what happened when we later quantized the winner to fp16) is part 3 of this series; here we focus on what those models cost once they're loaded. Our watermark remover ships two inpainting engines, and we picked them on a bench suite rather than

IADev
Interesse
dev.to

You Backed Up the Database. You Did Not Back Up the Application.

The IT manager at a plant in Dongguan called me on a Wednesday afternoon. Six hours earlier one of her admins had run a bulk update against an inspection table with the wrong filter attached, and sixty thousand rows now carried a blank where a measurement should have been. "I do not need you to restore the server," she said. "I need you to restore that one table from last night. Everything else — the other thirty applications, the production dashboard, the approval queues — has to keep running. Can you do that?" I told her I would get back to her. It took four days, and most of the work was manual. That is the phone call I think about whenever someone asks whether our platform has backups. We did. There was a cron job that ran at two every morning and wrote two database dumps to a folder, exactly as our own documentation describes. What we did not have was a way to give her the thing she actually asked for. Here is the uncomfortable arithmetic. When you dump the platform database, you have captured part of the state. Not the whole of it. Our platform keeps identity and permissions in one library and business data in another — two dumps, two files, two things that have to stay consistent with each other. In larger deployments the business library is already numbered, because it shards. The uploaded files, the scanned certificates, the photos people attach to records, live somewhere else entirely: object storage in a bucket, plus a local file directory that some installations still rely on. And the search index is derived, so we tell ourselves it does not need a backup — which is true right up until you restore and somebody notices the search box has gone quiet. So "we back up the database" is a sentence that describes roughly half of the stateful parts of the system. It happens to be the half that is easiest to describe, which is why it is the half everyone stops at. The missing pieces are not exotic. They are just boring enough that nobody owns them. The attachments

InfraDev
Interesse
dev.to

System design for physical AI: forecasting construction schedule slips with edge vision and an open-weight model

This is the engineering summary of an open reference architecture. The paper, its object model as JSON and the model register are free to reuse under CC BY 4.0: https://codeatoms.ai/structure-phase-construction-saudi-arabia/. The operator is an illustrative scenario, not a customer. A precast and site logistics joint venture is in the structure phase of a large mixed use district in the Riyadh region. Fourteen tower cranes, six crawler cranes, a precast yard, a batching plant and a fleet of trucks on one haul road. A slip is found at the Thursday look-ahead meeting, a week after it starts, and a near miss reaches safety on a form filed the next day. The data to see both earlier already exists. It just lives in twelve places that never meet: Primavera P6, batch plant SCADA, a casting bed spreadsheet, an Excel lift schedule, crane anti-collision logs, haulage GPS, paper gate logs and permits, biometric turnstiles, cameras. Here is how that turns into a system. Every source enters through one of three adapter families (telemetry, integration, and file and document), never directly, and all three publish onto one Kafka backbone so a paper gate log and a batch ticket arrive with the same guarantees. The adapters write fifteen typed objects: tower crane, crawler crane, casting bed, precast unit, truck, batch ticket, P6 activity, permit, observation form, gate movement, delivery window, lift schedule entry, pour, worker and zone. The pour is the focal object. Start at a pour marked Delayed and one traversal reaches the batch tickets behind it, the precast units and their curing state, the P6 activity and its float, the delivery windows and trucks, and the cranes that idled while it waited. The same query continues into the zone, its active permits and the workers present. A document store can hold every record and answer none of that. The object model ships as JSON (ontology/objects.json, format hyper-ontology/1) so you can load it instead of redrawing it. Tier Hardware Ru

IADev
Interesse
dev.to

We ran 329 x402 GPU jobs in one sitting. 200 landed.

Today we ran our biggest live test of Kilawatt Cloud so far. An autonomous agent paid for GPU jobs with x402 (USDC on Base), sent them through our gateway, and we counted what actually happened. The numbers, straight from our database: 329 jobs attempted, each one paid for through x402. 200 jobs landed, meaning the machine reached a ready state. That's about 61 percent. $17.73 paid in total, with $1.82 refunded automatically on jobs that never became ready. Four GPU suppliers were in the routing mix. We also ran 8 long stability jobs alongside the launches, and all 8 stayed healthy. What this was, and wasn't: This was our own test, run from our own wallet. It is not customer traffic, and I'm not presenting it as demand. It is evidence that the payment, routing and refund path works under load, with real money and real hardware. What we learned: The 129 jobs that didn't land are the most useful part of the data. Some suppliers had streaks of machines that never became ready, and one supplier we had to pause under a spend cap. Because the refund path worked, those failures cost us cents and not trust. That's the point of routing across multiple suppliers. We started the day aiming for 100 landed jobs and ended at 200. Next run, we're aiming for 400. If you build agents that need to buy compute on their own, I'd like to hear what breaks for you. The full run report, with the results by supplier, the hardware health data and the failures, is on our Super Intelligence page: https://www.kilawattcloud.dev/super-intelligence Our MCP server is also on npm as kilawatt-mcp-server.

Infra
Interesse
dev.to

Building a Telegram Bot for AI Video Generation: Architecture and Lessons Learned

Building a Telegram Bot for AI Video Generation: Architecture and Lessons Learned After months of building and iterating on a Telegram-based AI video generation platform, I want to share the technical architecture, challenges encountered, and lessons learned. The system consists of four main components: 1. Telegram Bot Interface Built with Python python-telegram-bot library Handles user authentication, session management, and conversation flow Supports text prompts, image uploads, and parameter adjustments 2. Model Aggregation Layer Integrates multiple AI video models: Kling, Runway, Seedance, Veo, Wan Unified API abstraction layer for consistent interface Model selection based on user preferences and prompt analysis 3. Queue and Processing System Redis-based job queue for handling generation requests Async processing to handle multiple concurrent users Progress tracking and status updates via Telegram callbacks 4. Storage and Delivery Generated videos stored in cloud object storage Signed URLs for secure delivery Automatic cleanup after 7 days Challenge 1: Rate Limiting and Throttling class RateLimiter: def __init__(self, max_requests, window_seconds): self.max_requests = max_requests self.window_seconds = window_seconds self.requests = [] async def acquire(self): now = time.time() self.requests = [r for r in self.requests if now - r = self.max_requests: wait_time = self.window_seconds - (now - self.requests[0]) await asyncio.sleep(wait_time) self.requests.append(time.time()) Challenge 2: Video Generation Timeout Challenge 3: Cost Management User experience matters more than features - The chat-based interface reduced onboarding time by 80% compared to traditional web apps Model diversity is a feature - Users appreciate being able to compare outputs from different models Async is essential - Synchronous processing cannot handle the latency of AI video generation Error handling needs to be user-friendly - Translate technical errors into actionable user messages Tele

DevIA
Interesse
dev.to

Stop pasting other people's agent skills into your repo as-is

Agent skills (the SKILL.md files that Claude Code and Codex load) are easy to share, and GitHub is full of them. Each one was written for its author's project, with their stack, their scripts and their habits. Copy one into your repo unchanged and your agent inherits all of that. A frontend skill tells it to reach for Tailwind when you use CSS modules. A workflow skill says "run the tests" when your project calls it pnpm test:unit. A cleanup skill says "delete unused files" while your AGENTS.md says never to touch docs/. I built skilladopt to fix the skill before it goes in. npx skilladopt anthropics/skills frontend-design It fetches the skill at a pinned commit and hands the text, plus a short summary of your project, to an isolated Claude or Codex worker. The worker makes one decision per paragraph: Decision Meaning keep stays as written bind a generic command becomes yours: "run the tests" → "run npm test" rewrite the intent applies, the details don't (you always approve these) drop doesn't apply here, with the reason review the AI wasn't sure, so you decide Each decision has to cite evidence from your repo: a dependency, an npm script, a line in AGENTS.md or CLAUDE.md. Then plain code checks the answer. A bind may insert exactly one command that really exists in your project and must leave the rest of the sentence identical. A "stack mismatch" drop must point at something your project actually lacks. Paragraphs that carry a duty (a prohibition, an approval step, a verification step) are never dropped or rewritten without you. Nothing from the skill is executed, and the worker runs without tools (claude -p --safe-mode) or in a read-only sandbox (codex). Your teammate renames the test script and adds a rule to AGENTS.md. npx skilladopt impact Because every decision recorded its evidence, skilladopt can tell which ones no longer hold. In the demo run that's 1 decision out of 25, plus the new rule that might conflict. You re-check those lines and leave the rest alon

IADev
Interesse
dev.to

Anthropic rolls out 3-tier access for cyber models

Anthropic is folding its Cyber Verification Program and Project Glasswing into one offering, with three tiers of access to its most capable models for security teams that can prove who they are. The company updated the program in October 2026 and said the change is live for Claude Opus 5.5, Claude Sonnet 5.5, Claude Mythos 5.1, and new models going forward. Until now the two programs ran separately. Glasswing gave organizations securing critical software access to Claude Mythos. The original Cyber Verification Program loosened safeguards on Opus and Sonnet for approved teams. Under the new structure every tier includes those frontier models, but verification requirements and security controls differ. Defense Access covers security operations, incident response, malware reverse engineering, and vulnerability analysis. Eligible applicants include teams defending their own systems, critical-infrastructure operators, small security firms, open-source maintainers, and individual researchers with a history of reported bugs. Anthropic says it aims to answer those applications within a few days. Red Team Access adds authorized penetration testing, limited to systems the organization is allowed to test. Actions that could cause physical harm or mass disruption, including ransomware deployment, stay blocked in real time. A webinar on the program is scheduled for October 14 at 9 a.m. PT. First-party access runs through Claude.ai, Claude Code, and the Anthropic API. Amazon Bedrock availability is limited to customers with Enterprise Frontier Safeguards. Frontier labs have spent two years tightening classifiers that stop models from helping with intrusion. Those same classifiers block defenders who need the model to read malware, trace an exploit, or draft a detection rule. Anthropic's answer is not to drop the guardrails. It is to identify the user and then relax them. The three-tier design is an attempt to match capability to trust. A SOC analyst reversing a sample is a differ

IASegurança
Interesse
dev.to

NVIDIA pledges $1 billion for U.S. science compute under the Genesis Mission

NVIDIA said on October 8, 2026, that it will commit $1 billion over five years to U.S. research in super intelligence for science and quantum computing. The White House the same day listed that figure inside a broader $2.4 billion package of science tools and compute credits from eleven companies for the Genesis Mission Consortium. NVIDIA's newsroom said the commitment was announced at the Science: A New Golden Age event in Washington, D.C. The company described the $1 billion as support for higher-education research institutions, American quantum leadership, and cloud providers working on U.S. government mission needs. Fields named in the release are quantum computing, healthcare, and energy security. A White House fact sheet published October 8 said the administration announced $2.4 billion in "SI for science tools and compute credits" from eleven industry partners, meant to support more than 15 federal agencies working on National Science and Technology Challenges. The fact sheet's industry list is NVIDIA at $1 billion, AMD at $500 million, OpenAI at $200 million, Anthropic and Google at $150 million each, AMP and Emerald AI at $100 million each, and AWS, Armada, Crusoe, and Micron at $50 million each. Those partner figures are White House disclosures, not separate press releases TechPulse reviewed for every company. NVIDIA's own release confirms its $1 billion commitment and the five-year window. It does not itemize how much is cash, how much is GPU or cloud credits, or the delivery schedule inside the five years. NVIDIA said it is a collaborator on a number of phase 2 Genesis Mission awards announced at the event, including projects in quantum computing, fusion, accelerator design, and microelectronics. It also said the commitment builds on more than two decades of work with U.S. national laboratories, and on a partnership with the Department of Energy announced last year that includes work at Argonne National Laboratory, plus support across Argonne and Los Ala

IA
Interesse
dev.to

Hosted Application Logging: 5 Node.js Postgres SaaS API Rollback Decisions

TL;DR: Choose a hosted searchable log store with a small, vendor-neutral Node.js contract when manual review is acceptable. For a media SaaS, the deciding constraint is rollback safety: API requests, background publication workers, and scheduled jobs must leave enough shared evidence to explain which release changed an asset and whether the rollback completed. Keep heartbeat monitoring separate, and require a documented European data location before sending production records. The useful target is not "collect everything." It is a compact incident record that survives a provider change. That keeps observability work subordinate to shipping weekly, where it belongs for a one-person SaaS. A failed media release crosses several processes. The API accepts an edit, Postgres records a revision, a worker publishes renditions, and a cron job may expire or refresh them. Searching four process outputs independently makes the timeline hard to trust. Start with the question an incident review must answer: which release acted on which asset, under which trace, and what was the outcome? A useful event therefore carries occurred_at, service, event, release_id, asset_id, trace_id, and outcome. Store identifiers, not article bodies, access tokens, or customer email addresses. This matters because the logging option described below has no per-user deletion API, bulk export, or subscription interface. Its retention and cold-storage settings also have no configuration entry point. That makes data minimization a design requirement, especially when European residency and erasure obligations apply. One rule earns its keep: deploy the schema before the vendor adapter. A stable event contract means the logging backend can move without rewriting the API, worker, and cron call sites. A trace ID joins records only when every component propagates it. It does not prove that a scheduled task ran, and a list of matching lines is not a distributed trace or span tree. The hosted option in this compa

InfraDev
Interesse
dev.to

Steelmanning the case against on-chain AI verification

1/12 I get paid for work that an AI jury verifies on chain. That means I have every incentive to sell you the idea that verification belongs on a blockchain. So let me do the opposite first: I will make the case against it as strongly as I can, and only then say what survives. Three objections, each stated at full strength before any answer. Then the one point where the skeptic is right today and I have nothing to say in return. 2/12 - Objection one: the oracle problem is not solved by a signature That last part is what makes this objection worse rather than better. A wrong claim in a private chat is a wrong claim. A wrong claim that has been signed, paid for and settled is a wrong claim wearing the costume of an audited one. The mechanism does not reduce the lie; it launders it. Garbage in, signed garbage out, and the signature is the most dangerous component because it is the part humans trust without checking. There is a second, quieter version of the same objection: an AI jury grading a factual claim is a model guessing about a world it cannot observe. Ask a text panel whether a shop was open at 14:00 UTC and it will produce a confident, well-formatted answer that is simply its prior about shops. The system pays for that answer. 3/12 - What answers the oracle objection What that still does not fix. A pinned lie is still a lie. Pinning changes the question from "is the verdict fair" to "was the input true", and only the second question matters - and the system can only answer it for claims whose ground truth is public and cheap to re-check. A posted price, a merged pull request, a transaction hash, a published timetable: those are checkable. Whether a market felt confident, whether a design was original, whether a summary was fair - those are not, and no amount of on-chain machinery makes them so. Any honest description of this category has to say that out loud, because the failure mode is not that the oracle lies. The failure mode is that it answers anyway. 4/12

IA
Interesse
dev.to

Edge-Agentic Commit Analyzer: A Zero-Dependency Local Guardrail

Edge-Agentic Commit Analyzer: A Zero-Dependency Local Guardrail Why "Daemonless and API-less"? The modern development environment is bloated with background services. Daemons run constantly, silently devouring memory resources. However, for "just-in-time checks"—such as grasping the semantic intent of code changes, catching dangerous placeholders, or detecting missing test coverage—an event-driven, one-shot script is more than sufficient. The architectural requirements for this tool were strictly defined as follows: 100% Local Execution: Zero communication with external APIs. This physically blocks any potential leaks of sensitive intellectual property or credentials. Sub-second Response Time: The entire lifecycle, from execution to JSON output, must complete in under 10 seconds (optimally in milliseconds). Minimal Footprint: Complete elimination of complex dependencies. The tool must operate flawlessly using only Python standard libraries and fundamental Git commands. Building this tool was far from a smooth process. To satisfy the dual requirements of absolute determinism and safety in a lightweight local environment, we encountered and resolved several critical bottlenecks. In the initial prototype, handling subprocess.run taught us a painful lesson. Attempting to carelessly execute git diff --cached with shell=True resulted in explosive UnicodeDecodeError exceptions, particularly in environments containing multi-byte characters in commit messages or file paths. Furthermore, to completely eradicate OS-level shell injection vulnerabilities, a forced migration to shell=False was absolutely mandatory. Additionally, silencing CalledProcessError when executed in environments lacking Git binaries or outside a Git repository would cause fatal crashes in subsequent parsing phases. Consequently, we refined the architecture to safely catch these exceptions as string error messages, transforming them into a structured logging format that downstream pipelines can handle dete

Dev
Interesse
dev.to

Building Reliable Background Jobs with Node.js

Background jobs are essential when a Node.js application needs to perform work without making the user wait for the result. Sending emails, processing reports, resizing images, generating invoices, syncing external APIs, and cleaning temporary data are all good candidates for asynchronous processing. The key idea is simple: move expensive or non-critical work away from the request-response cycle. In this article, we will build a small in-memory background job queue using only Node.js, while covering job states, retries, concurrency, failures, and graceful shutdown. A background job system usually has three important parts: a producer that creates jobs, a queue that stores pending work, and a worker that processes jobs. In production, the queue is commonly backed by Redis, a database, or a dedicated message broker so jobs survive application restarts. For this example, we will keep the implementation intentionally small and dependency-free. The queue will support configurable concurrency, job status tracking, automatic retries, and graceful shutdown, making it useful for understanding the architecture before introducing tools such as BullMQ or RabbitMQ. A job should contain enough information for the worker to execute it independently from the original request. The worker should also treat failures as expected events rather than crashing the entire process. Retry limits are especially important because repeatedly retrying a permanently invalid job can create unnecessary load and prevent healthy jobs from progressing. The example below simulates email processing with random failures. Run it with a recent Node.js version using node background-jobs.js, then observe how jobs move through queued, processing, completed, and failed states while the worker controls how many jobs execute concurrently. const { randomUUID } = require('node:crypto'); // Simple in-memory queue for demonstrating background job concepts. class JobQueue { constructor({ concurrency = 2, maxRetries =

Dev
Interesse
dev.to

Server State vs Client State in React: Why TanStack Query Changes Everything

title: "Server State vs Client State in React: Why TanStack Query Changes Everything" For years, front-end developers treated remote data fetched from a backend API the same way they treated local application state, such as form inputs, modal toggles, or theme settings. This architectural confusion led to the rise of massive Redux stores designed to hold normalized API responses, accompanied by endless boilerplate: action types, action creators, reducers, and asynchronous middleware like redux-thunk or redux-saga. However, remote data is fundamentally different from local state. Remote data lives on a server outside your control, can be updated by other clients, and requires asynchronous network operations that can fail, timeout, or become stale. This article examines the architectural shift required to separate Server State from Client State, and how libraries like TanStack Query (formerly React Query) eliminate boilerplate while dramatically improving application performance and user experience. To build resilient React applications, you must recognize the distinct characteristics of these two state domains: Feature Client State Server State Ownership Explicitly owned by the client. Owned remotely; the client only holds a snapshot. Persistence Session-based, volatile or stored locally (localStorage). Persistent in a database. Latency Instantaneous (synchronous memory access). Asynchronous over a network with variable latency. Staleness Never stale unless the app's logic explicitly invalidates it. Always at risk of becoming stale the moment it is fetched. Sharing Typically local to a component or subtree. Shared globally across multiple users and components. When you force server data into a global client state store like Redux or Zustand, you take on the burden of manually managing loading states, error handling, race conditions, deduplication, and cache invalidation. Consider what it takes to fetch a list of user profiles using traditional Redux: // 1. Action Typ

Dev
Interesse
dev.to

Backend Failures Explained: Detect Error Logs and Missing Scheduled Imports in Node.js

An error-log poller can alert on a failed import, but it cannot tell you that an import produced nothing when no error was emitted. For scheduled media imports, record each run's start, completion, and result count; poll those records alongside errors, then send one webhook notification per missed deadline or failed run. Keep the run ID and region in the alert so the incident can be reconstructed later. TL;DR: Treat silence as a missing expected result, not as proof that the backend is healthy. A scheduled import that never started, one that crashed before logging an error, and one that completed with zero items need different diagnoses. A poller can make those distinctions only if the import writes explicit lifecycle records. Imagine an import scheduled for 02:00 in the US region. The scheduler fails before it calls the worker. No worker exception exists to query. A search for level=error returns an empty page, which looks exactly like a clean run to a naive watcher. That's the trap. The useful unit of observation is the scheduled run, not the individual exception. Assign an ID derived from the job, region, and scheduled slot; record started and completed events under that ID. Completion should include the count of accepted results. An explicit zero is different from no completion record: zero might be a legitimate empty feed, while no completion means the run is unresolved. Define the expected deadline and the policy for zero results with the people who own the feed. Neither can be inferred from a generic error message. For example, if the worker records started and then dies, the missing completion points toward execution; if neither event exists, start with the scheduler or the event pipeline. If completion exists with zero accepted items, investigate the upstream feed and validation policy. Those are three different paths through an incident, even though a generic error search could return the same empty result for all three. Empty logs prove little. This shift

Dev
Interesse
Hacker News

What should we tell our students?

Article URL: https://terrytao.wordpress.com/2026/10/08/what-should-we-tell-our-students/ Comments URL: https://news.ycombinator.com/item?id=50015236 Points: 12 # Comments: 0

Geral
Interesse
dev.to

Ten proofs, ten 97-99% scores, one rejection: what Verdikta's math bounties reveal about AI proof grading

Verdikta Bounties has run a series of math bounties where two AI models (one from OpenAI, one from Anthropic, 50% weight each) grade a written proof against a weighted rubric, and an on-chain escrow pays if the score clears a threshold. I went through all ten completed ones. The numbers tell a more interesting story than "AI can or can't check proofs". Bounty Theorem Threshold Result #114 Fermat's little theorem + compute 2^52 mod 53 85% 99% #116 Pigeonhole principle + card problem 77% 99% #119 A tree with n vertices has n-1 edges 88% 98% #120 Infinitely many primes 83% 99% #128 A set of n elements has 2^n subsets 84% 99% #131 Chain rule 85% 99% #132 det(AB) = det(A)det(B) 82% 97% #133 Continuous bijection, compact to Hausdorff, is a homeomorphism 78% 99% #134 Homomorphisms map identity to identity 83% 99% #135 Euler's formula V - E + F = 2 80% 79% (rejected), then 99% Eleven submissions in total. Ten passed, every one of them with 97% to 99%. The single rejection missed the bar by one point. When every accepted proof lands between 97 and 99, the grade carries almost no information. These are some of the most famous proofs in undergraduate mathematics: Euclid's primes, the pigeonhole principle, induction on trees. A model has seen thousands of clean versions of each, so it is comparing a submission against a memorized template, not checking a chain of reasoning from scratch. That is the hard part of proof verification for LLMs, and it isn't arithmetic. A model is best at recognizing a proof that looks like a proof it has seen. It is weakest exactly where verification matters: a step that is missing but expected, so the model's own memory quietly fills the gap. The rejected Euler submission is the most informative data point in the set. Its rubric weighted the complete proof at 0.45, worked examples at 0.25, and the theorem statement and a convexity note at 0.15 each. The published jury reasoning (on IPFS, linked from the bounty page) says: gpt-5.6-sol leaned to fund

IA
Interesse
dev.to

What Actually Makes PDFs Huge — and Why Local Compression Is the Only Enterprise Answer

What Actually Makes PDFs Huge — and Why Local Compression Is the Only Enterprise Answer Technical notes on document bloat, compliance constraints, and LLM pipeline costs. No product pitch; one personal anecdote at the end. It's almost never the text. Three usual suspects: Full-resolution embedded bitmaps. A 300 DPI A4 scan is ~25 MB of raw bitmap per page; a 100-page scan without compression is gigabytes. PDFs don't lossily compress embedded images by default. Full font embedding. CJK fonts can add tens of MB; subsetting typically cuts 90%+. Duplicated resources. The same watermark embedded 80 times, once per page. So effective PDF compression = image resampling + lossy/lossless encoding, font subsetting, and resource dedup. Tools that just slap a zip layer on top barely help — which is also why many online compressors underperform: they only treat the surface. Technically fine, compliance-wise disqualified. Upload a contract, bid document, or patient record to a third-party site and the data has left the intranet — for many organizations that's a hard red line, and even where it isn't, you have no idea when (or whether) the server-side copy is deleted. The enterprise requirement is therefore fully local processing: files never leave the machine. That constrains the stack — native engines written in systems languages (Rust/C++ territory) handle thousand-page documents in minutes, offline, throughput bounded by disk and CPU. One regional footnote: OFD, the Chinese official-layout document format, isn't recognized by most Western toolchains. If you process government documents, verify coverage explicitly. The lesson I keep re-learning on RAG projects: with multimodal models, page cost is dominated by image tokens, and it scales with resolution. Two practical optimizations: Compress and resolution-fit before inference. Recognition tasks don't need 300 DPI originals. Fit images to what the model actually needs — we've measured image token costs dropping by roughly 85% a

Dev
Interesse
dev.to

How to open an XRechnung, Factur-X or FatturaPA invoice without uploading it

Since 1 January 2025 every business in Germany must be able to receive structured e-invoices, and since 1 September 2026 so must every VAT-registered business in France. The trouble is what arrives: an XML file (XRechnung, UBL, CII), a PDF with an XML file hidden inside it (ZUGFeRD, Factur-X), or in Italy a signed .p7m envelope around FatturaPA XML. None of these open nicely in a normal viewer. Most free online viewers solve this by asking you to upload the invoice. An invoice carries names, addresses, VAT IDs, bank details and prices, so uploading it to a site you know nothing about is a poor trade. We built a set of viewers that do all the work in the page: XRechnung: UBL 2.1 invoices and credit notes, and UN/CEFACT CII. ZUGFeRD / Factur-X: the embedded factur-x.xml or zugferd-invoice.xml is pulled out of the PDF with pdf.js, then rendered. FatturaPA: FPR12 and FPA12, batches, and signed .p7m files (the CMS envelope is unwrapped in JavaScript; the signature is not verified, and the page says so). KSeF: Polish FA(2) and FA(3), including corrections. Peppol BIS / UBL: invoices and credit notes, also inside an SBDH envelope. Every format is mapped to one model based on the EN 16931 business terms (seller, buyer, VAT IDs, lines, VAT breakdown, totals, payment details) and shown as a readable invoice, with "print or save as PDF", a JSON export and a raw XML view. The file is read with the File API and parsed with DOMParser; there is no request with a body and no request to another site. Any DOCTYPE or ENTITY declaration is refused before parsing, so entity-expansion tricks do not apply. Every value is written with textContent, never as HTML. Attachments inside the invoice are offered only as downloads. It is a viewer, not a validator: it does not check the invoice against the EN 16931 rules or transmit anything. Try it: XRechnung viewer · Factur-X / ZUGFeRD · FatturaPA · KSeF · Peppol / UBL. All in 12 languages, free, no account.

Dev
Interesse
dev.to

Three Engines, One Informed Choice: Benchmarking Orbit

🎧 Listen to the podcast Why Detailed Instructions Paralyze AI — audio companion · 22:31 Open the podcast in another window so you can listen while reading and exploring the benchmark. This is a submission for the Kaggle Benchmarking Challenge. I started this benchmark with a familiar ambition: build three engines, compare them, and keep the best one. Then I spent time with what each engine actually showed me. My goal changed. I wanted users to understand their strengths and choose the view that helped them work with the evidence. That decision became the most useful result of this project. The measurements also gave me something harder to earn: a clearer sense of what I could claim, what I still needed to investigate, and where a successful-looking AI workflow could quietly fall short. I built Orbit, a research companion that connects questions, sources, passages, claims and human review. For this challenge, I focused on one behavior: can an AI workflow preserve the exact scope of a claim and recognize when the available evidence justifies a conclusion—or a pause? Consider two documents about a feature. One says it is supported locally in version 1. Another says it is unavailable in a hosted configuration in version 2. A useful assistant must retain those conditions. Otherwise, it can manufacture a contradiction by comparing statements about different situations. I examined three evidence engines: Engine What it makes visible When I would choose it Baseline Compact evidence items marked supporting, opposing or insufficient A quick, readable review of the evidence N Independent sets of supporting evidence (T), indeterminacy (I) and refuting evidence (F) Examining support and opposition together while keeping unresolved issues visible P Those evidence checks with declared, versioned scope and attribute-relation rules Investigating how conditions and explicit relations affect the comparison The operational recommendations are ADMIT, REJECT and HOLD. HOLD records what

IA
Interesse
dev.to

REST API Verification Needs an Email Lease

Email verification looks like a simple two-request flow: create an account, send a message, then accept a token. In a production REST API, it is closer to a distributed workflow. The send can be retried, delivered twice, or consumed twice. The failure mode I see most often is not a bad token. It is an ownership problem. Two requests believe they are allowed to consume the same verification message, or a delayed message arrives after the user has already requested a replacement. A lease gives the backend a clear answer to a useful question: which attempt currently owns this verification step? Suppose a mobile client calls POST /verification/email and times out. The server may have committed the request even though the client never saw the response. The client retries, and the API creates a second message. Later, both links are valid, or the older link unexpectedly wins. The same issue appears in automated environments that use a temp mailbox or a free temporary email address for test accounts. A mailbox can contain several plausible messages, but plausibility is not identity. The test needs to know which request created which message and which attempt is allowed to claim it. An email lease is a short-lived ownership record tied to a user, a verification purpose, and an idempotency key. It should have an owner, an expiry time, and a state. The state makes the workflow visible instead of hiding it inside a polling loop. I use four states for a verification delivery: requested -> leased -> consumed \-> expired requested means the API accepted the intent but has not assigned a delivery attempt. leased means one worker owns the attempt for a bounded period. consumed means the token was accepted successfully. expired means another attempt may replace it, subject to the product's rate limits. The lease should not be the token itself. Keep the token hash separate, and store only enough metadata to correlate the delivery: create table verification_deliveries ( id bigserial pr

Dev
Interesse
dev.to

[Tailscale] Complete Guide to VPN Connection to Home LAN with Subnet Router

Accessing Your Home LAN from Outside with Tailscale Subnet Router I want to access my home NAS or server while away from home. But VPN setup is difficult... I do not have a VPN router either... Tailscale solves these problems. In this article, I will explain how to build an environment using Docker that allows you to access your entire home LAN from outside using Tailscale Subnet Router functionality. VPN connection to home LAN (192.168.x.x) from smartphone/PC while away Name resolution for internal domains (*.example.local) using home DNS server Privacy protection so family members can use it but cannot see each other devices User Usage Remarks Admin Remote management, all LAN access Full admin privileges Family Simple LAN access (NAS, etc.) Limited privileges, privacy protection between terminals Requirement Description Access to home LAN from outside Reachable to all devices in 192.168.x.0/24 Inter-user communication blocking For privacy protection, family devices cannot communicate with each other Split DNS Only specific domains resolved by home DNS when connected to Tailscale Subnet Router only Exit Node (all traffic forwarding) not required Item Decision Reason Container runtime Docker Easy management, reproducibility Network mode host Required for Subnet Router State persistence Named Volume Re-authentication unnecessary on restart Health check Built-in endpoint Easy monitoring integration Component Role Remarks Tailscale Container Subnet Router, forwards traffic from Tailnet to LAN Uses SNAT DNS Server (Unbound) Internal domain name resolution Split DNS target UFW/iptables Firewall, controls forwarding Important settings required Tailscale enables SNAT by default (--snat-subnet-routes=true). This is equivalent to MASQUERADE (IP masquerade / NAPT) in Linux iptables. Setting Behavior Notes SNAT enabled (default) Source IP becomes Subnet Router IP No additional settings needed on LAN devices SNAT disabled Tailscale IP (100.x.x.x) is sent as-is Static routes mus

InfraDevLinux
Interesse
dev.to

10 Repos, Zero Dependencies: A Production PHP/JS Portfolio

I run The DJ Calendar — a real-time EDM tour date platform that's been in production since 2015. It's a single PHP + vanilla JS codebase with zero frameworks, zero build tools, and zero package managers. Over the past few weeks, I went through the codebase and extracted every reusable pattern into its own open-source repo. Not tutorials. Not simplified examples. The actual production code, cleaned, documented, and pushed. Here's the full portfolio. Every repo shares the same rules: Zero dependencies. No npm install. No Composer. No build step. Clone it and open index.html, or include the file. Extracted from production. Every pattern was already running on a live site before it became a repo. Live demo or CI test. If it runs in the browser, there's a GitHub Pages demo. If it's backend, there's a CI pipeline proving it works. MIT licensed. Use it, fork it, ship it. The hover preview system from the homepage cards. Hover any artist card and hear a 30-second iTunes preview with a real Web Audio API equalizer driving 8 canvas bars. Key patterns: iTunes Search API integration, Web Audio analyser with fftSize=64, generation-counter race condition guard, consent-first design (touch toggle, reduced-motion skip, autoplay gate). Repo | Live Demo The decorative 8-bar equalizer strip that runs on every homepage card. Pure CSS animation with a 1KB optional JS injector. Respects prefers-reduced-motion. Zero JS required to render — the CSS alone is the full widget. Repo | Live Demo A geolocation-aware tour map. Asks for location consent once, calculates haversine distance to upcoming shows, and renders them on a Leaflet map. If the user declines location, it shows a friendly fallback — it doesn't nag. Repo | Live Demo Client-side search across ~1,000 pages using a prebuilt JSON index. Scored AND matching across weighted fields (title, artist, venue, city), keyboard-first combobox with full ARIA wiring. Zero server round-trips after page load. This is the feature I'm proudest of on

Dev
Interesse